/* 1. Theme and shared styles */
:root,
[data-bs-theme='dark'] {
    --bs-body-bg: #0e1118;
    --bs-body-color: #edf0f7;
    --bs-secondary-color: #aab3c6;
    --bs-border-color: #2b3241;
    --bs-link-color: #c7baff;
    --bs-link-hover-color: #e2daff;
    --bs-font-sans-serif: Tahoma, 'Segoe UI', system-ui, sans-serif;
    --bs-border-radius: 0.375rem;

    --site-accent: #b6a5ff;
    --site-panel: #171b25;
    --site-muted: #aab3c6;
}

body {
    font-size: 15px;
    line-height: 1.8;
}

.member-dropdown .member-admin-link,
.member-dropdown .member-password-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
}
.member-dropdown .member-admin-link svg,
.member-dropdown .member-password-link svg {
    width: 17px;
    height: 17px;
    vertical-align: -.15em;
    flex-shrink: 0;
}
.account-password-layout { max-width: 520px; margin: 0 auto; }
.account-password-layout h1 svg { width: 24px; height: 24px; color: var(--site-accent); }
.registration-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.registration-captcha { overflow-x: auto; }

a {
    text-decoration: none;
}

.container {
    max-width: 1140px;
}

h1,
h2 {
    font-weight: 600;
    letter-spacing: -0.6px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(28px, 3.4vw, 38px);
    margin-bottom: 12px;
}

h1 > span {
    color: var(--site-accent);
}

h2 {
    font-size: 26px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #d9ceff;
    outline-offset: 4px;
}

.eyebrow,
.form-caption {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #b0a1cf;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--site-accent);
    flex-shrink: 0;
}

/* 2. Buttons */
.btn {
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    --bs-btn-color: #211639;
    --bs-btn-bg: #b6a5ff;
    --bs-btn-border-color: #b6a5ff;
    --bs-btn-hover-color: #211639;
    --bs-btn-hover-bg: #c8baff;
    --bs-btn-hover-border-color: #c8baff;
    --bs-btn-active-color: #211639;
    --bs-btn-active-bg: #a792ef;
    --bs-btn-active-border-color: #a792ef;
}

.btn-outline-secondary {
    --bs-btn-color: #c8cedd;
    --bs-btn-border-color: #353d50;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #242b3c;
    --bs-btn-hover-border-color: #535e77;
}

.btn-link {
    color: #c8cedd;
}

.btn-sm {
    padding: 8px 12px;
    min-height: 42px;
    font-size: 13px;
}

/* 3. Header and navigation */
.guides-list {
    display: grid;
    gap: 16px;
}

.guide-category {
    padding: clamp(14px, 3vw, 22px);
    background: radial-gradient(ellipse at top right, #7653c51c, transparent 65%), #171b25;
    border: 1px solid #49405f;
    border-radius: 8px;
    box-shadow: 0 12px 36px #0000001f;
}

.guide-category h2 {
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
}

.guide-category-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.guide-category-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: linear-gradient(135deg, #7c55be44, #30233f);
    border: 1px solid #8060ac66;
    color: #decaff;
}

.guide-category-icon svg { width: 22px; height: 22px; }
.guide-category-count {
    margin-left: auto;
    padding: 2px 10px;
    background: #b897ff14;
    border: 1px solid #b897ff33;
    border-radius: 8px;
    color: #cdbdff;
    font-size: 12px;
    flex-shrink: 0;
}

.guide-category-links {
    display: grid;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-category-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    background: #10151f88;
    border: 1px solid #303448;
    border-radius: 6px;
    color: #edf0f7;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.guide-category-links a:hover,
.guide-category-links a:focus-visible {
    color: #e4d4ff;
    background: #30243f;
    border-color: #8d6abc;
}
.guide-category-links a:focus-visible { outline: 2px solid #cdbdff; outline-offset: 3px; }
.guide-link-icon { display: flex; flex-shrink: 0; color: #a89bc3; }
.guide-link-title { min-width: 0; }
.guide-link-arrow { margin-left: auto; padding-left: 8px; color: #a89bc3; flex-shrink: 0; transition: transform .18s ease; }
.guide-category-links a:hover .guide-link-arrow { transform: translateX(3px); color: #e4d4ff; }
@media (prefers-reduced-motion: reduce) {
    .guide-category-links a, .guide-link-arrow { transition: none; }
    .guide-category-links a:hover .guide-link-arrow { transform: none; }
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: #171b25;
    border: 1px solid #303448;
    border-radius: 8px;
}

.guide-card .articles-symbol { margin: 0; flex-shrink: 0; }
.guide-card h2 { font-size: 18px; line-height: 1.6; margin: 0 0 6px; }
.guide-card p { color: #aab3c6; font-size: 13px; margin: 0; }

.guide-title-link { color: inherit; text-decoration: none; }
.guide-title-link:hover { color: #cdbdff; text-decoration: underline; }
.guide-detail-layout { max-width: 860px; margin: 0 auto; }
.guide-back { display: inline-block; color: #cdbdff; margin-bottom: 16px; font-size: 13px; }
.guide-detail { padding: clamp(18px, 4vw, 32px); background: #171b25; border: 1px solid #303448; border-radius: 8px; }
.guide-detail-header { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #303448; }
.guide-detail h1 { font-size: clamp(22px, 3vw, 30px); line-height: 1.6; margin: 14px 0 0; overflow-wrap: anywhere; }
.guide-draft-badge { display: inline-block; padding: 4px 10px; border-radius: 4px; background: #2c243f; color: #cdbdff; font-size: 12px; }
.guide-content { color: #c8cede; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.guide-content h2 { color: #edf0f7; font-size: 20px; margin: 28px 0 14px; }
.guide-content p { white-space: pre-line; margin-bottom: 16px; }
.guide-notice { padding: 12px 14px; background: #30291c; border-left: 3px solid #edc36b; border-radius: 4px; color: #f1d69f; }
.guide-steps { padding-left: 20px; }
.guide-steps li { padding-left: 6px; margin-bottom: 12px; white-space: pre-line; }
.guide-content figure + .guide-steps { margin-top: 20px; }
.guide-content .guide-source { font-size: 12px; margin-bottom: 8px; }
.guide-source a { color: #cdbdff; }
.guide-content figure { margin: 24px 0 0; }
.guide-content img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; }
.guide-content figcaption { color: #aab3c6; font-size: 12px; margin-top: 10px; text-align: center; }
.guide-image-placeholder { display: grid; place-items: center; min-height: 180px; padding: 20px; border: 1px dashed #4d4265; border-radius: 6px; background: #11151f; color: #aab3c6; text-align: center; }

.articles-placeholder {
    padding: 44px 20px;
    text-align: center;
    border: 1px solid #303448;
    border-radius: 8px;
    background: #171b25;
}

.articles-symbol {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #2c243f;
    color: #cdbdff;
}

.articles-symbol svg { width: 28px; height: 28px; }
.articles-placeholder h1 { font-size: 22px; margin-bottom: 10px; }
.articles-placeholder p { color: #aab3c6; font-size: 14px; margin: 0; }

.site-header {
    background: #121620;
    border-bottom: 1px solid #272d3a;
}

.navbar {
    min-height: 72px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font: 700 19px 'Segoe UI', sans-serif;
    letter-spacing: 1px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 36px;
    border: 1px solid #5a4b7c;
    border-radius: 6px;
    background: #2b243e;
    color: #cfbfff;
    font-size: 19px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.nav-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
}

.navbar-nav .nav-link.active {
    color: #c7baff;
}

.nav-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-member {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 11px;
    padding: 4px 10px;
    border: 1px solid #3d3653;
    border-radius: 6px;
    background: linear-gradient(120deg, #242035, #191d29);
    max-width: 100%;
}

.nav-member-name,
.nav-credit {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    line-height: 1.5;
}

.nav-member-name {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.member-toggle > .nav-icon {
    flex-shrink: 0;
}

.nav-member-label {
    color: #aab3c6;
    font-size: 11px;
}

.member-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d3c7ff;
    text-align: left;
    font: inherit;
}

.member-toggle:hover,
.member-toggle[aria-expanded='true'] {
    color: #eee5ff;
}

.member-toggle .nav-username {
    color: inherit;
}

.member-dropdown .dropdown-menu {
    --bs-dropdown-bg: #171b25;
    --bs-dropdown-border-color: #443953;
    --bs-dropdown-link-color: #e3c2cc;
    --bs-dropdown-link-hover-color: #ffe1e8;
    --bs-dropdown-link-hover-bg: #302230;
    --bs-dropdown-link-active-color: #ffe1e8;
    --bs-dropdown-link-active-bg: #3b2839;
    min-width: 180px;
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 12px 30px #00000030;
}

.member-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.nav-username {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #d3c7ff;
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (min-width: 992px) {
    .nav-actions,
    .nav-member {
        flex-wrap: nowrap;
    }

    .nav-member-name .nav-username {
        display: block;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.nav-credit {
    border-right: 1px solid #443953;
    padding-right: 10px;
    margin-right: 3px;
    max-width: 180px;
}

.nav-credit-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nav-credit strong {
    color: #eee5ff;
    font: 600 16px/1.5 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.nav-credit > .nav-icon {
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .navbar-collapse {
        padding-top: 12px;
    }

    .nav-actions {
        margin-top: 10px;
    }
}

/* Language selector */
.language-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 9px 10px;
    gap: 8px;
}

.language-globe {
    flex-shrink: 0;
}

.language-dropdown .dropdown-menu {
    --bs-dropdown-bg: #171b25;
    --bs-dropdown-border-color: #353d50;
    --bs-dropdown-link-color: #c8cedd;
    --bs-dropdown-link-hover-color: #edf0f7;
    --bs-dropdown-link-hover-bg: #242b3c;
    --bs-dropdown-link-active-color: #211639;
    --bs-dropdown-link-active-bg: #b6a5ff;
    min-width: 140px;
    padding: 6px;
    box-shadow: 0 12px 30px #00000030;
}

.language-dropdown .dropdown-item {
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 13px;
}

/* 4. Home page */
.main-content {
    min-height: calc(100svh - 190px);
    padding-top: 22px;
    padding-bottom: 32px;
}

.home-hero {
    --bs-gutter-x: 2rem;
    --bs-gutter-y: 1.5rem;
    padding-top: 14px;
    padding-bottom: 16px;
}

.home-product-image {
    display: block;
    overflow: hidden;
    border: 1px solid #39364f;
    border-radius: 8px;
    background: #10141e;
    box-shadow: 0 16px 40px #00000026;
}
.home-product-image img { display: block; width: 100%; height: auto; }
.home-guest-image { width: fit-content; max-width: 100%; margin-inline: auto; }
.home-guest-image img { width: auto; max-width: 100%; height: auto; }
.home-product-image:focus-visible { outline: 2px solid #cdbdff; outline-offset: 4px; }
.home-product-update {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 10px;
    font-size: 12px;
    color: #aab3c6;
}
.home-product-update > div { display: flex; flex-wrap: wrap; gap: 6px; color: #ded5ef; }
.home-product-update .download-update-age { color: #aab3c6; font-size: inherit; }
.version-number {
    color: #e4caff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .3px;
}

.hero-description {
    color: var(--site-muted);
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9da7bd;
    font-size: 12px;
    margin-top: 22px;
}

.note-line {
    width: 28px;
    height: 1px;
    background: #58506f;
}

.session-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #cfbfff;
    background: #211e31;
    border: 1px solid #3d3456;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
}

/* 5. Member card */
.member-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #39364f;
    border-radius: 8px;
    background: linear-gradient(145deg, #23263b, #151923 78%);
    padding: 22px;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 55px;
    right: -62px;
    width: 230px;
    height: 230px;
    border: 1px solid #b6a5ff13;
    border-radius: 50%;
    box-shadow: 0 0 0 32px #b6a5ff05, 0 0 0 64px #b6a5ff03;
    pointer-events: none;
}

.card-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #bcb0d7;
    font: 500 10px 'Segoe UI', sans-serif;
    letter-spacing: 2.5px;
}

.card-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cab8ff;
}

.member-symbol {
    position: relative;
    display: grid;
    place-items: center;
    width: 92px;
    height: 104px;
    border: 1px solid #665784;
    border-radius: 8px;
    background: linear-gradient(145deg, #51466e, #252337);
    color: #e0d4ff;
    font: 500 56px 'Segoe UI', sans-serif;
    margin: 32px auto;
    transform: rotate(-9deg);
    box-shadow: 0 18px 40px #00000030;
}

.member-symbol > span {
    position: absolute;
    right: -12px;
    bottom: -8px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid #645779;
    border-radius: 6px;
    background: #c5b3ff;
    color: #282036;
    font-size: 22px;
}

.member-card-content {
    position: relative;
}

.member-badge {
    display: inline-block;
    padding: 3px 9px;
    border: 1px solid #4b3f63;
    border-radius: 4px;
    background: #2d263f;
    color: #c6b5eb;
    font-size: 11px;
    margin-bottom: 10px;
}

.member-card h2 {
    font-size: 24px;
}

.member-card p {
    color: var(--site-muted);
    font-size: 13px;
    margin: 12px 0 21px;
}

.card-link {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #39354a;
    padding-top: 14px;
    color: #d2c4ff;
    font-size: 13px;
}

.account-details {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #39354a;
    font-size: 12px;
}

.account-details > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
}

.account-details dt {
    font-weight: 400;
    color: var(--site-muted);
}

.account-details dd {
    margin: 0;
}

/* 6. Login and registration forms */
.auth-layout {
    max-width: 1010px;
    margin: 0 auto;
    padding-top: 16px;
}

.auth-intro h1 {
    font-size: clamp(30px, 3.3vw, 41px);
}

.back-link {
    color: #b8b0cc;
    font-size: 13px;
}

.auth-card {
    background: var(--site-panel);
    border: 1px solid #303448;
    border-radius: 8px;
    padding: 28px;
}

.form-caption {
    font-size: 10px;
    margin-bottom: 11px;
}

.auth-card h2 {
    font-size: 25px;
    margin-bottom: 8px;
}

.form-description {
    color: var(--site-muted);
    font-size: 13px;
    margin-bottom: 22px;
}

.form-label {
    color: #ccd3e1;
    font-size: 13px;
}

.form-control {
    background: #10151f;
    border-color: #343e52;
    border-radius: 6px;
    color: #edf0f7;
    min-height: 48px;
    font-size: 16px;
}

.form-control:focus {
    background: #161b28;
    border-color: var(--site-accent);
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem #b6a5ff24;
}

.form-text {
    color: #a4aec3;
    font-size: 11px;
    margin-top: 7px;
}

.auth-switch {
    text-align: center;
    color: var(--site-muted);
    font-size: 13px;
    border-top: 1px solid #2c3242;
    padding-top: 18px;
    margin: 26px 0 0;
}

/* 7. Footer, error page, and accessibility */
.site-footer {
    border-top: 1px solid #272d3a;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    padding: 20px 10px;
    color: #a1abc0;
    font-size: 12px;
}

.footer-brand {
    font: 600 12px 'Segoe UI', sans-serif;
    color: #c8c7da;
    letter-spacing: 1px;
}

.site-footer small {
    margin-left: auto;
    font-size: 11px;
}

.not-found {
    padding: 60px 0;
}

.skip-link {
    position: absolute;
    left: 10px;
    top: -100px;
    padding: 10px 12px;
    color: #211639;
    background: var(--site-accent);
    z-index: 100;
}

.skip-link:focus {
    top: 10px;
}

/* 8. Form alerts and success notifications */
.feedback-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid;
    margin-bottom: 18px;
    font-size: 13px;
}

.feedback-alert p {
    margin: 4px 0 0;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.feedback-alert[hidden] {
    display: none;
}

.feedback-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.feedback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.feedback-error {
    color: #f4bbc4;
    background: #291b25;
    border-color: #633343;
}

.feedback-error .feedback-title {
    color: #ffd5dc;
}

.feedback-success {
    color: #a9d9c3;
    background: #172a26;
    border-color: #315b4d;
}

.feedback-success .feedback-title {
    color: #c7ebda;
}

.notification-container {
    position: fixed;
    top: var(--notification-top, 104px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1090;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.notification-toast {
    --bs-toast-bg: #19382b;
    --bs-toast-color: #e0ffec;
    --bs-toast-border-color: #4dff91;
    --bs-toast-header-bg: transparent;
    --bs-toast-header-color: #4dff91;
    --bs-toast-header-border-color: transparent;
    --bs-toast-border-radius: 8px;
    width: 100%;
    box-shadow: 0 12px 35px #00000040;
    pointer-events: auto;
    font-size: 13px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.notification-toast .feedback-icon {
    color: #4dff91;
    flex-shrink: 0;
}

.notification-toast .toast-body {
    padding: 0;
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.8;
}

.notification-toast .btn-close {
    flex-shrink: 0;
    min-width: 28px;
    min-height: 28px;
}

.notification-container > noscript .feedback-alert {
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .notification-toast {
        transition: none;
    }
}

/* 9. Credit top-up page */
.topup-pin-shops {
    margin-top: 20px;
    padding: 18px;
    background: #171b25;
    border: 1px solid #303448;
    border-radius: 8px;
}
.topup-pin-shops h2 { font-size: 16px; margin: 0 0 16px; }
.topup-pin-shops a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    color: #e4d4ff;
    text-decoration: none;
    font-size: 13px;
}
.topup-pin-shops a + a { border-top: 1px solid #303448; }
.topup-pin-shops a:hover { color: #fff; }
.topup-pin-shops strong { display: block; font-weight: 600; }
.topup-pin-shops small { display: block; color: #aab3c6; font-size: 11px; margin-top: 4px; }

.topup-heading {
    margin: 15px 0 32px;
}

.topup-heading h1 {
    font-size: 34px;
    margin-bottom: 10px;
}

.topup-heading .eyebrow {
    margin-bottom: 10px;
}

.topup-balance,
.topup-panel {
    border: 1px solid #303448;
    border-radius: 8px;
    padding: 22px;
    background: #171b25;
}

.topup-balance {
    background: linear-gradient(135deg, #28223d, #191e2b);
    border-color: #49405f;
}

.topup-amount {
    color: #e3d8ff;
    font: 600 38px/1.5 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums;
    margin-top: 10px;
    overflow-wrap: anywhere;
}

.topup-unit {
    color: #bcb0d7;
    font-size: 13px;
}

.payment-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0;
    border: 0;
}

.payment-brands legend {
    float: none;
    width: 100%;
    margin: 0;
    color: #ccd3e1;
    font-size: 13px;
}

.payment-option {
    flex: 1 1 160px;
    min-width: 0;
    max-width: 240px;
}

.payment-brand {
    display: block;
    margin: 0;
    padding: 10px;
    border: 1px solid #343b4e;
    border-radius: 6px;
    background: #121722;
    cursor: pointer;
}

.payment-brand-choice:checked + .payment-brand {
    border-color: #b6a5ff;
    background: #252036;
    box-shadow: 0 0 0 1px #b6a5ff;
}

.payment-brand-choice:focus-visible + .payment-brand {
    outline: 3px solid #d9ceff;
    outline-offset: 4px;
}

.payment-brand-choice:disabled + .payment-brand {
    opacity: 0.55;
    cursor: default;
}

.payment-brand-choice:not(:disabled) + .payment-brand:hover {
    border-color: #b6a5ff;
}

.payment-brand-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    overflow: hidden;
    border-radius: 4px;
    background: #ffffff;
}

.payment-brand-truemoney {
    background: #ffffff;
}

.payment-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.payment-brand-truemoney img {
    object-fit: cover;
}

.payment-brand-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 11px;
    color: #d2cddd;
    font: 500 13px/1.6 'Segoe UI', sans-serif;
}

.payment-region {
    padding: 1px 6px;
    background: #292239;
    border: 1px solid #493c60;
    border-radius: 4px;
    color: #d4c1ff;
    font-size: 10px;
}

.topup-pin-group .form-control {
    min-width: 0;
    letter-spacing: 1px;
}

.topup-pin-group .btn {
    min-width: 100px;
}

.topup-account {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #42384f;
    padding-top: 14px;
    margin-top: 20px;
    font-size: 13px;
    color: #b8b0cc;
}

.topup-account strong {
    color: #e3d8ff;
    overflow-wrap: anywhere;
}

.topup-provider {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.provider-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid #594b72;
    background: #2c243f;
    color: #d4c3ff;
    font: 600 17px 'Segoe UI', sans-serif;
}

.topup-provider h2 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 4px;
    letter-spacing: normal;
}

.topup-provider p {
    margin: 0;
    color: #aab3c6;
    font-size: 12px;
}

.topup-unavailable {
    margin-left: auto;
    background: #252a36;
    color: #bbc3d5;
    border: 1px solid #3a4256;
    border-radius: 4px;
    padding: 4px 9px;
    font-size: 11px;
}

.topup-notice {
    border: 1px solid #443959;
    border-radius: 6px;
    padding: 16px;
    background: #211d2f;
    color: #d4c6ef;
    font-size: 14px;
}

.topup-notice p {
    margin: 8px 0 0;
    font-size: 13px;
    color: #b5acc7;
}

.topup-history {
    margin-top: 24px;
}

.topup-history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.topup-history-heading h2 {
    font-size: 21px;
    margin: 0;
}

.topup-history-heading > span,
.topup-timezone {
    color: #aab3c6;
    font-size: 12px;
}

.topup-empty {
    text-align: center;
    padding: 28px 0 16px;
}

.topup-empty-symbol {
    display: inline-block;
    color: #b6a5ff;
    font-size: 28px;
    margin-bottom: 12px;
}

.topup-empty h3 {
    font-size: 16px;
}

.topup-empty p {
    color: #aab3c6;
    font-size: 13px;
}

.topup-table {
    --bs-table-bg: transparent;
    --bs-table-border-color: #303448;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.topup-table td,
.topup-table th {
    padding: 12px 10px;
    overflow-wrap: anywhere;
    min-width: 115px;
}

.topup-table th {
    color: #aab3c6;
    font-weight: 400;
}

.topup-table td:last-child {
    color: #cdbdff;
}

/* 10. Mobile layout */
@media (max-width: 767px) {
    .navbar {
        min-height: 76px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .navbar-collapse {
        padding-top: 16px;
    }

    .nav-actions {
        margin-top: 10px;
    }

    .main-content {
        padding-top: 20px;
        padding-bottom: 32px;
    }

    .home-hero {
        padding-top: 10px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-description br {
        display: none;
    }

    .hero-note {
        margin-top: 22px;
    }

    .member-card {
        max-width: 440px;
        margin: 0 auto;
    }

    .auth-layout {
        padding-top: 0;
    }

    .auth-intro .hero-description {
        margin-bottom: 12px;
    }

    .auth-card {
        padding: 20px;
    }

    .site-footer {
        gap: 10px;
    }

    .site-footer small {
        width: 100%;
        margin-left: 0;
    }
}

/* ปุ่มแบ่งหน้าประวัติเติมเครดิต */
.topup-history-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.topup-history-footer .topup-timezone { margin: 0; }
.topup-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.topup-pagination a, .topup-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 4px; font-size: 13px; }
.topup-pagination a { color: #bfc7da; background: #171c29; border: 1px solid #2a3145; text-decoration: none; }
.topup-pagination a:hover, .topup-pagination a:focus-visible { color: #fff; border-color: #a38adf; background: #252039; }
.topup-pagination .topup-page-current { color: #e6ddff; background: #36284f; border: 1px solid #71549d; }
.topup-pagination .topup-page-gap { min-width: 20px; padding: 0; color: #aab3c6; }
.topup-history[aria-busy="true"] .topup-pagination { opacity: .55; pointer-events: none; }
.topup-history-heading > div > span { color: #aab3c6; font-size: 12px; }
