@import url('https://fonts.googleapis.com/css2?family=Mali:wght@500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #fff6fa;
    --panel: #fffefe;
    --panel2: #f4fbff;
    --gold: #d99235;
    --cyan: #469bbd;
    --text: #463744;
    --muted: #715f6c;
    --line: rgba(157, 91, 124, .22);
    --red: #d75686;
    --green: #3f9b68;
}

html { color-scheme: light; }
html,
body.royal-v2 { max-width: 100%; overflow-x: hidden; }
body.royal-v2 {
    color: var(--text);
    font: 500 16px/1.75 'Noto Sans Thai', Tahoma, sans-serif;
    background: #fff7fa;
}
body.royal-v2::before {
    background:
        linear-gradient(90deg, rgba(255,252,253,.98), rgba(255,255,255,.86) 52%, rgba(255,248,252,.9)),
        url('../../assets/pastel-kingdom-hero.png') 68% center / cover no-repeat;
    filter: saturate(.92) brightness(1.04);
}
body.royal-v2::after {
    background: linear-gradient(180deg, rgba(255,255,255,.06) 38%, rgba(255,246,250,.9));
}
body.royal-v2 .sky { opacity: .12; }

body.royal-v2 .topbar {
    height: 88px;
    border-bottom: 1px solid rgba(174,103,137,.25);
    background: rgba(255,253,254,.97);
    box-shadow: 0 12px 36px rgba(102,57,83,.12);
    backdrop-filter: blur(20px) saturate(145%);
}
body.royal-v2 .brand .crest { width: 100px; height: 74px; }
body.royal-v2 .crest img { filter: drop-shadow(0 7px 13px rgba(100,56,81,.17)); }
body.royal-v2 .brand b {
    color: #483642;
    font: 700 19px/1.25 'Mali', 'Noto Sans Thai', sans-serif;
    text-shadow: none;
}
body.royal-v2 .brand small { color: #b84c75; font-size: 10px; letter-spacing: .15em; }
body.royal-v2 .realm-status {
    border-color: rgba(53,145,91,.3);
    color: #496a57;
    background: #f0fff6;
}
body.royal-v2 .realm-status i { background: #3db56f; box-shadow: 0 0 13px rgba(61,181,111,.48); }
body.royal-v2 .realm-status b { color: #278a55; }
body.royal-v2 .mini-wallet {
    border-color: rgba(199,137,39,.32);
    color: #865a1a;
    background: #fff9e8;
}
body.royal-v2 .top-actions a,
body.royal-v2 .top-actions .danger {
    border-color: rgba(199,77,121,.3);
    color: #a93d66;
    background: #fff1f6;
    font-weight: 700;
}

body.royal-v2 .app-shell { grid-template-columns: 292px minmax(0,1fr); }
body.royal-v2 .sidebar {
    top: 88px;
    height: calc(100vh - 88px);
    border-right: 1px solid rgba(169,100,132,.22);
    color: var(--text);
    background: rgba(255,253,254,.97);
    box-shadow: 16px 0 42px rgba(94,55,78,.09);
    backdrop-filter: blur(18px);
}
body.royal-v2 .sidebar-title small { color: #b94871; font: 700 11px/1.4 'Mali', sans-serif; }
body.royal-v2 .sidebar-title span { color: #6d5966; font-size: 13px; }
body.royal-v2 .account-mini {
    border-color: rgba(72,151,184,.27);
    color: var(--text);
    background: linear-gradient(135deg, #f0fbff, #fff2f7);
    box-shadow: inset 0 1px #fff;
}
body.royal-v2 .account-avatar {
    border-color: rgba(201,76,121,.35);
    color: #fff;
    background: radial-gradient(circle at 35% 25%, #ffdce7, #ee85aa 65%, #ca557f);
    box-shadow: 0 8px 20px rgba(172,64,107,.19);
}
body.royal-v2 .account-mini small,
body.royal-v2 .account-mini em { color: #705d69; }
body.royal-v2 .account-mini b { color: #463540; font-size: 15px; }
body.royal-v2 .sidebar nav a {
    min-height: 46px;
    color: #594651;
    font-size: 14px;
    font-weight: 700;
}
body.royal-v2 .sidebar nav a:hover,
body.royal-v2 .sidebar nav a.active {
    border-color: rgba(203,80,123,.26);
    color: #a83e66;
    background: linear-gradient(90deg, #fff0f5, #eefaff);
    box-shadow: inset 4px 0 #dd6e97, 0 8px 22px rgba(76,118,137,.08);
}
body.royal-v2 .sidebar nav span { color: #bc4b74; }
body.royal-v2 .home-link { border-color: rgba(159,91,123,.2); color: #624e5a; font-weight: 700; }

body.royal-v2 .content { padding: 46px clamp(24px,4vw,70px) 90px; }
body.royal-v2 .page-head { border-bottom-color: rgba(155,91,121,.2); }
body.royal-v2 .page-head::after { background: linear-gradient(90deg, #d75a88, #eab348, #51a9cb, transparent); }
body.royal-v2 .page-head h1 {
    color: #41313c;
    font: 700 clamp(31px,3.1vw,45px)/1.25 'Mali', 'Noto Sans Thai', sans-serif;
    letter-spacing: -.03em;
    text-shadow: none;
}
body.royal-v2 .page-head p { max-width: 780px; color: #67535f; font-size: 16px; }
body.royal-v2 .eyebrow { color: #b8436d; font: 700 11px/1.5 'Mali', sans-serif; letter-spacing: .14em; }

body.royal-v2 .panel,
body.royal-v2 .hero-wallet,
body.royal-v2 .download-hero,
body.royal-v2 .auth-card {
    border: 1px solid rgba(159,91,124,.23);
    border-radius: 24px;
    color: #4d3c47;
    background: rgba(255,255,255,.985);
    box-shadow: 0 22px 55px rgba(92,49,74,.13), inset 0 1px #fff;
    backdrop-filter: blur(20px);
}
body.royal-v2 .panel::before,
body.royal-v2 .hero-wallet::before,
body.royal-v2 .auth-card::before { background: linear-gradient(90deg, transparent, #dd668f, #eab74f, #56adca, transparent); }
body.royal-v2 .panel h2,
body.royal-v2 .hero-wallet h2 {
    color: #42323d;
    font: 700 22px/1.35 'Mali', 'Noto Sans Thai', sans-serif;
}
body.royal-v2 .panel p,
body.royal-v2 .panel li { color: #584550; }
body.royal-v2 .panel > header { border-bottom-color: rgba(159,91,124,.18); }
body.royal-v2 .hero-wallet {
    border-color: rgba(196,75,119,.3);
    background: radial-gradient(circle at 92% 50%, rgba(246,193,75,.18), transparent 25%), #fffafb;
}
body.royal-v2 .hero-wallet strong { color: #b9436e; font-family: 'Mali', sans-serif; text-shadow: none; }
body.royal-v2 .hero-wallet p,
body.royal-v2 .hero-wallet small,
body.royal-v2 .hero-wallet span { color: #624e5a; }

body.royal-v2 .stat-grid article,
body.royal-v2 .service-grid a,
body.royal-v2 .reward-bundle,
body.royal-v2 .loyalty-stats article,
body.royal-v2 .download-card {
    border-color: rgba(153,89,119,.2);
    color: #4c3a45;
    background: rgba(255,255,255,.98);
    box-shadow: 0 12px 30px rgba(67,94,107,.09), inset 0 1px #fff;
}
body.royal-v2 .stat-grid article:nth-child(1) { border-top: 4px solid #db6b94; }
body.royal-v2 .stat-grid article:nth-child(2) { border-top: 4px solid #54a8c8; }
body.royal-v2 .stat-grid article:nth-child(3) { border-top: 4px solid #67ad65; }
body.royal-v2 .stat-grid b,
body.royal-v2 .service-grid b { color: #3f3039; font-size: 16px; }
body.royal-v2 .stat-grid span,
body.royal-v2 .service-grid span { color: #66535e; font-size: 14px; }
body.royal-v2 .service-grid a:hover { border-color: rgba(199,73,119,.42); box-shadow: 0 18px 40px rgba(109,59,89,.14); }
body.royal-v2 .service-grid i { border-color: rgba(199,72,117,.3); color: #b9446d; background: #fff0f5; }

body.royal-v2 input,
body.royal-v2 select,
body.royal-v2 textarea,
body.royal-v2 .gm-form input,
body.royal-v2 .gm-item-card textarea {
    min-height: 46px;
    border-color: rgba(141,83,110,.32);
    color: #3f3039;
    background: #fff;
    box-shadow: inset 0 2px 7px rgba(66,83,91,.05);
    font: 600 15px/1.5 'Noto Sans Thai', sans-serif;
}
body.royal-v2 input::placeholder,
body.royal-v2 textarea::placeholder { color: #8c7783; opacity: 1; }
body.royal-v2 input:focus,
body.royal-v2 select:focus,
body.royal-v2 textarea:focus,
body.royal-v2 .gm-form input:focus,
body.royal-v2 .gm-item-card textarea:focus { border-color: #489ab9; box-shadow: 0 0 0 3px rgba(67,158,193,.16); }
body.royal-v2 .primary,
body.royal-v2 .confirm-payment,
body.royal-v2 .gm-btn.gold {
    color: #fff;
    background: linear-gradient(135deg, #e67ea2, #ca4d7a 60%, #a83661);
    box-shadow: 0 12px 27px rgba(171,54,98,.23);
    font-weight: 800;
}
body.royal-v2 .gm-btn.cyan { color: #173f4f; background: #7bd2ec; }
body.royal-v2 .gm-btn.green { color: #214d35; background: #91d7aa; }
body.royal-v2 .gm-btn.purple { color: #423470; background: #c4b3ec; }

body.royal-v2 .auth-layout::before {
    background: linear-gradient(90deg, rgba(255,252,253,.97), rgba(255,255,255,.73) 58%, rgba(255,248,251,.7)), url('../../assets/pastel-kingdom-hero.png') 68% center / cover no-repeat;
}
body.royal-v2 .hero-copy h1 {
    color: #3e3039;
    font: 700 clamp(40px,5vw,68px)/1.14 'Mali', 'Noto Sans Thai', sans-serif;
    text-shadow: 0 3px 0 #fff, 0 9px 25px rgba(82,47,68,.14);
}
body.royal-v2 .hero-copy em { color: #b83e69; }
body.royal-v2 .hero-copy p { max-width: 660px; color: #594550; font-size: 17px; }
body.royal-v2 .feature-row span,
body.royal-v2 .badge,
body.royal-v2 .requirements span { border-color: rgba(61,148,180,.3); color: #347f9b; background: #f0fbff; font-weight: 700; }
body.royal-v2 .tabs { background: #eef7fa; }
body.royal-v2 .tabs button { color: #6b5864; font-weight: 700; }
body.royal-v2 .tabs button.active { color: #a63a62; background: linear-gradient(135deg, #ffeaf1, #fff6db); }

body.royal-v2 .gm-tabs,
body.royal-v2 .gm-section-menu { border-color: rgba(153,89,119,.22); color: #503d49; background: rgba(255,255,255,.98); }
body.royal-v2 .gm-tabs button { color: #624f5a; font-weight: 700; }
body.royal-v2 .gm-tabs button.active { color: #a53962; background: linear-gradient(135deg, #ffe8f0, #eaf9ff); }
body.royal-v2 table { border-color: rgba(153,89,119,.18); color: #463640; font-size: 14px; }
body.royal-v2 th { color: #28728f; background: #e9f8fd; font-weight: 800; }
body.royal-v2 td { color: #4d3c46; border-bottom-color: rgba(153,89,119,.13); }
body.royal-v2 tbody tr:hover { background: #fff2f7; }
body.royal-v2 .table-wrap { border-color: rgba(153,89,119,.18); background: #fff; }
body.royal-v2 .code-chip,
body.royal-v2 .character-class { border-color: rgba(111,89,176,.3); color: #66519e; background: #f3efff; }
body.royal-v2 .mini-btn { border-color: rgba(53,137,168,.32); color: #2e6f87; background: #edfbff; font-weight: 700; }
body.royal-v2 .mini-btn.danger { border-color: rgba(199,72,117,.32); color: #a63e65; background: #fff0f5; }
body.royal-v2 .toast.ok { border-color: #76c39a; color: #276f4d; background: #edfbf3; }
body.royal-v2 .toast.bad { border-color: #df93ae; color: #9d365b; background: #fff0f5; }
body.royal-v2 footer { border-top-color: rgba(153,89,119,.2); color: #695560; background: rgba(255,251,253,.96); }

@media (max-width: 1050px) {
    body.royal-v2 .app-shell { grid-template-columns: 92px minmax(0,1fr); }
}
@media (max-width: 760px) {
    body.royal-v2 { font-size: 15px; }
    body.royal-v2 .topbar { height: 74px; padding-inline: 10px; overflow: hidden; }
    body.royal-v2 .brand .crest { width: 70px; height: 56px; }
    body.royal-v2 .brand > span:last-child { display: none; }
    body.royal-v2 .realm-status,
    body.royal-v2 .mini-wallet { display: none !important; }
    body.royal-v2 .brand { flex: 0 0 auto; }
    body.royal-v2 .top-actions { display: none !important; }
    body.royal-v2 .top-actions a,
    body.royal-v2 .top-actions .danger { padding: 8px 10px; font-size: 11px; white-space: nowrap; }
    body.royal-v2 .sidebar {
        display: block !important;
        position: fixed !important;
        inset: auto 0 0 0 !important;
        z-index: 40;
        width: 100%;
        height: 76px;
        padding: 5px 6px;
        border: 0;
        border-top: 1px solid rgba(159,91,124,.24);
        background: rgba(255,253,254,.99);
        box-shadow: 0 -10px 28px rgba(91,48,73,.12);
    }
    body.royal-v2 .sidebar-title,
    body.royal-v2 .account-mini,
    body.royal-v2 .home-link { display: none; }
    body.royal-v2 .sidebar nav {
        display: flex;
        width: 100%;
        gap: 3px;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    body.royal-v2 .sidebar nav a {
        display: grid;
        flex: 0 0 68px;
        min-width: 68px;
        min-height: 64px;
        place-items: center;
        align-content: center;
        gap: 1px;
        padding: 4px;
        font-size: 9px;
        line-height: 1.2;
        text-align: center;
    }
    body.royal-v2 .sidebar nav span { width: auto; font-size: 17px; }
    body.royal-v2 .app-shell {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        grid-template-columns: none !important;
    }
    body.royal-v2 .content {
        display: block;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0;
        padding: 29px 14px 104px;
    }
    body.royal-v2 .page-head,
    body.royal-v2 .hero-wallet,
    body.royal-v2 .stat-grid,
    body.royal-v2 .panel { width: 100%; min-width: 0; max-width: 100%; }
    body.royal-v2 .page-head h1 {
        max-width: 100%;
        font-size: 29px;
        line-height: 1.3;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
    body.royal-v2 .page-head p { max-width: 100%; overflow-wrap: anywhere; }
    body.royal-v2 .hero-wallet { display: block !important; padding: 25px 20px; }
    body.royal-v2 .hero-wallet > * { max-width: 100%; }
    body.royal-v2 .hero-wallet strong { font-size: clamp(38px, 12vw, 50px); white-space: nowrap; }
    body.royal-v2 .auth-layout::before { background-position: 72% center; }
    body.royal-v2 .hero-copy h1 { font-size: 36px; line-height: 1.2; }
    body.royal-v2 .hero-copy p { font-size: 15px; }
    body.royal-v2 .page-head h1 { font-size: 30px; }
    body.royal-v2 .page-head p { font-size: 15px; }
    body.royal-v2 .panel,
    body.royal-v2 .hero-wallet,
    body.royal-v2 .auth-card { border-radius: 19px; }
}

/* V3 visual comfort pass — muted surfaces plus full legacy component coverage */
body.royal-v2 {
    --bg: #e8e2e5;
    --panel: #f5f0f2;
    --panel2: #e6ecef;
    --text: #443640;
    --muted: #6a5863;
    color: var(--text);
    background: #e8e2e5;
}
body.royal-v2::before {
    background: linear-gradient(90deg, rgba(229,223,227,.97), rgba(235,229,232,.86) 54%, rgba(224,220,224,.9)), url('../../assets/pastel-kingdom-hero.png') 68% center / cover no-repeat;
    filter: saturate(.72) brightness(.9);
}
body.royal-v2::after { background: linear-gradient(180deg, rgba(228,222,226,.18) 36%, rgba(232,225,229,.94)); }
body.royal-v2 .topbar {
    background: rgba(244,239,242,.98);
    box-shadow: 0 11px 32px rgba(73,49,63,.13);
}
body.royal-v2 .sidebar {
    background: rgba(241,235,238,.98);
    box-shadow: 14px 0 36px rgba(70,48,61,.1);
}
body.royal-v2 .account-mini { background: linear-gradient(135deg, #e5edf0, #eee1e6); }
body.royal-v2 .sidebar nav a:hover,
body.royal-v2 .sidebar nav a.active {
    color: #913859;
    background: linear-gradient(90deg, #eedde4, #e0e9ec);
}
body.royal-v2 .content { background: linear-gradient(180deg, rgba(237,231,234,.42), rgba(229,223,226,.7)); }
body.royal-v2 .panel,
body.royal-v2 .hero-wallet,
body.royal-v2 .download-hero,
body.royal-v2 .auth-card {
    border-color: rgba(130,86,107,.24);
    color: #443640;
    background: linear-gradient(145deg, rgba(247,243,245,.99), rgba(234,228,231,.98));
    box-shadow: 0 19px 45px rgba(69,47,60,.13), inset 0 1px rgba(255,255,255,.72);
}
body.royal-v2 .hero-wallet {
    background: radial-gradient(circle at 92% 50%, rgba(211,168,77,.13), transparent 26%), linear-gradient(120deg, #f0e4e9, #e1ebee);
}
body.royal-v2 .stat-grid article,
body.royal-v2 .service-grid a,
body.royal-v2 .reward-bundle,
body.royal-v2 .loyalty-stats article,
body.royal-v2 .download-card {
    border-color: rgba(126,84,104,.21);
    color: #443640;
    background: linear-gradient(145deg, #f5f1f3, #e8e2e5);
    box-shadow: 0 10px 25px rgba(63,46,56,.09), inset 0 1px rgba(255,255,255,.68);
}

/* AP shop and top-up loyalty */
body.royal-v2 .loyalty-banner,
body.royal-v2 .ap-shop-banner,
body.royal-v2 .topup-loyalty-mini {
    border: 1px solid rgba(137,87,111,.25);
    color: #483944;
    background: radial-gradient(circle at 0 50%, rgba(220,164,185,.2), transparent 30%), linear-gradient(135deg, #e7dfe3, #dce6e9);
    box-shadow: 0 14px 32px rgba(67,47,59,.1), inset 0 1px rgba(255,255,255,.56);
}
body.royal-v2 .loyalty-banner h2,
body.royal-v2 .ap-shop-banner h2 { color: #71344d; font-family: 'Mali', 'Noto Sans Thai', sans-serif; }
body.royal-v2 .loyalty-banner p,
body.royal-v2 .ap-shop-banner p { color: #65535e; }
body.royal-v2 .loyalty-banner > span { color: #a8496e; filter: saturate(.78); }
body.royal-v2 .loyalty-stats small,
body.royal-v2 .loyalty-stats span { color: #685661; }
body.royal-v2 .loyalty-stats strong,
body.royal-v2 .loyalty-stats .available strong,
body.royal-v2 .ap-shop-stats .available strong { color: #9d3f63; text-shadow: none; }
body.royal-v2 .reward-bundle header h2,
body.royal-v2 .ap-shop-product header h2 { color: #604052; }
body.royal-v2 .reward-bundle header p,
body.royal-v2 .ap-shop-product header p { color: #705e69; }
body.royal-v2 .bundle-item,
body.royal-v2 .ap-shop-price {
    border-color: rgba(122,83,101,.22);
    color: #443640;
    background: #e4dfe2;
}
body.royal-v2 .bundle-item > div { background: #d5d0d4; }
body.royal-v2 .bundle-item b { color: #493944; }
body.royal-v2 .bundle-item small,
body.royal-v2 .ap-shop-price span { color: #705e68; }
body.royal-v2 .ap-shop-price strong { color: #943b5e; }
body.royal-v2 .reward-bundle button,
body.royal-v2 .ap-shop-product button {
    border: 1px solid rgba(150,58,94,.28);
    color: #fff;
    background: linear-gradient(135deg, #d87599, #b54872 60%, #963256);
    box-shadow: 0 9px 20px rgba(137,47,82,.2);
    font-weight: 800;
}
body.royal-v2 .reward-bundle button:disabled,
body.royal-v2 .ap-shop-product button:disabled {
    border-color: rgba(104,87,96,.2);
    color: #6d5c66;
    background: #d9d2d6;
    box-shadow: none;
    opacity: .74;
}

/* GM and management controls */
body.royal-v2 .gm-nav-link {
    border-color: rgba(173,72,111,.24) !important;
    color: #8e3859 !important;
    background: rgba(231,211,219,.66) !important;
}
body.royal-v2 .gm-nav-link.active,
body.royal-v2 .gm-nav-link:hover {
    border-color: rgba(169,66,106,.38) !important;
    color: #7f2f4e !important;
    background: linear-gradient(90deg, #ead3dc, #dce7ea) !important;
}
body.royal-v2 .gm-warning,
body.royal-v2 .gm-tabs,
body.royal-v2 .gm-section-menu {
    border-color: rgba(134,87,109,.24);
    color: #51404b;
    background: linear-gradient(145deg, #e8e0e4, #dfe6e8);
    box-shadow: 0 11px 26px rgba(64,46,56,.09);
}
body.royal-v2 .gm-warning strong { color: #8f3758; }
body.royal-v2 .gm-warning span,
body.royal-v2 .gm-card p,
body.royal-v2 .gm-log-panel p,
body.royal-v2 .form-note { color: #695762; }
body.royal-v2 .gm-tabs button,
body.royal-v2 .gm-tabs .gm-online-menu,
body.royal-v2 .gm-section-menu a { color: #5e4b57; }
body.royal-v2 .gm-tabs button:hover,
body.royal-v2 .gm-tabs button.active,
body.royal-v2 .gm-tabs .gm-online-menu:hover,
body.royal-v2 .gm-section-menu a:hover,
body.royal-v2 .gm-section-menu a.active {
    color: #843150;
    background: linear-gradient(135deg, #efdce4, #dce9ec);
    box-shadow: inset 0 0 0 1px rgba(162,68,104,.2);
}
body.royal-v2 .gm-card h2,
body.royal-v2 .gm-log-panel h2,
body.royal-v2 .code-claims h3 { color: #493943; }
body.royal-v2 .gm-icon { color: #963b5e; background: #ead9e0; }
body.royal-v2 .gm-item-card,
body.royal-v2 .gm-ap-shop-card,
body.royal-v2 .gm-loyalty-card,
body.royal-v2 .gm-code-card { border-left-color: #b55277; }
body.royal-v2 .gm-credit-card { border-left-color: #4e9870; }
body.royal-v2 .expiry-quick,
body.royal-v2 .reward-item-row,
body.royal-v2 .code-item-row,
body.royal-v2 .gm-send-item-row,
body.royal-v2 .online-giveaway-item-row,
body.royal-v2 .online-player-results,
body.royal-v2 .online-player-results article {
    border-color: rgba(122,83,101,.2);
    color: #463741;
    background: #e5e0e3;
}
body.royal-v2 .online-player-check,
body.royal-v2 .online-data-protection {
    border-color: rgba(62,135,94,.24);
    color: #3e5548;
    background: linear-gradient(135deg, #dce9e1, #e3e8e8);
}
body.royal-v2 .online-player-check strong,
body.royal-v2 .online-data-protection h2 { color: #34704f; }
body.royal-v2 .online-player-check span,
body.royal-v2 .online-data-protection p,
body.royal-v2 .online-player-results article span { color: #5f6c64; }

/* Character, online-reward and code surfaces */
body.royal-v2 .character-empty-state,
body.royal-v2 .character-stat-grid article,
body.royal-v2 .online-data-grid article,
body.royal-v2 .online-summary > div,
body.royal-v2 .reward-card,
body.royal-v2 .online-reward-item,
body.royal-v2 .code-redeem-hero,
body.royal-v2 .point-progress-panel,
body.royal-v2 .purchase-summary,
body.royal-v2 .payment-box {
    border-color: rgba(122,83,101,.21);
    color: #473842;
    background: linear-gradient(145deg, #f1ecef, #e1e5e6);
}
body.royal-v2 .character-item-tabs button {
    border-color: rgba(119,82,99,.22);
    color: #5e4c57;
    background: #e5dfe2;
}
body.royal-v2 .character-item-tabs button.active {
    border-color: rgba(173,67,108,.35);
    color: #8d3657;
    background: #ecd7df;
}
body.royal-v2 .character-stat-grid b,
body.royal-v2 .online-data-grid strong,
body.royal-v2 .online-summary strong,
body.royal-v2 .reward-info h2,
body.royal-v2 .code-redeem-hero h2 { color: #493943; }
body.royal-v2 .character-stat-grid small,
body.royal-v2 .character-stat-grid span,
body.royal-v2 .online-data-grid small,
body.royal-v2 .online-summary small,
body.royal-v2 .reward-info span,
body.royal-v2 .online-reward-item small { color: #6a5863; }
body.royal-v2 .code-chip { color: #673f7e; background: #e5dced; }
body.royal-v2 .table-wrap,
body.royal-v2 table { background: #f1edef; }
body.royal-v2 th { color: #2d6f87; background: #dbe9ed; }
body.royal-v2 td { color: #4a3b45; }
body.royal-v2 tbody tr:hover { background: #e9dce2; }
body.royal-v2 footer { color: #65525e; background: #ded6da; }

@media (max-width: 760px) {
    body.royal-v2 .sidebar { background: rgba(242,237,240,.99); }
    body.royal-v2 .content { background: linear-gradient(180deg, rgba(235,229,232,.66), rgba(228,222,225,.84)); }
}

/* V4 targeted cleanup: GM navigation and online-point reward cards */
body.royal-v2 .sidebar nav .gm-nav-link {
    width: 100%;
    border: 1px solid rgba(159,83,112,.24) !important;
    border-radius: 12px;
    color: #7f3652 !important;
    background: #eadfe3 !important;
    box-shadow: inset 4px 0 #c85a82, 0 7px 16px rgba(74,50,64,.08) !important;
}
body.royal-v2 .sidebar nav .gm-nav-link span { color: #aa4569 !important; }
body.royal-v2 .sidebar nav .gm-nav-link::after { border-color: #608b9c; }
body.royal-v2 .sidebar nav .gm-nav-link:hover,
body.royal-v2 .sidebar nav .gm-nav-link.active {
    border-color: rgba(159,69,105,.36) !important;
    color: #713047 !important;
    background: linear-gradient(90deg, #e8d2da, #dbe7ea) !important;
    box-shadow: inset 4px 0 #bb496f, 0 9px 20px rgba(76,48,63,.1) !important;
}

body.royal-v2 .online-shop-grid { gap: 16px; }
body.royal-v2 .reward-card.point-shop-card {
    grid-template-columns: 126px minmax(0,1fr) minmax(130px,auto);
    gap: 20px;
    overflow: hidden;
    padding: 20px;
    border-color: rgba(126,84,104,.22);
    background: linear-gradient(145deg, #f3eef1, #e5e7e8);
}
body.royal-v2 .reward-card.point-shop-card .point-cost {
    min-height: 112px;
    padding: 18px 14px;
    display: grid;
    place-content: center;
    justify-items: center;
    border: 1px solid rgba(163,81,112,.25);
    border-radius: 15px;
    color: #5f4553;
    background: linear-gradient(145deg, #eadce2, #e4e8e8);
    box-shadow: inset 0 1px rgba(255,255,255,.62);
}
body.royal-v2 .reward-card.point-shop-card .point-cost b {
    color: #a23f64;
    font: 700 30px/1.1 'Mali', 'Noto Sans Thai', sans-serif;
    text-shadow: none;
}
body.royal-v2 .reward-card.point-shop-card .point-cost span { margin-top: 7px; color: #62505b; font-weight: 700; }
body.royal-v2 .reward-card.point-shop-card .reward-info { min-width: 0; }
body.royal-v2 .reward-card.point-shop-card .reward-info > small { color: #6b5964; }
body.royal-v2 .reward-card.point-shop-card .reward-info h2 { overflow-wrap: anywhere; color: #493943; }
body.royal-v2 .reward-card.point-shop-card .online-reward-items { min-width: 0; }
body.royal-v2 .reward-card.point-shop-card .online-reward-item {
    min-width: 0;
    max-width: 100%;
    background: #ded9dc;
}
body.royal-v2 .reward-card.point-shop-card .reward-state { min-width: 130px; color: #6d4d5c; text-align: center; }
body.royal-v2 .reward-card.point-shop-card.available { border-color: rgba(65,139,96,.3); }

@media (max-width: 900px) {
    body.royal-v2 .reward-card.point-shop-card { grid-template-columns: 110px minmax(0,1fr); }
    body.royal-v2 .reward-card.point-shop-card .reward-state { grid-column: 2; justify-self: stretch; text-align: left; }
}
@media (max-width: 700px) {
    body.royal-v2 .reward-card.point-shop-card { grid-template-columns: 1fr; padding: 17px; }
    body.royal-v2 .reward-card.point-shop-card .point-cost { min-height: 88px; }
    body.royal-v2 .reward-card.point-shop-card .reward-state { grid-column: auto; min-width: 0; width: 100%; }
}

/* V4 text clarity — strong contrast, normal smoothing, no fuzzy decorative shadow */
body.royal-v2 {
    color: #382d34;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.72;
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    text-rendering: optimizeLegibility;
}
body.royal-v2 :where(h1,h2,h3,h4,p,a,label,button,th,td,input,select,textarea,small,span,b,strong,em) {
    text-shadow: none !important;
}
body.royal-v2 .content,
body.royal-v2 .auth-main { color: #382d34; }
body.royal-v2 .page-head h1,
body.royal-v2 .panel h2,
body.royal-v2 .panel h3,
body.royal-v2 .gm-card h2,
body.royal-v2 .reward-info h2,
body.royal-v2 .reward-bundle h2 { color: #352932 !important; font-weight: 800; }
body.royal-v2 .page-head p,
body.royal-v2 .panel p,
body.royal-v2 .panel li,
body.royal-v2 .panel > header p,
body.royal-v2 .gm-card p,
body.royal-v2 .gm-log-panel p,
body.royal-v2 .form-note,
body.royal-v2 .online-note { color: #574650 !important; font-weight: 500; opacity: 1; }
body.royal-v2 .eyebrow,
body.royal-v2 .sidebar-title small { color: #983c5f !important; font-weight: 800; }
body.royal-v2 .sidebar-title span,
body.royal-v2 .account-mini small,
body.royal-v2 .account-mini em { color: #56434e !important; opacity: 1; }
body.royal-v2 .sidebar nav a,
body.royal-v2 .home-link { color: #493943; font-weight: 800; }

body.royal-v2 label,
body.royal-v2 .gm-form label,
body.royal-v2 .gm-item-card label,
body.royal-v2 .gm-credit-card label,
body.royal-v2 .reward-item-row label,
body.royal-v2 .code-item-row label,
body.royal-v2 .gm-send-item-row label,
body.royal-v2 .online-giveaway-item-row label,
body.royal-v2 .auth-form label,
body.royal-v2 .password-form label,
body.royal-v2 .shop-form label,
body.royal-v2 .ap-shop-product label {
    color: #3f3139 !important;
    font-size: 14px;
    font-weight: 800;
    opacity: 1 !important;
}
body.royal-v2 label small,
body.royal-v2 .gm-form label small { color: #66525e !important; font-weight: 600; opacity: 1; }
body.royal-v2 input,
body.royal-v2 select,
body.royal-v2 textarea,
body.royal-v2 .gm-form input,
body.royal-v2 .gm-item-card textarea {
    color: #2f252b !important;
    caret-color: #9a3b60;
    font-size: 15px;
    font-weight: 700;
    opacity: 1;
}
body.royal-v2 input::placeholder,
body.royal-v2 textarea::placeholder { color: #77646f !important; font-weight: 600; opacity: 1 !important; }
body.royal-v2 select option { color: #2f252b; background: #f3eef1; }

body.royal-v2 .stat-grid small,
body.royal-v2 .stat-grid span,
body.royal-v2 .loyalty-stats small,
body.royal-v2 .loyalty-stats span,
body.royal-v2 .service-grid span,
body.royal-v2 .bundle-item small,
body.royal-v2 .reward-info span,
body.royal-v2 .online-summary small,
body.royal-v2 .online-reward-item small,
body.royal-v2 .character-stat-grid small,
body.royal-v2 .character-stat-grid span,
body.royal-v2 .online-data-grid small { color: #594751 !important; font-weight: 600; opacity: 1; }
body.royal-v2 .stat-grid b,
body.royal-v2 .loyalty-stats strong,
body.royal-v2 .online-summary strong { font-weight: 800; }

body.royal-v2 table { color: #332930; }
body.royal-v2 th { color: #285f73 !important; font-size: 13px; font-weight: 800; opacity: 1; }
body.royal-v2 td { color: #3c3037 !important; font-size: 14px; font-weight: 600; opacity: 1; }
body.royal-v2 td small { color: #614f59 !important; font-weight: 600; opacity: 1; }
body.royal-v2 button,
body.royal-v2 .primary,
body.royal-v2 .mini-btn,
body.royal-v2 .gm-btn { font-weight: 800; opacity: 1; }
body.royal-v2 button:disabled { opacity: .72; }
body.royal-v2 .item-slot .quantity,
body.royal-v2 .item-slot .item-strength,
body.royal-v2 .item-slot .item-amount { text-shadow: 0 1px 3px #000, 0 0 3px #000 !important; }

/* V5 light/dark theme switch */
body.royal-v2 .topbar .theme-toggle {
    min-width: 112px;
    min-height: 42px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    border: 1px solid rgba(117,82,101,.25);
    border-radius: 999px;
    color: #493843;
    background: linear-gradient(145deg, #f8f3f5, #e3e9eb);
    box-shadow: 0 7px 18px rgba(77,52,67,.1), inset 0 1px rgba(255,255,255,.7);
    font: 800 12px/1.2 'Noto Sans Thai', Tahoma, sans-serif;
    cursor: pointer;
}
body.royal-v2 .topbar .theme-toggle:hover { border-color: rgba(177,70,112,.38); color: #8f3458; transform: translateY(-1px); }
body.royal-v2 .theme-toggle-icon { font-size: 18px; line-height: 1; }

html[data-theme="dark"] { color-scheme: dark; background: #080d15; }
html[data-theme="dark"] body.royal-v2 {
    --bg: #090f18;
    --panel: #151c28;
    --panel2: #1a2633;
    --text: #f1eaf0;
    --muted: #bfb2bc;
    --line: rgba(174,198,216,.14);
    color: #f1eaf0;
    background: #090f18;
}
html[data-theme="dark"] body.royal-v2::before { background: linear-gradient(90deg, rgba(6,11,19,.98), rgba(10,16,25,.88) 54%, rgba(6,10,18,.94)), url('../../assets/pastel-kingdom-hero.png') 68% center / cover no-repeat; filter: saturate(.58) brightness(.48); }
html[data-theme="dark"] body.royal-v2::after { background: linear-gradient(180deg, rgba(7,12,20,.12) 32%, rgba(7,11,18,.93)); }
html[data-theme="dark"] body.royal-v2 .sky { opacity: .05; }
html[data-theme="dark"] body.royal-v2 .topbar { border-bottom-color: rgba(221,116,158,.2); color: #f1eaf0; background: rgba(12,17,27,.98); box-shadow: 0 11px 34px rgba(0,0,0,.38); }
html[data-theme="dark"] body.royal-v2 .brand b { color: #fff5fa; }
html[data-theme="dark"] body.royal-v2 .brand small { color: #ed87ac; }
html[data-theme="dark"] body.royal-v2 .realm-status { border-color: rgba(78,190,129,.3); color: #b9d3c4; background: #10271d; }
html[data-theme="dark"] body.royal-v2 .realm-status b { color: #77e5a9; }
html[data-theme="dark"] body.royal-v2 .mini-wallet { border-color: rgba(213,166,75,.3); color: #f3cf83; background: #2b2518; }
html[data-theme="dark"] body.royal-v2 .top-actions a,
html[data-theme="dark"] body.royal-v2 .top-actions .danger { border-color: rgba(218,91,139,.3); color: #ffabc8; background: #291722; }
html[data-theme="dark"] body.royal-v2 .topbar .theme-toggle { border-color: rgba(106,190,220,.28); color: #f5edf2; background: linear-gradient(145deg, #222a39, #141b28); box-shadow: 0 8px 20px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.06); }

html[data-theme="dark"] body.royal-v2 .sidebar { border-right-color: rgba(177,199,214,.12); color: #f1eaf0; background: rgba(12,17,27,.98); box-shadow: 14px 0 36px rgba(0,0,0,.25); }
html[data-theme="dark"] body.royal-v2 .sidebar-title small,
html[data-theme="dark"] body.royal-v2 .eyebrow { color: #ff8eb6 !important; }
html[data-theme="dark"] body.royal-v2 .sidebar-title span,
html[data-theme="dark"] body.royal-v2 .account-mini small,
html[data-theme="dark"] body.royal-v2 .account-mini em { color: #bfb2bc !important; }
html[data-theme="dark"] body.royal-v2 .account-mini { border-color: rgba(93,169,197,.22); color: #eee7ec; background: linear-gradient(135deg, #182733, #251a25); }
html[data-theme="dark"] body.royal-v2 .account-mini b { color: #fff2f7; }
html[data-theme="dark"] body.royal-v2 .sidebar nav a,
html[data-theme="dark"] body.royal-v2 .home-link { color: #d7cbd3; }
html[data-theme="dark"] body.royal-v2 .sidebar nav a:hover,
html[data-theme="dark"] body.royal-v2 .sidebar nav a.active { border-color: rgba(216,100,145,.3); color: #ffb0cb; background: linear-gradient(90deg, #35202c, #172934); }
html[data-theme="dark"] body.royal-v2 .sidebar nav .gm-nav-link { border-color: rgba(216,93,141,.3) !important; color: #ffb2cc !important; background: #291c25 !important; box-shadow: inset 4px 0 #dc6993, 0 7px 16px rgba(0,0,0,.2) !important; }
html[data-theme="dark"] body.royal-v2 .sidebar nav .gm-nav-link:hover,
html[data-theme="dark"] body.royal-v2 .sidebar nav .gm-nav-link.active { color: #ffd5e3 !important; background: linear-gradient(90deg, #38212d, #1b2a34) !important; }

html[data-theme="dark"] body.royal-v2 .content { color: #f1eaf0; background: linear-gradient(180deg, rgba(10,15,24,.62), rgba(8,12,20,.84)); }
html[data-theme="dark"] body.royal-v2 .auth-main { color: #f1eaf0; }
html[data-theme="dark"] body.royal-v2 .page-head h1,
html[data-theme="dark"] body.royal-v2 .panel h2,
html[data-theme="dark"] body.royal-v2 .panel h3,
html[data-theme="dark"] body.royal-v2 .gm-card h2,
html[data-theme="dark"] body.royal-v2 .reward-info h2,
html[data-theme="dark"] body.royal-v2 .reward-bundle h2 { color: #fff6fb !important; }
html[data-theme="dark"] body.royal-v2 .page-head p,
html[data-theme="dark"] body.royal-v2 .panel p,
html[data-theme="dark"] body.royal-v2 .panel li,
html[data-theme="dark"] body.royal-v2 .panel > header p,
html[data-theme="dark"] body.royal-v2 .gm-card p,
html[data-theme="dark"] body.royal-v2 .gm-log-panel p,
html[data-theme="dark"] body.royal-v2 .form-note,
html[data-theme="dark"] body.royal-v2 .online-note { color: #c8bbc4 !important; }
html[data-theme="dark"] body.royal-v2 .panel,
html[data-theme="dark"] body.royal-v2 .hero-wallet,
html[data-theme="dark"] body.royal-v2 .download-hero,
html[data-theme="dark"] body.royal-v2 .auth-card,
html[data-theme="dark"] body.royal-v2 .stat-grid article,
html[data-theme="dark"] body.royal-v2 .service-grid a,
html[data-theme="dark"] body.royal-v2 .reward-bundle,
html[data-theme="dark"] body.royal-v2 .loyalty-stats article,
html[data-theme="dark"] body.royal-v2 .download-card { border-color: rgba(129,177,203,.18); color: #f1eaf0; background: linear-gradient(145deg, #18212e, #0d1520); box-shadow: 0 18px 42px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.04); }
html[data-theme="dark"] body.royal-v2 .loyalty-banner,
html[data-theme="dark"] body.royal-v2 .ap-shop-banner,
html[data-theme="dark"] body.royal-v2 .topup-loyalty-mini,
html[data-theme="dark"] body.royal-v2 .gm-warning,
html[data-theme="dark"] body.royal-v2 .gm-tabs,
html[data-theme="dark"] body.royal-v2 .gm-section-menu { border-color: rgba(132,178,200,.18); color: #eee7ec; background: linear-gradient(145deg, #1c2330, #101a25); box-shadow: 0 12px 28px rgba(0,0,0,.26); }
html[data-theme="dark"] body.royal-v2 .loyalty-banner h2,
html[data-theme="dark"] body.royal-v2 .ap-shop-banner h2,
html[data-theme="dark"] body.royal-v2 .gm-warning strong { color: #ffacc8; }
html[data-theme="dark"] body.royal-v2 .loyalty-banner p,
html[data-theme="dark"] body.royal-v2 .ap-shop-banner p,
html[data-theme="dark"] body.royal-v2 .loyalty-stats small,
html[data-theme="dark"] body.royal-v2 .loyalty-stats span { color: #c3b6bf !important; }
html[data-theme="dark"] body.royal-v2 .hero-wallet p,
html[data-theme="dark"] body.royal-v2 .hero-wallet small,
html[data-theme="dark"] body.royal-v2 .hero-wallet span,
html[data-theme="dark"] body.royal-v2 .stat-grid small,
html[data-theme="dark"] body.royal-v2 .stat-grid span,
html[data-theme="dark"] body.royal-v2 .service-grid span,
html[data-theme="dark"] body.royal-v2 .bundle-item small,
html[data-theme="dark"] body.royal-v2 .reward-info span,
html[data-theme="dark"] body.royal-v2 .online-summary small,
html[data-theme="dark"] body.royal-v2 .online-reward-item small,
html[data-theme="dark"] body.royal-v2 .character-stat-grid small,
html[data-theme="dark"] body.royal-v2 .character-stat-grid span,
html[data-theme="dark"] body.royal-v2 .online-data-grid small { color: #c8bbc4 !important; }
html[data-theme="dark"] body.royal-v2 .stat-grid b,
html[data-theme="dark"] body.royal-v2 .service-grid b,
html[data-theme="dark"] body.royal-v2 .hero-wallet strong,
html[data-theme="dark"] body.royal-v2 .online-summary strong,
html[data-theme="dark"] body.royal-v2 .character-stat-grid b,
html[data-theme="dark"] body.royal-v2 .online-data-grid strong { color: #fff5fa !important; }
html[data-theme="dark"] body.royal-v2 .bundle-item,
html[data-theme="dark"] body.royal-v2 .ap-shop-price,
html[data-theme="dark"] body.royal-v2 .expiry-quick,
html[data-theme="dark"] body.royal-v2 .reward-item-row,
html[data-theme="dark"] body.royal-v2 .code-item-row,
html[data-theme="dark"] body.royal-v2 .gm-send-item-row,
html[data-theme="dark"] body.royal-v2 .online-giveaway-item-row,
html[data-theme="dark"] body.royal-v2 .online-player-results,
html[data-theme="dark"] body.royal-v2 .online-player-results article { border-color: rgba(132,174,195,.17); color: #eee7ec; background: #18202b; }
html[data-theme="dark"] body.royal-v2 .bundle-item b,
html[data-theme="dark"] body.royal-v2 .bundle-item small,
html[data-theme="dark"] body.royal-v2 .ap-shop-price span { color: #d0c3cb !important; }

html[data-theme="dark"] body.royal-v2 .character-empty-state,
html[data-theme="dark"] body.royal-v2 .character-stat-grid article,
html[data-theme="dark"] body.royal-v2 .online-data-grid article,
html[data-theme="dark"] body.royal-v2 .online-summary > div,
html[data-theme="dark"] body.royal-v2 .reward-card,
html[data-theme="dark"] body.royal-v2 .online-reward-item,
html[data-theme="dark"] body.royal-v2 .code-redeem-hero,
html[data-theme="dark"] body.royal-v2 .point-progress-panel,
html[data-theme="dark"] body.royal-v2 .purchase-summary,
html[data-theme="dark"] body.royal-v2 .payment-box,
html[data-theme="dark"] body.royal-v2 .reward-card.point-shop-card { border-color: rgba(132,177,199,.18); color: #eee7ec; background: linear-gradient(145deg, #19222f, #101923); }
html[data-theme="dark"] body.royal-v2 .reward-card.point-shop-card .point-cost { border-color: rgba(216,99,145,.28); color: #f0e7ed; background: linear-gradient(145deg, #31212a, #1b2530); box-shadow: inset 0 1px rgba(255,255,255,.05); }
html[data-theme="dark"] body.royal-v2 .reward-card.point-shop-card .point-cost b { color: #ff9fbe; }
html[data-theme="dark"] body.royal-v2 .reward-card.point-shop-card .point-cost span,
html[data-theme="dark"] body.royal-v2 .reward-card.point-shop-card .reward-info > small,
html[data-theme="dark"] body.royal-v2 .reward-card.point-shop-card .reward-state { color: #c6b9c2; }
html[data-theme="dark"] body.royal-v2 .reward-card.point-shop-card .reward-info h2 { color: #fff5fa !important; }
html[data-theme="dark"] body.royal-v2 .reward-card.point-shop-card .online-reward-item { background: #202630; }

html[data-theme="dark"] body.royal-v2 label,
html[data-theme="dark"] body.royal-v2 .gm-form label,
html[data-theme="dark"] body.royal-v2 .reward-item-row label,
html[data-theme="dark"] body.royal-v2 .code-item-row label,
html[data-theme="dark"] body.royal-v2 .gm-send-item-row label,
html[data-theme="dark"] body.royal-v2 .online-giveaway-item-row label,
html[data-theme="dark"] body.royal-v2 .auth-form label,
html[data-theme="dark"] body.royal-v2 .password-form label,
html[data-theme="dark"] body.royal-v2 .shop-form label { color: #f0e7ed !important; }
html[data-theme="dark"] body.royal-v2 input,
html[data-theme="dark"] body.royal-v2 select,
html[data-theme="dark"] body.royal-v2 textarea,
html[data-theme="dark"] body.royal-v2 .gm-form input,
html[data-theme="dark"] body.royal-v2 .gm-item-card textarea { border-color: rgba(127,177,201,.23); color: #fff6fa !important; background: #0e1722; box-shadow: inset 0 2px 7px rgba(0,0,0,.22); }
html[data-theme="dark"] body.royal-v2 input::placeholder,
html[data-theme="dark"] body.royal-v2 textarea::placeholder { color: #ad9fa8 !important; }
html[data-theme="dark"] body.royal-v2 select option { color: #f1eaf0; background: #111a25; }
html[data-theme="dark"] body.royal-v2 .table-wrap,
html[data-theme="dark"] body.royal-v2 table { color: #eee7ec; background: #121a25; }
html[data-theme="dark"] body.royal-v2 th { color: #98d9ed !important; background: #172b37; }
html[data-theme="dark"] body.royal-v2 td { color: #eee7ec !important; border-bottom-color: rgba(173,195,211,.1); }
html[data-theme="dark"] body.royal-v2 td small { color: #b6a9b2 !important; }
html[data-theme="dark"] body.royal-v2 tbody tr:hover { background: #241c27; }
html[data-theme="dark"] body.royal-v2 footer { color: #b7aab3; background: #0a0f17; }

@media (max-width: 1050px) {
    body.royal-v2 .topbar .theme-toggle { min-width: 42px; width: 42px; padding-inline: 0; }
    body.royal-v2 .theme-toggle-label { display: none; }
}
@media (max-width: 760px) {
    body.royal-v2 .topbar .theme-toggle { margin-left: auto; min-width: 40px; width: 40px; min-height: 40px; }
    html[data-theme="dark"] body.royal-v2 .sidebar { background: rgba(12,17,27,.99); }
    html[data-theme="dark"] body.royal-v2 .content { background: linear-gradient(180deg, rgba(9,14,23,.8), rgba(7,11,18,.95)); }
}
/* Password recovery by email OTP */
.forgot-password-link{display:block;width:max-content;margin:-7px 0 15px auto;color:#b53e6b;font-size:13px;font-weight:800;text-decoration:none}.forgot-password-link:hover{color:#df5688;text-decoration:underline}.reset-auth-layout{grid-template-columns:minmax(0,1.05fr) minmax(410px,.95fr);gap:clamp(38px,6vw,86px);min-height:calc(100vh - 160px)}.reset-hero-copy{max-width:680px}.reset-security-points{display:flex;flex-wrap:wrap;gap:9px;margin-top:24px}.reset-security-points span{padding:9px 13px;border:1px solid rgba(201,102,140,.22);border-radius:999px;color:#765461;background:rgba(255,255,255,.64);font-size:12px;font-weight:750;box-shadow:0 7px 20px rgba(77,48,60,.06)}.reset-card{width:100%;max-width:520px;justify-self:end;padding:30px}.reset-progress{display:grid;grid-template-columns:auto 1fr auto 1fr auto;align-items:center;gap:9px;margin-bottom:27px}.reset-progress span{display:grid;justify-items:center;gap:5px;color:#998790;font-size:10px;font-weight:800;white-space:nowrap}.reset-progress span b{width:32px;height:32px;display:grid;place-items:center;border:1px solid rgba(168,135,150,.3);border-radius:50%;color:#8a7180;background:#f7f2f5}.reset-progress span.active{color:#af3563}.reset-progress span.active b,.reset-progress span.done b{border-color:rgba(213,81,132,.5);color:#fff;background:linear-gradient(135deg,#e96b9a,#bd3e6d);box-shadow:0 7px 20px rgba(190,55,107,.2)}.reset-progress span.done b:after{content:'✓';font-size:13px}.reset-progress span.done b{font-size:0}.reset-progress i{height:1px;background:linear-gradient(90deg,rgba(204,81,128,.36),rgba(96,177,203,.25))}.reset-card-heading{margin-bottom:22px}.reset-card-heading small{color:#cf4d7e;font-size:10px;font-weight:900;letter-spacing:2px}.reset-card-heading h2{margin:7px 0 7px;color:#4e3945;font-size:25px;line-height:1.3}.reset-card-heading p{margin:0;color:#806d77;font-size:13px;line-height:1.75}.reset-card-heading strong{color:#b53967}.reset-form.auth-form.active{display:block}.reset-form .primary{width:100%}.reset-code-input{text-align:center;font-size:28px!important;font-weight:900!important;letter-spacing:12px!important;font-variant-numeric:tabular-nums}.reset-hint{margin:-5px 0 17px;color:#8c7882;font-size:12px;line-height:1.7}.reset-secondary-link,.reset-back-link{display:block;text-align:center;text-decoration:none}.reset-secondary-link{margin-top:17px;color:#c34876;font-size:12px;font-weight:800}.reset-back-link{margin-top:24px;padding-top:19px;border-top:1px solid rgba(153,113,132,.16);color:#76636d;font-size:13px}.reset-secondary-link:hover,.reset-back-link:hover{color:#db5787}.reset-card .captcha{grid-template-columns:150px 1fr 45px}.reset-card .captcha img{width:150px}
html[data-theme="dark"] body.royal-v2 .forgot-password-link{color:#ff9abc}html[data-theme="dark"] body.royal-v2 .reset-security-points span{border-color:rgba(103,177,205,.23);color:#d9cbd4;background:rgba(19,28,40,.83);box-shadow:0 8px 22px rgba(0,0,0,.18)}html[data-theme="dark"] body.royal-v2 .reset-progress span{color:#aa9aa5}html[data-theme="dark"] body.royal-v2 .reset-progress span b{border-color:rgba(137,175,194,.25);color:#c4b8c0;background:#171f2b}html[data-theme="dark"] body.royal-v2 .reset-progress span.active{color:#ffa4c3}html[data-theme="dark"] body.royal-v2 .reset-card-heading h2{color:#fff2f7}html[data-theme="dark"] body.royal-v2 .reset-card-heading p,html[data-theme="dark"] body.royal-v2 .reset-hint{color:#c8bac4}html[data-theme="dark"] body.royal-v2 .reset-card-heading strong{color:#ff9fc0}html[data-theme="dark"] body.royal-v2 .reset-back-link{border-top-color:rgba(151,187,204,.14);color:#c8bac4}html[data-theme="dark"] body.royal-v2 .reset-secondary-link{color:#ff9abc}
@media(max-width:860px){.reset-auth-layout{grid-template-columns:1fr;gap:28px}.reset-hero-copy{max-width:none;text-align:center}.reset-security-points{justify-content:center}.reset-card{justify-self:center}}@media(max-width:560px){.reset-card{padding:23px 18px}.reset-card .captcha{grid-template-columns:1fr 45px}.reset-card .captcha img{grid-column:1/-1;width:100%;object-fit:cover}.reset-progress{gap:5px}.reset-progress span{font-size:9px}.reset-progress span b{width:29px;height:29px}.reset-code-input{font-size:24px!important;letter-spacing:9px!important}}

/* Navigation controls polish */
body.royal-v2 .topbar .theme-toggle {
    margin-right: 18px;
}
body.royal-v2 .top-actions .home-top-link {
    min-height: 42px;
    padding: 0 16px 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(189, 75, 118, .26);
    border-radius: 999px;
    color: #77364f;
    background: linear-gradient(145deg, #fff9fb, #f7e7ee);
    box-shadow: 0 8px 20px rgba(104, 55, 73, .10), inset 0 1px rgba(255,255,255,.9);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body.royal-v2 .top-actions .home-top-link > span {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: 0 0 26px;
    border-radius: 50%;
    color: #b33e69;
    background: rgba(211, 76, 126, .12);
    font-size: 16px;
    line-height: 1;
}
body.royal-v2 .top-actions .home-top-link:hover {
    transform: translateY(-1px);
    border-color: rgba(199, 67, 117, .48);
    background: linear-gradient(145deg, #fff, #fbeaf1);
    box-shadow: 0 11px 25px rgba(123, 49, 78, .16), inset 0 1px rgba(255,255,255,.95);
}

body.royal-v2 .sidebar .home-link {
    min-height: 54px;
    margin: 26px 4px 0;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(181, 76, 116, .20);
    border-radius: 14px;
    color: #674a58;
    background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(249,237,243,.92));
    box-shadow: 0 9px 22px rgba(89, 52, 67, .08), inset 0 1px rgba(255,255,255,.9);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body.royal-v2 .sidebar .home-link:after {
    content: none !important;
}
body.royal-v2 .sidebar .home-link-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 11px;
    color: #b93f6c;
    background: linear-gradient(145deg, #ffeaf2, #f3dbe5);
    box-shadow: inset 0 1px rgba(255,255,255,.9);
    font-size: 18px;
    line-height: 1;
}
body.royal-v2 .sidebar .home-link-label {
    flex: 1 1 auto;
    color: inherit;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
}
body.royal-v2 .sidebar .home-link-arrow {
    padding-right: 2px;
    color: #b95a7f;
    font-size: 16px;
    line-height: 1;
}
body.royal-v2 .sidebar .home-link:hover {
    transform: translateY(-1px);
    border-color: rgba(195, 65, 115, .39);
    color: #9b3159;
    background: linear-gradient(145deg, #fff, #fbe8f0);
    box-shadow: 0 12px 26px rgba(105, 48, 70, .13), inset 0 1px rgba(255,255,255,.95);
}

html[data-theme="dark"] body.royal-v2 .top-actions .home-top-link {
    border-color: rgba(238, 110, 157, .26);
    color: #f8edf2;
    background: linear-gradient(145deg, #2d1d28, #172632);
    box-shadow: 0 9px 23px rgba(0,0,0,.27), inset 0 1px rgba(255,255,255,.05);
}
html[data-theme="dark"] body.royal-v2 .top-actions .home-top-link > span {
    color: #ff9abb;
    background: rgba(229, 87, 139, .16);
}
html[data-theme="dark"] body.royal-v2 .top-actions .home-top-link:hover {
    border-color: rgba(255, 134, 177, .50);
    background: linear-gradient(145deg, #392431, #1b303d);
    box-shadow: 0 12px 27px rgba(0,0,0,.34), 0 0 0 1px rgba(235, 91, 143, .06);
}
html[data-theme="dark"] body.royal-v2 .sidebar .home-link {
    border-color: rgba(128, 176, 198, .18);
    color: #ede4ea;
    background: linear-gradient(145deg, #1d2632, #121b26);
    box-shadow: 0 10px 24px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.04);
}
html[data-theme="dark"] body.royal-v2 .sidebar .home-link-icon {
    color: #ff9abb;
    background: linear-gradient(145deg, #38222f, #26303b);
    box-shadow: inset 0 1px rgba(255,255,255,.05);
}
html[data-theme="dark"] body.royal-v2 .sidebar .home-link-arrow {
    color: #8ccfe4;
}
html[data-theme="dark"] body.royal-v2 .sidebar .home-link:hover {
    border-color: rgba(235, 105, 153, .38);
    color: #fff6fa;
    background: linear-gradient(145deg, #2b202b, #182a36);
    box-shadow: 0 13px 28px rgba(0,0,0,.34);
}

@media (max-width: 1050px) {
    body.royal-v2 .topbar .theme-toggle {
        margin-right: 12px;
    }
    body.royal-v2 .sidebar .home-link {
        min-height: 48px;
        margin: 20px 5px 0;
        padding: 7px;
        justify-content: center;
    }
    body.royal-v2 .sidebar .home-link-label,
    body.royal-v2 .sidebar .home-link-arrow {
        display: none;
    }
}
@media (max-width: 760px) {
    body.royal-v2 .topbar .theme-toggle {
        margin-right: 0;
    }
    body.royal-v2 .sidebar .home-link {
        display: none !important;
    }
}
