/* are you my talking stage.

   This should read as a dating app that happens to be keeping score, not as a
   game wearing a dating-app costume. So: warm off-white ground, one accent,
   photographs given the room they'd get in a real profile, and the scorekeeping
   pushed down to the quietest thing on screen. */

:root{
  --bg:#f7f3f0;          /* warm paper */
  --surface:#fff;
  --ink:#17110f;
  --ink-2:#5c524d;
  --muted:#928681;
  --line:#e9e0da;
  --line-2:#d8ccc4;
  --accent:#e0455c;      /* the only saturated colour in the app */
  --accent-soft:#fdeef0;
  --accent-ink:#a52339;
  --good:#1f7a5c;
  --good-soft:#e8f5ef;
  --shadow:0 1px 2px rgba(23,17,15,.05), 0 8px 24px rgba(23,17,15,.07);
  --shadow-lg:0 2px 6px rgba(23,17,15,.06), 0 20px 50px rgba(23,17,15,.14);
  --r:20px;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font:16px/1.5 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Inter,system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
  display:flex;justify-content:center;overscroll-behavior:none;
}
/* The game never scrolls. Everything is sized to fit the viewport, and the
   photograph is the element that gives up space when there isn't enough —
   which is why it flexes rather than holding an aspect ratio. */
#app{width:100%;max-width:430px;height:100dvh;display:flex;flex-direction:column;
  position:relative;background:var(--bg);overflow:hidden}
/* Every screen is mounted inside an unclassed wrapper div. It has to be a
   full-height flex column too, or .screen{flex:1} has nothing to fill and the
   photographs collapse to their min-height. Overlays and score pops are
   absolutely positioned and must stay out of the flex flow. */
#app > div:not(.overlay):not(.float){flex:1 1 auto;min-height:0;display:flex;flex-direction:column}

/* ------------------------------------------------------------------ app bar */
/* A product header, not a scoreboard. The score is a quiet pill on the right;
   how deep you are shows as a hairline of progress, the way an app shows
   profile completeness. */
.hud{
  flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:12px 16px 8px;
  font-size:13px;color:var(--muted);
}
.hud .grow{flex:1}
.hud > span{white-space:nowrap}
.hud .brand{font-weight:700;font-size:17px;color:var(--ink);letter-spacing:-.03em}
.hud b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.hud .tag{background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:4px 10px;font-size:12px;white-space:nowrap}
.streak{color:var(--accent);font-weight:600;font-size:12.5px}

.roster{flex:0 0 auto;display:flex;gap:6px;padding:0 16px 10px;overflow-x:auto;scrollbar-width:none}
.roster::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;
  background:var(--surface);border:1px solid var(--line);
}
.chip.hot{border-color:#f0c2c9;background:var(--accent-soft)}
.chip .nm{font-size:12.5px;color:var(--ink-2)}
.chip.hot .nm{color:var(--accent-ink)}
.pips{display:flex;gap:2.5px}
.pip{width:4.5px;height:4.5px;border-radius:50%;background:var(--line-2)}
.pip.on{background:var(--accent)}
.pip.hot{background:var(--accent-ink)}

.screen{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 16px 16px;gap:11px}
.spacer{flex:1}
.sect{font-size:12.5px;font-weight:600;color:var(--muted);margin:2px 0 -4px}

/* -------------------------------------------------------------------- timer */
/* A story bar: hairline, ignorable until it isn't. */
.timer{height:3px;border-radius:999px;background:var(--line);overflow:hidden;margin-bottom:2px}
.timer i{display:block;height:100%;width:100%;background:var(--ink-2);transform-origin:left;transition:transform .1s linear}
.timer.warn i{background:var(--accent)}

/* ------------------------------------------------------------- profile card */
.card{
  background:var(--surface);border-radius:var(--r);overflow:hidden;border:1px solid var(--line);
  box-shadow:var(--shadow);animation:rise .34s cubic-bezier(.2,.9,.3,1);
  display:flex;flex-direction:column;min-height:0;flex:1 1 auto;
}
@keyframes rise{from{transform:translateY(14px);opacity:0}to{transform:none;opacity:1}}
.card .pic{position:relative;line-height:0;flex:1 1 0;min-height:96px;overflow:hidden;background:var(--line)}
.card .pic > svg,.card .pic > img.av{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;object-position:50% 24%}


/* The name sits UNDER the photograph. Laying type over a face meant fighting
   the picture with scrims and shadows, and it looked it. */
.card .who{flex:0 0 auto;padding:11px 15px 10px;border-bottom:1px solid var(--line)}
.card .who h2{margin:0;font-size:clamp(20px,5.5vw,25px);font-weight:700;letter-spacing:-.03em;color:var(--ink)}
.card .who span{font-weight:400;color:var(--muted)}
.card .who small{display:block;font-size:12px;color:var(--muted);margin-top:1px}

/* Facts read as profile details — an icon and a line, not a table. */
.facts{list-style:none;margin:0;padding:2px 4px;display:grid;flex:0 0 auto;overflow:hidden}
.facts li{display:flex;gap:11px;align-items:center;font-size:15.5px;color:var(--ink);padding:8px 13px;border-bottom:1px solid var(--line)}
.facts li:last-child{border-bottom:0}
.facts li b{font-weight:500;color:var(--ink)}
.card .pic + .facts{padding-top:6px}
.facts .k{
  flex:0 0 30px;height:30px;display:grid;place-items:center;border-radius:50%;
  background:var(--bg);color:var(--ink-2);
}
.facts .k svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.flag{
  flex:0 0 auto;margin:0;padding:10px 15px;display:flex;gap:9px;align-items:flex-start;
  border-top:1px solid var(--line);font-size:14.5px;color:var(--ink-2);
}
.flag em{font-style:normal;flex:0 0 auto}

/* The lie gets its own card — it's the one thing on screen that isn't theirs. */
.prompt{
  flex:0 0 auto;padding:13px 16px;background:var(--surface);border-radius:var(--r);
  border:1px solid var(--line);box-shadow:var(--shadow);
}
.prompt span{display:block;font-size:12.5px;font-weight:600;color:var(--accent);margin-bottom:4px}
.prompt b{display:block;font-size:clamp(16px,4.6vw,19px);line-height:1.28;font-weight:600;letter-spacing:-.015em}

/* ------------------------------------------------------------------ reveal */
/* A message thread, the way iOS shows one you've just opened: big round avatar,
   name, then the conversation. */
.thread{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  box-shadow:var(--shadow);padding:18px 15px 15px;flex:0 0 auto;animation:rise .34s cubic-bezier(.2,.9,.3,1);
}
.threadhead{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:18px}
.threadhead svg,.threadhead img{
  width:clamp(64px,20vw,86px);height:clamp(64px,20vw,86px);border-radius:50%;object-fit:cover;object-position:50% 24%;
  box-shadow:0 2px 10px rgba(23,17,15,.12);
}
.threadhead h3{margin:10px 0 1px;font-size:19px;font-weight:600;letter-spacing:-.02em}
.threadhead small{color:var(--muted);font-size:12.5px}
.thread .chat{border-top:1px solid var(--line);padding-top:16px;min-height:82px;flex:none;overflow:visible}
.thread .bub{font-size:16.5px;max-width:88%}

/* Three dots, staggered, the way every messaging app does it. */
.bub.typing{display:flex;gap:5px;align-items:center;padding:15px 16px;width:fit-content}
.bub.typing i{width:7px;height:7px;border-radius:50%;background:#a1968f;animation:blink 1.25s infinite}
.bub.typing i:nth-child(2){animation-delay:.16s}
.bub.typing i:nth-child(3){animation-delay:.32s}
@keyframes blink{0%,62%,100%{opacity:.35;transform:translateY(0)}31%{opacity:1;transform:translateY(-3px)}}

/* -------------------------------------------------------------------- quiz */
.qtier{font-size:13px;font-weight:600;color:var(--muted)}
.q{font-size:clamp(19px,5.6vw,24px);line-height:1.2;font-weight:700;letter-spacing:-.03em;margin:0;flex:0 0 auto}
.qface{display:flex;justify-content:center;margin:2px 0}
.qface{flex:1 1 auto;min-height:0}
.qface svg,.qface img{
  height:100%;width:auto;max-width:100%;aspect-ratio:4/5;border-radius:var(--r);
  object-fit:cover;object-position:50% 24%;box-shadow:var(--shadow-lg);
}
.opts{display:grid;gap:8px;flex:0 0 auto}
.opt{
  appearance:none;text-align:left;font:inherit;font-size:clamp(14.5px,4.2vw,16px);color:var(--ink);
  background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:clamp(11px,3.2vw,14px) 15px;
  cursor:pointer;transition:transform .08s,border-color .12s,background .12s;
  box-shadow:0 1px 2px rgba(23,17,15,.04);
}
.opt:active{transform:scale(.99)}
.opt:hover{border-color:var(--line-2)}
.opt.right{background:var(--good-soft);border-color:#a8d8c5;color:var(--good);font-weight:600}
.opt.wrong{background:var(--accent-soft);border-color:#f0c2c9;color:var(--accent-ink)}
.opt:disabled{cursor:default}
.verdict{min-height:22px;font-size:14.5px;font-weight:600}
.verdict.good{color:var(--good)}
.verdict.bad{color:var(--accent-ink)}

/* -------------------------------------------------------------------- chat */
.chathead{display:flex;align-items:center;gap:11px;padding:2px 0 12px;border-bottom:1px solid var(--line)}
.chathead svg,.chathead img{width:38px;height:38px;border-radius:50%;object-fit:cover;object-position:50% 24%}
.chathead h3{margin:0;font-size:16px;font-weight:600;letter-spacing:-.01em}
.chathead small{color:var(--good);font-size:12px}
.chat{display:flex;flex-direction:column;gap:7px;flex:1;min-height:0;overflow-y:auto;padding-top:6px}
.bub{max-width:80%;padding:10px 14px;border-radius:20px;font-size:15.5px;line-height:1.35;animation:pop .22s ease-out}
@keyframes pop{from{transform:translateY(6px);opacity:0}to{transform:none;opacity:1}}
.bub.them{align-self:flex-start;background:#ece5e0;color:var(--ink);border-bottom-left-radius:6px}
.bub.you{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:6px}
.bub.you.bad{background:#95787a}

/* ---------------------------------------------------------------- overlays */
.overlay{
  position:absolute;inset:0;background:rgba(247,243,240,.94);backdrop-filter:blur(10px);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;
  padding:26px;text-align:center;z-index:9;animation:pop .2s;
}
.overlay h2{margin:0;font-size:23px;font-weight:700;letter-spacing:-.025em}
.dumpcard{background:var(--surface);border-radius:var(--r);padding:20px;width:100%;max-width:330px;box-shadow:var(--shadow-lg)}
.dumpcard svg,.dumpcard img{width:72px;height:72px;border-radius:50%;object-fit:cover;object-position:50% 24%}
.dumpcard .msg{
  background:#ece5e0;border-radius:18px;border-bottom-left-radius:6px;
  padding:11px 14px;font-size:15px;text-align:left;margin-top:12px;
}

/* ------------------------------------------------------------------ inputs */
button.big{
  appearance:none;font:inherit;font-size:16.5px;font-weight:600;letter-spacing:-.01em;border:0;flex:0 0 auto;
  border-radius:999px;padding:14px 18px;background:var(--accent);color:#fff;cursor:pointer;width:100%;
  box-shadow:0 6px 18px rgba(224,69,92,.26);
}
button.big:active{transform:scale(.99)}
button.ghost{
  appearance:none;font:inherit;font-size:14.5px;flex:0 0 auto;font-weight:500;background:transparent;border:0;
  color:var(--muted);border-radius:999px;padding:12px 16px;cursor:pointer;width:100%;
}
button.ghost:hover{color:var(--ink-2)}
input.name{
  appearance:none;width:100%;font:inherit;font-size:16px;background:var(--surface);
  border:1px solid var(--line);color:var(--ink);border-radius:14px;padding:14px 16px;
}
input.name:focus{outline:none;border-color:var(--accent)}

.tiles{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.tile{
  appearance:none;font:inherit;font-size:15px;background:var(--surface);border:1px solid var(--line);
  color:var(--ink);border-radius:15px;padding:14px;cursor:pointer;text-align:left;
  display:flex;align-items:center;gap:9px;
}
.tile.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-ink);font-weight:600}
.tile .e{font-size:17px;line-height:1}

h1.logo{font-size:clamp(24px,7.2vw,30px);font-weight:700;letter-spacing:-.04em;margin:14px 0 2px;color:var(--ink);flex:0 0 auto}
.sub{color:var(--ink-2);font-size:clamp(13.5px,3.9vw,15px);line-height:1.4;margin:0;flex:0 0 auto}

/* ------------------------------------------------------------------- board */
.board{border-radius:var(--r);overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
.board .row{display:flex;gap:12px;padding:12px 16px;font-size:15px;border-bottom:1px solid var(--line)}
.board .row:last-child{border-bottom:0}
.board .row.me{background:var(--accent-soft);color:var(--accent-ink);font-weight:600}
.board .rk{width:20px;color:var(--muted)}
.board .row.me .rk{color:var(--accent-ink)}
.board .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board .sc{font-variant-numeric:tabular-nums;font-weight:600}
.statgrid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:9px;text-align:center}
.stat{background:var(--surface);border-radius:16px;padding:14px 6px;box-shadow:var(--shadow)}
.stat b{display:block;font-size:23px;font-weight:700;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.stat span{font-size:11.5px;color:var(--muted)}
.share{
  background:var(--surface);border:1px dashed var(--line-2);border-radius:16px;
  padding:14px;font-size:13.5px;color:var(--ink-2);cursor:pointer;white-space:pre-line;line-height:1.5;
}
.float{position:absolute;font-weight:700;pointer-events:none;animation:lift .9s ease-out forwards;color:var(--good)}
@keyframes lift{to{transform:translateY(-42px);opacity:0}}

/* ------------------------------------------------------------- the opening */
/* One question, answered by tapping a face. The answer is the start button. */

.screen.open h1.logo{margin:0 0 2px;font-size:clamp(25px,7.6vw,32px)}
.pickgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:8px}
.pick{
  appearance:none;border:0;padding:0;cursor:pointer;overflow:hidden;
  border-radius:var(--r);background:var(--surface);box-shadow:var(--shadow);
  display:flex;flex-direction:column;min-height:0;
  transition:transform .16s cubic-bezier(.2,.9,.3,1),box-shadow .16s;
}
.pick.wide{grid-column:1/3}
/* The grid has to out-grow the two spacers around it, or they split the free
   space evenly and squash the photographs to nothing on a tall viewport. */
.pickgrid{flex:9 1 0;min-height:0;grid-template-rows:1.35fr 1fr}
.screen.open .spacer{flex:1 1 0;max-height:44px}
.pick:active,.pick.chosen{transform:scale(.97);box-shadow:0 0 0 3px var(--accent), var(--shadow)}
.pickpics{flex:1 1 0;min-height:0;display:flex}
.pickpics img{flex:1;width:100%;height:100%;object-fit:cover;object-position:50% 22%}
.picklabel{
  flex:0 0 auto;padding:10px 14px;font:inherit;font-size:16px;font-weight:600;
  color:var(--ink);text-align:left;letter-spacing:-.01em;
}
.fine{font-size:13px;color:var(--muted);text-align:center;margin:0}

/* Claim your score once there is one. */
.claim{display:grid;gap:9px}

/* --------------------------------------------------------- profile photos */
/* Several shots of one person, tap to move through — and dots so it's obvious
   there are more, because the quiz will use one you might not have opened. */
/* Every shot is absolutely positioned, including the visible one. The old rule
   flipped the active shot to position:relative so it would give the container
   its height — which broke the moment .pic became a flex item sized by flex
   rather than by its content: a percentage height against an auto-height parent
   resolves to zero, and the photographs vanished. .pic gets its height from
   flex now, so nothing needs to be in flow. */
.pic .shot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 24%;opacity:0;transition:opacity .18s}
.pic .shot.on{opacity:1}
.dots{position:absolute;top:10px;left:0;right:0;display:flex;gap:4px;justify-content:center;padding:0 12px;z-index:2}
.dots i{flex:1;max-width:46px;height:3px;border-radius:999px;background:rgba(255,255,255,.42);box-shadow:0 1px 2px rgba(0,0,0,.2)}
.dots i.on{background:#fff}

/* -------------------------------------------------------------- brand mark */
/* The name, so the opening screen isn't just a question floating in space. */
.brand-lockup{display:flex;align-items:center;gap:9px;padding-top:6px}
.brand-lockup .mark{width:30px;height:30px;flex:0 0 auto;border-radius:9px;overflow:hidden;
  box-shadow:0 2px 8px rgba(224,69,92,.32)}
.brand-lockup .mark svg{width:100%;height:100%;display:block}
.brand-lockup .word{font-size:18px;font-weight:700;letter-spacing:-.035em;color:var(--ink)}
.screen.open{justify-content:flex-start}

/* ------------------------------------------------------- small / old phones */
/* Nothing may ever fall off the bottom. On short screens the vertical rhythm
   compresses and the photograph gives up more of its height; on narrow ones the
   wordmark truncates rather than pushing the score off the edge. */
.hud .brand{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media (max-width:360px){
  .hud{gap:6px;padding:10px 12px 6px}
  .hud .brand{font-size:15px}
  .hud .tag{padding:3px 8px;font-size:11px}
  .streak{font-size:11.5px}
  .screen{padding:0 12px 12px}
  .roster{padding:0 12px 8px}
}

@media (max-height:640px){
  .screen{gap:8px;padding-bottom:12px}
  .hud{padding:9px 14px 5px}
  .roster{padding-bottom:7px}
  .card .pic{min-height:70px}
  .card .who{padding:8px 13px 7px}
  .card .who small{display:none}
  .facts li{padding:6px 12px;font-size:14.5px}
  .facts .k{flex-basis:26px;height:26px}
  .facts .k svg{width:14px;height:14px}
  .flag{padding:8px 13px;font-size:13.5px}
  .prompt{padding:10px 14px}
  .prompt span{font-size:11.5px;margin-bottom:2px}
  button.big{padding:12px 16px;font-size:15.5px}
  button.ghost{padding:9px 14px}
  h1.logo{margin:10px 0 2px}
  .thread{padding:14px 13px 12px}
  .threadhead{padding-bottom:12px}
  .bub{font-size:15px;padding:9px 13px}
}
/* The results screen is the one place content can honestly outgrow a short
   phone — a leaderboard has as many rows as it has. It scrolls; nothing else does. */
.screen.scrolls{overflow-y:auto}
