:root {
  color-scheme: light dark;

  --bg: light-dark(#fff4e4, #17122b);
  --surface: light-dark(#ffffff, #241c42);
  --surface-2: light-dark(#fff0dc, #30265a);
  --ink: light-dark(#2a1f47, #f6f0ff);
  --ink-soft: light-dark(#665b82, #b9aedb);
  --line: light-dark(#f0dfc6, #40356c);

  --coral: light-dark(#e63e62, #ff7a8c);
  --violet: light-dark(#6c4cf1, #a08bff);
  --sun: light-dark(#ffc83d, #ffd466);
  --mint: light-dark(#19c3a3, #4fe0c4);
  --sky: light-dark(#3db8ff, #6ccbff);
  --ok: light-dark(#0f9d80, #4fe0c4);
  --warn: light-dark(#b86a00, #ffc83d);

  /* The board's colors. Settings overwrites these on <html>. */
  --me: #ff4f79;
  --them: #ffd23f;
  --board: #4f6df5;
  --glow: #3bceac;


  --radius: 26px;
  --shadow: 0 18px 50px -18px light-dark(rgb(90 50 160 / .35), rgb(0 0 0 / .6));
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, sans-serif;

  accent-color: var(--violet);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }
body {
  margin: 0;
  font: 500 1rem/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ol, ul, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-inline-size: 0; }
button, input { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--violet); }

.visually-hidden {
  position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

/* ── Background blobs ── */
.blobs { position: fixed; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
@media (prefers-color-scheme: dark) { .blobs i { opacity: .16; } }
.blobs i:nth-child(1) { inline-size: 42vmax; block-size: 42vmax; background: var(--sun); inset: -14vmax auto auto -10vmax; }
.blobs i:nth-child(2) { inline-size: 36vmax; block-size: 36vmax; background: var(--coral); inset: -12vmax -10vmax auto auto; }
.blobs i:nth-child(3) { inline-size: 40vmax; block-size: 40vmax; background: var(--sky); inset: auto auto -18vmax -8vmax; }
.blobs i:nth-child(4) { inline-size: 34vmax; block-size: 34vmax; background: var(--mint); inset: auto -12vmax -14vmax auto; }

/* ── Top bar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: max(.75rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 2rem) .5rem;
}
.brand-wrap { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: .5rem; align-self: center;
  font-size: 1.6rem; font-weight: 900; letter-spacing: .02em; color: var(--ink); text-decoration: none;
}
.logo { inline-size: 2.2rem; block-size: 2.2rem; stroke: none; rotate: -8deg; }
.logo-frame { fill: var(--board); }
.logo-a { fill: var(--me); }
.logo-b { fill: var(--them); }
.credit { font-size: .82rem; color: var(--ink-soft); }
.top-actions { display: flex; gap: .5rem; }

.icon-btn {
  display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem;
  border: 2px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.icon-btn:hover { border-color: var(--violet); }
.icon-btn svg { inline-size: 1.3rem; block-size: 1.3rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-block-size: 2.75rem; padding: .5rem 1.3rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface);
  font-weight: 800; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--violet); }
.btn.primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, light-dark(#6c4cf1, #7a5cf5), light-dark(#d93a7c, #d94f8a));
  box-shadow: 0 8px 20px -8px rgb(108 76 241 / .7);
}
.btn.primary:hover { box-shadow: 0 10px 26px -8px rgb(108 76 241 / .9); }
.btn.big { min-block-size: 3.4rem; font-size: 1.15rem; inline-size: 100%; }
.btn.small { min-block-size: 2.3rem; padding: .3rem 1rem; font-size: .92rem; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--coral); border-color: transparent; color: #fff; }
.danger-text { color: var(--coral); }
.btn svg { inline-size: 1.1rem; block-size: 1.1rem; }
.toggle[aria-pressed="true"] { background: var(--violet); border-color: transparent; color: light-dark(#fff, #17122b); }
.link-btn { border: 0; background: none; padding: .4rem; color: var(--violet); font-weight: 700; text-decoration: underline; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .15s, border-color .15s, box-shadow .15s, scale .15s; }
  .btn:active { scale: .96; }
}

/* ── Lobby ── */
.lobby {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 24rem);
  max-inline-size: 72rem; margin-inline: auto;
  padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 4vw, 2rem) 3rem;
}
@media (max-width: 52rem) { .lobby { grid-template-columns: minmax(0, 1fr); } }

.pitch h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; font-weight: 900; text-wrap: balance; }
.pitch h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--coral), var(--violet) 60%, var(--sky));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { margin-block: .9rem 1.6rem; font-size: 1.15rem; color: var(--ink-soft); text-wrap: pretty; }
.preview-wrap { max-inline-size: 27rem; rotate: -2deg; filter: drop-shadow(0 24px 30px rgb(40 20 90 / .3)); }

.card {
  display: grid; gap: 1.1rem; padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.card > * { min-inline-size: 0; }
.stack { display: grid; gap: 1rem; }
.pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.pick legend { font-weight: 800; margin-block-end: .6rem; padding: 0; }
.pick-side {
  position: relative; display: grid; justify-items: center; gap: .3rem; padding: .7rem .3rem .5rem;
  border: 2px solid var(--line); border-radius: 18px; font-weight: 800; font-size: .92rem; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.pick-side input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pick-side:has(input:checked) { border-color: var(--violet); background: var(--surface-2); }
.pick-side:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 3px; }
.chip {
  display: grid; place-items: center; inline-size: 3.2rem; block-size: 3.2rem; border-radius: 14px; flex: none;
  background: var(--board); box-shadow: 0 2px 5px rgb(0 0 0 / .25);
}
.chip.small { inline-size: 2rem; block-size: 2rem; border-radius: 9px; }
.token { inline-size: 72%; block-size: 72%; border-radius: 50%; background: var(--disc); box-shadow: var(--disc-depth); }
.chip.either {
  display: grid; place-items: center; color: #fff; font-size: 1.7rem; font-weight: 900;
  text-shadow: 0 2px 4px rgb(0 0 0 / .45);
  background: linear-gradient(135deg, var(--me) 50%, var(--them) 50%);
}
.pick .link-btn { grid-column: 1 / -1; justify-self: end; }



.or { margin-block: .9rem; display: flex; align-items: center; gap: .8rem; color: var(--ink-soft); font-size: .9rem; }
.or::before, .or::after { content: ""; flex: 1; block-size: 2px; background: var(--line); border-radius: 2px; }

.join-row { display: flex; gap: .6rem; }
.join-row input, .chat-form input {
  flex: 1; min-inline-size: 0; min-block-size: 2.75rem; padding: .4rem 1rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface-2);
}
.join-row input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.1rem; letter-spacing: .08em; }

.code-row, .share-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.code {
  flex: 1; padding: .5rem 1rem; border-radius: 16px; background: var(--surface-2); white-space: nowrap;
  border: 2px dashed var(--violet); text-align: center;
  font: 800 clamp(1.6rem, 6vw, 2.1rem)/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .1em;
}
.copy { position: relative; display: inline-flex; }
.tip {
  position: absolute; inset-block-end: calc(100% + .4rem); inset-inline-start: 50%; translate: -50% 0;
  padding: .15rem .6rem; border-radius: 8px; background: var(--ink); color: var(--bg);
  font-size: .8rem; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s;
}
.tip:not(:empty) { opacity: 1; }

.waiting { display: flex; align-items: center; gap: .6rem; color: var(--ink-soft); }
.pulse { inline-size: .7rem; block-size: .7rem; border-radius: 50%; background: var(--mint); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 1.2s ease-in-out 4 alternate; }
  @keyframes pulse { to { scale: 1.6; opacity: .4; } }
}
.error { padding: .6rem .9rem; border-radius: 14px; background: color-mix(in oklab, var(--coral), transparent 85%); color: var(--coral); font-weight: 700; }
.privacy { font-size: .82rem; color: var(--ink-soft); }

/* ── Game layout ── */
.game {
  display: grid; gap: 1rem; align-items: start;
  grid-template-columns: minmax(0, 1fr) 19rem;
  padding: .25rem clamp(.5rem, 2vw, 1.5rem) 1.5rem;
}
@media (max-width: 60rem) { .game { grid-template-columns: minmax(0, 1fr); } }

.table { display: grid; gap: .6rem; justify-items: center; }
.board-wrap, .seat { inline-size: min(100%, max(18rem, 100dvh - 13rem), 40rem); }
.board-wrap { position: relative; }

.seat {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .45rem .8rem; border-radius: 18px; background: var(--surface);
  border: 2px solid transparent; box-shadow: 0 6px 18px -12px rgb(40 20 90 / .5);
  transition: border-color .2s;
}
.seat.turn { border-color: var(--sun); }
.seat-name { font-weight: 800; }
.wins { font-size: .85rem; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.status { flex: 1; min-inline-size: 7rem; font-weight: 700; text-wrap: balance; }
.actions { display: flex; gap: .5rem; margin-inline-start: auto; min-block-size: 2.75rem; }
.link-state { display: inline-flex; align-items: center; gap: .4rem; margin-inline-start: auto; font-size: .82rem; color: var(--ink-soft); }
.link-state .dot { inline-size: .6rem; block-size: .6rem; border-radius: 50%; background: var(--ok); }
.link-state[data-state="off"] .dot { background: var(--warn); }

/* ── The board ──
   Square overall: a strip one disc tall to drop from, then the frame. Discs sit
   behind the frame and show through its holes. */
.board {
  position: relative; isolation: isolate; container-type: inline-size; aspect-ratio: 1;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; direction: ltr;
  touch-action: manipulation;
}
.board > *, .board::before { --pad: 2.6cqw; --cell: calc((100cqw - 2 * var(--pad)) / 7); }
.board::before {                          /* the space behind the holes */
  content: ""; position: absolute; inset: var(--cell) 0 0; border-radius: 4cqw;
  background: color-mix(in oklab, var(--board), var(--surface) 82%);
}
.discs { position: absolute; inset: 0 var(--pad); }
.disc {
  position: absolute; inset-inline-start: 0; inset-block-start: 0;
  inline-size: var(--cell); block-size: var(--cell);
  translate: calc(var(--c) * var(--cell)) calc((var(--r) + 1) * var(--cell) + var(--pad));
}
.disc::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; transition: opacity .3s, filter .3s; }
.me { --dc: var(--me); }
.them { --dc: var(--them); }
.disc::before, .token {
  background:
    radial-gradient(circle, transparent 0 54%, color-mix(in oklab, var(--dc), black 20%) 56% 62%, transparent 64%),
    radial-gradient(circle at 34% 28%, color-mix(in oklab, var(--dc), white 45%), var(--dc) 48%, color-mix(in oklab, var(--dc), black 22%));
}
.token { box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.disc.last::after {
  content: ""; position: absolute; inset: 43%; border-radius: 50%; background: rgb(255 255 255 / .75);
}
.disc.dim::before { opacity: .4; filter: saturate(.5); }
.disc.win::before { box-shadow: 0 0 0 .9cqw var(--glow), 0 0 3cqw var(--glow); }
@media (prefers-reduced-motion: no-preference) {
  .disc.win::before { animation: cheer .7s ease-in-out infinite alternate; }
  @keyframes cheer { to { scale: 1.1; } }
}
.ghost { translate: calc(var(--c) * var(--cell)) 0; z-index: 1; transition: translate .12s ease-out; }
.ghost::before { opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .ghost::before { animation: bob 1s ease-in-out infinite alternate; }
  @keyframes bob { from { translate: 0 -4%; } to { translate: 0 4%; } }
}

.frame {
  position: absolute; inset: var(--cell) 0 0; border: var(--pad) solid var(--board); border-radius: 4cqw;
  box-shadow: 0 14px 34px -14px rgb(20 10 60 / .7);
}
.holes {
  position: absolute; inset: 0;
  background: radial-gradient(circle closest-side, transparent 82%, color-mix(in oklab, var(--board), black 35%) 84%, var(--board) 92%) 0 0 / var(--cell) var(--cell);
}
.holes::after {                           /* a little shine on the plastic */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(165deg, rgb(255 255 255 / .25), transparent 30% 75%, rgb(0 0 0 / .14));
  -webkit-mask: radial-gradient(circle closest-side, transparent 84%, #000 86%) 0 0 / var(--cell) var(--cell);
  mask: radial-gradient(circle closest-side, transparent 84%, #000 86%) 0 0 / var(--cell) var(--cell);
}

.cols { position: absolute; inset: 0 var(--pad) var(--pad); display: grid; grid-template-columns: repeat(7, 1fr); z-index: 2; }
.col {
  margin: 0; padding: 0; border: 0; border-radius: 2.5cqw; background: none; cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.board.live .col:not([aria-disabled="true"]) { cursor: pointer; }
.board.live .col.hot { background: linear-gradient(transparent var(--cell), rgb(255 255 255 / .16) var(--cell)); }
.col:focus-visible { outline: .7cqw solid #fff; outline-offset: -.7cqw; box-shadow: inset 0 0 0 1.2cqw #17122b; }

/* ── Game over ── */
.over {
  position: absolute; inset: 0; margin: auto; z-index: 2; inline-size: fit-content; block-size: fit-content;
  max-inline-size: 88%; display: grid; justify-items: center; gap: .5rem; padding: 1.2rem 1.6rem;
  border-radius: 24px; text-align: center; color: #fff;
  background: rgb(20 12 50 / .84); backdrop-filter: blur(4px); box-shadow: 0 18px 40px rgb(0 0 0 / .45);
}
@media (prefers-reduced-motion: no-preference) {
  .over { animation: pop .35s both; }
  @keyframes pop { from { opacity: 0; scale: .85; } }
}
.over-title { font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 900; text-wrap: balance; }
.over-sub { margin-block-end: .4rem; text-wrap: balance; }
.confetti { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; border-radius: 3.5%; }
.confetti i { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .confetti i {
    display: block; position: absolute; inset-block-start: -6%; inset-inline-start: var(--left);
    inline-size: .6rem; block-size: 1rem; border-radius: 3px;
    animation: fall 2.6s var(--delay) cubic-bezier(.3, .2, .6, 1) both;
  }
  @keyframes fall { 80% { opacity: 1; } to { translate: 0 80vh; rotate: var(--spin); opacity: 0; } }
}

/* ── Side panel: video and chat ── */
.side { display: grid; gap: .8rem; padding: .9rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.side > *, .chat > * { min-inline-size: 0; }
.videos { position: relative; display: grid; gap: .5rem; }
.videos[data-them="off"][data-me="off"], .videos[data-them="off"][data-me="mic"] { display: none; }
.tile { position: relative; border-radius: 18px; overflow: hidden; background: #0d0a1c; aspect-ratio: 4 / 3; }
.tile video { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.tile.me video { transform: scaleX(-1); }
.tile-note { position: absolute; inset: 0; display: none; place-items: center; color: #fff; font-weight: 700; }
.videos[data-them="mic"] .tile-note { display: grid; }
.videos[data-them="off"] .tile.them { display: none; }
.videos:not([data-me="cam"]) .tile.me { display: none; }
/* Both on: yours tucks into the corner of theirs. */
.videos:not([data-them="off"])[data-me="cam"] .tile.me {
  position: absolute; inset-block-end: .5rem; inset-inline-end: .5rem; inline-size: 34%;
  border: 2px solid #fff; border-radius: 12px;
}
.media-row { display: flex; gap: .5rem; }
.media-row .btn { flex: 1; }

.chat { display: grid; gap: .5rem; }
.chat-title { font-size: 1rem; font-weight: 800; }
.chat-log {
  list-style: none; padding: .2rem; display: flex; flex-direction: column; gap: .35rem;
  block-size: clamp(6rem, 26dvh, 16rem); overflow-y: auto; overscroll-behavior: contain; border-radius: 12px;
}
.chat-log:empty { display: none; }
.chat-log li { max-inline-size: 85%; padding: .35rem .75rem; border-radius: 16px; overflow-wrap: anywhere; background: var(--surface-2); align-self: start; border-end-start-radius: 4px; }
.chat-log li.me { align-self: end; background: var(--violet); color: light-dark(#fff, #17122b); border-end-start-radius: 16px; border-end-end-radius: 4px; }
.chat-empty { color: var(--ink-soft); font-size: .9rem; }
.chat-form { display: flex; gap: .5rem; }
.chat-form input { min-block-size: 2.3rem; }

/* ── Dialogs ── */
dialog.sheet {
  inline-size: min(26rem, calc(100vw - 2rem)); max-block-size: calc(100dvh - 2rem);
  padding: 1.5rem; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: .25s; transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
  @media (prefers-reduced-motion: no-preference) { transform: translateY(14px) scale(.96); }
  @media (prefers-reduced-motion: reduce) { transition-duration: .1s; }
}
dialog.sheet.wide { inline-size: min(36rem, calc(100vw - 2rem)); }
dialog.sheet[open]:where(:not([data-closing])) {
  opacity: 1;
  @starting-style { opacity: 0; }
  @media (prefers-reduced-motion: no-preference) {
    transform: none;
    @starting-style { transform: translateY(14px) scale(.96); }
  }
  &::backdrop {
    background-color: rgb(20 12 50 / .55);
    @starting-style { background-color: transparent; }
  }
}
dialog.sheet::backdrop {
  background-color: transparent;
  transition-property: background-color, display, overlay;
  transition-duration: .25s;
  transition-behavior: allow-discrete;
  overflow: hidden; overscroll-behavior: contain;
}
dialog.sheet:modal { overscroll-behavior: contain; }
dialog.sheet[open] { display: grid; gap: .9rem; }
.sheet h2 { font-size: 1.5rem; font-weight: 900; }
.sheet h3 { font-size: 1.05rem; font-weight: 800; margin-block-start: .3rem; }
.sheet :is(ol, ul) { padding-inline-start: 1.3rem; display: grid; gap: .3rem; }
.sheet legend { font-weight: 800; padding: 0; margin-block-end: .5rem; }
.sheet-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-block-start: .4rem; }
.help { font-size: .85rem; color: var(--ink-soft); }

.theme-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.theme {
  display: inline-flex; align-items: center; gap: .5rem; min-block-size: 2.5rem; padding: .25rem .9rem .25rem .3rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; cursor: pointer;
}
.theme[aria-pressed="true"] { border-color: var(--violet); background: var(--surface-2); }

.colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem .9rem; }
.colors legend { grid-column: 1 / -1; }
.colors label { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.colors input[type="color"] {
  inline-size: 2.6rem; block-size: 2.6rem; padding: 0; border: 2px solid var(--line); border-radius: 12px;
  background: none; cursor: pointer; flex: none;
}

/* ── Toast ── */
.toast {
  position: fixed; inset: auto 0 max(1.2rem, env(safe-area-inset-bottom)); margin: 0 auto;
  inline-size: fit-content; max-inline-size: calc(100vw - 2rem);
  padding: .6rem 1.1rem; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: var(--shadow);
}
.toast:not([popover]) { display: none; z-index: 10; }
.toast.show { display: block; }
.toast[popover] {
  opacity: 0;
  transition-property: opacity, display, overlay;
  transition-duration: .2s;
  transition-behavior: allow-discrete;
}
.toast:popover-open {
  opacity: 1;
  @starting-style { opacity: 0; }
}

.theme-swatch {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  inline-size: 2.6rem; block-size: 1.8rem; border-radius: 999px; background: var(--board);
}
.theme-swatch i { inline-size: .8rem; block-size: .8rem; border-radius: 50%; background: var(--me); box-shadow: 0 0 0 1.5px rgb(0 0 0 / .3); }
.theme-swatch i + i { background: var(--them); }

/* Copyright notice at the foot of the page. */
.copyright { margin: 0; padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 0.8rem; color: var(--ink-soft); }
/* Only on the start screen: during a game or call the main view fills the window. */
body:has(#lobby[hidden]) .copyright { display: none; }

/* Back to the list of all of Marc's apps, on its own line under the credit. */
.apps-link { display: block; inline-size: fit-content; margin-block-start: 0.15rem; white-space: nowrap; }
.apps-link svg { display: inline; inline-size: 1.05em; block-size: 1.05em; margin-inline-end: 0.25em; vertical-align: -0.18em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Appearance: the setting writes <meta name="color-scheme">; map it back so light-dark() follows it. */
:root:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
/* The background blobs are fainter in dark mode, whichever way it was chosen. */
:root:has(> head > meta[name="color-scheme"][content="light"]) .blobs i { opacity: .5; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .blobs i { opacity: .16; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.segmented label { position: relative; display: grid; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span { display: grid; place-items: center; min-block-size: 2.5rem; padding: 0 .4rem; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--ink-soft); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgb(0 0 0 / .15); }
.segmented input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 1px; }
