/* Decision Duck. One column, phone first. Colours are tokens on :root; dark
   mode follows the system unless a person picks a theme (data-theme on <html>). */
/* The classic look: cool blue-white page, white cards, teal actions, Pickles. */
:root {
  --bg: #eef4fb;
  --bg2: #e3edf8;
  --water: transparent;
  --card: #ffffff;
  --ink: #264653;
  --muted: #4a6670;
  --line: #d4e3f0;
  --yellow: #0f9488;
  --yellow-d: #0b7a70;
  --orange: #e76f51;
  --teal: #0f9488;
  --teal-soft: #e0f2ef;
  --coral: #e76f51;
  --coral-d: #c9583c;
  --field: #f0f6fc;
  --shadow: 0 2px 8px rgba(38, 70, 83, 0.08);
  --shadow-lg: 0 8px 24px rgba(38, 70, 83, 0.12);
  --radius: 16px;
  --display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1f25; --bg2: #1e252c; --card: #242b33; --ink: #f0f0f0; --muted: #a8bcc3;
    --line: #333d46; --teal: #2dd4bf; --teal-soft: #1f3a3a; --field: #1e252c; --orange: #ff8a6b; --coral: #ff6b6b;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.2); --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1f25; --bg2: #1e252c; --card: #242b33; --ink: #f0f0f0; --muted: #a8bcc3;
  --line: #333d46; --teal: #2dd4bf; --teal-soft: #1f3a3a; --field: #1e252c; --orange: #ff8a6b; --coral: #ff6b6b;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.2); --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 16px/1.45 var(--body); -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
h1, h2, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 8px; }

.pond { display: none; }

/* ---- top bar ---- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; max-width: 560px; margin: 0 auto;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.top-home { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.wordmark { font: 700 21px/1 var(--display); letter-spacing: -0.2px; white-space: nowrap; }
.wordmark b { color: var(--teal); font-weight: 700; }
.top-right { display: flex; align-items: center; gap: 8px; }
.top-btn {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--card);
  border: 1.5px solid var(--line); fill: var(--ink);
}
.top-code {
  height: 42px; padding: 0 8px 0 14px; border-radius: 14px; background: var(--ink); color: var(--bg);
  font: 700 17px/1 var(--display); letter-spacing: 3px; display: flex; align-items: center; gap: 8px;
}
.top-code i { font-style: normal; background: var(--teal); color: #fff; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; letter-spacing: 0; font-size: 16px; }

.main { max-width: 560px; margin: 0 auto; padding: 4px 16px 32px; }
.view { display: flex; flex-direction: column; gap: 16px; animation: rise 0.28s ease backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- the duck: Pickles, in a round frame ---- */
.duck { position: relative; display: block; width: 96px; aspect-ratio: 1; flex: none; }
.duck img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; background: #fff; border: 3px solid var(--line); box-shadow: var(--shadow-lg); }
.duck-logo { width: 34px; }
.duck-logo img, .duck-sm img { border-width: 1.5px; box-shadow: none; }
.duck-sm { width: 34px; display: inline-block; vertical-align: -10px; }
.duck-hero { width: 190px; margin: 0 auto; }
.duck-lg { width: 170px; margin: 0 auto; }
.duck-win { width: 132px; margin: -58px auto 0; }
.duck-win img { border-color: var(--teal); }
.duck-crown { position: absolute; top: -26px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 40px; line-height: 1; font-style: normal; }
.bob { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.swim { animation: swim 1.5s ease-in-out infinite; }
@keyframes swim { 0%, 100% { transform: translateX(-14px) rotate(-4deg); } 50% { transform: translateX(14px) rotate(4deg); } }
.loading { display: grid; place-items: center; min-height: 50vh; }

/* ---- type ---- */
.kicker { font: 600 13px/1.2 var(--display); letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal); }
.kicker.center { text-align: center; margin-bottom: 4px; }
.hero { text-align: center; padding: 6px 0 2px; }
.hero-sm { padding-top: 0; }
.hero .kicker { margin-top: 6px; }
.hero-title { font: 700 clamp(28px, 8vw, 38px)/1.1 var(--display); letter-spacing: -0.4px; margin-top: 6px; }
.muted { color: var(--muted); font-size: 15px; }
.hint { color: var(--muted); font-size: 13.5px; margin-top: 10px; }

/* ---- surfaces ---- */
.card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.card h2, .sheet-title { font: 700 20px/1.2 var(--display); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pill { font: 600 13px/1 var(--display); background: var(--teal-soft); color: var(--teal); padding: 7px 10px; border-radius: 999px; white-space: nowrap; }

.field {
  width: 100%; background: var(--field); border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px;
  font-size: 17px; min-width: 0;
}
.field:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 22%, transparent); }
.field::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field-q { font: 600 20px/1.25 var(--display); padding: 16px; text-align: center; }
.field-sm { padding: 8px 10px; font-size: 15px; width: auto; margin-left: auto; }
textarea.field { resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px;
  border-radius: 999px; font: 700 17px/1.1 var(--display); text-align: center; flex: 1 1 auto;
  transition: transform 0.06s ease, box-shadow 0.06s ease, filter 0.15s;
}
.btn-big { min-height: 58px; font-size: 19px; width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 12px; font-size: 14px; flex: 0 0 auto; }
.btn-primary { background: var(--yellow); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover:not(:disabled) { background: var(--yellow-d); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow); }
.btn-danger { background: var(--coral); color: #fff; box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { filter: grayscale(0.7); opacity: 0.55; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.link { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 14.5px; padding: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 999px; background: var(--field);
  border: 1.5px solid var(--line); font: 600 15px/1 var(--display); white-space: nowrap;
}
.chip.on { background: var(--teal-soft); color: var(--teal); border-color: var(--teal); }
.chips-sm .chip { padding: 7px 11px; font-size: 14px; }

.seg { display: inline-flex; background: var(--field); border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; margin-left: auto; }
.seg button { padding: 8px 11px; font: 600 14px/1 var(--display); min-width: 38px; }
.seg button.on { background: var(--teal); color: #fff; }
.switch { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; margin-left: auto; cursor: pointer; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch:checked { background: var(--teal); }
.switch:checked::after { transform: translateX(18px); }

/* ---- home ---- */
.composer { display: flex; flex-direction: column; gap: 14px; }
.composer .chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.composer .chip { flex-direction: column; gap: 5px; padding: 10px 2px; border-radius: 16px; font-size: 13px; white-space: normal; text-align: center; line-height: 1.1; }
.composer .chip span { font-size: 24px; line-height: 1; }
.opts-more summary { cursor: pointer; color: var(--muted); font: 600 14px/1 var(--display); text-align: center; padding: 4px; list-style: none; }
.opts-more summary::-webkit-details-marker { display: none; }
.opts-more summary::after { content: ' ▾'; }
.opts-more[open] summary::after { content: ' ▴'; }
.opts-more[open] { display: flex; flex-direction: column; gap: 12px; }
.set-row { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-top: 12px; }
#set-note { margin-top: 12px; }
.rejoin { display: block; text-align: center; background: var(--teal-soft); color: var(--teal); padding: 12px; border-radius: 16px; font: 600 16px/1.2 var(--display); text-decoration: none; }
.joinbar { display: flex; align-items: center; gap: 10px; }
.joinbar label { font: 600 15px/1.2 var(--display); color: var(--muted); flex: 1; }
.field-code { width: 118px; text-align: center; font: 700 20px/1 var(--display); letter-spacing: 6px; padding: 12px 8px 12px 14px; text-transform: uppercase; }
.joinbar .btn { flex: 0 0 auto; }
.steps { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.step-n { flex: none; width: 32px; height: 32px; border-radius: 11px; background: var(--yellow); color: #fff; display: grid; place-items: center; font: 700 16px/1 var(--display); }
.steps strong { font: 600 16px/1.2 var(--display); }
.steps p { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.solo { display: flex; flex-direction: column; gap: 10px; }
.solo-out { text-align: center; min-height: 20px; }
.solo-spin { font: 600 20px/1.4 var(--display); color: var(--muted); }
.solo-win { font: 700 28px/1.2 var(--display); animation: pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both; overflow-wrap: anywhere; }
.foot { text-align: center; color: var(--muted); font-size: 13.5px; padding: 6px 0 20px; }

/* ---- room ---- */
.q-card { text-align: center; padding: 4px 6px 0; }
.q-topic { font: 700 clamp(26px, 7.4vw, 36px)/1.1 var(--display); letter-spacing: -0.4px; overflow-wrap: anywhere; margin-top: 4px; }
.q-card-sm .q-topic { font-size: clamp(20px, 5.4vw, 26px); color: var(--muted); }
.q-note { color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }

.flock { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.flock::-webkit-scrollbar { display: none; }
.flock-center { justify-content: center; flex-wrap: wrap; }
.bird { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.bird-face {
  position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 27px; line-height: 1;
}
.bird.me .bird-face { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.bird.off .bird-face { opacity: 0.45; filter: grayscale(1); }
.bird.spec .bird-face { border-style: dashed; }
.bird-badge {
  position: absolute; right: -6px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
  background: var(--teal); color: #fff; font: 700 12px/22px var(--display); font-style: normal; border: 1.5px solid var(--bg);
}
.bird-name { font: 600 12.5px/1.15 var(--display); max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bird-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--teal); font-weight: 700; }
.bird-tag.dim { color: var(--muted); }
.bird-add .bird-face { border-style: dashed; color: var(--muted); font-size: 22px; background: transparent; }

.idea-form { display: flex; gap: 8px; }
.idea-form .btn { flex: 0 0 auto; }
.idea-form.full { display: none; }
.card.hosting .idea-form, .card.hosting #r-starters, .card.hosting .hint, .card.hosting .pill { display: none; }
.mylist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mylist:empty { display: none; }
.mylist-item {
  display: flex; align-items: center; gap: 10px; background: var(--teal-soft); border-radius: 14px; padding: 10px 8px 10px 14px;
  font: 600 16.5px/1.25 var(--display); animation: pop 0.3s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.mylist-item span { flex: 1; overflow-wrap: anywhere; }
.x { width: 34px; height: 34px; border-radius: 10px; color: var(--muted); flex: none; font-size: 15px; }
.x:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }

.history ul { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.history li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.history li span { color: var(--muted); }
.history li strong { text-align: right; overflow-wrap: anywhere; }

.banner {
  background: var(--teal-soft); color: var(--ink); border-radius: 16px; padding: 12px 14px; font-size: 14.5px;
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}

/* The dock: what you do next, always within thumb reach. */
.dock-space { height: 190px; flex: none; }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--card); border-top: 2px solid var(--line);
  border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
.dock > * { max-width: 528px; width: 100%; margin: 0 auto; }
.dock:empty { display: none; }
.dock-line { text-align: center; font-size: 14.5px; color: var(--muted); }
.dock-line strong { color: var(--ink); font-family: var(--display); }
.dock-hint { text-align: center; font-size: 13.5px; color: var(--muted); }
.dock .link { align-self: center; width: auto; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px;
  background: var(--field); border: 1.5px solid var(--line);
}
.mode.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }
.mode-ico { font-size: 22px; line-height: 1; }
.mode-name { font: 700 14.5px/1.1 var(--display); }

/* ---- deciding ---- */
.turn {
  display: flex; align-items: center; gap: 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow);
}
.turn.mine { background: var(--yellow); border-color: var(--yellow-d); box-shadow: var(--shadow); color: #fff; }
.turn-face { font-size: 34px; line-height: 1; }
.turn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.turn-text strong { font: 700 20px/1.15 var(--display); overflow-wrap: anywhere; }
.turn-text span { font-size: 14px; opacity: 0.8; }
.ring { position: relative; width: 48px; height: 48px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring-bg { stroke: color-mix(in srgb, currentColor 16%, transparent); }
.ring-fg { stroke: currentColor; stroke-linecap: round; transition: stroke-dashoffset 0.2s linear; }
.ring-fg.low { stroke: var(--coral); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 16px/1 var(--display); }

.opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.opt {
  position: relative; min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 10px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line); box-shadow: var(--shadow);
  text-align: center; transition: transform 0.08s, opacity 0.3s, filter 0.3s; overflow: hidden;
}
.opt-text { font: 600 17.5px/1.2 var(--display); overflow-wrap: anywhere; }
.opt-note { font-size: 12.5px; color: var(--muted); min-height: 0; }
.opt-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; }
.opt.can { border-color: var(--teal); box-shadow: var(--shadow); }
.opt.can:active { transform: scale(0.97); }
.opt.picked { background: var(--coral); border-color: var(--coral-d); box-shadow: var(--shadow); color: #fff; }
.opt.out { opacity: 0.5; filter: grayscale(1); box-shadow: none; border-style: dashed; }
.opt.out .opt-text { text-decoration: line-through; text-decoration-thickness: 2px; }
.opt.sinking { animation: sink 0.7s ease both; }
@keyframes sink { 0% { transform: none; opacity: 1; filter: none; } 35% { transform: translateY(-8px) rotate(-4deg); opacity: 1; } 100% { transform: none; opacity: 0.5; filter: grayscale(1); } }
.opts > .opt:only-child, .opts > .opt:last-child:nth-child(odd) { grid-column: 1 / -1; }

.order { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.order-bird { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--card); border: 1.5px solid var(--line); opacity: 0.6; }
.order-bird.now { opacity: 1; border-color: var(--teal); transform: scale(1.18); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 25%, transparent); }
.order-bird.off { filter: grayscale(1); }

.ready {
  position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(3px);
}
.ready p { font: 600 20px/1 var(--display); color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.ready strong { font: 700 150px/1 var(--display); color: var(--teal); animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both; }

.rank { display: flex; flex-direction: column; gap: 8px; touch-action: pan-y; }
.rank-item {
  display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px;
  padding: 10px 10px 10px 12px; box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; touch-action: none;
}
.rank.locked .rank-item { touch-action: auto; box-shadow: none; }
.rank-item.dragging { border-color: var(--ink); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2); transform: scale(1.02); z-index: 2; }
.rank-item.moved { animation: pop 0.2s ease both; }
.rank-n { flex: none; width: 34px; height: 34px; border-radius: 12px; background: var(--yellow); color: #fff; display: grid; place-items: center; font: 700 17px/1 var(--display); }
.rank-item:first-child .rank-n { background: var(--yellow-d); color: #fff; }
.rank-item .opt-thumb { width: 64px; flex: none; border-radius: 8px; }
.rank-text { flex: 1; font: 600 16.5px/1.2 var(--display); overflow-wrap: anywhere; }
.rank-ctl { display: flex; align-items: center; gap: 4px; flex: none; }
.ico { width: 40px; height: 40px; border-radius: 12px; background: var(--field); border: 1.5px solid var(--line); font-size: 13px; }
.ico:disabled { opacity: 0.3; }
.grip { color: var(--muted); font-size: 20px; padding: 0 2px 0 4px; cursor: grab; }

/* ---- result ---- */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.drum { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 16vh 0 0; }
.drum p { font: 700 26px/1.2 var(--display); }
.winner-card {
  margin-top: 92px; background: var(--card); color: var(--ink); border: 1.5px solid var(--teal); border-radius: 24px;
  box-shadow: var(--shadow); padding: 0 20px 22px; text-align: center;
}
.winner-card.pop { animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.winner-label { font: 700 13px/1 var(--display); letter-spacing: 2px; text-transform: uppercase; opacity: 0.7; margin-top: 4px; }
.winner-text { color: var(--teal); font: 700 clamp(32px, 10vw, 48px)/1.05 var(--display); letter-spacing: -0.6px; margin-top: 6px; overflow-wrap: anywhere; }
.winner-by { margin-top: 10px; font: 600 16px/1.2 var(--display); }
.winner-how { margin-top: 6px; font-size: 14px; opacity: 0.75; }
.winner-thumb { display: block; position: relative; margin: 12px auto 4px; max-width: 320px; border-radius: 16px; overflow: hidden; }
.winner-thumb img { width: 100%; display: block; }
.winner-thumb span { position: absolute; left: 10px; bottom: 10px; background: #10262d; color: #fff; padding: 6px 10px; border-radius: 10px; font: 600 14px/1 var(--display); }
.also { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.also li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--card) 70%, transparent); border: 2px dashed var(--line); color: var(--muted); }
.also li span { text-decoration: line-through; overflow-wrap: anywhere; }
.also li i { font-style: normal; }
.scores { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.scores li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 10px 14px; }
.scores li.lead { border-color: var(--teal); }
.score-text { font: 600 16px/1.2 var(--display); overflow-wrap: anywhere; }
.score-n { font: 600 13.5px/1 var(--display); color: var(--muted); }
.score-bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--field); overflow: hidden; order: 3; }
.score-bar i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.scores li.lead .score-bar i { background: var(--teal); }

/* ---- identity ---- */
.ident { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 14px; }
.animals { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.animal { aspect-ratio: 1; border-radius: 14px; font-size: clamp(20px, 6vw, 27px); background: var(--field); border: 1.5px solid transparent; display: grid; place-items: center; line-height: 1; }
.animal.on { border-color: var(--teal); background: var(--teal-soft); transform: scale(1.06); }
.animal:disabled { opacity: 0.22; filter: grayscale(1); }

/* ---- sheets, toast ---- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(8, 24, 28, 0.55); opacity: 0; transition: opacity 0.2s; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--card);
  border-radius: 28px 28px 0 0; padding: 22px 18px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-back { opacity: 1; }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 12px; background: var(--field); color: var(--muted); }
.sheet-title { padding-right: 44px; }
.sheet-sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.sheet .chips { margin: 14px 0 10px; }
.sheet .field-q { margin-bottom: 12px; }
.invite { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 18px 0; }
.invite-code { display: flex; gap: 8px; }
.invite-code span { width: 58px; height: 68px; border-radius: 16px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 36px/1 var(--display); }
.invite-qr { width: 190px; height: 190px; border-radius: 16px; background: #fff; image-rendering: pixelated; }
.menu { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 14px; font-size: 16px; text-align: left; width: 100%; }
button.menu-row:hover { background: var(--field); }
.menu-row.danger { color: var(--coral); }
@media (min-width: 620px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 28px; transform: translateY(20px) scale(0.98); opacity: 0; transition: transform 0.2s, opacity 0.2s; }
  .sheet-wrap.open .sheet { opacity: 1; }
  .dock { left: 50%; right: auto; transform: translateX(-50%); width: 560px; border: 1.5px solid var(--line); border-bottom: 0; }
}
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); z-index: 60;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 16px; font: 600 15px/1.3 var(--display);
  opacity: 0; pointer-events: none; transition: transform 0.2s, opacity 0.2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--coral); color: #fff; }
body:not([data-phase="home"]) .toast { bottom: calc(210px + env(safe-area-inset-bottom)); }
.offline { position: sticky; top: 58px; z-index: 19; margin: 0 auto; max-width: 528px; background: var(--coral); color: #fff; text-align: center; padding: 8px 12px; border-radius: 12px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
