:root{
  --bg:#0A0E17;
  --bg-elevated:#10182A;
  --bubble-boy:#1B2436;
  --bubble-boy-text:#E7ECF5;
  --bubble-you:#123234;
  --bubble-you-text:#CFF6F2;
  --accent:#4FC7C3;
  --accent-dim:rgba(79,199,195,0.18);
  --warn:#D9A441;
  --danger:#D9636F;
  --good:#7FBF9F;
  /* Raised from #6B7688, which measured 4.2:1 against --bg and failed AA. This
     is 5.2:1 on --bg and 4.8:1 on --bg-elevated — both surfaces matter, and an
     intermediate value that passed only on the darker one would have failed
     exactly where the rails and the composer are. It carries most of the small
     text in the game (the consequence line, the sent-at stamps, the rail notes),
     so this was the single worst contrast problem here, not a cosmetic one. */
  --text-dim:#7A8598;
  --border:#212A3D;
  --font-mono:'JetBrains Mono', ui-monospace, monospace;
  --font-warm:'Quicksand', system-ui, sans-serif;
}
*{box-sizing:border-box;}

/*
  Focus, visibly.

  Every interactive element in here used to either inherit the browser default
  or, in the two places that styled it, set `outline:none` with only a border
  colour to replace it — which is worse than not styling it at all, because a
  keyboard user loses their place entirely. :focus-visible means pointer users
  never see a ring they did not ask for.
*/
:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:4px;
}

/*
  Nothing here is load-bearing motion: the bubble pop, the typing dots and the
  shimmer are all texture. For anyone who asks for less of it, the game reads
  identically without. Transitions collapse rather than disappear so state
  changes still land, they just land immediately.
*/
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
    scroll-behavior:auto !important;
  }
}
body{
  margin:0;
  /* A soft morning around the phone: cream, warmed at the top like sunrise.
     The phone and the rails stay dark, like a real screen on a desk. */
  background:radial-gradient(120% 70% at 50% -10%, #FFE9D0 0%, #FBF3E8 45%, #F7F0E6 85%);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--font-warm);
  color:var(--bubble-boy-text);
  padding:24px 12px;
}

/*
  Desktop shell. The phone stays exactly as it is; the rails only exist on wide
  viewports, where the phone alone would leave most of the screen empty. Think
  of it as his desk: photos on one side, what he is carrying on the other.
*/
.stage{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:28px;
  width:100%;
  max-width:1320px;
}
.rail{
  display:none;
  flex-direction:column;
  gap:18px;
  width:290px;
  flex-shrink:0;
  height:840px;
  max-height:94vh;
}
.rail-block{
  background:var(--bg-elevated);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:0 18px 40px -22px rgba(60,40,20,.35);
  padding:16px 16px 18px;
  display:flex;flex-direction:column;min-height:0;
}
.rail-grow{flex:1;min-height:0;}
.rail-title{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:0.16em;text-transform:uppercase;
  color:var(--text-dim);margin:0 0 12px;font-weight:500;
}
.rail-empty{
  font-family:var(--font-warm);font-size:12.5px;color:var(--text-dim);
  margin:0;line-height:1.5;
}
.rail-photos{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.rail-photos:empty{display:none;}
.rail-photos button{
  padding:0;border:1px solid var(--border);border-radius:10px;overflow:hidden;
  background:var(--bubble-boy);cursor:pointer;aspect-ratio:1/1;display:block;
  transition:border-color .25s, transform .25s;
}
.rail-photos button:hover{border-color:var(--accent);transform:translateY(-2px);}
.rail-photos img{width:100%;height:100%;object-fit:cover;display:block;}

.rail-threads,.rail-people{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.rail-threads:empty,.rail-people:empty{display:none;}
.rail-threads li{
  border-left:2px solid var(--accent);padding-left:10px;
  animation:pop .4s ease;
}
.rail-threads .thread-label{
  display:block;font-family:var(--font-warm);font-weight:600;font-size:13px;
  color:var(--bubble-boy-text);
}
.thread-note{
  display:block;font-family:var(--font-warm);font-size:12px;line-height:1.45;
  color:var(--text-dim);margin-top:2px;
}

/* People. Standing is a word, and it is the only quantity shown anywhere —
   there is deliberately no bar, no number and no arrow. */
.rail-people{max-height:210px;overflow-y:auto;}
.rail-money{margin:0 0 6px;font-size:13px;color:var(--bubble-boy-text);}
.rail-has{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:var(--text-dim);max-height:180px;overflow-y:auto;}
.rail-has:empty{display:none;}
.rail-block[hidden]{display:none;}
.rail-has li{border-left:2px solid var(--border);padding-left:10px;}
.rail-people li{border-left:2px solid var(--border);padding-left:10px;animation:pop .4s ease;}
/* Whoever's standing just moved. Accumulation is only legible if you can watch
   it happen rather than notice the list quietly differs ten turns later. */
.rail-people li.changed{border-left-color:var(--accent);}
.person-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;}
.person-name{font-family:var(--font-warm);font-weight:600;font-size:13px;color:var(--bubble-boy-text);}
.person-standing{
  font-family:var(--font-mono);font-size:9px;letter-spacing:0.1em;text-transform:uppercase;
  color:var(--text-dim);flex-shrink:0;
}
.person-standing.hostile{color:var(--danger);}
.person-standing.wary{color:var(--warn);}
.person-standing.warm,.person-standing.close{color:var(--good);}
.rail-diary{
  overflow-y:auto;display:flex;flex-direction:column;gap:12px;min-height:0;
}
.rail-diary:empty{display:none;}
.rail-diary::-webkit-scrollbar{width:3px;}
.rail-diary::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px;}
.rail-diary .diary-entry{margin:0;padding:10px 12px;}
.rail-diary .diary-text{font-size:12.5px;line-height:1.55;}

@media (min-width:1180px){
  .rail{display:flex;}
}

.phone{
  width:100%;
  max-width:420px;
  height:840px;
  max-height:94vh;
  background:var(--bg);
  border-radius:28px;
  border:1px solid var(--border);
  box-shadow:0 30px 70px -24px rgba(60,40,20,.5), 0 0 0 1px rgba(255,255,255,0.02);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  position:relative;
}

.statusbar{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:10px 20px 4px;
  font-family:var(--font-mono);font-size:11px;
  color:var(--text-dim);letter-spacing:0.02em;
}

.header{
  display:flex;align-items:center;gap:10px;
  padding:6px 14px 14px;
  border-bottom:1px solid var(--border);
}
.avatar{
  width:38px;height:38px;border-radius:50%;
  background:linear-gradient(135deg,#2A3550,#1B2436);
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:15px;flex-shrink:0;
}
.who{flex-grow:1;min-width:0;}
.who .name{font-weight:700;font-size:14.5px;}
.who .status{font-family:var(--font-mono);font-size:10.5px;color:var(--accent);letter-spacing:0.03em;transition:color .4s;}
.who .status.offline{color:var(--text-dim);}

.header-actions{display:flex;align-items:center;gap:6px;}
.chapter-badge{
  font-family:var(--font-mono);font-size:9px;letter-spacing:0.08em;text-transform:uppercase;
  color:var(--accent);background:var(--accent-dim);
  padding:3px 7px;border-radius:10px;white-space:nowrap;
  min-width:0;overflow:hidden;text-overflow:ellipsis;
}
.chapter-badge[hidden]{display:none;}
.statusbar > span{flex-shrink:0;}
.statusbar > .chapter-badge{flex-shrink:1;}
.iconbtn{
  width:30px;height:30px;border-radius:50%;
  border:1px solid var(--border);background:transparent;
  color:var(--text-dim);cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  padding:0;transition:color .2s, border-color .2s, background .2s;
  font-family:var(--font-mono);font-size:13px;
}
.iconbtn:hover{color:var(--accent);border-color:var(--accent);}
.back-btn{border-color:transparent;margin-left:-8px;flex-shrink:0;}
.back-btn svg{width:18px;height:18px;}
/* On a phone the header is full: the avatar goes (the brain button opens the
   same page) and the buttons sit closer, so his name keeps its room. */
@media (max-width:420px){
  .back-btn{width:22px;margin-left:-6px;}
  .header{gap:6px;}
  .header .avatar{display:none;}
  .header-actions{gap:4px;}
}
.iconbtn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round;}
.iconbtn.has-new{color:var(--accent);border-color:var(--accent);}

.signal{display:flex;gap:3px;align-items:flex-end;height:16px;flex-shrink:0;}
.signal i{width:4px;background:var(--accent);border-radius:1px;transition:background .5s, opacity .5s;}
.signal i:nth-child(1){height:5px;}
.signal i:nth-child(2){height:8px;}
.signal i:nth-child(3){height:11px;}
.signal i:nth-child(4){height:14px;}
.signal.dead i{background:var(--text-dim);opacity:.35;}

.chat{
  flex-grow:1;overflow-y:auto;
  padding:16px 14px;
  display:flex;flex-direction:column;gap:10px;
  scroll-behavior:smooth;
}
.chat::-webkit-scrollbar{width:4px;}
.chat::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px;}

.row{display:flex;width:100%;}
/* A stamped message stacks the "where he sent it from" label above the bubble
   rather than beside it. */
.row.stamped{flex-direction:column;align-items:flex-start;}
.row.boy{justify-content:flex-start;}
.row.you{justify-content:flex-end;}
/* A text that follows another of his sits tight under it, the way a run of
   messages from one person does on a phone. */
.row.boy.cont{margin-top:-6px;}
.row.boy.cont .bubble{border-top-left-radius:4px;}
/* Someone else typing on his phone: same thread, different hand. */
.row.boy.other .bubble{
  background:rgba(217,164,65,0.10);border:1px solid rgba(217,164,65,0.35);color:var(--bubble-boy-text);
}
.row.boy.other .sent-at{color:var(--warn);}
.bubble{
  max-width:78%;padding:10px 13px;border-radius:16px;
  font-size:14px;line-height:1.42;
  animation:pop .25s ease;
  white-space:pre-wrap;overflow-wrap:anywhere;
}
@keyframes pop{from{opacity:0;transform:translateY(6px) scale(.98);}to{opacity:1;transform:none;}}
.row.boy .bubble{
  background:var(--bubble-boy);color:var(--bubble-boy-text);
  border-bottom-left-radius:4px;font-weight:500;
}
.row.you .bubble{
  background:var(--bubble-you);color:var(--bubble-you-text);
  border-bottom-right-radius:4px;font-family:var(--font-mono);font-size:13px;
}
.consequence{
  align-self:center;font-family:var(--font-mono);font-size:10.5px;
  color:var(--text-dim);text-align:center;padding:2px 10px;max-width:85%;
  animation:pop .3s ease;
}

/* The ability the pending message will actually demand. Dimming the other two
   is what makes it a decision rather than a decoration: you can see at a glance
   whether he can pull off what you are about to tell him. */
.hud.has-leaning .stat{opacity:.4;transition:opacity .3s ease;}
.hud .stat.leaning{opacity:1;}
.hud .stat.leaning .lbl{color:var(--accent);}

/* What is now different about his life. The only feedback between report cards,
   so it has to read as a note in the margin rather than a score. */
.consequence.shift{
  color:var(--accent);opacity:.9;
  border-top:1px solid var(--accent-dim);padding-top:5px;margin-top:1px;
}
.consequence.shift::before{content:'▸ ';opacity:.6;}

/* A new day, the way a phone marks one above its first message. */
.date-divider{
  align-self:center;margin:16px 0 4px;padding:3px 12px;border-radius:999px;
  font-family:var(--font-mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--text-dim);background:rgba(255,255,255,.04);border:1px solid var(--accent-dim);
}

/* A later message the same day: just the time, smaller — minutes passed, not days. */
.date-divider.same-day{margin:10px 0 2px;padding:2px 10px;font-size:9px;border-color:transparent;}

/* The room before he speaks: one line of narration over his next message,
   like the background a visual novel shows before anyone talks. */
.consequence.scene{
  font-family:var(--font-warm);font-style:italic;font-size:13px;line-height:1.5;
  color:var(--text-dim);margin:6px 0 8px;padding:0 14px;max-width:85%;opacity:.9;
}

/* An ordinary day between two scenes: quieter than what happened, warmer
   than a system line. */
.consequence.interlude{
  font-family:var(--font-warm);font-style:italic;font-size:13px;line-height:1.5;
  color:var(--text-dim);margin:4px 0 6px;padding:0 14px;max-width:85%;
}
/* A small text from him that can be answered or left. */
.quick-replies{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;margin:6px 0 10px;align-self:flex-end;max-width:90%;}
.quick-replies button{
  font:inherit;font-size:13px;padding:6px 12px;border-radius:999px;cursor:pointer;
  color:inherit;background:transparent;border:1px solid var(--accent-dim);
}
.quick-replies button:hover{border-color:var(--accent);}

/* The time between two moments: where his life went from the last scene to
   the next message. Set apart like a scene break in a book, so it reads as
   the story moving on rather than another thing that happened. */
.consequence.bridge{
  font-family:var(--font-warm);font-style:italic;font-size:13px;line-height:1.5;
  color:var(--text-dim);margin:14px 0 10px;padding:8px 14px;max-width:80%;
  border-top:1px dashed var(--accent-dim);border-bottom:1px dashed var(--accent-dim);
}

/* A turning point: the story forked on this answer. Quieter than a headline,
   louder than a shift — it is the one line that says "this mattered later". */
.consequence.turning{
  color:var(--accent);font-style:italic;letter-spacing:.01em;
}
.consequence.turning::before{content:'the story turned · ';font-style:normal;opacity:.6;text-transform:lowercase;}
.consequence.turning[data-why]::before{content:attr(data-why);}

/*
  The staged consequence: the same words the inline line carries, given room.

  Centred and set apart from both sides of the conversation on purpose — this is
  not him talking and not the player answering, it is the world reporting what
  happened. Bigger than the inline line but still quieter than a bubble, because
  the moment it out-shouts his messages the game stops being a conversation.

  Fires only on turns that changed something lasting. If it appeared every turn
  it would be a slower game rather than a heavier one.
*/
.beat{
  align-self:center;width:86%;margin:8px 0 6px;
  padding:14px 16px 15px;
  background:rgba(16,24,42,0.55);
  border:1px solid var(--border);border-left:2px solid var(--accent);
  border-radius:4px 14px 14px 4px;
  text-align:left;
  animation:beat-in .55s ease both;
}
@keyframes beat-in{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}

.beat-when{
  font-family:var(--font-mono);font-size:9px;letter-spacing:0.18em;
  text-transform:uppercase;color:var(--text-dim);margin-bottom:8px;
}
/* The photo belongs to the beat rather than floating beside it — the picture
   and the sentence are one moment, which is the whole reason the gate is a
   picture in the first place. */
.beat .photo{
  align-self:stretch;width:100%;max-width:none;
  margin:0 0 12px;border-radius:8px;animation:none;
}
.beat .photo.loading{min-height:150px;width:100%;}
/* The payload of the whole turn. It was 10.5px grey and centred — the same
   weight as "picked up where you left off" — which is what this is fixing. */
.beat-what{
  font-family:var(--font-warm);font-size:15px;line-height:1.55;
  color:var(--bubble-boy-text);
}
.beat-shift{
  font-family:var(--font-mono);font-size:11px;line-height:1.5;
  color:var(--accent);margin-top:10px;padding-top:9px;
  border-top:1px solid var(--accent-dim);
}
.beat-shift::before{content:'▸ ';opacity:.6;}

/* The club sign-up sheet: a handout he is holding, not something he said. */
.brochure{
  align-self:flex-start;max-width:88%;margin:2px 0 4px;
  background:var(--bg-elevated);border:1px dashed var(--border);border-radius:10px;
  padding:10px 12px;animation:pop .3s ease;
}
.brochure-head{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:0.1em;text-transform:uppercase;
  color:var(--warn);margin-bottom:8px;
}
.brochure-row{display:flex;flex-direction:column;gap:1px;padding:5px 0;}
.brochure-row + .brochure-row{border-top:1px solid var(--border);}
.brochure-name{font-family:var(--font-mono);font-size:12px;color:var(--bubble-boy-text);}
.brochure-line{font-size:11.5px;color:var(--text-dim);line-height:1.4;}

/* Where he sent it from. He messages the moment he can reach his phone, so
   this is most of what conveys elapsed time between beats. */
.sent-at{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:0.09em;
  /* No opacity: at this size, dimming an already-dim colour put it under 3.5:1,
     and this is the label that carries elapsed time. */
  color:var(--text-dim);margin:0 0 3px 4px;
}
.consequence.blocked{color:var(--warn);}
.consequence.system{color:var(--danger);}

/* A message that did not send. Styled like a phone rather than like an error:
   the text stays put and offers itself again, because the answers most likely
   to be lost are the long ones the player thought hardest about. */
.row.you.failed{flex-direction:column;align-items:flex-end;}
.row.you.failed .bubble{opacity:.55;border:1px dashed var(--danger);}
.undelivered{
  display:flex;align-items:center;gap:8px;
  font-family:var(--font-mono);font-size:10px;
  color:var(--danger);margin:4px 4px 0 0;
}
.undelivered .retry{
  font-family:inherit;font-size:inherit;
  color:var(--accent);background:none;border:none;
  padding:2px 4px;cursor:pointer;text-decoration:underline;
}
.undelivered .retry:hover{color:var(--text);}

/* Same idea one level up: the term opener failed, so there is no message to
   answer and the composer stays shut until this succeeds. */
.retry-block{
  align-self:center;margin:2px 0 6px;
  font-family:var(--font-mono);font-size:11px;
  color:var(--accent);background:none;
  border:1px solid var(--accent);border-radius:14px;
  padding:6px 16px;cursor:pointer;
}
.retry-block:hover{background:var(--accent-dim);}

.photo{
  align-self:flex-start;max-width:78%;
  border-radius:14px;border:1px solid var(--border);
  overflow:hidden;background:var(--bubble-boy);
  animation:pop .35s ease;cursor:pointer;
  padding:0;display:block;
}
.photo img{display:block;width:100%;height:auto;}
/* A photo he sent: one of his messages, on his side of the chat. */
.row.photo-row{margin:2px 0;}
.row.photo-row .photo{max-width:72%;border-radius:16px;border-bottom-left-radius:4px;}
.photo.loading{min-height:120px;width:60%;
  background:linear-gradient(100deg,#151D2F 30%,#1D2740 50%,#151D2F 70%);
  background-size:200% 100%;animation:shimmer 1.4s infinite;}
@keyframes shimmer{from{background-position:200% 0;}to{background-position:-200% 0;}}

.typing{
  display:flex;gap:4px;padding:12px 14px;background:var(--bubble-boy);
  border-radius:16px;border-bottom-left-radius:4px;width:fit-content;
}
.typing span{width:6px;height:6px;border-radius:50%;background:var(--text-dim);animation:blink 1.2s infinite;}
.typing span:nth-child(2){animation-delay:.2s;}
.typing span:nth-child(3){animation-delay:.4s;}
@keyframes blink{0%,60%,100%{opacity:.25;}30%{opacity:1;}}

/* Live HUD — ability stats only */
.hud{
  display:flex;gap:8px;padding:9px 14px;
  border-top:1px solid var(--border);background:var(--bg-elevated);
}
.stat{flex:1;min-width:0;}
.stat .lbl{
  font-family:var(--font-mono);font-size:8.5px;color:var(--text-dim);
  letter-spacing:0.06em;display:flex;justify-content:space-between;margin-bottom:3px;
}
.stat .track{height:4px;background:#1A2236;border-radius:2px;overflow:hidden;}
.stat .fill{height:100%;background:var(--accent);border-radius:2px;transition:width .6s ease, background .6s ease;}
.stat.bump .lbl{color:var(--accent);}

/* "saved", briefly, above the composer. Deliberately not a toast that has to be
   dismissed and not a permanent badge — the fact is only interesting for the
   moment just after it becomes true. */
.saved-chip{
  position:absolute;right:14px;bottom:74px;z-index:3;
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:0.08em;
  color:var(--text-dim);background:var(--bg-elevated);
  border:1px solid var(--border);border-radius:10px;padding:3px 9px;
  opacity:0;transform:translateY(4px);pointer-events:none;
  transition:opacity .25s ease, transform .25s ease;
}
.saved-chip.show{opacity:.85;transform:none;}

.inputrow{
  display:flex;gap:8px;padding:12px 12px 16px;
  background:var(--bg-elevated);border-top:1px solid var(--border);
}
textarea{
  flex-grow:1;resize:none;background:#0D1424;border:1px solid var(--border);
  border-radius:14px;padding:10px 12px;color:var(--bubble-you-text);
  font-family:var(--font-mono);font-size:13px;line-height:1.4;
  height:40px;max-height:90px;
}
textarea:focus{border-color:var(--accent);}
textarea::placeholder{color:var(--text-dim);}
button.send{
  width:40px;height:40px;border-radius:50%;border:none;background:var(--accent);
  color:#062024;font-size:16px;cursor:pointer;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;transition:opacity .2s, transform .15s;
}
button.send:disabled{opacity:.35;cursor:default;}
button.send:not(:disabled):active{transform:scale(.92);}

.overlay{
  position:absolute;inset:0;background:rgba(6,9,15,0.97);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:40px 28px;gap:14px;
  animation:pop .4s ease;overflow-y:auto;z-index:5;
}
.overlay[hidden]{display:none;}
/* The report card holds a list now; the chat behind it must not show through. */
#chapterOverlay{background:var(--bg);justify-content:safe center;}
.overlay h2{font-family:var(--font-mono);font-size:12px;letter-spacing:0.12em;text-transform:uppercase;color:var(--warn);margin:0;}
.overlay h1{font-size:26px;margin:0;color:var(--bubble-boy-text);line-height:1.25;}
.overlay h1.code{font-family:var(--font-mono);letter-spacing:0.28em;color:var(--accent);}
.overlay p{font-size:14.5px;color:var(--text-dim);line-height:1.6;margin:0;max-width:300px;}
.overlay p.epilogue{font-style:italic;color:var(--bubble-boy-text);}
.overlay .tiny{font-family:var(--font-mono);font-size:10.5px;color:var(--text-dim);}
.overlay .notice{max-width:300px;margin:14px auto 0;line-height:1.5;}
.overlay .stats-final{display:flex;flex-direction:column;gap:9px;width:100%;max-width:260px;margin-top:6px;}
/* The term's record on the report card. Empty until the boundary call lands,
   so it must collapse to nothing rather than reserve a gap. */
.overlay p.chapter-summary{
  font-size:13px;line-height:1.65;color:var(--text-dim);text-align:left;
  border-left:2px solid var(--border);padding-left:12px;margin-top:4px;
}
.overlay p.chapter-summary:empty{display:none;}

/* What your advice did: the player's own words, and what came of them. */
.overlay .advice-recap{width:100%;max-width:320px;text-align:left;margin-top:10px;}
.overlay .advice-recap h3{
  font-family:var(--font-mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--text-dim);font-weight:500;margin:0 0 8px;
}
.overlay .advice-recap .said{font-family:var(--font-mono);font-size:12px;color:var(--accent);margin:10px 0 2px;}
.overlay .advice-recap .came{font-size:12.5px;line-height:1.5;color:var(--text-dim);margin:0;}

/* Older messages from the same chat, faded: he has been texting you for years. */
.prologue{display:flex;flex-direction:column;opacity:.5;}
.prologue .date-divider{margin-top:10px;}
.prologue-note{
  align-self:center;font-family:var(--font-mono);font-size:9.5px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--text-dim);margin:6px 0 0;
}

.replay,.startbtn{
  margin-top:6px;padding:11px 24px;border-radius:20px;
  font-family:var(--font-mono);font-size:12.5px;letter-spacing:0.04em;cursor:pointer;
}
.replay{border:1px solid var(--accent);background:transparent;color:var(--accent);}
.replay:hover{background:var(--accent-dim);}
.startbtn{border:none;background:var(--accent);color:#062024;font-weight:700;}
/* When a run is waiting in this browser, continuing is the filled button and
   starting over steps back to an outline. */
.startbtn.secondary{
  background:transparent;border:1px solid var(--border);
  color:var(--text-dim);font-weight:500;
}
.startbtn.secondary:hover{color:var(--text);border-color:var(--accent);}
.linkbtn{
  background:none;border:none;color:var(--text-dim);cursor:pointer;
  font-family:var(--font-mono);font-size:12px;text-decoration:underline;padding:6px;
}
.linkbtn:hover{color:var(--accent);}
.endactions{display:flex;gap:14px;align-items:center;margin-top:4px;}

/* The closing timeline. Reads as a record rather than a scoreboard: the
   player's own words in the font they typed them in, and what followed
   underneath in the game's voice. No numbers anywhere. */
.reflection{
  width:100%;max-width:340px;text-align:left;
  border-top:1px solid var(--border);padding-top:14px;margin-top:2px;
  max-height:34vh;overflow-y:auto;
}
.reflection-head{
  font-family:var(--font-mono);font-size:9.5px;letter-spacing:0.16em;
  text-transform:uppercase;color:var(--text-dim);margin:0 0 12px;font-weight:500;
}
.reflection-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px;}
.reflection-item{display:flex;flex-direction:column;gap:4px;}
.reflection-when{
  font-family:var(--font-mono);font-size:9px;letter-spacing:0.1em;color:var(--text-dim);
}
.reflection-said{
  font-family:var(--font-mono);font-size:11.5px;line-height:1.5;
  color:var(--bubble-you-text);
  border-left:2px solid var(--accent-dim);padding-left:9px;
}
.reflection-then{
  font-size:12.5px;line-height:1.5;color:var(--text-dim);padding-left:11px;
}

.intro{gap:16px;}
.intro h1{font-size:24px;}
.intro-how{margin:-6px 0 0;max-width:320px;font-size:13px;line-height:1.5;color:var(--text-dim);font-family:var(--font-warm);}
.intro-legal{margin-top:4px;}
.resume{display:flex;gap:8px;align-items:center;margin-top:4px;}
.resume input{
  width:110px;background:#0D1424;border:1px solid var(--border);border-radius:12px;
  padding:8px 10px;color:var(--accent);font-family:var(--font-mono);font-size:13px;
  text-align:center;letter-spacing:0.16em;text-transform:uppercase;
}
.resume input:focus{border-color:var(--accent);}

/* gallery */
.overlay.gallery{justify-content:flex-start;padding:0;background:rgba(6,9,15,0.99);}
.gallery-head{
  display:flex;align-items:center;justify-content:space-between;width:100%;
  padding:18px 18px 12px;border-bottom:1px solid var(--border);flex-shrink:0;
}
.gallery-head h2{color:var(--accent);}
.gallery-grid{
  width:100%;padding:14px;display:grid;
  grid-template-columns:repeat(2,1fr);gap:10px;
  overflow-y:auto;align-content:start;
}
.gallery-item{
  border:1px solid var(--border);border-radius:12px;overflow:hidden;
  background:var(--bubble-boy);cursor:pointer;padding:0;display:block;
  position:relative;aspect-ratio:1/1;
}
.gallery-item img{width:100%;height:100%;object-fit:cover;display:block;}
.gallery-item .cap{
  position:absolute;left:0;right:0;bottom:0;
  background:linear-gradient(transparent,rgba(6,9,15,0.92));
  color:var(--text-dim);font-family:var(--font-mono);font-size:8.5px;
  letter-spacing:0.04em;padding:14px 6px 5px;text-align:left;
}

/* diary — deliberately unlike the chat bubbles: this is not addressed to you */
.diary-entry{
  align-self:stretch;margin:6px 4px;
  background:rgba(217,164,65,0.05);
  border:1px solid rgba(217,164,65,0.28);
  border-left:3px solid var(--warn);
  border-radius:10px;padding:12px 14px;
  animation:pop .35s ease;
}
.diary-entry .diary-label{
  font-family:var(--font-mono);font-size:9px;letter-spacing:0.14em;text-transform:uppercase;
  color:var(--warn);margin-bottom:7px;display:block;
}
.diary-entry .diary-text{
  font-family:var(--font-warm);font-size:13.5px;line-height:1.62;
  color:#C9BFA8;white-space:pre-wrap;font-style:italic;
}

.diary-list{
  width:100%;padding:14px;display:flex;flex-direction:column;gap:12px;
  overflow-y:auto;align-content:start;
}
.diary-list .diary-entry{margin:0;}

/* the field guide: what the player knows and he does not */
.guide{width:100%;padding:14px;display:flex;flex-direction:column;gap:12px;overflow-y:auto;text-align:left;}
.guide-note{font-size:13px;color:var(--muted, #9a9a9a);margin:0;}
.guide-map-title{margin:6px 0 -6px;font-family:var(--font-mono);font-size:10px;letter-spacing:0.12em;text-transform:uppercase;color:var(--warn);}
.guide-map{display:block;flex:none;border-radius:10px;overflow:hidden;border:1px solid rgba(255,255,255,0.12);}
.guide-map img{display:block;width:100%;height:auto;}
.guide-section{flex:none;border:1px solid rgba(255,255,255,0.12);border-radius:10px;padding:2px 12px;}
.guide-section summary{cursor:pointer;padding:10px 0;font-family:var(--font-mono);font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:var(--warn);}
.guide-item{padding:0 0 10px;}
.guide-item h4{margin:4px 0 2px;font-size:14px;}
.guide-item p{margin:0;font-size:13px;line-height:1.55;}
.guide-item .guide-tip{margin-top:4px;color:var(--accent);}

/* what you know about him */
.memory{width:100%;max-width:560px;margin:0 auto;padding:14px 18px 28px;display:flex;flex-direction:column;gap:10px;overflow-y:auto;text-align:left;}
.memory-title{font-family:var(--font-mono);font-size:10px;letter-spacing:0.16em;text-transform:uppercase;color:var(--text-dim);margin:10px 0 0;font-weight:500;}
.overlay .memory p.memory-about{max-width:none;color:var(--bubble-boy-text);font-size:14px;line-height:1.55;}
.memory-people,.memory-changes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.memory-people li{display:flex;flex-direction:column;gap:3px;border-left:2px solid var(--border);padding-left:10px;}
.memory-role{font-size:13px;color:var(--bubble-boy-text);line-height:1.45;}
.memory-changes li{font-size:13px;color:var(--bubble-boy-text);line-height:1.45;border-left:2px solid var(--accent-dim);padding-left:10px;}
.memory-choices li{display:flex;flex-direction:column;gap:2px;}
.choice-by{font-family:var(--font-mono);font-size:9px;letter-spacing:0.14em;text-transform:uppercase;color:var(--text-dim);}
.choice-by.yours{color:var(--accent);}
.choice-when{font-size:11px;color:var(--text-dim);}
.avatar{cursor:pointer;}

/* replies, the account and the paywall */
.years-line{margin-top:10px;}
.key-line{margin-top:8px;max-width:300px;line-height:1.5;}
.key-line b, .years-line b{color:var(--accent);font-weight:500;letter-spacing:0.08em;}
#paywallOverlay p{max-width:320px;}
#paywallOverlay p, #accountOverlay p{max-width:320px;}
/* The paywall leads with what is still open in his year, not with the price. */
.paywall-open{width:100%;max-width:320px;text-align:left;}
.paywall-open[hidden], .paywall-ahead[hidden]{display:none;}
#paywallOverlay .paywall-open-head{
  margin:0 0 8px;font-family:var(--font-mono);font-size:10px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--text-dim);text-align:center;
}
.paywall-open-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;}
.paywall-open-list li{border-left:2px solid var(--accent);padding-left:10px;}
.paywall-open-list .po-label{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-family:var(--font-warm);font-weight:600;font-size:13.5px;color:var(--bubble-boy-text);}
#paywallOverlay .paywall-ahead{margin:0;max-width:320px;}
.signin{display:flex;flex-direction:column;gap:10px;align-items:center;width:100%;max-width:300px;}
.signin input{
  width:100%;background:#0D1424;border:1px solid var(--border);border-radius:12px;
  padding:11px 12px;color:var(--text);font-family:var(--font-mono);font-size:14px;text-align:center;
}
.signin input:focus{border-color:var(--accent);outline:none;}
.account-out, .account-in{display:flex;flex-direction:column;gap:12px;align-items:center;}
/* Sign in during the free term: a card in the chat, never in the way. */
.early-signin{
  align-self:center;display:flex;flex-direction:column;align-items:center;gap:8px;
  width:100%;max-width:340px;margin:10px 0;padding:14px 16px;
  background:var(--bg-elevated);border:1px solid var(--border);border-radius:16px;text-align:center;
}
.early-signin .es-title{margin:0;font-family:var(--font-mono);font-size:12px;letter-spacing:0.08em;color:var(--accent);}
.early-signin .es-text{margin:0;font-size:13px;line-height:1.5;color:var(--text-dim);}
.early-signin .es-text:empty{display:none;}
.signin[hidden], .account-out[hidden], .account-in[hidden], .credits-chip[hidden]{display:none;}
.account-saves{display:flex;flex-direction:column;gap:6px;width:100%;max-width:300px;}
.account-saves:empty{display:none;}
.account-saves h3{margin:6px 0 0;font-size:11px;font-weight:500;color:var(--text-dim);letter-spacing:0.12em;text-transform:uppercase;}
.save-row{
  display:flex;justify-content:space-between;gap:10px;align-items:center;
  background:transparent;border:1px solid var(--border);border-radius:10px;
  padding:8px 10px;color:var(--text);cursor:pointer;font-family:var(--font-mono);font-size:12px;text-align:left;
}
.save-row:hover{border-color:var(--accent);}
.save-row b{color:var(--accent);font-weight:500;letter-spacing:0.12em;}
/* The runs this browser holds, on the intro. */
.runs-list{display:flex;flex-direction:column;gap:6px;width:100%;max-width:320px;margin-top:6px;}
.runs-list:empty{display:none;}
.runs-list h3{margin:4px 0 0;font-size:11px;font-weight:500;color:var(--text-dim);letter-spacing:0.12em;text-transform:uppercase;}
.run-row{display:flex;gap:6px;align-items:stretch;}
.run-open{
  flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;text-align:left;
  background:transparent;border:1px solid var(--border);border-radius:10px;
  padding:8px 10px;color:var(--text);cursor:pointer;font-family:var(--font-mono);font-size:12px;
}
.run-open:hover{border-color:var(--accent);}
.run-open b{color:var(--accent);font-weight:500;}
.run-open span{overflow-wrap:anywhere;}
.run-open small{color:var(--text-dim);font-size:10.5px;}
.run-delete{
  width:34px;flex-shrink:0;background:transparent;border:1px solid var(--border);border-radius:10px;
  color:var(--text-dim);cursor:pointer;font-size:16px;
}
.run-delete:hover{color:#C97B7B;border-color:#C97B7B;}
.credits-chip{
  height:24px;padding:0 9px;border-radius:12px;border:1px solid var(--border);
  background:transparent;color:var(--text-dim);font-family:var(--font-mono);font-size:11px;cursor:pointer;
}
.credits-chip.low{color:var(--accent);border-color:var(--accent);}

/* share card */
.share-body{
  width:100%;padding:16px;display:flex;flex-direction:column;align-items:center;gap:12px;overflow-y:auto;
}
.share-body img{width:100%;max-width:340px;border-radius:12px;border:1px solid var(--border);display:block;}

/* endings */
.endings-list{
  width:100%;padding:14px;margin:0;list-style:none;display:flex;flex-direction:column;gap:8px;
  overflow-y:auto;text-align:left;
}
.endings-list li{
  border:1px solid var(--border);border-radius:12px;padding:11px 13px;background:var(--bubble-boy);
}
.endings-list .e-title{font-weight:700;font-size:13.5px;}
.endings-list li.just-found{border-color:var(--accent);}
.endings-list .e-desc{font-size:12.5px;line-height:1.5;color:var(--text-dim);margin-top:4px;}
/* The ending's name, after the epilogue and the record: a label on the year, not its headline. */
.ending-label{display:flex;flex-direction:column;gap:2px;align-items:center;margin-top:4px;}
.ending-label:has(.ending-name:empty){display:none;}
.overlay p.ending-name{font-family:var(--font-mono);font-size:11px;letter-spacing:0.08em;text-transform:lowercase;color:var(--text-dim);}
.overlay p.ending-name:not(:empty)::before{content:'where it ended · ';}
.overlay p.ending-desc{font-size:12.5px;}
.ending-count{font-family:var(--font-mono);font-size:11px;color:var(--text-dim);letter-spacing:0.06em;margin:4px 0 0;}
.ending-count .new{color:var(--accent);}
.endings-link{margin-top:10px;}

/* lightbox */
.lightbox{
  position:absolute;inset:0;background:rgba(4,6,12,0.985);z-index:10;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:12px;padding:28px 18px;animation:pop .25s ease;
}
.lightbox[hidden]{display:none;}
.lightbox img{max-width:100%;max-height:78%;border-radius:14px;border:1px solid var(--border);}
.lightbox .close{position:absolute;top:16px;right:16px;}
.lightbox .tiny{font-family:var(--font-mono);font-size:10.5px;color:var(--text-dim);margin:0;}

@media (max-width:440px){
  body{padding:0;}
  .phone{height:100vh;max-height:none;border-radius:0;border:none;}
}

/* A lasting change the player made that the story did not plan for. */
.consequence.changed{color:var(--accent);font-style:italic;}
.consequence.fight{font-weight:600;letter-spacing:.01em;}
.consequence.fight::before{content:'⚔ ';font-weight:400;}
.consequence.fight.boss::before{content:'⚔ boss · ';}
.consequence.fight.won{color:var(--accent);}
.consequence.fight.lost{opacity:.8;font-style:italic;}
.consequence.missed{opacity:.6;font-style:italic;}
.consequence.changed::before{content:'his life changed · ';font-style:normal;opacity:.6;}
.consequence.met{color:var(--accent);font-style:italic;}
.consequence.met::before{content:'new in his life · ';font-style:normal;opacity:.6;}
.brochure-own{font-size:.85em;opacity:.7;font-style:italic;margin-top:.4em;}

/* Narration being written out: the rest of the sentence already holds its
   place, invisible, and a quiet cursor sits where the writing has reached.
   The cursor takes no width, so the words never shift. */
.unwritten{visibility:hidden}
.writing{position:relative}
.writing::after{
  content:'▍';position:absolute;right:-.6em;opacity:.6;
  animation:writing-caret 1s steps(1) infinite;
}
@keyframes writing-caret{50%{opacity:0}}
@media (prefers-reduced-motion: reduce){.writing::after{animation:none}}

/* privacy and terms links */
.legal-links{margin-top:6px;}
.legal-links a{color:var(--text-dim);}
.legal-links a:hover{color:var(--accent);}
.linkbtn.danger{color:#C97B7B;font-size:11px;}

/*
  The narration screen. The chat holds only messages; what happened around
  them is told here, on a page of its own, read from the top like a page, and
  the chat comes back the moment he texts.
*/
.phone.narrating .chat,
.phone.narrating .hud,
.phone.narrating .inputrow{display:none;}
.narration{
  flex-grow:1;min-height:0;display:flex;flex-direction:column;
  background:radial-gradient(120% 80% at 50% 30%, rgba(79,199,195,0.06), transparent 70%), var(--bg);
  animation:narrationIn .32s ease;cursor:pointer;
}
.narration[hidden]{display:none;}
.narration.leaving{animation:narrationOut .26s ease forwards;}
@keyframes narrationIn{from{opacity:0;}to{opacity:1;}}
@keyframes narrationOut{from{opacity:1;}to{opacity:0;}}
.narration-page{
  flex-grow:1;overflow-y:auto;padding:28px 26px 12px;
  display:flex;flex-direction:column;align-items:center;gap:16px;
  scroll-behavior:smooth;
}
.narration-page::-webkit-scrollbar{width:4px;}
.narration-page::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px;}
.narration-back{
  align-self:flex-start;margin:12px 0 0 16px;padding:4px 10px;border-radius:12px;
  border:1px solid var(--border);background:transparent;color:var(--text-dim);
  font-family:var(--font-mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;cursor:pointer;
}
.narration-back:hover{color:var(--accent);border-color:var(--accent);}
.narration-hint:empty{visibility:hidden;}
/* Where one stretch of story ends and the next begins, on the page kept for the run. */
.narration-break{width:40%;border:none;border-top:1px solid var(--border);margin:14px 0 6px;opacity:.7;}
.iconbtn.active{color:var(--bg);background:var(--accent);border-color:var(--accent);}
.narration-hint{
  text-align:center;padding:10px 0 16px;font-family:var(--font-mono);font-size:9.5px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--text-dim);opacity:.5;
}
.narration-date{
  font-family:var(--font-mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--accent);opacity:.8;margin-top:8px;text-align:center;
}
.narration .consequence{
  font-family:var(--font-warm);font-size:16px;line-height:1.65;max-width:100%;
  color:var(--bubble-boy-text);padding:0;margin:0;border:none;
  align-self:stretch;text-align:center;
}
.narration .consequence.scene,
.narration .consequence.interlude,
.narration .consequence.bridge{font-size:15.5px;color:var(--bubble-boy-text);opacity:.88;}
.narration .consequence.bridge{border-top:1px dashed var(--accent-dim);border-bottom:1px dashed var(--accent-dim);padding:12px 4px;}
.narration .consequence.shift,
.narration .consequence.turning,
.narration .consequence.changed,
.narration .consequence.met{font-size:13.5px;color:var(--accent);}
.narration .consequence.shift{border-top:1px solid var(--accent-dim);padding-top:10px;}
.narration .consequence.blocked{font-family:var(--font-mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-dim);}
.narration .beat{width:100%;max-width:100%;}
.narration .beat-what{font-size:16px;line-height:1.65;}
.narration .diary-entry{width:100%;}

/*
  The landing page: what this is, who texts you, and how it works. It sits over
  the game and scrolls like a page; the phone underneath waits until someone is
  picked. Same type and bubbles as the game, but in daylight: the page is
  cream with dark text, and only the little phones stay dark, like real
  screens. Every pairing below passes AA: body text is 12:1 or better, dim
  text 5.2:1, the teal accent 5.0:1 (and white on a teal button 5.9:1), all
  measured on the warmest part of the sky as well as the cream.
*/
.landing{
  --bg:#FBF6EE;
  --bg-elevated:#FFFFFF;
  --bubble-boy:#EFE6DA;
  --bubble-boy-text:#2B2A33;
  --bubble-you:#D6EFEC;
  --bubble-you-text:#12403D;
  --accent:#17706B;
  --accent-dim:rgba(23,112,107,0.14);
  --warn:#9A4E1A;
  --danger:#B2394A;
  --good:#2F7A55;
  --text-dim:#655F6B;
  --border:#E5DCCB;
  --serif:'Fraunces', Georgia, serif;
  color:var(--bubble-boy-text);
  position:fixed;inset:0;z-index:50;overflow-y:auto;overflow-x:hidden;
  background:radial-gradient(120% 70% at 50% -10%, #FFE9D0 0%, #FBF3E8 45%, #F7F0E6 85%);
  scroll-behavior:smooth;
}
.landing[hidden]{display:none;}
.landing .startbtn{color:#FFFFFF;}
.landing input{background:var(--bg-elevated);color:var(--bubble-boy-text);}
.landing .landing-account,.landing .moment,.landing .landing-code{box-shadow:0 14px 40px -28px rgba(60,40,20,.45);}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.arrow-icon{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;}
body.on-landing{overflow:hidden;}
.landing-inner{max-width:1180px;margin:0 auto;padding:0 24px 48px;}
.landing-top{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px 16px;padding:22px 0;}
.landing-mark{display:flex;align-items:center;gap:10px;font-family:var(--font-mono);font-size:14px;letter-spacing:.14em;color:var(--bubble-boy-text);}
.landing-mark i{width:10px;height:10px;border-radius:50%;background:var(--accent);}
.landing-nav{font-family:var(--font-mono);font-size:13px;color:var(--text-dim);text-decoration:none;}
.landing-nav:hover{color:var(--accent);}
.landing-navs{display:flex;align-items:center;flex-wrap:wrap;gap:10px 22px;}
button.landing-nav{background:none;border:0;padding:0;cursor:pointer;}
.landing-signin{color:var(--bubble-boy-text);background:var(--bg-elevated) !important;border:1px solid #D9CDB8 !important;border-radius:999px;padding:10px 16px !important;}
.landing-signin:hover{border-color:var(--accent) !important;color:var(--accent);}
.landing-signin[hidden]{display:none;}
.landing-account{
  display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;
  margin:4px auto 8px;padding:20px 18px;max-width:420px;
  background:var(--bg-elevated);border:1px solid var(--border);border-radius:18px;
}
.landing-account[hidden]{display:none;}
.landing-account-part{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;}
.landing-account-part[hidden]{display:none;}
.landing-account-title{margin:0;font-family:var(--font-mono);font-size:13px;letter-spacing:.08em;color:var(--accent);word-break:break-all;}
.landing-account-text{margin:0;font-size:14px;line-height:1.5;color:var(--text-dim);max-width:340px;}
.landing-account-text:empty{display:none;}
.landing-welcome{
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:16px;
  padding:56px 0 48px;
}
/* First visit: the pitch on the left, his first texts on the right. */
.landing-hero{display:flex;flex-wrap:wrap;align-items:center;gap:56px;padding:56px 0 88px;}
.landing-welcome[hidden],.landing-hero[hidden]{display:none;}
.hero-copy{flex:999 1 480px;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:22px;}
.landing-kicker{
  margin:0;font-family:var(--font-mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--warn);
}
.landing-title{margin:0;font-family:var(--serif);font-weight:500;font-size:clamp(34px,5vw,60px);line-height:1.08;letter-spacing:-.01em;max-width:760px;color:#22212A;}
.landing-title em{color:var(--accent);}
.landing-welcome .landing-title{font-size:clamp(30px,4.4vw,48px);}
.landing-lede{margin:0;max-width:520px;font-size:19px;line-height:1.6;color:#55505B;}
.hero-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-top:6px;}
.landing .landing-cta,.landing-welcome .startbtn{
  display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:0 26px;border-radius:999px;
  text-decoration:none;font-family:var(--font-mono);font-size:14px;font-weight:500;
}
.hero-more{display:inline-flex;align-items:center;min-height:52px;padding:0 12px;color:var(--bubble-boy-text);font-family:var(--font-mono);font-size:13px;}
.hero-more:hover{color:var(--accent);}
.landing-price{margin:0;color:var(--text-dim);font-family:var(--font-mono);font-size:12px;}
.hero-phone{flex:1 1 340px;display:flex;justify-content:center;position:relative;}
.hero-glow{position:absolute;width:320px;height:320px;border-radius:50%;background:#FFD9AE;opacity:.55;top:-30px;right:10%;}
.hero-device{position:relative;width:320px;max-width:100%;border-radius:40px;padding:12px;background:#0B0F18;box-shadow:0 40px 80px -30px rgba(60,40,20,.55);transform:rotate(2deg);}
.hero-screen{border-radius:30px;overflow:hidden;background:linear-gradient(180deg,#0F2A30 0%,#0A0E17 85%);display:flex;flex-direction:column;height:540px;}
.hero-status{display:flex;justify-content:space-between;padding:12px 20px 6px;font-family:var(--font-mono);font-size:11px;color:#C9D2E0;}
.hero-head{display:flex;align-items:center;gap:10px;padding:8px 16px 12px;border-bottom:1px solid rgba(255,255,255,.07);}
.hero-head b{display:block;font-size:15px;color:#E7ECF5;}
.hero-head i{display:block;font-style:normal;font-family:var(--font-mono);font-size:11px;color:#4FC7C3;}
.hero-avatar{width:34px;height:34px;border-radius:50%;background:#4FC7C3;color:#0A0E17;display:flex;align-items:center;justify-content:center;font-weight:700;}
.hero-chat{flex:1;display:flex;flex-direction:column;justify-content:flex-end;gap:8px;padding:14px;}
.hero-chat p{margin:0;}
.hero-when{text-align:center;font-family:var(--font-mono);font-size:10px;letter-spacing:.1em;color:#8A95A8;margin-bottom:4px !important;}
.hb{align-self:flex-start;max-width:84%;padding:9px 12px;border-radius:16px 16px 16px 4px;background:#1B2436;color:#E7ECF5;font-size:14px;line-height:1.4;}
.hb.you{align-self:flex-end;border-radius:16px 16px 4px 16px;background:#123234;color:#CFF6F2;}
.hero-input{margin:0 12px 14px;padding:11px 14px;border-radius:18px;border:1px solid rgba(255,255,255,.1);font-family:var(--font-mono);font-size:12px;color:#8A95A8;}
.landing-section{padding:72px 0;}
.landing-h2{
  margin:0 0 10px;font-family:var(--font-mono);font-size:12px;font-weight:500;
  letter-spacing:.16em;text-transform:uppercase;color:var(--warn);
}
.section-title{margin:0 0 36px;font-family:var(--serif);font-weight:500;font-size:clamp(28px,3.4vw,38px);line-height:1.15;color:#22212A;}
.landing-welcome .runs-list{max-width:380px;}
/* The people: a white band across the whole width. */
.landing-band{
  margin:0 calc(50% - 50vw);padding:80px calc(50vw - 50%);
  background:#FFFFFF;border-top:1px solid #EFE6DA;border-bottom:1px solid #EFE6DA;
}
.section-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px 40px;margin-bottom:36px;}
.section-head .section-title{margin:0;}
.section-aside{margin:0;max-width:380px;font-size:16px;line-height:1.6;color:var(--text-dim);}

/* The picker: one phone per character, each in their own colours. */
.picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px;}
.pick{
  display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;text-align:left;
  padding:14px 14px 18px;border-radius:22px;background:var(--bg);border:1px solid #EFE6DA;
}
.pick .mini{width:100%;height:330px;margin-bottom:8px;box-shadow:0 18px 30px -20px rgba(60,40,20,.45);}
.pick-name{margin:4px 4px 0;font-family:var(--serif);font-size:24px;font-weight:500;color:#22212A;}
.pick-meta{margin:0 4px;font-family:var(--font-mono);font-size:11px;line-height:1.5;color:var(--text-dim);min-height:3em;}
.pick-hook{margin:0 4px;font-size:15.5px;line-height:1.5;color:var(--bubble-boy-text);flex:1;}
.pick-go{
  margin-top:10px;min-height:44px;border-radius:999px;padding:0 18px;cursor:pointer;
  font-family:var(--font-mono);font-size:13px;font-weight:500;
  background:transparent;color:var(--bubble-boy-text);border:1px solid var(--bubble-boy-text);
}
.pick-go:hover{background:var(--bubble-boy-text);color:#FFFFFF;}
.pick-extra{margin:0 4px;font-family:var(--font-mono);font-size:10.5px;color:var(--text-dim);min-height:1.4em;}

.mini{
  --c-accent:var(--accent);--c-wall:#0F2A30;--c-wall-to:#0A0E17;
  position:relative;width:200px;height:410px;border-radius:28px;padding:9px;
  background:#05070D;border:1px solid #1C2335;box-shadow:0 24px 44px -16px rgba(60,40,20,.45);
  /* The phones keep the game's night-screen colours inside the daylight page. */
  --bg:#0A0E17;--bubble-boy-text:#E7ECF5;--text-dim:#7A8598;--accent:#4FC7C3;--border:#212A3D;
  cursor:pointer;text-align:left;font:inherit;color:inherit;
}
.mini:hover{border-color:var(--c-accent);}
.mini-screen{
  position:relative;height:100%;border-radius:22px;overflow:hidden;display:flex;flex-direction:column;
  background:linear-gradient(180deg,var(--c-wall) 0%,var(--c-wall-to) 85%);
}
.mini-screen::before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.55;}
/* Wallpapers: a hint of where they are, behind the chat. */
.wall-suns .mini-screen::before{
  background:
    radial-gradient(circle at 74% 18%, rgba(255,236,160,.55) 0 18px, transparent 19px),
    radial-gradient(circle at 88% 26%, rgba(255,214,140,.35) 0 11px, transparent 12px),
    radial-gradient(ellipse at 50% 120%, rgba(150,180,70,.35), transparent 60%);
}
.wall-mountains .mini-screen::before{
  opacity:1;
  background:
    radial-gradient(circle at 20% 14%, rgba(220,230,255,.6) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 9%, rgba(220,230,255,.5) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 20%, rgba(220,230,255,.45) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 24%, rgba(220,230,255,.4) 0 1px, transparent 2px),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120' preserveAspectRatio='none'><path d='M0 120 L0 70 L30 45 L52 62 L88 18 L118 55 L140 40 L170 66 L200 50 L200 120 Z' fill='%23A3B8F2' fill-opacity='.16'/><path d='M0 120 L0 92 L40 74 L70 88 L110 66 L150 86 L200 72 L200 120 Z' fill='%23A3B8F2' fill-opacity='.12'/><path d='M80 26 L88 18 L96 28 L91 25 L86 29 Z' fill='%23ffffff' fill-opacity='.35'/></svg>") bottom/100% 55% no-repeat;
}
.wall-river .mini-screen::before{
  background:repeating-linear-gradient(170deg, transparent 0 22px, rgba(242,166,90,.08) 22px 24px);
}
.wall-ruled .mini-screen::before{
  background:
    linear-gradient(90deg, transparent 26px, rgba(231,185,90,.22) 26px 27px, transparent 27px),
    repeating-linear-gradient(180deg, transparent 0 19px, rgba(231,185,90,.09) 19px 20px);
}
.mini-status{
  position:relative;display:flex;justify-content:space-between;align-items:center;
  padding:8px 14px 4px;font-family:var(--font-mono);font-size:9.5px;color:var(--bubble-boy-text);opacity:.85;
}
.mini-batt{display:inline-flex;align-items:center;gap:4px;}
.mini-batt i{position:relative;width:18px;height:9px;border:1px solid currentColor;border-radius:2px;display:inline-block;}
.mini-batt i::after{content:'';position:absolute;left:1px;top:1px;bottom:1px;width:calc(var(--b,60%) - 2px);background:currentColor;border-radius:1px;}
.mini-batt.low{color:#E0806E;}
.mini-head{
  position:relative;z-index:1;background:rgba(5,7,13,.25);display:flex;align-items:center;gap:8px;padding:6px 12px 8px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.mini-avatar{
  width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:700;color:#0A0E17;background:var(--c-accent);
}
.mini-who b{display:block;font-size:12.5px;color:var(--bubble-boy-text);}
.mini-who span{display:block;font-family:var(--font-mono);font-size:9px;color:var(--c-accent);}
.mini-chat{
  position:relative;flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;
  gap:5px;padding:10px 10px 12px;
}
.mini-bubble{
  align-self:flex-start;max-width:88%;padding:6px 9px;border-radius:12px 12px 12px 4px;
  font-size:11.5px;line-height:1.38;color:var(--bubble-boy-text);background:rgba(27,36,54,.92);
  border:1px solid rgba(255,255,255,.04);animation:miniIn .3s ease;
}
.mini-typing{align-self:flex-start;display:flex;gap:3px;padding:8px 10px;border-radius:12px;background:rgba(27,36,54,.92);}
.mini-typing span{width:5px;height:5px;border-radius:50%;background:var(--c-accent);opacity:.5;animation:miniDot 1s infinite;}
.mini-typing span:nth-child(2){animation-delay:.15s;}
.mini-typing span:nth-child(3){animation-delay:.3s;}
.mini-input{
  position:relative;margin:0 10px 10px;padding:7px 10px;border-radius:14px;border:1px solid rgba(255,255,255,.08);
  font-family:var(--font-mono);font-size:9.5px;color:var(--text-dim);background:rgba(5,7,13,.5);
}
@keyframes miniIn{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
@keyframes miniDot{0%,100%{opacity:.3;}50%{opacity:1;}}

/* How it works, the example, the differences, the questions. */
.how{list-style:none;counter-reset:how;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:32px;}
.how li{counter-increment:how;display:block;padding-top:18px;border-top:2px solid var(--bubble-boy-text);font-size:16px;line-height:1.6;color:#55505B;}
.how li::before{content:counter(how);display:block;margin-bottom:12px;font-family:var(--serif);font-size:44px;line-height:1;color:var(--accent);}
.how b{display:block;font-size:20px;color:var(--bubble-boy-text);margin-bottom:6px;}
.moment{display:flex;flex-wrap:wrap;align-items:center;gap:40px 48px;padding:48px;border-radius:32px;background:#FFFFFF;border:1px solid #EFE6DA;}
.moment-chat{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:10px;}
.moment-chat .landing-h2{margin-bottom:6px;}
.m-bubble{max-width:88%;padding:11px 15px;border-radius:18px;font-size:16px;line-height:1.45;}
.m-bubble.boy{align-self:flex-start;background:var(--bubble-boy);color:var(--bubble-boy-text);border-bottom-left-radius:4px;}
.m-bubble.you{align-self:flex-end;background:var(--bubble-you);color:var(--bubble-you-text);border-bottom-right-radius:4px;}
.moment-arrow{color:var(--warn);}
.moment-arrow .arrow-icon{width:40px;height:40px;stroke-width:1.6;}
.moment-story{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:12px;}
.moment-story p{margin:0;}
.moment-story .moment-when{font-family:var(--font-mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--text-dim);}
.moment-story p:not([class]){font-family:var(--serif);font-size:26px;line-height:1.4;color:#22212A;}
.moment-story .moment-shift{font-family:var(--font-mono);font-size:13px;color:var(--accent);}
.moment-story .moment-note{margin-top:6px;font-size:13px;color:var(--text-dim);}
.diff{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;}
.diff li{padding:26px;border-radius:22px;font-size:15.5px;line-height:1.6;color:#55505B;background:#FFF1DF;}
.diff li:nth-child(2){background:#E4F2EF;}
.diff li:nth-child(3){background:#EEE8F4;}
.diff b{display:block;font-family:var(--serif);font-weight:500;font-size:22px;line-height:1.3;color:#22212A;margin-bottom:8px;}
.faq-section{display:flex;flex-wrap:wrap;gap:24px 48px;}
.faq-head{flex:1 1 280px;}
.faq{flex:999 1 520px;min-width:0;display:flex;flex-direction:column;}
.faq details{border-bottom:1px solid var(--border);padding:0 4px;}
.faq summary{cursor:pointer;padding:20px 0;font-size:18px;font-weight:600;color:#22212A;}
.faq summary:hover{color:var(--accent);}
.faq p{margin:0 0 20px;font-size:16px;line-height:1.65;color:#55505B;}
.faq a{color:var(--accent);}
.landing-code{
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;max-width:520px;
  margin:0 0 56px;padding:30px;border-radius:24px;background:#FFFFFF;border:1px solid #EFE6DA;
}
.code-title{margin:0;font-size:18px;font-weight:700;color:var(--bubble-boy-text);}
.landing-code .tiny{margin:0;font-size:14px;color:var(--text-dim);}
.landing-code .resume{margin-top:8px;}
.landing-code .resume input{
  width:150px;min-height:46px;padding:0 14px;border-radius:12px;border:1px solid #D9CDB8;background:var(--bg);
  color:var(--bubble-boy-text);font-family:var(--font-mono);font-size:15px;letter-spacing:.2em;text-transform:uppercase;text-align:left;
}
.landing-code .linkbtn{min-height:46px;padding:0 18px;border-radius:999px;border:1px solid var(--bubble-boy-text);color:var(--bubble-boy-text);font-size:13px;text-decoration:none;}
.landing-error:empty{display:none;}
.landing-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;padding-top:32px;border-top:1px solid var(--border);}
.landing-foot .legal-links{margin:0;font-family:var(--font-mono);font-size:12px;color:var(--text-dim);}
.landing-note{margin:0;max-width:620px;font-size:13.5px;line-height:1.6;color:var(--text-dim);}
.landing-note a{color:var(--accent);}
.intro-back{position:absolute;top:10px;left:10px;font-size:11px;text-decoration:none;}
.intro-back[hidden]{display:none;}
.run-open i{font-style:normal;color:var(--text-dim);}
/* On a phone, the picker swipes sideways: one person at a time, the next peeking in. */
@media (max-width:600px){
  .picker{
    flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scroll-snap-type:x mandatory;
    gap:16px;margin:0 -16px;padding:0 16px 8px;scrollbar-width:none;
  }
  .picker::-webkit-scrollbar{display:none;}
  .picker{display:flex;}
  .pick{flex:0 0 78%;width:auto;scroll-snap-align:center;}
  .pick .mini{height:360px;}
  .landing-inner{padding:0 16px 40px;}
  .landing-hero{padding:32px 0 56px;gap:32px;}
  /* The demo chat still shows on a phone — it is the one place on the page where the
     player's own reply appears — but flat and short, under the button, so the
     pitch and the call to action keep the first screen. */
  .hero-phone{flex:1 1 100%;}
  .hero-glow,.hero-status,.hero-input,.hero-when{display:none;}
  .hero-device{width:100%;max-width:380px;border-radius:28px;padding:8px;transform:none;box-shadow:0 24px 48px -28px rgba(60,40,20,.5);}
  .hero-screen{height:auto;border-radius:22px;}
  .hero-head{padding:12px 14px 10px;}
  .hero-chat{padding:12px;gap:7px;}
  .hb{font-size:14.5px;}
  .landing-band{padding:56px calc(50vw - 50%);}
  .landing-section{padding:52px 0;}
  .moment{padding:26px 20px;border-radius:24px;}
  .moment-arrow{transform:rotate(90deg);margin:0 auto;}
}
