/* Portada. The site is the Down cover's sky: saturated blue, solar gold and white type. The real
 * cover (logo intact) appears inside the compositor, the share image and the listen panel. Anything
 * you read closely or fill in sits on a white sheet with navy ink, so long tasks stay calm.
 * Colour tokens are contextual: --ink, --muted, --line and friends mean "on the sky" at the root and
 * are redefined inside every sheet, so components read correctly wherever they land. */
@font-face { font-family: DownDisplay; src: url('/assets/production/down-art-v3/anybody-latin-standard-normal.woff2') format('woff2'); font-weight: 100 900; font-stretch: 50% 150%; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: DownDisplay; src: url('/assets/production/down-art-v3/anybody-latin-ext-standard-normal.woff2') format('woff2'); font-weight: 100 900; font-stretch: 50% 150%; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: DownDisplay; src: url('/assets/production/down-art-v3/anybody-latin-standard-italic.woff2') format('woff2'); font-weight: 100 900; font-stretch: 50% 150%; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: DownDisplay; src: url('/assets/production/down-art-v3/anybody-latin-ext-standard-italic.woff2') format('woff2'); font-weight: 100 900; font-stretch: 50% 150%; font-style: italic; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: DownBody; src: url('/assets/production/down-art-v3/hanken-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: DownBody; src: url('/assets/production/down-art-v3/hanken-grotesk-latin-ext-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* The cover's palette */
  --sky-top: #0763a3;
  --sky: #0a6aa6;
  --sky-low: #085c92;
  --navy: #04213a;
  --navy-2: #0a3557;
  --sun: #ffd35a;
  --sun-2: #ffe082;
  --sunlight: #fff4cd;
  --white: #ffffff;
  --cloud: #eaf5fc;
  --slate: #44607a;
  --pale: #d7ecf8;
  --error: #b3261e;
  /* Context: on the sky */
  --ink: var(--white);
  --muted: var(--pale);
  --line: #ffffff47;
  --line-strong: #ffffffa6;
  --surface: #ffffff1f;
  --focus: var(--sun);
  --hover: var(--sun);
  --primary-bg: var(--sun);
  --primary-fg: var(--navy);
  /* Type and space */
  --display: DownDisplay, 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --sans: DownBody, 'Avenir Next', Avenir, 'Helvetica Neue', sans-serif;
  --header: 80px;
  --gutter: clamp(24px, 4.5vw, 72px);
  --inset: clamp(12px, 2.6vw, 40px);
  --space-24: 96px;
  --radius-control: 12px;
  --radius-sheet: 24px;
  color-scheme: light;
}
/* Every white sheet re-points the context tokens at navy ink. */
:where(.sheet, .interior-page .route-content, .pair-page .route-content, .editor-form, .public-tools, .gift-sheet, .error-view, .dialog, .preview-dialog, .sea-copy, .sea-explanation, .paired-heading, .chapter-copy, .landing-start-row, .streaming-menu) {
  --ink: var(--navy);
  --muted: var(--slate);
  --line: #c7dfee;
  --line-strong: #6f97b6;
  --surface: var(--cloud);
  --focus: #0a5ea8;
  --hover: #0a5ea8;
  --primary-bg: var(--navy);
  --primary-fg: var(--white);
  background: var(--white);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; background: var(--sky-low); }
#app { min-height: 100svh; display: flex; flex-direction: column; }
#app > main { flex: 1 0 auto; }
body { margin: 0; min-height: 100svh; background: linear-gradient(180deg, var(--sky-top) 0, var(--sky) 640px, var(--sky-low) 100%); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; text-underline-offset: 5px; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2 { font-family: var(--display); font-weight: 850; font-stretch: 125%; line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(40px, 4.4vw, 64px); margin-bottom: 24px; }
h2 { font-size: clamp(32px, 3.4vw, 48px); margin-bottom: 20px; }
h3 { font-size: 20px; font-weight: 650; line-height: 1.35; }
h4 { font-size: 16px; font-weight: 650; }
p { margin-bottom: 24px; max-width: 70ch; }
em { font-style: italic; font-weight: 900; }
button:disabled { opacity: .5; cursor: not-allowed; }
:where(button, a, summary, input, textarea, select, label):focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
:where(input, textarea, select) { caret-color: var(--focus); }
::selection { background: var(--sun); color: var(--navy); }
::placeholder { color: #567189; opacity: 1; }
[hidden] { display: none !important; }
.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; z-index: 1000; top: 12px; left: 12px; padding: 12px 20px; border-radius: 999px; background: var(--sun); color: var(--navy); font-weight: 700; clip-path: inset(50%); pointer-events: none; }
.skip-link:focus { clip-path: none; pointer-events: auto; }
.boot { min-height: 100svh; display: grid; place-content: center; gap: 16px; text-align: center; }
.boot p { margin: 0 auto; }
.wordmark { font: italic 900 80px/1 var(--display); font-stretch: 150%; letter-spacing: -.02em; }
.ui-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; }

/* Header and footer: the header floats on the sky; the footer is the cover's deep navy. */
.header { position: relative; height: var(--header); display: flex; align-items: center; gap: 18px; padding: 0 var(--gutter); z-index: 20; color: var(--white); }
.brand { display: inline-flex; align-items: center; min-height: 44px; font: italic 900 34px/1 var(--display); font-stretch: 150%; letter-spacing: -.02em; }
.artist-brand { font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.language-selector { margin-left: auto; display: flex; gap: 4px; }
/* Streaming services: icons beside the languages on wide screens, one Listen button on phones. */
.streaming { position: relative; display: flex; align-items: center; margin-left: auto; }
.streaming + .language-selector { margin-left: 2px; padding-left: 10px; border-left: 1px solid #ffffff40; }
.streaming-inline { display: flex; gap: 2px; }
.streaming-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; transition: background 180ms ease-out, transform 180ms ease-out; }
.streaming-icon:hover { background: #ffffff1f; transform: translateY(-1px); }
.brand-mark { width: 24px; height: 24px; flex: none; }
.streaming-compact { display: none; }
.streaming-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid #ffffff73; border-radius: 999px; background: transparent; color: var(--white); }
.streaming-toggle[aria-expanded=true] { background: var(--white); border-color: var(--white); color: var(--navy); }
.streaming-toggle .ui-icon { width: 20px; height: 20px; }
.streaming-menu { position: absolute; z-index: 40; top: calc(100% + 8px); right: -4px; width: min(300px, calc(100vw - 24px)); padding: 8px; border-radius: 18px; box-shadow: 0 24px 60px -20px #021a35; }
.streaming-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 12px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.streaming-row:hover { background: var(--surface); }
.streaming-row span { flex: 1; }
.streaming-row .ui-icon { color: var(--muted); }
.language-button { min-width: 44px; min-height: 44px; padding: 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--pale); font-size: 13px; font-weight: 700; }
.language-button[aria-pressed=true] { color: var(--white); border-bottom-color: var(--white); }
.language-button:hover { color: var(--white); }
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding: 24px var(--gutter) max(24px, env(safe-area-inset-bottom, 0px)); background: var(--navy); color: #b8d4e6; font-size: 13px; }
.footer > span { margin-right: auto; color: var(--white); font-weight: 700; letter-spacing: .04em; }
.footer > a, .footer > button { display: inline-flex; align-items: center; min-height: 44px; }
.footer .text-link { font-size: 13px; border: 0; }
.footer a:hover, .footer .text-link:hover { color: var(--white); text-decoration: underline; }

/* Buttons: pills. Primary is the sun on the sky and navy on a sheet. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; min-width: 44px; padding: 12px 24px; border: 1.5px solid var(--navy); border-radius: 999px; background: var(--navy); color: var(--white); font-size: 15px; font-weight: 700; line-height: 1.35; text-align: center; transition: background 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out; }
.button:hover:not(:disabled) { background: var(--navy-2); border-color: var(--navy-2); }
.button.primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); }
.button.primary:hover:not(:disabled) { background: var(--sun-2); border-color: var(--sun-2); color: var(--navy); }
:where(.sheet, .interior-page .route-content, .pair-page .route-content, .editor-form, .public-tools, .gift-sheet, .error-view, .dialog, .preview-dialog, .sea-copy, .sea-explanation, .paired-heading, .chapter-copy) .button.primary:hover:not(:disabled) { background: var(--navy-2); border-color: var(--navy-2); color: var(--white); }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.button.secondary:hover:not(:disabled) { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.button.danger { background: var(--error); border-color: var(--error); color: var(--white); }
.button.danger:hover:not(:disabled) { background: #8c1d17; border-color: #8c1d17; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 9px 0; border: 0; border-bottom: 1.5px solid currentColor; border-radius: 0; background: transparent; color: inherit; font-size: 15px; font-weight: 600; line-height: 1.45; text-align: left; transition: color 180ms ease-out; }
.text-link:hover { color: var(--hover); }
.quiet { font-size: 14px; color: var(--muted); line-height: 1.6; }
.scene-surface { position: absolute; inset: 0; }
/* Every artwork's light layer fills its box; without a CSS size a canvas shows at its pixel size on retina screens. */
.down-art canvas { width: 100%; height: 100%; }

/* Landing: one question beside the cover it fills in. */
.landing-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 6vw, 96px); min-height: calc(100svh - var(--header)); max-height: 1000px; padding: 24px var(--gutter) 56px; }
.landing-copy { max-width: 640px; }
.landing-title { margin: 0 0 24px; font-size: clamp(56px, 7vw, 104px); text-transform: uppercase; }
.landing-title em { display: block; color: var(--sun); }
.landing-lede { max-width: 44ch; margin-bottom: 32px; font-size: 19px; line-height: 1.55; }
.landing-start { display: grid; gap: 10px; max-width: 560px; }
.landing-start label { font-size: 15px; font-weight: 700; }
.landing-start-row { display: flex; gap: 8px; padding: 6px; border-radius: 999px; box-shadow: 0 18px 40px -18px #021a35b3; }
.landing-start-row input { flex: 1; min-width: 0; min-height: 52px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--navy); font: 600 18px var(--sans); }
.landing-start-row input:focus-visible { outline-offset: 2px; }
.landing-cta { flex: none; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--navy); color: var(--white); font: 700 16px var(--sans); }
.landing-cta:hover { background: var(--navy-2); }
.landing-frame { position: relative; width: min(30vw, calc((100svh - var(--header) - 80px) * .5625), 440px); aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -30px #021a35, 0 0 0 1px #ffffff30; }
.landing-section { max-width: 1440px; margin: auto; padding: var(--space-24) var(--gutter); }
.landing-section h2 { max-width: 16ch; font-size: clamp(40px, 4.4vw, 64px); }
.landing-section > p { max-width: 55ch; font-size: 18px; }
.landing-worlds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.landing-world { display: grid; gap: 6px; padding: 12px 12px 20px; border: 0; border-radius: 18px; background: #04213a40; color: var(--white); text-align: left; transition: background .2s ease, transform .2s ease; }
.landing-world:hover { background: #04213a66; transform: translateY(-3px); }
.landing-world-art { position: relative; display: block; aspect-ratio: 9 / 16; margin-bottom: 10px; border-radius: 12px; overflow: hidden; }
.landing-world strong { font: italic 900 28px/1.1 var(--display); font-stretch: 140%; text-transform: uppercase; }
.landing-listen { display: grid; grid-template-columns: minmax(220px, 400px) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 96px); max-width: 1440px; margin: auto; padding: 72px var(--gutter) 96px; }
.landing-listen > img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 18px; box-shadow: 0 40px 80px -30px #021a35; }
.landing-listen h2 { max-width: 16ch; font-size: clamp(40px, 4.4vw, 62px); }
.landing-listen h2 em { display: block; color: var(--sun); }
/* Listening: buttons that open the song where plays count, then a player loaded only on tap. */
.listen-panel { display: grid; gap: 16px; max-width: 660px; margin: 24px 0; }
.listen-open { display: flex; flex-wrap: wrap; gap: 10px; }
.listen-platform { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 18px; border: 1.5px solid var(--line-strong); border-radius: 999px; color: var(--ink); font-size: 15px; font-weight: 700; transition: background 180ms ease-out, border-color 180ms ease-out; }
.listen-platform:hover { background: var(--surface); border-color: var(--ink); }
.listen-platform .brand-mark { width: 20px; height: 20px; }
.listen-here { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.listen-label { margin: 0 4px 0 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.listen-start { justify-self: start; }
.listen-start .ui-icon { fill: currentColor; stroke: none; }
.listen-choice { min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; }
.listen-choice:hover:not([aria-pressed=true]) { background: var(--surface); }
.listen-choice[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.listen-player { overflow: hidden; border-radius: 14px; background: var(--navy); }
.listen-player iframe { display: block; width: 100%; border: 0; }
.listen-note { margin: 0; max-width: 62ch; font-size: 13px; }
/* Listen-first entry: the intact cover beside the platforms. */
.listen-control { display: grid; grid-template-columns: minmax(260px, 480px) 1fr; align-items: center; gap: 64px; max-width: 1250px; min-height: calc(100svh - var(--header)); margin: auto; padding: 48px var(--gutter) 72px; }
.listen-control > img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: 0 40px 80px -30px #021a35; }
.listen-control h1 { text-transform: uppercase; }

/* Sheets: interior pages are one white sheet on the sky. */
.interior-page .route-content, .pair-page .route-content { width: min(1440px, calc(100% - 2 * var(--inset))); margin: 8px auto 48px; padding: 0 clamp(20px, 4vw, 56px); border-radius: var(--radius-sheet); }
.gift-page .route-content, .sea-page .route-content { width: 100%; }
.toast { position: fixed; z-index: 2000; bottom: max(24px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); max-width: min(90vw, 650px); padding: 14px 22px; border-radius: 14px; background: var(--navy); color: var(--white); font-size: 14px; box-shadow: 0 12px 32px #021a3559; }
.toast.error { background: var(--error); }

/* Creator: the preview is the cover itself; the form is a calm white sheet. */
.editor-layout { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(420px, 1fr); align-items: start; gap: 0 32px; max-width: 1600px; min-height: calc(100svh - var(--header)); margin: auto; padding: 0 var(--gutter) 48px; }
.editor-preview-disclosure { grid-column: 1; grid-row: 1; position: sticky; top: 16px; }
.editor-preview-disclosure > summary { display: none; }
.editor-preview-disclosure:not([open]) > .editor-preview { display: block; }
.editor-preview { position: relative; height: min(calc(100svh - var(--header) - 24px), 860px); min-height: 540px; margin-top: 8px; border-radius: 22px; background: var(--sky-top); box-shadow: 0 30px 60px -30px #021a35; }
.editor-preview > .scene-surface { border-radius: inherit; overflow: hidden; }
.editor-form, .public-tools { margin-top: 8px; padding: 32px clamp(22px, 3.4vw, 48px) 40px; border-radius: var(--radius-sheet); box-shadow: 0 30px 60px -30px #021a35; }
.editor-form { grid-column: 2; grid-row: 1; }
.editor-heading h1, .page-heading h1, .published-heading h1, .public-tools h1, .admin-heading h1 { margin-bottom: 16px; font-size: clamp(32px, 3vw, 42px); text-transform: uppercase; }
.editor-heading p { max-width: 48ch; color: var(--muted); }
fieldset { min-width: 0; padding: 0; border: 0; margin: 20px 0; }
legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 44px; min-width: 44px; padding: 10px 16px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); font-size: 14px; }
.choice[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.choice:hover:not([aria-pressed=true]) { background: var(--surface); }
.subject-select { width: 100%; min-height: 48px; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-control); background: var(--white); color: var(--ink); font-size: 16px; }
.name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; min-width: 0; }
.field > .text-link { align-self: flex-start; }
.field label { font-size: 14px; font-weight: 700; line-height: 1.4; }
.field input, .field textarea, .field select, .share-url, .management-link-section input { width: 100%; min-height: 48px; padding: 11px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-control); background: var(--white); color: var(--ink); }
/* Creator: soft filled fields, names that read like the cover, who-it's-for as chips. */
.editor-form .field :where(input, textarea) { border-color: transparent; background: var(--cloud); font-size: 17px; }
.editor-form .field :where(input, textarea):hover { border-color: var(--line); }
.editor-form .field :where(input, textarea):focus { border-color: var(--navy); background: var(--white); }
.editor-form .field :where(input, textarea):focus-visible { outline: none; box-shadow: 0 0 0 4px #0a5ea826; }
.subject-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.subject-chip { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--cloud); color: var(--ink); font-size: 14px; font-weight: 650; transition: background 160ms ease-out, color 160ms ease-out; }
.subject-chip:hover { background: #dcebf6; }
.subject-chip[aria-pressed=true] { background: var(--navy); color: var(--white); }
.prefixed { position: relative; }
.field-prefix { position: absolute; z-index: 1; top: 0; left: 16px; display: flex; align-items: center; height: 48px; padding-top: 3px; font: italic 900 14px/1 var(--display); font-stretch: 130%; letter-spacing: .02em; text-transform: uppercase; color: var(--slate); pointer-events: none; }
.prefixed input { padding-left: 78px; font-weight: 650; }
.note-field textarea { min-height: 128px; padding: 16px; font-size: 18px; line-height: 1.5; }
.idea-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; }
.idea-chip::before { content: '✦' / ''; color: #d39b00; }
.idea-chip:hover { background: var(--cloud); border-color: var(--line-strong); }
.field textarea { resize: vertical; line-height: 1.6; }
.field :where(input, textarea, select):hover { border-color: var(--ink); }
.field :where(input, textarea)[aria-invalid=true] { border-color: var(--error); }
.field-hint, .character-count { font-size: 12px; color: var(--muted); line-height: 1.5; }
.character-count { align-self: flex-end; font-variant-numeric: tabular-nums; }
.character-count.over-limit, .form-error { color: var(--error); }
.form-error { font-size: 14px; white-space: pre-wrap; }
.form-error:empty { display: none; }
.treatment-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.treatment-choice { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 8px 8px 14px; gap: 8px; border: 1.5px solid var(--line); border-radius: 16px; background: transparent; color: var(--ink); text-align: left; }
.treatment-choice[aria-pressed=true] { border-color: var(--navy); background: var(--cloud); }
.treatment-choice:hover { border-color: var(--ink); }
.treatment-live { position: relative; display: block; width: 100%; height: 116px; overflow: hidden; border-radius: 10px; background: var(--sky-top); }
.treatment-live .scene-surface { inset: 0; }
.treatment-choice strong { font: italic 900 20px/1.1 var(--display); font-stretch: 140%; text-transform: uppercase; }
.optional-section { padding: 10px 0; border-top: 1px solid var(--line); }
.optional-section:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 28px; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; width: 8px; height: 8px; margin-right: 4px; flex: none; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 180ms ease-out; }
details[open] > summary::after { transform: rotate(225deg); }
details[open] > summary { margin-bottom: 14px; }
details p { font-size: 14px; color: var(--muted); }
.file-input { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }
.file-label { margin-left: 20px; cursor: pointer; }
.photo-state { margin: 24px 0; }
.photo-thumbnail { width: 130px; height: 150px; object-fit: cover; object-position: 50% 30%; margin-bottom: 16px; border-radius: var(--radius-control); }
.photo-state .text-link { margin-right: 16px; }
.voice-state audio { width: 100%; margin-top: 20px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 20px 0; font-size: 14px; line-height: 1.6; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: none; accent-color: var(--navy); margin: 3px 0 0; }
.check input:disabled { opacity: .5; }
.check:has(input:disabled) { color: var(--muted); }
.inline-fields { display: flex; flex-wrap: wrap; gap: 20px; }
.inline-fields .field { flex: 1; min-width: 160px; }
.review-consent { padding-top: 16px; border-top: 1px solid var(--line); }
.public-inclusion-group { padding-bottom: 16px; border-bottom: 1px solid var(--line); }

/* Dialogs are sheets too. */
.dialog, .preview-dialog { max-width: min(600px, calc(100vw - 32px)); max-height: 90svh; padding: 28px; border: 0; border-radius: var(--radius-sheet); box-shadow: 0 30px 90px #021a3566; }
.dialog::backdrop, .preview-dialog::backdrop { background: #04213ab3; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dialog h2, .dialog-top h2 { margin: 0; font-size: 26px; font-stretch: 112%; line-height: 1.15; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); font-size: 20px; }
.icon-button:hover { background: var(--surface); }
.dialog label:not(.check) { display: block; font-weight: 700; }
.dialog textarea, .dialog select { display: block; width: 100%; padding: 12px; background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--radius-control); margin: 8px 0 24px; font-weight: 400; }
.starter-choice { display: block; width: 100%; padding: 20px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font-size: 16px; line-height: 1.6; }
.starter-choice:hover { color: var(--hover); }
/* Before the sender chooses: this version is public, in the sun's colour so it can't be skimmed past. */
.public-notice { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius-control); background: #ffd35a40; color: var(--ink); line-height: 1.4; }
/* The card's height leaves room for the title row, player strip and action (about 250px), so nothing is clipped. */
.preview-dialog { --card-w: min(calc(min(60svh, 560px) * 9 / 16), calc((90svh - 250px) * 9 / 16), calc(100vw - 64px)); width: max(calc(var(--card-w) + 40px), min(440px, calc(100vw - 24px))); max-width: none; padding: 20px; }
/* Review: one media card (the gift with its player strip) and the one action under it, the card's width. */
.preview-dialog[open] { display: flex; flex-direction: column; gap: 16px; }
.preview-dialog > .dialog-top { margin: 0; }
.preview-dialog .dialog-top h2 { font-size: 24px; }
.review-card { flex-shrink: 0; width: var(--card-w); margin: 0 auto; overflow: hidden; border-radius: 18px; background: var(--navy); }
.dialog-preview { position: relative; width: 100%; aspect-ratio: 9/16; overflow: hidden; background: var(--sky-top); }
.review-card .play-controls { --line: #ffffff33; flex-wrap: nowrap; gap: 12px; margin: 0; padding: 10px 14px 12px; color: var(--white); }
.review-card .play-toggle { width: 40px; height: 40px; background: var(--sun); color: var(--navy); }
.review-card .play-toggle:hover { background: var(--sun-2); }
.review-card .play-toggle .ui-icon { width: 18px; height: 18px; }
.review-card .fixture-notice { color: var(--pale) !important; }
.preview-dialog > .button { align-self: center; width: min(100%, max(var(--card-w), 280px)); }
.play-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0; }
/* Review player: a round play/pause beside the progress bar, ready as soon as the dialog opens. */
.play-toggle { display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px; border: 0; border-radius: 999px; background: var(--navy); color: var(--white); }
.play-toggle:hover { background: var(--navy-2); }
.play-toggle .ui-icon { width: 20px; height: 20px; }
.ui-icon path[d^="M5.5"] { fill: currentColor; stroke: none; }
.play-controls .film-progress { flex: 1; min-width: 80px; margin: 0; }
.play-controls .audio-status { flex-basis: 100%; margin: 0; }
/* The test-audio note is a small aside beside the controls, never a block of its own. */
:is(.play-controls, .gift-controls) .fixture-notice { flex-basis: auto; max-width: 24ch; margin: 0; font-size: 11px !important; line-height: 1.35; text-align: left; }
.fixture-notice { max-width: 60ch; margin: 12px 0 0; color: var(--muted) !important; font-size: 12px !important; line-height: 1.5; }
.audio-status { font-size: 14px; line-height: 1.5; margin: 16px 0 0; }
.audio-status:empty { display: none; }
.film-progress { height: 3px; width: 100%; margin-bottom: 16px; border-radius: 3px; background: var(--line); overflow: hidden; }
.film-progress span { display: block; height: 100%; width: 100%; background: var(--sun); transform: scaleX(0); transform-origin: left; transition: transform 150ms linear; }

/* States */
.loading-view, .error-view { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; min-height: 60svh; padding: 72px var(--gutter); text-align: center; }
.loading-view { color: inherit; font-size: 16px; }
.loading-sun { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle, #fffef2, #ffe77d 50%, #ffd35a00 72%); }
.error-view { width: min(760px, calc(100% - 2 * var(--inset))); min-height: 0; margin: 8px auto 48px; border-radius: var(--radius-sheet); }
.error-view h1 { max-width: 24ch; margin: 0; font-size: clamp(28px, 3vw, 36px); }
.error-view p { max-width: 52ch; margin: 0; color: var(--muted); }
.interior-page .route-content .error-view, .pair-page .route-content .error-view { width: 100%; margin: 0; }
main.error-view { margin-top: 15svh; }

/* Recipient: the stage is the sky; the controls live in a bar below it, never over the words. */
.gift-stage { position: relative; display: flex; flex-direction: column; height: calc(100svh - var(--header)); min-height: 520px; max-height: 1100px; overflow: hidden; background: var(--sky); }
.gift-stage > .scene-surface { position: relative; inset: auto; flex: 1; min-height: 0; }
.gift-stage .down-opening-name, .gift-stage .down-domain { display: none; }
.gift-controls { --ink: var(--white); --line-strong: #ffffff8c; --surface: #ffffff1f; position: relative; flex: none; display: flex; align-items: center; gap: 18px; width: 100%; min-height: 96px; padding: 16px var(--gutter) max(16px, env(safe-area-inset-bottom, 0px)); background: var(--navy); color: var(--white); }
/* The dock: one play button that never moves; the invitation turns into the progress line in place; small tools appear at the right. */
.dock-play { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border: 0; border-radius: 999px; background: var(--sun); color: var(--navy); transition: transform 160ms ease-out, background 160ms ease-out; }
.dock-play:hover { background: var(--sun-2); transform: scale(1.04); }
.dock-play.is-idle { animation: dock-pulse 2.4s ease-out infinite; }
.dock-play .ui-icon { width: 24px; height: 24px; }
.dock-play .ui-icon path[d^="M5.5"] { transform: translateX(1.5px); }
@keyframes dock-pulse { 0% { box-shadow: 0 0 0 0 #ffd35a80; } 70%, 100% { box-shadow: 0 0 0 14px #ffd35a00; } }
.dock-info { display: grid; gap: 6px; flex: 1; min-width: 0; }
.dock-invite h1 { margin: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.05; }
.dock-invite p { margin: 4px 0 0; font-size: 14px; color: var(--pale); }
.dock-info .film-progress { height: 4px; margin: 0; background: #ffffff33; }
.dock-info .audio-status { margin: 0; font-size: 13px; color: var(--pale); }
.dock-tools { display: flex; gap: 2px; flex: none; }
.dock-tool { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--white); }
.dock-tool:hover { background: #ffffff1f; }
.dock-tool[aria-pressed=true] { background: #ffffff26; }
.dock-tool .ui-icon { width: 20px; height: 20px; }
.dock-tool .ui-icon path[d^="M3.5 4.5"] { fill: currentColor; }
.gift-sheet { width: min(1440px, calc(100% - 2 * var(--inset))); margin: var(--inset) auto 0; border-radius: var(--radius-sheet); overflow: hidden; }
.gift-after { display: flex; justify-content: space-between; align-items: flex-start; gap: 64px; padding: 56px clamp(24px, 4vw, 64px); }
.gift-after > div:first-child { max-width: 700px; }
.gift-after h2 { text-transform: uppercase; }
.after-actions { display: flex; flex-direction: column; gap: 12px; min-width: 240px; max-width: 330px; }
.keepsake-section { padding: 40px clamp(24px, 4vw, 64px) 56px; border-top: 1px solid var(--line); }
.keepsake-section h2, .management-link-section h2, .version-section h2, .chapter-panel h2, .danger-zone h2 { font-size: 24px; font-stretch: 112%; line-height: 1.2; letter-spacing: -.01em; }
.export-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.export-state { margin-top: 24px; }
.export-state > p { font-size: 14px; }
.export-still, .export-video { max-width: 225px; max-height: 400px; margin: 24px 0; border-radius: 12px; background: var(--sky-top); }
.export-state .button { margin: 0 12px 12px 0; }
.gift-metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; padding: 20px var(--gutter) 28px; font-size: 13px; color: var(--muted); }
.gift-metadata p { margin: 0; }
.lunar-chapter { position: relative; height: 85svh; min-height: 650px; margin-top: var(--inset); overflow: hidden; }
.lunar-chapter :is(.down-copy, .down-domain, .down-brand, .down-opening-name, .portada-name, .portada-copy, .portada-domain) { display: none; }
.chapter-copy { position: absolute; z-index: 9; left: var(--gutter); bottom: 10%; max-width: 530px; padding: 28px; border-radius: 20px; }
.chapter-copy h2 { font-size: 40px; text-transform: uppercase; }
.chapter-copy .action-row { margin-bottom: 0; }

/* Published, management and public post: all inside the interior sheet. */
.published-layout { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(340px, 1fr); align-items: start; gap: 64px; padding: 48px 0 56px; }
.published-art, .public-ready-art { position: relative; width: 100%; aspect-ratio: 9/16; max-height: 740px; overflow: hidden; border-radius: 18px; background: var(--sky-top); }
.published-workspace { padding: 16px 0; }
.share-url, .management-link-section input { font-size: 14px; }
.action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin: 24px 0; }
/* The private management link can never be mistaken for the share link. */
.management-link-section { padding: 24px; margin-top: 40px; border: 1px solid #f0d77a; border-radius: 16px; background: var(--sunlight); }
.management-link-section p { font-size: 14px; color: var(--muted); }
.management-link-section input { margin-bottom: 16px; }
.management-link-section .text-link { display: flex; width: fit-content; margin-top: 16px; }
.page-heading { max-width: 950px; padding: 48px 0 32px; }
.page-heading p { max-width: 65ch; color: var(--muted); }
.manage-overview { display: grid; grid-template-columns: minmax(260px, 430px) 1fr; align-items: center; gap: 64px; margin-bottom: 56px; }
.manage-art { position: relative; width: 100%; aspect-ratio: 9/16; overflow: hidden; border-radius: 18px; background: var(--sky-top); }
.manage-actions h2 { font-size: 52px; text-transform: uppercase; }
.exact-projection { white-space: pre-wrap; overflow-wrap: anywhere; }
.manage-actions .exact-projection { max-width: 36ch; font-size: 24px; font-weight: 560; line-height: 1.4; }
.manage-actions > .button { margin: 12px 12px 12px 0; }
.manage-actions > .text-link { display: flex; width: fit-content; }
.version-section { padding: 32px 0; border-top: 1px solid var(--line); }
.version-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.version-row .quiet { font-size: 13px; }
.chapter-panel { padding: 32px 0; border-top: 1px solid var(--line); }
.chapter-panel > summary { font-size: 20px; font-weight: 700; }
.chapter-panel > p { max-width: 65ch; }
.chapter-panel .exact-projection { color: var(--ink); }
.abstract-preview { position: relative; width: 190px; aspect-ratio: 1; overflow: hidden; margin: 24px 0; border-radius: 14px; }
.contribution-list { margin: 24px 0; }
.small-preview { position: relative; width: 220px; aspect-ratio: 9/16; overflow: hidden; margin-top: 24px; border-radius: 14px; }
.pair-row { padding: 24px 0; border-bottom: 1px solid var(--line); }
.pair-row > .text-link { display: flex; width: fit-content; }
.danger-zone { padding: 40px 0 56px; border-top: 1px solid #e3b2ad; }
.danger-zone h2 { color: var(--error); }
.public-ready-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-bottom: 56px; }
.public-tools > .button { margin-right: 20px; }
/* Public post ready: the artwork beside three numbered steps on one sheet. */
.post-ready { width: min(1180px, calc(100% - 2 * var(--inset))); margin: 8px auto 48px; padding: 36px clamp(20px, 4vw, 52px) 44px; border-radius: var(--radius-sheet); }
.post-ready-layout { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); align-items: start; gap: clamp(28px, 4vw, 56px); }
.post-ready .public-ready-art { position: sticky; top: 16px; max-height: none; }
.post-ready h1 { margin-bottom: 6px; font-size: clamp(30px, 3vw, 40px); text-transform: uppercase; }
.post-steps { display: grid; gap: 0; margin: 24px 0 0; padding: 0; list-style: none; }
.post-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.post-step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--sun); color: var(--navy); font: 850 15px/1 var(--display); }
.post-step-body { min-width: 0; }
.post-step h2 { margin: 4px 0 14px; font-size: 20px; font-stretch: 112%; letter-spacing: -.01em; }
.post-step .export-state { margin-top: 12px; }
.post-step .check { margin: 12px 0 4px; }
.post-step .action-row { margin: 14px 0 0; }
.post-caption { width: 100%; padding: 14px 16px; border: 1.5px solid transparent; border-radius: 14px; background: var(--cloud); color: var(--ink); font-size: 16px; line-height: 1.5; resize: vertical; }
.post-caption:focus { border-color: var(--navy); background: var(--white); outline: none; box-shadow: 0 0 0 4px #0a5ea826; }
.post-step .sound-help { padding: 0; border: 0; margin: 0; }
.post-step .sound-help > summary { display: none; }
/* Abstract and paired views show the cover alone: no names, words or address. */
:is(.abstract-preview, .small-preview, .paired-art, .film-order-art) :is(.down-copy, .down-brand, .down-domain, .down-opening-name, .portada-domain) { display: none; }

/* The sea of suns: the cover's own sea, framed below the logo. */
.sea-hero { position: relative; min-height: 680px; height: 86svh; overflow: hidden; }
.sea-view { position: absolute; inset: 0; }
.sea-cover { position: absolute; inset: 0; background: url('/assets/production/ui-portada/sea.webp') center 30% / cover no-repeat var(--sky-top); }
.sea-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #04213a00 40%, #04213a73 100%); }
.sea-copy { position: absolute; z-index: 6; top: 32px; left: var(--gutter); width: min(480px, calc(100% - var(--gutter) * 2)); padding: 32px; border-radius: 20px; box-shadow: 0 30px 60px -30px #021a35; }
.sea-copy h1 { max-width: 12ch; font-size: 48px; margin-bottom: 16px; text-transform: uppercase; }
.sea-copy > p { margin-bottom: 16px; }
.sea-copy .sea-description { font-size: 14px; color: var(--muted); }
.sea-copy .fixture-notice { margin-bottom: 20px; }
.sea-lights { position: absolute; z-index: 5; inset: 0; pointer-events: none; }
.public-sun { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #fffef2 0 35%, #ffe77d 60%, #ffd35a00 72%); transform: scale(var(--sun-scale)); }
.sea-explanation { width: min(1000px, calc(100% - 2 * var(--inset))); margin: var(--inset) auto 48px; padding: 48px clamp(24px, 4vw, 56px); border-radius: var(--radius-sheet); }
.sea-explanation > p { max-width: 65ch; }
.sun-accessible-list { max-height: 400px; overflow: auto; }
.paired-stage { position: relative; min-height: 550px; height: 60svh; overflow: hidden; margin-top: 32px; border-radius: 18px; background: var(--sky-top); }
.paired-heading { position: absolute; z-index: 10; top: 24px; left: 24px; max-width: 500px; padding: 22px 24px; border-radius: 18px; }
.paired-heading h1 { max-width: 12ch; font-size: 40px; margin: 0; text-transform: uppercase; }
.paired-dedications { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin: 48px 0; }
.paired-note { padding: 24px 0; border-top: 1px solid var(--line); }
.paired-note h2 { font-size: 44px; text-transform: uppercase; }
.paired-note > p.exact-projection { font-size: 24px; font-weight: 560; line-height: 1.4; }
.paired-after { padding: 24px 0 56px; }

/* Operator tools favor scanning and stable data roles over lyrical display. */
.admin-heading { padding-bottom: 32px; }
.admin-workspace { padding-bottom: 64px; }
.admin-login { max-width: 430px; padding-bottom: 64px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.admin-tab { min-height: 48px; min-width: 44px; padding: 12px 0; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; }
.admin-tab[aria-pressed=true] { border-bottom-color: var(--navy); color: var(--ink); }
.admin-tab:hover { color: var(--hover); }
.admin-view h2 { font-size: 28px; font-stretch: 112%; }
.admin-view h3 { margin: 32px 0 20px; font-size: 20px; }
.admin-view h4 { margin: 24px 0 16px; }
.metric-strip { display: flex; flex-wrap: wrap; gap: 32px 48px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0 32px; }
.metric-strip > div { min-width: 120px; max-width: 230px; }
.metric-strip dt { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.metric-strip dd { margin: 0; font: 850 34px/1.05 var(--display); font-stretch: 110%; font-variant-numeric: tabular-nums; }
.source-label { padding: 12px 0; font-size: 13px; color: var(--muted); }
.table-scroll { width: 100%; overflow: auto; margin: 24px 0 32px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 700; color: var(--muted); }
.activation-list { padding-left: 20px; font-size: 14px; color: #6b4a12; }
.activation-list li { margin-bottom: 12px; }
.analytics-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.measurement-boundary { padding: 20px 24px; border-radius: 12px; background: var(--surface); font-size: 14px; line-height: 1.6; }
.moderation-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.moderation-row h3 { margin: 0 0 12px; }
.moderation-row small { font-size: 13px; color: var(--muted); }
.moderation-row .action-row { margin: 0; }
.empty-state { padding: 32px 0; color: var(--muted); }
.link-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; margin: 32px 0; }
.link-form .button { align-self: center; }
.film-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-top: 1px solid var(--line); padding: 24px 0 40px; }
.film-source { padding: 16px 0; margin: 0; border-bottom: 1px solid var(--line); }
.film-order { padding-left: 24px; }
.film-order li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.film-order li > span { font-size: 14px; vertical-align: middle; }
.film-order li > div { display: inline-flex; gap: 8px; margin-left: 16px; }
.film-order-art { position: relative; display: inline-block; vertical-align: middle; width: 64px; height: 64px; overflow: hidden; margin-right: 12px; border-radius: 10px; }
.film-order-art .down-art { min-height: 0; }
.manifest-preview { max-height: 400px; overflow: auto; padding: 24px; border-radius: 12px; background: var(--surface); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fanfilm-video { display: block; width: min(100%, 280px); max-height: 500px; margin: 24px 0; border-radius: 12px; }
.film-preview-state { padding: 32px 0; border-top: 1px solid var(--line); }
.operator-evidence { padding: 32px 0; margin-top: 32px; border-top: 1px solid var(--line); }
.evidence-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 24px 0 32px; border-top: 1px solid var(--line); }
.evidence-form > h3 { grid-column: 1/-1; }
.evidence-form > .button { align-self: center; justify-self: start; }

@media (max-width: 1100px) {
  .editor-form, .public-tools { padding: 36px 28px 48px; }
  .name-fields { grid-template-columns: 1fr; gap: 0; }
  .name-fields .field { margin: 10px 0; }
  .published-layout, .manage-overview, .public-ready-layout { gap: 40px; }
  .link-form { grid-template-columns: 1fr 1fr; }
}

/* Phones: the invitation sits in the flow between the art and the controls, then gives its room back. */
@media (max-width: 860px) {
  .landing-hero { grid-template-columns: 1fr; min-height: 0; max-height: none; padding-top: 8px; gap: 28px; }
  .landing-frame { width: min(70vw, 300px); margin: 0 auto; border-radius: 18px; }
  .landing-title { font-size: clamp(40px, 11vw, 56px); margin-bottom: 14px; }
  .landing-lede { font-size: 17px; margin-bottom: 24px; }
  .landing-start-row { flex-direction: column; border-radius: 22px; }
  .landing-cta { width: 100%; }
  .landing-worlds { grid-template-columns: 1fr; }
  .landing-world { grid-template-columns: 96px 1fr; grid-template-rows: auto 1fr; column-gap: 16px; align-items: center; }
  .landing-world-art { grid-row: 1 / 3; margin: 0; }
}

@media (max-width: 760px) {
  :root { --header: 72px; --gutter: 20px; }
  .header { gap: 10px; }
  .brand { font-size: 27px; }
  /* The menu hangs from the header's right edge, so it always fits the screen. */
  .streaming { position: static; }
  .streaming-inline { display: none; }
  .streaming-compact { display: block; }
  .streaming-menu { top: calc(100% - 4px); right: var(--gutter); }
  .streaming + .language-selector { margin-left: 0; padding-left: 0; border-left: 0; }

  .artist-brand { font-size: 11px; }
  .landing-section { padding: 56px var(--gutter); }
  .landing-section h2, .landing-listen h2 { font-size: 40px; }
  .landing-section > p { font-size: 16px; }
  .landing-listen { grid-template-columns: 1fr; gap: 28px; padding: 48px var(--gutter) 64px; }
  .landing-listen > img { max-width: 320px; }
  .listen-control { grid-template-columns: 1fr; gap: 32px; padding: 24px var(--gutter) 48px; }
  .listen-control > img { max-width: 440px; }
  .listen-control h1 { font-size: 44px; }
  .footer { gap: 8px 24px; }
  .footer > span { width: 100%; margin: 0; }
  .interior-page .route-content, .pair-page .route-content { padding: 0 20px; }
  .editor-layout { display: flex; flex-direction: column; padding: 0 var(--inset) 32px; }
  .editor-form { order: 0; width: 100%; padding: 24px 18px 28px; }
  .editor-heading h1, .page-heading h1, .published-heading h1, .public-tools h1, .admin-heading h1 { font-size: 30px; }
  .editor-preview-disclosure { order: 1; position: relative; top: auto; width: 100%; margin: 16px 0 0; padding: 0 4px; color: var(--white); }
  .editor-preview-disclosure > summary { display: flex; }
  .editor-preview-disclosure:not([open]) > .editor-preview { display: none; }
  .editor-preview-disclosure[open] > summary { margin-bottom: 16px; }
  .editor-preview { height: auto; min-height: 0; max-height: none; width: 100%; aspect-ratio: 9/16; margin: 0; }
  .name-fields { grid-template-columns: 1fr 1fr; gap: 16px; }
  .name-fields .field { margin: 12px 0; }
  .field input, .field textarea, .field select { font-size: 16px; }
  .treatment-choices { gap: 8px; }
  .treatment-choice { padding: 6px 6px 12px; }
  .treatment-live { height: 110px; }
  .treatment-choice strong { font-size: 17px; font-stretch: 112%; }
  .editor-form > .button { width: 100%; }
  .public-tools { width: 100%; padding: 28px 20px 40px; }
  .dialog, .preview-dialog { max-width: calc(100vw - 24px); max-height: 94svh; padding: 20px; }
  .dialog-top h2 { font-size: 22px; }
  /* Phones: a smaller preview, so the action and the page below stay in view. */
  .preview-dialog { --card-w: min(calc(min(54svh, 480px) * 9 / 16), calc((94svh - 250px) * 9 / 16), calc(100vw - 64px)); max-width: none; }
  .preview-dialog .dialog-top h2 { font-size: 20px; }
  .gift-after { flex-direction: column; gap: 24px; padding: 36px 20px; }
  .gift-after h2 { font-size: 36px; }
  .after-actions { width: 100%; max-width: none; }
  .keepsake-section { padding: 32px 20px 40px; }
  .export-actions { flex-direction: column; align-items: flex-start; }
  .export-state .button { display: flex; width: fit-content; margin: 12px 0; }
  .lunar-chapter { min-height: 600px; height: 80svh; }
  .chapter-copy { left: 16px; right: 16px; bottom: 6%; padding: 20px; }
  .chapter-copy h2 { font-size: 30px; }
  .published-layout, .manage-overview, .public-ready-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .post-ready { padding: 24px 18px 32px; }
  .post-ready-layout { grid-template-columns: 1fr; gap: 20px; }
  .post-ready .public-ready-art { position: relative; top: auto; width: min(62%, 240px); margin: 0 auto; }
  .post-step { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
  .published-art, .public-ready-art { max-height: none; }
  /* Phones: the link and Copiar enlace come first; the artwork follows, smaller. */
  .published-workspace { order: -1; }
  .published-art { width: min(64%, 260px); margin: 0 auto; }
  .published-workspace { padding: 0; }
  .page-heading { padding: 32px 0 24px; }
  .manage-actions h2 { font-size: 40px; }
  .manage-actions .exact-projection { font-size: 20px; }
  .chapter-panel { padding: 24px 0; }
  .version-row { gap: 12px; }
  .sea-hero { height: auto; min-height: 0; overflow: visible; }
  .sea-view { position: relative; aspect-ratio: 4 / 5; }
  .sea-copy { position: relative; top: auto; left: auto; width: auto; margin: -48px 16px 0; padding: 22px; }
  .sea-copy h1 { font-size: 36px; }
  .sea-explanation { padding: 36px 20px; }
  .paired-stage { min-height: 500px; }
  .paired-heading { left: 16px; right: 16px; top: 16px; padding: 18px; }
  .paired-heading h1 { font-size: 30px; }
  .paired-dedications { grid-template-columns: 1fr; gap: 24px; margin: 32px 0; }
  .paired-note h2 { font-size: 36px; }
  .paired-note > p.exact-projection { font-size: 20px; }
  .moderation-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .link-form, .film-editor, .evidence-form { grid-template-columns: 1fr; }
  .metric-strip { gap: 24px; }
  .metric-strip > div { min-width: 100px; max-width: 140px; }
  .admin-tabs { gap: 8px 20px; }
  .management-link-section { padding: 20px; }
}

@media (max-width: 390px) {
  .name-fields { grid-template-columns: 1fr; gap: 0; }
  .name-fields .field { margin: 10px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
