/*
 * Tombola online ([odq_tombola]) — /giochi-online/tombola/. Tutto sotto .odq-tmb.
 * I pulsanti hanno il selettore `.odq-tmb button.…`: il tema (Hello) dà a ogni <button>
 * bordo, colore e un :focus rosso, e una classe sola non basta a scavalcarlo.
 */
.odq-tmb {
	--t-ink: #1B1830; --t-muted: #5d586e; --t-line: #e6e2f2; --t-soft: #f8f6fd; --t-tint: #f3eefe;
	--t-brand: #7A3FF2; --t-brand-ink: #5b27c9; --t-brand-hover: #6530d6;
	--t-accent: #ff8100; --t-accent-ink: #b45400; --t-ok: #15703c; --t-ok-bg: #e7f6ec;
	--t-me: #7A3FF2; --t-cpu: #c24a06;
	--t-on-last: #1B1830; --t-on-hit: #fff;
	/* Superfici e colori che cambiano con il tema (data-tema sul <section>) */
	--t-bg: #fff; --t-pattern: none; --t-surface: #fff; --t-hover-line: #c9bff0; --t-cell-ink: #6f6a82;
	--t-out: var(--t-brand); --t-last: var(--t-accent); --t-last-glow: rgba(255,129,0,.3);
	--t-ball-a: #ff9a2e; --t-ball-b: #e8590c; --t-ball-glow: rgba(232,89,12,.3); --t-ball-e1: #e9e4f7; --t-ball-e2: #d7cff0;
	--t-blank-a: #f1eef9; --t-blank-b: #f8f6fd; --t-veil: rgba(255,255,255,.84); --t-num-font: inherit;
	position: relative; margin: 0 0 2.5rem; padding: 1.1rem;
	border: 1px solid var(--t-line); border-radius: 18px; background: var(--t-pattern), var(--t-bg); color: var(--t-ink);
	box-shadow: 0 6px 24px rgba(27,24,48,.06);
	font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 1rem; line-height: 1.45;
}
.odq-tmb *, .odq-tmb *::before, .odq-tmb *::after { box-sizing: border-box; }
.odq-tmb [hidden] { display: none !important; }
.odq-tmb .t-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.odq-tmb h3 { margin: 0; padding: 0; font: inherit; color: inherit; text-transform: none; letter-spacing: 0; }

/* Impostazioni */
.odq-tmb .t-settings { display: grid; gap: .8rem; margin-bottom: 1rem; }
.odq-tmb .t-row { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: flex-end; }
.odq-tmb .t-group { min-width: 0; }
.odq-tmb .t-label { display: block; margin: 0 0 .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t-brand-ink); }
.odq-tmb .t-seg { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 999px; background: var(--t-soft); border: 1px solid var(--t-line); }
.odq-tmb .t-seg--modes { display: flex; border-radius: 16px; }
.odq-tmb .t-seg--modes button.t-seg-btn { flex: 1 1 0; border-radius: 13px; padding: .45rem .9rem; }

.odq-tmb button.t-seg-btn, .odq-tmb button.t-btn, .odq-tmb button.t-icon-btn, .odq-tmb button.t-prize,
.odq-tmb button.t-cell, .odq-tmb button.t-num, .odq-tmb button.t-switch, .odq-tmb button.t-link {
	font: inherit; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; line-height: 1.2;
	-webkit-tap-highlight-color: transparent;
}
.odq-tmb button.t-seg-btn { min-height: 40px; padding: .3rem .85rem; border: 0; border-radius: 999px; background: transparent; color: var(--t-muted); font-size: .85rem; font-weight: 600; }
.odq-tmb button.t-seg-btn small { display: block; font-size: .68rem; font-weight: 600; opacity: .8; }
.odq-tmb button.t-seg-btn:hover { background: var(--t-surface); color: var(--t-ink); }
.odq-tmb button.t-seg-btn[aria-pressed="true"] { background: var(--t-brand); color: #fff; }

.odq-tmb button.t-switch {
	display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .3rem .2rem; border: 0; background: transparent; color: var(--t-ink); font-size: .85rem; font-weight: 600;
}
.odq-tmb button.t-switch:hover { background: transparent; color: var(--t-ink); }
.odq-tmb button.t-switch .t-knob { position: relative; width: 40px; height: 24px; flex: 0 0 auto; border-radius: 999px; background: #d9d4ea; transition: background .2s; }
.odq-tmb button.t-switch .t-knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.odq-tmb button.t-switch[aria-checked="true"] .t-knob { background: var(--t-brand); }
.odq-tmb button.t-switch[aria-checked="true"] .t-knob::after { transform: translateX(16px); }

.odq-tmb button.t-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 48px; padding: .55rem 1.25rem;
	border: 2px solid var(--t-brand); border-radius: 999px; background: var(--t-brand); color: #fff; font-weight: 700; font-size: .95rem;
}
.odq-tmb button.t-btn:hover { background: var(--t-brand-hover); border-color: var(--t-brand-hover); color: #fff; }
.odq-tmb button.t-btn:disabled { opacity: .45; cursor: not-allowed; }
.odq-tmb button.t-btn.t-btn-ghost { background: var(--t-surface); color: var(--t-brand-ink); }
.odq-tmb button.t-btn.t-btn-ghost:hover { background: var(--t-tint); color: var(--t-brand-ink); }
.odq-tmb button.t-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.odq-tmb button.t-btn.t-draw { min-height: 56px; padding: .6rem 2rem; font-size: 1.15rem; box-shadow: 0 6px 16px rgba(122,63,242,.28); }
.odq-tmb button.t-icon-btn {
	width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 2px solid var(--t-line); border-radius: 50%; background: var(--t-surface); color: var(--t-ink);
}
.odq-tmb button.t-icon-btn:hover { border-color: var(--t-hover-line); background: var(--t-surface); color: var(--t-ink); }
.odq-tmb button.t-icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.odq-tmb button.t-icon-btn[aria-pressed="true"] { border-color: var(--t-brand); background: var(--t-tint); color: var(--t-brand-ink); }
.odq-tmb button.t-icon-btn svg { width: 20px; height: 20px; }
.odq-tmb button.t-link { padding: 0; border: 0; background: none; color: var(--t-brand-ink); font-weight: 700; text-decoration: underline; }
.odq-tmb button.t-link:hover { background: none; color: var(--t-brand); }
.odq-tmb button:focus { outline: none; }
.odq-tmb button { transition: none; } /* Hello dà `transition: all` a ogni <button> */
.odq-tmb button:focus-visible { outline: 3px solid var(--t-brand-ink); outline-offset: 2px; }

/* Palco: ultimo numero, smorfia, comandi */
.odq-tmb .t-stage { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.2rem; align-items: center; padding: 1rem; border-radius: 16px; background: var(--t-soft); }
.odq-tmb .t-ball {
	grid-row: span 3; width: 128px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #fff 0 8%, #ffd7a8 9% 18%, transparent 19%), radial-gradient(circle at 50% 50%, var(--t-ball-a), var(--t-ball-b));
	box-shadow: inset -6px -8px 16px rgba(0,0,0,.18), 0 8px 18px var(--t-ball-glow);
}
.odq-tmb .t-ball.is-empty { background: radial-gradient(circle at 50% 50%, var(--t-ball-e1), var(--t-ball-e2)); box-shadow: inset -6px -8px 16px rgba(0,0,0,.06); }
.odq-tmb .t-ball-in { width: 68%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.odq-tmb .t-ball-n { font-family: var(--t-num-font); font-size: 3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: #1B1830; }
.odq-tmb .t-ball.is-pop { animation: t-pop .5s cubic-bezier(.3,.7,.3,1.4); }
@keyframes t-pop { 0% { transform: scale(.6) rotate(-25deg); opacity: .3; } 100% { transform: none; opacity: 1; } }
.odq-tmb .t-smorfia { margin: 0; min-height: 2.6em; }
.odq-tmb .t-smorfia b { display: block; font-size: 1.15rem; line-height: 1.2; }
.odq-tmb .t-smorfia span { display: block; font-size: .85rem; color: var(--t-muted); }
.odq-tmb .t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; }
.odq-tmb .t-count { font-size: .8rem; font-weight: 600; color: var(--t-muted); white-space: nowrap; }
.odq-tmb .t-count b { font-size: 1rem; color: var(--t-ink); font-variant-numeric: tabular-nums; }
.odq-tmb .t-history { display: flex; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.odq-tmb .t-history li { width: 30px; height: 30px; display: grid; place-items: center; margin: 0; border-radius: 50%; background: var(--t-surface); border: 2px solid var(--t-line); font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.odq-tmb .t-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.odq-tmb .t-tools { display: flex; gap: .4rem; margin-left: auto; }

/* Premi */
.odq-tmb .t-prizes { margin: 1rem 0 0; }
.odq-tmb .t-prize-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.odq-tmb button.t-prize, .odq-tmb .t-prize {
	display: inline-flex; flex-direction: column; align-items: flex-start; min-height: 44px; padding: .3rem .8rem; border: 2px solid var(--t-line); border-radius: 12px; background: var(--t-surface); color: var(--t-ink); font-size: .85rem; font-weight: 700;
}
.odq-tmb .t-prize small { font-size: .68rem; font-weight: 600; color: var(--t-muted); }
.odq-tmb button.t-prize:hover { border-color: var(--t-hover-line); background: var(--t-surface); color: var(--t-ink); }
.odq-tmb .t-prize.is-won { border-color: var(--t-ok); background: var(--t-ok-bg); }
.odq-tmb .t-prize.is-won small { color: var(--t-ok); }
.odq-tmb .t-prize.is-me { border-color: var(--t-me); background: var(--t-tint); }
.odq-tmb .t-prize.is-me small { color: var(--t-me); }
.odq-tmb .t-prize.is-cpu { border-color: var(--t-cpu); background: #fff0e6; }
.odq-tmb .t-prize.is-cpu small { color: var(--t-cpu); }
.odq-tmb .t-prize.is-both { border-color: var(--t-ok); background: var(--t-ok-bg); }
.odq-tmb .t-prize.is-flash { animation: t-pop .5s ease-out; }
.odq-tmb .t-hint { margin: .4rem 0 0; font-size: .78rem; color: var(--t-muted); }

/* Tabellone: 6 blocchi da 15 numeri, come quello di cartone */
.odq-tmb .t-board-wrap { margin: 1rem 0 0; }
.odq-tmb .t-board { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; width: 100%; margin: 0 auto; }
.odq-tmb .t-block { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 4px; padding: 5px; border-radius: 10px; background: var(--t-soft); border: 1px solid var(--t-line); }
.odq-tmb .t-cell, .odq-tmb button.t-cell {
	display: grid; place-items: center; aspect-ratio: 1.15; min-width: 0; padding: 0; border: 0; border-radius: 7px; background: var(--t-surface); color: var(--t-cell-ink); font-family: var(--t-num-font);
	font-size: clamp(.8rem, 2.6vw, 1.05rem); font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 1px 0 rgba(27,24,48,.06);
}
.odq-tmb button.t-cell:hover { background: var(--t-tint); color: var(--t-ink); }
.odq-tmb .t-cell.is-out, .odq-tmb button.t-cell.is-out { background: var(--t-out); color: #fff; }
.odq-tmb .t-cell.is-last, .odq-tmb button.t-cell.is-last { background: var(--t-last); color: var(--t-on-last); box-shadow: 0 0 0 3px var(--t-last-glow); animation: t-pop .45s ease-out; }
.odq-tmb.is-vs .t-board-wrap .t-label { margin-top: .2rem; }
.odq-tmb.is-vs .t-cell { font-size: clamp(.7rem, 2.2vw, .85rem); }

/* Cartelle digitali */
.odq-tmb .t-cards-wrap { margin: 1rem 0 0; }
.odq-tmb .t-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .75rem; }
.odq-tmb .t-card { padding: .45rem; border-radius: 12px; border: 2px solid var(--t-me); background: var(--t-surface); }
.odq-tmb .t-card.is-cpu { border-color: #f3c3a4; }
.odq-tmb .t-card.is-full { background: var(--t-ok-bg); border-color: var(--t-ok); }
.odq-tmb .t-card-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 .3rem; padding: 0 .15rem; font-size: .72rem; font-weight: 700; color: var(--t-muted); text-transform: uppercase; letter-spacing: .05em; }
.odq-tmb .t-card-head b { color: var(--t-ink); font-variant-numeric: tabular-nums; }
.odq-tmb .t-card-grid { display: grid; grid-template-columns: repeat(9, minmax(0,1fr)); gap: 3px; }
.odq-tmb .t-num, .odq-tmb button.t-num {
	position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 6px; background: var(--t-soft); color: var(--t-ink); font-family: var(--t-num-font);
	font-size: clamp(.78rem, 3vw, 1rem); font-weight: 700; font-variant-numeric: tabular-nums;
}
.odq-tmb .t-num.is-blank { background: repeating-linear-gradient(135deg, var(--t-blank-a) 0 4px, var(--t-blank-b) 4px 8px); }
.odq-tmb button.t-num:hover { background: var(--t-tint); color: var(--t-ink); }
.odq-tmb .t-num.is-hit::after, .odq-tmb button.t-num.is-hit::after {
	content: ""; position: absolute; inset: 8%; border-radius: 50%; background: var(--t-me); opacity: .9; z-index: 0;
}
.odq-tmb .t-num.is-hit > span { position: relative; z-index: 1; color: var(--t-on-hit); }
.odq-tmb .t-card.is-cpu .t-num.is-hit::after { background: var(--t-cpu); }
.odq-tmb .t-num.is-due { box-shadow: inset 0 0 0 2px var(--t-accent); animation: t-due 1.2s ease-in-out infinite; }
@keyframes t-due { 50% { box-shadow: inset 0 0 0 2px rgba(255,129,0,.25); } }
.odq-tmb .t-num.is-nope { animation: t-shake .3s ease-in-out; }
@keyframes t-shake { 0%,100% { translate: 0; } 25% { translate: -3px; } 75% { translate: 3px; } }
.odq-tmb .t-cpu-box { margin: .9rem 0 0; }
.odq-tmb .t-cpu-box summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--t-brand-ink); }
.odq-tmb .t-cpu-box .t-cards { margin-top: .6rem; }
.odq-tmb .t-score { display: flex; gap: .5rem; margin: 0 0 .6rem; }
.odq-tmb .t-score > div { flex: 1 1 0; display: flex; justify-content: space-between; align-items: center; padding: .35rem .7rem; border-radius: 10px; background: var(--t-surface); border: 2px solid var(--t-line); font-size: .82rem; font-weight: 700; }
.odq-tmb .t-score b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.odq-tmb .t-score .is-me { color: var(--t-me); }
.odq-tmb .t-score .is-cpu { color: var(--t-cpu); }

/* Riquadri sopra il gioco: fine partita e conferma */
.odq-tmb .t-overlay {
	position: absolute; inset: 0; z-index: 5; display: grid; justify-items: center; align-items: start; padding: 1rem;
	background: var(--t-veil); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); border-radius: 18px;
}
.odq-tmb .t-dialog { position: sticky; top: max(1rem, 10vh); width: min(100%, 400px); padding: 1.4rem 1.25rem 1.2rem; text-align: center; border-radius: 18px; background: var(--t-surface); border: 1px solid var(--t-line); box-shadow: 0 14px 40px rgba(27,24,48,.16); animation: t-rise .35s ease-out; }
@keyframes t-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.odq-tmb .t-kicker { margin: 0 0 .2rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--t-brand-ink); }
.odq-tmb .t-dialog-title { margin: 0 0 .5rem; font-size: 1.5rem; font-weight: 800; line-height: 1.2; outline: 0; }
.odq-tmb .t-dialog p { margin: 0 0 .9rem; color: var(--t-muted); font-size: .9rem; }
.odq-tmb .t-end-list { margin: 0 0 1rem; padding: 0; list-style: none; text-align: left; font-size: .88rem; }
.odq-tmb .t-end-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem .2rem; margin: 0; border-bottom: 1px solid var(--t-line); }
.odq-tmb .t-end-list li:last-child { border-bottom: 0; }
.odq-tmb .t-end-list .is-me { color: var(--t-me); font-weight: 700; }
.odq-tmb .t-end-list .is-cpu { color: var(--t-cpu); font-weight: 700; }
.odq-tmb .t-dialog-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.odq-tmb .t-share-row { margin: .6rem 0 0; }

.odq-tmb .t-foot { margin: .9rem 0 0; font-size: .78rem; color: var(--t-muted); text-align: center; }
.odq-tmb .t-foot a { color: var(--t-brand-ink); font-weight: 700; }
.odq-tmb .t-noscript { margin: .75rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: #fdecea; color: #7a1a14; font-weight: 600; text-align: center; }

/* Modalità contro il computer: ordine dei blocchi */
.odq-tmb .t-main { display: flex; flex-direction: column; }
.odq-tmb.is-vs .t-board-wrap { order: 3; }
.odq-tmb.is-vs .t-prizes { order: 1; }
.odq-tmb.is-vs .t-cards-wrap { order: 2; }
.odq-tmb.is-vs .t-cpu-box { order: 4; }
.odq-tmb.is-vs .t-board { max-width: 420px; }
.odq-tmb:not(.is-vs) .t-vs-only { display: none !important; }
.odq-tmb.is-vs .t-tab-only { display: none !important; }

@media (max-width: 560px) {
	.odq-tmb { padding: .8rem; border-radius: 14px; }
	.odq-tmb .t-stage { padding: .8rem; gap: .3rem .9rem; }
	.odq-tmb .t-ball { width: 96px; }
	.odq-tmb .t-ball-n { font-size: 2.25rem; }
	.odq-tmb .t-smorfia b { font-size: 1rem; }
	.odq-tmb .t-history li:nth-child(n+5) { display: none; }
	.odq-tmb .t-tools { margin-left: 0; width: 100%; justify-content: space-between; }
	.odq-tmb .t-controls button.t-btn.t-draw { flex: 1 1 auto; }
	.odq-tmb .t-board { gap: 5px; }
	.odq-tmb .t-block { gap: 3px; padding: 3px; border-radius: 8px; }
	.odq-tmb .t-cell, .odq-tmb button.t-cell { border-radius: 5px; aspect-ratio: 1; }
}

/* Schermo intero / modalità TV. API Fullscreen dove c'è, altrimenti (iPhone) un livello fisso sopra la pagina. */
.odq-tmb.is-full {
	position: fixed; inset: 0; z-index: 2147483000; margin: 0; border: 0; border-radius: 0; box-shadow: none;
	display: flex; flex-direction: column; overflow: auto; background: var(--t-pattern), var(--t-bg);
	padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
.odq-tmb:fullscreen { background: var(--t-pattern), var(--t-bg); }
.odq-tmb::backdrop { background: #000; }
.odq-tmb.is-full .t-settings, .odq-tmb.is-full .t-foot, .odq-tmb.is-full .t-hint, .odq-tmb.is-full .t-cpu-box { display: none !important; }
.odq-tmb.is-full .t-main { flex: 1 1 auto; display: grid; grid-template-columns: minmax(240px, 32%) 1fr; grid-template-rows: auto 1fr; gap: 1rem 1.5rem; min-height: 0; }
.odq-tmb.is-full .t-stage { grid-row: 1 / 3; grid-template-columns: 1fr; justify-items: center; align-content: center; text-align: center; gap: .8rem; }
.odq-tmb.is-full .t-ball { grid-row: auto; width: min(100%, 40vh, 340px); }
.odq-tmb.is-full .t-ball-n { font-size: clamp(4rem, 15vh, 9rem); }
.odq-tmb.is-full .t-smorfia b { font-size: clamp(1.2rem, 3.4vh, 2rem); }
.odq-tmb.is-full .t-smorfia span { font-size: clamp(.9rem, 2.2vh, 1.2rem); }
.odq-tmb.is-full .t-meta { justify-content: center; }
.odq-tmb.is-full .t-history li { width: clamp(30px, 5vh, 48px); height: clamp(30px, 5vh, 48px); font-size: clamp(.8rem, 2vh, 1.1rem); }
.odq-tmb.is-full .t-controls { justify-content: center; }
.odq-tmb.is-full .t-tools { margin-left: 0; }
.odq-tmb.is-full .t-prizes { grid-column: 2; margin: 0; order: 0; }
.odq-tmb.is-full .t-board-wrap, .odq-tmb.is-full .t-cards-wrap { grid-column: 2; margin: 0; min-height: 0; order: 0; }
.odq-tmb.is-full .t-board-wrap > .t-label { display: none; }
.odq-tmb.is-full .t-board { max-width: none; width: min(100%, calc((100dvh - 9rem) * 1.25)); }
.odq-tmb.is-full .t-cell { font-size: clamp(.9rem, 3.4vh, 2.2rem); }
.odq-tmb.is-full.is-vs .t-board-wrap { display: none; }
.odq-tmb.is-full .t-overlay { border-radius: 0; position: fixed; } /* a schermo intero il contenitore scorre: il riquadro resta sullo schermo */
@media (orientation: portrait) {
	.odq-tmb.is-full .t-main { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
	.odq-tmb.is-full .t-stage { grid-row: auto; grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
	.odq-tmb.is-full .t-ball { grid-row: span 3; width: min(34vw, 180px); }
	.odq-tmb.is-full .t-ball-n { font-size: clamp(2.5rem, 11vw, 5rem); }
	.odq-tmb.is-full .t-meta { justify-content: flex-start; }
	.odq-tmb.is-full .t-controls { grid-column: 1 / -1; }
	.odq-tmb.is-full .t-prizes, .odq-tmb.is-full .t-board-wrap, .odq-tmb.is-full .t-cards-wrap { grid-column: 1; }
	.odq-tmb.is-full .t-board { width: 100%; }
	.odq-tmb.is-full .t-cell { font-size: clamp(.8rem, 3.6vw, 1.6rem); }
	.odq-tmb.is-full .t-stage { padding: .7rem; }
	.odq-tmb.is-full .t-controls { flex-wrap: nowrap; gap: .35rem; margin-top: .2rem; }
	.odq-tmb.is-full .t-controls button.t-btn.t-draw { flex: 1 1 auto; min-height: 48px; padding: .5rem .8rem; font-size: 1rem; }
	.odq-tmb.is-full .t-controls button.t-auto { width: 44px; min-height: 44px; padding: 0; }
	.odq-tmb.is-full .t-controls button.t-auto span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
	.odq-tmb.is-full .t-tools { width: auto; gap: .3rem; }
	.odq-tmb.is-full .t-tools .t-undo { display: none; }
	.odq-tmb.is-full .t-prize-list { gap: .3rem; }
	.odq-tmb.is-full .t-prize { min-height: 0; padding: .2rem .55rem; font-size: .78rem; }
	.odq-tmb.is-full .t-prizes > .t-label { display: none; }
}
html.odq-tmb-lock, html.odq-tmb-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.odq-tmb .t-ball.is-pop, .odq-tmb .t-cell.is-last, .odq-tmb .t-prize.is-flash, .odq-tmb .t-dialog, .odq-tmb .t-num.is-due, .odq-tmb .t-num.is-nope { animation: none; }
	.odq-tmb button.t-switch .t-knob, .odq-tmb button.t-switch .t-knob::after { transition: none; }
}
@media print { .odq-tmb { display: none; } }
.odq-tmb:focus { outline: none; }
.odq-tmb.is-full .t-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.odq-tmb.is-full .t-num { font-size: clamp(.9rem, 2.6vh, 1.6rem); }

/* ---------- Temi del box (data-tema sul <section>; «classico» è quello di base qui sopra) ---------- */
.odq-tmb .t-themes { display: flex; gap: .4rem; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.odq-tmb button.t-theme {
	flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .3rem .85rem .3rem .35rem; margin: 0;
	border: 2px solid var(--t-line); border-radius: 999px; background: var(--t-surface); color: var(--t-ink);
	font: inherit; font-size: .85rem; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.odq-tmb button.t-theme:hover { border-color: var(--t-hover-line); background: var(--t-surface); color: var(--t-ink); }
.odq-tmb button.t-theme[aria-pressed="true"] { border-color: var(--t-brand); background: var(--t-tint); color: var(--t-ink); }
.odq-tmb .t-sw { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6), 0 0 0 1px rgba(0,0,0,.08); }
.odq-tmb .t-sw--classico { background: conic-gradient(#7A3FF2 0 50%, #ff8100 50% 100%); }
.odq-tmb .t-sw--natale { background: conic-gradient(#c41e3a 0 50%, #1f7a4d 50% 100%); }
.odq-tmb .t-sw--floreale { background: conic-gradient(#d6577f 0 50%, #f2a541 50% 100%); }
.odq-tmb .t-sw--tradizionale { background: conic-gradient(#b3261e 0 50%, #f6efdc 50% 100%); }
.odq-tmb .t-sw--notte { background: conic-gradient(#15122b 0 50%, #8f5cff 50% 100%); }

/* Natale: rosso e verde, fiocchi di neve leggeri sullo sfondo */
.odq-tmb[data-tema="natale"] {
	--t-ink: #2b1a14; --t-muted: #7a5a4c; --t-line: #f1d6c8; --t-soft: #fdeee6; --t-tint: #fde4e4;
	--t-brand: #c41e3a; --t-brand-ink: #a3172f; --t-brand-hover: #a3172f; --t-accent: #1f7a4d; --t-me: #c41e3a; --t-cpu: #1f7a4d;
	--t-bg: #fffaf4; --t-surface: #fff; --t-hover-line: #eab3a5; --t-cell-ink: #85655a; --t-on-last: #fff;
	--t-out: #c41e3a; --t-last: #1f7a4d; --t-last-glow: rgba(31,122,77,.3);
	--t-ball-a: #e5383b; --t-ball-b: #a4161a; --t-ball-glow: rgba(164,22,26,.3); --t-ball-e1: #fbe3dc; --t-ball-e2: #f3cbbf;
	--t-blank-a: #fbe6dd; --t-blank-b: #fdf1eb; --t-veil: rgba(255,250,244,.86);
	--t-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c41e3a' stroke-opacity='.09' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M24 14v20M15 19l18 10M15 29l18-10M24 14l-3-3M24 14l3-3M24 34l-3 3M24 34l3 3'/%3E%3Cpath d='M86 70v24M75.6 76l20.8 12M75.6 88l20.8-12M86 70l-3.5-3.5M86 70l3.5-3.5M86 94l-3.5 3.5M86 94l3.5 3.5'/%3E%3C/g%3E%3Cg fill='%231f7a4d' fill-opacity='.10'%3E%3Ccircle cx='70' cy='22' r='3'/%3E%3Ccircle cx='28' cy='88' r='4'/%3E%3Ccircle cx='106' cy='42' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
}
/* Floreale: rosa antico e calendula, fiori a cinque petali */
.odq-tmb[data-tema="floreale"] {
	--t-ink: #3a2430; --t-muted: #7d5d6b; --t-line: #f3d9e0; --t-soft: #fdf0f3; --t-tint: #fbe3ea;
	--t-brand: #be4370; --t-brand-ink: #a8365d; --t-brand-hover: #a8365d; --t-accent: #e8912d; --t-me: #be4370; --t-cpu: #3f7a4b;
	--t-bg: #fffaf6; --t-surface: #fff; --t-hover-line: #eeb8c8; --t-cell-ink: #8d6676;
	--t-out: #c0426c; --t-last: #e8912d; --t-last-glow: rgba(232,145,45,.32);
	--t-ball-a: #ffb8a6; --t-ball-b: #d6577f; --t-ball-glow: rgba(214,87,127,.3); --t-ball-e1: #fde7ee; --t-ball-e2: #f7d0dc;
	--t-blank-a: #fbe5ec; --t-blank-b: #fdf2f5; --t-veil: rgba(255,250,246,.86);
	--t-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23d6577f' fill-opacity='.10'%3E%3Ccircle cx='30' cy='22' r='6'/%3E%3Ccircle cx='40' cy='29' r='6'/%3E%3Ccircle cx='36' cy='41' r='6'/%3E%3Ccircle cx='24' cy='41' r='6'/%3E%3Ccircle cx='20' cy='29' r='6'/%3E%3C/g%3E%3Ccircle cx='30' cy='32' r='4' fill='%23e8912d' fill-opacity='.18'/%3E%3Cg fill='%23e8912d' fill-opacity='.10'%3E%3Ccircle cx='100' cy='92' r='5'/%3E%3Ccircle cx='108.5' cy='98' r='5'/%3E%3Ccircle cx='105' cy='108' r='5'/%3E%3Ccircle cx='95' cy='108' r='5'/%3E%3Ccircle cx='91.5' cy='98' r='5'/%3E%3C/g%3E%3Ccircle cx='100' cy='101' r='3.4' fill='%23d6577f' fill-opacity='.18'/%3E%3Cpath d='M70 70c6-8 14-8 18-4-6 6-12 6-18 4z' fill='%234f8a5b' fill-opacity='.12'/%3E%3Cpath d='M118 30c-6-6-14-5-17 0 6 4 12 4 17 0z' fill='%234f8a5b' fill-opacity='.12'/%3E%3C/svg%3E");
}
/* Tradizionale: il cartellone di cartone, crema e rosso, numeri con le grazie */
.odq-tmb[data-tema="tradizionale"] {
	--t-ink: #3b2a1a; --t-muted: #7a6448; --t-line: #dccba3; --t-soft: #efe4c8; --t-tint: #f3e6c9;
	--t-brand: #b3261e; --t-brand-ink: #8f1d17; --t-brand-hover: #8f1d17; --t-accent: #1d4e89; --t-me: #b3261e; --t-cpu: #1d4e89;
	--t-bg: #f6efdc; --t-surface: #fffaf0; --t-hover-line: #c9b27f; --t-cell-ink: #7a5f3f; --t-on-last: #fff;
	--t-out: #b3261e; --t-last: #1d4e89; --t-last-glow: rgba(29,78,137,.3);
	--t-ball-a: #d9483f; --t-ball-b: #8f1d17; --t-ball-glow: rgba(143,29,23,.3); --t-ball-e1: #efe4c8; --t-ball-e2: #dccba3;
	--t-blank-a: #ece0c0; --t-blank-b: #f4ead2; --t-veil: rgba(246,239,220,.88);
	--t-num-font: Georgia, "Times New Roman", serif;
	--t-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.6' fill='%237a6448' fill-opacity='.10'/%3E%3C/svg%3E");
}
/* Notte: scuro, ideale proiettato sulla TV */
.odq-tmb[data-tema="notte"] {
	--t-ink: #f4f1ff; --t-muted: #b3abd6; --t-line: #342d5e; --t-soft: #1d1938; --t-tint: #2b2452;
	--t-brand: #8f5cff; --t-brand-ink: #c9b3ff; --t-brand-hover: #7a45f0; --t-accent: #ff8a1f; --t-me: #a57bff; --t-cpu: #ff8a1f;
	--t-bg: #15122b; --t-surface: #241f44; --t-hover-line: #5a4f94; --t-cell-ink: #a39bcf; --t-on-hit: #15122b;
	--t-ok: #57d18b; --t-ok-bg: #173a2a;
	--t-out: #7A3FF2; --t-last: #ff8a1f; --t-last-glow: rgba(255,138,31,.4);
	--t-ball-e1: #3a3366; --t-ball-e2: #2a2450;
	--t-blank-a: #1d1938; --t-blank-b: #221d42; --t-veil: rgba(21,18,43,.86);
	--t-pattern: radial-gradient(circle at 15% 10%, rgba(143,92,255,.18), transparent 40%), radial-gradient(circle at 90% 95%, rgba(255,138,31,.10), transparent 45%);
	box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
/* notte: bianco su #8f5cff dà 4,1:1; sui pulsanti pieni si usa il viola del brand (5,2:1) */
.odq-tmb[data-tema="notte"] button.t-seg-btn[aria-pressed="true"], .odq-tmb[data-tema="notte"] button.t-btn { background: #7A3FF2; border-color: #7A3FF2; }
.odq-tmb[data-tema="notte"] button.t-btn:hover { background: #6530d6; border-color: #6530d6; }
.odq-tmb[data-tema="notte"] button.t-switch .t-knob { background: #3a3366; }
.odq-tmb[data-tema="notte"] button.t-switch[aria-checked="true"] .t-knob { background: var(--t-brand); }
.odq-tmb[data-tema="notte"] .t-prize.is-cpu { background: #3a2412; }
.odq-tmb[data-tema="notte"] .t-ball-in { background: #fff; }
.odq-tmb[data-tema="notte"] .t-label { color: #c9b3ff; }
.odq-tmb[data-tema="natale"] .t-prize.is-cpu, .odq-tmb[data-tema="floreale"] .t-prize.is-cpu, .odq-tmb[data-tema="tradizionale"] .t-prize.is-cpu { background: var(--t-soft); }

/* ---------- Cassa (solo tabellone) ---------- */
.odq-tmb .t-cassa { margin: .8rem 0 0; border: 1px solid var(--t-line); border-radius: 14px; background: var(--t-surface); }
.odq-tmb .t-cassa > summary { cursor: pointer; padding: .7rem .9rem; font-size: .88rem; font-weight: 700; color: var(--t-brand-ink); list-style: revert; }
.odq-tmb .t-cassa[open] > summary { border-bottom: 1px solid var(--t-line); }
.odq-tmb .t-cassa-body { display: grid; gap: .75rem; padding: .8rem .9rem 1rem; }
.odq-tmb .t-cassa-grid { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: flex-end; }
.odq-tmb .t-field { display: block; margin: 0; }
.odq-tmb .t-input-wrap { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--t-muted); }
.odq-tmb input.t-input {
	width: 6.5rem; min-height: 44px; margin: 0; padding: .45rem .7rem; border: 2px solid var(--t-line); border-radius: 12px; background: var(--t-surface); color: var(--t-ink);
	font: inherit; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: none;
}
.odq-tmb input.t-input:focus { outline: none; border-color: var(--t-brand); box-shadow: 0 0 0 3px var(--t-tint); }
.odq-tmb .t-input-wrap--pct input.t-input { width: 4.6rem; min-height: 40px; padding: .35rem .5rem; }
.odq-tmb .t-cassa-table-wrap { overflow-x: auto; }
.odq-tmb table.t-cassa-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: .88rem; }
.odq-tmb table.t-cassa-table th, .odq-tmb table.t-cassa-table td { padding: .35rem .4rem; border: 0; border-bottom: 1px solid var(--t-line); background: transparent; color: var(--t-ink); text-align: left; vertical-align: middle; white-space: nowrap; }
.odq-tmb table.t-cassa-table thead th { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--t-muted); }
.odq-tmb table.t-cassa-table tbody th { font-weight: 700; }
.odq-tmb table.t-cassa-table .t-eur { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.odq-tmb table.t-cassa-table thead th:nth-child(n+4) { text-align: right; }
.odq-tmb .t-step { display: inline-flex; align-items: center; gap: .35rem; }
.odq-tmb .t-step b { min-width: 1.2em; text-align: center; font-variant-numeric: tabular-nums; }
.odq-tmb button.t-icon-btn.t-mini { width: 32px; height: 32px; font-size: 1.05rem; font-weight: 700; line-height: 1; }
.odq-tmb .t-cassa-sum { margin: 0; font-size: .9rem; }
.odq-tmb .t-cassa-sum .t-warn { color: #b3261e; font-weight: 700; }
.odq-tmb[data-tema="notte"] .t-cassa-sum .t-warn { color: #ff8a80; }
.odq-tmb .t-cassa-note { margin: 0; font-size: .76rem; color: var(--t-muted); }
.odq-tmb.is-full .t-cassa { display: none !important; }
@media (max-width: 560px) {
	.odq-tmb table.t-cassa-table { font-size: .8rem; }
	.odq-tmb table.t-cassa-table th, .odq-tmb table.t-cassa-table td { padding: .3rem .2rem; }
	.odq-tmb .t-input-wrap--pct input.t-input { width: 3.9rem; }
	.odq-tmb button.t-icon-btn.t-mini { width: 28px; height: 28px; }
}
