/* MYOA: beauty through simplicity. One quiet column of type on a still pastel wash.
   Only emphasised words (and the dice, briefly) move. Every size and target follows CONNIE:
   text ≥ 16px, targets ≥ 44px, words beside every control. */

@font-face { font-family: "Inter"; src: url(/fonts/inter-roman.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

/* Registered so the browser can interpolate them smoothly on the compositor-friendly paint path. */
@property --shift { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --sheen { syntax: "<percentage>"; inherits: false; initial-value: -30%; }
@property --veil { syntax: "<number>"; inherits: false; initial-value: 0; }

:root {
  /* Neutral defaults; theme.ts replaces these with the genre palette. */
  --l-bg1: #fbf3ec; --l-bg2: #efeafb; --l-bg3: #e6f5f0; --l-text: #18181a; --l-muted: #4b4a50;
  --l-g1: #5b37b8; --l-g2: #a3346a; --l-g3: #0f6b62; --l-focus: #18181a; --l-glint: rgb(24 24 26 / 0.38);
  --d-bg1: #15131c; --d-bg2: #1b1526; --d-bg3: #0f1d1d; --d-text: #ecebef; --d-muted: #b9b7bf;
  --d-g1: #cbb8ff; --d-g2: #ffb7d5; --d-g3: #a3eed7; --d-focus: #ffffff; --d-glint: rgb(255 255 255 / 0.75);

  --bg1: var(--l-bg1); --bg2: var(--l-bg2); --bg3: var(--l-bg3); --text: var(--l-text); --muted: var(--l-muted);
  --g1: var(--l-g1); --g2: var(--l-g2); --g3: var(--l-g3); --focus: var(--l-focus); --glint: var(--l-glint);
  --on-text: var(--l-bg1);

  --column: 38rem;
  --gutter: max(16px, env(safe-area-inset-left));
  --target: 44px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg1: var(--d-bg1); --bg2: var(--d-bg2); --bg3: var(--d-bg3); --text: var(--d-text); --muted: var(--d-muted);
    --g1: var(--d-g1); --g2: var(--d-g2); --g3: var(--d-g3); --focus: var(--d-focus); --glint: var(--d-glint);
    --on-text: var(--d-bg1);
  }
}

* { box-sizing: border-box; }
html {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto; font-feature-settings: "cv11", "ss03"; /* single-storey a, rounder quotes */
  -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
body {
  margin: 0; min-height: 100dvh; color: var(--text);
  background-color: var(--bg1);
  background-image:
    radial-gradient(60% 55% at 88% 6%, var(--bg3) 0%, transparent 70%),
    radial-gradient(70% 60% at 6% 96%, var(--bg2) 0%, transparent 72%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.65; font-weight: 430;
  overflow-wrap: break-word; hyphens: manual;
}
main {
  max-width: calc(var(--column) + 2 * var(--gutter)); margin-inline: auto;
  padding: calc(5rem + env(safe-area-inset-top)) var(--gutter) calc(40vh + env(safe-area-inset-bottom));
  outline: none;
}
p { margin: 0 0 1.05em; }
h1, h2, h3, .scene-title { font-weight: 900; line-height: 1.04; letter-spacing: -0.028em; margin: 2em 0 0.5em; text-wrap: balance; }
h1.brand-mark { padding-bottom: 0.06em; }
h1 { font-size: clamp(3.25rem, 2rem + 7vw, 7rem); font-weight: 900; letter-spacing: -0.045em; margin: 0.2em 0 0.2em; }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem); }
.scene-title { font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4rem); }
.lede { font-size: 1.15em; color: var(--muted); font-weight: 450; margin-bottom: 2.2em; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -200px; padding: 10px 14px; background: var(--text); color: var(--on-text); border-radius: 999px; font-weight: 700; }
.skip:focus { top: calc(12px + env(safe-area-inset-top)); }

/* ---- Emphasis: the only continuous motion ------------------------------------------------- */
.em {
  --shift: 0%; --sheen: -30%;
  background-image:
    /* the glint: a narrow band that only ever raises contrast (bright on dark, deep on light) */
    linear-gradient(100deg, transparent calc(var(--sheen) - 9%), var(--glint) var(--sheen), transparent calc(var(--sheen) + 9%)),
    /* the drift: a seamless loop of the genre gradient */
    linear-gradient(100deg,
      var(--g1) calc(var(--shift) - 100%), var(--g2) calc(var(--shift) - 66.6%), var(--g3) calc(var(--shift) - 33.3%),
      var(--g1) var(--shift), var(--g2) calc(var(--shift) + 33.3%), var(--g3) calc(var(--shift) + 66.6%), var(--g1) calc(var(--shift) + 100%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation:
    em-in 1.1s var(--ease-out) both,
    drift 32s linear infinite,
    sheen 9s cubic-bezier(0.45, 0, 0.2, 1) 1.4s infinite;
}
.em-person { font-weight: 800; }
.em-place  { font-weight: 600; font-style: italic; animation-duration: 1.1s, 44s, 11s; }
.em-item   { font-weight: 800; text-transform: uppercase; font-size: max(0.84em, 16px); letter-spacing: 0.08em; animation-duration: 1.1s, 32s, 6s; }
.em-speech { font-weight: 300; font-style: italic; animation-duration: 1.4s, 52s, 13s; }
.em-moment { font-weight: 900; font-size: 1.14em; letter-spacing: -0.01em; animation: em-in 1.8s var(--ease-out) both, drift 26s linear infinite, sheen 7s cubic-bezier(0.45, 0, 0.2, 1) 0.6s infinite; }

/* Arrival: words surface from a soft focus, never from transparent text over the page (no contrast dip below AA on settle). */
@keyframes em-in { from { filter: blur(6px); opacity: 0.35; } to { filter: blur(0); opacity: 1; } }
@keyframes drift { to { --shift: 100%; } }
/* One slow pass of light, then rest for most of the cycle. */
@keyframes sheen { 0% { --sheen: -30%; } 22% { --sheen: 130%; } 100% { --sheen: 130%; } }

:root[data-motion="paused"] .em { animation: none; }
@media (prefers-reduced-motion: reduce) { .em { animation: none !important; transition: none !important; } }
@media (forced-colors: active) { .em { color: CanvasText; background: none; } }

/* ---- Controls --------------------------------------------------------------------------- */
button, .link {
  font: inherit; color: inherit; background: none; border: 0; padding: 0.35em 0; margin: 0;
  min-height: var(--target); min-width: var(--target); cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.24em; text-decoration-color: var(--muted);
  transition: text-decoration-color 120ms ease, color 120ms ease;
}
a { color: inherit; text-underline-offset: 0.24em; text-decoration-thickness: 1px; }
button:hover, .link:hover { text-decoration-color: currentColor; }
button:disabled { cursor: default; opacity: 1; color: var(--muted); }

/* The one main action on a screen: a real, unmistakable button. */
.primary {
  display: inline-flex; align-items: center; gap: 0.5em; min-height: 52px; padding: 0.7em 1.5em; border-radius: 999px;
  background: var(--text); color: var(--on-text); font-weight: 750; letter-spacing: -0.005em; text-decoration: none;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.04), 0 10px 30px -12px color-mix(in srgb, var(--text) 45%, transparent);
  transition: transform 140ms var(--ease-out), box-shadow 140ms ease;
}
.primary:hover { transform: translateY(-1px); }
.primary:active { transform: translateY(0); }
.primary:disabled { background: var(--muted); color: var(--on-text); transform: none; }

.field { display: block; margin: 1.6em 0 1.4em; }
.field > span:first-child { display: block; font-weight: 650; }
.field .hint { display: block; color: var(--muted); font-size: 1rem; margin-top: 0.15em; }
input[type="text"], input[type="email"], input:not([type]) {
  font: inherit; color: inherit; width: 100%; min-height: var(--target); background: transparent; border: 0;
  border-bottom: 2px solid var(--muted); border-radius: 0; padding: 0.45em 0; margin-top: 0.35em;
  transition: border-color 120ms ease;
}
input::placeholder { color: var(--muted); opacity: 1; }
input:focus, input:focus-visible { outline: none; border-bottom-color: var(--focus); box-shadow: 0 2px 0 0 var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 3px; }
main:focus, main:focus-visible, [role="tabpanel"]:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }
.error { color: var(--text); font-weight: 650; margin-top: 0.5em; }
.error::before { content: "⚠ "; }
.row { display: flex; flex-wrap: wrap; gap: 0.75em 1.5em; align-items: center; margin-top: 1.4em; }

/* ---- Story ------------------------------------------------------------------------------- */
.action { margin: 2.6em 0 1em; font-weight: 650; color: var(--muted); }
.action::before { content: "› "; }
/* While the DM works: a line that says what's happening, over a slow band of light. */
.working {
  display: flex; align-items: center; gap: 0.7em; margin: 0.4em 0 0; padding: 0.55em 0;
  color: var(--muted); font-weight: 600; position: relative;
}
.working::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--g1), var(--g2), transparent) 0 0 / 40% 100% no-repeat,
    color-mix(in srgb, var(--muted) 18%, transparent);
  animation: scan 2.4s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}
.working-text { animation: step-in 360ms var(--ease-out) both; }
.working-dots { display: inline-flex; gap: 0.28em; }
.working-dots span { width: 0.42em; height: 0.42em; border-radius: 50%; background: var(--g1); animation: pulse 1.2s ease-in-out infinite; }
.working-dots span:nth-child(2) { background: var(--g2); animation-delay: 0.16s; }
.working-dots span:nth-child(3) { background: var(--g3); animation-delay: 0.32s; }
@keyframes pulse { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.45; } 40% { transform: scale(1); opacity: 1; } }
@keyframes scan { from { background-position: -40% 0, 0 0; } to { background-position: 140% 0, 0 0; } }

/* The newest words: a soft caret at the end of the line while more are coming. */
.caret {
  display: inline-block; width: 0.5em; height: 1.05em; margin-left: 0.08em; vertical-align: -0.16em; border-radius: 2px;
  background: linear-gradient(180deg, var(--g1), var(--g2)); animation: blink 1s steps(2, jump-none) infinite;
}
@keyframes blink { 0%, 45% { opacity: 1; } 55%, 100% { opacity: 0.2; } }
.show-all { color: var(--muted); font-size: 1rem; margin-top: 0.3em; }

:root[data-motion="paused"] .working::after, :root[data-motion="paused"] :is(.working-dots span, .caret, .working-text) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .working::after, .working-dots span, .caret, .working-text { animation: none !important; }
  .working-dots span { opacity: 0.8; transform: none; }
}
@media (forced-colors: active) { .working-dots span, .caret { background: CanvasText; } }
.pace { border: 0; padding: 0; margin: 1em 0 0.4em; }
.pace legend { font-weight: 650; padding: 0; }
.status-line { color: var(--muted); font-size: 1rem; margin: 0.4em 0 0; }
.choices { list-style: none; margin: 1.8em 0 0; padding: 0; }
.choices li { margin: 0; }
.choices button { font-weight: 620; width: 100%; padding-block: 0.5em; }
.act form { margin-top: 0.6em; }
h1.story-title { font-size: clamp(2.5rem, 1.6rem + 4.5vw, 4.75rem); margin-bottom: 0.6em; }
.recap { font-style: italic; text-wrap: pretty; }
.undo { color: var(--muted); }
.pause { margin-top: 2em; }
.chapter-end { margin-top: 3em; }
.check { display: flex; align-items: center; gap: 0.7em; min-height: var(--target); margin: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--text); margin: 0; }
.check label { cursor: pointer; }
details.who { margin: 0 0 1.4em; }
details.who summary { cursor: pointer; min-height: var(--target); display: flex; align-items: center; font-weight: 650; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.24em; text-decoration-color: var(--muted); }
details.who .field { margin: 0.9em 0; }

/* ---- Dice: the roll gets the stage, then rests in the story as one quiet line --------------- */
.roll { display: flex; align-items: center; gap: 0.35em 0.8em; flex-wrap: wrap; margin: 1.8em 0 1.3em; }
.roll-dice { display: inline-flex; gap: 0.35em; }
.roll-text { color: var(--muted); font-weight: 520; font-size: 1rem; }
.roll-text strong { color: var(--text); font-weight: 800; }

.die-face {
  display: inline-grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-items: center; flex: none;
  background: none; border: 2px solid currentColor; border-radius: 22%; container-type: size;
  transition: transform 90ms linear;
}
.die-small { width: 1.9em; height: 1.9em; padding: 0.26em; }
.die-big { width: clamp(84px, 24vw, 112px); height: clamp(84px, 24vw, 112px); padding: 12px; border-width: 3px; }
.pip { width: 22cqw; height: 22cqw; border-radius: 50%; }
.pip.on { background: currentColor; }
.die-face.landed { animation: land 420ms var(--ease-out); }
@keyframes land { 0% { transform: scale(1.12); } 100% { transform: scale(1); } }

.roll-dialog {
  width: min(32rem, calc(100vw - 2 * var(--gutter))); max-height: calc(100dvh - 32px); overflow: auto;
  margin: auto; padding: 1.4em clamp(1.1em, 4vw, 2em) 1.6em; border: 0; border-radius: 28px; color: var(--text);
  background-color: var(--bg1);
  background-image: radial-gradient(70% 60% at 90% 0%, var(--bg3) 0%, transparent 70%), linear-gradient(160deg, var(--bg1), var(--bg2));
  box-shadow: 0 30px 80px -24px color-mix(in srgb, var(--text) 55%, transparent);
  animation: step-in 260ms var(--ease-out);
}
.roll-dialog::backdrop { background: color-mix(in srgb, var(--bg1) 55%, rgb(0 0 0 / 0.45)); backdrop-filter: blur(3px); }
.roll-dialog .eyebrow { margin: 0; color: var(--muted); font-weight: 700; font-size: 1rem; letter-spacing: 0.06em; text-transform: uppercase; }
.roll-dialog h2 { margin: 0.15em 0 0.4em; }
.roll-stakes { color: var(--muted); font-size: 1rem; }
.bands { list-style: none; margin: 0.4em 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.band {
  display: flex; flex-direction: column; gap: 0.1em; padding: 0.55em 0.6em; border-radius: 14px; font-size: 1rem; line-height: 1.3;
  color: var(--muted); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--text) 12%, transparent);
  transition: background-color 200ms ease, color 200ms ease, transform 300ms var(--ease-out);
}
.band strong { color: var(--text); font-weight: 900; font-size: 1.05rem; }
.band.hit { background: var(--text); color: var(--on-text); box-shadow: none; transform: translateY(-2px); }
.band.hit strong { color: var(--on-text); }
.roll-dice-big { display: flex; justify-content: center; gap: clamp(18px, 6vw, 32px); margin: 1.5em 0 1.1em; }
.roll-result { text-align: center; min-height: 4.6em; }
.roll-sum { margin: 0; color: var(--muted); font-size: 1rem; }
.roll-verdict { margin: 0.1em 0 0; font-weight: 900; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.1; }
.roll-dialog.settled .roll-verdict { animation: em-in 700ms var(--ease-out) both; }
.roll-dialog .row { justify-content: center; margin-top: 1em; }
.roll-dialog:focus, .roll-dialog:focus-visible { outline: none; }
.roll-dialog:not(.settled) .row { visibility: hidden; } /* the way on appears once the dice land */

:root[data-motion="paused"] :is(.die-face, .roll-dialog, .roll-verdict, .band) { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .die-face, .roll-dialog, .roll-verdict, .band { animation: none !important; transition: none !important; } }
@media (forced-colors: active) {
  .pip.on { background: CanvasText; }
  .band.hit { background: Highlight; color: HighlightText; }
  .band.hit strong { color: HighlightText; }
}

/* ---- Tools bar and drawer ---------------------------------------------------------------- */
.tools {
  position: fixed; inset: 0 0 auto 0; z-index: 2; display: flex; justify-content: flex-end; gap: 0.25em 1.4em;
  padding: calc(4px + env(safe-area-inset-top)) var(--gutter) 4px; font-size: 1rem;
  background: linear-gradient(to bottom, var(--bg1) 78%, color-mix(in srgb, var(--bg1) 0%, transparent));
  padding-bottom: 14px;
}
.tools:empty { display: none; }
.tools > a, .tools > button { white-space: nowrap; display: inline-flex; align-items: center; min-height: var(--target); padding: 0; }
.tools .brand { margin-right: auto; font-weight: 900; font-size: 1.15rem; letter-spacing: -0.03em; text-decoration: none; display: inline-flex; align-items: center; }
#drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(28rem, 100vw); overflow-y: auto; z-index: 3;
  padding: calc(1rem + env(safe-area-inset-top)) var(--gutter) calc(3rem + env(safe-area-inset-bottom));
  background: linear-gradient(160deg, var(--bg1), var(--bg2)); font-size: 1.0625rem;
  box-shadow: -1px 0 0 color-mix(in srgb, var(--text) 10%, transparent);
}
#drawer h2 { margin-top: 0.6em; }
.drawer-close { display: block; margin: 0 0 0 auto; }
#drawer h3 { font-size: 1.15rem; font-weight: 900; margin: 1.6em 0 0.4em; letter-spacing: -0.01em; }
#drawer [role="tablist"] { display: flex; gap: 0 1.2em; flex-wrap: wrap; margin: 0.4em 0 1em; }
#drawer [role="tab"][aria-selected="true"] { font-weight: 800; text-decoration-color: currentColor; text-decoration-thickness: 2px; }
#drawer ul { list-style: none; padding: 0; margin: 0; }
#drawer li { margin: 0 0 0.6em; }
.stat { display: flex; justify-content: space-between; gap: 1em; padding: 0.2em 0; margin: 0; }
.stat b { font-weight: 800; font-variant-numeric: tabular-nums; }
.done-item { text-decoration: line-through; color: var(--muted); }
@media (min-width: 1100px) {
  body.drawer-open main { margin-left: max(var(--gutter), calc((100vw - 28rem - var(--column)) / 2 - 1rem)); margin-right: calc(28rem + 1rem); }
}
@media (max-width: 1099.98px) { body.drawer-open main, body.drawer-open .tools { display: none; } }

/* ---- Start: worlds and the hero ---------------------------------------------------------- */
.genres { list-style: none; padding: 0; margin: 1.2em 0 0.4em; }
.genres li { margin: 0; }
.genres button {
  font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.6rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.12;
  text-decoration: none; padding: 0.06em 0; width: 100%;
}
.genres button[aria-pressed="true"] { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 0.12em; text-decoration-color: currentColor; }
.genres button[aria-pressed="false"]:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.tagline { min-height: 1.65em; color: var(--muted); }

@media (max-width: 480px) {
  .kbd-hint { display: none; }
  .tools { gap: 0.25em 1em; }
  body { font-size: 1.0625rem; line-height: 1.62; }
  main { padding-top: calc(4.25rem + env(safe-area-inset-top)); }
  .primary { width: 100%; justify-content: center; }
}

/* ---- GM view ----------------------------------------------------------------------------- */
.gm-list { list-style: none; padding: 0; margin: 0 0 1em; }
.gm-list li { margin: 0 0 0.5em; }
.gm-issue { font-weight: 700; }
main h3 { font-size: 1.15rem; margin: 1.6em 0 0.4em; letter-spacing: -0.01em; }

.passkey-offer { margin: 0 0 2em; }
.passkey-offer .row { margin-top: 0.4em; }
.saved { font-weight: 700; }
.story-so-far .narration { font-size: 1.08em; text-wrap: pretty; }
.welcome { margin: 0; }

/* ---- Writing your story: live progress ------------------------------------------------------- */
.making-title { font-size: clamp(2.5rem, 1.6rem + 4.5vw, 4.75rem); margin-bottom: 0.5em; }
.making-steps { list-style: none; padding: 0; margin: 1.2em 0 1.6em; }
.making-steps li { margin: 0 0 0.55em; animation: step-in 150ms ease-out both; }
.making-steps li.done { color: var(--muted); }
.making-steps li.done .making-text::before { content: "✓ "; color: var(--text); font-weight: 700; }
.making-steps li.active { font-weight: 750; font-size: 1.12em; }
.making-steps li.active .making-text {
  background-image: linear-gradient(100deg, var(--g1) calc(var(--shift) - 100%), var(--g2) calc(var(--shift) - 66.6%), var(--g3) calc(var(--shift) - 33.3%),
    var(--g1) var(--shift), var(--g2) calc(var(--shift) + 33.3%), var(--g3) calc(var(--shift) + 66.6%), var(--g1) calc(var(--shift) + 100%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: drift 12s linear infinite;
}
.making-clock { font-weight: 500; font-size: 0.85em; font-variant-numeric: tabular-nums; }
.making-note { margin-top: 1.4em; }
@keyframes step-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
:root[data-motion="paused"] .making-steps li, :root[data-motion="paused"] .making-steps li.active .making-text { animation: none; }
@media (prefers-reduced-motion: reduce) { .making-steps li, .making-steps li.active .making-text { animation: none !important; } }
@media (forced-colors: active) { .making-steps li.active .making-text { color: CanvasText; background: none; } }

/* ---- Your stories ------------------------------------------------------------------------------ */
.stories { list-style: none; padding: 0; margin: 0.4em 0 1.2em; }
.stories li { margin: 0 0 0.7em; }
.stories button { font-weight: 750; display: block; padding-bottom: 0; }
.story-detail { display: block; }

/* ---- Stories with friends ---- */
.seats, .invites { list-style: none; padding: 0; margin: 0.6em 0 1em; }
.seats li, .invites li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15em 0.5em; min-height: var(--target); padding: 0.45em 0; }
.seat-name { font-weight: 700; }
.here { color: var(--muted); font-size: 1rem; }
.here::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--g3); margin-right: 0.35em; vertical-align: 0.05em; }
.status { color: var(--muted); }
.row.tight { margin-top: 0; gap: 0.25em 1em; }
.char-summary { font-weight: 650; }
fieldset.picks { border: 0; padding: 0; margin: 1.6em 0 0; }
fieldset.picks legend { font-weight: 800; padding: 0; font-size: 1.1em; }
select { font: inherit; color: inherit; background: transparent; min-height: var(--target); width: 100%; max-width: 100%;
  border: 0; border-bottom: 2px solid color-mix(in srgb, var(--text) 35%, transparent); padding: 0.3em 0; margin-top: 0.3em; }
select:focus-visible { outline: none; border-bottom-color: var(--focus); box-shadow: 0 2px 0 0 var(--focus); }
input[type="email"] { width: 100%; }
.story-link { font-weight: 700; display: inline-flex; align-items: center; min-height: var(--target); }
.your-turn-tag { display: block; font-size: 1rem; }
.round { margin-top: 2.4em; }
.round-status { margin: 0 0 0.4em; }
.seat-move { flex-basis: 100%; color: var(--muted); font-style: italic; font-size: 1rem; }
.small-heading { font-size: 1.15rem; margin: 1.4em 0 0.2em; letter-spacing: -0.01em; }
.your-move { font-weight: 650; }
.small-button { font-size: 1rem; min-height: var(--target); }
.help-box { margin-top: 0.6em; }
.only-you, .meanwhile { border-left: 3px solid var(--g1); padding: 0.75rem 1rem; margin: 1.4em 0; }
.only-you h3, .meanwhile h3 { margin: 0 0 0.3em; font-size: 1rem; letter-spacing: 0; }
.only-you p, .meanwhile p { margin: 0; }
.me { text-decoration: underline; text-decoration-color: var(--muted); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.notice { font-weight: 650; margin: 1.4em 0; }
.chat-peek { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em 1em; margin: 0.4em 0 0.8em; color: var(--muted); }
.chat-peek p { margin: 0; }
.late-join { margin-bottom: 2em; }
textarea { font: inherit; color: inherit; background: transparent; width: 100%; min-height: var(--target); resize: none; overflow-y: auto;
  border: 0; border-bottom: 2px solid color-mix(in srgb, var(--text) 35%, transparent); padding: 0.45em 0; margin-top: 0.3em; display: block; }
textarea:focus, textarea:focus-visible { outline: none; border-bottom-color: var(--focus); box-shadow: 0 2px 0 0 var(--focus); }
.chat { list-style: none; padding: 0; margin: 0.6em 0 0; }
.chat li { padding: 0.5em 0; min-height: var(--target); }
.party-member summary { min-height: var(--target); display: flex; align-items: center; cursor: pointer; font-weight: 650; }

/* ---- infinidie: the mark and the wordmark (outline only, in each world's colours) ---- */
.lockup { display: inline-flex; align-items: center; gap: 0.28em; line-height: 1; color: var(--text); }
.mark { height: 1.15em; width: auto; overflow: visible; flex: none; }
.mark .mark-face { stroke-width: 1.9; transition: stroke-width 200ms; }
.wordmark { height: 0.78em; width: auto; overflow: visible; }
.tools .brand { display: inline-flex; align-items: center; min-height: var(--target); text-decoration: none; font-size: 1.7rem; }
/* Small sizes keep a hairline outline so the letters stay open. */
.tools .brand .wordmark path { vector-effect: non-scaling-stroke; stroke-width: 1.3px; }
.tools .brand .mark .mark-face { stroke-width: 2.4; }
h1.brand-hero { font-size: clamp(3.2rem, 2rem + 8vw, 6.5rem); margin: 0.3em 0 0.35em; }
h1.brand-hero .mark .mark-face { stroke-width: 1.5; }
.working { display: flex; align-items: center; gap: 0.6em; }
.working-mark { height: 1.6em; }
.working-mark .mark-face { stroke-width: 2.4; }
@media (prefers-reduced-motion: reduce) { .mark .mark-face { transition: none; } }

/* A phone's bar keeps the mark alone; the name stays for screen readers (the link's label). */
@media (max-width: 420px) { .tools .brand .wordmark { display: none; } .tools .brand { min-width: var(--target); justify-content: center; } }
.tools > a, .tools > button { flex-shrink: 0; }
