:root {
    --bg: #f2efe8;
    --surface: #fffdf8;
    --surface-soft: #edf2f1;
    --surface-dark: #0c2131;
    --surface-dark-2: #123147;
    --ink: #142331;
    --ink-soft: #344955;
    --muted: #687982;
    --line: #d9dfdc;
    --line-dark: rgba(255, 255, 255, .13);
    --accent: #e36332;
    --accent-deep: #bd4520;
    --gold: #f2b84b;
    --mint: #2e9184;
    --green: #25826f;
    --red: #c7463b;
    --white: #fffdf8;
    --radius: 16px;
    --radius-small: 10px;
    --shadow: 0 18px 48px rgba(18, 35, 49, .11);
    --shadow-strong: 0 28px 70px rgba(7, 24, 37, .2);
    --font-body: "Avenir Next", "Segoe UI", Helvetica, sans-serif;
    --font-display: "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    color-scheme: light;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    background:
        radial-gradient(circle at 86% 8%, rgba(242, 184, 75, .2), transparent 27rem),
        radial-gradient(circle at 12% 32%, rgba(46, 145, 132, .11), transparent 24rem),
        linear-gradient(180deg, #f8f5ef 0, var(--bg) 38rem, #ece9e2 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .28;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(20, 35, 49, .16) 1px, transparent 0);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    color: inherit;
}

img {
    max-width: 100%;
}

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

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    color: var(--white);
    background: var(--surface-dark);
    border-radius: var(--radius-small);
    transform: translateY(-160%);
    transition: transform .2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

:where(a, button, input, select, summary):focus-visible {
    outline: 3px solid rgba(227, 99, 50, .35);
    outline-offset: 3px;
}

.site-shell {
    width: min(1420px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    margin: 14px clamp(16px, 4vw, 56px) 0;
    padding: 12px 14px 12px 18px;
    border: 1px solid rgba(217, 223, 220, .92);
    border-radius: 18px;
    background: rgba(255, 253, 248, .9);
    box-shadow: 0 8px 28px rgba(18, 35, 49, .08);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    aspect-ratio: 1;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.04em;
    border: 2px solid var(--surface-dark);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .22);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 14px;
    letter-spacing: .045em;
}

.brand small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .17em;
}

.nav-links {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.nav-links a {
    padding: 8px 14px;
    color: var(--muted);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}

.nav-links a:hover {
    color: var(--ink);
}

.nav-links a.is-active {
    color: var(--ink);
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(18, 35, 49, .08);
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 190px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
}

.user-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip i,
.status-pill i,
.signal-list i {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(37, 130, 111, .13);
}

.page-content {
    flex: 1;
    width: 100%;
    padding: clamp(46px, 6vw, 86px) clamp(18px, 5vw, 72px);
}

.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 24px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .035em;
}

.footer-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    transition: transform .2s ease, color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 11px;
}

.button-gold {
    color: var(--white);
    background: var(--accent);
    box-shadow: 0 10px 22px rgba(227, 99, 50, .24);
}

.button-gold:hover {
    background: var(--accent-deep);
    box-shadow: 0 14px 28px rgba(189, 69, 32, .24);
}

.button-ghost {
    color: var(--ink-soft);
    border-color: var(--line);
    background: var(--surface);
}

.button-outline {
    color: var(--ink);
    border-color: #b9c4c2;
    background: transparent;
}

.button-outline:hover,
.button-ghost:hover {
    border-color: #9dafac;
    background: var(--surface-soft);
}

.button-dark {
    color: var(--white);
    border-color: var(--surface-dark);
    background: var(--surface-dark);
}

.button-disabled {
    color: #87959c;
    border-color: #d5dcda;
    background: #e8ecea;
    cursor: not-allowed;
    box-shadow: none;
}

.button-disabled:hover {
    transform: none;
}

.button-full {
    width: 100%;
}

.text-link {
    color: var(--ink-soft);
    border-bottom: 1px solid rgba(52, 73, 85, .32);
    font-size: 13px;
    font-weight: 700;
}

.text-link:hover {
    color: var(--accent-deep);
    border-bottom-color: var(--accent-deep);
}

.hero-grid {
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(390px, .98fr);
    align-items: center;
    gap: clamp(38px, 7vw, 112px);
}

.hero-copy {
    max-width: 690px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--mint);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.eyebrow span {
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
}

.hero-copy h1,
.auth-aside h1,
.section-heading h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -.045em;
}

.hero-copy h1 {
    max-width: 760px;
    font-size: clamp(55px, 7vw, 96px);
    line-height: .94;
}

.hero-copy h1 em,
.auth-aside h1 em {
    color: var(--accent);
    font-style: italic;
    font-weight: 500;
}

.hero-lede {
    max-width: 610px;
    margin: 26px 0 0;
    color: var(--ink-soft);
    font-size: clamp(16px, 1.45vw, 19px);
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 32px;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 34px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.hero-metrics div {
    min-width: 112px;
}

.hero-metrics strong,
.hero-metrics span {
    display: block;
}

.hero-metrics strong {
    color: var(--surface-dark);
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1;
}

.hero-metrics span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero-orbit {
    position: relative;
    min-height: 510px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 30px;
    background:
        radial-gradient(circle at 64% 34%, rgba(242, 184, 75, .18), transparent 18rem),
        linear-gradient(150deg, #153a51 0%, var(--surface-dark) 58%, #081721 100%);
    box-shadow: var(--shadow-strong);
    isolation: isolate;
}

.hero-orbit::before,
.hero-orbit::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.hero-orbit::before {
    inset: 0;
    opacity: .36;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .42) 1px, transparent 0);
    background-size: 31px 31px;
    mask-image: linear-gradient(135deg, #000, transparent 78%);
}

.hero-orbit::after {
    right: -85px;
    bottom: -110px;
    width: 300px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(227, 99, 50, .13);
}

.orbit-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(242, 184, 75, .11);
    transform: translate(-50%, -55%);
    filter: blur(18px);
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 50%;
    transform: translate(-50%, -57%) rotate(-18deg);
}

.ring-one {
    width: 340px;
    height: 185px;
}

.ring-two {
    width: 430px;
    height: 275px;
    border-style: dashed;
    opacity: .66;
    animation: orbit 22s linear infinite;
}

.planet {
    position: absolute;
    top: 48%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 178px;
    aspect-ratio: 1;
    color: var(--white);
    border: 12px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, #ffd77d, var(--gold) 30%, var(--accent) 72%, #9f321b 100%);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .3);
    transform: translate(-50%, -58%);
}

.planet span,
.planet small {
    position: absolute;
}

.planet span {
    top: 50px;
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.05em;
}

.planet small {
    top: 94px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .2em;
}

.orbit-label {
    position: absolute;
    z-index: 3;
    padding: 8px 11px;
    color: rgba(255, 255, 255, .76);
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    background: rgba(6, 20, 30, .34);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}

.label-top {
    top: 48px;
    right: 42px;
}

.label-bottom {
    right: 42px;
    bottom: 42px;
}

.hero-art-note {
    position: absolute;
    left: 34px;
    bottom: 32px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    color: var(--white);
    border: 1px solid var(--line-dark);
    border-radius: 13px;
    background: rgba(5, 18, 27, .5);
    backdrop-filter: blur(10px);
}

.hero-art-note strong,
.hero-art-note small {
    display: block;
}

.hero-art-note strong {
    font-size: 12px;
}

.hero-art-note small {
    margin-top: 2px;
    color: rgba(255, 255, 255, .6);
    font-size: 9px;
}

.hero-art-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 5px rgba(46, 145, 132, .2);
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.feature-strip article {
    display: flex;
    gap: 16px;
    min-height: 132px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, .82);
    box-shadow: 0 10px 30px rgba(18, 35, 49, .05);
}

.feature-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: var(--accent-deep);
    border-radius: 50%;
    background: rgba(227, 99, 50, .11);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 800;
}

.feature-strip strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}

.feature-strip p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 32px;
}

.section-heading h1 {
    font-size: clamp(42px, 5.5vw, 76px);
    line-height: .98;
}

.section-heading .muted {
    max-width: 650px;
    margin-top: 14px;
}

.muted {
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    padding: 10px 14px;
    color: var(--green);
    border: 1px solid rgba(37, 130, 111, .2);
    border-radius: 999px;
    background: rgba(37, 130, 111, .07);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}

.status-pill-gold {
    color: var(--accent-deep);
    border-color: rgba(227, 99, 50, .22);
    background: rgba(227, 99, 50, .08);
}

.status-pill-gold i {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(227, 99, 50, .12);
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-kicker {
    color: var(--mint);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) minmax(250px, .72fr);
    gap: 16px;
    align-items: stretch;
}

.dashboard-grid .panel {
    min-height: 410px;
    padding: 30px;
}

.profile-panel,
.character-panel,
.currency-panel {
    display: flex;
    flex-direction: column;
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 26px 0;
}

.profile-identity h2,
.profile-summary h2,
.auth-card h2,
.profile-forms h2,
.table-panel h2,
.audit-panel h2 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -.02em;
}

.profile-identity h2 {
    font-size: 27px;
}

.profile-identity p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.avatar-orb {
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    width: 54px;
    aspect-ratio: 1;
    color: var(--white);
    border: 4px solid rgba(227, 99, 50, .14);
    border-radius: 50%;
    background: var(--surface-dark);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
}

.avatar-orb-large {
    width: 88px;
    flex-basis: 88px;
    margin: 0 auto 18px;
    font-size: 34px;
}

.stat-list {
    margin-bottom: 24px;
}

.stat-list > div,
.summary-lines > div {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.stat-list span,
.summary-lines span {
    color: var(--muted);
    font-size: 11px;
}

.stat-list strong,
.summary-lines strong {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: right;
    font-size: 12px;
}

.profile-panel .button,
.character-panel .button {
    margin-top: auto;
}

.character-name {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 58px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -.03em;
}

.planet-dot {
    width: 16px;
    height: 16px;
    border: 4px solid rgba(227, 99, 50, .2);
    border-radius: 50%;
    background: var(--accent);
}

.character-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

.power-meter {
    height: 8px;
    margin-top: 48px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e9e6;
}

.power-meter div {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--gold));
}

.power-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 10px 0 6px;
    color: var(--muted);
    font-size: 11px;
}

.power-line strong {
    color: var(--ink);
}

.empty-state {
    display: grid;
    place-items: center;
    flex: 1;
    padding: 35px 12px;
    text-align: center;
}

.empty-state > span {
    display: grid;
    place-items: center;
    width: 56px;
    aspect-ratio: 1;
    margin-bottom: 14px;
    color: var(--accent-deep);
    border-radius: 50%;
    background: rgba(227, 99, 50, .11);
    font-size: 26px;
}

.empty-state strong {
    font-family: var(--font-display);
    font-size: 22px;
}

.empty-state p {
    max-width: 230px;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.currency-panel {
    color: var(--white);
    border-color: transparent;
    background:
        radial-gradient(circle at 95% 0, rgba(242, 184, 75, .16), transparent 13rem),
        var(--surface-dark);
}

.currency-panel .panel-kicker {
    color: #7bd2c3;
}

.currency-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line-dark);
}

.currency-row:first-of-type {
    margin-top: 18px;
}

.currency-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    aspect-ratio: 1;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
}

.currency-icon.coin {
    color: #8a5711;
    background: #ffd98a;
}

.currency-icon.gold {
    color: #753e12;
    background: #f1a552;
}

.currency-icon.gem {
    color: #0a514a;
    background: #7bd2c3;
}

.currency-row small,
.currency-row strong {
    display: block;
}

.currency-row small {
    color: rgba(255, 255, 255, .55);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .11em;
}

.currency-row strong {
    margin-top: 2px;
    font-family: var(--font-display);
    font-size: 22px;
}

.currency-total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 24px;
}

.currency-total span {
    color: rgba(255, 255, 255, .58);
    font-size: 10px;
}

.currency-total strong {
    font-family: var(--font-display);
    font-size: 17px;
}

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

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

.auth-layout {
    min-height: min(690px, calc(100vh - 190px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, .78fr);
    align-items: center;
    gap: clamp(42px, 8vw, 120px);
}

.auth-layout-reverse {
    grid-template-columns: minmax(390px, .78fr) minmax(0, 1fr);
}

.auth-aside {
    max-width: 620px;
}

.auth-aside h1 {
    font-size: clamp(54px, 6vw, 86px);
    line-height: .95;
}

.auth-aside > .muted {
    max-width: 520px;
    margin: 24px 0 0;
    font-size: 16px;
    line-height: 1.8;
}

.signal-list {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

.signal-list span {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
}

.auth-card {
    width: 100%;
    max-width: 520px;
    justify-self: end;
    padding: clamp(28px, 4vw, 46px);
}

.auth-layout-reverse .auth-card {
    justify-self: start;
}

.auth-card h2 {
    margin-top: 14px;
    font-size: 32px;
}

.auth-card > .muted,
.profile-forms .panel > .muted {
    margin: 8px 0 0;
    font-size: 12px;
}

.notice-card {
    margin-top: 32px;
    padding: 20px;
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
    background: rgba(255, 253, 248, .74);
}

.notice-card strong {
    font-size: 13px;
}

.notice-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.form-stack {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.form-stack label {
    display: grid;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
}

.optional {
    color: var(--muted);
    font-size: 9px;
    font-weight: 600;
}

.form-stack input,
.form-stack select,
.search-form input,
.adjust-inline input,
.adjust-inline select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: #fbfcf9;
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.form-stack input::placeholder,
.search-form input::placeholder,
.adjust-inline input::placeholder {
    color: #9aa6aa;
}

.form-stack input:focus,
.form-stack select:focus,
.search-form input:focus,
.adjust-inline input:focus,
.adjust-inline select:focus {
    border-color: rgba(227, 99, 50, .58);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(227, 99, 50, .1);
}

.form-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-footnote {
    margin: 22px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}

.form-footnote a {
    color: var(--accent-deep);
    font-weight: 800;
}

.compact-form {
    margin-top: 22px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.profile-summary {
    padding: 32px;
    text-align: center;
}

.profile-summary h2 {
    font-size: 30px;
}

.profile-summary > .muted {
    margin: 6px 0 0;
    font-size: 11px;
}

.summary-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 24px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

.tag-gold {
    color: var(--accent-deep);
    border-color: rgba(227, 99, 50, .2);
    background: rgba(227, 99, 50, .08);
}

.summary-lines {
    text-align: left;
}

.profile-forms {
    display: grid;
    gap: 18px;
}

.profile-forms .panel {
    padding: 30px;
}

.profile-forms h2 {
    margin-top: 10px;
    font-size: 25px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.admin-stat {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, .82);
}

.admin-stat span,
.admin-stat small {
    display: block;
    color: var(--muted);
}

.admin-stat span {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.admin-stat strong {
    display: block;
    margin: 8px 0 4px;
    color: var(--surface-dark);
    font-family: var(--font-display);
    font-size: 27px;
    line-height: 1.2;
}

.admin-stat small {
    font-size: 10px;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.table-panel {
    min-width: 0;
    padding: 28px;
}

.panel-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.panel-toolbar h2 {
    margin-top: 8px;
    font-size: 27px;
}

.table-caption {
    margin: 2px 0 0;
    font-size: 10px;
}

.search-form {
    display: flex;
    width: min(360px, 100%);
}

.search-form input {
    border-radius: var(--radius-small) 0 0 var(--radius-small);
}

.search-form button {
    min-width: 62px;
    padding: 0 14px;
    color: var(--white);
    border: 1px solid var(--surface-dark);
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
    background: var(--surface-dark);
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.table-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.data-table td {
    font-size: 12px;
}

.data-table tbody tr:hover {
    background: #f8faf7;
}

.data-table td > small {
    display: block;
    color: var(--muted);
    line-height: 1.55;
}

.account-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

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

.account-cell small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.mini-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    aspect-ratio: 1;
    color: var(--white);
    border-radius: 50%;
    background: var(--surface-dark);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
}

.state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 800;
}

.state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.state-green {
    color: var(--green);
}

.state-red {
    color: var(--red);
}

.table-tag {
    margin-left: 8px;
}

.action-menu {
    position: relative;
}

.action-menu summary {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 11px;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    cursor: pointer;
    list-style: none;
    font-size: 11px;
    font-weight: 800;
}

.action-menu summary::-webkit-details-marker {
    display: none;
}

.action-popover {
    position: absolute;
    top: 40px;
    right: 0;
    z-index: 40;
    width: 270px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: var(--shadow-strong);
}

.action-popover form + form {
    margin-top: 7px;
}

.action-popover button {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f8faf7;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.action-popover button:hover {
    border-color: #b9c5c1;
    background: var(--surface-soft);
}

.adjust-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.adjust-inline input,
.adjust-inline select {
    min-height: 40px;
    font-size: 11px;
}

.adjust-inline button {
    grid-column: 1 / -1;
}

.empty-table {
    padding: 38px !important;
    color: var(--muted);
    text-align: center !important;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 20px;
}

.pagination a {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
}

.pagination a.is-current {
    color: var(--white);
    border-color: var(--accent);
    background: var(--accent);
}

.admin-sidebar {
    display: grid;
    gap: 18px;
}

.audit-panel,
.safe-box {
    padding: 24px;
}

.audit-panel h2 {
    margin-top: 9px;
    font-size: 22px;
}

.audit-list {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.audit-item {
    display: grid;
    grid-template-columns: 8px 1fr;
    gap: 12px;
}

.audit-dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--mint);
}

.audit-item strong {
    color: var(--ink);
    font-size: 11px;
}

.audit-item p {
    margin: 4px 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.audit-item small {
    color: #8d999d;
    font-size: 9px;
}

.safe-box {
    color: var(--white);
    border-color: transparent;
    background: var(--surface-dark);
}

.safe-icon {
    display: grid;
    place-items: center;
    width: 38px;
    aspect-ratio: 1;
    color: var(--surface-dark);
    border-radius: 50%;
    background: #7bd2c3;
    font-weight: 900;
}

.safe-box h3 {
    margin: 16px 0 8px;
    font-family: var(--font-display);
    font-size: 20px;
}

.safe-box p {
    margin: 0;
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
    line-height: 1.65;
}

.flash {
    margin: -18px 0 28px;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--surface);
    font-size: 12px;
    box-shadow: 0 8px 24px rgba(18, 35, 49, .06);
}

.flash-success {
    color: var(--green);
    border-color: rgba(37, 130, 111, .24);
    background: #f1f9f6;
}

.flash-error {
    color: var(--red);
    border-color: rgba(199, 70, 59, .24);
    background: #fff4f2;
}

.flash-warning {
    color: #9b6416;
    border-color: rgba(242, 184, 75, .32);
    background: #fff8e9;
}

.reveal {
    animation: reveal .55s ease both;
}

.reveal-delay {
    animation-delay: .08s;
}

.reveal-delay-2 {
    animation-delay: .16s;
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes orbit {
    to {
        transform: translate(-50%, -57%) rotate(342deg);
    }
}

@media (max-width: 1120px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr);
        gap: 48px;
    }

    .hero-orbit {
        min-height: 450px;
    }

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

    .currency-panel {
        grid-column: 1 / -1;
        min-height: auto !important;
    }

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

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

@media (max-width: 860px) {
    .topbar {
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .nav-links {
        grid-row: 2;
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: center;
    }

    .page-content {
        padding-top: 48px;
    }

    .hero-grid,
    .auth-layout,
    .auth-layout-reverse,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        min-height: auto;
    }

    .hero-orbit {
        min-height: 390px;
    }

    .auth-card,
    .auth-layout-reverse .auth-card {
        max-width: none;
        justify-self: stretch;
    }

    .auth-layout-reverse .auth-aside {
        order: -1;
    }

    .feature-strip {
        grid-template-columns: 1fr;
    }

    .feature-strip article {
        min-height: auto;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-grid {
        align-items: stretch;
    }

    .profile-summary {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 20px;
        text-align: left;
    }

    .profile-summary .avatar-orb-large {
        grid-row: 1 / 4;
        margin: 0;
    }

    .summary-badges {
        justify-content: flex-start;
    }

    .summary-lines {
        grid-column: 1 / -1;
    }

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

@media (max-width: 660px) {
    .topbar {
        margin: 8px 10px 0;
        padding: 11px 12px;
        border-radius: 14px;
    }

    .brand small,
    .user-chip {
        display: none;
    }

    .topbar-actions {
        gap: 6px;
    }

    .topbar-actions .button {
        min-height: 34px;
        padding-inline: 11px;
    }

    .nav-links {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .nav-links a {
        flex: 1 0 auto;
        text-align: center;
    }

    .page-content {
        padding: 38px 16px 52px;
    }

    .hero-copy h1,
    .auth-aside h1 {
        font-size: clamp(45px, 14vw, 62px);
    }

    .hero-lede,
    .auth-aside > .muted {
        font-size: 15px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-actions .text-link {
        align-self: center;
    }

    .hero-metrics {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .hero-metrics div {
        min-width: 0;
    }

    .hero-metrics strong {
        font-size: 19px;
    }

    .hero-metrics span {
        font-size: 8px;
    }

    .hero-orbit {
        min-height: 335px;
        border-radius: 22px;
    }

    .ring-one {
        width: 255px;
        height: 140px;
    }

    .ring-two {
        width: 330px;
        height: 210px;
    }

    .planet {
        width: 132px;
        border-width: 9px;
    }

    .planet span {
        top: 36px;
        font-size: 27px;
    }

    .planet small {
        top: 72px;
    }

    .label-top {
        top: 24px;
        right: 22px;
    }

    .label-bottom {
        right: 22px;
        bottom: 22px;
    }

    .hero-art-note {
        left: 20px;
        bottom: 20px;
        padding: 10px 12px;
    }

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

    .currency-panel {
        grid-column: auto;
    }

    .dashboard-grid .panel,
    .profile-forms .panel,
    .table-panel {
        min-height: auto;
        padding: 22px;
    }

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

    .profile-summary {
        display: block;
        text-align: center;
    }

    .profile-summary .avatar-orb-large {
        margin: 0 auto 18px;
    }

    .summary-badges {
        justify-content: center;
    }

    .panel-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form {
        width: 100%;
    }

    .table-scroll {
        overflow: visible;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        margin-bottom: 12px;
        padding: 15px;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: #fbfcf9;
    }

    .data-table td {
        display: grid;
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 12px;
        padding: 9px 0;
        border: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 9px;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .data-table td:first-child {
        grid-template-columns: 1fr;
        padding-top: 0;
    }

    .data-table td:first-child::before,
    .empty-table::before {
        display: none;
    }

    .data-table td:last-child {
        padding-bottom: 0;
    }

    .action-menu,
    .action-menu summary {
        width: 100%;
    }

    .action-menu summary {
        justify-content: center;
    }

    .action-popover {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
    }

    .empty-table {
        display: block !important;
    }

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

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

    .admin-stat {
        padding: 17px;
    }

    .admin-stat strong {
        font-size: 22px;
    }

    .footer {
        flex-wrap: wrap;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .topbar-actions .button-gold {
        display: none;
    }

    .brand strong {
        font-size: 12px;
    }

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

    .hero-metrics div {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 14px;
    }

    .hero-metrics span {
        margin: 0;
        text-align: right;
    }

    .hero-art-note {
        display: none;
    }

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

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