:root {
    color-scheme: dark;
    --void: #02070f;
    --navy: #06101c;
    --panel: rgba(9, 24, 39, 0.92);
    --panel-deep: rgba(5, 16, 29, 0.97);
    --line: #28475f;
    --line-hot: #58cfff;
    --cyan: #58cfff;
    --green: #47e1aa;
    --amber: #f4c46a;
    --red: #ff657e;
    --text: #edf7ff;
    --muted: #849bb1;
    --shadow: 0 26px 90px rgba(0, 0, 0, 0.55);
}

/* V1.8.3 security controls */
.device-security-section {
    margin-top: 18px;
}

.device-security-section h3 {
    margin: 0 0 10px;
    color: var(--cyan);
    font-size: 12px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.device-list {
    display: grid;
    gap: 9px;
}

.device-row {
    padding: 13px;
    border: 1px solid rgba(98, 151, 190, 0.3);
    border-radius: 10px;
    background: rgba(5, 16, 29, 0.62);
}

.device-row.is-current {
    border-color: rgba(71, 225, 170, 0.55);
    box-shadow: inset 3px 0 0 #47e1aa;
}

.device-row > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.device-row > div:first-child strong {
    color: var(--text);
    font-size: 13px;
}

.device-row > div:first-child small {
    color: var(--green);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
}

.device-row dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 0;
}

.device-row dl div {
    min-width: 0;
}

.device-row dt {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.device-row dd {
    margin: 3px 0 0;
    color: var(--text);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.device-security-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.danger-action {
    border-color: rgba(255, 82, 118, 0.65) !important;
    color: #ff7895 !important;
}

.security-confirm-dialog {
    width: min(520px, calc(100vw - 30px));
    padding: 0;
    border: 1px solid rgba(255, 82, 118, 0.55);
    border-radius: 14px;
    color: var(--text);
    background: #071321;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
}

.security-confirm-dialog::backdrop {
    background: rgba(0, 5, 12, 0.82);
    backdrop-filter: blur(4px);
}

.security-confirm-dialog form {
    padding: 24px;
}

.security-section-divider {
    margin: 22px 0;
    border: 0;
    border-top: 1px solid rgba(98, 151, 190, 0.22);
}

.discord-required-shell {
    display: grid;
    min-height: calc(100vh - 150px);
    place-items: center;
}

.discord-required-card {
    width: min(620px, 100%);
    text-align: center;
}

.discord-required-card h1 {
    margin: 14px 0 8px;
    color: var(--text);
    font-size: clamp(28px, 6vw, 48px);
}

.discord-required-card > p {
    max-width: 470px;
    margin: 0 auto 20px;
    color: var(--muted);
    line-height: 1.7;
}

.discord-required-card > :is(button, a) {
    width: min(360px, 100%);
    margin: 10px auto 0;
}

.discord-required-emblem {
    display: grid;
    width: 76px;
    height: 76px;
    margin: 8px auto 0;
    place-items: center;
    border: 1px solid rgba(88, 207, 255, 0.75);
    border-radius: 18px;
    color: #58cfff;
    background: rgba(9, 24, 39, 0.9);
    box-shadow: 0 0 34px rgba(88, 207, 255, 0.22);
    font-size: 38px;
    font-weight: 900;
}

@media (max-width: 620px) {
    .device-row dl {
        grid-template-columns: 1fr;
    }

    .device-security-actions > * {
        width: 100%;
    }
}

/* V1.8 commerce gate */
.access-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.purchase-panel > p {
    max-width: 62ch;
}

.launch-offer-banner {
    display: grid;
    gap: .35rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(91, 224, 255, .62);
    background:
        linear-gradient(120deg, rgba(10, 88, 143, .28), rgba(11, 41, 75, .15)),
        rgba(3, 12, 24, .82);
    box-shadow: inset 3px 0 0 #5be0ff, 0 16px 40px rgba(0, 0, 0, .22);
}

.launch-offer-banner strong {
    color: #75ebff;
    letter-spacing: .13em;
}

.launch-offer-banner span {
    color: #f2f8ff;
    font-size: 1rem;
    font-weight: 800;
}

.launch-offer-banner small {
    color: #9eb5cc;
}

.pricing-rollout-banner {
    border-color: rgba(255, 196, 91, .5);
    background:
        linear-gradient(120deg, rgba(126, 77, 16, .22), rgba(11, 41, 75, .15)),
        rgba(3, 12, 24, .82);
    box-shadow: inset 3px 0 0 #ffc45b, 0 16px 40px rgba(0, 0, 0, .22);
}

.pricing-rollout-banner > strong {
    color: #ffd27c;
}

.pricing-rollout-plans {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .45rem;
    margin: .35rem 0;
}

.pricing-rollout-plans > span {
    display: grid;
    gap: .12rem;
    min-width: 0;
    padding: .55rem;
    border: 1px solid rgba(255, 196, 91, .2);
    background: rgba(2, 10, 20, .55);
}

.pricing-rollout-plans b,
.pricing-rollout-plans strong,
.pricing-rollout-plans small {
    overflow-wrap: anywhere;
}

.pricing-rollout-plans b {
    color: #b8c9d9;
    font-size: .62rem;
    letter-spacing: .06em;
}

.pricing-rollout-plans strong {
    color: #ffd27c;
    font-size: 1rem;
}

.pricing-rollout-plans small {
    color: #7890a7;
    font-size: .58rem;
    text-transform: uppercase;
}

.purchase-product-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.35rem 0 .6rem;
}

.purchase-product-heading > div {
    display: grid;
    gap: .22rem;
}

.purchase-product-heading small,
.purchase-product-heading > span {
    color: #7897ad;
    font-size: .6rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.purchase-product-heading h3 {
    margin: 0;
    color: #effaff;
    font-size: 1rem;
}

.purchase-product-heading > span {
    padding: .4rem .55rem;
    border: 1px solid rgba(98, 233, 255, .25);
    color: #77e9ff;
    text-align: center;
}

.script-purchase-section {
    margin-top: 1.5rem;
    padding-top: .2rem;
    border-top: 1px solid rgba(95, 145, 184, .24);
}

.script-purchase-intro {
    max-width: 72ch;
    margin: 0;
    color: #9db1c5;
    font-size: .78rem;
    line-height: 1.55;
}

.membership-plan.is-script-plan {
    border-color: rgba(255, 196, 91, .34);
    background: linear-gradient(145deg, rgba(44, 29, 13, .76), rgba(4, 14, 26, .95));
}

.membership-plan.is-script-plan > small,
.membership-plan.is-script-plan .membership-price strong,
.script-plan-terms {
    color: #ffd27c;
}

.script-fulfillment-note {
    display: grid;
    gap: .45rem;
    margin: .8rem 0 1rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(255, 196, 91, .28);
    background: rgba(43, 27, 8, .28);
}

.script-fulfillment-note strong {
    color: #ffd27c;
    font-size: .67rem;
    letter-spacing: .12em;
}

.script-fulfillment-note span {
    color: #b4c5d5;
    font-size: .74rem;
    line-height: 1.5;
}

.script-fulfillment-note a {
    width: fit-content;
    color: #77e9ff;
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.membership-included-benefit {
    margin: .15rem 0 0;
    color: #7ff0c3;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1.45;
}

.included-script-benefit {
    border-color: rgba(46, 230, 166, .42);
    background: rgba(8, 51, 40, .28);
}

.included-script-benefit > strong {
    color: #7ff0c3;
}

.membership-plan.is-already-included {
    opacity: .72;
}

.autopay-subscriptions {
    display: grid;
    gap: .55rem;
    margin: .9rem 0 0;
}

.autopay-subscriptions[hidden] {
    display: none;
}

.autopay-subscription-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr);
    gap: .6rem;
    padding: .7rem;
    border: 1px solid rgba(255, 196, 91, .28);
    background: rgba(26, 15, 5, .3);
}

.autopay-subscription-row > span {
    display: grid;
    gap: .18rem;
    min-width: 0;
}

.autopay-subscription-row small {
    color: #71869b;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.autopay-subscription-row strong {
    overflow-wrap: anywhere;
    color: #d9e8f4;
    font-size: .72rem;
}

.membership-plans {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin: 1rem 0;
}

.membership-plan {
    display: grid;
    align-content: start;
    gap: .55rem;
    min-height: 15.5rem;
    padding: 1rem;
    border: 1px solid rgba(95, 145, 184, .32);
    background: linear-gradient(145deg, rgba(8, 30, 52, .92), rgba(4, 14, 26, .95));
}

.membership-plan.is-promotional {
    border-color: rgba(75, 229, 255, .65);
    box-shadow: inset 0 2px 0 rgba(75, 229, 255, .35);
}

.membership-plan > small {
    min-height: 1.1rem;
    color: #72daf6;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .14em;
}

.membership-plan h3,
.membership-plan p {
    margin: 0;
}

.membership-plan h3 {
    color: #eef7ff;
    font-size: 1.05rem;
}

.membership-plan p {
    color: #9db1c5;
    font-size: .82rem;
    line-height: 1.5;
}

.membership-renewal {
    color: #67ddf4;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.4;
}

.membership-price {
    display: flex;
    align-items: baseline;
    gap: .55rem;
}

.membership-price del {
    color: #7f93a8;
    font-size: .88rem;
}

.membership-price strong {
    color: #62e9ff;
    font-size: 1.75rem;
}

.membership-plan button,
.affiliate-entry button,
.lifetime-plan a {
    margin-top: auto;
    min-height: 2.7rem;
    border: 1px solid rgba(77, 227, 255, .5);
    background: rgba(26, 110, 155, .18);
    color: #dff8ff;
    font: inherit;
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .1em;
    cursor: pointer;
}

.membership-plan button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.affiliate-entry {
    display: grid;
    gap: .55rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(95, 145, 184, .26);
    background: rgba(3, 13, 25, .62);
}

.affiliate-entry > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .5rem;
}

.affiliate-entry button {
    margin: 0;
    padding: 0 .9rem;
}

.affiliate-entry small,
.purchase-fine-print {
    color: #7f96ac;
    font-size: .7rem;
    line-height: 1.45;
}

.renewal-consent {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(98, 233, 255, .35);
    background: rgba(4, 20, 34, .78);
    color: #c8d9e8;
    font-size: .76rem;
    line-height: 1.55;
}

.renewal-consent input {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    margin-top: .15rem;
    accent-color: #43d8f4;
}

body.checkout-confirmation-open {
    overflow: hidden;
}

.checkout-confirmation-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: grid;
    place-items: center;
    padding: 18px;
    overflow-y: auto;
    background: rgba(0, 6, 15, .86);
    backdrop-filter: blur(12px);
}

.checkout-confirmation-backdrop[hidden] {
    display: none;
}

.checkout-confirmation-dialog {
    position: relative;
    width: min(100%, 720px);
    margin: auto;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid rgba(98, 233, 255, .5);
    background:
        linear-gradient(145deg, rgba(10, 31, 50, .97), rgba(2, 12, 24, .98)),
        #06101c;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, .65),
        0 0 38px rgba(69, 219, 255, .12),
        inset 0 1px 0 rgba(222, 248, 255, .08);
    color: #e9f7ff;
}

.checkout-confirmation-dialog h3 {
    margin: .45rem 2.25rem .55rem 0;
    font-size: clamp(1.35rem, 4vw, 2rem);
}

.checkout-confirmation-dialog > p {
    color: #9eb6ca;
    line-height: 1.55;
}

.checkout-confirmation-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(114, 218, 246, .28);
    background: rgba(3, 13, 25, .72);
    color: #dff8ff;
    font-size: 1.45rem;
    cursor: pointer;
}

.checkout-code-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0 14px;
}

.checkout-code-grid label {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(95, 145, 184, .28);
    background: rgba(3, 13, 25, .64);
}

.checkout-code-grid label > span {
    color: #dff8ff;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.checkout-code-grid label > span small,
.checkout-code-grid label > small {
    color: #7f96ac;
    font-size: .68rem;
    font-weight: 650;
    letter-spacing: normal;
    line-height: 1.45;
}

.checkout-code-grid input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 12px;
    border: 1px solid rgba(104, 199, 255, .34);
    background: rgba(1, 9, 19, .88);
    color: #f1fbff;
    font: inherit;
    text-transform: uppercase;
}

.checkout-confirmation-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 96, 120, .42);
    background: rgba(92, 18, 35, .28);
    color: #ffb6c2 !important;
    font-size: .78rem;
}

.checkout-confirmation-actions {
    display: grid;
    grid-template-columns: minmax(120px, .45fr) minmax(210px, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.checkout-confirmation-actions button {
    min-height: 50px;
    border: 1px solid rgba(98, 233, 255, .4);
    background: rgba(17, 74, 108, .26);
    color: #dff8ff;
    font: inherit;
    font-size: .73rem;
    font-weight: 900;
    letter-spacing: .1em;
    cursor: pointer;
}

.checkout-confirmation-actions button:last-child {
    border-color: rgba(67, 216, 244, .72);
    background: linear-gradient(135deg, rgba(30, 151, 190, .48), rgba(23, 98, 146, .42));
}

.checkout-confirmation-actions button:disabled {
    opacity: .55;
    cursor: wait;
}

.lifetime-plan {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(203, 171, 91, .5);
    background: rgba(70, 49, 14, .15);
}

.lifetime-plan div {
    display: grid;
    gap: .25rem;
}

.lifetime-plan small {
    color: #cbb781;
    font-size: .62rem;
    letter-spacing: .12em;
}

.lifetime-plan strong {
    color: #f4f0e3;
}

.lifetime-plan a {
    display: inline-grid;
    place-items: center;
    padding: 0 1rem;
    text-decoration: none;
}

@media (max-width: 720px) {
    .access-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .access-tab {
        padding-inline: .35rem;
        font-size: .61rem;
    }

    .membership-plans {
        grid-template-columns: 1fr;
    }

    .membership-plan {
        min-height: 0;
    }

    .lifetime-plan {
        align-items: stretch;
        flex-direction: column;
    }
}

.commerce-manager-grid {
    align-items: start;
    margin-top: 1rem;
}

.commerce-manager-grid > article {
    padding: 1rem;
    border: 1px solid rgba(95, 145, 184, .28);
    background: rgba(3, 13, 25, .55);
}

.commerce-manager-grid h3 {
    margin-top: 0;
    color: #eaf6ff;
}

.commerce-code-list {
    display: grid;
    gap: .5rem;
    margin-top: 1rem;
    color: #829ab0;
}

.commerce-code-card {
    display: grid;
    grid-template-columns: minmax(100px, .7fr) minmax(180px, 1.4fr) auto auto;
    align-items: center;
    gap: .6rem;
    padding: .7rem;
    border: 1px solid rgba(92, 161, 203, .24);
    background: rgba(5, 19, 34, .85);
}

.commerce-code-card strong {
    color: #6be8ff;
}

.commerce-code-card small {
    color: #9eb3c7;
    letter-spacing: .08em;
}

.commerce-code-card button {
    min-height: 2.2rem;
    border: 1px solid rgba(255, 93, 129, .45);
    background: rgba(96, 15, 38, .18);
    color: #ff9cb3;
    font: inherit;
    font-size: .62rem;
    font-weight: 800;
    cursor: pointer;
}

.commerce-code-card .view-affiliate-conversions {
    border-color: rgba(80, 218, 255, .42);
    background: rgba(20, 91, 116, .2);
    color: #80eaff;
}

.affiliate-conversion-list {
    grid-column: 1 / -1;
    display: grid;
    gap: .45rem;
    padding-top: .65rem;
    border-top: 1px solid rgba(92, 161, 203, .2);
    color: #9eb3c7;
}

.affiliate-conversion-row {
    display: grid;
    grid-template-columns: minmax(140px, .65fr) minmax(220px, 1.2fr) minmax(220px, 1fr);
    gap: .65rem;
    padding: .65rem;
    border: 1px solid rgba(92, 161, 203, .18);
    background: rgba(2, 11, 20, .72);
}

.affiliate-conversion-row strong {
    color: #eaf6ff;
}

@media (max-width: 760px) {
    .commerce-code-card {
        grid-template-columns: 1fr;
    }

    .affiliate-conversion-row {
        grid-template-columns: 1fr;
    }
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--void);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.valhalla-access-page {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 72% 18%, rgba(71, 225, 170, 0.055), transparent 29%),
        radial-gradient(circle at 19% 60%, rgba(88, 207, 255, 0.095), transparent 32%),
        linear-gradient(145deg, #020710 0%, #071522 52%, #02070f 100%);
}

.valhalla-access-page > * {
    transition: opacity 520ms ease, transform 620ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 520ms ease;
}

.valhalla-access-page.access-exit > * {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(-14px) scale(1.015);
}

.network-policy-note {
    margin: 12px 0 0;
    padding: 11px 12px;
    color: #8fa4bf;
    border-left: 2px solid rgba(255, 196, 91, 0.58);
    background: rgba(255, 196, 91, 0.045);
    font-size: 10px;
    line-height: 1.55;
}

.valhalla-access-page::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(104, 199, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 199, 255, 0.055) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.aurora {
    position: fixed;
    z-index: 0;
    width: 55vw;
    height: 42vh;
    pointer-events: none;
    opacity: 0.11;
    filter: blur(56px);
    border-radius: 50%;
    transform: rotate(-18deg);
}

.aurora-one {
    top: -22vh;
    left: 8vw;
    background: linear-gradient(100deg, transparent, var(--cyan), var(--green), transparent);
    animation: aurora-drift 13s ease-in-out infinite alternate;
}

.aurora-two {
    right: -10vw;
    bottom: -18vh;
    background: linear-gradient(100deg, transparent, #167ac0, var(--cyan), transparent);
    animation: aurora-drift 17s ease-in-out infinite alternate-reverse;
}

@keyframes aurora-drift {
    from { transform: translate3d(-4%, -2%, 0) rotate(-18deg) scale(0.95); }
    to { transform: translate3d(7%, 4%, 0) rotate(-10deg) scale(1.08); }
}

.gate-lines {
    position: fixed;
    inset: 12vh auto 0 5vw;
    z-index: 0;
    width: min(46vw, 760px);
    pointer-events: none;
    opacity: 0.4;
}

.gate-lines span {
    position: absolute;
    bottom: 0;
    left: calc(var(--gate-index, 0) * 11%);
    width: 2px;
    height: calc(44% + var(--gate-index, 0) * 9%);
    background: linear-gradient(to top, transparent, rgba(104, 199, 255, 0.6), transparent);
    transform: skewX(-23deg);
}

.gate-lines span:nth-child(1) { --gate-index: 0; }
.gate-lines span:nth-child(2) { --gate-index: 1; }
.gate-lines span:nth-child(3) { --gate-index: 2; }
.gate-lines span:nth-child(4) { --gate-index: 3; }
.gate-lines span:nth-child(5) { --gate-index: 4; }

.access-header,
.access-footer,
.access-shell,
.success-shell {
    position: relative;
    z-index: 2;
}

.access-header {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 76px;
    padding: 14px clamp(20px, 4vw, 68px);
    border-bottom: 1px solid rgba(104, 199, 255, 0.17);
    background: rgba(4, 11, 21, 0.58);
    backdrop-filter: blur(18px);
}

.valhalla-mark {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 1px solid rgba(104, 199, 255, 0.34);
    border-radius: 11px;
    background: #050b14;
    text-decoration: none;
    box-shadow: 0 0 24px rgba(46, 230, 166, 0.14);
}

.valhalla-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.88) brightness(0.94);
}

.access-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.access-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px var(--green);
}

.support-link {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.support-link strong {
    color: var(--cyan);
}

.access-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.82fr);
    align-items: center;
    gap: clamp(42px, 7vw, 120px);
    width: min(1380px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(50px, 8vh, 108px) 0;
}

.hero-column {
    max-width: 760px;
}

.hero-brand-logo {
    display: block;
    width: min(500px, 82vw);
    height: auto;
    margin: 4px 0 0;
    border: 1px solid rgba(88, 207, 255, 0.18);
    border-radius: 20px;
    background: #02070f;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    filter: saturate(0.86) brightness(0.92);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.hero-kicker,
.panel-label {
    margin: 0 0 16px;
    color: var(--green);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.28em;
}

.hero-column h1,
.success-shell h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(62px, 8vw, 132px);
    font-weight: 950;
    letter-spacing: -0.075em;
    line-height: 0.78;
    text-transform: uppercase;
    text-shadow: 0 14px 45px rgba(0, 0, 0, 0.46);
}

.hero-column h1 span,
.success-shell h1 span {
    color: transparent;
    background: linear-gradient(102deg, var(--green), var(--cyan) 52%, var(--amber));
    background-clip: text;
    -webkit-background-clip: text;
}

.hero-copy {
    max-width: 620px;
    margin: 32px 0 0;
    color: #adbed3;
    font-size: clamp(15px, 1.4vw, 19px);
    line-height: 1.7;
}

.hero-readouts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 650px;
    margin-top: 38px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.hero-readouts div {
    display: grid;
    gap: 7px;
    padding: 18px 20px 17px 0;
}

.hero-readouts div + div {
    padding-left: 20px;
    border-left: 1px solid var(--line);
}

.hero-readouts small,
.generated-code small,
.purchase-code small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.16em;
}

.hero-readouts strong {
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.05em;
}

.risk-note {
    max-width: 650px;
    margin: 18px 0 0;
    color: #70839e;
    font-size: 11px;
    line-height: 1.6;
}

.access-card {
    position: relative;
    min-height: 548px;
    padding: clamp(28px, 3vw, 44px);
    border: 1px solid rgba(104, 199, 255, 0.28);
    background:
        linear-gradient(145deg, rgba(18, 39, 64, 0.88), rgba(7, 19, 34, 0.96)),
        var(--panel);
    box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.03);
    clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
    backdrop-filter: blur(24px);
}

.access-card::after {
    position: absolute;
    inset: 8px;
    z-index: -1;
    content: "";
    border: 1px solid rgba(46, 230, 166, 0.08);
    pointer-events: none;
}

.card-crown {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.22em;
}

.card-crown i {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
}

.access-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 32px;
    padding: 5px;
    border: 1px solid var(--line);
    background: rgba(3, 11, 21, 0.62);
}

.access-tab {
    min-height: 40px;
    padding: 8px 5px;
    color: #71859f;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.09em;
}

.access-tab:hover,
.access-tab:focus-visible {
    color: var(--text);
}

.access-tab.is-active {
    color: var(--green);
    background: rgba(46, 230, 166, 0.09);
    box-shadow: inset 0 -2px var(--green);
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
    animation: panel-enter 220ms ease-out;
}

@keyframes panel-enter {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(25px, 2.4vw, 36px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.tab-panel > p:not(.panel-label),
#admin-login-view > p:not(.panel-label),
#admin-generator-view > p:not(.panel-label) {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.access-form {
    display: grid;
    gap: 11px;
    margin-top: 28px;
}

.account-recovery-link {
    justify-self: start;
    padding: 4px 0;
    color: var(--cyan);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.account-recovery-link:hover,
.account-recovery-link:focus-visible,
.recovery-actions a:hover,
.recovery-actions a:focus-visible {
    color: var(--green);
}

.recovery-security-note {
    margin: 2px 0 0;
    padding: 10px 12px;
    color: #8fa4bf;
    border-left: 2px solid rgba(104, 199, 255, 0.52);
    background: rgba(104, 199, 255, 0.045);
    font-size: 10px;
    line-height: 1.5;
}

.recovery-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 20px;
    padding: 4px;
    border: 1px solid var(--line);
    background: rgba(3, 11, 21, 0.62);
}

.recovery-methods button {
    min-height: 36px;
    color: #71859f;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.recovery-methods button.is-active {
    color: var(--green);
    background: rgba(46, 230, 166, 0.09);
    box-shadow: inset 0 -2px var(--green);
}

.recovery-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
}

.recovery-actions a {
    color: var(--cyan);
    text-decoration: none;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.form-field-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.form-field-pair > div {
    display: grid;
    gap: 11px;
}

.compact-registration-form {
    gap: 9px;
    margin-top: 20px;
}

.compact-registration-form .terms-consent {
    margin-top: 2px;
}

.member-portal-page {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.portal-title {
    display: block;
    margin-top: 5px;
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.12em;
}

.portal-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.portal-header-actions button,
.portal-header-actions a,
.secondary-action {
    padding: 9px 12px;
    color: var(--cyan);
    border: 1px solid rgba(104, 199, 255, 0.35);
    background: rgba(104, 199, 255, 0.05);
    cursor: pointer;
    text-decoration: none;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.member-portal-shell {
    position: relative;
    z-index: 2;
    width: min(1420px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 52px;
}

.portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 30px 34px;
    border: 1px solid rgba(104, 199, 255, 0.25);
    border-left: 3px solid var(--green);
    background: linear-gradient(120deg, rgba(17, 39, 64, 0.94), rgba(6, 19, 33, 0.96));
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.portal-hero h1 {
    margin: 0;
    font-size: clamp(31px, 4vw, 58px);
    letter-spacing: -0.045em;
}

.portal-hero h1 span { color: var(--green); }
.portal-hero p:not(.hero-kicker) { margin: 11px 0 0; color: var(--muted); }

.portal-access-badge {
    display: grid;
    gap: 6px;
    min-width: 280px;
    padding: 18px 22px;
    border: 1px solid rgba(46, 230, 166, 0.48);
    background: rgba(46, 230, 166, 0.07);
}

.portal-access-badge.is-inactive { border-color: rgba(255, 196, 91, 0.45); background: rgba(255, 196, 91, 0.055); }
.portal-access-badge small { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: 0.16em; }
.portal-access-badge strong { color: var(--green); font-size: 17px; }
.portal-access-badge.is-inactive strong { color: var(--amber); }
.portal-access-badge span { color: #a8bad0; font-size: 12px; font-variant-numeric: tabular-nums; }

.portal-message { margin: 18px 0 0; }

.portal-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
    padding: 7px;
    border: 1px solid rgba(104, 199, 255, 0.22);
    background: rgba(4, 13, 24, 0.82);
}

.portal-tab {
    min-height: 46px;
    padding: 10px 14px;
    color: var(--muted);
    border: 1px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    cursor: pointer;
}

.portal-tab:hover,
.portal-tab:focus-visible {
    color: var(--text);
    border-color: rgba(104, 199, 255, 0.32);
    outline: none;
}

.portal-tab.is-active {
    color: var(--green);
    border-color: rgba(46, 230, 166, 0.55);
    background: rgba(46, 230, 166, 0.08);
    box-shadow: inset 0 -2px 0 var(--green);
}

.account-tab-panel[hidden] {
    display: none !important;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.portal-card {
    position: relative;
    padding: 26px;
    border: 1px solid rgba(104, 199, 255, 0.22);
    background: linear-gradient(145deg, rgba(15, 35, 58, 0.94), rgba(6, 18, 32, 0.98));
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.portal-card h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.portal-card > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.profile-monogram { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 18px; color: var(--green); border: 1px solid var(--green); background: rgba(46, 230, 166, 0.07); font-size: 30px; font-weight: 950; }
.profile-details { display: grid; gap: 0; margin: 22px 0 0; }
.profile-details div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(104, 199, 255, 0.14); }
.profile-details dt { color: #7086a1; font-size: 8px; font-weight: 900; letter-spacing: 0.14em; }
.profile-details dd { margin: 0; color: var(--text); font-size: 12px; overflow-wrap: anywhere; }

.portal-launch { display: flex; margin-top: 26px; text-decoration: none; }
.portal-launch.disabled { opacity: 0.45; cursor: not-allowed; }
.portal-policy { margin-top: 14px; color: #6f829c; font-size: 9px; }
.discord-contact { display: block; margin: 22px 0; color: var(--cyan); font-size: 16px; font-weight: 900; text-decoration: none; }
.discord-contact:hover, .support-link:hover { color: var(--green); }
.support-card .secondary-action { display: inline-block; }

.notification-card {
    border-color: rgba(46, 230, 166, 0.38);
    background:
        linear-gradient(145deg, rgba(46, 230, 166, 0.055), transparent 45%),
        var(--panel);
}

.notification-status-grid {
    margin: 18px 0;
}

.notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.notification-actions :is(.primary-action, .secondary-action) {
    width: auto;
    min-width: 150px;
    margin: 0;
}

.notification-preferences {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
}

.notification-preferences label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--text);
    border: 1px solid rgba(104, 199, 255, 0.2);
    background: rgba(4, 12, 23, 0.58);
    font-size: 12px;
    font-weight: 750;
}

.notification-preferences input {
    width: 17px;
    height: 17px;
    accent-color: var(--green);
}

.notification-preferences .secondary-action {
    grid-column: 1 / -1;
}

.danger-action {
    color: var(--red) !important;
    border-color: rgba(255, 96, 120, 0.46) !important;
}
.purchase-section { margin-top: 16px; }
.purchase-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.purchase-heading p { color: var(--muted); font-size: 12px; }
.purchase-heading > span { padding: 8px 10px; color: var(--amber); border: 1px solid rgba(255, 196, 91, 0.35); font-size: 9px; font-weight: 900; }
.purchase-section .membership-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
.purchase-section .membership-plan { min-width: 0; }
.purchase-section .affiliate-entry input {
    min-width: 0;
    width: 100%;
    height: 46px;
    padding: 0 12px;
    color: var(--text);
    border: 1px solid rgba(104, 199, 255, 0.28);
    background: rgba(3, 12, 23, 0.82);
    font: inherit;
}
.portal-beta-action { margin-top: 20px; max-width: 460px; }
.discord-logo-link { display: inline-flex; align-items: center; gap: 8px; }
.discord-logo-link :is(img, .discord-mark) { width: 20px; height: 20px; flex: 0 0 auto; }
.discord-logo-link .discord-mark { display: block; fill: #56d8ff; }
.primary-action.discord-logo-link :is(img, .discord-mark) { filter: brightness(0) saturate(100%); }
.discord-logo-link.icon-only { min-width: 38px; justify-content: center; padding-inline: 9px; }
.discord-logo-link.icon-only :is(img, .discord-mark) { width: 21px; height: 21px; }

@media (max-width: 900px) {
    .portal-hero, .portal-grid { grid-template-columns: 1fr; }
    .portal-access-badge { min-width: 0; }
    .purchase-section .membership-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .form-field-pair, .purchase-section .membership-plans { grid-template-columns: 1fr; }
    .checkout-code-grid,
    .checkout-confirmation-actions {
        grid-template-columns: 1fr;
    }
    .checkout-confirmation-backdrop {
        place-items: start center;
        padding: 10px;
    }
    .checkout-confirmation-dialog {
        margin: 10px auto;
        padding: 20px 16px;
    }
    .portal-header-actions span { display: none; }
    .member-portal-shell { width: min(100% - 22px, 1420px); }
    .portal-hero, .portal-card { padding: 20px; }
    .notification-preferences { grid-template-columns: 1fr; }
    .notification-actions :is(.primary-action, .secondary-action) {
        width: 100%;
    }
}

@media print {
    body.protected-client-view > * {
        display: none !important;
    }

    body.protected-client-view {
        background: #fff !important;
    }
}

.access-form label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.access-form input,
.access-form select {
    width: 100%;
    height: 56px;
    padding: 0 17px;
    color: var(--text);
    border: 1px solid #314c6d;
    border-radius: 0;
    outline: 0;
    background: rgba(3, 11, 21, 0.72);
    font-size: 15px;
    font-weight: 720;
    letter-spacing: 0.06em;
}

.access-form input:focus,
.access-form select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(46, 230, 166, 0.1), inset 0 0 24px rgba(46, 230, 166, 0.025);
}

.terms-consent {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 10px;
    margin: 3px 0 7px;
    color: var(--muted) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    line-height: 1.5;
}

.terms-consent input {
    width: 17px;
    height: 17px;
    margin: 0;
    padding: 0;
    accent-color: var(--green);
}

.terms-consent a {
    color: var(--amber);
    font-weight: 850;
    text-underline-offset: 3px;
}

.primary-action,
.secondary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    margin-top: 4px;
    padding: 0 18px;
    border: 1px solid var(--green);
    cursor: pointer;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.12em;
    transition: transform 130ms ease, box-shadow 130ms ease, filter 130ms ease;
}

.primary-action {
    color: #04130e;
    background: linear-gradient(100deg, #2ee6a6, #63d8ff);
    box-shadow: 0 12px 28px rgba(46, 230, 166, 0.13);
}

.primary-action:hover:not(:disabled),
.primary-action:focus-visible:not(:disabled),
.secondary-action:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 15px 34px rgba(46, 230, 166, 0.22);
}

.primary-action:disabled,
.plan-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.admin-action {
    border-color: var(--amber);
    background: linear-gradient(100deg, #ffc45b, #ffdd85);
}

.access-message {
    margin: -12px 0 22px;
    padding: 11px 13px;
    color: var(--amber);
    border: 1px solid rgba(255, 196, 91, 0.36);
    background: rgba(255, 196, 91, 0.07);
    font-size: 12px;
    line-height: 1.45;
}

.access-message.is-error {
    color: #ff8a9b;
    border-color: rgba(255, 96, 120, 0.4);
    background: rgba(255, 96, 120, 0.07);
}

.access-message.is-success {
    color: var(--green);
    border-color: rgba(46, 230, 166, 0.36);
    background: rgba(46, 230, 166, 0.07);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin-top: 24px;
}

.plan-card {
    display: grid;
    gap: 10px;
    min-height: 118px;
    padding: 16px;
    border: 1px solid var(--line);
    background: rgba(4, 13, 24, 0.63);
}

.plan-card:hover {
    border-color: rgba(104, 199, 255, 0.55);
}

.plan-card small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.plan-card strong {
    color: var(--text);
    font-size: 18px;
}

.plan-button {
    min-height: 32px;
    color: var(--cyan);
    border: 1px solid rgba(104, 199, 255, 0.32);
    background: rgba(104, 199, 255, 0.06);
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.plan-skeleton,
.payment-status {
    color: var(--muted);
    font-size: 11px;
}

.plan-skeleton {
    grid-column: 1 / -1;
    padding: 24px;
    border: 1px dashed var(--line);
    text-align: center;
}

.generated-code,
.purchase-code {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(46, 230, 166, 0.48);
    background: rgba(46, 230, 166, 0.07);
}

.generated-code strong,
.purchase-code strong {
    overflow-wrap: anywhere;
    color: var(--green);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: clamp(18px, 2vw, 28px);
    letter-spacing: 0.08em;
}

.generated-code button,
.admin-footer-actions button {
    color: var(--cyan);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-align: left;
}

.admin-footer-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.admin-footer-actions a {
    color: var(--green);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-decoration: none;
}

.access-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 17px clamp(20px, 4vw, 68px);
    color: #53677f;
    border-top: 1px solid rgba(104, 199, 255, 0.13);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.success-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.success-shell {
    width: min(760px, calc(100% - 36px));
    padding: clamp(42px, 7vw, 76px);
    border: 1px solid rgba(46, 230, 166, 0.38);
    background: var(--panel-deep);
    box-shadow: var(--shadow);
    text-align: center;
    clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.success-mark {
    margin: 0 auto 28px;
}

.success-shell h1 {
    font-size: clamp(42px, 7vw, 72px);
    line-height: 0.92;
}

.success-copy {
    margin: 25px 0;
    color: var(--muted);
}

.purchase-code {
    margin: 28px auto 0;
    text-align: left;
}

.purchase-code p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.script-purchase-fulfillment {
    border-color: rgba(255, 196, 91, .48);
    background: rgba(255, 196, 91, .07);
}

.script-purchase-fulfillment > strong {
    color: #ffd27c;
}

.script-order-reference {
    display: grid;
    gap: .25rem;
    padding: .75rem;
    border: 1px solid rgba(255, 196, 91, .25);
    background: rgba(2, 10, 20, .5);
}

.script-order-reference span {
    color: #7890a7;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.script-order-reference b {
    overflow-wrap: anywhere;
    color: #f2f8ff;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: .76rem;
}

.secondary-action {
    justify-content: center;
    color: var(--cyan);
    border-color: rgba(104, 199, 255, 0.45);
    background: rgba(104, 199, 255, 0.06);
}

.success-support {
    margin: 24px 0 0;
}

.terms-page {
    display: block;
    min-height: 100vh;
    padding: 34px 18px 72px;
}

.terms-shell {
    position: relative;
    z-index: 2;
    width: min(900px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid rgba(104, 199, 255, 0.28);
    background: rgba(7, 20, 35, 0.95);
    box-shadow: var(--shadow);
}

.terms-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.terms-header h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 52px);
    letter-spacing: -0.045em;
}

.terms-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.terms-content {
    color: #acbdd2;
    font-size: 14px;
    line-height: 1.72;
}

.terms-content h2 {
    margin: 34px 0 10px;
    color: var(--text);
    font-size: 18px;
    letter-spacing: -0.015em;
}

.terms-content strong {
    color: var(--text);
}

.terms-content a,
.terms-back {
    color: var(--green);
}

.admin-page {
    display: block;
    min-height: 100vh;
}

.admin-header {
    position: relative;
    z-index: 3;
}

.admin-header h1 {
    margin: 2px 0 0;
    font-size: 17px;
    letter-spacing: 0.015em;
}

.admin-kicker {
    color: var(--amber);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.2em;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.admin-nav a,
.admin-nav button,
.ledger-heading button,
.admin-table button {
    min-height: 34px;
    padding: 0 13px;
    color: var(--cyan);
    border: 1px solid rgba(104, 199, 255, 0.3);
    background: rgba(104, 199, 255, 0.05);
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-decoration: none;
}

.admin-table td:last-child {
    display: flex;
    gap: 6px;
}

.admin-table td:last-child button {
    padding: 5px 7px;
    font-size: 8px;
    white-space: nowrap;
}

.admin-nav a {
    display: grid;
    place-items: center;
}

.admin-shell {
    position: relative;
    z-index: 2;
    width: min(1440px, calc(100% - 34px));
    margin: 0 auto;
    padding: 28px 0 70px;
}

.admin-status-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.admin-status-grid article {
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(8, 22, 39, 0.82);
}

.admin-status-grid small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.admin-status-grid strong {
    align-self: end;
    color: var(--text);
    font-size: 18px;
}

.admin-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 12px;
    margin-top: 12px;
}

.admin-panel {
    padding: clamp(24px, 3vw, 38px);
    border: 1px solid rgba(104, 199, 255, 0.24);
    background: rgba(8, 22, 39, 0.9);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
}

.admin-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 35px);
    letter-spacing: -0.035em;
}

.admin-panel-copy {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.duration-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.duration-row > div {
    display: grid;
    gap: 11px;
}

.lifetime-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    color: var(--text) !important;
    border: 1px solid var(--line);
    background: rgba(3, 11, 21, 0.52);
    cursor: pointer;
}

.lifetime-toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--amber);
}

.lifetime-toggle span {
    display: grid;
    gap: 3px;
}

.lifetime-toggle strong {
    color: var(--amber);
    font-size: 10px;
    letter-spacing: 0.12em;
}

.lifetime-toggle small {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0;
}

.duration-preview {
    margin: 0;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
}

.duration-preview.is-invalid {
    color: var(--red);
}

.generated-code > span {
    color: var(--muted);
    font-size: 11px;
}

.operational-panel h2 {
    margin-bottom: 23px;
}

.admin-checklist {
    display: grid;
    border-top: 1px solid var(--line);
}

.admin-checklist div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

.admin-checklist strong,
.status-good,
.status-warn,
.status-bad {
    font-size: 10px;
    letter-spacing: 0.08em;
}

.status-good {
    color: var(--green) !important;
}

.status-warn {
    color: var(--amber) !important;
}

.status-bad {
    color: var(--red) !important;
}

.admin-tool-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-top: 25px;
}

.admin-tool-links a {
    display: grid;
    place-items: center;
    min-height: 43px;
    padding: 8px;
    color: var(--cyan);
    border: 1px solid rgba(104, 199, 255, 0.26);
    background: rgba(104, 199, 255, 0.04);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    text-decoration: none;
}

.code-ledger-panel {
    margin-top: 12px;
}

.bonus-access-panel {
    margin-top: 12px;
}

.discord-access-panel {
    margin-top: 12px;
}

.discord-readiness-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.discord-readiness-grid article {
    display: grid;
    gap: 8px;
    min-height: 82px;
    padding: 15px;
    border: 1px solid var(--line);
    background: rgba(3, 11, 21, 0.52);
}

.discord-readiness-grid small {
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.discord-readiness-grid strong {
    align-self: end;
    color: var(--amber);
    font-size: 11px;
    letter-spacing: 0.07em;
}

.extension-form {
    display: grid;
    grid-template-columns: minmax(140px, 0.65fr) minmax(190px, 0.8fr) minmax(190px, 1fr) minmax(190px, 0.8fr);
    align-items: end;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 760px) {
    .discord-readiness-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #promotion-draft-form {
        grid-template-columns: minmax(0, 1fr);
    }

    #promotion-draft-form .full-span,
    #promotion-draft-form > button {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .discord-readiness-grid {
        grid-template-columns: 1fr;
    }

    #v171-owner-assistant .admin-status-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #v171-owner-assistant .admin-actions > :is(a, button) {
        width: 100%;
    }
}

.extension-form > div {
    display: grid;
    gap: 10px;
}

.extension-form .primary-action {
    min-height: 50px;
    margin: 0;
}

#v171-owner-assistant {
    margin-top: 12px;
}

#v171-owner-assistant .admin-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
}

#v171-owner-assistant .admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

#v171-owner-assistant .admin-actions > :is(a, button) {
    display: inline-grid;
    place-items: center;
    min-height: 44px;
    padding: 10px 16px;
}

#promotion-draft-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#promotion-draft-form .full-span,
#promotion-draft-form > button {
    grid-column: 1 / -1;
}

#promotion-draft-form textarea {
    width: 100%;
    min-height: 145px;
    resize: vertical;
    padding: 14px;
    color: var(--text);
    border: 1px solid var(--line);
    outline: 0;
    background: rgba(3, 11, 21, 0.78);
    font: inherit;
    line-height: 1.5;
}

#promotion-draft-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.promotion-draft-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(3, 11, 21, 0.62);
}

.promotion-draft-card pre {
    max-width: 100%;
    margin: 0;
    overflow-x: auto;
    color: var(--muted);
    font: inherit;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.secondary-action.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.archived-ledger-panel {
    background: rgba(7, 18, 32, 0.86);
}

.archived-table-wrap {
    max-height: 300px;
}

.precision-lab-panel {
    margin-top: 12px;
}

.precision-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 20px 0 12px;
}

.precision-summary-grid article {
    padding: 14px;
    border: 1px solid var(--line);
    background: rgba(4, 14, 27, 0.72);
}

.precision-summary-grid small,
.precision-summary-grid strong {
    display: block;
}

.precision-summary-grid small {
    color: #7287a4;
    font-size: 8px;
    letter-spacing: 0.12em;
}

.precision-summary-grid strong {
    margin-top: 7px;
    color: var(--cyan);
    font-size: 13px;
}

.precision-table-wrap {
    max-height: 250px;
}

.precision-table {
    min-width: 760px;
}

.ledger-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.ledger-heading .panel-label {
    display: block;
    margin-bottom: 7px;
}

.ledger-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.online-users-badge {
    min-width: 90px;
    padding: 9px 11px;
    color: #7287a4;
    border: 1px solid var(--line);
    background: rgba(4, 14, 27, 0.72);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-align: center;
}

.online-users-badge.has-online-users {
    color: var(--green);
    border-color: rgba(47, 226, 167, 0.42);
    box-shadow: 0 0 18px rgba(47, 226, 167, 0.08);
}

.presence-offline {
    color: #7287a4 !important;
}

.admin-table-wrap {
    overflow: auto;
    max-height: 430px;
    border: 1px solid var(--line);
}

.admin-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    font-size: 11px;
}

.admin-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 12px 13px;
    color: #7890ad;
    border-bottom: 1px solid var(--line);
    background: #09182a;
    font-size: 8px;
    letter-spacing: 0.12em;
    text-align: left;
}

.admin-table td {
    padding: 12px 13px;
    color: #b4c3d7;
    border-bottom: 1px solid rgba(38, 63, 95, 0.68);
    white-space: nowrap;
}

.admin-table tr:hover td {
    background: rgba(104, 199, 255, 0.025);
}

.admin-table button {
    min-height: 28px;
    color: var(--red);
    border-color: rgba(255, 96, 120, 0.28);
}

@media (max-width: 960px) {
    .admin-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-main-grid {
        grid-template-columns: 1fr;
    }

    .precision-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .extension-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .admin-header h1 {
        font-size: 13px;
    }

    .admin-nav a {
        display: none;
    }

    .admin-status-grid {
        grid-template-columns: 1fr;
    }

    .duration-row,
    .admin-tool-links {
        grid-template-columns: 1fr;
    }

    .precision-summary-grid {
        grid-template-columns: 1fr;
    }

    .extension-form {
        grid-template-columns: 1fr;
    }
}

.terms-content ul {
    padding-left: 21px;
}

.terms-notice {
    padding: 16px 18px;
    color: var(--amber);
    border: 1px solid rgba(255, 196, 91, 0.34);
    background: rgba(255, 196, 91, 0.06);
}

.terms-back {
    display: inline-block;
    margin-top: 34px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-decoration: none;
}

@media (max-width: 960px) {
    .access-shell {
        grid-template-columns: 1fr;
        width: min(720px, calc(100% - 34px));
        padding: 54px 0;
    }

    .hero-column {
        text-align: center;
    }

    .hero-copy,
    .hero-readouts,
    .risk-note {
        margin-right: auto;
        margin-left: auto;
    }

    .hero-brand-logo {
        margin-right: auto;
        margin-left: auto;
    }

    .gate-lines {
        width: 90vw;
    }
}

@media (max-width: 600px) {
    .access-header {
        min-height: 66px;
        padding: 11px 16px;
    }

    .access-status {
        font-size: 8px;
        letter-spacing: 0.1em;
    }

    .access-header .support-link {
        display: inline-flex;
        width: 38px;
        min-width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        gap: 0;
        overflow: hidden;
        color: transparent;
        font-size: 0;
    }

    .access-header .support-link .discord-mark {
        width: 21px;
        height: 21px;
    }

    .hero-column h1 {
        font-size: clamp(55px, 21vw, 86px);
    }

    .hero-brand-logo {
        width: min(390px, 92vw);
        border-radius: 16px;
    }

    .hero-readouts {
        grid-template-columns: 1fr;
    }

    .hero-readouts div + div {
        padding-left: 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .access-card {
        min-height: 0;
        padding: 25px 20px 30px;
    }

    .access-tabs {
        grid-template-columns: 1fr;
    }

    .plan-grid {
        grid-template-columns: 1fr;
    }

    .access-footer {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* V1.7.8 cinematic member gate */
.login-cinematic-intro {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
    isolation: isolate;
    transition: opacity 720ms ease, visibility 720ms ease;
}

.login-intro-atmosphere {
    position: absolute;
    inset: -20%;
    z-index: -1;
    opacity: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(25, 145, 226, 0.19), transparent 25%),
        radial-gradient(circle at 50% 46%, rgba(71, 225, 170, 0.07), transparent 38%);
    filter: blur(30px);
    transform: scale(0.78);
    transition: opacity 1800ms ease, transform 2100ms cubic-bezier(0.16, 1, 0.3, 1);
}

.valhalla-access-page > .login-cinematic-intro,
.login-intro-logo-stage,
.login-intro-logo {
    -webkit-filter: none !important;
    filter: none !important;
}

.login-intro-logo-stage,
.login-intro-logo {
    background: transparent !important;
    background-color: transparent !important;
}

/*
 * Animate a transparent wrapper rather than the RGBA image. iPhone Safari can
 * rasterize a filtered/transformed transparent PNG as an opaque rectangle,
 * especially while screen recording changes the compositor path.
 */
.login-intro-logo-stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(560px, 82vw, 74vh);
    aspect-ratio: 1 / 1;
    opacity: 0;
    isolation: isolate;
    pointer-events: none;
    -webkit-transform: translate3d(-50%, -50%, 0) scale(0.73);
    transform: translate3d(-50%, -50%, 0) scale(0.73);
    transform-origin: center;
    transition:
        opacity 1500ms ease,
        transform 1500ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.login-intro-logo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    -webkit-transform: none !important;
    transform: none !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.login-intro-signal {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(480px, 72vw);
    opacity: 0;
    transform: translate(-50%, min(280px, 31vh));
    transition: opacity 700ms ease 420ms, transform 1000ms cubic-bezier(0.16, 1, 0.3, 1) 300ms;
}

.login-intro-signal span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(88, 207, 255, 0.78));
}

.login-intro-signal span:last-child {
    background: linear-gradient(90deg, rgba(71, 225, 170, 0.78), transparent);
}

.login-intro-signal i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #47e1aa;
    box-shadow: 0 0 18px #47e1aa;
}

.login-intro-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: 0;
    color: rgba(174, 225, 255, 0.82);
    opacity: 0;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.46em;
    transform: translate(-48%, min(307px, 35vh));
    transition: opacity 750ms ease 520ms, transform 1000ms cubic-bezier(0.16, 1, 0.3, 1) 400ms;
}

.login-intro-logo-visible .login-intro-atmosphere {
    opacity: 1;
    transform: scale(1);
}

.login-intro-logo-visible .login-cinematic-intro,
.login-intro-logo-visible .login-intro-logo-stage,
.login-intro-logo-visible .login-intro-logo {
    -webkit-filter: none !important;
    filter: none !important;
}

.login-intro-logo-visible .login-intro-logo-stage {
    opacity: 1;
    -webkit-transform: translate3d(-50%, -50%, 0) scale(1);
    transform: translate3d(-50%, -50%, 0) scale(1);
}

.login-intro-logo-visible .login-intro-signal,
.login-intro-logo-visible .login-intro-caption {
    opacity: 1;
}

.login-intro-logo-lifted .login-cinematic-intro,
.login-intro-logo-lifted .login-intro-logo-stage,
.login-intro-logo-lifted .login-intro-logo {
    -webkit-filter: none !important;
    filter: none !important;
}

.login-intro-logo-lifted .login-intro-logo-stage {
    -webkit-transform:
        translate3d(-50%, calc(-50% - min(27vh, 260px)), 0)
        scale(0.58);
    transform:
        translate3d(-50%, calc(-50% - min(27vh, 260px)), 0)
        scale(0.58);
}

.login-intro-logo-lifted .login-intro-signal {
    opacity: 0;
    transform: translate(-50%, min(245px, 26vh)) scaleX(0.62);
}

.login-intro-logo-lifted .login-intro-caption {
    opacity: 0;
    transform: translate(-48%, min(265px, 29vh));
}

.login-intro-panels-visible .login-cinematic-intro {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    -webkit-filter: none !important;
    filter: none !important;
}

.login-intro-panels-visible .login-intro-logo-stage,
.login-intro-panels-visible .login-intro-logo {
    -webkit-filter: none !important;
    filter: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.login-intro-running > :not(.login-cinematic-intro) {
    opacity: 0;
    filter: blur(13px);
    transform: translateY(18px);
    pointer-events: none;
}

.login-intro-panels-visible > :not(.login-cinematic-intro) {
    opacity: 1;
    filter: none;
    transform: none;
    pointer-events: auto;
}

.cinematic-access-shell {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
    align-content: start;
    gap: 18px;
    width: min(820px, calc(100% - 40px));
    padding: 18px 0 clamp(52px, 8vh, 92px);
}

.cinematic-access-shell .hero-column {
    display: grid;
    justify-items: center;
    max-width: none;
    text-align: center;
}

.cinematic-access-shell .hero-kicker {
    order: 2;
    margin: 6px 0 0;
    color: #8aa5bb;
}

.cinematic-access-shell .hero-brand-logo {
    order: 1;
    width: min(250px, 58vw);
    margin: 0 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter:
        saturate(0.82)
        brightness(0.76)
        drop-shadow(0 18px 30px rgba(0, 0, 0, 0.54))
        drop-shadow(0 0 22px rgba(46, 153, 224, 0.14));
}

.cinematic-access-shell .hero-copy {
    max-width: 640px;
    margin: 0 auto;
    color: #a9bfd1;
    font-size: 14px;
}

.cinematic-access-shell .hero-readouts {
    width: min(650px, 100%);
    margin: 18px auto 0;
}

.cinematic-access-shell .risk-note {
    margin: 12px auto 0;
}

.cinematic-access-shell .access-card {
    width: min(640px, 100%);
    min-height: 0;
    margin: 0 auto;
    border-color: rgba(88, 207, 255, 0.34);
    background:
        linear-gradient(155deg, rgba(15, 36, 61, 0.94), rgba(4, 14, 27, 0.985)),
        var(--panel);
    box-shadow:
        0 34px 110px rgba(0, 0, 0, 0.66),
        0 0 0 1px rgba(71, 225, 170, 0.035) inset,
        0 0 58px rgba(39, 139, 211, 0.07);
}

.cinematic-access-shell .gate-context {
    width: min(640px, 100%);
    margin: 0 auto;
    padding: 16px 18px 4px;
    text-align: center;
    border-top: 1px solid rgba(64, 143, 194, 0.24);
}

.login-intro-panels-visible .hero-brand-logo {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
}

.login-intro-complete .hero-brand-logo {
    animation: login-settled-logo 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes login-settled-logo {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .login-intro-logo-stage {
        width: min(440px, 88vw, 66vh);
    }

    .login-intro-logo-lifted .login-intro-logo-stage {
        -webkit-transform: translate3d(-50%, calc(-50% - min(29vh, 220px)), 0) scale(0.62);
        transform: translate3d(-50%, calc(-50% - min(29vh, 220px)), 0) scale(0.62);
    }

    .login-intro-caption {
        width: 100%;
        text-align: center;
        letter-spacing: 0.33em;
    }

    .cinematic-access-shell {
        width: min(100% - 24px, 680px);
        gap: 16px;
        padding-top: 16px;
    }

    .cinematic-access-shell .hero-brand-logo {
        width: min(230px, 62vw);
    }

    .cinematic-access-shell .hero-copy {
        font-size: 13px;
        line-height: 1.6;
    }

    .cinematic-access-shell .hero-readouts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cinematic-access-shell .hero-readouts div {
        padding: 13px 7px;
    }

    .cinematic-access-shell .hero-readouts div + div {
        padding-left: 7px;
        border-top: 0;
        border-left: 1px solid var(--line);
    }

    .cinematic-access-shell .hero-readouts strong {
        font-size: 10px;
    }

    .cinematic-access-shell .access-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cinematic-access-shell .gate-context {
        padding-inline: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-cinematic-intro {
        display: none !important;
    }

    .login-intro-running > :not(.login-cinematic-intro) {
        opacity: 1;
        filter: none;
        transform: none;
        pointer-events: auto;
    }
}

/* Phone-safe member gate and account portal. */
@media (max-width: 700px) {
    .member-portal-page .access-header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px 12px;
        min-height: 0;
        padding: 12px;
    }

    .member-portal-page .portal-header-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        margin-left: 0;
    }

    .member-portal-page .portal-header-actions button,
    .member-portal-page .portal-header-actions a {
        min-width: 0;
        text-align: center;
    }

    .member-portal-shell {
        width: calc(100% - 18px);
        padding: 18px 0 28px;
    }

    .portal-hero,
    .portal-grid,
    .purchase-section .membership-plans,
    .form-field-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-hero,
    .portal-card {
        min-width: 0;
        padding: 18px;
    }

    .portal-hero h1 {
        overflow-wrap: anywhere;
        font-size: clamp(28px, 10vw, 43px);
        line-height: 1;
    }

    .portal-access-badge {
        min-width: 0;
        width: 100%;
    }

    .profile-details div {
        grid-template-columns: minmax(74px, 0.42fr) minmax(0, 1fr);
    }

    .purchase-heading,
    .access-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .purchase-heading {
        display: grid;
    }

    .access-footer {
        gap: 7px;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .access-header {
        padding: 10px;
    }

    .access-shell {
        width: calc(100% - 18px);
        padding: 28px 0;
    }

    .access-card {
        padding: 20px 14px 24px;
    }

    .hero-column h1 {
        font-size: clamp(48px, 19vw, 70px);
    }

    .access-form input,
    .access-form select {
        min-width: 0;
        height: 52px;
    }

    .portal-card h2,
    .discord-contact {
        overflow-wrap: anywhere;
    }
}
/* Security widgets only occupy space when an integration is active. */
.security-challenge:empty {
    display: none;
}

.security-challenge {
    width: 100%;
    overflow: hidden;
}

.security-challenge iframe {
    max-width: 100%;
}

#keeper-mfa-secret,
#keeper-backup-codes {
    display: block;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    user-select: text;
    -webkit-user-select: text;
}

.admin-list-search {
    display: grid;
    gap: .45rem;
    margin: .85rem 0 1rem;
    padding: .75rem;
    border: 1px solid rgba(80, 218, 255, .25);
    background: rgba(3, 16, 29, .72);
}

.admin-list-search > label,
.affiliate-conversion-search > span {
    color: #8ea9bf;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.admin-list-search > div {
    display: flex;
    gap: .5rem;
}

.admin-list-search input,
.affiliate-conversion-search input,
.affiliate-range-toolbar input {
    min-width: 0;
    min-height: 2.45rem;
    padding: .5rem .65rem;
    border: 1px solid rgba(80, 218, 255, .34);
    background: rgba(4, 20, 35, .92);
    color: #dff7ff;
    color-scheme: dark;
}

.admin-list-search input {
    flex: 1 1 22rem;
}

.admin-list-search button,
.affiliate-range-toolbar button {
    min-height: 2.45rem;
    padding: .5rem .75rem;
    border: 1px solid rgba(80, 218, 255, .34);
    background: rgba(4, 20, 35, .92);
    color: #8cecff;
    font: inherit;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .06em;
    cursor: pointer;
}

.admin-list-search button:hover,
.admin-list-search button:focus-visible,
.affiliate-range-toolbar button:hover,
.affiliate-range-toolbar button:focus-visible {
    border-color: rgba(78, 238, 202, .7);
    color: #78f4d4;
}

.admin-list-search small {
    color: #7893a9;
}

.affiliate-conversion-panel {
    grid-column: 1 / -1;
    display: grid;
    gap: .7rem;
    min-width: 0;
    padding-top: .65rem;
    border-top: 1px solid rgba(92, 161, 203, .2);
}

.affiliate-range-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: .55rem;
    margin: .85rem 0;
}

.affiliate-range-toolbar label {
    display: grid;
    gap: .3rem;
    min-width: 150px;
    color: #8ea9bf;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.affiliate-range-label {
    color: #7f9cb3;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.affiliate-filtered-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: .5rem;
}

.affiliate-filtered-summary article {
    display: grid;
    gap: .3rem;
    padding: .65rem;
    border: 1px solid rgba(92, 161, 203, .2);
    background: rgba(2, 12, 22, .8);
}

.affiliate-filtered-summary small {
    color: #7f9cb3;
    font-size: .56rem;
    letter-spacing: .08em;
}

.affiliate-filtered-summary strong {
    color: #eaf6ff;
}

.affiliate-conversion-search {
    display: grid;
    gap: .35rem;
}

.affiliate-conversion-search input {
    width: 100%;
}

.affiliate-range-warning {
    color: #ffd07a;
}

@media (max-width: 760px) {
    .admin-list-search > div,
    .affiliate-range-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .admin-list-search input {
        grid-column: 1 / -1;
    }

    .affiliate-range-toolbar label,
    .affiliate-range-toolbar button {
        min-width: 0;
        width: 100%;
    }

    .affiliate-filtered-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 460px) {
    .admin-list-search > div,
    .affiliate-range-toolbar,
    .affiliate-filtered-summary {
        grid-template-columns: 1fr;
    }

    .admin-list-search input {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .pricing-rollout-plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .autopay-subscription-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .purchase-product-heading {
        align-items: start;
        flex-direction: column;
    }

    .pricing-rollout-plans {
        grid-template-columns: 1fr;
    }
}


/* MOBILEFIX-2026-09-06 */
/* iOS and the app's WKWebView zoom into any focused field under 16px, and once zoomed the page is
   wider than the screen and pans sideways. 16px stops it. Pinch-zoom is deliberately left working -
   maximum-scale=1 would fix the pan too but takes zoom away from anyone who needs it. */
@media (max-width: 900px) {
  input, select, textarea,
  .access-form input, .access-form select, .access-form textarea,
  .checkout-code-grid input, .notification-preferences input, .admin-list-search input {
    font-size: 16px;
  }
}
/* viewport-fit=cover is set on every page, but access.css had no safe-area padding, so the gate
   could sit under the notch and the home indicator on a notched iPhone and inside the app. */
@supports (padding: max(0px)) {
  body.valhalla-access-page {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
}

/* Only the account notification form and illustrative preview. */
body .notification-preferences .notification-settings-section {grid-column:1 / -1;border:0;padding:0;margin:12px 0}
body .notification-preferences .notification-settings-section > legend {font-size:14px;font-weight:650;margin-bottom:10px;color:var(--dk-text,#eef3f8)}
body .notification-preferences .notification-assets fieldset {border:0;margin:18px 0;padding:0}
body .notification-preferences .notification-assets legend {font-size:12px;color:var(--dk-muted,#9fb0c6);margin-bottom:8px}
body .notification-preferences .notification-asset-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body .notification-preferences .notification-asset-grid label span {font-size:13px}
body .notification-preferences .notification-alert-toggle {grid-column:1 / -1}
body .notification-preferences .notification-alert-toggle span {font-size:13px}
body .notification-preferences .notification-settings-actions {display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
body .notification-preferences .notification-settings-actions button {width:auto;min-width:0;margin:0;font-size:12px}
body .notification-preferences .notification-settings-note {grid-column:1 / -1;font-size:12px;line-height:1.6;color:var(--dk-muted,#a3b3c8);margin:8px 0}
body .notification-preferences .notification-quiet-fields {display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px}
body .notification-preferences .notification-quiet-fields label {display:flex;flex-direction:column;align-items:stretch;gap:7px;font-size:12px}
body .notification-preferences .notification-quiet-fields input {width:100%;height:40px;min-width:0;color:inherit;background:var(--dk-inset,#122039);border:1px solid var(--dk-line-dim,#30415b);border-radius:6px;padding:7px;font-size:14px;box-sizing:border-box}
body .notification-preferences .notification-settings-section input:disabled {opacity:.55}
body .notification-preferences .notification-preview {grid-column:1 / -1;border:1px solid var(--dk-line-dim,#30415b);border-radius:14px;padding:16px;margin:10px 0;background:var(--dk-inset,#122039)}
body .notification-preferences .notification-preview-app {font-size:11px;letter-spacing:.08em;color:var(--dk-muted,#a3b3c8)}
body .notification-preferences .notification-preview-title {font-size:16px;line-height:1.5;margin:10px 0 4px;color:var(--dk-text,#eef3f8);font-weight:650}
body .notification-preferences .notification-preview-body {font-size:14px;line-height:1.6;white-space:pre-line;color:var(--dk-text-soft,#dce5ef)}
@media(max-width:600px){body .notification-preferences .notification-asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body .notification-preferences .notification-quiet-fields{grid-template-columns:1fr}body .notification-preferences .notification-settings-actions button{flex:1}}

body.portal-deck #push-preferences label span {font-size:13px;line-height:1.5}
