/* ================= S01 home ================= */

.os-hero { text-align: center; padding: 22px 0 6px; }
.os-hero .os-eyebrow { display: block; margin-bottom: 10px; }
.os-hero p { color: var(--muted); margin: 12px 0 0; font-size: 16px; line-height: 1.6; }
.os-actions { display: flex; flex-direction: column; gap: 10px; }
.os-progress {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

/* ================= S02/S04 setup ================= */

.os-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.os-tabs .os-btn { font-size: 14px; padding: 12px; }
/* Which tab you are on has to be visible, not just announced. aria-pressed was
   set from the first version and carried the state for a screen reader while
   telling a sighted player nothing — two identical ghost buttons. */
.os-tabs .os-btn[aria-pressed="true"] {
  border-color: var(--signal);
  color: var(--signal);
  background: color-mix(in srgb, var(--signal) 10%, transparent);
}

.os-presets { display: flex; flex-direction: column; gap: 8px; }
.os-preset {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}
.os-preset[aria-pressed="true"] { border-color: var(--signal); }
.os-preset b { font-family: var(--font-display); letter-spacing: 0.08em; font-size: 16px; }
.os-preset .rounds {
  float: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.os-preset[aria-pressed="true"] .rounds { color: var(--signal); }
.os-preset span.blurb { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }

/* The code entry. Six boxes because the shared CODE_LEN is 6 — the handoff
   drew five, which was the old length. */
.os-codeboxes { display: flex; gap: 7px; justify-content: center; }
.os-codeboxes b {
  width: 42px;
  height: 52px;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--signal);
  background: var(--panel);
}
.os-codeboxes b.filled { border-color: var(--signal); }
/* The real input sits invisibly over the boxes, so the device keyboard and
   autofill behave and the boxes are only ever a picture of its value. */
.os-codewrap { position: relative; }
.os-codewrap input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  font-size: 16px;
  letter-spacing: 1em;
  border: 0;
  background: transparent;
}
.os-codewrap input:focus-visible + .os-codeboxes b { border-color: var(--signal-soft); }

/* ================= S03/S05 lobby ================= */

.os-lobby { display: grid; gap: 18px; }
@media (min-width: 56rem) {
  .os-lobby { grid-template-columns: 1fr 1fr; align-items: stretch; }
  /* Stretch, not start: the rule between the panels is a border on the right
     column, and if that column does not reach the left one's full height the
     separator stops halfway and reads as a mistake. */
  .os-roster-panel {
    border-left: 1px solid var(--rule);
    padding-left: 22px;
    /* clearance from the rule is a margin on the framed card opposite, never
       padding here — padding would grow that card until its own border landed
       on the rule and the two read as one broken line */
  }
}

.os-invite {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 16px;
}
@media (min-width: 56rem) { .os-invite { margin-right: 22px; } }

.os-code {
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 46px);
  letter-spacing: 0.14em;
  color: var(--signal);
  margin: 6px 0 12px;
  word-break: break-all;
}
.os-url {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--muted);
}

.os-roster { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.os-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.os-player.is-you { border-color: var(--signal); }
.os-player .av { font-size: 18px; line-height: 1; width: 22px; text-align: center; }
.os-player .nm { flex: 1; font-weight: 500; }
.os-player .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 2px 7px;
}
/* Presence is a dot AND a title, never colour alone. */
.os-player .os-here {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  flex: 0 0 auto;
}
.os-player.is-away .os-here { background: var(--muted); }
.os-player.is-away .nm { color: var(--muted); }

/* ================= the round ================= */

.os-roundbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.os-clock {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.os-clock.is-urgent { color: var(--outsider); }
.os-timer { height: 5px; border-radius: 5px; background: var(--rule); overflow: hidden; }
.os-timer i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--signal);
  transform-origin: left center;
}
.os-timer i.is-urgent { background: var(--outsider); }

/* S06 — held, not shown. A secret that sits on screen is a secret the person
   beside you reads over your shoulder, so it is visible only while a finger is
   down and hides the instant it lifts. */
.os-reveal {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 26px 18px;
  border-radius: 18px;
  border: 1.5px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.os-reveal.is-open { border-color: var(--signal); }
.os-reveal.is-outsider.is-open { border-color: var(--outsider); }
.os-cat { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.1em; }
.os-secret {
  font-family: var(--font-display);
  font-size: clamp(30px, 9vw, 44px);
  letter-spacing: 0.06em;
  color: var(--signal);
  line-height: 1.1;
  text-align: center;
}
.os-reveal.is-outsider .os-secret { color: var(--outsider); }
/* A LONG WORD HAS NOWHERE TO BREAK. "YOU'RE THE OUTSIDER" wraps because it has
   spaces; PHOTOGRAPHY does not, so at the clamp minimum it is 290px against the
   252px a 320px phone actually offers, and it spilled out of the card rather
   than wrapping. Three of the forty-eight words are over nine characters. The
   painter measures the word it is about to draw and asks for this. */
.os-reveal .os-secret.is-long { font-size: clamp(24px, 7vw, 38px); }
.os-reveal:not(.is-open) .os-secret { filter: blur(9px); }
.os-reveal:not(.is-open) .os-cat { filter: blur(5px); }

.os-question { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.02em; margin: 0; }

/* answer inputs */
.os-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.os-opt {
  padding: 13px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.os-opt[aria-pressed="true"] { border-color: var(--signal); color: var(--signal); }
.os-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.os-scale .os-opt { flex: 1 0 auto; min-width: 44px; padding: 12px 0; text-align: center; }

/* voting and the six choices share a grid */
.os-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }

/* The two setup modifiers. Same auto-fit rule as the choice grid, so three
   options sit in a row on a phone and never wrap to one-per-line. */
.os-mods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.os-opt.mod { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; }
.os-opt.mod b { font-size: 14px; font-weight: 600; }
.os-opt.mod .blurb { font-size: 11px; color: var(--muted); line-height: 1.35; }
.os-opt.mod[aria-pressed="true"] .blurb { color: var(--ink); }

/* The Outsider's clue, tier 2 only. Quieter than the category above it: it is a
   nudge, and typography that shouts would oversell how much it actually says. */
.os-clue {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 6px;
}

.os-verdict { text-align: center; padding: 8px 0 4px; }
.os-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 42px);
  letter-spacing: 0.04em;
  margin: 4px 0 6px;
  line-height: 1.05;
}
.os-headline .outsider { color: var(--outsider); }
.os-headline .win { color: var(--signal); }
.os-player .pts {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.os-player .said { color: var(--muted); font-size: 13.5px; }
.os-player.is-outsider { border-color: var(--outsider); }
.os-player.is-out .nm { text-decoration: line-through; }

