/* A dark stage and one spotlight. The light is warm when your partner has the
   floor and cool when you do; warm is also the single accent colour. */

/* The poster face, served from this site so it is the same on every device:
   Big Shoulders Display, one variable file with every weight. It is for the
   app's name and a screen's title only. Its licence is in fonts/OFL.txt. */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("fonts/big-shoulders-display.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --stage: #0e0c0a;      /* the dark of the house */
  --boards: #1a1512;     /* raised surfaces */
  --line: #342b24;
  --ink: #f5eee3;
  --muted: #a99c8b;
  --warm: #ffc766;       /* the light on your partner, and the accent */
  --warm-ink: #201403;
  --cool: #bcd7ff;       /* the light on you */
  --display: "Big Shoulders Display", "Avenir Next Condensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pressed: #241d18;    /* a raised surface under a finger */
  /* The playbill is printed: the stage's ink on paper the colour of the
     light, its quieter words a warm grey that keeps 7:1 on it. */
  --paper: var(--ink);
  --paper-ink: var(--stage);
  --paper-quiet: #554a40;
  --bar: 58px;           /* the tab bar, above the room left for the home indicator */

  /* Gels: the colour lights are given in a theatre, one for each group of
     exercises. One family, each oklch(0.80 0.11 hue) or as near as sRGB
     allows, so they are equally bright on the stage; the hues are spread so
     that groups next to each other differ. Putting it together is open white:
     every gel at once. A gel always sits beside its group's name, and is
     never the only sign of anything. */
  --gel-agreement: #fca48d;     /* hue 35 */
  --gel-listening: #5cd5c7;     /* 185 */
  --gel-base-reality: #bcb2fd;  /* 290 */
  --gel-specificity: #bbc671;   /* 115 */
  --gel-character: #f89fbb;     /* 0 */
  --gel-emotion: #60ceef;       /* 220 */
  --gel-game: #89d298;          /* 150 */
  --gel-story: #e2a5e5;         /* 325 */
  --gel-status: #93c1fc;        /* 255 */
  --gel-scenes: var(--ink);
}

* { box-sizing: border-box; }
html { background: var(--stage); }
body {
  margin: 0;
  background: var(--stage);
  color: var(--ink);
  font: 17px/1.5 var(--text);
  -webkit-text-size-adjust: 100%;
}
main { max-width: 30rem; margin: 0 auto; }
[hidden] { display: none !important; }
::selection { background: rgba(255, 199, 102, 0.32); color: var(--ink); }
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; border-radius: 2px; }

/* Each screen fills the phone, so its main button can sit under the thumb. */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  --px: 20px;
  padding: max(20px, env(safe-area-inset-top)) max(var(--px), env(safe-area-inset-right))
           calc(20px + env(safe-area-inset-bottom)) max(var(--px), env(safe-area-inset-left));
  animation: enter 0.22s ease-out both;
}
@keyframes enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
/* The four tabs change at once, with a short fade, and leave room at the
   bottom for the tab bar, as a skill's page does. */
#home, #exercises, #friends, #account { animation: fade 0.16s ease-out both; }
#home, #exercises, #friends, #account, #skill { padding-bottom: calc(var(--bar) + 12px + env(safe-area-inset-bottom)); }
@keyframes fade {
  from { opacity: 0; }
}
/* The main buttons stay pinned to the bottom of the screen, fading in over
   anything that scrolls beneath them. */
.dock {
  position: sticky;
  bottom: 0;
  margin: auto calc(-1 * var(--px)) calc(-20px - env(safe-area-inset-bottom));
  padding: 28px var(--px) calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(14, 12, 10, 0), var(--stage) 26px);
}

/* ---------- Type ---------- */

/* A screen's title, set like a playbill. */
.poster {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.9rem, 15.5vw, 4rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.poster.small { font-size: clamp(2.2rem, 11vw, 2.8rem); margin-bottom: 8px; }
.poster:focus { outline: none; }
p { margin: 0 0 12px; }
.lede { font-size: 1.1rem; color: var(--ink); text-wrap: pretty; }
.caption, .fine { color: var(--muted); font-size: 0.875rem; }
/* A quiet heading for a part of a screen: "The rule", "Tips", "What worked". */
.label {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}
.label.warm { color: var(--warm); }
.label.cool { color: var(--cool); }
.example:empty { display: none; }
.msg { color: var(--warm); font-weight: 600; }
.msg:empty { display: none; }
/* Details under a title, each in its own place: the skill and its gel, then
   the length and kind. */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin: 0 0 16px;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--muted);
}
.meta-skill { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
/* On an exercise's intro the skill is a button to its page, with a chevron.
   It is as tall as a finger without moving the lines around it. */
.meta-link {
  min-height: 44px;
  margin: -12px 0;
  padding: 0 6px 0 0;
  border: 0;
  background: none;
  text-align: left;
}
.meta-link .icon-chevron { width: 18px; height: 18px; margin-left: -4px; color: var(--muted); }

/* ---------- Icons ----------
   One small set, drawn on a 24-pixel grid with one line weight. Each is a
   mask over the text colour, so an icon takes the colour of what it sits in:
   <span class="icon icon-tick" aria-hidden="true">. */

.icon {
  display: inline-block;
  flex: none;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.22em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-play { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M7.5 4.8v14.4a.6.6 0 0 0 .9.5l11.3-7.2a.6.6 0 0 0 0-1L8.4 4.3a.6.6 0 0 0-.9.5z'/%3E%3C/svg%3E"); }
.icon-tick { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E"); }
.icon-chevron { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 5.5L16 12l-6.5 6.5'/%3E%3C/svg%3E"); }
.icon-back { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19.5 12h-15M10.5 5.5L4 12l6.5 6.5'/%3E%3C/svg%3E"); }
.icon-person { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.8'/%3E%3Cpath d='M4.5 20.5c.7-4 3.7-6.3 7.5-6.3s6.8 2.3 7.5 6.3'/%3E%3C/svg%3E"); }
.icon-info { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5M12 7.5v.01'/%3E%3C/svg%3E"); }
/* Path: a route winding from one stop to the next. Exercises: boxes, two to a row. */
.icon-path { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='19' r='3'/%3E%3Cpath d='M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15'/%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3C/svg%3E"); }
.icon-exercises { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6.5' height='6.5' rx='1.5'/%3E%3Crect x='13.5' y='4' width='6.5' height='6.5' rx='1.5'/%3E%3Crect x='4' y='13.5' width='6.5' height='6.5' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='6.5' height='6.5' rx='1.5'/%3E%3C/svg%3E"); }
/* Minus and plus, on the chooser's buttons. */
.icon-minus { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E"); }
.icon-plus { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E"); }
/* Share: an arrow rising out of an open box. */
.icon-share { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v11M8 7.5l4-4 4 4'/%3E%3Cpath d='M8.5 10.5H7a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-1.5'/%3E%3C/svg%3E"); }
/* Players: the person of You, with a second standing behind. */
.icon-people { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8.5' r='3.4'/%3E%3Cpath d='M2.5 20c.6-3.7 3.2-5.9 6.5-5.9s5.9 2.2 6.5 5.9'/%3E%3Cpath d='M15.4 5.3a3.4 3.4 0 0 1 0 6.4'/%3E%3Cpath d='M17.9 14.6c2 .7 3.3 2.6 3.6 5.4'/%3E%3C/svg%3E"); }
/* Picked: a heart, filled, for the single the contestant would date. */
.icon-heart { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 19.5c-4.6-3.1-8-6.1-8-9.9A4.1 4.1 0 0 1 8.1 5.5c1.6 0 3 .8 3.9 2.1.9-1.3 2.3-2.1 3.9-2.1A4.1 4.1 0 0 1 20 9.6c0 3.8-3.4 6.8-8 9.9z'/%3E%3C/svg%3E"); }
/* Winner, in every other game's reveal: a star, filled and rounded as the heart is. */
.icon-star { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 4L14.12 9.69L20.18 9.94L15.42 13.71L17.06 19.56L12 16.2L6.94 19.56L8.58 13.71L3.82 9.94L9.88 9.69Z'/%3E%3C/svg%3E"); }
@media (forced-colors: active) {
  .icon { background: CanvasText; }
}

/* A gel: the small square of a group's colour, beside its name. */
.gel {
  flex: none;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--ink);
}
.gel-agreement { background: var(--gel-agreement); }
.gel-listening { background: var(--gel-listening); }
.gel-base-reality { background: var(--gel-base-reality); }
.gel-specificity { background: var(--gel-specificity); }
.gel-character { background: var(--gel-character); }
.gel-emotion { background: var(--gel-emotion); }
.gel-game { background: var(--gel-game); }
.gel-story { background: var(--gel-story); }
.gel-status { background: var(--gel-status); }
.gel-scenes { background: var(--gel-scenes); }

/* ---------- Buttons ---------- */

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* no double-tap zoom on quick taps */
  -webkit-user-select: none;
  user-select: none;
}
button:focus-visible, summary:focus-visible { outline: 3px solid var(--cool); outline-offset: 3px; }
.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--boards);
  font-weight: 600;
  text-align: center;
  transition: transform 0.1s ease, filter 0.15s ease;
}
.btn.primary { background: var(--warm); color: var(--warm-ink); border-color: transparent; font-weight: 700; }
.btn.big { min-height: 60px; border-radius: 18px; font-size: 1.15rem; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn:active { transform: scale(0.98); filter: brightness(0.92); }
.btn:disabled { opacity: 0.5; cursor: progress; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 44px;
  padding: 10px 16px 10px 0;
  margin: -6px 0 6px;
  background: none;
  border: 0;
  color: var(--muted);
}
.back .icon { width: 20px; height: 20px; }

/* ---------- The tab bar ---------- */

/* Path, Exercises, Friends and You, docked to the bottom edge and as wide
   as the column, with room for the home indicator under it. The tab you are
   on is lit: warm, with a heavier label and a small pool of light falling
   on it from the top edge. The others are in the dark of the house. */
.tabbar {
  position: fixed;
  z-index: 5; /* under the blackout */
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 30rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border-top: 1px solid var(--line);
  background: var(--stage);
}
/* In the iPhone app a tab scrolls up under the clock and the battery. On the
   screens with the tab bar, a strip of the stage colour sits behind them:
   fixed to the top, as tall as the status bar, above the page and under the
   blackout. Where there is no status bar to cover, it has no height. */
.tabbar::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top);
  background: var(--stage);
  pointer-events: none;
}
.tab {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--bar);
  padding: 7px 4px 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.15s ease;
}
.tab .icon { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--warm); font-weight: 700; }
/* The pool of light is no wider than its own tab, so on a narrow phone it
   never spills onto the tabs beside it. */
.tab[aria-current="page"]::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: min(104px, 100%);
  margin: 0 auto;
  background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(255, 199, 102, 0.3), rgba(255, 199, 102, 0.09) 55%, transparent 100%);
  pointer-events: none;
}
.tab:focus-visible { outline-offset: -3px; }
/* On Friends, from two playing, how many, beside the drawing and clear of
   it, so the drawing sits where the other tabs' do. */
.tab-icon { position: relative; display: flex; }
.tab-n {
  position: absolute;
  top: 50%;
  left: 100%;
  margin-left: 2px;
  transform: translateY(-50%);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tab[aria-current="page"] .tab-n { color: inherit; }

/* ---------- Path and the front door ---------- */

/* Light falling from the top of the screen onto the name and what is under
   it, on the front door. It reaches the edges of the screen and no further:
   anything wider makes the page wider than a phone. */
.lit { isolation: isolate; }
.lit::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: 0;
  height: 460px;
  background: radial-gradient(ellipse 72% 64% at 50% 0%, rgba(255, 199, 102, 0.3), rgba(255, 199, 102, 0.07) 55%, transparent 76%);
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin: -6px 0 20px;
}
/* On Path the name stands alone, so it needs no more room than its line. */
#home .topbar { min-height: 0; margin: 0 0 12px; }
.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wordmark:focus { outline: none; }

/* What this is, and how a round goes. */
.what { margin-bottom: 24px; }
.what .poster { font-size: clamp(2.6rem, 13vw, 3.4rem); margin-bottom: 14px; }
.what .lede { margin-bottom: 20px; text-wrap: balance; }
#what .lede { margin-bottom: 0; }
.steps { margin: 0; padding-left: 1.6em; }
.steps li { margin-bottom: 10px; padding-left: 4px; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.steps li:last-child { margin-bottom: 0; }
.steps li::marker { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.steps strong { color: var(--ink); font-weight: 600; }
.nowrap { white-space: nowrap; }

/* Until the first round, how a round works behind one line, under Start. */
.how { margin: 10px 0 0; }
.how summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding-right: 8px;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.how summary::-webkit-details-marker { display: none; }
.how summary .icon { width: 18px; height: 18px; margin-left: -2px; transition: transform 0.2s ease; }
.how[open] summary .icon { transform: rotate(90deg); }
.how .steps { margin: 4px 0 8px; }

/* The next step: one card, lit from above, and the only one with a warm
   button. Its skill comes first, as a button to the skill's page. Who's
   playing, on Friends, is lit the same way: each is its tab's one lit card. */
.up-next, .who {
  margin: 0 0 24px;
  padding: 6px 18px 18px;
  border: 1px solid rgba(255, 199, 102, 0.34);
  border-radius: 20px;
  background: radial-gradient(ellipse 90% 80% at 50% 0%, rgba(255, 199, 102, 0.17), rgba(255, 199, 102, 0.04) 62%, transparent 88%), var(--boards);
}
.next-skill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  margin: 0 0 2px -2px;
  padding: 0 8px 0 2px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.3;
  text-align: left;
}
.next-n { flex: none; }
.next-name { min-width: 0; color: var(--ink); font-weight: 600; }
.next-skill .icon-chevron { width: 18px; height: 18px; margin-left: -4px; }
.next-title { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.next-phrase { margin: 2px 0 10px; font-size: 0.9375rem; color: var(--muted); }
.next-why { margin: 0 0 16px; font-size: 0.9375rem; line-height: 1.45; text-wrap: pretty; }
.btn.next-start { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.0625rem; }
.next-start .icon { width: 20px; height: 20px; }
.up-next .how, .who .how { margin: 6px 0 -10px; }

/* The path: one sentence, then two stretches, a first course and what
   classes teach after it, each with its heading and its line. */
.path-line { margin: 0; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.stretch { margin-top: 16px; }
.stretch + .stretch { margin-top: 28px; }
.stretch-head { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.stretch-line { margin: 2px 0 12px; font-size: 0.875rem; line-height: 1.45; color: var(--muted); text-wrap: pretty; }

/* A skill on the path: its number in a disc of its gel, then its box. A
   thin line joins the discs from 1 to 10, broken between the stretches. A
   skill whose exercises have all been played has its disc filled and a tick
   in it; the box you are on is lit, and says so. */
.path-list { margin: 0; padding: 0; list-style: none; }
.path-list li + li { margin-top: 5px; }
.step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.path-list li:not(:last-child) .step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 22px;
  width: 2px;
  height: calc(100% + 5px); /* to the next disc */
  background: rgba(169, 156, 139, 0.3);
}
.step-num {
  position: relative; /* over the line */
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--gel, var(--ink));
  border-radius: 50%;
  background: var(--stage);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.step .step-num { margin-top: 6px; }
.step.done .step-num { background: var(--gel, var(--ink)); color: var(--stage); }
.step-num .icon { width: 18px; height: 18px; }
.step-box {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--boards);
  transition: background-color 0.15s ease;
}
.step-top { display: flex; align-items: center; gap: 10px; }
.step-name { flex: 1; min-width: 0; font-weight: 600; line-height: 1.3; color: var(--ink); }
/* A mark for each of its exercises: a ring, filled in once played. */
.step-marks { flex: none; display: flex; gap: 5px; }
.mark { width: 8px; height: 8px; border: 1.5px solid var(--muted); border-radius: 50%; }
.mark.done { border-color: var(--ink); background: var(--ink); }
.step-top .icon-chevron { width: 18px; height: 18px; margin-right: -4px; color: var(--muted); }
.step.here .step-box {
  border-color: rgba(255, 199, 102, 0.5);
  background: radial-gradient(ellipse 90% 110% at 50% 0%, rgba(255, 199, 102, 0.14), transparent 80%), var(--boards);
}
/* "You are here", and at the far end, under the marks, how many of them are
   filled: the chevron and the gap before it are 24 pixels. */
.step-here { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; padding-right: 24px; font-size: 0.875rem; font-weight: 600; line-height: 1.3; color: var(--warm); }
.step-count { flex: none; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.step-line { display: block; margin-top: 2px; font-size: 0.875rem; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.step:active .step-box { background-color: var(--pressed); }
.step:focus-visible { outline-offset: 2px; border-radius: 16px; }

.links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.links a { display: inline-block; padding: 6px 0; }

/* The front door: signing in stays at the bottom of the screen. The small
   print sits just above it, at the end of what scrolls. */
.door-print { margin-top: auto; padding-top: 28px; }
.door-print p { margin: 0 0 8px; }
#welcome .door { margin-top: 0; padding-top: 28px; }
.offer { margin-bottom: 14px; font-size: 0.9375rem; font-weight: 600; color: var(--ink); text-wrap: pretty; }
.ways { display: grid; gap: 8px; margin: 16px 0 4px; }
.ways:empty { display: none; }
.door .ways { margin: 0; }
/* Apple's own button style: white on a dark background, the same size as the others */
.ways .btn.apple { background: var(--ink); color: var(--stage); border-color: transparent; }
.door .msg { margin: 12px 0 0; }
.door-print .links a { padding: 4px 0; }

/* ---------- Exercises ---------- */

/* The title, with how many have been played at the end of its line. */
.tab-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.tab-head .poster { margin: 0; }
.count { margin: 0; font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The filters, in one row: each one's count under its name, and the one
   chosen filled. */
.filters { display: flex; gap: 6px; margin: 0 0 14px; }
.chip {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 44px;
  min-height: 48px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: none;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.chip-name { color: var(--ink); font-weight: 600; white-space: nowrap; }
.chip-count { font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: var(--stage); }
.chip[aria-pressed="true"] .chip-name, .chip[aria-checked="true"] .chip-name { color: var(--stage); }

/* The exercises, two to a row: the name, how long and what kind, and at the
   foot the skill with its gel, and a tick once played. The next step on the
   path has the play mark, and a warm edge. */
.boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 88px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--boards);
  text-align: left;
  transition: background-color 0.15s ease;
}
.box-name { max-width: 100%; font-size: 1rem; font-weight: 600; line-height: 1.25; color: var(--ink); text-wrap: pretty; }
.box-name .icon-play { width: 1em; height: 1em; margin-right: 5px; vertical-align: -0.13em; color: var(--warm); }
.box .phrase { margin-top: 3px; }
/* A game for a room says how many it needs, on its card on Friends (sized
   with .game below), and on its screen after its kind. */
.box-players { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 0.8125rem; line-height: 1.3; color: var(--ink); }
.box-players .icon { width: 16px; height: 16px; color: var(--muted); }
.meta-players { display: inline-flex; align-items: center; gap: 7px; }
.meta-players .icon { width: 18px; height: 18px; }
.box-skill { display: flex; align-items: flex-start; gap: 7px; width: 100%; margin-top: auto; padding-top: 7px; font-size: 0.8125rem; line-height: 1.3; color: var(--muted); }
.box-skill .gel { margin-top: 3.5px; } /* with the first line, where the name wraps */
.box-skill .icon-tick { align-self: flex-end; width: 18px; height: 18px; margin: -2px -2px -1px auto; color: var(--ink); }
.box.next { border-color: rgba(255, 199, 102, 0.5); }
.box:active { background-color: var(--pressed); }
.all-played { grid-column: 1 / -1; margin: 8px 0 0; color: var(--muted); }

/* ---------- Friends ---------- */

/* The title, and under it who the tab is for. */
.friends-line { margin: 0 0 16px; font-size: 1rem; line-height: 1.45; color: var(--muted); }
/* Who's playing: the lit card, its heading first. Minus, the count and plus
   as in the Players sheet, then the lamps as on the stage, up to 44 pixels
   across and all on one row, shrinking together as more are added, the
   line under them, Spicy under a thin rule, and the fold. */
.who { padding-top: 16px; }
.who .stepper { margin: 12px 0 14px; }
#friends-lamps { grid-template-columns: repeat(var(--n, 1), minmax(0, 44px)); margin: 0 0 12px; }
#friends-lamps .lamp { font-size: 1.0625rem; }
.who-line { margin: 0; font-size: 0.9375rem; line-height: 1.45; color: var(--muted); text-align: center; text-wrap: balance; }
.who .party-row { margin: 16px 0 0; }
/* Spicy under Topics on You, between the chips and the fine print. */
#account-party { margin: 16px 0 0; }
/* A lamp a player has just added arrives lit, with the lamps' glow, and
   settles unlit: adding a player lights a lamp. */
.lamp.added { animation: lamp-added 0.9s cubic-bezier(0.2, 0.7, 0.3, 1); }
.lamp.added::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 199, 102, 0.42), rgba(255, 199, 102, 0.12) 48%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  animation: lamp-added-glow 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes lamp-added {
  0% { transform: scale(0.5); opacity: 0; }
  30% { transform: scale(1.22); opacity: 1; border-color: transparent; background-color: var(--warm); color: var(--warm-ink); }
}
@keyframes lamp-added-glow {
  0% { opacity: 0; transform: scale(0.5); }
  35% { opacity: 1; transform: scale(1.45); }
  100% { opacity: 0; }
}
/* Under Who's playing, the switch between Shows and One-liners: the
   Exercises tab's filters, two of them sharing the row. */
.sides .chip { flex: 1 1 0; }
/* The two shelves, Games and Exercises, taking turns, each under its heading
   and its line, as the path's stretches are. */
.shelf + .shelf { margin-top: 28px; }
.games { display: grid; gap: 8px; }
/* A game: a card the whole width of the column, where an exercise's box is
   half of it, so the two are told apart by size and what they say, not by
   colour. Short, so seven of them fit on about one screen: its name large in
   the text face, with a tick once played, and at the end of its line the
   people and "3+"; under them how it is won, quiet. Its length and blurb are
   on its own screen. Not lit: the one lit card on the tab is Who's playing. */
.game {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--boards);
  text-align: left;
  transition: background-color 0.15s ease;
}
.game-top { display: flex; align-items: center; gap: 10px; }
.game-name { flex: 1; min-width: 0; font-size: 1.375rem; font-weight: 700; line-height: 1.2; color: var(--ink); text-wrap: balance; }
.game-top .icon-tick { flex: none; width: 22px; height: 22px; color: var(--ink); }
.game .box-players { flex: none; margin-top: 0; font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.game .box-players .icon { width: 18px; height: 18px; }
.game-win { display: block; margin-top: 3px; font-size: 0.9375rem; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.game:active { background-color: var(--pressed); }

/* ---------- You ---------- */

#account .poster { margin-bottom: 20px; }
.part { margin-top: 4px; }
.part:not([hidden]) ~ .part { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.part-head { margin: 0 0 12px; font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.part p { font-size: 0.9375rem; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.part .msg { color: var(--warm); }
.part .btn { margin-top: 8px; }
.part .ways { margin: 16px 0 12px; }
.part .ways .btn { margin-top: 0; }
.figure { margin: 0 0 12px; font-size: 1.5rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.part .figure { color: var(--ink); font-size: 1.5rem; }
/* The share of the minutes used. It draws what the line under it says. */
.bar { height: 8px; margin: 0 0 10px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--warm); }
.part .used { margin-bottom: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.part #usage-what { margin-bottom: 18px; }
#account-who { color: var(--ink); }
/* The partner's voice: the ten names as the filters' chips, in two even rows
   of five, the one in use filled. */
.voices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
/* The topics: the same chips, two of the same width. */
.voices.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Usage where buying shows. The minutes left a size up. Then the levels as
   boxes, the price on each one's button; minutes by the amount, a row with a
   chevron, or for a member a button; Recent, rows divided by thin lines; and
   the small print. Warm only on the one button that is the next thing to do,
   when the minutes are low. */
.part.shop .figure { font-size: 2rem; margin-bottom: 8px; }
.part .month { margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.usage-part { margin-top: 24px; }
.usage-head { margin: 0 0 10px; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.levels { display: grid; gap: 8px; }
.level { padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--boards); }
.part .level p { margin: 0; }
.part .level-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.part .level-name, .part .level-top { color: var(--ink); font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.level-price { flex: none; font-variant-numeric: tabular-nums; }
.part .level-line { margin-top: 2px; }
.part .level-line.msg { color: var(--warm); }
.part .level .btn { margin-top: 12px; }
.part #usage-plans-line { margin: 10px 0 0; }
.buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}
.buy-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.buy-name { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.buy-rate { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.buy-row .icon { width: 20px; height: 20px; color: var(--muted); }
.part p.buy-rate { margin: 6px 0 0; }
.recent { margin: 0; padding: 0; list-style: none; }
.recent-row {
  display: grid;
  grid-template-columns: 6.25em minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.9375rem;
  line-height: 1.35;
}
.recent-row + .recent-row { border-top: 1px solid var(--line); }
.recent-day { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.recent-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.part .show-all { width: auto; margin-top: 0; padding-left: 0; padding-right: 12px; text-align: left; }
.usage-print { margin-top: 24px; }
.part .usage-print p { margin: 0; }
.usage-print .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: var(--muted); }
/* How a round works, and About and privacy: each behind one row, a heading
   with a chevron that turns when it opens. */
.part:not([hidden]) ~ .more { margin-top: 24px; padding-top: 0; }
.part.more + .part.more { margin-top: 0; }
.more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  list-style: none;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
.more summary::-webkit-details-marker { display: none; }
.more summary .icon { width: 20px; height: 20px; color: var(--muted); transition: transform 0.2s ease; }
.more[open] summary .icon { transform: rotate(90deg); }
.more[open] summary { margin-bottom: 4px; }
.more .steps { margin-bottom: 20px; }
.more > p:last-child { margin-bottom: 20px; }
/* On About its paragraphs are open with no row above them. */
#about-title[hidden] + p { margin-top: 20px; }
/* Privacy policy and Help, as tall as a finger. */
.you-links { margin: 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.you-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: var(--muted); }

/* The sheets asked once before the first scene: the consent, in the app,
   and which topics */
.sheet {
  width: min(92vw, 28rem);
  max-height: 85vh;
  padding: 24px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--boards);
  color: var(--ink);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.65); }
.sheet p { color: var(--muted); font-size: 0.95rem; }
.sheet .btn { margin-top: 8px; }

/* The chooser: the quick amounts as chips, the chosen one filled; minus and
   plus either side of the amount, which is the largest type on the sheet and
   keeps its width as it changes; then the one warm button, with the price. */
.quick { display: flex; gap: 6px; margin: 16px 0 6px; }
.quick .chip { min-height: 48px; font-size: 1rem; }
.stepper { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 8px; margin: 6px 0 12px; }
.step-btn {
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: none;
  color: var(--ink);
}
.step-btn .icon { width: 22px; height: 22px; }
.step-btn:disabled { color: var(--muted); opacity: 0.45; cursor: default; }
.chooser .poster.small { font-size: 1.75rem; }
.sheet .amount, .who .amount { margin: 0; text-align: center; color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.amount-n { font-size: 2.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.chooser .fine { margin: 10px 0 0; font-size: 0.875rem; }
.chooser .msg { margin: 10px 0 0; }

/* ---------- Intro ---------- */

/* Under Start, when fewer minutes are left than the exercise takes: one
   muted line, with a way to more at its end, as tall as a finger. */
.low { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; margin: 6px 0 -8px; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
.link {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* The title has room above the details under it. */
#intro-title { margin-bottom: 20px; }
#intro-meta { margin-bottom: 20px; row-gap: 12px; } /* room for the skill's button, if the details wrap */

.cue-card {
  margin: 8px 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 199, 102, 0.26);
  border-radius: 14px;
  background: rgba(255, 199, 102, 0.06);
}
.cue-card p:last-child { margin: 0; font-weight: 600; }
.example { color: var(--muted); font-style: italic; }
/* For a game, how it is won, under the rule. */
.win { font-weight: 600; }
.focus { color: var(--muted); }
.focus strong { color: var(--ink); font-weight: 600; }

.video { margin: 10px 0 18px; }
.video-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--boards);
  text-align: left;
}
.video-card:active { border-color: var(--warm); }
.video-card .play {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--warm);
  color: var(--warm-ink);
}
.video-card .play .icon { width: 20px; height: 20px; margin-left: 2px; }
.video-text { min-width: 0; }
.video-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.3;
}
.video-channel { display: block; margin-top: 2px; color: var(--muted); font-size: 0.82rem; }
.video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000; }
.video-frame.vertical { width: min(100%, 17rem); aspect-ratio: 9 / 16; margin: 0 auto; }
.tips ul { margin: 0 0 6px; padding-left: 1.15em; }
.tips li { margin-bottom: 8px; }
.tips li::marker { color: var(--warm); }

/* ---------- A skill's page ---------- */

/* The title has room above the details under it, as on the intro. */
#skill-title, #skill-meta { margin-bottom: 20px; }
/* What it sounds like: three lines, each with who says it, or whether it
   misses the skill or uses it, before the words in quotes. */
.sounds { margin: 4px 0 18px; }
.sounds p { margin: 0 0 8px; text-wrap: pretty; }
.sounds p:last-child { margin: 0; font-weight: 400; }
.said-who { font-weight: 600; color: var(--muted); }
/* Then one button and the list under it: the next of its exercises to play,
   in the flow rather than pinned over what is being read, and its exercises
   as boxes, with why each works under its name. */
#skill-start { margin-top: 12px; }
.btn.go {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px 18px 14px 14px;
  border-radius: 18px;
  text-align: left;
}
.go-disc {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--warm-ink);
  color: var(--warm);
}
.go-disc .icon { width: 22px; height: 22px; margin-left: 2px; }
.go-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.go-title { font-size: 1.125rem; font-weight: 700; line-height: 1.25; }
.go-why { font-size: 0.9375rem; font-weight: 500; line-height: 1.35; color: rgba(32, 20, 3, 0.8); text-wrap: pretty; }
.skill-exercises { margin-top: 40px; }
.section-head { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.skill-exercises .section-head { margin-bottom: 12px; }
/* An exercise's box: the name, with a tick once played, the length and kind
   at the end of the line, and why it works beneath. */
.row {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--boards);
  text-align: left;
  transition: background-color 0.15s ease;
}
.row:active { background-color: var(--pressed); }
.row-top { display: flex; align-items: baseline; gap: 12px; }
.row-name { flex: 1 1 auto; min-width: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.row-name .icon-play { width: 1.05em; height: 1.05em; margin-right: 6px; vertical-align: -0.16em; color: var(--warm); }
.row-name .icon-tick { margin-left: 6px; color: var(--muted); }
.phrase { flex: none; font-size: 0.8125rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.blurb { display: block; margin-top: 3px; font-size: 0.9375rem; line-height: 1.42; color: var(--muted); text-wrap: pretty; }
/* At the foot, the skill before and the skill after, by number and name,
   the number in a disc of its gel as on the path. */
.walk { display: grid; gap: 8px; margin-top: 32px; }
.step-walk {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--boards);
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  transition: background-color 0.15s ease;
}
.step-walk > .icon { width: 20px; height: 20px; color: var(--muted); }
.step-walk > .icon-chevron { margin: 0 -4px 0 auto; }
.step-walk .step-num { width: 30px; height: 30px; font-size: 0.8125rem; }
.walk-name { min-width: 0; }
.step-walk:active { background-color: var(--pressed); }

@media (hover: hover) {
  .row:hover, .box:hover, .game:hover, .step-walk:hover, .step:hover .step-box { background-color: var(--pressed); }
  .chip:hover:not([aria-pressed="true"]):not([aria-checked="true"]) { border-color: var(--muted); }
  .tab:hover, .how summary:hover, .next-skill:hover { color: var(--ink); }
  .buy-row:hover .icon { color: var(--ink); }
  .step-btn:hover:not(:disabled) { border-color: var(--muted); }
  .people:hover { color: var(--ink); }
  .switch:hover:not([aria-checked="true"])::before { border-color: var(--muted); }
  .tab[aria-current="page"]:hover { color: var(--warm); }
  .more summary:hover .icon { color: var(--ink); }
}

/* ---------- Live ---------- */

#live { text-align: center; }
.rule { color: var(--muted); max-width: 24rem; margin-left: auto; margin-right: auto; }
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
}
/* The spotlight. --level (0 to 1) follows the partner's voice when the browser
   can measure it; otherwise the animations below carry the state. */
.light {
  --beam: var(--muted);
  --level: 0;
  width: min(60vw, 15rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--beam) 30%, transparent 70%);
  background: radial-gradient(circle, color-mix(in srgb, var(--beam) 55%, white) 0%, var(--beam) 26%, color-mix(in srgb, var(--beam) 30%, transparent) 52%, transparent 70%);
  opacity: calc(0.3 + var(--level) * 0.7);
  transform: scale(calc(0.86 + var(--level) * 0.24));
  transition: opacity 0.12s linear, transform 0.12s linear;
}
.light[data-who="wait"] { --beam: var(--muted); animation: breathe 2.6s ease-in-out infinite; }
.light[data-who="partner"] { --beam: var(--warm); }
.light[data-who="partner"].pulse { animation: speak 1s ease-in-out infinite; }
.light[data-who="turn"] { --beam: var(--cool); animation: breathe 3.2s ease-in-out infinite; }
.light[data-who="you"] { --beam: var(--cool); animation: speak 0.9s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { opacity: 0.2; transform: scale(0.84); }
  50% { opacity: 0.36; transform: scale(0.9); }
}
@keyframes speak {
  0%, 100% { opacity: 0.72; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.08); }
}
/* Whose turn it is, under the light: a label, with no box. Its own class,
   not the Games tab's card (.who). */
.orb-label {
  margin: 4px 0 10px;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.stage:has(.light[data-who="partner"]) .orb-label { color: var(--warm); }
.stage:has(.light[data-who="turn"]) .orb-label, .stage:has(.light[data-who="you"]) .orb-label { color: var(--cool); }
/* ---------- The prompt on the stage, in a line game ----------

   Above the light, with no box and nothing warm, so the light stays the
   brightest thing: the small line quiet, in the text face, and the large
   one in the display face, to be read from across a table. Its place is
   kept for the whole show, tall enough for the small line and the large
   one at its longest, and the words sit at its foot, by the light, so
   nothing on the stage moves as a card comes and goes. The large line steps
   down a size past 24 characters (data-size "mid"), and past 48, such as an
   opponent's line, to the text face, four lines at most ("long"). */
.live-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: 22rem;
  min-height: 6.75rem;
  margin: 0 auto 6px;
}
.live-card-label { margin: 0 0 4px; font-size: 0.9375rem; line-height: 1.35; color: var(--muted); text-wrap: balance; }
.live-card-text {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.live-card[data-size="mid"] .live-card-text { font-size: 1.75rem; line-height: 1.02; }
.live-card[data-size="long"] .live-card-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  font-family: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

/* The light and the clock round it share one place. */
.orb-wrap { display: grid; place-items: center; }
.orb-wrap > * { grid-area: 1 / 1; }

/* ---------- The turn button and the clock, in a game ----------

   Pass sits under the label, in the middle of the stage, large enough to
   hit from across a table. It wears the light's colours: cool, and lit, on
   a player's turn; while an AI character speaks it is a dim plate with their
   name in warm, under the light and never brighter than it, and the label
   above it gives way, so the name is said once. */
.btn.turn {
  width: auto;
  min-width: 11rem;
  min-height: 4.25rem;
  margin: 2px auto 0;
  padding: 10px 34px;
  border-radius: 999px;
  border: 2px solid var(--cool);
  background: color-mix(in srgb, var(--cool) 16%, var(--stage));
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 0 0 0 rgba(188, 215, 255, 0);
  transition: transform 0.12s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}
.btn.turn:active:not(:disabled) { transform: translateY(2px) scale(0.97); filter: none; }
.btn.turn:disabled { cursor: default; }
/* An AI's line: the character's name, warm and dim. */
.btn.turn[data-state="ai"] {
  border-color: rgba(255, 199, 102, 0.28);
  background: transparent;
  color: var(--warm);
  opacity: 0.72;
  font-size: 1.125rem;
  font-weight: 600;
}
.stage[data-turn="ai"] .orb-label { opacity: 0; }
#turn-hint { min-height: 1.5em; }
/* Lines being written. */
.btn.turn[data-state="wait"] { border-color: var(--line); background: transparent; color: var(--muted); opacity: 1; }
/* Pressed, by a tap or as an AI's line hands over: it sinks and flashes,
   and after a tap stays down until the next line. */
.btn.turn.press { animation: turn-press 0.26s ease-out; }
@keyframes turn-press {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(3px) scale(0.95); background-color: var(--cool); color: var(--stage); box-shadow: 0 0 0 8px rgba(188, 215, 255, 0.22); }
  100% { transform: translateY(2px) scale(0.97); }
}
.btn.turn[data-state="down"] {
  transform: translateY(2px) scale(0.97);
  border-color: rgba(188, 215, 255, 0.4);
  background: color-mix(in srgb, var(--cool) 8%, var(--stage));
  color: var(--muted);
  opacity: 1;
}
/* Nudged: the room has been quiet a while, so the button draws the eye. */
.btn.turn.nudge { animation: turn-nudge 2.2s ease-in-out infinite; }
@keyframes turn-nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(188, 215, 255, 0); }
  50% { box-shadow: 0 0 0 10px rgba(188, 215, 255, 0.2); border-color: #fff; }
}

/* The clock: a ring round the light that drains as the time runs out, and
   the whole seconds left, large, on the light, to be read at arm's length.
   The page sets --left (1 to 0) once a second and the ring glides there,
   so it drains steadily. In the last five seconds it turns warm and the
   number grows. */
.clock { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.clock > * { grid-area: 1 / 1; }
.orb-wrap { position: relative; }
.clock svg { width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.clock circle { fill: none; stroke-width: 3; }
.clock-track { stroke: rgba(188, 215, 255, 0.16); }
.clock-ring {
  stroke: var(--cool);
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: calc((1 - var(--left, 1)) * 100);
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}
.clock-n {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.5rem, 18vw, 5rem);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 18px rgba(14, 12, 10, 0.65);
}
.clock.last .clock-ring { stroke: var(--warm); stroke-width: 5; }
.clock.last .clock-track { stroke: rgba(255, 199, 102, 0.18); }
.clock.last .clock-n { color: var(--warm); animation: clock-beat 1s ease-out infinite; }
@keyframes clock-beat {
  0% { transform: scale(1.18); }
  40%, 100% { transform: scale(1); }
}
/* Pass tapped: the clock stops where it is, dimmed. */
.clock.stopped { opacity: 0.45; }
.clock.stopped .clock-ring { transition: none; }
.clock.stopped .clock-n { animation: none; }

/* How much light the stage has. The ghost light is the one small lamp a
   theatre leaves on: the call is connecting and nothing is listening. At half,
   the booth is setting the round up. "Places" brings the light up full. */
.stage .light {
  scale: 1;
  transition: opacity 0.12s linear, transform 0.12s linear, scale 0.5s ease-out, filter 0.5s ease-out;
}
.stage[data-lit="half"] .light { scale: 0.72; filter: brightness(0.55); }
.stage[data-lit="ghost"] .light[data-who] {
  --beam: #ffe9c4;
  scale: 0.16;
  filter: brightness(1.4);
  opacity: 0.9;
  transform: none;
  animation: none;
}
/* The hold: pressing the light means "I'm not done", and it burns steady
   while the partner waits. Nothing on the stage scrolls or selects, so that a
   long press is only ever a hold. */
.stage { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.stage.held .light[data-who] { --beam: var(--cool); animation: none; opacity: 0.95; transform: scale(1.04); }
.hint { margin: 14px 0 0; }

/* The dip: the light drops once and comes back. Time is nearly up. */
.stage.dip .light { filter: brightness(0.12); transition: filter 0.18s ease-in; }

/* Lights up, at "Places": a warm wash opens across the stage from the light
   and settles back on it. It sits behind everything on the stage and takes
   no taps, so pressing the light is still a hold. It is centred near the
   light, which sits above the middle of the stage by half the lines under
   it: 32 pixels with none, 72 with the scene's word and the hint. */
.stage { position: relative; isolation: isolate; }
.stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse 62% 50% at 50% calc(50% - 52px), rgba(255, 199, 102, 0.42), rgba(255, 199, 102, 0.12) 55%, transparent 80%);
  transform-origin: 50% calc(50% - 52px);
  opacity: 0;
  pointer-events: none;
}
.stage.wash::before { animation: wash 1.5s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes wash {
  0% { opacity: 0; transform: scale(0.2); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.45); }
}

/* The blackout: the whole screen goes dark at once, holds, and lifts on the
   note. It takes taps while it is dark, so nothing behind it is pressed. */
.blackout {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #000;
  opacity: 0;
  pointer-events: none;
}
/* Lights up, at Start: the house cuts to black and lifts on the dark stage,
   where only the ghost light glows. Unlike the blackout, it takes no taps. */
.blackout.cut { animation: cut 0.9s ease-out forwards; }
@keyframes cut {
  0%, 25% { opacity: 1; }
  100% { opacity: 0; }
}
.blackout.on { pointer-events: auto; animation: blackout 2s ease-in forwards; }
@keyframes blackout {
  0%, 75% { opacity: 1; }
  100% { opacity: 0; }
}

.cue { min-height: 1.5em; max-width: 24rem; margin-bottom: 0; color: var(--muted); }
/* The word offered as a suggestion, under "Say a word". */
.btn.offer {
  width: auto;
  min-height: 44px;
  margin-top: 14px;
  padding: 8px 20px;
  border-radius: 999px;
  color: var(--muted);
}
/* The scene's word, an emotion called, or the user's status: big, like a title. */
.cue.big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 3rem;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink);
}
.controls { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 10px; }
/* A game on the chain has no Help: Again and Scene share the row. */
.controls:has(> #live-help[hidden]) { grid-template-columns: 1fr 1.4fr; }

/* ---------- Friends in the room ---------- */

/* The lamps: one small numbered disc for each player, dim and unlit but for
   the one whose turn it is, which burns warm, white at its heart like the
   spotlight, with a pool of the same light round it. Each is up to 36 pixels
   across, so eight fit beside each other on the narrowest phone, and they
   shrink together where Pass sits beside them. --n is how many there are. */
.lamps {
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(var(--n, 1), minmax(0, 36px));
  justify-content: center;
  gap: 8px;
}
.lamp {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--boards);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lamp[aria-current="true"] {
  border-color: transparent;
  background: var(--warm);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--warm) 45%, white) 0%, var(--warm) 62%);
  color: var(--warm-ink);
}
.lamp[aria-current="true"]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 199, 102, 0.42), rgba(255, 199, 102, 0.12) 48%, transparent 70%);
  pointer-events: none;
}
/* On the stage, a player out of the game, as in Story, Story, Die: their
   lamp keeps its place and its number for the rest of the game, but is
   burnt out. No fill, a broken rim and a line struck through tell it from
   the unlit lamps and the lit one without its colour; its number, a little
   dimmer, still keeps 4.5:1 on the stage. It is never lit. */
.lamp.out {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--muted) 50%, var(--stage));
  background: transparent;
  color: color-mix(in srgb, var(--muted) 80%, var(--stage));
}
.lamp.out::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 12%;
  right: 12%;
  height: 1.5px;
  margin-top: -0.75px;
  border-radius: 1px;
  background: var(--muted);
  background: color-mix(in srgb, var(--muted) 80%, var(--stage));
  transform: rotate(-45deg);
  pointer-events: none;
}
/* An AI player's lamp, wherever lamps show: a second, thin rim round it, a
   speaker's grille rather than a bulb, so it reads as AI without its
   colour. Lit, the rim is warm too. A screen reader hears "AI". */
.lamp.ai { outline: 1.5px solid var(--line); outline-offset: 2px; }
.lamp.ai[aria-current="true"] { outline-color: color-mix(in srgb, var(--warm) 70%, var(--stage)); }
/* An AI player sitting out an exercise, or a game for people only: its lamp
   keeps its place and its rim, unfilled and dimmer, and never lights. Its
   number still keeps 4.5:1. */
.lamp.sitting {
  border-color: color-mix(in srgb, var(--muted) 40%, var(--stage));
  background: transparent;
  color: color-mix(in srgb, var(--muted) 80%, var(--stage));
}
.lamp.ai.sitting { outline-style: dashed; }
/* The lamp moving on, at Pass or at a "Scene": the new one flares and settles. */
.lamps.moved .lamp[aria-current="true"] { animation: lamp-on 0.8s cubic-bezier(0.2, 0.7, 0.3, 1); }
.lamps.moved .lamp[aria-current="true"]::before { animation: lamp-flare 0.8s cubic-bezier(0.2, 0.7, 0.3, 1); }
@keyframes lamp-on { from { transform: scale(1.22); } }
@keyframes lamp-flare {
  0% { opacity: 0; transform: scale(0.5); }
  35% { opacity: 1; transform: scale(1.45); }
}

/* Players on the room's screen after a round: its name, minus, the number
   and plus, and Pass at the end of the line once two or more play. Above
   Start, under the large lamps. */
.players { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.players-label { font-size: 0.9375rem; font-weight: 600; color: var(--muted); }
.players-step { display: inline-flex; align-items: center; gap: 4px; }
.players .step-btn { width: 44px; min-height: 44px; border-radius: 12px; }
.players .step-btn .icon { width: 20px; height: 20px; }
.players-n { min-width: 1.6em; font-size: 1.25rem; font-weight: 700; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.btn.pass { width: auto; min-height: 44px; margin-left: auto; padding: 8px 20px; border-radius: 12px; }
/* On the stage, the lamps under the rule, with Pass beside them. Each lamp
   keeps at least 30 pixels; where that leaves Pass no room, it goes under. */
.lamp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin: 4px 0 0; }
.lamp-row .lamps { flex: 0 1 auto; min-width: min(100%, calc(var(--n, 1) * 30px + (var(--n, 1) - 1) * 8px)); }
.lamp-row .pass { flex: none; margin-left: 0; }
/* On an exercise's screen the same row sits above Start. */
.dock .lamp-row { margin: 0 0 14px; }
/* Under the lamps on an exercise's screen and on the room's screen after a
   round, once someone playing has a name: whose turn it is, small, quiet
   and centred. A long name wraps; it is never cut. */
.lamp-name { margin: 0 0 12px; font-size: 0.9375rem; line-height: 1.4; color: var(--muted); text-align: center; overflow-wrap: anywhere; text-wrap: balance; }
.dock .lamp-row + .lamp-name { margin-top: -6px; }
.room-stage .lamp-name { margin: 16px 0 0; }
.stack .room { flex: 1 0 100%; }
.stack .players { margin-bottom: 4px; }
/* On the room's screen after a round, the lamps fill its middle, larger:
   56 pixels across, so the next player can see theirs from across the room.
   More than five go on two rows, --cols to a row, the second centred. */
.room-stage { flex: 1; display: grid; place-items: center; min-height: 8rem; padding: 24px 0; }
.lamps.big {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 12px;
  max-width: calc(var(--cols, 1) * 56px + (var(--cols, 1) - 1) * 12px);
}
.lamps.big .lamp { width: 56px; border-width: 2px; font-size: 1.375rem; }
.lamps.big .lamp[aria-current="true"]::before { inset: -26px; }

/* The line at the top of an exercise's screen: Back at one end and the
   Players icon at the other, its target reaching past the column's edge so
   the drawing lines up with it. On the room's screen after a round, the icon
   alone, at the end. */
.top-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 6px; }
.top-line .back { margin: 0; }
.top-line.end { justify-content: flex-end; }
.people {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  margin-right: -10px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--muted);
}
.people .icon { width: 24px; height: 24px; }
/* How many are playing, from two: in the ink, beside the drawing. */
.people-n { color: var(--ink); font-size: 1.0625rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.people-n:empty { display: none; }
/* The Party set on for this exercise: a small lamp, lit warm like the one
   whose turn it is, over the drawing's shoulder. */
.party-lamp {
  position: absolute;
  top: 8px;
  left: 29px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--warm) 45%, white) 0%, var(--warm) 70%);
  box-shadow: 0 0 0 2px var(--stage), 0 1px 6px rgba(255, 199, 102, 0.55);
}

/* The Players sheet: the count between minus and plus, as on the chooser,
   then the Party switch with its name and what it is, then Done. */
.people-sheet .poster.small { font-size: 1.75rem; }
.party-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sheet .party-name, .who .party-name, #account-party .party-name { margin: 0 0 2px; color: var(--ink); font-size: 1rem; font-weight: 600; }
.party-words .fine { margin: 0; }
.sheet #party-held { margin: 2px 0 16px; }
/* The switch: a track in the dark of the house with a dim knob when off;
   on, the track burns warm and the knob slides across, white at its heart
   like the lamps. The button is a finger tall; the track is drawn inside. */
.switch { position: relative; flex: none; width: 60px; height: 44px; padding: 0; border: 0; background: none; }
.switch::before {
  content: "";
  position: absolute;
  inset: 5px 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--stage);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.switch-knob {
  position: absolute;
  top: 9px;
  left: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), background-color 0.2s ease;
}
.switch[aria-checked="true"]::before { border-color: transparent; background: var(--warm); box-shadow: 0 2px 14px rgba(255, 199, 102, 0.35); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); background: #fff8ec; }
.switch:focus-visible { outline-offset: 0; border-radius: 999px; }

/* ---------- Names ---------- */

/* The Names row, on Friends and in the Players sheet: one button the full
   width, under a thin rule as Spicy's row is. "Names", and under it who is
   playing, small and quiet, on one line, cut short if it must be; a chevron
   at its end. */
.names-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 58px;
  margin: 4px 0 16px;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
}
.who .names-row { margin: 16px 0 0; }
.names-words { flex: 1; min-width: 0; display: grid; gap: 2px; }
.names-name { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.names-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; line-height: 1.4; color: var(--muted); }
.names-row > .icon { width: 20px; height: 20px; color: var(--muted); }
.names-row:focus-visible { outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) {
  .names-row:hover > .icon { color: var(--ink); }
}

/* The Names sheet scrolls as one piece, title to Done, with nothing pinned,
   so the keyboard never leaves a strip too short to use. A row for each
   player: their lamp, unlit, a field as wide as the row, and the Person or
   AI switch. */
.names-sheet { overflow-y: auto; overscroll-behavior: contain; }
.names-sheet .poster.small { font-size: 1.75rem; }
.names-list { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.name-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.name-row > .lamp { flex: none; width: 36px; }
/* The app's first text field: a well in the sheet's raised surface, 52
   pixels tall, with the step buttons' corners. Its text is 17 pixels, never
   under 16, or an iPhone zooms the page on focus; its hint, the name it has
   now, is quiet. With focus its border is the ink and the usual ring shows:
   warm is the light, not a state. */
.name-field {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--stage);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
}
.name-field::placeholder { color: var(--muted); font-weight: 400; opacity: 1; }
.name-field:focus { outline: 3px solid var(--cool); outline-offset: 2px; border-color: var(--ink); }
/* Beside each player's field, Person or AI: a pill in the dark of the
   house with the two words in it, and the one that is so lit. A person is
   lit cool, as the light on you is; an AI warm, as the light on your
   partner and the AI's characters is. A finger tall. Where it can't be
   switched it is dimmed, and the line under the players says why. */
.seat-switch {
  flex: none;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  min-height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--stage);
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
}
.seat-switch > span { padding: 9px 11px; border-radius: 999px; line-height: 1; transition: background-color 0.2s ease, color 0.2s ease; }
.seat-switch[aria-checked="false"] .seat-person { background: color-mix(in srgb, var(--cool) 16%, var(--boards)); color: var(--ink); }
.seat-switch[aria-checked="true"] .seat-ai { background: var(--warm); color: var(--warm-ink); }
.seat-switch[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }
.seat-switch:focus-visible { outline-offset: 2px; }
.names-why { margin: -8px 0 18px; }

/* ---------- The deal ---------- */

/* The phone going round the players before a game: the lamp of the one to
   take it, large and lit, the words to them, and their card, all in the
   middle of the screen between Back and the one big button under the thumb.
   Covered, the card is the back of a playing card in the dark of the house,
   with nothing on it but "Your secret"; turned over, it is printed like the
   playbill, the secret in the poster face, and under it how to play it, up
   to about ninety characters. Two cards of one game differ only in their
   words. Once all have looked, the players' lamps in the order they play. */
#deal { text-align: center; }
.deal-top { isolation: isolate; display: flex; flex-direction: column; align-items: center; margin: auto 0 20px; padding-top: 8px; }
.deal-lamp { width: 72px; margin-bottom: 22px; border-width: 2px; font-size: 1.875rem; }
.deal-lamp[aria-current="true"]::before { inset: -30px; }
#deal-order { margin: 6px 0 26px; }
#deal .poster { margin-bottom: 10px; }
#deal .lede { margin: 0; max-width: 24rem; text-wrap: balance; }
.deal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 14.5rem;
  margin-bottom: 4px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: repeating-linear-gradient(45deg, rgba(255, 199, 102, 0.06) 0 1.5px, transparent 1.5px 11px), var(--boards);
  box-shadow: inset 0 0 0 9px var(--boards), inset 0 0 0 10px var(--line);
}
/* "Your secret", on a plate of its own over the card's back. */
.deal-cover {
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--boards);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.deal-card[data-shown="true"] {
  border-color: transparent;
  border-radius: 3px;
  background: radial-gradient(ellipse 110% 85% at 50% 0%, #fffaf2, rgba(255, 250, 242, 0) 70%), var(--paper);
  color: var(--paper-ink);
  box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7px rgba(14, 12, 10, 0.55), 0 14px 32px -12px rgba(0, 0, 0, 0.7);
}
/* "You are", between two short rules, as "Scenework presents" is on the bill. */
.deal-you {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-quiet);
}
.deal-you::before, .deal-you::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6; }
.deal-secret {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 11vw, 2.75rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-wrap: balance;
  animation: enter 0.22s ease-out both;
}
/* Wide enough that ninety characters take three lines on a phone 320 wide. */
.deal-how { margin: 0; max-width: 30ch; font-size: 0.9375rem; line-height: 1.4; color: var(--paper-quiet); text-wrap: balance; }

/* ---------- Note and end ---------- */

.note { margin-top: 18px; }
.note p:not(.label) { margin-bottom: 24px; font-size: 1.15rem; line-height: 1.45; }
.note .waiting { color: var(--muted); }
.note .points { margin: 0 0 24px; padding-left: 1.1em; font-size: 1.05rem; line-height: 1.45; }
.note .points li { margin-bottom: 10px; }
.note .points li::marker { color: var(--muted); }
.stack { display: flex; flex-wrap: wrap; gap: 10px; }
.stack .primary { flex: 1 0 100%; }
/* The suggested exercise: its name, and the skill it practises beneath. */
.stack .suggest {
  flex: 1 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-color: var(--warm);
}
.suggest .category { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
#note-next { flex: 1; width: auto; }
#note-finish { flex: 0 0 auto; width: auto; padding-left: 20px; padding-right: 20px; }

/* ---------- The playbill ---------- */

/* A printed bill, not a box on the screen: paper in the colour of the
   light, nearly square at the corners, with a fine rule printed just inside
   its edge, and the light falling on it from above. Centred like a
   theatre's bill: "Scenework presents" in spaced capitals between two short
   rules, the title in the poster face, the line in quotation marks, and at
   the foot, under a rule, the exercise and the date, with Share. */
.bill {
  position: relative;
  isolation: isolate;
  margin: 2px 0 6px;
  padding: 16px 20px 10px;
  border-radius: 3px;
  background-color: var(--paper);
  color: var(--paper-ink);
  text-align: center;
  box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7px rgba(14, 12, 10, 0.55), 0 14px 32px -12px rgba(0, 0, 0, 0.7);
  transition: background-color 0.45s ease-out, color 0.45s ease-out, box-shadow 0.45s ease-out;
}
/* The light on the paper: brightest at the top, where it falls. */
.bill::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 110% 85% at 50% 0%, #fffaf2, rgba(255, 250, 242, 0) 70%), linear-gradient(to bottom, transparent 60%, rgba(120, 96, 64, 0.1));
  transition: opacity 0.45s ease-out;
}
.bill-presents {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-quiet);
}
.bill-presents::before, .bill-presents::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6; }
.bill-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.125rem;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.bill-line { margin: 0 auto 10px; max-width: 30ch; font-size: 1rem; font-weight: 500; line-height: 1.38; text-wrap: balance; }
.bill-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(14, 12, 10, 0.22);
  text-align: left;
}
/* The exercise over the date, in small spaced capitals. */
.bill-credit { display: flex; flex-direction: column; flex: 1; min-width: 0; margin: 0; font-size: 0.6875rem; line-height: 1.35; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-quiet); }
#bill-ex { font-weight: 700; color: var(--paper-ink); }
.bill-said { flex: none; font-size: 0.8125rem; font-weight: 600; color: var(--paper-ink); }
.bill-said:empty { display: none; }
/* Share, printed in the bill's ink: an outline that fills under a finger. */
.bill-share {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-right: -8px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--paper-ink);
  font-size: 0.9375rem;
  font-weight: 700;
  transition: background-color 0.15s ease;
}
.bill-share .icon { width: 20px; height: 20px; }
.bill-share:active { background-color: rgba(14, 12, 10, 0.1); }
.bill-share:focus-visible { outline-color: var(--paper-ink); outline-offset: 0; }
@media (hover: hover) { .bill-share:hover { background-color: rgba(14, 12, 10, 0.07); } }

/* While it is written: the bill unlit, an outline in the dark of the house
   with its first words and a line saying it is being printed, as tall as a
   short bill so the note under it hardly moves when it fills. */
.bill[data-state="waiting"] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
  background-color: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
.bill[data-state="waiting"]::before { opacity: 0; }
.bill[data-state="waiting"] .bill-presents { color: var(--muted); }
.bill-wait { margin: 0; font-size: 0.9375rem; color: var(--muted); }

/* Above the note, with room before "Your note". */
#bill { margin-bottom: 18px; }
/* On the room's screen the bill is the middle, with the lamps under it.
   On two rows, from six playing, the lamps go a size down so both fit.
   Without a bill, the lamps are the middle on their own, as before. */
#note[data-form="room"][data-bill="shown"] #bill { margin: auto 0 0; }
#note[data-form="room"][data-bill="shown"] .room-stage { flex: 0 0 auto; min-height: 0; padding: 22px 0 4px; }
#note[data-form="room"][data-bill="shown"] .lamps.big[data-rows="2"] { gap: 10px; max-width: calc(var(--cols, 1) * 44px + (var(--cols, 1) - 1) * 10px); }
#note[data-form="room"][data-bill="shown"] .lamps.big[data-rows="2"] .lamp { width: 44px; font-size: 1.125rem; }
#note[data-form="room"][data-bill="shown"] .lamps.big[data-rows="2"] .lamp[aria-current="true"]::before { inset: -18px; }

/* After a game, the reveal under the title: each player's lamp beside who
   they were in the poster face, in the order they played, above the
   playbill. */
.reveal { margin: 4px 0 18px; }
.reveal .label { margin-bottom: 10px; }
/* After a game won, the reveal opens on the winner: the one in the light.
   Their lamp, large and lit, beside "Player 2 wins the date" in the text
   face, heavy. No trophy, no confetti, no colour of its own. */
.reveal-winner { isolation: isolate; display: flex; align-items: center; gap: 18px; margin: 10px 0 22px; font-size: 1.5rem; font-weight: 800; line-height: 1.2; color: var(--ink); text-wrap: balance; }
.reveal-winner .lamp { flex: none; width: 56px; border-width: 2px; font-size: 1.375rem; }
.reveal-winner .lamp[aria-current="true"]::before { inset: -26px; }
/* More than one winner, as when the detective catches the murderer: up to
   seven lamps a size down, in a row that wraps at 320 wide, and the line
   under them, on up to two lines. */
.reveal-more { display: contents; }
.reveal-winner[data-many="true"] { flex-wrap: wrap; gap: 14px 12px; }
.reveal-winner[data-many="true"] .lamp { width: 44px; font-size: 1.125rem; }
.reveal-winner[data-many="true"] .lamp[aria-current="true"]::before { inset: -18px; }
.reveal-winner[data-many="true"] #reveal-winner-line { flex: 1 0 100%; margin-top: 2px; font-size: 1.25rem; }
.reveal-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.reveal-row { display: flex; align-items: center; gap: 14px; }
.reveal-row .lamp { flex: none; width: 36px; }
/* Rows sit further apart than the lines of one name, so where a name runs
   to two or three lines, as an award's can, the eye still sees where each
   row ends: every row as far from the next as rows with a small line are. */
.reveal-row + .reveal-row { margin-top: 4px; }
/* The bill follows straight under it, and the large lamps make way. */
#note[data-form="room"][data-bill="shown"][data-reveal="shown"] #bill { margin: 0 0 6px; }
.reveal-name { min-width: 0; font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1; letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance; }
/* A row with a small line under who they were (.guessed, as the
   contestant's guess was the first), such as "Did it", quiet; at the end of
   a winner's row, with or without a small line, a drawn mark and Winner,
   warm (.reveal-picked: a heart in The Dating Game, a star elsewhere); and
   a lamp lit where the game says, such as the murderer's. */
.reveal-list { isolation: isolate; }
.reveal-row.guessed { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 4px; align-items: center; }
.reveal-row.guessed .lamp { grid-row: 1 / span 2; }
.reveal-row.guessed .reveal-name { grid-column: 2; grid-row: 1; align-self: end; }
.reveal-guess { grid-column: 2; grid-row: 2; align-self: start; min-width: 0; font-size: 0.9375rem; line-height: 1.3; color: var(--muted); }
.reveal-picked { grid-column: 3; grid-row: 1 / span 2; display: inline-flex; flex: none; align-items: center; gap: 5px; margin-left: auto; color: var(--warm); font-size: 0.9375rem; font-weight: 700; }
.reveal-picked .icon { width: 18px; height: 18px; vertical-align: 0; }
/* Once someone in the room has a name, every row has its player's name,
   small and in the ink, above its large line, in the text face, as a typed
   name may be in any alphabet. The lamp and the mark stand beside all of it. */
.reveal-row.named { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 14px; row-gap: 3px; align-items: center; }
.reveal-row.named.guessed { grid-template-rows: auto auto auto; }
.reveal-row.named .lamp, .reveal-row.named .reveal-picked { grid-row: 1 / -1; }
.reveal-row.named .lamp { grid-column: 1; }
.reveal-row.named .reveal-picked { grid-column: 3; }
.reveal-who { grid-column: 2; grid-row: 1; align-self: end; min-width: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.reveal-row.named .reveal-name { grid-column: 2; grid-row: 2; align-self: start; }
.reveal-row.named.guessed .reveal-guess { grid-row: 3; }
/* Words for a screen reader alone. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The picture, full screen, to press and hold. */
.picture { text-align: center; }
.picture img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; margin: 0 auto 14px; border-radius: 4px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.picture p { margin: 0 0 6px; color: var(--ink); text-wrap: balance; }

#end-note-wrap { margin: 16px 0 28px; }
#end-note-wrap p:last-child { font-weight: 400; }
.rating { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 4px; }
.rating button {
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--boards);
  font-weight: 700;
  font-size: 1.1rem;
}
.rating button[aria-pressed="true"] { background: var(--warm); color: var(--warm-ink); border-color: transparent; }
.rating-scale { display: flex; justify-content: space-between; margin: 8px 0 0; }

/* ---------- Small screens and reduced motion ---------- */

/* Short screens (a small phone with its toolbars showing). */
@media (max-height: 640px) {
  .light { width: min(44vw, 10rem); }
  .stage { min-height: 11rem; }
  .cue.big { font-size: 2.4rem; }
  /* The deal: the lamp a size down, and the card little taller than its
     words, so a card with three lines of how to play it, and its button,
     fit on a phone 568 tall without scrolling. */
  .deal-top { margin-bottom: 12px; padding-top: 0; }
  .deal-lamp { width: 52px; margin-bottom: 12px; font-size: 1.5rem; }
  .deal-lamp[aria-current="true"]::before { inset: -22px; }
  #deal .poster { margin-bottom: 6px; }
  .deal-card { min-height: 10.5rem; padding: 18px 20px; }
  .deal-secret { margin-bottom: 10px; font-size: 2rem; }
  #deal .dock { padding-top: 16px; }
  /* A line game's stage: the card a size down, the light smaller, and the
     game's rule given up for the card, which says what to answer, so the
     card, the light, its label, Pass and the hint fit at 320 by 568. */
  #live:has(#live-card:not([hidden])) .rule { display: none; }
  .stage:has(#live-card:not([hidden])) .light { width: min(34vw, 7.5rem); }
  .live-card { min-height: 6rem; }
  .live-card-label { font-size: 0.875rem; }
  .live-card-text { font-size: 2rem; }
  .live-card[data-size="mid"] .live-card-text { font-size: 1.5rem; }
  .live-card[data-size="long"] .live-card-text { font-size: 0.9375rem; line-height: 1.25; }
}
/* Under 640 tall, the deal's title and the secret a size down again, as
   the Players sheet's title is, so the longest cards (a secret of 55
   characters, or 48 with three lines of how to play it) end above the
   button on a phone 568 tall. */
@media (max-height: 639.98px) {
  #deal .poster { font-size: 1.75rem; }
  .deal-secret { font-size: 1.75rem; }
}
@media (max-height: 540px) {
  .light { width: min(34vw, 7.5rem); }
  .stage { min-height: 8.5rem; }
  .rule { font-size: 0.95rem; }
}
/* Narrow screens. */
@media (max-width: 22.5rem) {
  .screen { --px: 16px; }
  .controls { gap: 8px; }
  .btn { padding-left: 10px; padding-right: 10px; }
  .filters, .voices { gap: 4px; }
  .chip { padding-left: 4px; padding-right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen, #home, #exercises, #friends, #account { animation: none; }
  .light, .light.pulse { animation: none !important; transition: none; opacity: 0.75; transform: none; }
  /* The clock steps once a second, and nothing on the button pulses or sinks. */
  .clock-ring { transition: none; }
  .clock.last .clock-n { animation: none; }
  .btn.turn, .btn.turn.press, .btn.turn.nudge { animation: none; transition: none; }
  .btn.turn.nudge { border-color: #fff; }
  .stage .light, .stage.dip .light { transition: none; }
  .blackout.on { animation-timing-function: step-end; }
  /* Lights up is a plain fade: from black at Start, and the wash with no spread at "Places". */
  .blackout.cut { animation: cut-fade 0.4s linear forwards; }
  .stage.wash::before { animation: wash-fade 1s ease-out both; }
  @keyframes cut-fade { from { opacity: 1; } to { opacity: 0; } }
  @keyframes wash-fade { 0% { opacity: 0; } 30% { opacity: 0.8; } 100% { opacity: 0; } }
  .row, .box, .game, .chip, .tab, .step-box, .step-walk, .how summary .icon, .more summary .icon, .switch::before, .switch-knob, .bill, .bill::before, .seat-switch > span { transition: none; }
  .deal-secret { animation: none; }
  /* The lamp moving on is a plain fade of its light, and a lamp added a
     plain fade in. */
  .lamps.moved .lamp[aria-current="true"] { animation: none; }
  .lamps.moved .lamp[aria-current="true"]::before { animation: lamp-fade 0.6s ease-out; }
  .lamp.added { animation: lamp-fade 0.6s ease-out; }
  .lamp.added::before { animation: none; }
  @keyframes lamp-fade { from { opacity: 0; } }
}
