/*
 * Cartelle della tombola da stampare ([odq_tombola_cartelle]). Tutto sotto .odq-tmc.
 * Pulsanti con selettore `.odq-tmc button.…` per scavalcare gli stili del tema Hello.
 */
.odq-tmc {
	--c-ink: #1B1830; --c-muted: #5d586e; --c-line: #e6e2f2; --c-soft: #f8f6fd; --c-tint: #f3eefe;
	--c-brand: #7A3FF2; --c-brand-ink: #5b27c9; --c-brand-hover: #6530d6; --c-accent: #ff8100;
	position: relative; margin: 0 0 2.5rem; padding: 1.1rem;
	border: 1px solid var(--c-line); border-radius: 18px; background: #fff; color: var(--c-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-tmc *, .odq-tmc *::before, .odq-tmc *::after { box-sizing: border-box; }
.odq-tmc [hidden] { display: none !important; }
.odq-tmc .c-settings { display: grid; gap: .9rem; margin-bottom: 1rem; }
.odq-tmc .c-row { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: flex-end; }
.odq-tmc .c-group { min-width: 0; }
.odq-tmc .c-grow { flex: 1 1 260px; }
.odq-tmc .c-label { display: block; margin: 0 0 .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-brand-ink); }
.odq-tmc .c-opt { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--c-muted); }
.odq-tmc .c-note { margin: .35rem 0 0; font-size: .78rem; color: var(--c-muted); }
.odq-tmc .c-seg { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 999px; background: var(--c-soft); border: 1px solid var(--c-line); }

.odq-tmc button.c-seg-btn, .odq-tmc button.c-style, .odq-tmc button.c-btn, .odq-tmc button.c-switch {
	font: inherit; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; line-height: 1.2; -webkit-tap-highlight-color: transparent;
}
.odq-tmc button.c-seg-btn { min-width: 48px; min-height: 40px; padding: .3rem .8rem; border: 0; border-radius: 999px; background: transparent; color: var(--c-muted); font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.odq-tmc button.c-seg-btn:hover { background: #fff; color: var(--c-ink); }
.odq-tmc button.c-seg-btn[aria-pressed="true"] { background: var(--c-brand); color: #fff; }

.odq-tmc .c-styles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.odq-tmc button.c-style {
	display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .5rem .6rem .55rem; border: 2px solid var(--c-line); border-radius: 14px; background: #fff; color: var(--c-ink); font-size: .88rem; font-weight: 700; text-align: left;
}
.odq-tmc button.c-style small { font-size: .7rem; font-weight: 600; color: var(--c-muted); }
.odq-tmc button.c-style:hover { border-color: #c9bff0; background: #fff; color: var(--c-ink); }
.odq-tmc button.c-style[aria-pressed="true"] { border-color: var(--c-brand); background: var(--c-tint); }
.odq-tmc .c-sw { display: block; width: 100%; height: 30px; margin: 0 0 .35rem; border-radius: 6px; border: 1.5px solid #222;
	background: linear-gradient(90deg, transparent 0 32%, #222 32% 33%, transparent 33% 66%, #222 66% 67%, transparent 67%), linear-gradient(#fff 0 49%, #222 49% 51%, #ececec 51%); }
.odq-tmc .c-sw--colori { border-color: #1d6fd8; background: linear-gradient(90deg, #d62839 0 25%, #1d6fd8 25% 50%, #1f9d55 50% 75%, #f08c00 75%); }
.odq-tmc .c-sw--natale { border-color: #b3121b; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Cpath fill='%231f7a4d' d='M15 4 7 16h5l-6 9h18l-6-9h5z'/%3E%3Cpath fill='%23b3121b' d='M40 6h12v18H40z'/%3E%3Cpath fill='%23ffd23f' d='M44 6h4v18h-4z'/%3E%3C/svg%3E") center / auto 100% no-repeat; }
.odq-tmc .c-sw--bambini { border-color: #f08c00; background: #fff4e0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Ccircle cx='18' cy='16' r='9' fill='%23c68a4f'/%3E%3Ccircle cx='11' cy='9' r='4' fill='%23c68a4f'/%3E%3Ccircle cx='25' cy='9' r='4' fill='%23c68a4f'/%3E%3Ctext x='34' y='23' font-family='Arial' font-weight='700' font-size='17' fill='%231B1830'%3E7%3C/text%3E%3C/svg%3E") center / auto 100% no-repeat; }

.odq-tmc .c-input { width: 100%; min-height: 46px; padding: .55rem .85rem; border: 2px solid var(--c-line); border-radius: 12px; background: #fff; color: var(--c-ink); font: inherit; font-size: 16px; }
.odq-tmc .c-input:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px rgba(122,63,242,.15); }

.odq-tmc button.c-switch { display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .3rem .2rem; border: 0; background: transparent; color: var(--c-ink); font-size: .85rem; font-weight: 600; }
.odq-tmc button.c-switch:hover { background: transparent; color: var(--c-ink); }
.odq-tmc button.c-switch .c-knob { position: relative; width: 40px; height: 24px; flex: 0 0 auto; border-radius: 999px; background: #d9d4ea; transition: background .2s; }
.odq-tmc button.c-switch .c-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-tmc button.c-switch[aria-checked="true"] .c-knob { background: var(--c-brand); }
.odq-tmc button.c-switch[aria-checked="true"] .c-knob::after { transform: translateX(16px); }

.odq-tmc .c-actions { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; padding: .8rem; border-radius: 14px; background: var(--c-soft); }
.odq-tmc button.c-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 50px; padding: .55rem 1.35rem;
	border: 2px solid var(--c-brand); border-radius: 999px; background: var(--c-brand); color: #fff; font-weight: 700; font-size: 1rem;
}
.odq-tmc button.c-btn:hover { background: var(--c-brand-hover); border-color: var(--c-brand-hover); color: #fff; }
.odq-tmc button.c-btn:disabled { opacity: .55; cursor: progress; }
.odq-tmc button.c-btn.c-btn-ghost { background: #fff; color: var(--c-brand-ink); }
.odq-tmc button.c-btn.c-btn-ghost:hover { background: var(--c-tint); color: var(--c-brand-ink); }
.odq-tmc button.c-btn svg { width: 20px; height: 20px; }
.odq-tmc button.c-pdf { box-shadow: 0 6px 16px rgba(122,63,242,.28); }
.odq-tmc .c-sum { font-size: .82rem; color: var(--c-muted); }
.odq-tmc button:focus { outline: none; }
.odq-tmc button:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* Anteprima: un foglio A4 in piccolo */
.odq-tmc .c-preview-wrap { margin: 1.1rem 0 0; }
.odq-tmc .c-sheet { --cc: #222; --cl: #444; --cb: #ececec; --cs: transparent; --cst: #222;
	width: 100%; max-width: 560px; margin: 0 auto; padding: 4.5% 4.7% 3%; aspect-ratio: 210 / 297; display: flex; flex-direction: column; gap: 1.2%;
	background: #fff; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px rgba(27,24,48,.12); border: 1px solid #ece9f4; container-type: inline-size; }
.odq-tmc .c-sheet-head { text-align: center; line-height: 1.15; }
.odq-tmc .c-sheet-title { display: block; font-family: Helvetica, Arial, sans-serif; font-weight: 700; font-size: 3.4cqw; color: var(--ct, #111); }
.odq-tmc .c-sheet-sub { display: block; margin-top: .3em; font-family: Helvetica, Arial, sans-serif; font-size: 1.6cqw; color: #777; }
.odq-tmc .c-cards { flex: 1 1 auto; display: grid; grid-template-rows: repeat(6, 1fr); gap: 2.2cqw; }
.odq-tmc .c-card { --cc: inherit; display: flex; flex-direction: column; min-height: 0; }
.odq-tmc .c-card-label { display: flex; justify-content: space-between; padding: .25cqw 1cqw; font-family: Helvetica, Arial, sans-serif; font-weight: 700; font-size: 1.5cqw; letter-spacing: .04em; color: var(--cst); background: var(--cs); border-radius: 1cqw 1cqw 0 0; }
.odq-tmc .c-grid { flex: 1 1 auto; display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(3, 1fr); border: .3cqw solid var(--cc); border-radius: 1.1cqw; overflow: hidden; }
.odq-tmc .c-cell { display: grid; place-items: center; min-width: 0; border-right: .12cqw solid var(--cl); border-bottom: .12cqw solid var(--cl); font-family: Helvetica, Arial, sans-serif; font-weight: 700; font-size: 3.5cqw; color: #111; }
.odq-tmc .c-cell:nth-child(9n) { border-right: 0; }
.odq-tmc .c-cell:nth-child(n+19) { border-bottom: 0; }
.odq-tmc .c-cell.is-blank { background: var(--cb); }
.odq-tmc .c-cell img { display: block; width: auto; height: 62%; margin: 0; border: 0; box-shadow: none; }
.odq-tmc .c-sheet[data-stile="natale"] .c-cell.is-blank, .odq-tmc .c-sheet[data-stile="bambini"] .c-cell.is-blank { background: var(--cb); }
.odq-tmc .c-sheet[data-stile="bambini"] .c-cell { font-size: 4.1cqw; }
.odq-tmc .c-sheet[data-stile="bambini"] .c-grid { border-radius: 1.8cqw; }

.odq-tmc .c-foot { margin: 1rem 0 0; font-size: .82rem; color: var(--c-muted); text-align: center; }
.odq-tmc .c-foot a, .odq-tmc .c-credit a { color: var(--c-brand-ink); font-weight: 700; }
.odq-tmc .c-credit { margin: .4rem 0 0; font-size: .72rem; color: var(--c-muted); text-align: center; }
.odq-tmc .c-credit a { font-weight: 600; color: inherit; }
.odq-tmc .c-noscript { margin: .75rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: #fdecea; color: #7a1a14; font-weight: 600; text-align: center; }

@media (max-width: 560px) {
	.odq-tmc { padding: .8rem; border-radius: 14px; }
	.odq-tmc .c-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.odq-tmc .c-actions button.c-btn { flex: 1 1 100%; }
	.odq-tmc .c-sum { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .odq-tmc button.c-switch .c-knob, .odq-tmc button.c-switch .c-knob::after { transition: none; } }

/* Stampa dal browser (Ctrl+P): solo i fogli, senza l'interfaccia. Il percorso previsto resta «Scarica il PDF». */
@media print {
	.odq-tmc .c-settings, .odq-tmc .c-actions, .odq-tmc .c-foot, .odq-tmc .c-note, .odq-tmc .c-noscript { display: none !important; }
	.odq-tmc { border: 0; box-shadow: none; padding: 0; margin: 0; }
}
