/*
 * SpinForge: the tool's own components, styled in the site's design language (9 Nov 2026, on the UltraCompress Pro template,
 * after EngCalc, whose shared block the first part of this file copies).
 * Base: /libs/site-pages.css (tokens, Inter and Space Grotesk, buttons, theme toggle, focus rings) and /libs/shared-nav.css
 * (the site's header and footer). The second part is the original's components (the wheel's stage and the panel beside it,
 * the entry list, switches and steppers, results, the wheel cards, the winner's pop-up, the menu and the small windows) on
 * the site's tokens, each part a card. Light is the default; dark applies when <html> has no data-theme.
 * Assembled once from EngCalc's file and the original's style.css, then edited by hand: this file is the source.
 */

/* ----- Tokens the tool adds ----- */
:root {
    --surface: #ffffff;
    --surface-2: #f3f4f8;
    --ring: rgba(139, 92, 246, 0.18);
    --app-max: 1600px;
    --radius-lg: 16px;
    --line: rgba(0, 0, 0, 0.1);
    --line-strong: rgba(0, 0, 0, 0.24);
    --ok: #166534;
    --ok-soft: rgba(22, 101, 52, 0.09);
    --bad: #b91c1c;
    --bad-soft: rgba(185, 28, 28, 0.08);
    --warn: #92400e;
    --warn-soft: rgba(217, 119, 6, 0.1);
    --stage: #f3f4f8;
}
:root:not([data-theme="light"]) {
    --surface: #14141f;
    --surface-2: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.26);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.1);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.1);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.1);
    --stage: #1c1c2b;
}

/* ----- Page: full width, the page provides the side space ----- */
.container.app-container { max-width: calc(var(--app-max) + 2 * var(--content-gutter)); margin-top: 16px; }
@media (min-width: 640px) { .container.app-container { margin-top: 24px; } }

/* ----- The site header is the first thing on the page and stays at the top ----- */
body { padding-top: 0; }
body > header { position: sticky; top: 0; z-index: 50; }
header .site-nav { position: relative; top: auto; }
.theme-toggle { top: 90px; }
@media (max-width: 639.98px) { .theme-toggle { top: 75px; } } /* the header is 81 px tall from 640 px, 65 px below */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ----- Hero ----- */
.app-hero { margin: 0 0 2rem; text-align: center; }
.app-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--text-strong); }
.app-brand img { width: 44px; height: 44px; border-radius: 12px; display: block; }
.app-hero h1 { margin-bottom: 0.75rem; }
.app-tagline { color: var(--text-2); font-size: 1.125rem; line-height: 1.6; max-width: 46rem; margin: 0 auto; }

/* ----- Small helpers ----- */
main [hidden], .dialog [hidden] { display: none !important; } /* the script hides fields that carry their own display */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }
.block { display: block; }
.hint { color: var(--text-3); font-size: 0.8rem; font-weight: 400; line-height: 1.45; }
.err { color: var(--bad); font-size: 0.85rem; font-weight: 600; }
.err:empty { display: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link:hover { color: var(--link-hover); }
code { font-size: 0.85em; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); color: var(--code-text); }
kbd { font-family: inherit; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--chip-border); background: var(--chip); color: var(--text-strong); }

/* ----- Buttons ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9999px; font-family: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1.2; padding: 12px 24px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .ico { width: 17px; height: 17px; }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text-strong); border: 1px solid var(--surface-border); padding: 11px 23px; }
.btn-secondary:hover:not(:disabled) { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.btn-danger { background: var(--surface); color: var(--danger); border: 1px solid rgba(185, 28, 28, 0.35); padding: 11px 23px; }
.btn-danger:hover:not(:disabled) { background: var(--danger-strong); color: #fff; border-color: transparent; transform: translateY(-2px); }
.btn-sm { font-size: 0.85rem; padding: 9px 16px; }
.btn-secondary.btn-sm, .btn-danger.btn-sm { padding: 8px 15px; }
.btn-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex-shrink: 0; padding: 0; font-family: inherit; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.icon-btn:hover { border-color: var(--brand); color: var(--link); background: var(--surface); }
.icon-btn.del:hover { border-color: var(--danger); color: var(--danger); }
.icon-btn:focus-visible, .link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Toolbar ----- */
.app-shell { margin: 0 0 3rem; scroll-margin-top: 90px; }
.app-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 1.25rem; }
.toolbar-left, .toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 10px; border-radius: 9999px; border: 1px solid var(--tint-brand-border); background: var(--tint-brand); min-width: 220px; max-width: 100%; }
.status-icon { font-size: 1.3rem; line-height: 1; }
.status-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.status-main { font-weight: 700; font-size: 0.85rem; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-sub { font-size: 0.72rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--surface-2); max-width: 100%; }
.view-tab { padding: 8px 16px; border: 0; border-radius: 9999px; background: transparent; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.view-tab:hover { color: var(--link); }
.view-tab.active { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.view-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.view[hidden] { display: none; }
.shell-hint { margin-top: 14px; }

/* ----- Cards ----- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.card-grid:empty { display: none; }
.card--wide { grid-column: span 2; }
.card--full { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); box-shadow: var(--surface-shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0; margin-bottom: 0; }
.view > .card { margin-bottom: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--surface-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { margin: 0; font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-note { font-size: 0.8125rem; color: var(--text-3); }
.card-body { padding: 16px 20px 20px; flex: 1; min-width: 0; }
.card-body > * + * { margin-top: 16px; }
.form-hint { font-size: 0.8rem; color: var(--text-3); margin: 10px 0 0; line-height: 1.5; }

/* ----- Fields ----- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.label { font-weight: 600; font-size: 0.85rem; color: var(--text-strong); }
.input, .select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px; background: var(--field); border: 1px solid var(--field-border); border-radius: 12px; font-family: inherit; font-size: 0.95rem; color: var(--text); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input::placeholder { color: var(--placeholder); }
.input[aria-invalid="true"] { border-color: var(--bad); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.5; }
input[type="time"].input { color-scheme: light; width: 9em; }
:root:not([data-theme="light"]) input[type="time"].input { color-scheme: dark; }
.select { width: auto; max-width: 100%; appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; cursor: pointer; }
.select option { color: #0a0a14; background: #fff; }
.num-input { width: 7.5em; }
.num-input.wide { width: 10em; }
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 0.925rem; color: var(--text); padding: 4px 0; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--surface); font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.seg button:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.seg button[aria-checked="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--chip); font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.chip .ico { width: 15px; height: 15px; color: var(--link); }
.chip:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Windows ----- */
.dialog { margin: auto; border: 1px solid var(--surface-border); border-radius: 20px; padding: 0; width: min(520px, calc(100vw - 16px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.dialog--narrow { width: min(420px, calc(100vw - 16px)); }
.dialog--wide { width: min(680px, calc(100vw - 16px)); }
.dialog::backdrop { background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop 0.2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.dialog-head { padding: 18px 20px; border-bottom: 1px solid var(--surface-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-title { margin: 0; font-size: 1.15rem; }
.dialog-close { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--chip-border); background: var(--chip); color: var(--text-strong); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: border-color 0.2s ease, color 0.2s ease; }
.dialog-close:hover { border-color: var(--brand); color: var(--link); }
.dialog-body { padding: 20px; overflow-y: auto; max-height: calc(100vh - 210px); display: flex; flex-direction: column; gap: 14px; }
.dialog-actions { padding: 14px 20px; border-top: 1px solid var(--surface-border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.confirm-message { margin: 0; color: var(--text); }
.help-body h3 { margin: 6px 0 0; font-size: 1rem; }
.help-body p { margin: 0; color: var(--text-2); }

/* ----- Toasts ----- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; background: #0a0a14; color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); border-left: 4px solid var(--brand); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); min-width: 260px; max-width: 420px; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; animation: slideIn 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease; }
.toast button { background: none; border: 0; padding: 0; color: #c4b5fd; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.toast.leaving { opacity: 0; transform: translateX(40px); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast.good { border-left-color: #4ade80; }
.toast.bad { border-left-color: #f87171; }

/* ----- Information sections ----- */
.info-section { margin: 0 0 2.5rem; }
.info-section h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
.info-section .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1rem 0 1.5rem; }
.info-stack { display: grid; gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 16px; box-shadow: var(--surface-shadow); padding: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.info-card--small { padding: 16px; box-shadow: none; }
.info-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.info-card p { color: var(--text-2); margin-bottom: 0.75rem; }
.info-card p:last-child { margin-bottom: 0; }
.step-card { position: relative; padding-top: 24px; }
.step-num { position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0.75rem; }
.step-head h3 { margin: 0; }
.step-emoji { font-size: 1.6rem; line-height: 1; }
.info-section details.info-card { padding: 0; }
.info-section details.info-card summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--text-strong); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.info-section details.info-card summary::-webkit-details-marker { display: none; }
.info-section details.info-card summary::after { content: '+'; color: var(--link); font-weight: 700; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.info-section details.info-card[open] summary::after { content: '\2212'; }
.info-section details.info-card p { padding: 0 20px 16px; margin: 0; color: var(--text-2); }

/* ===== SpinForge components ===== */

/* ----- The stage's tokens (wheel.js reads --empty-slice from the canvas, app.js --panel for the saved picture) ----- */
:root { --head: 81px; --panel: #ffffff; --empty-slice: #e3e6eb; --spot: rgba(139, 92, 246, 0.14); }
:root:not([data-theme="light"]) { --panel: #14141f; --empty-slice: #2a2f37; --spot: rgba(139, 92, 246, 0.22); }
@media (max-width: 639.98px) { :root { --head: 65px; } }

/* ----- The site's text rules (p, ul, li, table) must not reach the tool: same weight as the site's, loaded later ----- */
:where(.app-shell) p, :where(.app-shell) ul, :where(.app-shell) ol, :where(.app-shell) li, :where(.app-shell) dl,
:where(.app-shell) dd, :where(.app-shell) figure, :where(.dialog) p, :where(.dialog) ul, :where(.dialog) ol, :where(.result) p,
:where(.result) ol, :where(.result) li { margin: 0; line-height: 1.5; }
:where(.app-shell) ul, :where(.app-shell) ol, :where(.result) ol { padding: 0; list-style: none; }
:where(.app-shell) table, :where(.dialog) table { margin: 0; background: none; border-radius: 0; overflow: visible; }
:where(.app-shell) th, :where(.app-shell) td, :where(.dialog) th, :where(.dialog) td { border: 0; padding: 0; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; }
.row.tight { gap: 2px; }
.row.wrap { flex-wrap: wrap; }
.count { color: var(--text-3); font-weight: 500; font-size: 0.9rem; }
.empty { color: var(--text-2); font-size: 0.925rem; }
.hint.inline { margin-left: 6px; font-size: 0.8rem; }
.field-row { display: flex; gap: 12px 16px; flex-wrap: wrap; align-items: flex-end; }
.input.narrow { width: 7.5em; }

/* ----- The scripts write the original's button classes (btn, btn primary, btn danger, small-btn, big) ----- */
.btn { background: var(--surface); color: var(--text-strong); border: 1px solid var(--surface-border); padding: 11px 23px; }
.btn:hover:not(:disabled) { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.btn.primary { background: var(--gradient-brand); color: #fff; border-color: transparent; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn.primary:hover:not(:disabled) { color: #fff; box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); }
.btn.danger { color: var(--danger); border-color: rgba(185, 28, 28, 0.35); }
.btn.danger:hover:not(:disabled) { background: var(--danger-strong); color: #fff; border-color: transparent; }
.btn.small-btn { font-size: 0.85rem; padding: 8px 15px; }
.btn.big { font-size: 1.05rem; padding: 14px 28px; }
.btn:focus-visible, .chip:focus-visible, .mode:focus-visible, .pal:focus-visible, .wc-open:focus-visible, .badge:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.icon-btn[aria-pressed="true"] { color: var(--link); }
.dialog-actions .spacer { flex: 1; }

/* ----- Switches: a 44 px tall button with the track and the knob drawn inside it ----- */
.switch { position: relative; width: 48px; height: 44px; flex: none; padding: 0; border: 0; background: transparent; cursor: pointer; }
.switch::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 28px; border-radius: 14px; background: var(--text-3); transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 12px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.switch[aria-checked="true"]::before { background: var(--gradient-brand); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 14px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 0.925rem; color: var(--text-strong); }
.switch-row .hint { display: block; font-weight: 400; margin-top: 2px; }
.range { width: 100%; min-height: 32px; accent-color: var(--brand); margin: 0; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row .end { font-size: 0.8rem; color: var(--text-3); white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; }
.stepper .icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--chip-border); background: var(--surface); color: var(--text-strong); }
.stepper .icon-btn:hover { border-color: var(--brand); color: var(--link); }
.stepper output { min-width: 3em; text-align: center; font-weight: 700; font-size: 1rem; color: var(--text-strong); }
.field .label .muted { font-weight: 500; }

/* ----- Views ----- */
.view > * + * { margin-top: 20px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.view-title { margin: 0; font-size: 1.35rem; }
.lead { margin-top: 4px; color: var(--text-2); max-width: 72ch; }
.app-shell > .view-tabs { margin: 0 0 1.25rem; display: flex; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.block { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; min-height: 36px; }
.block-head h3 { margin: 0; font-size: 1.1rem; display: flex; align-items: baseline; gap: 8px; }
#view-wheels .block + .block { margin-top: 28px; }
.banner { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius-lg); border: 1px solid var(--tint-brand-border); background: var(--tint-brand); font-size: 0.925rem; }
.banner .ico { color: var(--link); }
.banner-text { flex: 1 1 220px; font-weight: 600; color: var(--text-strong); }

/* ----- The wheel and the panel: two cards side by side from 1024 px ----- */
.play { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) {
    .play { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); }
    .stage:not(.no-stick) { position: sticky; top: calc(var(--head) + 16px); }
}
.stage, .panel { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); box-shadow: var(--surface-shadow); min-width: 0; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 20px 20px; }
.stage-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; }
.title-input { flex: 1; min-width: 0; min-height: 44px; padding: 4px 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 700; letter-spacing: -0.015em; color: var(--text-strong); text-overflow: ellipsis; }
.title-input:hover { border-bottom-color: var(--line-strong); }
.title-input:focus { outline: none; border-bottom-color: var(--brand); }
.stage.no-title .title-input { visibility: hidden; }
.stage-tools { gap: 2px; margin-left: auto; }
.wheel-wrap { position: relative; width: 100%; display: flex; justify-content: center; }
.wheel-wrap::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(100%, 900px); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; background: radial-gradient(closest-side, var(--spot), transparent); }
.wheel-box { --wheel-max: max(260px, calc(100svh - var(--head) - 270px)); position: relative; isolation: isolate; width: min(100%, var(--wheel-max)); aspect-ratio: 1; }
.wheel-box::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; z-index: -1; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.18); }
.wheel-box canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.wheel-box canvas:active { cursor: grabbing; }
.wheel-box canvas.spinning { cursor: progress; }
.hub { --hub: 80px; position: absolute; left: 50%; top: 50%; width: var(--hub); height: var(--hub); padding: 0; transform: translate(-50%, -50%); border-radius: 50%; border: max(2px, calc(var(--hub) * 0.045)) solid #c9a227; background: radial-gradient(circle at 35% 30%, #5d5d6e, #1b1b22 70%); color: #ffffff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 2px 3px rgba(255, 255, 255, 0.25); display: grid; place-items: center; overflow: hidden; cursor: pointer; transition: transform 0.12s; }
.hub:hover { transform: translate(-50%, -50%) scale(1.05); }
.hub:active { transform: translate(-50%, -50%) scale(0.96); }
.hub:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.hub-face { font-family: 'Inter', sans-serif; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: calc(var(--hub) * 0.2); line-height: 1; max-width: 86%; overflow: hidden; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.hub-face.words { text-transform: none; letter-spacing: 0; font-size: calc(var(--hub) * 0.22); }
.hub-face.long { font-size: calc(var(--hub) * 0.14); }
.hub img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spin-row { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.spin-btn { min-width: min(100%, 260px); }
.spin-btn .ico { width: 20px; height: 20px; }
.spin-hint { color: var(--text-3); font-size: 0.85rem; text-align: center; }
.outcome { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.outcome:empty { display: none; }
.last-pick { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 0.95rem; color: var(--text-2); }
.last-pick b { font-size: 1.2rem; color: var(--text-strong); overflow-wrap: anywhere; }
.last-pick .ico { color: var(--link); }
.last-pick.fresh b { animation: fresh 0.5s ease-out; }
@keyframes fresh { from { transform: scale(1.3); } }
.pip { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); display: inline-block; }
.mode-line { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; justify-content: center; font-size: 0.9rem; color: var(--text-2); }
.scoreboard { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.score, .picks li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--chip); font-size: 0.85rem; font-weight: 600; color: var(--text-strong); }
.score .num { font-weight: 800; }
.score.ahead { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.picks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.picks li .n { color: var(--text-3); font-weight: 600; }

/* full screen, for a projector or a party */
.stage:fullscreen, .stage.present { background: var(--bg); border: 0; border-radius: 0; box-shadow: none; padding: 16px 24px; justify-content: center; overflow: auto; gap: 14px; }
.stage.present { position: fixed; inset: 0; z-index: 90; }
.stage:fullscreen .wheel-box, .stage.present .wheel-box { --wheel-max: max(260px, calc(100svh - 210px)); }
.stage:fullscreen .stage-head, .stage.present .stage-head { max-width: 1100px; }
.stage:fullscreen .title-input, .stage.present .title-input { text-align: center; font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
.stage:fullscreen .spin-hint, .stage.present .spin-hint { display: none; }
body.presenting { overflow: hidden; }

/* ----- The panel beside the wheel ----- */
.panel { display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.panel-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel-seg button { padding: 9px 8px; }
.pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.pane-head h2, .set-title { margin: 0; font-size: 1.05rem; font-weight: 700; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.set-group { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; border-top: 1px solid var(--surface-border); }
.set-group:first-child { border-top: 0; padding-top: 0; }
.entries { display: flex; flex-direction: column; }
.entries-empty { color: var(--text-2); font-size: 0.9rem; padding: 8px 0; }
.entry { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 0; border-bottom: 1px solid var(--surface-border); }
.entry:first-child { border-top: 1px solid var(--surface-border); }
.on-box { display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.entry .on { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.swatch-btn { width: 30px; height: 30px; border-radius: 8px; flex: none; padding: 0; overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.18); background: var(--c); cursor: pointer; }
.swatch-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.swatch-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.entry-input { flex: 1; min-width: 0; min-height: 40px; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; font-family: inherit; font-size: 0.95rem; color: var(--text); text-overflow: ellipsis; }
.entry-input:hover { border-color: var(--field-border); }
.entry-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); background: var(--field); }
.entry.off .entry-input { color: var(--text-3); text-decoration: line-through; }
.entry.off .swatch-btn { opacity: 0.4; }
.entry.out .entry-input { color: var(--text-3); }
.entry.out .swatch-btn { opacity: 0.5; }
.badge { font-family: inherit; font-size: 0.75rem; font-weight: 700; color: var(--text-2); border: 1px solid var(--chip-border); border-radius: 9999px; padding: 2px 9px; white-space: nowrap; background: var(--chip); cursor: pointer; }
.badge:hover { color: var(--link); border-color: var(--brand); }
.w-box { display: flex; align-items: center; gap: 6px; flex: none; }
.w-input { width: 4.4em; min-height: 36px; padding: 4px 6px; text-align: right; font-family: inherit; font-size: 0.9rem; color: var(--text); border: 1px solid var(--field-border); border-radius: 8px; background: var(--field); }
.w-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.chance { font-size: 0.8rem; color: var(--text-3); width: 3.4em; text-align: right; }
.entry .del { width: 36px; height: 36px; }
.text-edit { display: flex; flex-direction: column; gap: 6px; }
.entry-text { min-height: 300px; line-height: 1.6; }
.add-row { display: flex; gap: 8px; }
.add-row .input { flex: 1; min-width: 0; }
.add-row .btn { flex: none; }
.modes { display: flex; flex-direction: column; gap: 8px; }
.mode { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 14px; border: 1px solid var(--chip-border); border-radius: 14px; background: var(--surface); font-family: inherit; cursor: pointer; transition: border-color 0.2s ease; }
.mode:hover { border-color: var(--brand); }
.mode b { font-size: 0.95rem; color: var(--text-strong); }
.mode span { color: var(--text-2); font-size: 0.85rem; }
.mode[aria-checked="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--tint-brand); }
.palettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pal { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 8px 10px; min-width: 0; border: 1px solid var(--chip-border); border-radius: 14px; background: var(--surface); font-family: inherit; font-size: 0.875rem; font-weight: 600; color: var(--text-strong); cursor: pointer; transition: border-color 0.2s ease; }
.pal:hover { border-color: var(--brand); }
.pal[aria-checked="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pal-strip { display: flex; height: 18px; border-radius: 6px; overflow: hidden; }
.pal-strip i { flex: 1; }

/* ----- Results ----- */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; min-width: 0; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); box-shadow: var(--surface-shadow); }
.tile-val { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-lbl { font-size: 0.82rem; color: var(--text-2); }
.res-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .res-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.table-wrap { overflow-x: auto; min-width: 0; border-radius: 8px; }
.table-wrap:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tally { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tally th, .tally td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--surface-border); vertical-align: middle; color: var(--text); }
.tally th { font-size: 0.8rem; color: var(--text-2); font-weight: 600; background: none; }
.tally td.n, .tally th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tally .name { display: flex; align-items: center; gap: 8px; min-width: 7em; overflow-wrap: anywhere; font-weight: 600; color: var(--text-strong); }
.tally .bar-cell { width: 40%; min-width: 120px; }
.bar-track { position: relative; height: 12px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--surface-border); }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--c, var(--brand)); min-width: 2px; }
.bar-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text-strong); border-radius: 1px; }
.tally-note { font-size: 0.82rem; color: var(--text-2); margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tally-note i { display: inline-block; width: 2px; height: 14px; background: var(--text-strong); }
.list { display: flex; flex-direction: column; }
.list li { display: flex; align-items: center; gap: 8px 12px; padding: 9px 0; border-bottom: 1px solid var(--surface-border); font-size: 0.9rem; color: var(--text); }
.list li .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; color: var(--text-strong); }
.list li .n { color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 2.2em; }
.list li .ico { color: var(--link); }
.list li time { color: var(--text-3); font-size: 0.82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-body > .list + .btn { margin-top: 14px; }
.tag { font-size: 0.72rem; font-weight: 700; color: var(--text-2); border: 1px solid var(--chip-border); border-radius: 9999px; padding: 0 8px; white-space: nowrap; }

/* ----- Wheels: cards that fill their rows (three across, the last row's cards grow) ----- */
.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.wcard { flex: 1 1 calc((100% - 32px) / 3); min-width: min(100%, 260px); display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); box-shadow: var(--surface-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease; }
.wcard:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.wcard.current { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), var(--surface-shadow); }
.wc-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 0; background: transparent; text-align: left; border-radius: var(--radius-lg); font-family: inherit; color: inherit; cursor: pointer; }
.wc-open canvas { width: 56px; height: 56px; flex: none; }
.wc-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.wc-name { font-weight: 700; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-meta { font-size: 0.82rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-desc { font-size: 0.85rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wcard .icon-btn { margin-right: 8px; }

/* ----- The winner ----- */
.result { border: 0; padding: 0; margin: 0; background: transparent; color: var(--text); width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; overflow: hidden; }
.result[open] { display: grid; place-items: center; }
.result::backdrop { background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(6px); }
.result-card { --win: var(--brand); position: relative; z-index: 1; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 28px 20px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--surface-border); border-top: 10px solid var(--win); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); }
.result[open] .result-card { animation: win-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes win-pop { from { opacity: 0; transform: scale(0.7) translateY(20px); } }
.result-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.result-label .ico { color: var(--link); width: 20px; height: 20px; }
.result-name { margin: 0; font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--text-strong); overflow-wrap: anywhere; }
.result-name.long { font-size: clamp(1.4rem, 4.5vw, 2rem); }
.result-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid var(--win); }
.result-meta { color: var(--text-2); }
.result-list { width: 100%; text-align: left; display: flex; flex-direction: column; }
.result-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--surface-border); font-weight: 600; font-size: 1.05rem; color: var(--text-strong); }
.result-list li .n { color: var(--text-3); min-width: 1.6em; font-variant-numeric: tabular-nums; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; margin-top: 6px; }
.result-actions .btn { flex: 1 1 auto; }
.result-actions .btn.primary { flex: 1 1 100%; }
.confetti { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; }
body > .confetti { z-index: 95; }

/* ----- The menu under the three dots, and the small windows ----- */
.menu { position: fixed; inset: auto; margin: 0; padding: 6px; min-width: 240px; max-width: calc(100vw - 16px); border: 1px solid var(--surface-border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-family: inherit; font-size: 0.925rem; color: var(--text-strong); cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--tint-brand); outline: none; }
.menu button.danger { color: var(--danger); }
.menu .ico { color: var(--text-3); }
.menu button.danger .ico { color: inherit; }
.menu hr { border: 0; border-top: 1px solid var(--surface-border); margin: 4px 0; }
.color-input { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.swatches button { aspect-ratio: 1; min-height: 32px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.18); background: var(--c); padding: 0; cursor: pointer; }
.swatches button[aria-checked="true"] { outline: 3px solid var(--text-strong); outline-offset: 2px; }
.swatches button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.sw-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.share-row .input { flex: 1; min-width: 0; }
.share-qr { display: flex; justify-content: center; }
.share-qr svg { width: 200px; height: 200px; border-radius: 8px; }
.teams { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.team h3 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; margin: 0 0 4px; }
.team ol { margin: 0; padding-left: 1.3em; font-size: 0.925rem; list-style: decimal; color: var(--text); }
.team.fresh { animation: pop 0.3s ease-out both; }
.examples { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; font-size: 0.925rem; color: var(--text-2); list-style: disc; }
.examples strong { color: var(--text-strong); }
.dialog-form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dialog .set-group:first-child { border-top: 0; }
.help-body h3 { margin: 6px 0 0; font-size: 1rem; }
.help-body p { color: var(--text-2); max-width: 76ch; }

@media (forced-colors: active) {
    .pip, .swatch-btn, .swatches button, .pal-strip i, .bar-fill { forced-color-adjust: none; }
}

/* ----- Tablets ----- */
@media (max-width: 1023px) {
    .info-section .info-grid { grid-template-columns: repeat(2, 1fr); }
    .info-three { grid-template-columns: 1fr; }
}

/* ----- Phones ----- */
@media (max-width: 639px) {
    .app-hero { margin-bottom: 1.5rem; }
    .app-tagline { font-size: 1rem; }
    .app-toolbar { gap: 10px; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .status-pill { flex: 1 1 100%; min-width: 0; }
    .toolbar-right .btn { flex: 1 1 auto; }
    .app-shell > .view-tabs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .app-shell > .view-tabs .view-tab { justify-content: center; padding: 8px 6px; }
    .stage { padding: 12px 16px 16px; }
    .stage-head { flex-wrap: wrap; row-gap: 0; }
    .title-input { flex: 1 1 100%; }
    .panel { padding: 16px; }
    .view-head .actions { width: 100%; }
    .view-head .actions .btn { flex: 1 1 auto; }
    .tiles { gap: 12px; }
    .tile { padding: 12px 14px; }
    .wc-open { padding: 10px 12px; }
    .swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .toasts { bottom: 16px; right: 16px; left: 16px; align-items: stretch; }
    .toast { min-width: 0; max-width: none; }
    .dialog-body, .dialog-head, .dialog-actions { padding-left: 16px; padding-right: 16px; }
    .result-card { padding: 24px 16px 16px; }
    .info-section h2 { font-size: 1.4rem; }
    .info-section .info-grid, .info-three { grid-template-columns: 1fr; }
    .info-card { padding: 16px; }
    .step-num { left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .info-card, .wcard, .mode, .pal, .dialog, .toast, .chip, .seg button, .view-tab, .hub, .switch::before, .switch::after { transition: none; animation: none; }
    .result[open] .result-card, .last-pick.fresh b, .team.fresh { animation: none; }
}

/* Phones: 16 px text, 44 px tap targets (AdSense audit H-04, 8 Oct 2026). The wheel itself is a drawing; buttons inside a
   sentence read as links (WCAG 2.5.8). */
@media (max-width: 639.98px) {
    main button, main select, main summary, main [role="button"],
    main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]) { min-height: 44px; }
    main .chip, main .seg button, main .view-tab, main .icon-btn { min-height: 44px; min-width: 44px; }
    main .icon-btn, main .stepper .icon-btn, main .entry .del { width: 44px; height: 44px; }
    main .swatch-btn { width: 44px; height: 44px; }
    main .on-box { width: 44px; height: 44px; }
    main .entry .on { width: 24px; height: 24px; }
    main .w-input { width: 4.6em; }
    main .badge { padding: 4px 12px; }
    main :is(p, li, td, th, .hint, .muted, .label, .lead, .count, .status-main, .status-sub, .form-hint, .input, .entry-input,
        .w-input, .chance, kbd, .chip, .seg button, .view-tab, .switch-row, .range-row .end, .mode b, .mode span, .pal, .tile-lbl,
        .wc-meta, .wc-desc, .tag, .badge, .spin-hint, .last-pick, .mode-line, .score, .picks li, .tally-note, .list li time,
        .banner, .entries-empty, .empty, .menu button) { font-size: 1rem; }
    .dialog button, .dialog .btn, .dialog select, .dialog input:not([type="checkbox"]), .dialog summary { min-height: 44px; }
    .dialog .dialog-close { width: 44px; height: 44px; }
    .dialog .icon-btn { width: 44px; height: 44px; }
    .dialog :is(p, li, .hint, .input, .label, .seg button, .team ol) { font-size: 1rem; }
    .result :is(p, li, .result-meta) { font-size: 1rem; }
    .result button, .result .btn, .menu button { min-height: 44px; }
}
