/* Screens and layout of the app (step 2). Neutral look; themes add their style on top.
   Layout rule of thumb: landscape screens (PC, TV, tablet and phone sideways) show the stage left
   and the number board right; portrait screens stack everything and keep the main button at the
   bottom within thumb reach. */

.screen[hidden] { display: none !important; }
.screen { min-height: 100dvh; }

h1 { font-size: clamp(34px, 4.5vw, 52px); line-height: 1.05; margin: 0; }
h1:focus { outline: none; }
.hint { font-size: 19px; color: var(--muted); margin: 8px 0 0; max-width: 40em; }
.hint.is-error { color: #a3262d; font-weight: 700; }
.soon { font-size: 24px; color: var(--muted); padding: 40px 0; }

/* ---------- Start ---------- */
.start-inner {
  max-width: 1100px; margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 40px max(20px, env(safe-area-inset-left));
  display: grid; gap: 22px;
}
.start-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.start-head h1 { font-size: clamp(48px, 8vw, 88px); letter-spacing: -.01em; }
.theme-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-pick:empty { display: none; }
.chip {
  min-height: 64px; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: var(--panel); font-size: 20px; font-weight: 700;
}
.chip[aria-checked="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.tile {
  min-height: 190px; padding: 24px; cursor: pointer;
  border: 3px solid var(--line); border-radius: 22px; background: var(--panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .06);
  transition: border-color .15s, transform .15s;
}
@media (hover: hover) { .tile:hover { border-color: var(--accent); } }
.tile:active { transform: translateY(2px); }
.tile-icon { width: 64px; height: 64px; color: var(--accent); }
.tile-title { font-size: 30px; font-weight: 800; }
.tile-sub { font-size: 21px; color: inherit; opacity: .85; }
.tile-resume { min-height: 150px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile-resume .tile-title { font-size: 34px; }

.link-btn {
  justify-self: center; display: inline-flex; align-items: center; gap: 10px;
  min-height: 64px; padding: 8px 20px; border: 0; background: transparent; cursor: pointer;
  color: var(--accent); font-weight: 700; font-size: 22px; text-decoration: underline; text-underline-offset: 4px;
}
.link-btn svg { width: 28px; height: 28px; }

/* ---------- Form screens (setup, settings, ...) ---------- */
.form-inner {
  max-width: 920px; margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 48px max(20px, env(safe-area-inset-left));
}
.screen-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.back-btn {
  min-height: 64px; padding: 8px 22px 8px 16px; border-radius: var(--radius); cursor: pointer;
  border: 2px solid var(--line); background: var(--panel); font-weight: 700; font-size: 22px;
  display: inline-flex; align-items: center; gap: 8px;
}
.back-btn::before { content: ""; width: 12px; height: 12px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(45deg); }
.field-title { font-size: 26px; margin: 30px 0 12px; }

.variant-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.variant-card {
  display: grid; justify-items: center; gap: 8px; padding: 22px 18px; cursor: pointer;
  border: 3px solid var(--line); border-radius: 20px; background: var(--panel);
}
.variant-card[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent) inset; background: var(--selected); }
.variant-name { font-size: 28px; font-weight: 800; }
.variant-desc { font-size: 20px; color: var(--muted); }
.mini { display: block; border: 2px solid var(--ink); border-radius: 6px; background-color: #fff; }
.mini-75 {
  width: 100px; height: 100px;
  background-image:
    radial-gradient(circle, var(--accent) 7px, transparent 8px),
    repeating-linear-gradient(90deg, transparent 0 18px, var(--line) 18px 20px),
    repeating-linear-gradient(0deg, transparent 0 18px, var(--line) 18px 20px);
  background-position: center, 0 0, 0 0;
  background-repeat: no-repeat, repeat, repeat;
}
.mini-90 {
  width: 162px; height: 56px; margin: 22px 0;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 16px, var(--line) 16px 18px),
    repeating-linear-gradient(0deg, transparent 0 16px, var(--line) 16px 18px);
}

.choice-row { display: flex; flex-wrap: wrap; gap: 12px; }
.choice {
  min-height: 64px; padding: 10px 24px; border-radius: var(--radius); cursor: pointer;
  border: 3px solid var(--line); background: var(--panel); font-size: 23px; font-weight: 700;
}
.choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

.code-input {
  font-size: 40px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; text-align: center;
  width: 7.2ch; min-height: 76px; padding: 6px 10px; border: 3px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.code-input[aria-invalid="true"] { border-color: #a3262d; }
.code-input::placeholder { font-size: 22px; letter-spacing: 0; font-weight: 400; text-transform: none; }
.btn-wide { width: 100%; margin-top: 34px; min-height: 84px; font-size: 32px; }

.settings-list { display: grid; border-top: 2px solid var(--line); }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 92px; padding: 12px 0; border-bottom: 2px solid var(--line); cursor: pointer;
}
.switch-row strong { display: block; font-size: 24px; }
.switch-row small { display: block; font-size: 19px; color: var(--muted); }
.switch {
  appearance: none; flex: none; width: 76px; height: 44px; border-radius: 999px; cursor: pointer;
  background: #c9c3b6; position: relative; transition: background .15s; margin: 0;
}
.switch::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--panel); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(32px); }

/* ---------- Caller ---------- */
.caller {
  height: 100dvh; display: grid; gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.caller-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.caller-info { display: grid; line-height: 1.15; }
.caller-info strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.caller-info span { font-size: 20px; color: var(--muted); }
.toolbar { display: flex; gap: 8px; flex-wrap: nowrap; }
.tb {
  min-height: 64px; padding: 6px 14px; border-radius: var(--radius); cursor: pointer;
  border: 2px solid var(--line); background: var(--panel); font-size: 19px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.tb svg { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tb-more svg circle { fill: currentColor; stroke: none; }
.tb:disabled { opacity: .45; cursor: default; }
.tb[aria-pressed="false"] .sound-wave { display: none; }
#tbCheck { border-color: var(--accent); color: var(--accent); }
.tb-extra { display: none; }

.caller-main { display: grid; grid-template-rows: minmax(0, 1fr) auto auto auto; gap: 12px; min-height: 0; }
.stage-wrap {
  position: relative; min-height: 0; border-radius: 20px; background: var(--panel); border: 2px solid var(--line);
  overflow: hidden; container-type: size;
}
.stage { position: absolute; inset: 0; display: grid; place-items: center; }
.stage-empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; margin: 0; padding: 20px;
  font-size: clamp(22px, 4cqw, 34px); color: var(--muted); pointer-events: none;
}
.stage-empty[hidden] { display: none; }

.recent { display: flex; align-items: center; gap: 10px; min-height: 56px; overflow: hidden; }
.recent-label { font-size: 20px; color: var(--muted); flex: none; }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; height: 52px; list-style: none; margin: 0; padding: 0; overflow: hidden; }
.recent-list li {
  min-width: 56px; height: 52px; padding: 0 12px; border-radius: 999px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums;
  border: 2px solid var(--line); background: var(--panel); white-space: nowrap;
}
.recent-list li:first-child { border-color: var(--ink); }
.recent-list li:nth-child(n+4) { opacity: .75; }
.recent:has(.recent-list:empty) { visibility: hidden; }

.board-toggle {
  min-height: 64px; border-radius: var(--radius); cursor: pointer;
  border: 2px solid var(--line); background: var(--panel); font-size: 22px; font-weight: 700;
}
.draw-btn { width: 100%; min-height: 92px; font-size: clamp(30px, 4vw, 40px); border-radius: 18px; }

.board-panel {
  display: none; flex-direction: column; gap: 10px; min-height: 0;
  background: var(--panel); border: 2px solid var(--line); border-radius: 20px; padding: 14px;
}
.board-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.board-panel-head h2 { margin: 0; font-size: 22px; color: var(--muted); font-weight: 700; }
.board-fit { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }

/* Portrait: the board opens as a full-screen layer. */
.caller.board-open .board-panel {
  display: flex; position: fixed; inset: 0; z-index: 40; border-radius: 0; border: 0;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.caller.board-open .board-panel-head h2 { font-size: 28px; color: var(--ink); }

/* Landscape: stage left, board right, all controls visible on wide screens. */
@media (min-aspect-ratio: 5/4) {
  .caller { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .caller-top { grid-column: 1 / -1; }
  .caller-main { grid-template-rows: minmax(0, 1fr) auto auto; }
  .board-toggle, .board-close { display: none; }
  .board-panel { display: flex; }
}
@media (min-aspect-ratio: 5/4) and (min-width: 1280px) {
  .tb-extra { display: inline-flex; }
  .tb-more { display: none; }
}
/* Very wide TV: give the stage a bit more room. */
@media (min-aspect-ratio: 16/10) and (min-width: 1600px) {
  .caller { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}
/* Short screens (phone sideways): compact controls. */
@media (max-height: 520px) {
  .caller { gap: 8px; }
  .tb { min-height: 52px; padding: 4px 10px; font-size: 17px; }
  .caller-info strong { font-size: 20px; }
  .caller-info span { font-size: 17px; }
  .recent { display: none; }
  .draw-btn { min-height: 64px; font-size: 26px; }
}
/* Narrow phones: info on one line, the three buttons share the full width below. */
@media (max-width: 560px) {
  .caller-top { flex-wrap: wrap; gap: 8px; }
  .caller-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; }
  .caller-info strong { font-size: 21px; }
  .caller-info span { font-size: 18px; }
  .toolbar { width: 100%; }
  .tb { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 4px; font-size: 16px; }
}

/* ---------- Dialog and toast ---------- */
.dialog {
  border: 0; border-radius: 22px; padding: 30px; width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px); background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.dialog::backdrop { background: rgba(20, 26, 22, .5); }
.dialog h2 { font-size: 30px; margin: 0 0 10px; line-height: 1.15; }
.dialog p { font-size: 22px; margin: 0 0 22px; color: var(--muted); }
.dialog p:empty { display: none; }
.dialog-actions { display: grid; gap: 12px; }
.dialog-actions .btn { width: 100%; min-height: 72px; font-size: 24px; }
.dialog-actions .btn.is-current { background: var(--selected); }
.dialog-actions .btn-link { border: 0; min-height: 56px; text-decoration: underline; text-underline-offset: 4px; font-size: 21px; }

.toast {
  position: fixed; left: 50%; top: max(16px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60;
  background: var(--toast-bg, #1d2420); color: var(--toast-ink, #fff); font-size: 22px; font-weight: 700;
  padding: 14px 24px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100vw - 32px); text-align: center;
}
.toast[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .tile, .switch, .switch::after { transition: none; }
}

/* The caller screen always fits the viewport exactly. */
body[data-screen="spiel"] { overflow: hidden; }

/* ---------- Toolbar: "Mehr" is always there, wide screens show a few more buttons ---------- */
.tb-more { display: inline-flex; }
@media (min-aspect-ratio: 5/4) and (min-width: 1280px) { .tb-more { display: inline-flex; } }

.display-chip {
  display: inline-block; margin-top: 2px; font-size: 16px !important; font-weight: 700;
  color: var(--accent) !important;
}
.display-chip::before { content: "● "; }

/* ---------- Presentation mode (mirrored screen) ---------- */
.present-handle { display: none; }
body.presenting .present-handle {
  display: grid; place-items: center; position: fixed; z-index: 30;
  right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom));
  width: 64px; height: 64px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(0, 0, 0, .15); background: rgba(255, 255, 255, .55); color: var(--ink);
  opacity: .55; transition: opacity .2s;
}
body.presenting .present-handle svg { width: 26px; height: 26px; fill: currentColor; }
body.presenting.show-controls .present-handle { opacity: 1; }

/* The stage and board fill the screen, the top bar floats over it when called. */
body.presenting .caller { grid-template-rows: minmax(0, 1fr); }
body.presenting .caller-top {
  position: fixed; z-index: 35; left: 12px; right: 12px; top: max(12px, env(safe-area-inset-top));
  padding: 10px 12px; border-radius: 18px; background: rgba(246, 243, 236, .96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  opacity: 0; transform: translateY(-12px); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
body.presenting.show-controls .caller-top { opacity: 1; transform: none; pointer-events: auto; }
body.presenting .draw-btn, body.presenting .board-toggle { display: none; }
body.presenting .caller-main { grid-template-rows: minmax(0, 1fr) auto; }
body.presenting .stage-wrap { cursor: pointer; }
@media (min-aspect-ratio: 5/4) {
  body.presenting .caller { grid-template-rows: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  body.presenting .caller-top, .present-handle { transition: none; }
}

/* ---------- Display window (anzeige.html) ---------- */
.display-page { overflow: hidden; }
.display-page.idle { cursor: none; }
.display { grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr); }
.display .caller-main { grid-template-rows: minmax(0, 1fr) auto; }
.display .board-panel { display: flex; }
@media (min-aspect-ratio: 5/4) {
  .display { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
}
.display-waiting {
  position: fixed; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px;
}
.display-waiting[hidden] { display: none; }
.display-waiting h1 { font-size: clamp(56px, 10vw, 120px); }
.display-waiting p { font-size: clamp(22px, 2.6vw, 34px); color: var(--muted); max-width: 26em; margin: 0 auto; }
.display-full { position: fixed; top: 16px; right: 16px; z-index: 20; }

/* ---------- Print screen ---------- */
.print-layout {
  max-width: 1500px; margin: 0 auto; display: grid; gap: 28px; align-items: start;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 48px max(20px, env(safe-area-inset-left));
}
@media (min-width: 1000px) {
  .print-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .print-preview { position: sticky; top: 20px; }
}
.variant-pick-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.variant-pick-small .variant-card { padding: 14px; }
.variant-pick-small .variant-name { font-size: 24px; }
.variant-pick-small .mini-75 { width: 70px; height: 70px; background-size: auto, 14px 14px, 14px 14px; }
.variant-pick-small .mini-90 { width: 126px; height: 42px; margin: 14px 0; }

.stepper { display: flex; align-items: stretch; gap: 10px; }
.stepper-btn { width: 72px; min-height: 72px; padding: 0; font-size: 36px; line-height: 1; }
.stepper-input {
  width: 4.5em; min-height: 72px; text-align: center; font-size: 32px; font-weight: 800;
  border: 3px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.choice-tall { display: grid; justify-items: start; gap: 2px; text-align: left; }
.choice-tall small { font-size: 18px; font-weight: 400; opacity: .9; }

.code-show-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.code-show { font-size: 44px; font-weight: 800; letter-spacing: .14em; padding: 4px 18px; border: 3px solid var(--ink); border-radius: var(--radius); background: var(--panel); }
.code-input-small { font-size: 30px; min-height: 64px; width: 6.4ch; }

.reprint { margin: 22px 0 6px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 0 18px; }
.reprint summary { min-height: 64px; display: flex; align-items: center; font-size: 22px; font-weight: 700; cursor: pointer; }
.reprint[open] { padding-bottom: 18px; }
.reprint-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.reprint .field { display: grid; gap: 6px; font-size: 19px; }
.screen-print .switch-row { margin-top: 18px; border-top: 2px solid var(--line); }
.print-summary { font-size: 23px; font-weight: 700; margin: 26px 0 0; }

.print-preview { background: var(--panel-2); border-radius: 20px; padding: 16px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.preview-head strong { font-size: 22px; }
.preview-nav { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.preview-nav .btn { min-height: 64px; width: 64px; padding: 0; font-size: 28px; }

/* ---------- 30er mini preview ---------- */
.mini-30 {
  width: 66px; height: 66px; margin: 17px 0;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 20px, var(--line) 20px 22px),
    repeating-linear-gradient(0deg, transparent 0 20px, var(--line) 20px 22px);
}
.variant-pick-small .mini-30 { width: 48px; height: 48px; margin: 11px 0; background-size: 15px 15px; }

/* ---------- Check screen ---------- */
.check-info { font-size: 21px; color: var(--muted); margin: -6px 0 18px; }
.check-inner { max-width: 1000px; }
.need-code { background: #fff4d6; color: #3a2a00; border: 2px solid #e0b340; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.need-code p { margin: 0 0 12px; font-size: 21px; }

.pad-wrap { display: grid; justify-items: center; gap: 14px; }
.pad-label { font-size: 24px; font-weight: 700; }
.pad-display {
  min-width: 4.2ch; min-height: 1.25em; text-align: center; font-size: clamp(64px, 12vw, 104px); font-weight: 800; line-height: 1.15;
  font-variant-numeric: tabular-nums; letter-spacing: .06em; border-bottom: 4px solid var(--ink); padding: 0 12px;
}
.pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(100%, 420px); }
.pad button {
  min-height: 92px; border-radius: 18px; cursor: pointer; border: 2px solid var(--line); background: var(--panel);
  font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.pad button:active { background: var(--selected); }
.pad .pad-del { font-size: 34px; }
.pad .pad-ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-size: 26px; }
.pad .pad-ok:disabled { opacity: .45; }

.check-result { display: grid; justify-items: center; gap: 12px; text-align: center; }
.result-text { font-size: clamp(32px, 5vw, 52px); font-weight: 800; margin: 0; line-height: 1.1; }
.result-text.is-win { color: var(--accent); }
.result-sub { font-size: 23px; color: var(--muted); margin: 0; }
.check-card { margin: 8px 0; }
.check-card .card-meta { text-align: center; font-size: 18px; }
.check-card .card-cell { width: min(15vw, 92px); height: min(15vw, 92px); font-size: min(6.5vw, 38px); transition: background .2s; }
.check-card .card[data-variant="90"] .card-cell { width: min(9.6vw, 76px); height: min(9.6vw, 76px); font-size: min(4.6vw, 32px); }
.check-card .card[data-variant="30"] .card-cell { width: min(24vw, 120px); height: min(24vw, 120px); font-size: min(9vw, 50px); }
.check-card .card-head span { font-size: min(6vw, 32px); }
.check-card .card-cell.is-free { font-size: min(4vw, 20px); }
.result-actions { display: grid; gap: 12px; width: min(100%, 560px); margin-top: 10px; }
.result-actions .btn { min-height: 72px; font-size: 24px; }

.sorted { display: grid; gap: 10px; margin: 18px 0 8px; }
.sorted-row { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); }
.sorted-label { flex: none; min-width: 5.5em; font-size: 22px; font-weight: 800; }
.screen-check .sorted-label:only-child { min-width: 0; }
.sorted-nums { display: flex; flex-wrap: wrap; gap: 8px; }
.sorted-nums b {
  min-width: 64px; height: 60px; padding: 0 10px; display: grid; place-items: center; border-radius: 12px;
  background: var(--drawn); color: var(--drawn-ink); font-size: 32px; font-variant-numeric: tabular-nums;
}
.sorted-nums i { font-size: 20px; color: var(--muted); }
#checkManual .result-actions { margin: 18px auto 0; }

.winners { margin-top: 28px; border-top: 2px solid var(--line); padding-top: 12px; }
.winners h2 { font-size: 24px; margin: 0 0 8px; }
.winners ol { margin: 0; padding-left: 1.4em; font-size: 21px; line-height: 1.6; }

/* ---------- Start screen: help button ---------- */
.start-head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.help-btn {
  width: 64px; height: 64px; border-radius: 50%; cursor: pointer; flex: none;
  border: 2px solid var(--line); background: var(--panel); color: var(--accent);
  font-size: 34px; font-weight: 800; line-height: 1;
}

/* ---------- Help: three steps with big pictures ---------- */
.help-inner { max-width: 1240px; }
.help-steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.help-step { position: relative; background: var(--panel); border: 2px solid var(--line); border-radius: 22px;
  padding: 78px 22px 26px; display: grid; justify-items: center; gap: 14px; text-align: center; }
.help-num { position: absolute; left: 16px; top: 16px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 30px; font-weight: 800; }
.help-pic { width: 100%; max-width: 320px; height: auto; }
.help-text { font-size: 26px; font-weight: 700; line-height: 1.3; margin: 0; }
.hp-fill { fill: var(--panel-2); }
.hp-line { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.hp-paper { fill: #fff; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.hp-grid path { fill: none; stroke: #2b2b2b; stroke-width: 3; }
.hp-accent-fill { fill: var(--accent); }
.hp-number { font: 800 58px "Atkinson Hyperlegible Next", system-ui, sans-serif; fill: var(--ink); }
.hp-word { font: 800 28px "Atkinson Hyperlegible Next", system-ui, sans-serif; fill: var(--ink); }
.hp-hand { fill: #f3d2b5; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.hp-cross { fill: none; stroke: #c0392b; stroke-width: 6; stroke-linecap: round; }
.hp-check { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Start screen: offline state and update ---------- */
.offline-row { display: grid; justify-items: center; gap: 10px; }
.offline-state { margin: 0; font-size: 18px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.offline-state.is-ready::before { content: ""; width: 18px; height: 10px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg) translateY(-3px); }
.update-btn { min-height: 64px; font-size: 22px; padding: 8px 26px; border-color: var(--accent); }

/* ---------- Help: tips ---------- */
.help-tips { margin: 28px 0 0; padding-left: 1.2em; font-size: 21px; line-height: 1.45; color: var(--ink); max-width: 900px; }
.help-tips li { margin-bottom: 8px; }
