:root {
    color-scheme: light;
    font-family: var(--dream-font-sans, system-ui, sans-serif);
    --ink: #392741;
    --muted: #503A57;
    --violet: #573767;
    --purple: var(--violet);
    --pink: #713C2B;
    --cta-purple: #80518D;
    --cta-pink: #A64278;
    --sky: #DDC8E5;
    --mist: #D2BEDB;
    --surface: #EADDED;
    --surface-soft: #DDC8E5;
    --input: #F4E7EE;
    --warm: #713C2B;
    --card-border: #AA88B7;
    --radius-card: 20px;
    --radius-control: 14px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --shadow-card: 0 4px 20px rgb(83 48 91 / 12%);
    --shadow-raised: 0 16px 44px rgb(66 38 75 / 24%);
    --focus-ring: #713C2B;
    --danger: #982F50;
    --success: #27664F;
}

* { box-sizing: border-box; }
html { scroll-padding-block-end: calc(var(--dream-mobile-navigation-height, 72px) + 16px); }
body { min-width: 0; min-height: 100vh; margin: 0; padding-bottom: calc(var(--dream-mobile-navigation-height, 72px) + 16px); background: var(--mist); color: var(--ink); line-height: 1.5; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.dream-background { position: fixed; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(155deg, rgb(210 190 219 / 90%), rgb(232 202 219 / 94%) 52%, rgb(208 219 220 / 94%)), url('./dream-dusk-aurora-v1.webp') center top / cover no-repeat; background-color: var(--mist); }
.shell-header { display: flex; align-items: center; justify-content: space-between; width: min(1120px, calc(100% - 40px)); min-height: 72px; margin: 0 auto; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; font-size: 1.1rem; font-weight: 700; }
.wordmark img { border-radius: 14px; }
.preview-pill { border-radius: 999px; padding: 5px 9px; background: rgb(112 73 131 / 10%); color: var(--violet); font-size: .76rem; font-weight: 600; }
.app-frame { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.desktop-navigation { display: none; }
.page-header { padding: var(--space-6) 4px var(--space-4); }
.eyebrow { margin: 0 0 6px; color: var(--violet); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 700; letter-spacing: -.015em; }
h2 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.page-header > p:last-child, .state-card > p, .helper-copy { color: var(--muted); }
.page-header > p:last-child { max-width: 45rem; margin: 8px 0 0; }
.shell-content { min-inline-size: 0; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.state-card, .auth-card { border: 1px solid var(--card-border); border-radius: var(--radius-card, 20px); background: var(--surface); box-shadow: var(--shadow-card); }
.state-card { display: grid; justify-items: center; gap: 12px; min-height: 270px; padding: 28px; text-align: center; }
.state-card p { max-width: 34rem; margin: 0; }
.state-moon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: var(--radius-control); background: var(--surface-soft); color: var(--violet); font-size: 28px; }
.state-moon svg { inline-size: 24px; block-size: 24px; }
.account-email { font-weight: 600; }
.button { display: inline-flex; min-width: 0; max-width: 100%; min-height: 48px; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-control); padding: 12px 20px; background: linear-gradient(135deg, var(--cta-purple), var(--cta-pink)); box-shadow: 0 3px 10px rgb(112 73 131 / 12%); color: white; cursor: pointer; overflow-wrap: anywhere; font-weight: 600; }
.button--secondary { border: 1px solid var(--card-border, #AA88B7); background: var(--surface); box-shadow: none; color: var(--violet); }
.button--disabled, .button:disabled { cursor: not-allowed; opacity: .55; }
.destination:focus-visible, .button:focus-visible, .wordmark:focus-visible, input:focus-visible { outline: 3px solid rgb(112 73 131 / 52%); outline-offset: 3px; }
.mobile-navigation { position: fixed; z-index: 2; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 72px; border-top: 1px solid var(--card-border); background: rgb(234 221 237 / 97%); backdrop-filter: blur(14px); }
.destination { display: inline-grid; min-width: 0; min-height: 48px; place-items: center; padding: 8px 4px; color: var(--muted); font-size: .69rem; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.destination.is-active { color: var(--violet); }
.destination.is-active .destination-icon { background: var(--surface-soft); }
.auth-page { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 100vh; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 430px); min-width: 0; max-width: 100%; padding: 28px 18px; text-align: center; overflow-wrap: anywhere; }
.dream-mark { display: block; width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 50%; box-shadow: var(--shadow-card); }
.auth-card > .muted { margin: 8px 0 20px; }
.auth-form { display: grid; gap: 8px; text-align: start; }
.auth-form label { color: var(--ink); font-size: .9rem; font-weight: 600; }
.auth-form input { min-height: 52px; border: 1px solid var(--card-border, #AA88B7); border-radius: var(--radius-control); padding: 12px; background: var(--input); color: var(--ink); }
.auth-form .button { width: 100%; margin-top: 8px; }
/* A short viewport with an editor focused needs its height for input. Keep
 * navigation reachable in document flow instead of covering the current line. */
@media (max-width: 959px) and (max-height: 420px) {
    html:has(input:focus, textarea:focus) { scroll-padding-block-end: 16px; }
    body:has(input:focus, textarea:focus) { padding-bottom: 16px; }
    body:has(input:focus, textarea:focus) .mobile-navigation { position: static; margin-top: 16px; }
}
.helper-copy { margin: 20px 0 0; font-size: .82rem; text-align: start; }
.error-banner { margin: 0 0 16px; border: 1px solid rgb(232 93 117 / 30%); border-radius: var(--radius-control); padding: 12px; background: rgb(232 93 117 / 8%); color: var(--danger); font-weight: 700; text-align: start; }
@media (min-width: 960px) {
    body { padding-bottom: 0; }
    .app-frame { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: start; }
    .desktop-navigation { position: sticky; top: 18px; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--card-border); border-radius: var(--radius-card, 20px); background: var(--surface); box-shadow: var(--shadow-card); }
    .desktop-navigation .destination { justify-content: start; grid-template-columns: 1fr; padding: 10px 12px; text-align: start; }
    .mobile-navigation { display: none; }
}

/* Decorative dusk art does not change navigation or information hierarchy. */
.auth-card { background: linear-gradient(145deg, #F2D6CC, #EADDED 65%, #DDCEE9); }
.adult-management-page { padding-block: 24px; background: linear-gradient(155deg, rgb(210 190 219 / 90%), rgb(232 202 219 / 94%) 52%, rgb(208 219 220 / 94%)), url('./dream-dusk-aurora-v1.webp') center top / cover fixed; }
.adult-management-page main { width: min(640px, calc(100% - 32px)); margin: auto; padding: 24px; border: 1px solid var(--card-border); border-radius: var(--radius-card); background: var(--surface); }
.adult-management-page a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.adult-management-page button { min-block-size: 48px; border: 1px solid var(--card-border); border-radius: var(--radius-control); padding: 10px 16px; color: #FFF4F8; background: linear-gradient(135deg, var(--cta-purple), var(--cta-pink)); }
.adult-management-page li { margin-block: 12px; padding: 16px; border: 1px solid var(--card-border); border-radius: var(--radius-control); background: var(--input); }
.adult-management-page :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
