.account-page {
    min-height: 100vh;
    color: #f4e7bd;
    background:
        radial-gradient(circle at 16% 8%, rgba(205, 163, 67, .13), transparent 30%),
        radial-gradient(circle at 88% 22%, rgba(205, 163, 67, .07), transparent 30%),
        linear-gradient(180deg, #101827 0%, #172235 50%, #101827 100%);
}

.account-page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 245px;
    padding: 82px var(--page-padding) 48px;
    text-align: center;
    border-bottom: 1px solid rgba(214, 174, 78, .28);
    background:
        radial-gradient(circle at 50% 18%, rgba(222, 180, 80, .12), transparent 38%),
        linear-gradient(180deg, rgba(9, 16, 28, .2), rgba(9, 16, 28, .48));
}

.account-page-header-inner {
    width: min(860px, 100%);
}

.account-page-header h1 {
    margin: 0 0 14px;
    color: var(--gold-light);
    font-family: var(--title-font);
    font-size: clamp(48px, 7vw, 78px);
    line-height: 1.05;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .58);
}

.account-page-header p {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.55;
    text-shadow: 0 2px 9px rgba(0, 0, 0, .46);
}

.account-shell {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(36px, 5vw, 58px) 0 92px;
}

.account-app {
    display: grid;
    gap: 24px;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.account-loading-card,
.account-hero,
.account-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(205, 163, 67, .72);
    border-radius: 15px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .24);
}

.account-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background:
        linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .02)),
        #f4e8c9;
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.account-card:hover,
.account-card:focus-within {
    transform: translateY(-4px);
    border-color: var(--gold-light);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .3), 0 0 18px rgba(244, 212, 124, .07);
}

.account-section-header {
    position: relative;
    padding: 22px 26px 20px;
    background: linear-gradient(145deg, #203653, #12243c 70%, #0e1c30);
    border-bottom: 2px solid rgba(217, 174, 79, .75);
}

.account-section-header p {
    margin: 0 0 8px;
    color: #d9ae4f;
    font: 800 11px/1.2 system-ui, sans-serif;
    letter-spacing: .19em;
    text-transform: uppercase;
}

.account-section-header h2 {
    position: relative;
    display: inline-block;
    margin: 0;
    padding-bottom: 9px;
    color: #f4d47c;
    font-family: var(--title-font);
    font-size: clamp(27px, 3.4vw, 38px);
    line-height: 1.08;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .42);
}

.account-section-header h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d9ae4f, #f4d47c);
    transition: width .3s ease, box-shadow .3s ease;
}

.account-card:hover .account-section-header h2::after,
.account-card:focus-within .account-section-header h2::after {
    width: min(100%, 150px);
    box-shadow: 0 0 10px rgba(244, 212, 124, .28);
}

.account-card-body {
    flex: 1;
    padding: clamp(24px, 3.2vw, 32px);
    color: #563b22;
}

.account-card-body p {
    margin: 0 0 14px;
    color: #684927;
    font-size: 17px;
    line-height: 1.6;
}

.account-card-body p:last-child {
    margin-bottom: 0;
}

.account-lead {
    color: #3e2a19 !important;
    font-size: clamp(19px, 2vw, 22px) !important;
    line-height: 1.45 !important;
}

.account-success-copy strong {
    color: #285c39;
}

.account-overview-card .account-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 18px 32px;
    align-items: center;
}

.account-overview-copy {
    margin: 0 !important;
    font-size: 19px !important;
}

.account-loading-card,
.account-hero {
    padding: clamp(30px, 5vw, 52px);
    text-align: center;
    color: #4b321d;
    background:
        linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .04)),
        #f4e8c9;
}

.account-loading-card h2,
.account-hero h2 {
    margin: 0 0 13px;
    color: #3c2818;
    font-family: var(--title-font);
    font-size: clamp(30px, 5vw, 46px);
}

.account-loading-card p,
.account-hero p {
    max-width: 760px;
    margin: 0 auto 18px;
    color: #6b4d2c;
    font-size: 17px;
    line-height: 1.6;
}

.account-seal,
.account-hero-icon,
.account-setup-emblem {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border: 2px solid #d4aa49;
    border-radius: 50%;
    background: #172a43;
    color: #f4d47c;
    box-shadow: 0 7px 18px rgba(22, 39, 63, .24), inset 0 0 0 4px rgba(244, 212, 124, .08);
    font-size: 27px;
}

.account-methods {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin: 20px 0 24px;
}

.account-methods span {
    padding: 8px 12px;
    border: 1px solid rgba(129, 87, 32, .24);
    border-radius: 8px;
    background: rgba(255, 252, 242, .58);
    color: #62451f;
    font: 800 12px/1.2 system-ui, sans-serif;
}

.account-small-note {
    margin-top: 15px !important;
    font-size: 13px !important;
    opacity: .82;
}

.account-button,
.account-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border: 2px solid #c69432;
    border-radius: 10px;
    color: #172a43;
    background: linear-gradient(145deg, #f4d47c, #d7a33f);
    box-shadow: 0 7px 16px rgba(73, 47, 14, .16);
    cursor: pointer;
    font-family: var(--title-font);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.account-button:hover:not(:disabled),
.account-button:focus-visible:not(:disabled),
.account-link-button:hover,
.account-link-button:focus-visible {
    transform: translateY(-2px);
    border-color: #efc85c;
    box-shadow: 0 10px 21px rgba(73, 47, 14, .23);
}

.account-button:focus-visible,
.account-link-button:focus-visible,
.account-switch:focus-visible,
.account-choice input:focus-visible + span,
.account-setup-option input:focus-visible + .account-setup-check {
    outline: 3px solid rgba(37, 73, 111, .32);
    outline-offset: 3px;
}

.account-button.is-secondary,
.account-link-button.is-secondary {
    color: #f5d778;
    background: linear-gradient(145deg, #223b5e, #142740);
    border-color: #b88a36;
}

.account-button.is-danger {
    color: #fff5dc;
    background: linear-gradient(145deg, #8a3b33, #6b2725);
    border-color: #a75b50;
}

.account-button:disabled,
.account-switch:disabled {
    cursor: wait;
    opacity: .58;
    transform: none;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 22px;
}

.account-warning {
    margin: 18px 0 0;
    padding: 15px 17px;
    border: 1px solid #c99738;
    border-left: 4px solid #c99738;
    border-radius: 9px;
    color: #68451f;
    background: #fff1c4;
    line-height: 1.55;
}

.account-progress {
    margin-top: 18px;
}

.account-progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(118, 75, 27, .16);
}

.account-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #956521, #f2d77b);
}

.account-progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #765331;
    font: 800 12px/1.2 system-ui, sans-serif;
}

.account-choice {
    display: grid;
    gap: 12px;
    margin: 22px 0;
    padding: 0;
    border: 0;
}

.account-choice legend {
    margin-bottom: 4px;
    color: #50341b;
    font-family: var(--title-font);
    font-size: 18px;
    font-weight: 800;
}

.account-choice label {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 15px 16px;
    border: 1px solid rgba(128, 82, 29, .24);
    border-radius: 10px;
    color: #604323;
    background: rgba(255, 253, 245, .62);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.account-choice label:hover {
    transform: translateY(-1px);
    border-color: #c99b3d;
    background: rgba(255, 253, 245, .88);
}

.account-choice input {
    width: 19px;
    height: 19px;
    margin-top: 2px;
    accent-color: #b47a1d;
}

.account-choice strong,
.account-choice small {
    display: block;
}

.account-choice small {
    margin-top: 4px;
    color: #775b39;
    font-size: 14px;
    line-height: 1.45;
}

.account-settings-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(126, 83, 33, .19);
    border-radius: 10px;
    background: rgba(255, 253, 245, .5);
}

.account-settings-list > div {
    min-width: 0;
    padding: 16px 18px;
    border-right: 1px solid rgba(126, 83, 33, .15);
}

.account-settings-list > div:last-child {
    border-right: 0;
}

.account-settings-list span,
.account-settings-list strong {
    display: block;
}

.account-settings-list span {
    margin-bottom: 6px;
    color: #8b6739;
    font: 800 10px/1.2 system-ui, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.account-settings-list strong {
    color: #3d2918;
    font-size: 16px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.account-settings-actions {
    justify-content: flex-start;
}

.account-switch {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    width: 100%;
    margin-top: 22px;
    padding: 15px 16px;
    border: 1px solid rgba(126, 83, 33, .28);
    border-radius: 10px;
    background: rgba(255, 253, 245, .68);
    color: #49331f;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.account-switch:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #c99b3d;
    background: rgba(255, 253, 245, .94);
    box-shadow: 0 8px 18px rgba(73, 47, 14, .08);
}

.account-switch-track {
    position: relative;
    width: 56px;
    height: 30px;
    border: 1px solid #a98b61;
    border-radius: 999px;
    background: #c9bea8;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .12);
    transition: background .22s ease, border-color .22s ease;
}

.account-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fffaf0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    transition: transform .22s ease, background .22s ease;
}

.account-switch[aria-checked="true"] .account-switch-track {
    border-color: #b98c31;
    background: linear-gradient(145deg, #dfb64e, #bd8528);
}

.account-switch[aria-checked="true"] .account-switch-knob {
    transform: translateX(26px);
    background: #172a43;
}

.account-switch-label {
    font-family: var(--title-font);
    font-size: 17px;
    font-weight: 800;
}

.account-switch > strong {
    color: #5f4223;
    font: 900 12px/1 system-ui, sans-serif;
    letter-spacing: .08em;
}

.account-gazette-paused {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding: 14px 15px;
    border: 1px solid #b56555;
    border-radius: 9px;
    background: #f5ddd5;
    color: #79382f;
}

.account-gazette-paused span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #79382f;
    color: #fff5e8;
    font-weight: 900;
}

.account-status-line {
    min-height: 0;
    margin: 13px 0 0 !important;
    color: #315c39 !important;
    font-size: 14px !important;
    font-weight: 800;
}

.account-status-line:empty {
    display: none;
}

.account-status-line.is-error {
    color: #8a3029 !important;
}

.account-footnote {
    margin: 0;
    color: #d9c38e;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

.account-setup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(6, 12, 21, .78);
    backdrop-filter: blur(5px);
}

.account-setup-dialog {
    width: min(680px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: clamp(28px, 5vw, 42px);
    border: 2px solid #cda343;
    border-radius: 16px;
    background:
        linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .02)),
        #f4e8c9;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .48), inset 0 0 0 2px rgba(255, 255, 255, .28);
    color: #4a311c;
    text-align: center;
}

.account-setup-emblem {
    margin-bottom: 15px;
}

.account-setup-kicker {
    margin: 0 0 9px;
    color: #9d6722;
    font: 900 11px/1.2 system-ui, sans-serif;
    letter-spacing: .19em;
    text-transform: uppercase;
}

.account-setup-dialog h2 {
    margin: 0 0 8px;
    color: #3b2718;
    font-family: var(--title-font);
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.08;
}

.account-setup-intro {
    margin: 0 0 24px;
    color: #745230;
    font-size: 18px;
}

.account-setup-options {
    display: grid;
    gap: 13px;
    text-align: left;
}

.account-setup-option {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 17px;
    border: 1px solid rgba(126, 83, 33, .28);
    border-radius: 11px;
    background: rgba(255, 253, 245, .68);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.account-setup-option:hover:not(.is-already-set) {
    transform: translateY(-2px);
    border-color: #c99b3d;
    background: rgba(255, 253, 245, .96);
    box-shadow: 0 9px 20px rgba(73, 47, 14, .09);
}

.account-setup-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.account-setup-check {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 2px solid #ad8951;
    border-radius: 7px;
    background: #fffaf0;
    color: transparent;
    font-weight: 900;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.account-setup-option input:checked + .account-setup-check {
    border-color: #b47a1d;
    background: #172a43;
    color: #f4d47c;
    transform: scale(1.03);
}

.account-setup-option strong,
.account-setup-option small {
    display: block;
}

.account-setup-option strong {
    margin-bottom: 5px;
    color: #3e2a19;
    font-family: var(--title-font);
    font-size: 18px;
}

.account-setup-option small {
    color: #715333;
    font-size: 14px;
    line-height: 1.5;
}

.account-setup-option.is-already-set {
    cursor: default;
    opacity: .78;
}

.account-setup-finish {
    width: 100%;
    margin-top: 22px;
}

.account-setup-note {
    margin: 12px 0 0;
    color: #795b38;
    font-size: 13px;
    line-height: 1.45;
}

.account-login-spinner {
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: lcdAccountLoginSpin .7s linear infinite;
}

@keyframes lcdAccountLoginSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 820px) {
    .account-grid,
    .account-overview-card .account-card-body,
    .account-settings-list {
        grid-template-columns: 1fr;
    }

    .account-settings-list > div {
        border-right: 0;
        border-bottom: 1px solid rgba(126, 83, 33, .15);
    }

    .account-settings-list > div:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 620px) {
    .account-page-header {
        min-height: 220px;
        padding: 92px 18px 38px;
    }

    .account-page-header h1 {
        font-size: clamp(43px, 13vw, 60px);
    }

    .account-page-header p {
        font-size: 17px;
    }

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

    .account-app,
    .account-grid {
        gap: 18px;
    }

    .account-section-header {
        padding: 19px 20px 18px;
    }

    .account-card-body {
        padding: 22px 20px;
    }

    .account-card-body p {
        font-size: 16px;
    }

    .account-actions,
    .account-progress-copy {
        align-items: stretch;
        flex-direction: column;
    }

    .account-button,
    .account-link-button {
        width: 100%;
    }

    .account-switch {
        grid-template-columns: auto 1fr;
    }

    .account-switch > strong {
        grid-column: 2;
    }

    .account-setup-overlay {
        padding: 14px;
    }

    .account-setup-dialog {
        max-height: calc(100vh - 28px);
        padding: 24px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-card,
    .account-section-header h2::after,
    .account-button,
    .account-link-button,
    .account-switch,
    .account-switch-track,
    .account-switch-knob,
    .account-choice label,
    .account-setup-option,
    .account-setup-check {
        transition: none;
    }

    .account-login-spinner {
        animation: none;
        border-right-color: currentColor;
        opacity: .65;
    }
}
