/* Davecade's shared styles, on Davevite's look: the organizer's colors and grouped lists, Manrope for titles, blue rings for
   guys and pink for girls, and the parade's sky and floor for game scenes. Light and dark follow the device. Each game adds
   styles for its own screens. */
/* Colors and fonts come from Davevite's shared brand.css (--dv-*, served by Davevite's main Worker), so the two can't drift;
   the values after each comma are used if that file doesn't load. */
:root {
  --bg: var(--dv-bg, #F2F2F7); --card: var(--dv-card, #FFFFFF); --ink: var(--dv-ink, #1D1D1F); --ink-2: var(--dv-ink-2, #6E6E73); --ink-3: var(--dv-ink-3, #AEAEB2);
  --line: var(--dv-line, rgba(60, 60, 67, 0.13)); --fill: var(--dv-fill, rgba(118, 118, 128, 0.12));
  --blue: var(--dv-blue, #0071E3); --red: var(--dv-red, #D93F45); --green: var(--dv-green, #248A3D);
  --guy: var(--dv-guy, #2F6FDE); --girl: var(--dv-girl, #D2409B);
  --navy: var(--dv-navy, #2D466A); --coral: var(--dv-coral, #FF776D); --gold: var(--dv-gold, #FFD14B); --cream: var(--dv-cream, #FFF9EF);
  --sky: var(--dv-sky, #22B5FF); --mint: var(--dv-mint, #50D5AD);
  --display: var(--dv-display, Manrope, -apple-system, BlinkMacSystemFont, sans-serif);
  --body: var(--dv-body, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif);
  /* A game's scene: the parade's day sky and floor */
  --sky-top: #BFE6FF; --sky-low: #EAF7FF; --floor: #FBF8F1;
  /* A win: the podium's gold, dark words on it, and gold words that read on the page */
  --win-1: #F7C948; --win-2: #E0A100; --win-ink: #4D3800; --win-text: #A87600;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: var(--dv-bg, #000000); --card: var(--dv-card, #1C1C1E); --ink: var(--dv-ink, #F5F5F7); --ink-2: var(--dv-ink-2, #98989D); --ink-3: var(--dv-ink-3, #636366);
    --line: var(--dv-line, rgba(84, 84, 88, 0.6)); --fill: var(--dv-fill, rgba(118, 118, 128, 0.24)); --blue: var(--dv-blue, #0A84FF); --red: var(--dv-red, #FF453A);
    --win-text: #F7C948; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.35 var(--body);
  letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
main { max-width: 640px; margin: 0 auto; padding: 4px 16px 48px; outline: none; }

/* The top bar: mark, Davecade, Settings */
.topbar { position: relative; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px 4px; }
.game-title { position: absolute; left: 0; right: 0; width: fit-content; max-width: calc(100% - 220px); margin: 0 auto; display: flex; align-items: center; gap: 8px; font: 800 1.0625rem/1.3 var(--display); white-space: nowrap; }
.game-title[hidden] { display: none; }
.game-title > span { overflow: hidden; text-overflow: ellipsis; }
.brand { flex: 1; display: flex; align-items: center; gap: 8px; font: 800 1.125rem/1 var(--display); letter-spacing: -0.01em; }
.brand .mark { width: 32px; height: 32px; display: block; }
.topbar .back { flex: 1; display: flex; align-items: center; gap: 6px; min-height: 36px; color: var(--blue); font-size: 1.0625rem; }
.menu-button { width: 36px; height: 36px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink); }
/* Reactions: the smiley next to the menu (your reaction in its place once you've picked), its row of six, and a reaction
   as a badge on someone's face */
.react-button[hidden] { display: none; }
.react-button.picked { font-size: 19px; line-height: 1; }
.emoji { display: inline-block; }
.menu.react-menu, .react-menu.sheet-row { gap: 2px; min-width: 0; padding: 6px; border-radius: 28px; }
/* Only while open: a display of its own would keep the closed menu showing */
.menu.react-menu:popover-open, .react-menu.sheet-row { display: flex; }
.menu.react-menu button, .react-menu.sheet-row button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: none; box-shadow: none; text-align: center; font-size: 24px; line-height: 1; }
.menu.react-menu button.on { background: var(--fill); }
.react-menu.sheet-row { justify-content: center; }
.faced { position: relative; display: inline-flex; flex: none; }
.faced .face-badge { position: absolute; right: -5px; bottom: -4px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%;
  background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); font-size: 12px; line-height: 1; }
.faced.tall .face-badge { top: 4px; right: -4px; bottom: auto; }
.menu { min-width: 200px; padding: 4px 0; border: 0; border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2); }
.menu[popover] { position: fixed; inset: auto; margin: 0; }
.menu button { display: block; width: 100%; padding: 11px 16px; border: 0; background: none; text-align: left; font-size: 1.0625rem; }
.menu button + button { box-shadow: inset 0 0.5px 0 var(--line); }
.menu button:active { background: var(--fill); }
.menu button.danger, .row.danger { color: var(--red); }
/* Add Davecade to your Home Screen, or get the app on iOS 26 and later: the banner under the top bar */
.hs-slot { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.hs-banner { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; padding: 12px 14px; border-radius: 16px; background: var(--card); }
.hs-banner img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.hs-banner .t { flex: 1; min-width: 0; }
.hs-banner .t b { display: block; font-size: 1rem; line-height: 1.25; }
.hs-banner .t span { display: block; margin-top: 2px; color: var(--ink-2); font-size: 0.875rem; }
.hs-banner button, .hs-banner .go { flex: none; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--blue); color: #FFFFFF; font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
/* The Home Screen steps (iPhone Safari) */
.steps .row { gap: 14px; min-height: 64px; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; font-weight: 700; font-size: 0.9375rem; flex: none; }
.steps .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--bg); color: var(--blue); overflow: hidden; }
.steps .ico img { width: 40px; height: 40px; display: block; }
.steps .where { display: block; margin-top: 2px; }
.round-label { margin: 10px 0 4px; text-align: center; }

/* Titles */
h1 { margin: 0; font: 800 2rem/1.15 var(--display); letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.title-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.title-row h1 { flex: 1; }
.pill.new-game { margin: 4px 0 2px; gap: 8px; font-weight: 600; }
.status-line { display: flex; align-items: center; gap: 10px; min-height: 0; color: var(--ink-2); font-size: 0.9375rem; }
.status-line:not(:empty) { margin: 8px 0; }

/* Grouped lists, as in the organizer */
.section { margin: 22px 16px 6px; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink-2); list-style: none; }
.section::-webkit-details-marker { display: none; }
details.results > summary { cursor: pointer; }
.list { border-radius: 12px; background: var(--card); overflow: hidden; }
.row, .field { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 16px; border: 0; background: none; text-align: left; }
.row + .row, .row + .field, .field + .row, .field + .field { box-shadow: inset 0 0.5px 0 var(--line); }
.row:active { background: var(--fill); }
.grow { flex: 1; min-width: 0; }
.name { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { font-size: 0.875rem; font-weight: 400; color: var(--ink-2); }
.block { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--ink-2); }
.status.blue { color: var(--blue); font-weight: 600; }
.chev { color: var(--ink-3); font-size: 1.25rem; }
.empty { padding: 14px 16px; color: var(--ink-2); }

/* Daves' faces, ringed blue for guys and pink for girls */
.ring { display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink-3); background: #EAF7FF; overflow: hidden; flex: none; }
.ring.guy { box-shadow: 0 0 0 2px var(--guy); }
.ring.girl { box-shadow: 0 0 0 2px var(--girl); }
.ring svg { display: block; }
.faces { display: inline-flex; flex: none; }
.faces .ring + .ring { margin-left: -6px; }

/* A game's icon: at the start of a row, in a game page's top bar, and beside New Game's title. A row's title can take two
   lines. */
.game-icon { display: block; flex: none; width: 44px; height: 44px; }
.game-icon.sm { width: 28px; height: 28px; }
.game-icon.lg { width: 52px; height: 52px; }
.game-icon img { display: block; width: 100%; height: 100%; }
.name.wrap { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }

/* Buttons: Apple's pills */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 16px; border: 0; border-radius: 999px;
  background: var(--fill); font-size: 0.9375rem; font-weight: 600; }
.pill.primary { background: var(--blue); color: #FFFFFF; }
.pill.wide { width: 100%; min-height: 50px; margin-top: 16px; font-size: 1.0625rem; }
/* The app's icon on the Get the Davecade App sheet. */
.app-offer { display: block; width: 96px; height: 96px; margin: 10px auto 6px; border-radius: 22px; }
/* A sheet that opens by itself puts focus on its title, which shows no ring. */
.sheet-head h2:focus { outline: none; }
.pill:disabled { opacity: 0.5; }
.small { padding: 6px 12px; border: 0; border-radius: 999px; background: var(--fill); font-size: 0.875rem; font-weight: 600; }
/* Share at the top right of a round's reveal: a round button with the share symbol */
.small.share { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--ink); }
.small.primary { background: var(--blue); color: #FFFFFF; }
.small.primary:disabled { opacity: 0.4; }

/* Sheets */
dialog.sheet { width: min(100% - 0px, 640px); max-width: 640px; max-height: 92vh; margin: auto auto 0; padding: 0 16px 32px; border: 0; border-radius: 14px 14px 0 0;
  background: var(--bg); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.32); }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 14px; } }
dialog.sheet.tall { height: min(92vh, 760px); }
/* A sheet's header: left control, title, right control; three columns, so the title is centered whatever is beside it.
   It stays over whatever scrolls under it, positioned parts (a How to Play scene, a face with a reaction) included. */
.sheet-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 14px 0 10px; background: var(--bg); }
.sheet-head > :first-child { justify-self: start; }
.sheet-head > :last-child { justify-self: end; }
.sheet-head h2 { text-align: center; }

/* The Settings switch */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--fill); transition: background 0.2s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch input:checked + span { background: #34C759; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Joining by link: the form on a card over a blurred game. The Dave maker sits on gray, as on the guest page's sheet, so
   its white tiles show. */
/* The game's own screen when the link names a game (join.js sets --backdrop-light and --backdrop-dark), Davelength's otherwise */
.backdrop { position: fixed; inset: 0; z-index: -1; background: var(--bg) var(--backdrop-light, url(./join/backdrop-light.jpg)) top center / cover no-repeat; }
@media (prefers-color-scheme: dark) { .backdrop { background-image: var(--backdrop-dark, url(./join/backdrop-dark.jpg)); } }
.join { margin: 24vh 0 0; padding: 22px 16px 18px; border-radius: 20px; background: var(--card); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); }
.join.tall { margin-top: 12px; }
.join .list { background: var(--bg); }
.join .section { margin-left: 4px; }
.maker-box { padding: 10px; border-radius: 14px; background: var(--bg); }
.join h1 { margin: 0 0 14px; font-size: 1.75rem; }
.signin-link { display: block; margin-top: 14px; text-align: center; color: var(--blue); font-size: 0.9375rem; font-weight: 600; }
button.signin-link { width: 100%; padding: 0; border: 0; background: none; font-family: inherit; }
button.signin-link:disabled { color: var(--ink-3); }
.join h1:has(+ .sent-to) { margin-bottom: 2px; }
.sent-to { margin: 0 0 14px; color: var(--ink-2); font-size: 0.9375rem; }
.sent-to .change { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-weight: 600; }
.join .field input:disabled { color: var(--ink-3); }
.join input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 1.0625rem; }
.error { margin: 10px 4px 0; color: var(--red); font-size: 0.9375rem; }
.number-use { margin: 8px 4px 0; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.35; }
.error + .number-use { margin-top: 4px; }

/* The spectrum (spectrum.js): blue at one end, gold at the other, neutral in the middle, each side's words at its own end,
   the player's Dave face as the handle. */
:root { --left: #2F8CF5; --right: #F2B21C; --mid: #ECE8DF; --left-ink: #1F6FD1; --right-ink: #A86F00; }
@media (prefers-color-scheme: dark) { :root { --mid: #48484A; --left-ink: #5EA8FF; --right-ink: #F2B21C; } }
.spectrum { width: 100%; }
.spectrum .ends { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.spectrum .ends span { max-width: 48%; font: 700 1rem/1.2 var(--body); }
.spectrum .ends .l { color: var(--left-ink); }
.spectrum .ends .r { color: var(--right-ink); text-align: right; }
.spectrum .track { position: relative; height: 22px; margin: 22px 10px 26px; border-radius: 11px; background: linear-gradient(90deg, var(--left), var(--mid) 50%, var(--right)); touch-action: none; outline-offset: 6px; }
.spectrum .track[role="slider"] { cursor: pointer; }
.spectrum .track.marked { margin: 22px 10px 54px; }
.spectrum .track.answered { margin-top: 72px; }
.spectrum .mid { position: absolute; left: 50%; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 1px; background: rgba(36, 50, 79, 0.2); }
.spectrum .thumb { position: absolute; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); display: grid; place-items: center; overflow: hidden; pointer-events: none; }
.spectrum .thumb svg { display: block; }
@keyframes spectrum-hint { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-48px); } 70% { transform: translateX(48px); } }
.spectrum .thumb.hint { animation: spectrum-hint 1.4s ease-in-out 0.5s 1; }
.spectrum .pin { position: absolute; z-index: 2; bottom: calc(50% - 7.5px); transform: translateX(-50%); display: grid; justify-items: center; }
.spectrum .pin .stem { height: 18px; margin-bottom: -4px; }
.spectrum .diamond { width: 15px; height: 15px; background: var(--gold); border: 1.5px solid #D99A00; transform: rotate(45deg); }
.spectrum .mark { position: absolute; z-index: 1; top: 50%; transform: translateX(-50%); display: grid; justify-items: center; pointer-events: none; }
.spectrum .mark .dot { position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 0 2.5px var(--ink); }
.spectrum .mark .stem { height: calc(22px + var(--row, 0) * 36px); }
/* The reveal: guesses slide out from the middle one by one, the answer drops in after them, then its words show */
@keyframes reveal-mark { from { left: 50%; opacity: 0; } }
@keyframes reveal-pin { from { transform: translate(-50%, -44px); opacity: 0; } 70% { transform: translate(-50%, 4px); opacity: 1; } }
@keyframes reveal-fade { from { opacity: 0; transform: translateY(6px); } }
.spectrum.revealing .mark { animation: reveal-mark 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.2s + var(--i, 0) * 0.25s) both; }
.spectrum.revealing .pin { animation: reveal-pin 0.6s ease-out calc(0.6s + var(--n, 0) * 0.25s) both; }
.spectrum.revealing .readout { animation: reveal-fade 0.4s ease-out calc(1.1s + var(--n, 0) * 0.25s) both; }
.spectrum .stem { display: block; width: 2px; border-radius: 1px; background: var(--ink); }
.spectrum .readout { margin: 12px 0 0; text-align: center; color: var(--ink-2); }
.spectrum .readout b { color: var(--ink); font-size: 1.125rem; }
/* A notched scale (spectrum.js notches): its numbers on the line, in dark ink on light and light ink over dark mode's dark
   middle, dark again on the bright gold end; How to Play's other appearance swaps them too. The readout's number is big. */
:root { --notch: rgba(29, 29, 31, 0.7); --notch-bright: rgba(29, 29, 31, 0.7); }
@media (prefers-color-scheme: dark) { :root { --notch: rgba(255, 255, 255, 0.88); } }
.how .demo.flip { --notch: rgba(255, 255, 255, 0.88); }
@media (prefers-color-scheme: dark) { .how .demo.flip { --notch: rgba(29, 29, 31, 0.7); } }
.spectrum.notched .notch { position: absolute; top: 50%; transform: translate(-50%, -50%); font: 800 0.75rem/1 var(--display); color: var(--notch); pointer-events: none; }
.spectrum.notched .notch.bright { color: var(--notch-bright); }
.spectrum.notched .readout b { margin-left: 4px; font: 800 1.6rem/1 var(--display); }

/* A game's scene: sky and floor, as the parade has them */
.scene { border-radius: 18px; overflow: hidden; background: linear-gradient(var(--sky-top), var(--sky-low) 40%, var(--floor) 40%); }

/* A game page (play.js): rounds, cards, tags and standings, the waiting room and New Game's players, the results parade,
   reveals and End Game. Each game's own stylesheet adds its round screens. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.round { display: grid; gap: 12px; margin-top: 14px; }
.round h2 { font-size: 1.25rem; }
.center { text-align: center; }
.big { font: 800 1.75rem/1.2 var(--display); }
.turn { display: flex; align-items: center; gap: 10px; }
.card { border-radius: 14px; background: var(--card); padding: 12px 12px 14px; }
.phrase { margin: 0; font: 800 1.625rem/1.2 var(--display); letter-spacing: -0.01em; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.buttons.center { justify-content: center; }
.blue { color: var(--blue); font-weight: 600; }
.link { overflow-wrap: anywhere; }
.tag { padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--ink-2); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
/* A win is gold, the podium's: the round's Closest tag, and "You won" on Games */
.tag.closest { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(var(--win-1), var(--win-2)); color: var(--win-ink); font-size: 0.75rem; font-weight: 700; vertical-align: middle; }
.status.won, h2.won { color: var(--win-text); font-weight: 700; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1000; }
.place { width: 22px; text-align: center; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* The leaderboard: who leads, the top three on a podium (gold, silver and bronze by place), then everyone else */
.podium-box { padding: 16px 16px 2px; }
.podium-box + .row { box-shadow: inset 0 0.5px 0 var(--line); }
.leaderboard .lead { margin: 0; text-align: center; font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 8px; align-items: end; max-width: 420px; margin: 12px auto 0; }
.podium-box > .podium:first-child { margin-top: 4px; }
.podium .step { display: grid; justify-items: center; }
/* Players tied for a place stand side by side on its step */
.podium .daves { display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.podium .stand { width: 100%; margin-top: -2px; padding-top: 8px; border-radius: 14px 14px 0 0; text-align: center; color: #FFFFFF; font-size: 1.625rem; font-weight: 800; line-height: 1; }
.podium .p1 .stand { height: 84px; background: linear-gradient(#F7C948, #E0A100); }
.podium .p2 .stand { height: 60px; background: linear-gradient(#C3CAD3, #98A1AD); }
.podium .p3 .stand { height: 44px; background: linear-gradient(#DDA27A, #B77447); }
.podium.names { align-items: start; margin: 8px auto 12px; }
.podium .who { display: grid; justify-items: center; gap: 1px; text-align: center; min-width: 0; }
.podium .who b { max-width: 100%; overflow-wrap: anywhere; text-wrap: balance; font-size: 0.9375rem; line-height: 1.25; }
.podium .who .meta { font-size: 0.8125rem; }
select { border: 0; background: none; color: var(--ink-2); font-size: 1rem; text-align: right; }
input[type="text"], .field input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; outline: none; font-size: 1.0625rem; }
.parade { display: flex; justify-content: center; align-items: flex-end; gap: 6px; padding: 26px 10px 10px; }
.walker { display: grid; justify-items: center; gap: 2px; font-size: 0.8125rem; font-weight: 600; color: #24324F; }
.reveal { display: grid; gap: 12px; }
@keyframes reveal-row { from { opacity: 0; transform: translateY(8px); } }
.list.revealing .row { animation: reveal-row 0.35s ease-out var(--at, 0s) both; }
.minus { width: 24px; height: 24px; flex: none; border: 0; border-radius: 50%; background: var(--red); position: relative; }
.minus::after { content: ''; position: absolute; left: 6px; right: 6px; top: 11px; height: 2px; border-radius: 1px; background: #FFFFFF; }
.row.add .plus { width: 32px; text-align: center; font-size: 1.5rem; line-height: 1; color: var(--blue); }
.search-box { margin: 4px 0 12px; }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 1.0625rem; }
.section.flush { margin: 6px 16px 6px; }
.round > .pill.wide + .pill.wide { margin-top: 0; }
.pill.danger { background: var(--red); color: #FFFFFF; }
/* Add Player's New Contact and Import from Contacts, and a waiting-room row's Text */
.row .icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--blue); }
.row .icon svg, .pill svg { display: block; }
.pill.small-pill { min-height: 30px; padding: 4px 12px; gap: 5px; font-size: 0.875rem; }
/* Shuffle (play.js): blue text with its icon, apart from the choices */
.shuffle { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 0; background: none; color: var(--blue); font-size: 0.9375rem; font-weight: 600; }
.shuffle:disabled { opacity: 0.5; }

/* How to Play (howto.js): an example round that plays by itself on a tinted panel, with a finger showing each tap and drag.
   Each game sets its panel's height to its tallest scene. */
.how .sheet-head h2 { font: 800 1.25rem/1.2 var(--display); }
.how .demo { position: relative; padding: 14px 14px 16px; border-radius: 18px; background: var(--fill); overflow: hidden; }
.how .demo .turn { margin-bottom: 8px; }
/* Someone else's screen, in the other appearance from the phone's, so the switch to your screen shows */
.how .demo.flip { color-scheme: dark; background: var(--bg); color: var(--ink); --bg: #000000; --card: #1C1C1E; --ink: #F5F5F7; --ink-2: #98989D; --ink-3: #636366;
  --line: rgba(84, 84, 88, 0.6); --fill: rgba(118, 118, 128, 0.24); --blue: #0A84FF; --red: #FF453A; --mid: #48484A; --left-ink: #5EA8FF; --right-ink: #F2B21C; }
@media (prefers-color-scheme: dark) {
  .how .demo.flip { color-scheme: light; --bg: #F2F2F7; --card: #FFFFFF; --ink: #1D1D1F; --ink-2: #6E6E73; --ink-3: #AEAEB2;
    --line: rgba(60, 60, 67, 0.13); --fill: rgba(118, 118, 128, 0.12); --blue: #0071E3; --red: #D93F45; --mid: #ECE8DF; --left-ink: #1F6FD1; --right-ink: #A86F00; }
}
.how .demo .card { margin-top: 10px; }
.how .demo .list { margin: 10px 0 0; }
.how .demo > .pill.wide { margin-top: 14px; }
.how .demo .pill.pressed { transform: scale(0.97); filter: brightness(0.92); }
.how .finger { position: absolute; z-index: 5; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 2px rgba(29, 29, 31, 0.28), 0 4px 12px rgba(0, 0, 0, 0.18); transition: opacity 0.2s; }
.how > h3 { min-height: 2.5em; margin: 16px 0 6px; font: 800 1.375rem/1.25 var(--display); text-align: center; text-wrap: balance; }
.how .dots { display: flex; justify-content: center; gap: 7px; margin: 0 0 16px; }
.how .dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.how .dots span.on { background: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* How to Play on its own page (howto/), inside the iPhone app's sheet: the animation and its caption, nothing else. */
.howto-page { background: transparent; }
.howto-page main { padding-top: 8px; }
/* A typed value at the right of a form row (a game's name) */
.field input.value { text-align: right; }
.field span.value { color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* A stepper, as iOS draws one: − and + side by side in a gray capsule, a thin line between */
.stepper { display: inline-flex; flex: none; border-radius: 9px; background: var(--fill); }
.stepper button { position: relative; width: 47px; height: 32px; border: 0; background: none; color: var(--ink); font-size: 1.375rem; line-height: 1; }
.stepper button + button::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.stepper button:disabled { color: var(--ink-3); cursor: default; }
.field input.value::placeholder { color: var(--ink-3); }

/* Daily streaks: the flame and the days in a row after a game's name (Games) and under it (a game's top bar), from 3 days;
   the red hourglass in the flame's place once 4 hours are left with no turn. Both are drawn in streak/, as SF Symbols'
   flame.fill and hourglass look. The milestone sheet: the game's day sky and floor, the big flame, the days in a row and
   the game's Daves. */
:root { --streak-flame: linear-gradient(0deg, #FF5A3C, #FF8A3D 50%, #FFC53D); --streak-ink: #DB5421; }
@media (prefers-color-scheme: dark) { :root { --streak-ink: #FF9A5C; } }
.streak { display: inline-flex; align-items: center; gap: 0.18em; font-weight: 700; color: var(--streak-ink); white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: -0.05em; }
.streak i { display: inline-block; width: 0.8em; height: 0.98em; background: var(--streak-flame);
  -webkit-mask: url(./streak/flame.svg) center / contain no-repeat; mask: url(./streak/flame.svg) center / contain no-repeat; }
.streak.risk { color: var(--red); }
.streak.risk i { width: 0.66em; background: var(--red); -webkit-mask-image: url(./streak/hourglass.svg); mask-image: url(./streak/hourglass.svg); }
.name .streak { margin-left: 8px; }
.title-lines { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.title-lines > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.title-lines .streak { font: 700 0.75rem/1.2 var(--body); }
.title-lines .streak-slot:empty { display: none; }
dialog.sheet.milestone { padding: 0; overflow: hidden; background: linear-gradient(var(--sky-top), var(--sky-low)); color: #24324F; height: min(92vh, 760px); }
.milestone .sheet-head { background: none; padding: 14px 16px 10px; }
.milestone .sheet-head h2 { font: 800 1.0625rem/1.3 var(--display); }
.milestone .ms-sheet { display: flex; flex-direction: column; height: 100%; }
.milestone .ms-stage { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; }
.milestone .ms-flame { flex: none; width: 104px; height: 128px; margin-top: 56px; background: var(--streak-flame);
  -webkit-mask: url(./streak/flame.svg) center / contain no-repeat; mask: url(./streak/flame.svg) center / contain no-repeat; }
.milestone .ms-days { font: 800 5.5rem/1 ui-rounded, -apple-system, var(--display); color: #DB5421; margin-top: 6px; font-variant-numeric: tabular-nums; }
.milestone .ms-label { font: 700 1.375rem/1.2 var(--display); margin-top: 2px; }
.milestone .ms-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; background: var(--floor); }
.milestone .ms-daves { position: absolute; left: 12px; right: 12px; bottom: 56px; display: flex; flex-wrap: wrap-reverse; justify-content: center; align-items: flex-end; gap: 6px 14px; }
.milestone .ms-daves .who { display: grid; justify-items: center; gap: 2px; font: 600 0.75rem/1.2 var(--body); }
.milestone .confetti { position: absolute; }
/* Results: the streak above Play Again, or who started the next game. */
.again-streak { margin-top: 18px; font-size: 1.125rem; }
.again-streak + .buttons { margin-top: 8px; }
.started { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.started-who { font-weight: 700; font-size: 1.0625rem; }
.started .title-lines .streak { font: 700 0.875rem/1.3 var(--body); }
.sheet-title { align-items: center; }
.row.unfit { opacity: 0.55; }
