/* Home */
:root[data-theme="daylight"]:has(.cover) { color-scheme: only light; }
.cover {
  --canvas: #16131d;
  --deep: #100f17;
  --title: #fff8f4;
  --muted: #c9c1cc;
  --edge: rgb(235 223 239 / .21);
  --coral: #ffab8e;
  --chrome: #211a2c;
  --hero-ambient: #6d4159;
  --daypaper: #fbf6f4;
  --dayink: #28222d;
  --daysoft: #5f5562;
  --dayrule: #dbd1d6;
  --page-inset: clamp(22px, 5.5vw, 130px);
  background: var(--canvas); color: var(--title);
}
[data-theme="moonlight"] .cover {
  --canvas: #101723; --deep: #0c121d; --chrome: #182439; --hero-ambient: #234864;
  --edge: rgb(209 228 249 / .22); --title: #f4f7ff; --muted: #bcc9da; --coral: #a7dafb;
  --daypaper: #192333; --dayink: #f0f3fb; --daysoft: #bdcadc; --dayrule: #3d4b60;
}
.cover .wrap, .cover .nav-wrap { width: min(calc(100% - 2 * var(--page-inset)), 1640px); }
.cover .header-sentinel { position: absolute; inset: 0 auto auto 0; width: 1px; height: 18px; pointer-events: none; }
.cover .masthead { position: fixed; inset: 0 0 auto; background: linear-gradient(180deg, rgb(13 13 20 / .68), transparent); backdrop-filter: none; -webkit-backdrop-filter: none; }
.cover .masthead.away-from-top, .cover .masthead:has(.hamburger[aria-expanded="true"]) { background: rgb(21 20 29 / .93); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); }
.cover .nav-wrap { min-height: clamp(66px, 6vw, 86px); justify-content: space-between; }
.cover .main-nav { margin: 0; gap: clamp(18px, 2.6vw, 48px); }
.cover .main-nav a { color: #e8e4e9; font-weight: 540; }
.cover .main-nav a:hover, .cover .main-nav a[aria-current] { color: white; }
.cover .main-nav a[aria-current]::after { bottom: 23%; height: 2px; width: 20px; background: var(--coral); transform: none; }
.cover .masthead .btn { color: #fff; background: rgb(24 21 31 / .34); border: 1px solid rgb(255 255 255 / .5); font-weight: 570; padding-inline: 20px; }
.cover .masthead .btn:hover { background: rgb(24 21 31 / .75); }
.cover .brand { color: white; }
.cover details > summary { list-style: none; cursor: pointer; }
.cover details > summary::-webkit-details-marker { display: none; }
.cover summary .i { transition: rotate var(--reveal) var(--ease); }
.cover details[open] > summary .i { rotate: 45deg; }
.cover main h2.display { font: 570 clamp(3rem, 5.2vw, 6.4rem)/.97 var(--sans); text-transform: none; letter-spacing: -.077em; }
.cover main h2.display em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.075em; }
.cover :where(main, footer) :focus-visible { outline-color: var(--coral); }

/* The approved title artwork and scene share a single full-width opening frame. */
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center;
  min-height: clamp(505px, min(51vw, 91svh), 975px); background: radial-gradient(ellipse at 32% 46%, var(--hero-ambient), transparent 64%), var(--chrome);
}
.hero-art { position: absolute; z-index: -3; inset: 0 0 0 auto; width: min(100%, 1774px); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 37%); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 96% 28%; }
.hero-art img:not([src]) { display: none; }
.hero-art noscript { display: contents; }
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; z-index: -1; inset: 0; }
.hero::before { background: linear-gradient(90deg, rgb(20 16 30 / .74), rgb(28 20 35 / .5) 21%, transparent 55%); }
.hero::after { background: linear-gradient(0deg, var(--canvas) 0%, rgb(18 16 27 / .64) 10%, transparent 38%), linear-gradient(180deg, rgb(14 13 23 / .24), transparent 21%); }
.hero-fade, .place-fade { position: absolute; inset: 0; opacity: 0; pointer-events: none; background-repeat: no-repeat; background-size: cover; }
.hero-copy { padding-block: clamp(120px, 15vh, 180px) clamp(94px, 12vh, 158px); }
.hero-sign { position: relative; width: min(29.5vw, 515px); margin-left: -.55%; }
.hero-sign img { width: 100%; }
.hero-sign .night-sign, [data-theme="moonlight"] .hero-sign .day-sign { display: none; }
[data-theme="moonlight"] .hero-sign .night-sign { display: block; }
.hero-line { color: #fff5f1; max-width: 29ch; font-size: clamp(1.06rem, 1.34vw, 1.48rem); line-height: 1.43; margin: clamp(18px, 2.1vw, 32px) 0 0; text-wrap: pretty; text-shadow: 0 2px 12px rgb(0 0 0 / .45); }
.hero-actions, .guide-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px clamp(18px, 2vw, 32px); margin-top: 26px; }
.hero-actions .btn { min-height: 48px; padding: 13px 28px; background: #fff5ed; color: #231b24; font-weight: 680; }
.hero-recruit, .launch-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .99rem; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: .4em; text-decoration-thickness: 1px; }
.hero-recruit { color: #fff6f1; }
.scene-switch { position: absolute; right: max(var(--page-inset), calc((100% - 1640px) / 2)); bottom: clamp(32px, 5vh, 70px); display: flex; gap: 18px; }
.scene-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 2px; color: #e7e4ec; font-size: .93rem; font-weight: 540; border-bottom: 1px solid rgb(255 255 255 / .38); }
.scene-switch button[aria-pressed="true"] { color: white; border-bottom: 2px solid var(--coral); }
.scene-switch button[aria-pressed="true"] .i { color: var(--coral); }
.motion-toggle { display: inline-flex; align-items: center; gap: .4rem; }
.motion-toggle .i:nth-of-type(2), .motion-toggle[aria-pressed="true"] .i:nth-of-type(1) { display: none; }
.motion-toggle[aria-pressed="true"] .i:nth-of-type(2) { display: block; }

/* Role selection */
.roles { padding: clamp(46px, 6vw, 110px) 0 clamp(60px, 8vw, 135px); background: var(--canvas); }
.role-picker { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 18px 36px; margin-bottom: clamp(24px, 3vw, 50px); }
.role-options, .place-tabs { display: flex; align-items: center; gap: 4px clamp(14px, 1.8vw, 34px); flex-wrap: wrap; }
.role-options a, .place-tabs button { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 2px 0; color: var(--muted); font: 540 clamp(.94rem, 1.15vw, 1.07rem)/1.3 var(--sans); text-decoration: none; }
.role-options a:hover, .role-options [aria-selected="true"] { color: var(--title); }
.role-options [aria-selected="true"]::after, .place-tabs [aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 2px; background: var(--coral); }
.role-panel { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(0, 1fr); gap: clamp(24px, 4.8vw, 92px); align-items: center; scroll-margin-top: 40px; }
.role-panel + .role-panel:not([hidden]) { margin-top: 38px; }
.role-panel[role] + .role-panel[role]:not([hidden]) { margin-top: 0; }
.role-picture { width: 100%; height: auto; aspect-ratio: 1.93; object-fit: cover; object-position: 50% 34%; clip-path: polygon(0 0, 100% 0, 93% 100%, 0 100%); }
.role-copy { padding-block: 12px; }
.role-copy h3 { font: 800 clamp(3rem, 4.4vw, 5.7rem)/.98 var(--display); text-transform: uppercase; }
.role-copy > p, .role-detail p { margin: 14px 0; max-width: 44ch; color: var(--muted); }
.role-copy .btn { background: transparent; color: var(--coral); justify-content: flex-start; padding: 0; border-radius: 0; text-decoration: underline; text-underline-offset: .38em; text-decoration-thickness: 1px; min-height: 44px; }
.role-detail { max-width: 49ch; margin-top: 18px; border-top: 1px solid var(--edge); }
.role-detail summary, .loop summary, .guide-entries summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 50px; font-weight: 560; }
.role-detail ul { display: flex; flex-wrap: wrap; gap: 3px 18px; }
.role-detail a { display: inline-flex; align-items: center; min-height: 38px; color: var(--coral); font-size: .96rem; text-underline-offset: .25em; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="paused"]) .role-panel[role]:not([hidden]) .role-copy { animation: role-enter .3s ease-out; }
  @keyframes role-enter { from { opacity: .3; transform: translateX(8px); } }
}

/* Locations atlas */
.places { padding-block: clamp(62px, 7vw, 126px); background: var(--daypaper); color: var(--dayink); }
.place-layout { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 2fr); gap: clamp(24px, 3vw, 55px) clamp(28px, 5vw, 88px); align-items: start; }
.place-pick { grid-column: 1/-1; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px 34px; }
.place-tabs button { color: var(--daysoft); }
.place-tabs [aria-pressed="true"], .place-tabs button:hover { color: var(--dayink); }
.place-tabs [aria-pressed="true"]::after { background: currentColor; }
.place-selected { grid-column: 1/-1; display: grid; grid-template-columns: inherit; grid-template-areas: "note photo"; align-items: center; column-gap: inherit; }
.place-art { grid-area: photo; position: relative; width: 100%; max-width: 1140px; justify-self: end; }
.place-art img { width: 100%; height: auto; }
.place-note { grid-area: note; }
.place-name { font: italic 400 clamp(2.1rem, 3.4vw, 4.3rem)/1.04 Georgia, serif; letter-spacing: -.062em; }
#place-blurb { margin-top: 18px; max-width: 41ch; color: var(--daysoft); }
.place-meta { display: grid; gap: 5px; margin-top: 23px; font-size: .9rem; color: var(--daysoft); }
.place-meta span { font-weight: 650; color: var(--dayink); }
.place-meta a { width: fit-content; text-underline-offset: .3em; }
.places :focus-visible, .guide :focus-visible { outline-color: var(--dayink); }

/* Launch plan */
.launch { background: radial-gradient(ellipse at 9% 15%, var(--chrome), transparent 63%), var(--deep); color: var(--title); padding-block: clamp(70px, 8vw, 144px); }
.launch .wrap { display: grid; grid-template-columns: minmax(0, .81fr) minmax(0, 1.19fr); gap: clamp(38px, 8vw, 140px); align-items: start; }
.launch-intro .lead { margin-top: 24px; color: var(--muted); max-width: 39ch; }
.launch-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 20px; color: var(--coral); }
.stages > li, .economy-plan { padding: 20px 0 26px; border-top: 1px solid var(--edge); }
.stages .tag, .stages .tag.outline { padding: 0; background: transparent; color: var(--coral); box-shadow: none; font-size: .89rem; font-weight: 600; }
.stages h3, .economy-plan h3 { margin: 10px 0; font-size: clamp(1.4rem, 1.9vw, 2.05rem); font-weight: 590; letter-spacing: -.044em; line-height: 1.15; }
.stages p, .economy-plan p, .loop ol { max-width: 66ch; color: var(--muted); }
.economy-plan { padding-bottom: 0; }
.loop { margin-top: 15px; }
.loop summary { justify-content: flex-start; color: var(--coral); }
.loop ol { list-style: decimal; padding-left: 1.3em; margin: 5px 0 16px; }
.loop li + li { margin-top: 7px; }

/* Player guide */
.guide { padding-block: clamp(65px, 8vw, 144px); background: var(--daypaper); color: var(--dayink); }
.guide .wrap { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: clamp(40px, 7vw, 126px); align-items: start; }
.guide-intro .lead { margin-top: 22px; color: var(--daysoft); }
.guide-actions .btn { color: var(--daypaper); background: var(--dayink); min-height: 46px; }
.guide-actions .quiet { color: var(--dayink); background: transparent; box-shadow: none; padding-inline: 0; }
.guide-entries details { border-top: 1px solid var(--dayrule); }
.guide-entries details:last-child { border-bottom: 1px solid var(--dayrule); }
.guide-entries summary { min-height: 72px; padding-block: 12px; font-size: clamp(1.12rem, 1.6vw, 1.5rem); line-height: 1.25; letter-spacing: -.026em; }
.guide-entries p { color: var(--daysoft); max-width: 61ch; padding: 0 28px 18px 0; }
.guide-entries .link { color: var(--dayink); text-decoration-color: currentColor; }
.cover .site-foot { background: var(--deep); padding-block: 38px; }
.cover .site-foot nav { gap: 6px 22px; }
@media (max-width: 1020px) {
  .hero { min-height: clamp(500px, 53vw, 600px); }
  .hero-sign { width: 31vw; }
  .role-picker, .place-pick { display: grid; gap: 16px; }
  .role-panel { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; }
  .role-picture { aspect-ratio: 1.45; }
}
@media (max-width: 759px) {
  .hero { min-height: max(570px, min(87svh, 870px)); align-items: end; }
  .hero-art { inset: 0 0 auto; width: 100%; height: 66%; mask-image: linear-gradient(#000 58%, transparent); }
  .hero-art img { object-position: 94% 24%; }
  .hero::before { background: linear-gradient(0deg, var(--canvas) 4%, rgb(25 20 32 / .45) 28%, transparent 58%); }
  .hero::after { background: linear-gradient(0deg, var(--canvas), transparent 20%), linear-gradient(180deg, rgb(12 12 19 / .42), transparent 20%); }
  .hero-copy { padding-block: 180px 76px; }
  .hero-sign { width: min(67vw, 380px); }
  .hero-line { margin-top: 14px; max-width: 29ch; font-size: 1.05rem; }
  .hero-actions { margin-top: 17px; gap: 8px 18px; }
  .hero-recruit { font-size: .94rem; }
  .hero-actions .btn { min-height: 44px; padding-inline: 21px; }
  .scene-switch { left: var(--page-inset); right: auto; bottom: 12px; }
  .scene-switch button { font-size: .9rem; }
  .role-panel { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .role-picture { aspect-ratio: 1.95; clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%); }
  .role-copy { padding: 0; }
  .role-detail { max-width: none; margin-top: 12px; }
  .role-options, .place-tabs { gap: 0 17px; }
  .place-layout { grid-template-columns: 1fr; gap: 20px; }
  .place-selected { grid-template-columns: 1fr; grid-template-areas: "photo" "note"; gap: 20px; }
  .place-meta { margin-top: 14px; }
  .launch .wrap, .guide .wrap { grid-template-columns: minmax(0, 1fr); }
  .cover .nav-wrap { min-height: 62px; }
  .cover .site-foot .wrap { gap: 12px; }
}
@media (max-width: 380px) { .hero-actions { column-gap: 13px; } .hero-sign { width: 70vw; } }

/* ---------- Brand studio ---------- */
.studio-dialog { width: min(100vw - 32px, 760px); }
.studio-poster { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 8; overflow: hidden; background: var(--night); }
.studio-back { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.72); }
.studio-mark { position: relative; width: min(58%, 340px); max-height: 72%; object-fit: contain; filter: drop-shadow(0 8px 18px rgb(0 0 0 / .45)); }
.studio-mark[data-form="lv"], .studio-mark[data-form="roundel"] { width: min(30%, 170px); }
.studio-dialog .dialog-body { display: grid; gap: 16px; justify-items: start; }
.studio-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: 100%; }
@media (max-width: 640px) { .studio-controls { grid-template-columns: 1fr; } }
