/* «Квиз PageLab». Тетрадь в клетку: бумага, синяя сетка, красные поля.
   Единственный яркий элемент — цвета и фигуры вариантов ответа, одинаковые на доске и в телефонах. */

@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0400-04FF; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-03FF, U+2000-27FF; }
@font-face { font-family: "Golos"; font-weight: 500; font-display: swap; src: url(fonts/golos-text-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0400-04FF; }
@font-face { font-family: "Golos"; font-weight: 500; font-display: swap; src: url(fonts/golos-text-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-03FF, U+2000-27FF; }
@font-face { font-family: "Golos"; font-weight: 700; font-display: swap; src: url(fonts/golos-text-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0400-04FF; }
@font-face { font-family: "Golos"; font-weight: 700; font-display: swap; src: url(fonts/golos-text-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-03FF, U+2000-27FF; }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url(fonts/unbounded-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0400-04FF; }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url(fonts/unbounded-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-03FF, U+2000-27FF; }

:root {
  --paper: #fcfcf8;
  --grid: #dde7f2;
  --ink: #182338;
  --ink-2: #4b5870;
  --ink-3: #8390a6;
  --margin: #e0453f;
  --line: #c9d4e3;
  --focus: #2457c5;
  --ok: #1f7a4d;
  --bad: #c23b33;
  --a1: #2457c5; --a2: #cf3a33; --a3: #20804f; --a4: #a86a00; --a5: #7346b5; --a6: #127f86;
  --cell: 24px;
  --font: "Golos", "Segoe UI", system-ui, sans-serif;
  --display: "Unbounded", "Golos", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 400 17px/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
.notebook {
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, transparent calc(var(--margin-x, 64px) - 1px), var(--margin) calc(var(--margin-x, 64px) - 1px), var(--margin) calc(var(--margin-x, 64px) + 1px), transparent calc(var(--margin-x, 64px) + 1px)),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 100%, var(--cell) var(--cell), var(--cell) var(--cell);
  min-height: 100vh;
}
.notebook > .page { padding-left: calc(var(--margin-x, 64px) + 24px); }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font: 600 28px/1.15 var(--display); letter-spacing: -0.01em; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
a { color: var(--focus); text-underline-offset: 3px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.hidden { display: none !important; }

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

/* ------------------------------------------------------------------ кнопки и поля */
@media (hover: hover) {
  .btn:hover { background: #fff; box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
  .btn.primary:hover { background: var(--ink); box-shadow: 3px 3px 0 var(--margin); }
  .btn.quiet:hover { box-shadow: none; transform: none; background: rgba(24, 35, 56, 0.06); }
}
.btn {
  font: 500 16px/1 var(--font);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--ink); border-radius: 10px;
  background: var(--paper); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:active { box-shadow: none; transform: none; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.quiet { border-color: transparent; background: transparent; padding: 0 10px; }
.btn.big { min-height: 56px; font-size: 19px; padding: 0 26px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

input[type=text], input[type=number], input:not([type]), textarea, select {
  font: 400 17px/1.4 var(--font); color: var(--ink);
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff;
}
input:focus, textarea:focus, select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(36, 87, 197, 0.18); }
textarea { resize: vertical; min-height: 64px; }
label.field { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
label.field > span { font-weight: 500; }
.err { color: var(--bad); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ------------------------------------------------------------------ фигуры вариантов */
.shape { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; flex: none; }
.shape svg { width: 100%; height: 100%; fill: currentColor; }
.opt-1 { --c: var(--a1); } .opt-2 { --c: var(--a2); } .opt-3 { --c: var(--a3); }
.opt-4 { --c: var(--a4); } .opt-5 { --c: var(--a5); } .opt-6 { --c: var(--a6); }

/* ------------------------------------------------------------------ шапка кабинета */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px 18px 0; }
.wordmark { font: 600 20px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.wordmark b { color: var(--margin); font-weight: 600; }
.page { max-width: 1040px; padding: 0 24px 64px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 10px; font-weight: 500;
  z-index: 50; max-width: calc(100vw - 32px);
}
.toast.bad { background: var(--bad); }

dialog {
  border: 1.5px solid var(--ink); border-radius: 14px; padding: 24px; max-width: 460px; width: calc(100vw - 32px);
  background: var(--paper); color: var(--ink); box-shadow: 6px 6px 0 var(--ink);
}
dialog::backdrop { background: rgba(24, 35, 56, 0.45); }
.choice { display: grid; gap: 10px; margin: 16px 0; }
.choice label {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff;
}
.choice label:has(input:checked) { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.choice input { margin-top: 4px; }
.choice small { grid-column: 2; color: var(--ink-2); font-size: 14px; }

/* ------------------------------------------------------------------ списки кабинета */
.ledger { margin-top: 12px; border-top: 1.5px solid var(--ink); }
.ledger-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.ledger-row .title { font-weight: 700; font-size: 18px; }
.ledger-row .meta { color: var(--ink-2); font-size: 14px; }
.ledger-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.empty { padding: 28px 0; color: var(--ink-2); }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 13px; font-weight: 500; background: rgba(36, 87, 197, 0.1); color: var(--focus); }
.badge.live { background: rgba(31, 122, 77, 0.12); color: var(--ok); }

.hero { padding: 48px 0 24px; max-width: 640px; }
.hero h1 { font-size: 40px; margin-bottom: 16px; }
.hero p { font-size: 19px; color: var(--ink-2); margin-bottom: 28px; }

/* ------------------------------------------------------------------ редактор */
.editor-head { position: sticky; top: 0; z-index: 5; background: rgba(252, 252, 248, 0.94); backdrop-filter: blur(4px); padding: 12px 0; border-bottom: 1px solid var(--line); }
.editor-head input.title-input { font: 600 26px/1.2 var(--display); width: auto; flex: 1 1 260px; border: none; background: transparent; padding: 6px 0; border-bottom: 1.5px dashed var(--line); border-radius: 0; }
.editor-head input.title-input:focus { box-shadow: none; border-bottom-color: var(--focus); }
.q { position: relative; margin-top: 24px; padding: 18px 0 18px; border-top: 1.5px solid var(--ink); }
.q-num { position: absolute; left: -82px; top: 14px; width: 48px; text-align: right; font: 600 22px/1 var(--display); color: var(--margin); }
.q-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.q-head select { width: auto; }
.q-grid { display: grid; gap: 12px; }
.q-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.opt-row { display: flex; gap: 10px; align-items: center; }
.opt-row .shape { color: var(--c); font-size: 18px; }
.opt-row input[type=radio], .opt-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.flag { display: flex; gap: 8px; align-items: start; padding: 8px 12px; border-left: 3px solid var(--a4); background: rgba(168, 106, 0, 0.08); font-size: 15px; }
.adders { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 18px; border-top: 1.5px dashed var(--line); }
details.more summary { cursor: pointer; color: var(--ink-2); font-size: 15px; }

/* ------------------------------------------------------------------ экран для проектора */
body.screen { overflow: hidden; }
.screen .notebook { --cell: 32px; --margin-x: 88px; height: 100vh; }
.stage { position: relative; height: 100vh; padding: 3.2vh 4vw 3.2vh calc(88px + 3vw); display: grid; grid-template-rows: auto 1fr auto; gap: 2.4vh; }
.stage-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 2.2vh; color: var(--ink-2); }
.stage-top .pin { font: 600 3.2vh/1 var(--display); color: var(--ink); }
.stage-qnum { position: absolute; left: 0; width: 88px; top: 3.2vh; text-align: center; font: 600 4.4vh/1 var(--display); color: var(--margin); }
.stage-main { display: grid; align-content: center; gap: 3.5vh; min-height: 0; }
.stage-q { font: 700 5.2vh/1.18 var(--font); max-width: 72ch; text-wrap: balance; }
.stage-q.long { font-size: 4vh; }
.stage-img { max-height: 30vh; max-width: 60%; border-radius: 8px; border: 1.5px solid var(--line); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8vh 1.6vw; }
.tile {
  display: flex; align-items: center; gap: 1.4vw; min-height: 11vh; padding: 1.6vh 1.6vw;
  border-radius: 14px; background: var(--c); color: #fff; font: 700 3.4vh/1.2 var(--font);
  transition: opacity 0.3s, filter 0.3s;
}
.tile .shape { font-size: 4.2vh; }
.tile .count { margin-left: auto; font: 600 3.6vh/1 var(--display); }
.tiles.revealed .tile.wrong { opacity: 0.28; filter: saturate(0.4); }
.tiles.revealed .tile.right { outline: 6px solid var(--ink); outline-offset: 4px; }
.order-list { display: grid; gap: 1.2vh; margin: 0; padding: 0; list-style: none; }
.order-list li { display: flex; gap: 1.4vw; align-items: center; font: 700 3.2vh/1.2 var(--font); padding: 1.2vh 1.4vw; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
.order-list .n { font: 600 3vh/1 var(--display); color: var(--margin); width: 2.4em; }
.stage-foot { display: flex; align-items: center; gap: 2vw; }
.timer { font: 600 7vh/1 var(--display); min-width: 2.4em; }
.timer.low { color: var(--margin); }
.bar { flex: 1; height: 1.2vh; background: var(--grid); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); width: 100%; }
.answered { font-size: 2.6vh; color: var(--ink-2); white-space: nowrap; }
.answered b { font: 600 3.4vh/1 var(--display); color: var(--ink); }
.explain { font-size: 2.8vh; color: var(--ink-2); max-width: 80ch; border-left: 4px solid var(--margin); padding-left: 1.4vw; }
.big-answer { font: 700 6vh/1.15 var(--font); }
.big-answer small { display: block; font: 500 2.4vh/1.3 var(--font); color: var(--ink-2); margin-bottom: 1vh; }

.lobby { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; }
.lobby .qr { width: 38vh; height: 38vh; background: #fff; padding: 1.4vh; border: 2px solid var(--ink); border-radius: 16px; }
.lobby .qr img { width: 100%; height: 100%; display: block; }
.join-how { font-size: 3vh; color: var(--ink-2); }
.join-how b { color: var(--ink); }
.join-pin { font: 600 13vh/1 var(--display); letter-spacing: 0.04em; margin: 1vh 0 2vh; }
.nicks { display: flex; flex-wrap: wrap; gap: 1vh 1.4vw; font: 500 2.8vh/1.3 var(--font); max-height: 26vh; overflow: hidden; }
.nicks span { padding: 0.4vh 1vw; border-bottom: 2px solid var(--line); }

.ranking { display: grid; gap: 1vh; margin: 0; padding: 0; list-style: none; max-width: 70vw; }
.ranking li { display: grid; grid-template-columns: 4em 1fr auto; align-items: baseline; gap: 1vw; font: 700 3.2vh/1.3 var(--font); padding: 0.8vh 0; border-bottom: 1.5px solid var(--line); }
.ranking .r { font: 600 3vh/1 var(--display); color: var(--margin); }
.ranking .s { font: 600 3vh/1 var(--display); }
.podium { display: flex; align-items: end; gap: 2vw; border-bottom: 3px solid var(--ink); }
.podium > div { flex: 1; text-align: center; }
.podium .nick { font: 700 3.6vh/1.2 var(--font); margin-bottom: 1vh; }
.podium .step { border: 2px solid var(--ink); border-bottom: none; border-radius: 12px 12px 0 0; display: grid; place-content: center; gap: 1.4vh; font: 600 7vh/1 var(--display); color: var(--margin); background: #fff; }
.podium .p1 .step { height: 26vh; } .podium .p2 .step { height: 19vh; } .podium .p3 .step { height: 14vh; }
.podium .pts { font: 500 2.6vh/1 var(--font); color: var(--ink-2); }

.board { display: grid; gap: 1.2vh; }
.board-row { display: grid; grid-template-columns: 20vw repeat(var(--n), 1fr); gap: 1vw; align-items: stretch; }
.board-row .topic { font: 700 3vh/1.2 var(--font); display: flex; align-items: center; }
.cell { display: grid; place-items: center; min-height: 9vh; border: 2px solid var(--ink); border-radius: 12px; font: 600 4vh/1 var(--display); background: #fff; color: var(--ink); }
.cell.done { border-style: dashed; border-color: var(--line); color: var(--line); background: transparent; }
.cell.empty { border: none; background: none; }
.scores { display: flex; flex-wrap: wrap; gap: 1vh 2.4vw; font-size: 2.6vh; }
.scores b { font: 600 3vh/1 var(--display); margin-left: 0.5vw; }
.buzzer-name { font: 600 9vh/1.1 var(--display); color: var(--margin); }
.screen-ctl { position: fixed; left: 20px; bottom: 16px; opacity: 0.35; }
.screen-ctl:hover, .screen-ctl:focus-within { opacity: 1; }
.screen-ctl .btn { width: 48px; min-height: 48px; padding: 0; }
.screen-ctl svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.status-line { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); background: var(--bad); color: #fff; padding: 6px 14px; border-radius: 8px; font-size: 15px; z-index: 40; }

/* ------------------------------------------------------------------ телефон участника */
.phone { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 16px; max-width: 560px; margin: 0 auto; }
.phone-top { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--ink-2); padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); }
.phone-top b { color: var(--ink); }
.phone-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 18px 0; }
.phone h1 { font-size: 24px; }
.phone .pin-input { font: 600 34px/1 var(--display); letter-spacing: 0.12em; text-align: center; padding: 14px; }
.answers { display: grid; gap: 12px; }
.answers.two { grid-template-columns: 1fr 1fr; }
.ans {
  display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 16px; width: 100%;
  border: none; border-radius: 14px; background: var(--c); color: #fff; font: 700 19px/1.25 var(--font); text-align: left; cursor: pointer;
}
.ans .shape { font-size: 30px; }
.ans[aria-pressed=true] { outline: 5px solid var(--ink); outline-offset: 3px; }
.ans:active { transform: scale(0.98); }
.ans.bool-yes { --c: var(--a3); justify-content: center; min-height: 120px; font-size: 24px; }
.ans.bool-no { --c: var(--a2); justify-content: center; min-height: 120px; font-size: 24px; }
.qtext { font-size: 19px; font-weight: 700; }
.state-big { text-align: center; display: grid; gap: 10px; }
.state-big .mark { font: 600 56px/1 var(--display); }
.state-big .mark.ok { color: var(--ok); } .state-big .mark.bad { color: var(--bad); }
.state-big p { font-size: 19px; }
.buzz {
  width: min(72vw, 300px); aspect-ratio: 1; border-radius: 50%; margin: 0 auto; display: grid; place-items: center;
  border: 4px solid var(--ink); background: var(--margin); color: #fff; font: 600 28px/1 var(--display); cursor: pointer;
  box-shadow: 0 10px 0 var(--ink); transition: transform 0.06s, box-shadow 0.06s;
}
.buzz:active { transform: translateY(8px); box-shadow: 0 2px 0 var(--ink); }
.buzz[disabled] { background: var(--line); color: var(--ink-2); box-shadow: none; border-color: var(--line); }
.order-edit { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.order-edit li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border: 1.5px solid var(--ink); border-radius: 10px; font-weight: 500; }
.order-edit li .grow { padding: 0 4px; }
.footer-note { text-align: center; font-size: 14px; color: var(--ink-3); padding-top: 12px; }
.footer-note a { color: var(--ink-2); }

/* ------------------------------------------------------------------ пульт */
.console { max-width: 720px; margin: 0 auto; padding: 0 16px 120px; }
.console-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1.5px solid var(--ink); flex-wrap: wrap; }
.console-top .pin { font: 600 22px/1 var(--display); }
.panel { padding: 20px 0; display: grid; gap: 16px; }
.key { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border: 1.5px dashed var(--ok); border-radius: 10px; color: var(--ok); font-weight: 700; }
.key .btn { min-height: 36px; flex: none; }
.key-hidden { border-color: var(--line); color: var(--ink-3); font-weight: 500; }
.key-shape { color: var(--c); }
.one-screen { margin: 12px 0 0; }
/* экран с кнопками для ведущего (один проектор) */
.screen-bar { position: fixed; right: 16px; bottom: 14px; display: flex; gap: 8px; z-index: 30; opacity: 0.6; transition: opacity 0.2s; }
.screen-bar:hover, .screen-bar:focus-within { opacity: 1; }
.screen-bar .btn { min-height: 44px; font-size: 15px; background: var(--paper); }
.screen-bar .btn.primary { background: var(--ink); }
body.owner .stage { padding-bottom: 76px; }
body.owner .cell.pickable { cursor: pointer; }
@media (hover: hover) { body.owner .cell.pickable:hover { box-shadow: 4px 4px 0 var(--margin); transform: translate(-2px, -2px); } }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(252, 252, 248, 0.96); border-top: 1.5px solid var(--ink); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; z-index: 10;
}
.dock .btn { flex: 1 1 140px; max-width: 320px; }
.dock:empty { display: none; }
.stat-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.stat-row .shape { color: var(--c); }
.stat-row .track { height: 14px; background: var(--grid); border-radius: 99px; overflow: hidden; }
.stat-row .track i { display: block; height: 100%; background: var(--c); }
.stat-row.right .track { outline: 2px solid var(--ink); }
.roster { display: grid; gap: 0; }
.roster > div { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.board-host { display: grid; gap: 8px; }
.board-host .topic { font-weight: 700; margin-top: 6px; }
.board-host .cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.auto-switch { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 10px; font-size: 15px; cursor: pointer; }
.auto-switch input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.auto-switch:has(input:checked) { border-style: solid; border-color: var(--ink); }
.judge { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.judge .btn { min-height: 64px; font-size: 20px; }
.judge .ok { border-color: var(--ok); color: var(--ok); }
.judge .no { border-color: var(--bad); color: var(--bad); }

@media (max-width: 720px) {
  .notebook { --margin-x: 28px; --cell: 20px; }
  .notebook > .page { padding-left: calc(var(--margin-x) + 14px); padding-right: 14px; }
  .q-num { left: -44px; width: 26px; font-size: 16px; }
  .hero h1 { font-size: 30px; }
  .ledger-row { grid-template-columns: 1fr; }
  .ledger-row .actions { justify-content: flex-start; }
  .topbar { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------------ ИИ-помощник и кошелёк */
dialog.wide { max-width: 600px; max-height: calc(100dvh - 32px); overflow: auto; }
.ai-grid { display: grid; gap: 14px; }
.ai-grid small { font-size: 13px; }
.ai-grid input[type=file] { font: 400 15px/1.4 var(--font); padding: 8px 0; }
.choice.compact { margin: 0; grid-template-columns: 1fr 1fr; }
.choice.compact label { padding: 10px 12px; }
.choice.compact small { font-size: 13px; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { padding: 0; margin-bottom: 6px; }
.chips label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-size: 15px; cursor: pointer;
}
.chips label:has(input:checked) { border-color: var(--ink); background: rgba(24, 35, 56, 0.06); }
.ai-price { margin: 16px 0 6px; font-size: 16px; }
.ai-price .muted { font-size: 14px; }
.wallet { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); }
.wallet b { color: var(--ink); font-weight: 600; }
.ai-note { margin: 12px 0 0; }
@media (max-width: 560px) {
  .choice.compact { grid-template-columns: 1fr; }
  dialog { padding: 18px; }
}
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .wordmark { white-space: nowrap; }
  #who { width: 100%; }
  .section-head { flex-wrap: wrap; align-items: center; }
  .section-head h2 { width: 100%; }
}
