:root {
  --bg: #0b0a10;
  --bg-2: #14121c;
  --panel: #18161f;
  --line: #2a2735;
  --text: #efeef4;
  --muted: #9b97ab;
  --pink: #ff00eb;
  --pink-soft: #ff00eb22;
  --hot: #ff6a2b;
  --hot-soft: #ff6a2b24;
  --good: #3ee08f;
  --bad: #ff5d6c;
  --radius: 0.875rem;
  --wide: 72rem;   /* game screen on big monitors */
  --narrow: 48rem; /* start and end screens */
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

/* Everything is in rem, so the whole game grows on big monitors instead of floating in the middle. */
html { font-size: clamp(15px, 0.6vw + 7px, 21px); }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(60rem 32rem at 85% -10%, #ff00eb18, transparent 60%),
    var(--bg);
  color: var(--text);
  font: 1rem/1.5 var(--body);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.spicy-mode {
  background:
    radial-gradient(60rem 32rem at 85% -10%, #ff6a2b22, transparent 60%),
    radial-gradient(40rem 28rem at 0% 110%, #ff00eb14, transparent 60%),
    var(--bg);
}
[hidden] { display: none !important; }
b.pink, .pink { color: var(--pink); }

/* header */
.top, main, footer { width: min(var(--wide), 100% - 2rem); margin-inline: auto; }
.top {
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.brand { display: flex; gap: 0.875rem; align-items: center; }
.brand img {
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  outline: 3px solid var(--pink); outline-offset: 3px;
}
h1 {
  font: 800 clamp(1.7rem, 3vw, 2.4rem)/0.95 var(--display);
  letter-spacing: -0.02em;
  margin: 0;
}
h1 span { color: var(--pink); }
.stats { display: flex; gap: 0.4rem; margin: 0; }
.stats div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  padding: 0.4rem 0.75rem;
  min-width: 4.25rem;
  text-align: center;
}
.stats dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stats dd { margin: 0; font: 700 1.15rem var(--mono); }

/* panels */
main { flex: 1; display: grid; align-content: start; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
#start, #end { width: min(var(--narrow), 100%); justify-self: center; }
.lede { color: var(--muted); margin: 0 0 1.25rem; font-size: 1.05rem; }
.lede b { color: var(--text); }

.options { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
.opt { border: 0; margin: 0; padding: 0; min-width: 0; }
.opt legend {
  padding: 0;
  margin-bottom: 0.45rem;
  font: 500 0.72rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.modes { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.modes label { cursor: pointer; flex: 1 1 auto; }
.modes input { position: absolute; opacity: 0; pointer-events: none; }
.modes span {
  display: block;
  height: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  color: var(--muted);
  font-size: 0.875rem;
  transition: border-color .15s, background .15s;
}
.modes label:hover span { border-color: #3d394b; }
.modes b { color: var(--text); margin-right: 0.25rem; }
.modes em { font-style: normal; font-family: var(--mono); color: var(--text); }
.modes input:checked + span { border-color: var(--pink); background: var(--pink-soft); }
.modes .spicy input:checked + span { border-color: var(--hot); background: linear-gradient(120deg, var(--hot-soft), var(--pink-soft)); }
.modes input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }

/* buttons */
.btn {
  font: 600 0.95rem var(--body);
  border-radius: 0.625rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  transition: transform .08s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--pink); border-color: var(--pink); color: #12000f; }
.btn.primary:hover:not(:disabled) { background: #ff4ff1; }
.btn.ghost:hover:not(:disabled) { border-color: var(--muted); }
.btn.small { padding: 0.45rem 0.75rem; font-size: 0.8rem; }
.btn i { font-style: normal; color: var(--muted); margin-left: 0.25rem; }
#go { width: 100%; padding-block: 0.9rem; font-size: 1.05rem; }
kbd {
  font: 500 0.7rem var(--mono);
  border: 1px solid #0003;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 0.4rem;
  opacity: .7;
}

/* game screen: message on the left, answers on the right when there's room */
#game { display: grid; gap: 1.25rem; }
.stage, .answers { min-width: 0; }
.ask {
  margin: 0 0 0.6rem;
  font: 500 0.72rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

/* the chat line */
.chat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--line);
  font: 500 0.8rem var(--mono);
  color: var(--muted);
}
.chat-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); flex: none; }
.chat-head .date { margin-left: auto; white-space: nowrap; }
.pool-tag {
  padding: 0.05rem 0.45rem;
  border-radius: 99px;
  background: var(--hot-soft);
  color: var(--hot);
  font-size: 0.72rem;
}
.line {
  padding: 1.4rem 1.15rem 1.5rem;
  font-size: clamp(1.1rem, 1.25vw + 0.6rem, 1.6rem);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-grid; place-items: center;
  width: 1.25em; height: 1.25em;
  border-radius: 4px;
  background: #6441a5;
  font-size: 0.7em;
  vertical-align: 0.15em;
  margin-right: 0.4rem;
}
.who { font-weight: 700; color: var(--pink); }
.colon { color: var(--muted); }
.text img.emote { height: 1.6em; vertical-align: middle; margin: -0.3em 0.05em; }
.text .mention { font-weight: 600; background: #ffffff10; border-radius: 4px; padding: 0 3px; }

.hint-row { display: flex; justify-content: space-between; align-items: center; margin-top: 0.875rem; gap: 0.625rem; }
.worth { font: 500 0.8rem var(--mono); color: var(--muted); }

/* choices */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.choice {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 3.75rem;
  text-align: left;
  padding: 0.65rem 0.875rem;
}
.choice img, .choice .ph { width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none; background: var(--line); }
.choice .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice .key { margin-left: auto; font: 500 0.75rem var(--mono); color: var(--muted); }
.choice:hover:not(:disabled) { border-color: var(--pink); }
.choice.right { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); background: #3ee08f2e; opacity: 1; }
.choice.wrong { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); background: #ff5d6c2e; opacity: 1; }
.choice.right .key, .choice.wrong .key { font-size: 1rem; font-weight: 700; }
.choice.right .key { color: var(--good); }
.choice.wrong .key { color: var(--bad); }

.typed { display: flex; gap: 0.5rem; }
.typed input {
  flex: 1;
  min-width: 0;
  font: 500 1rem var(--body);
  padding: 0.75rem 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
.typed input:focus { outline: none; border-color: var(--pink); }

/* result */
.result { margin-top: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.verdict { margin: 0; font: 800 1.4rem var(--display); }
.verdict.good { color: var(--good); }
.verdict.bad { color: var(--bad); }
.reveal { margin: 0; color: var(--muted); flex: 1; min-width: 12rem; }
.reveal b { color: var(--text); }
.reveal a { color: var(--muted); }
#next { margin-left: auto; }

/* end */
.big { font: 800 clamp(2.5rem, 6vw, 4rem)/1 var(--display); margin: 0 0 0.5rem; }
.recap { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.4rem; max-height: 22rem; overflow-y: auto; overflow-x: hidden; }
.recap li {
  display: flex; gap: 0.625rem; align-items: baseline;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--bg);
  font-size: 0.875rem;
}
.recap .mark { font-weight: 700; }
.recap .ok { color: var(--good); }
.recap .no { color: var(--bad); }
.recap .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recap .c { color: var(--muted); font: 500 0.75rem var(--mono); }
.end-actions { display: flex; gap: 0.5rem; }

footer { margin-block: 1.75rem; color: var(--muted); font-size: 0.75rem; text-align: center; }

@keyframes pop { from { transform: scale(.98); opacity: .6; } to { transform: none; opacity: 1; } }
.line.fresh { animation: pop .18s ease-out; }

/* desktop: two columns, answers stacked so the names have room */
@media (min-width: 1000px) {
  /* header and game sit together in the middle of tall screens, footer at the bottom */
  main { flex: 0 0 auto; }
  .top { margin-top: auto; padding-top: 2rem; }
  footer { margin-top: auto; }
  #game { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.75rem; padding: 1.75rem; align-items: start; }
  .stage { position: sticky; top: 1rem; }
  .line { min-height: 9rem; padding: 1.75rem 1.5rem 2rem; }
  .choices { grid-template-columns: 1fr; }
  .result { margin-top: 1rem; }
  #next { width: 100%; margin-left: 0; }
}

/* phones */
@media (max-width: 600px) {
  .top { margin-top: 1rem; margin-bottom: 0.875rem; gap: 0.75rem; }
  .brand img { width: 2.75rem; height: 2.75rem; }
  h1 { font-size: 1.6rem; }
  .stats { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .stats div { min-width: 0; padding: 0.3rem 0.25rem; }
  .stats dd { font-size: 1rem; }
  .panel { padding: 1rem; }
  #game { gap: 1rem; }
  .modes label { flex-basis: 100%; }
  .line { padding: 1.1rem 1rem 1.2rem; font-size: 1.2rem; }
  .choices { grid-template-columns: 1fr; gap: 0.5rem; }
  .choice { min-height: 3.5rem; }
  .result { gap: 0.5rem 0.75rem; }
  #next { width: 100%; margin-left: 0; padding-block: 0.9rem; }
  #next kbd { display: none; }
  .end-actions .btn { flex: 1; }
}
