/* ==========================================================================
   wishandkyola.lol — main.css
   --------------------------------------------------------------------------
   Mobile first (360 / 390 / 412 / 430), then up.
   One design language, two moods: NIGHT sections and WARM sections.
   Body[data-phase] drives the ambient colour as the story moves:
     game → night → us → someday → kyo
   Every component reads its colour from CSS variables, so a section can
   switch mood by overriding four variables and nothing else.
   ========================================================================== */

:root {
  /* palette ------------------------------------------------ */
  --night-0: #06050d;
  --night-1: #0b0a17;
  --night-2: #141024;
  --lav: #cbb9ff;
  --lav-2: #a68cff;
  --cream: #fff7ea;
  --cream-2: #f8ecda;
  --pink: #ffd9e3;
  --rose: #ff9db5;
  --ember: #ff5a3c;
  --ember-2: #7d2418;
  --ink: #221d33;

  /* fonts — system only, nothing downloaded ----------------- */
  --font-ui: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display",
             "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --font-hand: "Segoe Script", "Bradley Hand", "Snell Roundhand", ui-rounded, cursive;

  /* rhythm ------------------------------------------------- */
  --pad: clamp(20px, 6vw, 34px);
  --maxw: 34rem;
  --radius: 18px;
  --radius-sm: 12px;

  /* ambient ------------------------------------------------ */
  --bg: #06050d;
  --glow-c: rgba(255, 90, 60, 0.16);
  --glow-o: 1;
  --stars: 0.55;

  /* foreground (dark by default) --------------------------- */
  --fg: #f4f1ff;
  --fg-2: rgba(244, 241, 255, 0.78);
  --fg-3: rgba(244, 241, 255, 0.62);
  --card: rgba(255, 255, 255, 0.05);
  --card-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.14);
  --accent: var(--lav-2);

  /* status colours — overridden per mood, because a pale green or a
     pale rose is invisible on a cream section */
  --good: #7fd6a8;
  --bad: var(--rose);
}

/* ---- the ambient story ------------------------------------ */
body[data-phase="game"]  { --bg: #07060e; --glow-c: rgba(255, 90, 60, 0.17);  --stars: 0.5; }
body[data-phase="night"] { --bg: #05060f; --glow-c: rgba(120, 110, 255, 0.15); --stars: 1; }
body[data-phase="us"]    { --bg: #f5effc; --glow-c: rgba(198, 168, 255, 0.55); --stars: 0;
                           --fg: #221d33; --fg-2: rgba(34, 29, 51, 0.78); --fg-3: rgba(34, 29, 51, 0.66);
                           --card: rgba(255, 255, 255, 0.66); --card-2: rgba(255, 255, 255, 0.85);
                           --line: rgba(34, 29, 51, 0.12); --accent: #5b3fd0; --good: #1f7a52; --bad: #c02a5c }
body[data-phase="someday"] { --bg: #fff5e9; --glow-c: rgba(255, 206, 168, 0.62); --stars: 0;
                           --fg: #2a2130; --fg-2: rgba(42, 33, 48, 0.78); --fg-3: rgba(42, 33, 48, 0.66);
                           --card: rgba(255, 255, 255, 0.60); --card-2: rgba(255, 255, 255, 0.82);
                           --line: rgba(42, 33, 48, 0.12); --accent: #b8447a; --good: #1f7a52; --bad: #c02a5c }
body[data-phase="kyo"]   { --bg: #fff2f5; --glow-c: rgba(255, 186, 205, 0.55); --stars: 0;
                           --fg: #2b1f2a; --fg-2: rgba(43, 31, 42, 0.78); --fg-3: rgba(43, 31, 42, 0.66);
                           --card: rgba(255, 255, 255, 0.62); --card-2: rgba(255, 255, 255, 0.84);
                           --line: rgba(43, 31, 42, 0.11); --accent: #c0417a; --good: #1f7a52; --bad: #c02a5c }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: 0.005em;
  min-height: 100dvh;
  transition: background-color 1100ms ease, color 1100ms ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

[hidden] { display: none !important; }

p { margin: 0 0 0.9em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--lav-2); color: #fff; }

/* ---- ambient layers -------------------------------------- */
#glow, #stars {
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

#glow {
  left: 50%;
  top: -30vmax;
  width: 130vmax;
  height: 130vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  background-color: var(--glow-c);
  filter: blur(70px);
  opacity: var(--glow-o);
  transition: background-color 1100ms ease, opacity 1100ms ease;
}

#stars {
  inset: 0;
  opacity: var(--stars);
  transition: opacity 1100ms ease;
}

.star {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--tw, 3.6s) ease-in-out infinite;
  animation-delay: var(--dl, 0s);
}

#fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}

/* ---- the gate -------------------------------------------- */
#gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(var(--pad), env(safe-area-inset-top)) var(--pad) max(var(--pad), env(safe-area-inset-bottom));
  background-color: var(--bg);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.4, 0, 0.2, 1);
}

#gate.is-gone {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.gate__inner {
  width: 100%;
  max-width: 26rem;
  text-align: center;
}

.gate__kicker {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 15vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 1.4rem;
}

.gate__line {
  font-size: 1.02rem;
  color: var(--fg-2);
  margin: 0 0 1.7rem;
}

.gate__heart {
  display: block;
  font-size: 1.6rem;
  margin: 0 0 1.5rem;
  animation: breathe 4s ease-in-out infinite;
}

/* the one button on the first screen has to look like the way in.
   A translucent grey pill on black reads as a disabled control —
   so it gets a solid, warm-white fill with dark ink, and a soft halo. */
#gate .btn--heart {
  min-height: 56px;
  padding: 0.95rem 2.1rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #14102a;
  border-color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(180deg, #fdfdff 0%, #dfe5fa 100%);
  box-shadow:
    0 12px 44px rgba(178, 200, 255, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#gate .btn--heart:active {
  transform: scale(0.96);
  box-shadow: 0 6px 24px rgba(178, 200, 255, 0.22);
}

.gate__names {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 8.5vw, 2.3rem);
  letter-spacing: 0.06em;
  margin: 0 0 1.1rem;
  text-transform: uppercase;
}

.gate__sub {
  font-size: 0.98rem;
  color: var(--fg-2);
  margin: 0 0 0.5rem;
}

.gate__sub--tiny { font-size: 0.86rem; color: var(--fg-3); }

.gate__colon {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
  margin-top: 1.1rem;
}

.gate__duo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.8rem 0 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}

.gate__duo b { color: var(--fg); font-weight: 600; }

#gate2 { animation: rise 900ms cubic-bezier(0.2, 0.7, 0.3, 1) both; }

/* ---- buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--fg);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, background-color 200ms ease, border-color 200ms ease, opacity 200ms ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn:active { transform: scale(0.97); }

.btn--heart {
  border-color: rgba(255, 255, 255, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
}

.btn--quiet {
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  font-size: 0.9rem;
  background: transparent;
  color: var(--fg-2);
}

.btn--system {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 10px;
  min-height: 44px;
  padding: 0.6rem 1rem;
}

.btn.is-only { animation: breathe 3s ease-in-out infinite; }

/* ---- layout ---------------------------------------------- */
#world { position: relative; z-index: 1; }

.sec {
  position: relative;
  padding: clamp(3.4rem, 14vw, 6.5rem) var(--pad);
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
  scroll-margin-top: 1rem;
}

/* the seam between two moods: sun on one side, moon on the other */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0 var(--pad) 0;
  font-size: 0.62rem;
  color: var(--fg-3);
  opacity: 0.5;
}

.divider::before, .divider::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 8rem;
  background: linear-gradient(90deg, transparent, currentColor);
}

.divider::after { background: linear-gradient(90deg, currentColor, transparent); }

/* inline sun / moon marks in prose */
.sym { font-style: normal; }
.sym--sun { color: #ffb347; }
.sym--moon { color: #cfd9f5; }

.sec__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.sec--full {
  min-height: 100dvh;
  display: grid;
  align-content: center;
}

.sec--tight { padding-top: clamp(2.2rem, 9vw, 3.6rem); padding-bottom: clamp(2.2rem, 9vw, 3.6rem); }

/* a section that reads as NIGHT no matter what phase we're in */
.sec--night {
  --fg: #f4f1ff;
  --fg-2: rgba(244, 241, 255, 0.78);
  --fg-3: rgba(244, 241, 255, 0.62);
  --card: rgba(255, 255, 255, 0.055);
  --card-2: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.13);
  --accent: var(--lav);
  background: #07060f;
  color: var(--fg);
}

/* a section that reads WARM */
.sec--warm {
  --fg: #2a2130;
  --fg-2: rgba(42, 33, 48, 0.78);
  --fg-3: rgba(42, 33, 48, 0.66);
  --card: rgba(255, 255, 255, 0.62);
  --card-2: rgba(255, 255, 255, 0.86);
  --line: rgba(42, 33, 48, 0.10);
  --accent: #b8447a;
  --good: #1f7a52;
  --bad: #c02a5c;
  background: #fff7ec;
  color: var(--fg);
}

.sec--dawn {
  --fg: #2b1f2a;
  --fg-2: rgba(43, 31, 42, 0.78);
  --fg-3: rgba(43, 31, 42, 0.66);
  --card: rgba(255, 255, 255, 0.60);
  --card-2: rgba(255, 255, 255, 0.84);
  --line: rgba(43, 31, 42, 0.10);
  --accent: #c0417a;
  --good: #1f7a52;
  --bad: #c02a5c;
  background-color: #fff5f7;
  background-image: linear-gradient(180deg, #fff2f5 0%, #fff8f1 100%);
  color: var(--fg);
}

/* ---- type ------------------------------------------------ */
.h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.32rem, 5.6vw, 1.72rem);
  line-height: 1.24;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
}

.sub {
  font-size: 0.86rem;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 1.4rem;
}

.caption {
  font-size: 0.84rem;
  color: var(--fg-3);
  margin-top: 1.2rem;
}

.lead {
  font-size: 1.06rem;
  color: var(--fg-2);
}

.quiet {
  font-family: var(--font-serif);
  font-size: clamp(1.18rem, 5vw, 1.5rem);
  line-height: 1.42;
  margin: 0 0 1.1rem;
}

.whisper {
  font-size: 0.88rem;
  color: var(--fg-3);
}

.big-line {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 7vw, 2rem);
  line-height: 1.2;
  margin: 0 0 0.6rem;
}

.small-line { font-size: 0.98rem; color: var(--fg-2); margin: 0 0 0.4rem; }
.tiny-line { font-family: var(--font-mono); font-size: 0.76rem; color: var(--fg-3); margin: 0; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.hand {
  font-family: var(--font-hand);
  font-size: 0.95rem;
  color: var(--fg-3);
  transform: rotate(-1.6deg);
  display: inline-block;
}

.emoji { margin-left: 0.3rem; }

/* ---- reveal ---------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms cubic-bezier(0.2, 0.7, 0.3, 1), transform 800ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.is-in { opacity: 1; transform: none; }

.resting.is-resting * { animation-play-state: paused !important; }

/* ---- the little wish-note --------------------------------- */
.wish-note {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: var(--font-hand);
  font-size: 0.92rem;
  color: var(--fg-3);
  transform: rotate(-1.6deg);
}

/* ---- the progress rail ----------------------------------- */
#rail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 10px);
  z-index: 40;
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  transition: opacity 400ms ease;
}

#rail.is-muted { opacity: 0; pointer-events: none; }

.rail__btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 0.55rem 0.42rem;
  min-height: 44px;
  min-width: 44px;
  color: var(--fg-3);
  transition: color 300ms ease, transform 300ms ease;
}

.rail__btn.is-current {
  color: var(--fg);
  transform: translateY(-2px);
}

.rail__btn.is-current::after {
  content: "•";
  display: block;
  font-size: 0.5rem;
  line-height: 0;
  margin-top: 3px;
}

/* ---- notifications --------------------------------------- */
#notifs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 52px);
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
  pointer-events: none;
}

.notif {
  width: 100%;
  max-width: 22rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(14, 12, 24, 0.82);
  color: #f2efff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-line;
  text-align: center;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 380ms cubic-bezier(0.2, 0.7, 0.3, 1), opacity 380ms ease;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  order: 5;
}

.notif.is-in { transform: none; opacity: 1; }

.notif__head {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 0.4rem;
}

.notif--soft { font-family: var(--font-serif); font-size: 0.95rem; background: rgba(255, 247, 234, 0.94); color: #2a2130; border-color: rgba(42, 33, 48, 0.1); }
.notif--plain { font-family: var(--font-ui); font-size: 0.9rem; background: rgba(20, 16, 36, 0.86); }
.notif--dialogue { text-align: left; font-size: 0.8rem; }
.notif--alarm {
  border-color: rgba(255, 120, 90, 0.5);
  background: rgba(38, 12, 12, 0.86);
  color: #ffd9d0;
  animation: alarmPulse 1.4s ease-in-out 2;
}

.notif__heart { display: block; margin-top: 0.5rem; font-size: 1rem; }

/* ---- achievement pop ------------------------------------- */
.ach-pop {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 21rem;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(203, 185, 255, 0.34);
  background: rgba(16, 12, 30, 0.9);
  color: #f4f1ff;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.3, 1), opacity 420ms ease;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.ach-pop.is-in { transform: none; opacity: 1; }

.ach-pop__ico {
  font-size: 1.3rem;
  min-width: 1.6rem;
  text-align: center;
  animation: pop 700ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.ach-pop__k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--lav);
  margin-bottom: 0.15rem;
}

.ach-pop__name { font-size: 0.92rem; }

/* ---- floating hearts / rewards / visitors ---------------- */
.float-heart {
  position: absolute;
  bottom: 12%;
  font-size: 1.1rem;
  animation: floatUp var(--dur, 4.4s) ease-out forwards;
  opacity: 0;
}

.float-heart--big { font-size: 1.6rem; }

.reward {
  position: absolute;
  left: 50%;
  bottom: 26%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--lav);
  animation: rewardUp 1.8s ease-out forwards;
}

.visitor {
  position: absolute;
  left: -14%;
  font-size: 1.2rem;
  animation: crossScreen var(--cross, 6s) linear forwards;
  opacity: 0.85;
}

.visitor--wisp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(203, 185, 255, 0.9) 45%, transparent 72%);
  box-shadow: 0 0 12px rgba(203, 185, 255, 0.9);
}

/* ---- achievements drawer --------------------------------- */
#achStar {
  position: fixed;
  right: calc(env(safe-area-inset-right) + 14px);
  bottom: calc(env(safe-area-inset-bottom) + 44px);
  z-index: 45;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: var(--fg-3);
  border: 1px solid var(--line);
  background: var(--card-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0.82;
  transition: color 300ms ease, transform 300ms ease, opacity 400ms ease;
}

#achStar.has-new {
  color: var(--fg);
  animation: starPing 1.6s ease-in-out 3;
}

/* chrome steps aside while she is reading something that matters —
   a floating button parked on top of a paragraph is exactly the kind
   of thing that makes a page feel machine-made */
body.quiet-view #achStar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

#achDrawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-content: end;
  background: rgba(6, 5, 13, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

#achDrawer.is-open { opacity: 1; pointer-events: auto; }

.drawer__panel {
  max-height: 82dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.4rem var(--pad) calc(env(safe-area-inset-bottom) + 2rem);
  background: #0e0b1a;
  color: #f2effc;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(18px);
  transition: transform 380ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

#achDrawer.is-open .drawer__panel { transform: none; }

.drawer__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.drawer__title { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }

.drawer__close { font-size: 1.4rem; line-height: 1; color: rgba(255, 255, 255, 0.5); }

.drawer__close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: -10px -10px -10px 0;
}

.drawer__count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--lav); }

.drawer__econ {
  margin: 0.9rem 0 1.2rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
}

.drawer__econ b { color: #fff; font-weight: 600; }

.drawer__econ em { display: block; font-style: normal; color: rgba(255, 255, 255, 0.4); margin-top: 0.3rem; }

.ach-row {
  display: flex;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  opacity: 0.45;
}

.ach-row.is-got { opacity: 1; }

.ach-row__ico { min-width: 1.4rem; text-align: center; font-size: 0.95rem; color: rgba(255, 255, 255, 0.4); }
.ach-row.is-got .ach-row__ico { color: #fff; }

.ach-row__body { display: block; }
.ach-row__name { display: block; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.06em; }
.ach-row__desc { display: block; font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); white-space: pre-line; }

/* ---- the sun and the moon --------------------------------
   Thamuz is the sun. Kyo is the moon. She circles him — that is
   the whole relationship, drawn in two shapes.
   No official artwork anywhere: a solar disc and a lunar orb.      */
.orbit {
  position: relative;
  width: min(64vw, 15.5rem);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  --orbit-dur: 6s;
  --orbit-scale: 1;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* the path she keeps travelling */
.orbit__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  -webkit-mask-image: radial-gradient(closest-side, transparent 0, #000 2%, #000 98%, transparent 100%);
  mask-image: radial-gradient(closest-side, transparent 0, #000 2%, #000 98%, transparent 100%);
}

.orbit__ring--inner { inset: 22%; border-style: solid; border-color: rgba(255, 255, 255, 0.07); }

.orbit__rotor {
  position: absolute;
  inset: 0;
  animation: spin var(--orbit-dur) linear infinite;
}

/* ---- the moon: Kyo. Pale, bright, and always in motion ----- */
.moon {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(15px * var(--orbit-scale));
  height: calc(15px * var(--orbit-scale));
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0%, #f2f6ff 38%, #d5ddf5 62%, #a9b6dc 88%, #8d9bc4 100%);
  box-shadow:
    inset -3px -3px 7px rgba(96, 112, 160, 0.5),
    0 0 calc(15px * var(--orbit-scale)) rgba(226, 235, 255, 0.95),
    0 0 calc(38px * var(--orbit-scale)) rgba(178, 200, 255, 0.42);
  transform: translate(-50%, -50%);
  transition: width 500ms ease, height 500ms ease, box-shadow 500ms ease;
}

.orbit.is-boosted .moon {
  background: radial-gradient(circle at 34% 30%, #ffffff 0%, #fff6f8 40%, #ffd9e3 68%, #e9a9c0 100%);
  box-shadow:
    inset -3px -3px 7px rgba(150, 90, 120, 0.45),
    0 0 calc(18px * var(--orbit-scale)) rgba(255, 240, 246, 0.95),
    0 0 calc(44px * var(--orbit-scale)) rgba(255, 170, 196, 0.5);
}

/* ---- the sun: Thamuz. Warm, steady, absolutely the centre -- */
.sun {
  position: relative;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, #fffbe8 0%, #ffe08a 24%, #ffb74d 52%, #f08a2a 76%, #c85f14 100%);
  box-shadow:
    0 0 34px rgba(255, 198, 92, 0.6),
    0 0 90px rgba(255, 150, 60, 0.3),
    inset 0 -7px 20px rgba(122, 52, 0, 0.32);
  animation: sunPulse 5.4s ease-in-out infinite;
}

/* the corona — slow, wide, cheap */
.sun::before {
  content: "";
  position: absolute;
  inset: -46%;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 214, 132, 0.30) 0 2.2deg,
    transparent 2.2deg 22.5deg
  );
  -webkit-mask-image: radial-gradient(closest-side, transparent 42%, #000 66%, transparent 96%);
  mask-image: radial-gradient(closest-side, transparent 42%, #000 66%, transparent 96%);
  animation: spin 52s linear infinite;
  opacity: 0.85;
}

/* the outer heat ring */
.sun::after {
  content: "";
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 120, 0.28);
  animation: sunRing 6.2s ease-out infinite;
}

.orbit--small { width: min(52vw, 12.5rem); }
.orbit--small .sun { width: 46%; }

/* the hero pair on the first screen — sized so the legend lands
   inside the phone's first viewport, not just under the fold */
.orbit--hero { width: min(56vw, 13.5rem); margin-top: 0.4rem; }

.orbit--tiny { width: min(40vw, 9rem); }
.orbit--tiny .sun { width: 42%; }
.orbit--tiny .moon { width: 11px; height: 11px; }

/* the moon on her own, for the very first screen */
.gate__orb {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 1.8rem;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff 0%, #f2f6ff 38%, #d5ddf5 62%, #a9b6dc 88%, #8d9bc4 100%);
  box-shadow:
    inset -3px -3px 7px rgba(96, 112, 160, 0.5),
    0 0 15px rgba(226, 235, 255, 0.95),
    0 0 38px rgba(178, 200, 255, 0.42);
  animation: moonGlow 5s ease-in-out infinite;
}

/* ---- the legend: two dots, so nobody has to guess ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.4rem;
  margin: 1.4rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.legend span { display: inline-flex; align-items: center; gap: 0.5rem; }

.legend b { color: var(--fg-2); font-weight: 600; letter-spacing: 0.06em; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dot--sun {
  background: radial-gradient(circle at 40% 34%, #fff3cf, #ffb74d 60%, #e07d1e);
  box-shadow: 0 0 9px rgba(255, 190, 90, 0.85);
}

.dot--moon {
  background: radial-gradient(circle at 36% 32%, #ffffff, #dfe6fa 60%, #a9b6dc);
  box-shadow: 0 0 9px rgba(210, 225, 255, 0.85);
}


.hero-tag {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  margin-top: 1.6rem;
  text-transform: uppercase;
}

.hero-tag b { display: block; color: var(--fg); font-size: 0.86rem; letter-spacing: 0.06em; }

.orbit-ctl {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.orbit-ctl span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-3); }

/* ---- system window --------------------------------------- */
.window {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.window__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.window__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); opacity: 0.6; }

.window__body { padding: 1rem 1.05rem; }

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.44rem 0;
  border-bottom: 1px dashed var(--line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.status-row:last-child { border-bottom: 0; }
.status-row .k { color: var(--fg-3); flex: 1 1 auto; }
.status-row .v { color: var(--fg); text-align: right; flex: 0 1 auto; max-width: 64%; overflow-wrap: anywhere; }
.status-row .v--warn { color: var(--bad); }
.status-row .v--good { color: var(--good); }

.dots { animation: dots 1.6s steps(4, end) infinite; }

.window__out {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--fg);
  white-space: pre-line;
}

.window__out.is-shown { animation: rise 500ms cubic-bezier(0.2, 0.7, 0.3, 1) both; }

/* the little "…" she taps to make the panel admit it has nothing */
.status-check {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  margin: -0.7rem -0.5rem -0.7rem 0;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--fg-2);
  border: 1px solid var(--line);
}

.status-check:active { background: var(--card-2); }

/* ---- the clock ------------------------------------------- */
.clock {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 18vw, 5rem);
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0 0 0.4rem;
  color: #fff;
  text-shadow: 0 0 26px rgba(166, 140, 255, 0.5);
}

.clock.is-pulse, .clock__t.is-pulse { animation: clockIn 620ms cubic-bezier(0.2, 0.7, 0.3, 1); }

.frags { text-align: center; min-height: 5.4rem; }

.frag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-3);
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/* ---- options panel --------------------------------------- */
.options { margin-top: 1.6rem; display: grid; gap: 0.55rem; }

.option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.option--chosen {
  border-color: rgba(203, 185, 255, 0.6);
  background: rgba(203, 185, 255, 0.12);
}

.option--chosen::after {
  content: "auto-selected";
  /* the label wraps on a narrow phone — the badge must not fight it
     for the same line */
  flex-basis: 100%;
  margin-left: 1.6rem;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--lav);
  text-transform: uppercase;
}

/* ---- big dramatic title that shrinks --------------------- */
.big-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 13vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  transition: font-size 1200ms cubic-bezier(0.2, 0.7, 0.3, 1), opacity 900ms ease, letter-spacing 1200ms ease;
}

.big-title.is-shrunk {
  font-size: 1rem;
  letter-spacing: 0.14em;
  opacity: 0.72;
}

.annihilator {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--ember);
  text-transform: uppercase;
}

/* the tiny flames above the dramatic Thamuz card */
.flames {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.flames i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffd08a, #ff7a2f 60%, #b8340f);
  box-shadow: 0 0 10px rgba(255, 130, 60, 0.85);
  animation: flameFlicker 2.4s ease-in-out infinite;
}

.flames i:nth-child(2) { animation-delay: 0.5s; }
.flames i:nth-child(3) { animation-delay: 1.1s; }

.kicker-who {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 1.4rem 0 0.35rem;
}

/* ---- split lines ----------------------------------------- */
.split { display: grid; gap: 0.9rem; margin: 1.4rem 0; }

.split__left { justify-self: start; max-width: 88%; }
.split__right { justify-self: end; max-width: 88%; text-align: right; }

.split__tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; color: var(--fg-3); display: block; margin-bottom: 0.25rem; text-transform: uppercase; }

.split__line { font-family: var(--font-serif); font-size: 1.08rem; }

/* ---- cards ----------------------------------------------- */
.cards { display: grid; gap: 0.6rem; }

.card {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.94rem;
}

.card--strong { border-color: rgba(166, 140, 255, 0.4); }

.card__ico { font-size: 1rem; line-height: 1.4; }

.card__txt { flex: 1; text-align: left; }

.rank-opt { width: 100%; font-family: var(--font-ui); font-size: 0.95rem; text-align: left; }

.rank-opt .card__ico {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  padding-top: 0.15rem;
}

.rank-opt.is-right { border-color: rgba(166, 140, 255, 0.75); background: rgba(166, 140, 255, 0.12); }
.rank-opt.is-wrong { animation: wiggle 480ms ease-in-out; opacity: 0.7; }

/* ---- meter ----------------------------------------------- */
.meter { margin: 1.1rem 0; }

.meter__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.meter__track {
  height: 10px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lav-2), var(--rose));
  transition: width 700ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.meter__fill.is-full { background: linear-gradient(90deg, #ffd166, var(--rose)); }

.meter__out {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--fg);
  white-space: pre-line;
}

.meter__out.is-shown { animation: rise 500ms cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.meter__out.is-error { color: var(--bad); }

/* ---- us bar ---------------------------------------------- */
.us {
  margin: 1.4rem 0;
  --us-fill: 0;
}

.us__row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.us__track {
  height: 6px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.us__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lav-2), var(--rose));
  transition: width 1400ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.us--big .us__track { height: 12px; }

/* ---- translators ----------------------------------------- */
.xlate { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--card); }

.xlate__row {
  display: grid;
  grid-template-columns: 1fr auto 1.4fr;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.68rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.xlate__row:last-child { border-bottom: 0; }

.xlate__from { font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg); }
.xlate__arrow { color: var(--accent); font-size: 0.8rem; }
.xlate__to { color: var(--fg-2); }
.xlate__note { margin: 0.9rem 0 0; font-size: 0.8rem; color: var(--fg-3); font-style: italic; }

/* on a narrow phone the three columns crush — give the meaning its own line */
@media (max-width: 419px) {
  .xlate__row { grid-template-columns: 1fr; gap: 0.1rem; padding: 0.75rem 0.85rem; }
  .xlate__arrow { display: none; }
  .xlate__from { font-size: 0.86rem; }
  .xlate__from::after { content: " →"; color: var(--accent); }
  .xlate__to { padding-left: 1rem; font-size: 0.9rem; color: var(--fg-2); }
}

/* ---- contract -------------------------------------------- */
.tos { border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); padding: 1.1rem 1rem; }

.tos__title { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 0.3rem; }

.tos__meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-3); margin: 0 0 1rem; }

.tos__clauses { list-style: none; margin: 0 0 1.3rem; padding: 0; }

.tos__clause {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.2rem;
  padding: 0.36rem 0;
  font-size: 0.88rem;
  color: var(--fg-2);
  border-bottom: 1px dotted var(--line);
}

.tos__n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--fg-3); padding-top: 0.18rem; }

.tos__out {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  white-space: pre-line;
  color: var(--fg);
}

.tos__out.is-shown { animation: rise 600ms cubic-bezier(0.2, 0.7, 0.3, 1) both; }

/* ---- pipeline -------------------------------------------- */
.pipeline { margin: 1.4rem 0; }

.pipeline__step {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  font-size: 0.92rem;
  color: var(--fg-2);
  border-bottom: 1px solid var(--line);
}

.pipeline__n { font-family: var(--font-mono); font-size: 0.7rem; color: var(--fg-3); min-width: 1rem; }
.pipeline__step--last { border-bottom: 0; }
.pipeline__step--last .pipeline__t { font-family: var(--font-mono); color: var(--fg); }

/* ---- downgrade ladder ------------------------------------ */
.ladder { display: grid; gap: 0.35rem; justify-items: center; margin: 1.6rem 0; text-align: center; }

.ladder__step {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--fg-2);
}

.ladder__arrow { color: var(--fg-3); font-size: 0.72rem; }

/* ---- the classified / decrypt ---------------------------- */
.classified {
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 120, 90, 0.42);
  background: rgba(140, 43, 28, 0.1);
  padding: 1.1rem 1rem;
}

.classified__tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.24em; color: #ad3520; text-transform: uppercase; margin-bottom: 0.8rem; }

.is-decrypting { animation: scramble 240ms steps(2, end) 6; }

/* ---- dialogue bubbles ------------------------------------- */
.bubble {
  max-width: 88%;
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.94rem;
}

.bubble--left { border-bottom-left-radius: 5px; justify-self: start; }
.bubble--right { border-bottom-right-radius: 5px; justify-self: end; background: var(--card-2); }

.bubble__who {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 0.3rem;
}

.thread { display: grid; gap: 0.5rem; }

/* ---- the hidden things ------------------------------------ */
.egg {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  font-size: 1.15rem;
  border-radius: 50%;
  opacity: 0.5;
  transition: opacity 300ms ease, transform 300ms ease;
  filter: grayscale(0.4);
}

.egg:active { transform: scale(1.2); }
.egg.is-wiggling { animation: wiggle 700ms ease-in-out; }
.egg.is-poked { animation: poke 400ms ease-out; }
.egg.is-revealed { opacity: 1; filter: none; }

.hearts-row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.8rem 0 0.4rem;
  flex-wrap: wrap;
}

.heart-poke {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1rem;
  opacity: 0.55;
  transition: opacity 260ms ease, transform 260ms ease, background-color 260ms ease;
}

.heart-poke:active, .heart-poke.is-poked { background: var(--card-2); }
.heart-poke:active { transform: scale(1.25); }
.heart-poke.is-poked { animation: poke 500ms ease-out; }

/* ---- the identity word ----------------------------------- */
.identity-word {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 16vw, 4rem);
  letter-spacing: 0.1em;
  text-align: center;
  cursor: pointer;
  user-select: none;
  margin: 1.6rem 0 0.6rem;
  transition: color 300ms ease;
}

.identity-word.is-wobbling { animation: wiggle 480ms ease-in-out; }

.identity-chain {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  margin: 1.4rem 0;
  text-align: center;
}

.identity-chain li {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.identity-chain li.is-in { opacity: 1; transform: none; }
.identity-chain li:last-child { font-family: var(--font-serif); font-size: 1.15rem; letter-spacing: 0; }

.identity-chain ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; justify-items: center; }

.alert-strip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bad);
  text-align: center;
  opacity: 0;
  transition: opacity 500ms ease;
}

.alert-strip.is-shown { opacity: 1; }

/* ---- dodging button -------------------------------------- */
.is-dodging { transform: translateX(46px) rotate(-3deg); transition: transform 420ms cubic-bezier(0.2, 0.7, 0.3, 1); }

.dialog-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }

/* ---- classified style reveal ----------------------------- */
.reveal-box {
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal-box.is-shown { opacity: 1; transform: none; }

/* same idea, without the box — for lines that must arrive late */
.fade-box {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.fade-box.is-shown { opacity: 1; transform: none; }

.said {
  font-family: var(--font-serif);
  font-size: clamp(1.16rem, 5.2vw, 1.42rem);
  line-height: 1.4;
  white-space: pre-line;
}

/* ---- 100dvh emotional moments ---------------------------- */
.meanlot {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 0 var(--pad);
}

.meanlot__line {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 8.4vw, 2.4rem);
  line-height: 1.28;
  margin: 0 0 1.1rem;
}

.meanlot__sub { font-size: 0.95rem; color: var(--fg-2); }

/* ---- phase headline -------------------------------------- */
.phase-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 1.1rem;
}

/* ---- footer ---------------------------------------------- */
.foot {
  padding: 3rem var(--pad) calc(env(safe-area-inset-bottom) + 4rem);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.foot__heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  margin: 0.4rem 0;
  font-size: 1.1rem;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
}
.foot__heart:hover, .foot__heart:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.06); }
.foot__heart:focus-visible { outline: 2px solid var(--lav-2); outline-offset: 2px; }

/* ---- milestone cards — "what you accidentally caused" -----
   High level only. No IPs, no hostnames, no private detail. */
.ms-card {
  padding: 1.1rem 1rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ms-card__name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: var(--fg);
}

.ms-card__status {
  font-size: 0.88rem;
  color: var(--accent);
  margin: 0 0 0.7rem;
}

.ms-card__line {
  font-size: 0.94rem;
  color: var(--fg-2);
  margin: 0 0 0.35rem;
}

.ms-card__metrics { margin-top: 0.7rem; }

.ms-card .thread { margin-top: 0.9rem; }

/* ---- duty vs want ---------------------------------------- */
.duty {
  display: grid;
  gap: 0.8rem;
  margin: 1.6rem 0;
}

.duty__col {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}

.duty__col--want { border-color: rgba(184, 68, 122, 0.45); }

.duty__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--fg-3);
  margin: 0 0 0.6rem;
}

.duty__col--want .duty__title { color: var(--accent); }

.duty__list { list-style: none; margin: 0; padding: 0; }

.duty__list li {
  font-size: 0.95rem;
  color: var(--fg-2);
  padding: 0.2rem 0;
}

.duty__col--want .duty__list li { color: var(--fg); }

@media (min-width: 560px) {
  .duty { grid-template-columns: 1fr 1fr; }
}

/* ---- CARE.EXE question chips ----------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--fg);
}

/* ---- the side quest list --------------------------------- */
.quest { list-style: none; margin: 0; padding: 0; }

.quest__obj {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 0.94rem;
  color: var(--fg-2);
  border-bottom: 1px dotted var(--line);
}

.quest__obj:last-child { border-bottom: 0; }

.quest__obj::before {
  content: "\25A1";
  color: var(--accent);
  font-size: 0.85rem;
}

/* ---- post credits ---------------------------------------- */
.postcredits { min-height: 92dvh; display: grid; align-content: center; text-align: center; }

.postcredits__line {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--fg-2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 900ms ease, transform 900ms ease;
  margin: 0 0 1rem;
}

.postcredits__line.is-shown { opacity: 1; transform: none; }

/* ---- body state extras ----------------------------------- */
body.dim { filter: brightness(0.86) saturate(0.94); transition: filter 900ms ease; }
body.charged #glow { --glow-o: 1.3; }
body.chaos .visitor--wisp { animation-duration: 2.4s; }

/* ---- wide screens ---------------------------------------- */
@media (min-width: 620px) {
  body { font-size: 18px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card { align-items: center; }
  #todoCards .card:last-child { grid-column: 1 / -1; }
}
