:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --text: #121826;
  --muted: #4b5565;
  --border: #dfe3ec;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #d5f5ef;
  --on-accent: #ffffff;
  --spin: #ea580c;
  --spin-strong: #c2410c;
  --ok: #157f3b;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(18, 24, 38, .05), 0 8px 24px rgba(18, 24, 38, .07);
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --surface: #121a2e;
    --surface-2: #1a2440;
    --text: #e8ecf5;
    --muted: #a3adc2;
    --border: #26324f;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: #10302e;
    --on-accent: #06201d;
    --spin: #f97316;
    --spin-strong: #fb923c;
    --ok: #4ade80;
    --danger: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #121a2e;
  --surface-2: #1a2440;
  --text: #e8ecf5;
  --muted: #a3adc2;
  --border: #26324f;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-soft: #10302e;
  --on-accent: #06201d;
  --spin: #f97316;
  --spin-strong: #fb923c;
  --ok: #4ade80;
  --danger: #f87171;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); overflow-x: hidden; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; clip: auto; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-links { display: none; gap: 2px; }
.nav-links a { padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .95rem; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--surface-2); }
.menu, .langs { position: relative; }
.menu > summary, .langs > summary { list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: .92rem; display: flex; align-items: center; gap: 6px; min-height: 40px; }
.menu > summary::-webkit-details-marker, .langs > summary::-webkit-details-marker { display: none; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; min-width: 220px; display: grid; z-index: 30; max-height: 70vh; overflow: auto; }
.dropdown a { padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.dropdown a:hover, .dropdown a[aria-current="page"] { background: var(--surface-2); }
@media (min-width: 1180px) {
  .nav-links { display: flex; }
}
/* Very small phones (320 px): the menu keeps its icon and its name stays readable by screen readers. */
@media (max-width: 359.98px) {
  .site-header .wrap { gap: 8px; }
  .menu > summary, .langs > summary { padding: 8px 10px; }
  .menu > summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Hero */
main { padding-bottom: 40px; }
.hero { padding: 22px 0 4px; max-width: 780px; }
.hero h1 { font-size: clamp(1.55rem, 4.2vw, 2.25rem); line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 14px 0 -8px; }
.crumbs a { color: var(--muted); }

/* Tool layout */
.tool { margin-top: 18px; }
.wheel-layout { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) {
  .wheel-layout { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 26px; }
}
.stage { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.wheel-title { margin: 0; font-weight: 800; font-size: clamp(1.15rem, 3vw, 1.5rem); text-align: center; overflow-wrap: anywhere; }
.wheel-box { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / 1; }
.wheel-box::before { content: ""; position: absolute; inset: 4%; border-radius: 50%; box-shadow: 0 14px 40px rgba(18, 24, 38, .22), 0 2px 6px rgba(18, 24, 38, .12); }
.wheel-placeholder { position: absolute; inset: 4%; border-radius: 50%; }
.wheel-box.is-ready .wheel-placeholder { display: none; }
.wheel { position: absolute; inset: 0; width: 100%; height: 100%; }
.wheel-hit { position: absolute; inset: 4%; border-radius: 50%; border: 0; background: transparent; cursor: pointer; }
.wheel-hit:focus-visible { outline-offset: -6px; }
.is-spinning .wheel-hit { cursor: progress; }
.wheel-note { margin: 0; color: var(--muted); font-weight: 600; text-align: center; }
.spin-btn { min-width: 220px; min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--spin); color: #fff; font-size: 1.15rem; font-weight: 800; letter-spacing: .02em; cursor: pointer; box-shadow: 0 6px 18px rgba(234, 88, 12, .35); transition: transform .08s, background .15s; }
.spin-btn:hover { background: var(--spin-strong); }
.spin-btn:active { transform: scale(.98); }
.is-spinning .spin-btn { opacity: .65; cursor: progress; }
.stage-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hint { margin: 6px 2px 0; font-size: .85rem; color: var(--muted); }
.center { text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 11px; padding: 0 14px; cursor: pointer; font-size: .92rem; min-height: 42px; text-decoration: none; color: var(--text); }
.btn:hover { border-color: var(--accent); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-quiet { background: transparent; }
.is-spinning [data-list], .is-spinning .toolbar .btn { pointer-events: none; opacity: .55; }
.shared-bar { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: .92rem; }

/* Full screen */
.stage:fullscreen { background: var(--bg); justify-content: center; padding: 20px; }
.stage:fullscreen .wheel-box, .stage.is-full .wheel-box { max-width: min(88vh, 92vw); }
.stage.is-full { position: fixed; inset: 0; z-index: 70; background: var(--bg); justify-content: center; padding: 16px; overflow: auto; }
.has-full { overflow: hidden; }

/* Panel */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; min-width: 0; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 12px; }
.tabs [role="tab"] { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; border-radius: 9px; min-height: 40px; cursor: pointer; font-weight: 650; font-size: .92rem; line-height: 1.15; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 8px; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .tabs [role="tab"] { font-size: .84rem; gap: 4px; padding: 4px 5px; }
  .tabs .badge { min-width: 18px; padding: 0 4px; }
}
.tabs [role="tab"][aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.badge { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 800; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.field-label { display: flex; justify-content: space-between; gap: 8px; font-weight: 650; font-size: .9rem; margin: 12px 0 6px; }
.field-label:first-child { margin-top: 0; }
textarea, input[type="text"], input[type="number"], input:not([type]) { width: 100%; border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; background: var(--bg); color: var(--text); }
textarea { min-height: 220px; resize: vertical; font-size: 1rem; line-height: 1.5; }
textarea:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea[readonly] { opacity: .7; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.toolbar .btn { min-height: 38px; padding: 0 11px; font-size: .86rem; }
.box { border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; background: var(--bg); }
.box > summary { cursor: pointer; padding: 11px 14px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; }
.box > summary::-webkit-details-marker { display: none; }
.box > summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.box[open] > summary::after { content: "–"; }
.box-body { padding: 0 14px 14px; }
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; cursor: pointer; font-size: .95rem; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
fieldset { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
legend { font-weight: 650; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.palette { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 9px; cursor: pointer; font-size: .86rem; background: var(--surface); }
.palette input { position: absolute; opacity: 0; }
.palette:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.palette:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.swatch { display: inline-flex; flex: none; }
.swatch i { width: 11px; height: 18px; display: block; }
.swatch i:first-child { border-radius: 4px 0 0 4px; }
.swatch i:last-child { border-radius: 0 4px 4px 0; }
.weight-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 58px; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--border); }
.weight-row:last-child { border-bottom: 0; }
.weight-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weight-row input { padding: 6px 8px; }
.weight-chance { font-size: .82rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
[data-weight-list] { max-height: 320px; overflow: auto; }
.results { margin: 0; padding: 0 0 0 26px; max-height: 360px; overflow: auto; }
.results li { padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; }
.result-text { overflow-wrap: anywhere; }
.result-time { color: var(--muted); font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.removed { margin-top: 16px; }
.removed h3 { font-size: .95rem; margin: 0 0 6px; }
.removed ul { margin: 0 0 8px; padding-left: 18px; color: var(--muted); max-height: 180px; overflow: auto; }
.saved { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.saved-row { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.saved-info { flex: 1; min-width: 0; display: grid; }
.saved-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-info .hint { margin: 0; }
.num-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.num-fields label { font-weight: 650; font-size: .88rem; display: grid; gap: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { border: 1px solid var(--border); background: var(--bg); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: .9rem; min-height: 36px; }
.chip:hover { border-color: var(--accent); }
.letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.letter-grid button { min-height: 40px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); font-weight: 750; cursor: pointer; color: var(--muted); text-decoration: line-through; }
.letter-grid button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); text-decoration: none; }

/* Teams */
.teams-layout { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .teams-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 26px; } }
.teams-layout .spin-btn { width: 100%; margin-top: 16px; }
.teams-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.team { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); border-top: 5px solid var(--accent); }
.team:nth-child(6n+2) { border-top-color: #f97316; }
.team:nth-child(6n+3) { border-top-color: #8b5cf6; }
.team:nth-child(6n+4) { border-top-color: #3b82f6; }
.team:nth-child(6n+5) { border-top-color: #ec4899; }
.team:nth-child(6n+6) { border-top-color: #eab308; }
.team h3 { margin: 0 0 6px; font-size: 1rem; }
.team ul { margin: 0; padding-left: 18px; }
.team li { overflow-wrap: anywhere; }

/* Winner dialog */
.win { border: 0; border-radius: 22px; padding: 26px 22px 20px; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); text-align: center; }
.win::backdrop { background: rgba(8, 12, 24, .55); backdrop-filter: blur(2px); }
.win[open]:not(:modal) { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 80; }
.win-label { margin: 0; color: var(--muted); font-weight: 650; }
.win-text { margin: 6px 0 4px; font-size: clamp(1.6rem, 7vw, 2.6rem); font-weight: 850; line-height: 1.15; overflow-wrap: anywhere; letter-spacing: -.01em; }
.win-extra { margin: 12px 0 0; font-size: 1.1rem; background: var(--surface-2); border-radius: 14px; padding: 14px; text-align: left; }
.win-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.win-actions .btn { min-width: 110px; }

/* Content */
.content { margin-top: 34px; max-width: 780px; }
.content h2 { font-size: 1.3rem; line-height: 1.3; margin: 28px 0 10px; letter-spacing: -.01em; }
.content p { margin: 0 0 12px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 50px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.steps li::before { content: counter(step); position: absolute; left: 12px; top: 11px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.entry-list { columns: 2 180px; column-gap: 24px; padding-left: 18px; margin: 0; }
.entry-list li { break-inside: avoid; padding: 2px 0; }
.more-entries > summary { cursor: pointer; color: var(--accent); font-weight: 650; margin-bottom: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 13px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 13px; color: var(--muted); }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; }
.related a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; height: 100%; }
.related a:hover { border-color: var(--accent); }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin-top: 18px; }
.to-top { display: inline-block; margin-top: 24px; font-size: .9rem; }

/* Gallery */
.gallery-group { margin-top: 26px; }
.gallery-group h2 { font-size: 1.15rem; margin: 0 0 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.card { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text); height: 100%; box-shadow: var(--shadow); }
.card:hover { border-color: var(--accent); }
.card-wheel { width: 52px; height: 52px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); }
.card-body { min-width: 0; display: grid; }
.card-body strong { font-size: 1rem; }
.card-body span { font-size: .84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Static pages */
.prose { max-width: 700px; overflow-wrap: anywhere; }
.prose h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 26px 0 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 0 40px; background: var(--surface); font-size: .92rem; }
.foot-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.2fr 1.3fr 1.6fr 1fr 1fr; } }
.foot-grid h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-wheels ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.foot-grid a { color: var(--text); text-decoration: none; }
.foot-grid a:hover { color: var(--accent); text-decoration: underline; }
.foot-brand p { color: var(--muted); margin: 8px 0 0; }
.foot-brand .foot-sisters-title { margin-top: 18px; }
.foot-sisters li { display: grid; gap: 0; }
.foot-sisters a { font-weight: 700; }
.foot-sisters span { color: var(--muted); font-size: .86rem; }
.copyright { color: var(--muted); margin-top: 22px; font-size: .85rem; }

/* ---------- Shared bits of the tools without a wheel ---------- */
select { width: 100%; min-height: 42px; border: 1px solid var(--border); border-radius: 11px; padding: 8px 10px; background: var(--bg); color: var(--text); }
input[type="date"] { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 11px; padding: 8px 12px; background: var(--bg); color: var(--text); }
select:focus, input[type="date"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.short { min-height: 0; }
.spin-btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.spin-btn.is-busy { opacity: .75; cursor: progress; }
.spin-btn svg { width: 20px; height: 20px; vertical-align: -3px; margin-right: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field-error { color: var(--danger); font-weight: 650; margin: 10px 0 0; }
.notice { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin: 10px 0 0; }
.num-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tints { display: flex; flex-wrap: wrap; gap: 10px; }
.tint { position: relative; display: block; cursor: pointer; }
.tint input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tint > span:first-of-type { display: block; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.tint input:checked + span { outline: 3px solid var(--text); outline-offset: 2px; }
.tint input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }
.card-icon { display: grid; place-items: center; color: #fff; box-shadow: none; }
.card-icon svg { width: 28px; height: 28px; }
.card-icon + .card-body span { white-space: normal; }

/* ---------- Bingo caller ---------- */
.bingo { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .bingo { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 26px; } }
.bingo-main { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-width: 0; }
.ball { --ball: var(--spin); width: min(58vw, 220px); aspect-ratio: 1 / 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--ball) 45%, #fff) 0, var(--ball) 42%, color-mix(in srgb, var(--ball) 72%, #000) 100%); box-shadow: 0 16px 34px rgba(18, 24, 38, .28); }
.ball.is-empty { --ball: #94a3b8; }
.ball[data-letter="B"] { --ball: #2563eb; }
.ball[data-letter="I"] { --ball: #dc2626; }
.ball[data-letter="N"] { --ball: #6b7280; }
.ball[data-letter="G"] { --ball: #16a34a; }
.ball[data-letter="O"] { --ball: #d97706; }
.ball-face { width: 64%; aspect-ratio: 1 / 1; border-radius: 50%; background: #fff; color: #111827; display: grid; place-items: center; align-content: center; box-shadow: inset 0 3px 8px rgba(0, 0, 0, .16); }
.ball-letter { font-weight: 850; font-size: clamp(1rem, 4.4vw, 1.5rem); line-height: 1; margin-bottom: 2px; }
.ball-letter:empty { display: none; }
.ball-num { font-weight: 900; font-size: clamp(2.6rem, 14vw, 4.7rem); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.ball.pop { animation: pop .38s ease-out; }
@keyframes pop { 0% { transform: scale(.82); } 60% { transform: scale(1.07); } 100% { transform: scale(1); } }
.ball-meaning { margin: 0; font-size: clamp(1.05rem, 3.6vw, 1.3rem); font-weight: 750; font-style: italic; overflow-wrap: anywhere; }
.auto-bar { width: min(58vw, 220px); height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.auto-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(0); }
.bingo-count { margin: 0; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
.last-wrap { width: 100%; }
.last-label { margin: 4px 0 8px; font-size: .85rem; color: var(--muted); font-weight: 650; }
.last-balls { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; min-height: 48px; }
.mini-ball { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: var(--surface); border: 4px solid var(--spin); font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; }
.mini-ball small { font-size: .62rem; font-weight: 850; }
.mini-ball[data-letter="B"] { border-color: #2563eb; }
.mini-ball[data-letter="I"] { border-color: #dc2626; }
.mini-ball[data-letter="N"] { border-color: #6b7280; }
.mini-ball[data-letter="G"] { border-color: #16a34a; }
.mini-ball[data-letter="O"] { border-color: #d97706; }
.bingo-side { min-width: 0; }
.board-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 10px; }
.board { display: grid; gap: 8px; user-select: none; -webkit-user-select: none; }
.board-90 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tblock { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.cell { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 7px; background: var(--surface); color: var(--muted); font-weight: 700; font-size: clamp(.78rem, 2.6vw, 1rem); font-variant-numeric: tabular-nums; transition: background .2s, color .2s; }
.cell.is-on { background: var(--accent); color: var(--on-accent); }
.cell.is-last { background: var(--spin); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--spin) 35%, transparent); }
.board-75 { grid-template-columns: auto repeat(15, minmax(0, 1fr)); gap: 3px; }
.b-letter { display: grid; place-items: center; border-radius: 7px; color: #fff; font-weight: 900; padding: 0 7px; min-height: 30px; }
.b-B { background: #2563eb; } .b-I { background: #dc2626; } .b-N { background: #6b7280; } .b-G { background: #16a34a; } .b-O { background: #d97706; }
@media (max-width: 640px) {
  .board-75 { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(16, auto); grid-auto-flow: column; }
  .board-75 .cell { aspect-ratio: auto; min-height: 28px; }
}
.check-form { display: flex; gap: 8px; }
.check-form input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.check-out .bcard { margin-top: 12px; }
.check-out .cn.is-on { background: #0f766e; color: #fff; }
.check-line { margin: 8px 0 0; }
.check-big { margin: 10px 0 0; font-weight: 850; font-size: 1.1rem; color: var(--ok); }
.bingo:fullscreen, .bingo.is-full { background: var(--bg); padding: 24px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; align-content: center; overflow: auto; }
.bingo.is-full { position: fixed; inset: 0; z-index: 70; }
.bingo:fullscreen .box, .bingo.is-full .box, .bingo:fullscreen .bingo-side > .hint, .bingo.is-full .bingo-side > .hint,
.bingo:fullscreen [data-action="undo"], .bingo.is-full [data-action="undo"], .bingo:fullscreen [data-action="new-game"], .bingo.is-full [data-action="new-game"] { display: none; }
.bingo:fullscreen .ball, .bingo.is-full .ball { width: min(30vw, 44vh); }
.bingo:fullscreen .ball-num, .bingo.is-full .ball-num { font-size: min(9vw, 13vh); }
.bingo:fullscreen .cell, .bingo.is-full .cell { font-size: clamp(.9rem, 1.8vw, 1.9rem); }
@media (max-width: 899px) { .bingo.is-full { grid-template-columns: 1fr; align-content: start; } }

/* ---------- Bingo cards: paper-white in every theme ---------- */
.bcard { --tint: #dc2626; background: #fff; color: #111827; border: 2px solid var(--tint); border-radius: 12px; overflow: hidden; break-inside: avoid; page-break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bcard-head { display: flex; align-items: center; gap: 8px; background: var(--tint); color: #fff; padding: 5px 6px 5px 10px; font-size: .84rem; min-height: 30px; }
.bcard-head strong { flex: 1; min-width: 0; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-head span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bcard-send { border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .16); color: #fff; border-radius: 7px; font-size: .78rem; font-weight: 700; padding: 2px 8px; cursor: pointer; min-height: 26px; }
.bcard-send:hover { background: rgba(255, 255, 255, .3); }
.bcard { container-type: inline-size; }
@container (max-width: 430px) {
  .bcard-head { flex-wrap: wrap; row-gap: 2px; }
  .bcard-head strong { flex-basis: 100%; text-align: center; font-size: .95rem; }
  .bcard-head span { flex: 1; font-size: .78rem; }
}
.bcard-grid { display: grid; }
.c90 .bcard-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.c75 .bcard-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bcard-grid > * { display: grid; place-items: center; border: 0; border-right: 1px solid #d4d8e0; border-bottom: 1px solid #d4d8e0; font-weight: 800; font-variant-numeric: tabular-nums; color: #111827; background: #fff; padding: 0; margin: 0; font-family: inherit; min-width: 0; }
.c90 .bcard-grid > * { aspect-ratio: 1 / 1.05; font-size: clamp(.92rem, 3.4vw, 1.35rem); }
.c90 .bcard-grid > :nth-child(9n) { border-right: 0; }
.c90 .bcard-grid > :nth-last-child(-n+9) { border-bottom: 0; }
.c75 .bcard-grid > * { aspect-ratio: 1 / 1; font-size: clamp(1rem, 4.4vw, 1.55rem); }
.c75 .bcard-grid > :nth-child(5n) { border-right: 0; }
.c75 .bcard-grid > :nth-last-child(-n+5) { border-bottom: 0; }
.bcard .ce { background: color-mix(in srgb, var(--tint) 9%, #fff); }
.bcard .cl { background: color-mix(in srgb, var(--tint) 14%, #fff); color: var(--tint); font-weight: 900; aspect-ratio: auto; padding: 4px 0; }
.bcard .cf { color: var(--tint); font-size: .7rem; font-weight: 900; letter-spacing: .03em; background: color-mix(in srgb, var(--tint) 9%, #fff); }
button.cn { cursor: pointer; touch-action: manipulation; }
button.cn[aria-pressed="true"] { background: radial-gradient(circle, color-mix(in srgb, var(--tint) 78%, transparent) 0 56%, #fff 58%); color: #fff; }
.cards-tool { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .cards-tool { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 26px; } }
.cards-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.cards-actions .spin-btn { min-width: 0; flex: 1 1 160px; }
.play-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.play-box h2 { font-size: 1rem; margin: 0 0 6px; }
.play-box p { margin: 0; font-size: .92rem; color: var(--muted); }
.sheet-wrap { min-width: 0; }
.sheet-status { margin: 0 0 10px; font-weight: 650; color: var(--muted); }
.sheet { display: grid; gap: 18px; }
.sheet-page { display: grid; gap: 10px; }
.sheet-75 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (min-width: 1000px) { .sheet-90 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sheet-page + .sheet-page { border-top: 2px dashed var(--border); padding-top: 18px; }
.play { grid-column: 1 / -1; max-width: 560px; width: 100%; margin: 0 auto; }
.play-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.2rem; margin: 0 0 12px; }
.play-actions { justify-content: center; }

/* ---------- Secret Santa ---------- */
.santa-layout { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .santa-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; } }
.santa .spin-btn { width: 100%; margin-top: 16px; }
.ex-add { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.ex-add .btn { grid-column: 1 / -1; }
@media (min-width: 520px) { .ex-add { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; } .ex-add .btn { grid-column: auto; } }
.ex-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.ex-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px 3px 3px 12px; overflow-wrap: anywhere; }
.ex-item.is-stale span { text-decoration: line-through; color: var(--muted); }
.ex-remove { flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; font-size: 1.3rem; cursor: pointer; }
.ex-remove:hover { background: var(--surface-2); }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 380px) { .two-fields { grid-template-columns: 1fr; } }
.out-title { font-size: 1.1rem; margin: 0; }
.out-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px 8px; color: var(--muted); }
.out-empty svg { width: 54px; height: 54px; color: #16a34a; }
.out-empty p { margin: 0; max-width: 34ch; }
.tool, .play, .santa-out { scroll-margin-top: 76px; }
.links { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.link-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 8px 8px 12px; }
.link-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1 1 auto; }
.link-name { min-width: 0; font-weight: 750; overflow-wrap: anywhere; }
.link-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.link-sent { display: none; color: var(--ok); font-size: .82rem; font-weight: 750; }
.link-row.is-sent { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.link-row.is-sent .link-sent { display: inline; }
.link-row .btn { min-height: 38px; padding: 0 11px; font-size: .86rem; }
.btn-wa { background: #25d366; border-color: #25d366; color: #052e16; font-weight: 750; }
.btn-wa:hover { background: #1ebe5b; border-color: #1ebe5b; }
.btn.is-armed, .spin-btn.is-armed { background: var(--danger); border-color: var(--danger); color: #fff; }
.spoil summary { font-size: .92rem; }
.pairs { margin: 0; padding-left: 22px; }
.pairs li { padding: 3px 0; overflow-wrap: anywhere; }
.reveal { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 28px 20px 24px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.reveal-event { margin: 0; color: var(--muted); font-size: .82rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.reveal-hi { margin: 0; font-size: clamp(1.6rem, 6vw, 2.3rem); line-height: 1.15; overflow-wrap: anywhere; }
.reveal-prompt { margin: 0; color: var(--muted); }
.reveal-bad { margin: 0; font-weight: 650; }
.gift { position: relative; width: 150px; height: 150px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.gift:disabled { cursor: default; }
.gift-box { position: absolute; left: 14%; right: 14%; bottom: 0; height: 58%; border-radius: 8px; background: linear-gradient(90deg, transparent 43%, #facc15 43% 57%, transparent 57%), #dc2626; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .12); }
.gift-lid { position: absolute; left: 8%; right: 8%; top: 28%; height: 17%; border-radius: 6px; z-index: 1; background: linear-gradient(90deg, transparent 43%, #facc15 43% 57%, transparent 57%), #ef4444; transition: transform .55s cubic-bezier(.3, 1.5, .5, 1); }
.gift-lid::before, .gift-lid::after { content: ""; position: absolute; bottom: 100%; width: 26%; height: 120%; border: 7px solid #facc15; border-radius: 50% 50% 10% 50%; }
.gift-lid::before { right: 50%; transform: rotate(-12deg); transform-origin: bottom right; }
.gift-lid::after { left: 50%; border-radius: 50% 50% 50% 10%; transform: rotate(12deg); transform-origin: bottom left; }
.gift:not(.is-open) { animation: wiggle 1.8s ease-in-out infinite; }
.gift.is-open .gift-lid { transform: translate(18px, -54px) rotate(24deg); }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-5deg); } 86% { transform: rotate(5deg); } 94% { transform: rotate(-2deg); } }
.reveal-result { display: grid; gap: 10px; justify-items: center; width: 100%; }
.reveal-label { margin: 0; font-weight: 700; color: var(--muted); }
.reveal-name { margin: 0; font-size: clamp(2.1rem, 10vw, 3.3rem); font-weight: 900; line-height: 1.1; color: var(--spin); overflow-wrap: anywhere; }
.reveal-details { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.reveal-details li { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; }
.reveal-message { font-style: italic; }
.reveal-secret { margin: 0; font-weight: 750; }

/* ---------- Visual timer ---------- */
.timer-layout { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .timer-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; } }
.timer-stage { --tint: #dc2626; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.timer-label { margin: 0; font-weight: 850; font-size: clamp(1.25rem, 4vw, 1.9rem); text-align: center; overflow-wrap: anywhere; }
.dial-wrap { width: 100%; max-width: 520px; }
.dial { display: block; width: 100%; height: auto; }
.dial-face { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.dial-track { fill: var(--surface-2); }
.dial-fill { fill: var(--tint); }
.ticks line { stroke: var(--muted); stroke-width: 1; stroke-linecap: round; }
.ticks line.major { stroke: var(--text); stroke-width: 2; }
.ticks text { fill: var(--muted); font: 700 9px var(--font); text-anchor: middle; dominant-baseline: central; }
.dial .ticks-60 { display: none; }
.dial.dial-60 .ticks-60 { display: inline; }
.dial.dial-60 .ticks-whole { display: none; }
.dial-hub { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; }
.dial-time { fill: var(--text); font: 850 21px var(--font); font-variant-numeric: tabular-nums; text-anchor: middle; dominant-baseline: central; }
.dial-time.long { font-size: 14px; }
.dial.no-digits .dial-time, .dial.no-digits .dial-hub { display: none; }
.timer-up { margin: 0; font-size: clamp(1.7rem, 6vw, 2.7rem); font-weight: 900; color: var(--tint); text-align: center; }
.is-done .dial-face { animation: flash 1s ease-in-out 3; }
@keyframes flash { 50% { fill: color-mix(in srgb, var(--tint) 28%, var(--surface)); } }
.timer-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.timer-controls .spin-btn { min-width: 160px; }
.timer-stage:fullscreen, .timer-stage.is-full { background: var(--bg); justify-content: center; padding: 20px; }
.timer-stage.is-full { position: fixed; inset: 0; z-index: 70; overflow: auto; }
.timer-stage:fullscreen .dial-wrap, .timer-stage.is-full .dial-wrap { max-width: min(76vh, 92vw); }

/* Toast, language bar, confetti */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); width: max-content; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.has-action.is-on { pointer-events: auto; }
.toast-action { border: 0; background: transparent; color: var(--accent-soft); font-weight: 800; text-decoration: underline; cursor: pointer; padding: 4px; }
.lang-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 44px 8px 16px; background: var(--accent-soft); color: var(--text); font-size: .9rem; position: relative; flex-wrap: wrap; }
.lang-bar-go { font-weight: 700; }
.lang-bar-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; width: 36px; height: 36px; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 85; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Printing bingo cards ----------
   A strip of six 90-ball cards fits one page and 75-ball cards print four to a page,
   on A4 and on US Letter (usable height about 259 mm with 10 mm margins). */
@media print {
  @page { margin: 10mm; }
  .print-cards, .print-cards body { background: #fff !important; color: #000; }
  .print-cards body > :not(main) { display: none !important; }
  .print-cards main { padding: 0 !important; }
  .print-cards main .wrap { max-width: none; padding: 0; }
  .print-cards :is(.crumbs, .hero, .content, .cards-panel, .sheet-status, .bcard-send, .play-actions, .play .hint) { display: none !important; }
  .print-cards .tool { margin: 0; }
  .print-cards .cards-tool, .print-cards .sheet { display: block; }
  .print-cards .sheet-page { display: grid; gap: 3mm; border: 0; padding: 0; break-after: page; page-break-after: always; }
  .print-cards .sheet-page:last-child { break-after: auto; page-break-after: auto; }
  .print-cards .sheet-90 { grid-template-columns: 1fr; }
  .print-cards .sheet-75 { grid-template-columns: 1fr 1fr; gap: 6mm; }
  .print-cards .bcard { border-radius: 3mm; }
  .print-cards .bcard-head { font-size: 8.5pt; line-height: 1.3; min-height: 0; padding: 1.2mm 3mm; }
  .print-cards .c90 .bcard-grid > * { aspect-ratio: auto; height: 10mm; font-size: 17pt; }
  .print-cards .c75 .bcard-grid > * { aspect-ratio: auto; height: 17mm; font-size: 21pt; }
  .print-cards .c75 .bcard-grid > .cl { height: 9mm; font-size: 14pt; }
  .print-cards .c75 .bcard-grid > .cf { font-size: 8pt; }
}

/* Embed code dialog, and the page as it looks inside another site (?embed) */
.embed-credit { display: none; }
.embed-dialog { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: var(--radius); padding: 20px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.embed-dialog::backdrop { background: rgba(10, 14, 25, .55); }
.embed-dialog h2 { margin: 0 0 6px; font-size: 1.2rem; }
.embed-dialog textarea { width: 100%; box-sizing: border-box; margin: 6px 0 12px; padding: 10px; font: .8rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; resize: vertical; }
html.embed .site-header, html.embed .site-footer, html.embed .hero, html.embed .content, html.embed .panel,
html.embed .shared-bar, html.embed .stage-actions, html.embed .lang-bar, html.embed .skip { display: none !important; }
html.embed main { padding: 8px 0 0; }
html.embed .wheel-layout { display: block; }
html.embed .wheel-box { max-width: min(560px, calc(100vh - 170px)); }
html.embed .embed-credit { display: block; margin: 0; font-size: .85rem; }
