/* Dr. Lune — marketing site. The game's palette (Art Direction v2) on the
   study's night desk; paper objects stay light, as in the app at night. */

@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/static/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/static/fonts/caveat.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --night: #1c1a24;
  --desk: #29242f;
  --moon: #2e3a59;
  --gold: #f2d98b;
  --cream: #f3e9d2;
  --paper: #faf4e6;
  --notebook: #fffdf6;
  --line: #dcc9a5;
  --kraft: #ebcb8b;
  --brick: #b3262d;
  --brick-dark: #8c1d24;
  --brick-light: #e5585e;
  --tweed: #3f6b4f;
  --tweed-dark: #2c4d38;
  --autumn: #d9822b;
  --brown: #6b4a2f;
  --ink: #2b2a28;
  --ink-soft: #4a3f33;
  --muted: #74604b;
  --on-dark: #fff8ea;
  --on-dark-soft: rgba(255, 248, 234, 0.74);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --paper-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.75), 0 4px 10px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--desk) url("/static/app/textures/night.jpg") center top / 780px auto repeat;
  color: var(--on-dark);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--paper); color: var(--ink);
  padding: 10px 16px; border-radius: 10px; font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ type */
.kicker {
  margin: 0 0 12px;
  font: 800 0.8rem/1.2 var(--body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.title {
  margin: 0;
  font: 640 clamp(2rem, 1.2rem + 3.2vw, 3.4rem)/1.05 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.title-xl { font-size: clamp(2.3rem, 1.3rem + 4vw, 4.2rem); }
.lead {
  margin: 18px 0 0;
  max-width: 36em;
  color: var(--on-dark-soft);
  font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.15rem);
  text-wrap: pretty;
}
.hand { font-family: var(--hand); font-weight: 600; }

.section-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.section-head .lead { margin-inline: auto; }

/* ------------------------------------------------------------ buttons */
.btn {
  --bg: var(--paper);
  --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  border: 0;
  border-radius: 16px 20px 15px 19px / 19px 15px 20px 16px;
  background: var(--bg);
  color: var(--fg);
  font: 800 1rem/1.1 var(--body);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 8px 18px -10px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s var(--ease), filter 0.2s;
}
.btn:hover { transform: translateY(-2px) rotate(-0.6deg); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.92rem; }
.btn-brick { --bg: var(--brick); --fg: var(--on-dark); }
.btn-tweed { --bg: var(--tweed); --fg: var(--on-dark); }
.btn-ghost { --bg: transparent; --fg: var(--ink-soft); box-shadow: inset 0 0 0 2px rgba(74, 63, 51, 0.35); }
.btn[disabled] { opacity: 0.55; cursor: default; transform: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 42px; height: 42px; padding: 0 8px;
  border: 0; border-radius: 50%;
  background: rgba(255, 248, 234, 0.08);
  color: var(--on-dark);
  cursor: pointer;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255, 248, 234, 0.16); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ store buttons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 9px 22px 9px 16px;
  border-radius: 14px;
  background: #121016;
  box-shadow: inset 0 0 0 1.5px rgba(255, 248, 234, 0.55), 0 12px 24px -12px rgba(0, 0, 0, 0.8);
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.store:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--gold), 0 16px 28px -12px rgba(0, 0, 0, 0.9); }
.store-logo { width: 26px; height: 28px; flex: none; }
.store-text { display: grid; line-height: 1.1; text-align: left; }
.store-text small { font-size: 0.72rem; font-weight: 700; opacity: 0.85; }
.store-text b { font-size: 1.22rem; font-weight: 800; letter-spacing: -0.01em; }
.store-tag {
  position: absolute; top: -10px; right: -8px;
  padding: 3px 9px;
  border-radius: 7px 9px 7px 10px;
  background: var(--gold); color: var(--ink);
  font: 800 0.68rem/1.2 var(--body);
  letter-spacing: 0.08em; text-transform: uppercase;
  transform: rotate(4deg);
}
/* iPhone visitors: the waitlist comes first. */
.is-ios .store-ios { order: -1; }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.topbar.is-solid {
  background: rgba(28, 26, 36, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 248, 234, 0.08);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.brand span { font: 700 1.35rem/1 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; }
.topnav { display: flex; gap: 6px; margin-left: auto; }
.topnav a {
  padding: 8px 12px; border-radius: 10px;
  color: var(--on-dark-soft); font-weight: 700; font-size: 0.95rem; text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.topnav a:hover { color: var(--on-dark); background: rgba(255, 248, 234, 0.08); }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.topbar-ios { display: none; }
.is-ios .topbar-play { display: none; }
.is-ios .topbar-ios { display: inline-flex; }

.sound-btn .wave { display: none; }
.sound-btn[aria-pressed="true"] .wave { display: inline; }
.sound-btn[aria-pressed="true"] .mute { display: none; }

.lang { position: relative; }
.lang summary { list-style: none; border-radius: 21px; padding: 0 10px; }
.lang summary::-webkit-details-marker { display: none; }
.lang-code { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px);
  display: grid; min-width: 168px; padding: 6px;
  border-radius: 14px;
  background: var(--paper); color: var(--ink);
  box-shadow: var(--paper-shadow);
}
.lang-list a { padding: 9px 12px; border-radius: 9px; font-weight: 700; text-decoration: none; }
.lang-list a:hover { background: rgba(43, 42, 40, 0.07); }
.lang-list a[aria-current] { color: var(--brick); }

@media (max-width: 900px) { .topnav { display: none; } .topbar-tools { margin-left: auto; } }
@media (max-width: 420px) { .brand span { display: none; } }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  background: #141220;
}
.hero-art { position: absolute; inset: 0; z-index: -1; touch-action: pan-y; }
.hero-art picture, .hero-img { width: 100%; height: 100%; }
.hero-img {
  object-fit: cover;
  object-position: var(--hero-x, 62%) var(--hero-y, 50%);
  filter: brightness(0.46) saturate(0.78) contrast(1.04);
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 14, 24, 0.78) 0%, rgba(16, 14, 24, 0.45) 34%, rgba(16, 14, 24, 0) 56%),
    linear-gradient(180deg, rgba(16, 14, 24, 0) 70%, rgba(28, 26, 36, 0.95) 100%);
}
.hero-in {
  width: 100%; max-width: 1320px;
  margin: 0 auto;
  padding: 120px var(--gutter) 150px;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  pointer-events: none;
}
.hero-in > * { pointer-events: auto; max-width: 560px; }
.hero-title {
  margin: 0;
  font: 680 clamp(2.7rem, 1.4rem + 5vw, 5.4rem)/0.98 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  letter-spacing: -0.02em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}
.hero-title span { display: block; }
.hero-title em {
  display: block;
  margin-top: 0.08em;
  font-style: italic;
  font-weight: 560;
  color: var(--gold);
}
.hero-lead { margin: 22px 0 0; font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem); color: var(--on-dark-soft); text-wrap: pretty; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6); }
.hero-facts { margin: 14px 0 0; font-weight: 700; font-size: 0.92rem; color: var(--on-dark-soft); letter-spacing: 0.02em; }

/* The magnifying glass: its glass shows the painting lit and enlarged. */
.lens {
  --frame: clamp(220px, 21vw, 330px);
  position: absolute; left: 0; top: 0;
  width: var(--frame);
  pointer-events: none;
  transform: translate3d(var(--lx, -999px), var(--ly, -999px), 0) rotate(var(--lr, 0deg));
  transform-origin: 32.7% 31.6%;
  opacity: 0;
  transition: opacity 0.4s;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55));
  will-change: transform;
}
.lens.is-on { opacity: 1; }
.lens-frame { width: 100%; height: auto; }
.lens-view {
  position: absolute; z-index: 1;
  left: 32.7%; top: 31.6%;
  width: 44%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 2px rgba(60, 38, 18, 0.55), inset 0 10px 22px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.lens-view::after {
  /* a painted glint on the glass */
  content: "";
  position: absolute; inset: 7%;
  border-radius: 50%;
  border-top: 5px solid rgba(255, 248, 234, 0.32);
  border-left: 2px solid rgba(255, 248, 234, 0.12);
  transform: rotate(-38deg);
  -webkit-mask: linear-gradient(90deg, #000 40%, transparent 75%);
  mask: linear-gradient(90deg, #000 40%, transparent 75%);
}
.has-mouse .hero-art { cursor: none; }

/* What the glass found: a ring around the silhouette and the suspect's card. */
.hero-finds { position: absolute; inset: 0; pointer-events: none; }
.find {
  position: absolute; left: 0; top: 0;
  transform: translate(var(--fx), var(--fy));
}
.find-ring {
  position: absolute; left: -46px; top: -62px;
  width: 92px; height: 124px;
  fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 420; stroke-dashoffset: 420;
  animation: draw 0.7s var(--ease) forwards;
}
.find-tag {
  position: absolute; left: 34px; top: -78px;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 6px;
  background: var(--paper); color: var(--ink);
  box-shadow: var(--paper-shadow);
  white-space: nowrap;
  transform: rotate(-3deg) scale(0.6);
  opacity: 0;
  animation: pop 0.45s 0.25s var(--ease) forwards;
}
.find-tag img { width: 38px; height: 38px; border-radius: 4px; object-fit: cover; }
.find-tag b { display: block; font: 700 1.25rem/1 var(--hand); }
.find-tag small { display: block; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.find.is-left .find-tag { left: auto; right: 34px; transform: rotate(3deg) scale(0.6); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; transform: rotate(-3deg) scale(1); } }
.find.is-left .find-tag { animation-name: pop-left; }
@keyframes pop-left { to { opacity: 1; transform: rotate(3deg) scale(1); } }

.hunt {
  position: absolute; right: var(--gutter); bottom: 34px;
  display: flex; align-items: center; gap: 16px;
  max-width: min(420px, 60vw);
  pointer-events: none;
}
.hunt-note { margin: 0; font: 600 1.35rem/1.1 var(--hand); color: var(--gold); text-align: right; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.hunt-note .when-touch { display: none; }
.has-touch .hunt-note .when-touch { display: inline; }
.has-touch .hunt-note .when-mouse { display: none; }
.hunt-count {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 14, 24, 0.7);
  box-shadow: inset 0 0 0 1.5px rgba(242, 217, 139, 0.5);
  font-weight: 800; font-variant-numeric: tabular-nums;
}
.hunt-count svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; }
.hunt-count b { color: var(--gold); }
.hunt-label { font-weight: 700; font-size: 0.82rem; color: var(--on-dark-soft); }
.hunt.is-done .hunt-label { color: var(--ink); }
.hunt.is-done .hunt-count { background: var(--gold); color: var(--ink); }
.hunt.is-done .hunt-count b { color: var(--ink); }
.hunt.is-done .hunt-count svg { stroke: var(--ink); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px;
  display: grid; justify-items: center;
  transform: translateX(-50%);
  font: 600 1.25rem/1 var(--hand); color: var(--on-dark-soft);
  text-decoration: none;
}
.scroll-cue svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; animation: bob 2.2s ease-in-out infinite; }
.hunt.is-done ~ .scroll-cue { color: var(--gold); }
@keyframes bob { 50% { transform: translateY(5px); } }

/* Tall screens get the tall painting: words over the sky, buttons over the street. */
@media (max-aspect-ratio: 4/5) {
  .hero-img { object-position: 50% 50%; }
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(16, 14, 24, 0.82) 0%, rgba(16, 14, 24, 0.35) 24%, rgba(16, 14, 24, 0) 36%),
      linear-gradient(180deg, rgba(16, 14, 24, 0) 66%, rgba(16, 14, 24, 0.86) 86%, rgba(28, 26, 36, 1) 100%);
  }
  .hero-in { justify-content: space-between; padding: 86px var(--gutter) 64px; gap: 16px; text-align: center; }
  .hero-in > * { max-width: none; }
  .hero-copy { margin: 0 auto; max-width: 560px; }
  .hero-lead { display: none; }
  .hero-act .stores { justify-content: center; }
  .hero-facts { margin-top: 10px; font-size: 0.82rem; }
  .hunt { position: static; flex-direction: column; gap: 8px; margin-top: 14px; max-width: none; }
  .hunt-note { font-size: 1.25rem; text-align: center; }
  .hunt-count { display: none; }
  .scroll-cue { display: none; }
}
@media (max-width: 520px) {
  .store { min-height: 54px; padding: 8px 16px 8px 12px; gap: 10px; }
  .store-text b { font-size: 1.08rem; }
  .hero-act .stores { gap: 10px; }
}

/* ------------------------------------------------------------ reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------------ the case */
.case {
  position: relative;
  overflow-x: clip;
  padding: clamp(80px, 10vw, 140px) 0 clamp(70px, 9vw, 120px);
  background: radial-gradient(ellipse 70% 50% at 50% 38%, rgba(242, 217, 139, 0.09), transparent 70%);
}
.folder {
  position: relative;
  max-width: 1180px;
  margin: clamp(36px, 5vw, 60px) auto 0;
  padding: 0 var(--gutter);
}
.prop { position: absolute; z-index: 2; pointer-events: none; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.5)); transition: opacity 0.6s; }
.prop-cup { width: clamp(120px, 14vw, 190px); right: -30px; top: -64px; transform: rotate(14deg); }
.prop-lens { width: clamp(170px, 19vw, 260px); left: -54px; bottom: -84px; transform: rotate(-18deg); }
.folder.is-open .prop { z-index: 0; }
@media (max-width: 760px) { .prop-cup { right: -36px; top: -54px; } .prop-lens { display: none; } }

.folder-cover {
  position: relative;
  min-height: clamp(420px, 52vw, 600px);
  padding: clamp(28px, 4vw, 56px);
  border-radius: 4px 10px 8px 6px;
  background: var(--kraft) url("/static/app/textures/kraft.jpg") center / cover;
  color: var(--ink);
  box-shadow: var(--paper-shadow);
  transform-origin: 50% 0;
  transform: rotate(-0.8deg);
  transition: transform 0.9s var(--ease), opacity 0.6s 0.25s;
}
.folder-cover::before {
  /* the folder's crease */
  content: "";
  position: absolute; left: 0; right: 0; top: 52px;
  border-top: 1.5px solid rgba(107, 74, 47, 0.25);
}
.folder-tab {
  position: absolute; left: 36px; top: -30px;
  padding: 7px 22px 10px;
  border-radius: 10px 14px 0 0;
  background: var(--kraft) url("/static/app/textures/kraft.jpg") center / 400px;
  font: 700 1.5rem/1 var(--hand);
  color: var(--ink-soft);
}
.folder-confidential {
  position: absolute; right: clamp(20px, 5vw, 64px); top: clamp(64px, 8vw, 92px);
  margin: 0; padding: 6px 14px;
  border: 3px solid var(--brick);
  border-radius: 6px;
  color: var(--brick);
  font: 800 clamp(1rem, 0.8rem + 1vw, 1.5rem)/1 var(--display);
  letter-spacing: 0.16em; text-transform: uppercase;
  transform: rotate(8deg);
  opacity: 0.82;
  mix-blend-mode: multiply;
}
.folder-label { margin-top: clamp(70px, 9vw, 110px); max-width: 30rem; }
.folder-label .hand { margin: 0; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); line-height: 1.05; color: var(--ink); }
.folder-label .hand-sm { margin-top: 8px; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); color: var(--ink-soft); }

.seal {
  position: absolute; right: clamp(24px, 8vw, 120px); bottom: clamp(26px, 5vw, 64px);
  display: grid; justify-items: center; gap: 6px;
  width: clamp(150px, 16vw, 200px);
  padding: 0; border: 0; background: none;
  cursor: pointer;
}
.seal::before {
  content: "";
  display: block;
  width: 100%; aspect-ratio: 640 / 624;
  grid-area: 1 / 1;
}
.seal-half {
  grid-area: 1 / 1;
  width: 100%; aspect-ratio: 640 / 624;
  background: url("/static/app/stamps/moon_seal.webp") center / contain no-repeat;
  filter: drop-shadow(0 6px 6px rgba(60, 20, 10, 0.45));
  transition: transform 0.8s var(--ease), opacity 0.6s 0.2s;
}
.seal-l { clip-path: polygon(0 0, 54% 0, 47% 22%, 56% 41%, 46% 60%, 55% 78%, 48% 100%, 0 100%); }
.seal-r { clip-path: polygon(54% 0, 100% 0, 100% 100%, 48% 100%, 55% 78%, 46% 60%, 56% 41%, 47% 22%); }
.seal-cta {
  font: 700 1.6rem/1 var(--hand); color: var(--brick-dark);
  white-space: nowrap;
}
.seal:hover .seal-half, .seal:focus-visible .seal-half { animation: wobble 0.5s ease-in-out; }
.seal:not(.is-broken) .seal-half { animation: nudge 3.6s 2s ease-in-out infinite; }
@keyframes wobble { 30% { transform: rotate(-6deg) scale(1.04); } 60% { transform: rotate(5deg) scale(1.04); } }
@keyframes nudge { 0%, 88%, 100% { transform: none; } 92% { transform: rotate(-5deg) scale(1.03); } 96% { transform: rotate(4deg) scale(1.03); } }
.seal.is-broken .seal-half { animation: none; opacity: 0; }
.seal.is-broken .seal-l { transform: translate(-40px, 60px) rotate(-38deg); }
.seal.is-broken .seal-r { transform: translate(44px, 70px) rotate(32deg); }
.seal.is-broken .seal-cta { opacity: 0; }

.folder.is-open .folder-cover {
  position: absolute; left: var(--gutter); right: var(--gutter); top: 0;
  transform: perspective(1800px) rotateX(-88deg);
  opacity: 0;
  pointer-events: none;
}

/* The open file: victim, board, statements. */
.dossier {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr) minmax(250px, 320px);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
  padding: clamp(20px, 3vw, 40px);
  border-radius: 6px 10px 8px 6px;
  background: var(--cream) url("/static/app/textures/cream.jpg") center / cover;
  color: var(--ink);
  box-shadow: var(--paper-shadow);
}
.folder.is-open .dossier > * { animation: rise 0.8s var(--ease) both; }
.folder.is-open .dossier > :nth-child(2) { animation-delay: 0.12s; }
.folder.is-open .dossier > :nth-child(3) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.victim-card {
  position: relative;
  padding: 12px 12px 16px;
  background: var(--notebook);
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.2);
  transform: rotate(-2deg);
}
.tape {
  position: absolute; z-index: 2;
  width: 96px; height: 30px;
  background: url("/static/app/tape/tape_2b.webp") center / 100% 100% no-repeat;
  opacity: 0.9;
}
.tape-a { left: 50%; top: -14px; transform: translateX(-50%) rotate(-4deg); }
.victim-photo { position: relative; }
.victim-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: sepia(0.85) saturate(0.7) contrast(0.95); }
.ribbon {
  position: absolute; right: -6px; top: -6px;
  width: 54px; height: 54px;
  background: linear-gradient(135deg, transparent 0 38%, #1d1b1f 38% 62%, transparent 62%);
}
.victim-kicker { margin: 12px 0 0; font: 800 0.72rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brick); }
.victim-name { margin: 6px 0 0; font: 650 1.45rem/1.1 var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; }
.victim-line { margin: 4px 0 0; font-size: 0.92rem; color: var(--muted); }

.rules { margin-top: 22px; }
.rules-title, .statements-title {
  margin: 0 0 8px;
  font: 800 0.72rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.rules ol { margin: 0; padding-left: 1.2em; font-size: 0.92rem; line-height: 1.45; color: var(--ink-soft); }
.rules li + li { margin-top: 6px; }
.rules li::marker { font: 700 1.1rem var(--hand); color: var(--brick); }

/* The plan, on graph paper. */
.dossier-board { display: grid; gap: 14px; justify-items: center; }
.board-paper {
  position: relative;
  width: min(100%, 470px);
  padding: 14px;
  background:
    linear-gradient(rgba(74, 110, 140, 0.13) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, rgba(74, 110, 140, 0.13) 1px, transparent 1px) 0 0 / 12px 12px,
    var(--notebook);
  box-shadow: 0 14px 26px -14px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.18);
  transform: rotate(0.6deg);
}
.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  gap: 0;
}
.cell {
  position: relative;
  display: grid; place-items: center;
  padding: 0; border: 0;
  background: var(--floor) calc(var(--c) * 100% / 3) calc(var(--r) * 100% / 3) / 400% 400%;
  box-shadow: inset -1px -1px 0 rgba(43, 42, 40, 0.28);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.cell.wall-r { box-shadow: inset -4px 0 0 var(--ink), inset 0 -1px 0 rgba(43, 42, 40, 0.28); }
.cell.wall-b { box-shadow: inset 0 -4px 0 var(--ink), inset -1px 0 0 rgba(43, 42, 40, 0.28); }
.cell.wall-r.wall-b { box-shadow: inset -4px 0 0 var(--ink), inset 0 -4px 0 var(--ink); }
.cell:hover::after, .cell.is-target::after {
  content: "";
  position: absolute; inset: 4px;
  border-radius: 6px;
  background: rgba(62, 79, 114, 0.18);
  box-shadow: inset 0 0 0 2px rgba(62, 79, 114, 0.55);
}
.cell.is-target::after { background: rgba(217, 130, 43, 0.22); box-shadow: inset 0 0 0 3px var(--autumn); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.cell.in-victim-room::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(179, 38, 45, 0.16);
}

.furniture {
  position: absolute; left: 0; top: 0;
  width: calc(var(--span, 1) * 25%); height: 25%;
  display: grid; place-items: center;
  pointer-events: none;
  transform: translate(calc(var(--c) * 100% / var(--span, 1)), calc(var(--r) * 100%));
}
.furniture img { width: 82%; height: 82%; object-fit: contain; transform: rotate(var(--rot, 0deg)); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); }
.furniture.is-wide img { width: 92%; }
.room-label {
  position: absolute; z-index: 2;
  left: calc(var(--c) * 25% + 4px); top: calc(var(--r) * 25% + 4px);
  padding: 1px 7px 2px;
  border-radius: 3px;
  background: var(--notebook);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font: 700 clamp(0.9rem, 0.7rem + 0.6vw, 1.1rem)/1.1 var(--hand);
  color: var(--ink);
  transform: rotate(-3deg);
  pointer-events: none;
}

.token {
  position: relative; z-index: 3;
  width: 72%; aspect-ratio: 1;
  border-radius: 6px;
  background: var(--notebook);
  padding: 3px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transform: rotate(var(--tilt, -3deg));
  animation: drop 0.35s var(--ease);
  pointer-events: none;
}
.token img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.token-badge {
  position: absolute; right: -7px; bottom: -7px;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--swatch);
  color: #fff8ea;
  font: 800 0.78rem/1 var(--body);
  box-shadow: 0 0 0 2px var(--notebook);
}
.token.is-victim img { filter: sepia(0.85) saturate(0.7); }
.token.is-victim .token-badge { background: #8a8478; }
.token.is-clash { animation: shake 0.45s ease-in-out; box-shadow: 0 0 0 3px var(--brick), 0 4px 8px rgba(0, 0, 0, 0.4); }
.token.is-killer::after {
  content: "";
  position: absolute; inset: -14px;
  border: 3px solid var(--brick);
  border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  transform: rotate(-8deg);
  animation: ring 0.6s var(--ease) both;
}
@keyframes ring { from { opacity: 0; transform: rotate(-30deg) scale(1.4); } }
@keyframes drop { from { transform: translateY(-14px) rotate(var(--tilt, -3deg)) scale(1.15); opacity: 0; } }
@keyframes shake { 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }

.cross { width: 54%; height: 54%; fill: none; stroke: var(--brick); stroke-width: 7; stroke-linecap: round; pointer-events: none; }
.cross path { stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 0.25s ease-out forwards; }
.cross path + path { animation-delay: 0.12s; }

.board-stamp {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  padding: 8px 18px;
  border: 5px double var(--brick);
  border-radius: 8px;
  color: var(--brick);
  background: rgba(255, 253, 246, 0.6);
  font: 800 clamp(1.4rem, 1rem + 2vw, 2.4rem)/1 var(--display);
  letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-12deg) scale(2.4);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.board-stamp.is-on { animation: stamp 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
@keyframes stamp { to { opacity: 0.9; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }

/* The people to place. */
.tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.card {
  position: relative;
  width: 78px;
  padding: 4px 4px 0;
  border: 0; border-radius: 6px;
  background: var(--notebook);
  box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, opacity 0.2s;
  touch-action: manipulation;
}
.card:nth-child(odd) { transform: rotate(-2deg); }
.card:nth-child(even) { transform: rotate(1.5deg); }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.card span { display: block; padding: 4px 0 2px; font: 800 0.8rem/1.1 var(--body); color: var(--ink); }
.card::after { content: ""; display: block; height: 5px; margin: 0 -4px; border-radius: 0 0 6px 6px; background: var(--swatch); }
.card.is-victim img { filter: sepia(0.85) saturate(0.7); }
.card.is-victim span { color: var(--brick); }
.card:hover { transform: translateY(-4px) rotate(0deg); }
.card[aria-pressed="true"] { transform: translateY(-10px) rotate(0deg); box-shadow: 0 0 0 3px var(--brick), 0 14px 22px -10px rgba(0, 0, 0, 0.6); }
.card.is-placed { opacity: 0.55; }
.card.is-placed::before {
  content: "✓";
  position: absolute; right: -6px; top: -6px; z-index: 2;
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--tweed); color: #fff8ea;
  font: 800 0.8rem/1 var(--body);
}
.clue-now {
  display: none;
  width: min(100%, 470px);
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--brick);
  background: var(--notebook);
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.5);
  font-weight: 700; font-size: 0.98rem; line-height: 1.4;
}
.clue-now small { display: block; font: 800 0.7rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

mark { background: rgba(217, 130, 43, 0.22); color: inherit; padding: 0 2px; border-radius: 3px; box-shadow: inset 0 -2px 0 rgba(217, 130, 43, 0.6); }

/* Statements and Dr. Lune. */
.statements ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.statement {
  display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.7);
  box-shadow: inset 0 0 0 1px rgba(107, 74, 47, 0.14);
  transition: background 0.2s, box-shadow 0.2s;
}
.statement img { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; }
.statement b { display: block; font: 800 0.86rem/1.2 var(--body); }
.statement b small { font-weight: 700; color: var(--muted); }
.statement p { margin: 2px 0 0; font-size: 0.92rem; line-height: 1.4; color: var(--ink-soft); }
.statement.is-victim img { filter: sepia(0.85) saturate(0.7); }
.statement.is-on { background: var(--notebook); box-shadow: inset 4px 0 0 var(--brick), 0 6px 14px -8px rgba(0, 0, 0, 0.45); }
.statement.is-done p { color: var(--muted); }

.lune-says { margin-top: 18px; display: grid; grid-template-columns: 56px 1fr; gap: 10px; }
.lune-face { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; box-shadow: 0 0 0 3px var(--notebook), 0 4px 10px rgba(0, 0, 0, 0.35); }
.bubble {
  position: relative;
  padding: 12px 14px;
  border-radius: 4px 14px 14px 14px;
  background: var(--notebook);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(107, 74, 47, 0.12);
}
.bubble p { margin: 0; font-weight: 700; font-size: 0.96rem; line-height: 1.45; }
.bubble.is-new { animation: nudge-in 0.35s var(--ease); }
@keyframes nudge-in { from { transform: translateY(4px); opacity: 0.4; } }
.bubble.is-bad { box-shadow: inset 4px 0 0 var(--brick), 0 8px 18px -10px rgba(0, 0, 0, 0.55); }
.bubble.is-good { box-shadow: inset 4px 0 0 var(--tweed), 0 8px 18px -10px rgba(0, 0, 0, 0.55); }
.lune-tools { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; }
.accuse { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.accuse button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 0; border-radius: 8px;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px rgba(179, 38, 45, 0.4);
  font-weight: 800; font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.accuse button:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 2px var(--brick); }
.accuse img { width: 34px; height: 34px; border-radius: 5px; object-fit: cover; }

.solved {
  max-width: 760px;
  margin: 36px auto 0;
  text-align: center;
  display: grid; justify-items: center; gap: 6px;
  animation: rise 0.8s var(--ease) both;
}
.solved .kicker { margin: 0; }
.solved-title {
  margin: 0;
  font: 680 clamp(2.4rem, 1.4rem + 4vw, 4rem)/1 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  color: var(--gold);
}
.solved-lead { margin: 6px 0 16px; color: var(--on-dark-soft); font-size: 1.1rem; }
.solved .stores { justify-content: center; }

@media (max-width: 1020px) {
  .dossier { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); }
  .dossier-left { grid-column: 1 / -1; display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; }
  .rules { margin-top: 0; }
}
@media (max-width: 720px) {
  .folder-cover { min-height: 460px; }
  .seal { left: 50%; right: auto; transform: translateX(-50%); bottom: 28px; }
  .folder-confidential { top: 66px; right: 16px; font-size: 0.95rem; }
  .folder-label { margin-top: 96px; }
  .dossier { grid-template-columns: minmax(0, 1fr); padding: 16px 12px 20px; }
  .dossier-left { grid-template-columns: 112px 1fr; gap: 16px; }
  .victim-card { padding: 8px 8px 10px; }
  .victim-name { font-size: 1.1rem; }
  .victim-kicker { margin-top: 8px; font-size: 0.62rem; }
  .victim-line { font-size: 0.8rem; }
  .rules ol { font-size: 0.86rem; }
  .board-paper { padding: 8px; }
  .clue-now { display: block; }
  .card { width: 70px; }
  .statements { display: none; }
  .lune-says { margin-top: 0; }
}

/* ------------------------------------------------------------ suspects */
.suspects { padding: clamp(70px, 9vw, 130px) 0; overflow: hidden; }
.lineup { margin-top: clamp(36px, 5vw, 56px); display: grid; gap: 22px; }
.lineup-row { display: flex; width: max-content; }
.lineup-track { display: flex; gap: 22px; padding-right: 22px; animation: marquee var(--speed, 70s) linear infinite; }
.lineup-rev .lineup-track { animation-direction: reverse; --speed: 80s; }
.lineup:hover .lineup-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .lineup-track { animation: none; }
  .lineup-row { width: auto; overflow-x: auto; }
}
.mug {
  flex: none;
  width: clamp(150px, 15vw, 190px);
  margin: 10px 0;
  padding: 8px 8px 12px;
  background: var(--notebook);
  color: var(--ink);
  box-shadow: 0 16px 26px -14px rgba(0, 0, 0, 0.75), 0 2px 4px rgba(0, 0, 0, 0.25);
  transform: rotate(var(--tilt));
  transition: transform 0.35s var(--ease);
}
.mug:hover { transform: rotate(0deg) translateY(-6px) scale(1.04); }
.mug img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.mug figcaption { padding: 8px 2px 0; display: grid; gap: 1px; }
.mug b { font: 700 1.6rem/1 var(--hand); }
.mug span { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.mug small { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mug small::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--swatch); }

/* ------------------------------------------------------------ Dr. Lune */
.lune { padding: clamp(60px, 8vw, 120px) 0; }
.lune-in {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 90px); align-items: center;
}
.lune-art {
  position: relative; margin: 0;
  padding: 14px;
  background: var(--cream);
  box-shadow: var(--paper-shadow);
  transform: rotate(-2.5deg);
}
.lune-art img { width: 100%; height: auto; }
.tape-b { right: 18px; top: -12px; transform: rotate(6deg); }
.notebook {
  margin-top: 28px;
  padding: 18px 22px 20px 42px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 28px, rgba(179, 38, 45, 0.35) 28px 30px, transparent 30px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(74, 110, 140, 0.22) 31px 32px),
    var(--notebook);
  color: var(--ink);
  box-shadow: var(--paper-shadow);
  transform: rotate(0.8deg);
}
.notebook-title { margin: 0 0 4px; font: 800 0.72rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.notebook-line { margin: 0; min-height: 4.2em; font: 600 1.6rem/1.3 var(--hand); }
.notebook-line::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.12em; background: var(--ink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.ticks { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 34px; font-weight: 700; color: var(--on-dark-soft); }
.ticks li::before {
  content: "";
  position: absolute; left: 2px; top: 3px;
  width: 20px; height: 20px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 13.5l5 5L20.5 5' fill='none' stroke='%23F2D98B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (max-width: 820px) {
  .lune-in { grid-template-columns: minmax(0, 1fr); }
  .lune-art { max-width: 360px; justify-self: center; }
  .notebook-line { font-size: 1.4rem; }
}

/* ------------------------------------------------------------ cities */
.cities { padding: clamp(60px, 8vw, 120px) 0; }
.postcards {
  max-width: 1160px;
  margin: clamp(40px, 5vw, 64px) auto 0; padding: 0 var(--gutter);
  list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px);
}
.postcard { --rot: calc((var(--i) - 1.5) * 2.6deg); text-align: center; }
.postcard-face {
  position: relative;
  padding: 8px;
  background: var(--notebook);
  box-shadow: 0 22px 34px -18px rgba(0, 0, 0, 0.8), 0 2px 5px rgba(0, 0, 0, 0.3);
  transform: rotate(var(--rot));
  transition: transform 0.4s var(--ease);
}
.postcard:hover .postcard-face { transform: rotate(0deg) translateY(-10px) scale(1.03); }
.postcard-face img { width: 100%; aspect-ratio: 780 / 1100; object-fit: cover; object-position: 50% 30%; }
.postcard-stamp {
  position: absolute; right: 16px; top: 16px;
  width: 54px; height: 64px;
  background: var(--brick) url("/static/app/stamps/moon_seal.webp") center / 70% no-repeat;
  --perf: radial-gradient(circle at 4px 4px, transparent 3px, #000 3.5px) -4px -4px / 9px 9px;
  -webkit-mask: var(--perf); mask: var(--perf);
  box-shadow: inset 0 0 0 4px var(--paper);
  transform: rotate(6deg);
  filter: saturate(0.9);
}
.postcard-tag {
  position: absolute; left: 50%; bottom: 20px;
  padding: 5px 14px;
  border-radius: 6px;
  background: var(--paper); color: var(--ink);
  font: 800 0.78rem/1.2 var(--body); letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%) rotate(-3deg);
  white-space: nowrap;
}
.postcard-tag.is-free { background: var(--tweed); color: var(--on-dark); }
.postcard-name { margin: 22px 0 0; font: 650 1.7rem/1 var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72; }
.postcard-count { margin: 6px 0 0; font: 600 1.3rem/1 var(--hand); color: var(--gold); }
@media (max-width: 820px) {
  .postcards {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(64vw, 260px);
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-top: 14px; padding-bottom: 20px;
    scrollbar-width: none;
  }
  .postcards::-webkit-scrollbar { display: none; }
  .postcard { scroll-snap-align: center; }
}

/* ------------------------------------------------------------ promises */
.promises { padding: clamp(30px, 5vw, 70px) 0 clamp(60px, 8vw, 110px); }
.promise-list {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 28px);
}
.promise {
  display: grid; gap: 8px; align-content: start;
  padding: 24px 22px;
  border-radius: 14px;
  background: rgba(255, 248, 234, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 234, 0.1);
}
.promise svg { width: 44px; height: 44px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.promise b { font: 650 1.3rem/1.15 var(--display); font-variation-settings: "SOFT" 100, "opsz" 72; }
.promise span { color: var(--on-dark-soft); font-size: 0.95rem; line-height: 1.5; }
@media (max-width: 900px) { .promise-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .promise { padding: 18px 16px; } .promise b { font-size: 1.12rem; } }

/* ------------------------------------------------------------ finale */
.finale { padding: clamp(40px, 6vw, 90px) 0 clamp(80px, 10vw, 140px); }
.finale-in {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 90px); align-items: center;
}
.finale-art { margin: 0; padding: 10px; background: var(--notebook); box-shadow: var(--paper-shadow); transform: rotate(2deg); }
.finale-art img { width: 100%; height: auto; }
.finale-copy .stores { margin-top: 30px; }
.finale-take { display: inline-block; margin: 22px 0 0; font-size: 1.8rem; color: var(--gold); text-decoration: none; transform: rotate(-2deg); transform-origin: left; }
.finale-take:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 820px) {
  .finale-in { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .finale-art { max-width: 320px; justify-self: center; }
  .finale-copy .lead { margin-inline: auto; }
  .finale-copy .stores { justify-content: center; }
  .finale-take { transform-origin: center; }
}

/* ------------------------------------------------------------ footer */
.footer { padding: 50px 0 calc(40px + env(safe-area-inset-bottom)); background: rgba(12, 11, 16, 0.6); box-shadow: 0 -1px 0 rgba(255, 248, 234, 0.08); }
.footer-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; justify-items: center; gap: 14px; text-align: center; }
.brand-footer img { width: 48px; height: 48px; }
.footer-line { margin: 0; font: 600 1.35rem/1.2 var(--hand); color: var(--gold); }
.footer-links, .footer-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-links a, .footer-langs a { color: var(--on-dark-soft); font-weight: 700; font-size: 0.92rem; text-decoration: none; }
.footer-links a:hover, .footer-langs a:hover { color: var(--on-dark); text-decoration: underline; }
.footer-langs a[aria-current] { color: var(--gold); }
.footer-fine { margin: 6px 0 0; font-size: 0.8rem; color: rgba(255, 248, 234, 0.45); }

/* ------------------------------------------------------------ iPhone waitlist */
.waitlist {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  padding: 110px var(--gutter) 80px;
  display: grid; place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 45% at 62% 40%, rgba(242, 217, 139, 0.1), transparent 70%);
}
.waitlist-in {
  width: 100%; max-width: 1100px;
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 70px); align-items: center;
}
.waitlist-lune { position: relative; margin: 0; justify-self: center; width: min(100%, 400px); }
.waitlist-lune img { width: 100%; height: auto; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.55)); }
.letter {
  position: relative;
  padding: clamp(26px, 4vw, 46px);
  border-radius: 4px 8px 6px 5px;
  background: var(--paper) url("/static/app/textures/paper.jpg") center / cover;
  color: var(--ink);
  box-shadow: var(--paper-shadow);
  transform: rotate(-0.8deg);
}
.letter .kicker { color: var(--brick); }
.letter-title {
  margin: 0;
  font: 680 clamp(2rem, 1.3rem + 2.6vw, 3.2rem)/1.02 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  text-wrap: balance;
}
.letter-title em { font-style: italic; color: var(--brick); }
.letter-lead { margin: 16px 0 0; font-size: 1.06rem; color: var(--ink-soft); }
.waitlist-form { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.field {
  flex: 1 1 240px;
  min-height: 52px; padding: 12px 16px;
  border: 0; border-radius: 12px;
  background: var(--notebook);
  box-shadow: inset 0 0 0 2px rgba(107, 74, 47, 0.3);
  color: var(--ink);
  font: 700 1.05rem var(--body);
}
.field::placeholder { color: rgba(116, 96, 75, 0.7); }
.field:focus { outline: none; box-shadow: inset 0 0 0 2.5px var(--brick); }
.field[aria-invalid="true"] { box-shadow: inset 0 0 0 2.5px var(--brick); }
.waitlist-form .btn { min-height: 52px; }
.field-error { min-height: 1.4em; margin: 8px 0 0; color: var(--brick); font-weight: 800; font-size: 0.92rem; }
.fine { margin: 6px 0 0; font-size: 0.84rem; color: var(--muted); }
.fine a { color: var(--ink-soft); }
.letter-done { display: none; }
.letter-done .letter-title { color: var(--tweed-dark); }
.letter-seal {
  position: absolute; right: clamp(18px, 4vw, 40px); bottom: -34px;
  width: 110px; aspect-ratio: 640 / 624;
  background: url("/static/app/stamps/moon_seal.webp") center / contain no-repeat;
  filter: drop-shadow(0 6px 8px rgba(60, 20, 10, 0.45));
  opacity: 0;
  transform: scale(2.6) rotate(-20deg);
  pointer-events: none;
}
.waitlist.is-done .letter-form { display: none; }
.waitlist.is-done .letter-done { display: block; animation: rise 0.6s var(--ease) both; }
.waitlist.is-done .letter-seal { animation: seal-down 0.5s 0.1s cubic-bezier(0.3, 1.5, 0.5, 1) forwards; }
@keyframes seal-down { to { opacity: 1; transform: scale(1) rotate(-8deg); } }

.meanwhile { grid-column: 1 / -1; margin-top: 20px; }
.meanwhile-title { margin: 0 0 14px; text-align: center; font: 600 1.6rem/1 var(--hand); color: var(--gold); }
.meanwhile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 760px; margin: 0 auto; }
.mean-card {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 248, 234, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 234, 0.12);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s var(--ease);
}
.mean-card:hover { background: rgba(255, 248, 234, 0.11); transform: translateY(-2px); }
.mean-card img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.mean-card strong { display: block; font: 650 1.15rem/1.2 var(--display); }
.mean-card span span { color: var(--on-dark-soft); font-size: 0.92rem; }
.back-link { display: block; margin-top: 18px; text-align: center; color: var(--on-dark-soft); font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--on-dark); }
@media (max-width: 820px) {
  .waitlist { padding-top: 90px; }
  .waitlist-in { grid-template-columns: minmax(0, 1fr); }
  .waitlist-lune { width: min(56vw, 240px); margin-bottom: -40px; z-index: 1; }
  .meanwhile-grid { grid-template-columns: minmax(0, 1fr); }
}
