/* ==========================================================================
   Circuito Prime Racchette – foglio di stile
   Stessa impostazione del gestionale (fascia scura, pannelli, Inter),
   con i colori del logo del circuito (blu notte e arancio).
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #f3f4f6; --surface: #ffffff; --surface-2: #f7f8fa;
  --ink: #121a27; --fg: #121a27; --muted: #626b7a; --line: #e1e4ea; --line-strong: #cdd2db;
  --band: #10243f; --band-2: #1b3459; --band-line: #2a4369; --band-ink: #f3f5f9; --band-muted: #a3b2c8;
  --accent: #c4521c; --accent-hover: #a54314; --accent-ink: #ffffff; --accent-soft: #fbe7da; --accent-bright: #f07c34;
  --ok: #1d7448; --ok-bg: #dff1e7; --warn: #8a5a00; --warn-bg: #fbebc8; --err: #a8231b; --err-bg: #fadcd8;
  --live: #b3262d; --live-bg: #fde0df; --mute-bg: #ececea;
  --gold: #b38a14; --silver: #7f8792; --bronze: #a0623a;
  --shadow: 0 1px 2px rgba(20,22,25,.04), 0 6px 20px rgba(20,22,25,.05);
  --radius: 14px; --radius-sm: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d121a; --surface: #161d28; --surface-2: #1b2431; --ink: #ecf0f5; --fg: #ecf0f5; --muted: #9ea8b7; --line: #2a3443; --line-strong: #394557;
    --band: #0b182b; --band-2: #17294a; --band-line: #253a5c;
    --accent: #f28a4a; --accent-hover: #f6a370; --accent-ink: #1f0e03; --accent-soft: #3a2213;
    --ok: #62c995; --ok-bg: #16341f; --warn: #e6ae45; --warn-bg: #3a2c0e; --err: #f2786f; --err-bg: #40191a; --live: #f07a7f; --live-bg: #3d1a1c; --mute-bg: #2a2c2f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d121a; --surface: #161d28; --surface-2: #1b2431; --ink: #ecf0f5; --fg: #ecf0f5; --muted: #9ea8b7; --line: #2a3443; --line-strong: #394557;
  --band: #0b182b; --band-2: #17294a; --band-line: #253a5c;
  --accent: #f28a4a; --accent-hover: #f6a370; --accent-ink: #1f0e03; --accent-soft: #3a2213;
  --ok: #62c995; --ok-bg: #16341f; --warn: #e6ae45; --warn-bg: #3a2c0e; --err: #f2786f; --err-bg: #40191a; --live: #f07a7f; --live-bg: #3d1a1c; --mute-bg: #2a2c2f;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
body.no-scroll { overflow: hidden; }
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; font-weight: 750; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 1rem; }
p { margin: .4em 0 .8em; }
small { font-size: .82em; }
.block { display: block; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.selectable { user-select: all; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.section { padding-block: 28px 48px; }
.band { background: var(--surface-2); border-block: 1px solid var(--line); }
.sub { margin-top: 1.6em; }

/* kicker come nel gestionale */
.eyebrow, .eyebrow-dark { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 6px; }
.eyebrow { color: var(--accent-bright); }
.eyebrow-dark { color: var(--accent); }

/* ---------- fascia superiore ---------- */
.site-header { background: var(--band); color: var(--band-ink); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--band); }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--band-ink); text-decoration: none; margin-right: auto; min-width: 0; }
.brand img { width: 44px; height: 44px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: .95rem; line-height: 1.2; white-space: nowrap; }
.brand-text small { color: var(--band-muted); font-size: .75rem; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav .link-btn { color: #d9dadb; text-decoration: none; padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: .88rem; }
.nav a:hover, .nav .link-btn:hover { background: var(--band-2); color: #fff; }
.nav a.active { background: var(--band-2); color: #fff; }
.nav .nav-cta { background: var(--accent); color: var(--accent-ink); margin-left: 4px; }
.nav .nav-cta:hover, .nav .nav-cta.active { background: var(--accent-hover); color: var(--accent-ink); }
#nav-utente { display: contents; }
.icon-btn.menu-btn { display: none; color: var(--band-ink); border: 1px solid var(--band-line); }
.icon-btn.menu-btn:hover { background: var(--band-2); color: #fff; }
@media (max-width: 860px) {
  .icon-btn.menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--band);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--band-line); }
  .nav.open { display: flex; }
  .nav a, .nav .link-btn { padding: 12px; text-align: left; }
  .nav .nav-cta { margin: 6px 0 0; text-align: center; }
  .brand-text small { display: none; }
}

/* ---------- hero home (pannello scuro come l'accesso del gestionale) ---------- */
.hero { padding-block: 22px 8px; }
.hero-inner {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px; align-items: center;
  padding: clamp(26px, 5vw, 52px); border-radius: 24px; color: #fff;
  background: radial-gradient(ellipse at 10% 0%, rgba(240,124,52,.22), transparent 50%), linear-gradient(150deg, #17325a 0%, #0c1b31 100%);
  box-shadow: 0 24px 60px rgba(20,22,25,.14);
}
.hero-inner::after { content: ""; position: absolute; z-index: -1; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -150px; bottom: -160px; box-shadow: 0 0 0 34px rgba(255,255,255,.02), 0 0 0 74px rgba(255,255,255,.015); }
.hero-net { display: none; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; letter-spacing: -.04em; margin: 10px 0 16px; }
.lead { font-size: 1rem; line-height: 1.7; color: #d3d5d8; max-width: 52ch; margin: 0; }
.lead-dark { color: var(--muted); max-width: 62ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-season { display: inline-flex; align-items: center; gap: 9px; padding: 7px 13px; border: 1px solid rgba(255,255,255,.17); border-radius: 99px; font-size: .78rem; color: #e4e6e8; }
.hero-season::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); }
.hero-next { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 22px; min-width: 0; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hero-next .eyebrow { color: var(--accent); }
.hero-next h2 { font-size: 1.3rem; margin: 2px 0 4px; }
.hero-next p { margin: 0 0 10px; color: var(--muted); }
.next-date { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.next-date span { font-size: 3.2rem; font-weight: 800; line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.next-date small { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); line-height: 1.3; font-weight: 700; }
.hero-next .btn { margin-top: 12px; width: 100%; }
@media (max-width: 760px) { .hero-inner { grid-template-columns: 1fr; gap: 24px; border-radius: 18px; } }

/* ---------- pulsanti (come gestionale) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 650 .88rem/1.2 var(--font); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary, .btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost-light:hover:not(:disabled) { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); }
.btn-light { background: var(--band); border-color: var(--band); color: #fff; }
.btn-light:hover:not(:disabled) { background: var(--band-2); border-color: var(--band-2); }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-soft:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); background: var(--err); border-color: var(--err); }
.btn-lg { min-height: 46px; padding: 11px 18px; font-size: .95rem; border-radius: 10px; }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: .82rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: .95rem; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.icon-btn.danger:hover, .link-btn.danger:hover { color: var(--err); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger, .danger { color: var(--err); }
.link-arrow { font-weight: 650; text-decoration: none; font-size: .88rem; }

/* ---------- pill / tag ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 650; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip-ok { color: var(--ok); background: var(--ok-bg); }
.chip-warn { color: var(--warn); background: var(--warn-bg); }
.chip-err { color: var(--err); background: var(--err-bg); }
.chip-live { color: var(--live); background: var(--live-bg); }
.chip-live::before { animation: pulse 1.4s ease-in-out infinite; }
.chip-muted { color: var(--muted); background: var(--mute-bg); }
@keyframes pulse { 50% { opacity: .3; } }
.tag { display: inline-block; padding: 2px 9px; border-radius: 7px; background: var(--mute-bg); color: var(--ink); font-size: .76rem; font-weight: 600; }
.count { display: inline-block; font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--mute-bg); padding: 2px 9px; border-radius: 99px; vertical-align: middle; letter-spacing: 0; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }

/* ---------- pannelli ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 1.15rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.block { margin-top: 24px; }
.block > h2, .block > h3 { margin-bottom: 12px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }

/* ---------- tappe ---------- */
.tappe-list { display: flex; flex-direction: column; gap: 10px; }
.tappa-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s; }
.tappa-card:hover { border-color: var(--accent); }
.tappa-card h3 { margin: 4px 0 2px; font-size: 1.05rem; }
.tappa-data { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; line-height: 1; }
.tappa-data .g { font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tappa-data .m { text-transform: uppercase; font-size: .68rem; font-weight: 800; letter-spacing: .12em; margin-top: 3px; color: var(--accent); }
.tappa-data .a { font-size: .66rem; color: var(--muted); margin-top: 3px; }
.tappa-data.small { width: 52px; padding: 6px 2px; }
.tappa-data.small .g { font-size: 1.3rem; }
.tappa-thumb { width: 64px; height: 86px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.meta { margin: 0; color: var(--muted); font-size: .86rem; }
.meta .chip { white-space: normal; }
.tappa-top { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .tappa-card { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; } .tappa-thumb { display: none; } }

.tappa-hero { padding-block: 22px 0; }
.tappa-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3.5vw, 32px); box-shadow: var(--shadow); }
.tappa-hero h1 { margin: 10px 0 18px; }
.back { color: var(--muted); text-decoration: none; font-size: .84rem; font-weight: 600; display: inline-block; margin-bottom: 10px; }
.back:hover { color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 20px; margin: 0 0 6px; }
.facts div { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.note { background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 10px; margin-top: 16px; white-space: pre-line; max-width: 70ch; }
.chiusura { margin: 14px 0 0; font-weight: 650; }
.locandina img { width: 240px; max-width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (max-width: 760px) { .tappa-hero-inner { grid-template-columns: 1fr; } .locandina img { width: 100%; max-width: 360px; } }

/* ---------- passi ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); font-weight: 800; font-size: .9rem; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 8px; }
.steps strong { font-size: .95rem; }
.steps span { color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- schede ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--mute-bg); border-radius: 11px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; width: fit-content; max-width: 100%; }
.tab { background: none; border: 0; padding: 8px 14px; font: 650 .86rem var(--font); color: var(--muted); cursor: pointer; border-radius: 8px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- tabelle ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card .table-scroll, .girone .table { border: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); font-weight: 750; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 4px; }
.table.compact td, .table.compact th { padding: 8px 11px; }
.table.narrow { max-width: 360px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.podio td:first-child { font-weight: 800; }
.podio.p1 td:first-child { color: var(--gold); }
.podio.p2 td:first-child { color: var(--silver); }
.podio.p3 td:first-child { color: var(--bronze); }
.isc-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.fitet-cell { min-width: 150px; }
.fitet-cell .link-btn { font-size: .8rem; }

/* ---------- liste ---------- */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list small { color: var(--muted); text-align: right; }
.editable-list { margin-bottom: 14px; }
.grid-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }

/* ---------- campi (come gestionale) ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: .8rem; font-weight: 650; color: var(--ink); padding: 0; }
.req { color: var(--err); }
.opt { font-weight: 450; color: var(--muted); }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 11px; min-height: 40px; width: 100%; min-width: 0; max-width: 100%; }
textarea { min-height: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
input[type=file] { padding: 5px; font-size: .85rem; color: var(--muted); }
input[type=file]::file-selector-button { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 7px; padding: 5px 11px; margin-right: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.select-sm { width: auto; min-height: 32px; padding: 5px 9px; font-size: .86rem; }
.search { width: 230px; max-width: 100%; }
.hint { color: var(--muted); font-size: .82rem; margin: 0; }
p.hint.danger { color: var(--err); }
.form-error { color: var(--err); background: var(--err-bg); padding: 10px 12px; border-radius: 8px; font-size: .86rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; margin-bottom: 14px; }
.check.inline { display: inline-flex; margin: 0; }
.row-wrap .check { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .choice-row { grid-template-columns: 1fr; } }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; cursor: pointer; background: var(--surface); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice span { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; }
.choice small { color: var(--muted); font-size: .8rem; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-wrap input { width: auto; flex: 1 1 160px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.toolbar p { margin: 0; }
.inline-field { display: flex; flex-direction: column; gap: 5px; font-size: .74rem; font-weight: 650; color: var(--muted); }
.inline-field select { font-size: .92rem; color: var(--ink); font-weight: 400; width: auto; min-width: 150px; max-width: 100%; }

/* ---------- accesso e registrazione (come gestionale) ---------- */
.login-shell { max-width: 980px; margin: 28px auto; display: grid; grid-template-columns: 1fr .95fr; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 24px 70px rgba(20,22,25,.12); }
.login-shell.wide { grid-template-columns: .8fr 1.2fr; max-width: 1060px; }
.login-brand { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px, 5vw, 56px); color: #fff; background: radial-gradient(ellipse at 12% 8%, rgba(240,124,52,.26), transparent 46%), linear-gradient(150deg, #17325a 0%, #0c1b31 100%); }
.login-brand::after { content: ""; position: absolute; z-index: -1; width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -150px; bottom: -130px; box-shadow: 0 0 0 32px rgba(255,255,255,.02), 0 0 0 70px rgba(255,255,255,.015); }
.brand-mark { display: grid; place-items: center; width: 108px; height: 108px; margin-bottom: 24px; border-radius: 50%; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.brand-mark img { width: 100px; height: 100px; border-radius: 50%; }
.login-brand h1 { font-size: clamp(1.9rem, 3.5vw, 2.5rem); line-height: 1.08; letter-spacing: -.04em; margin: 12px 0 16px; max-width: 420px; }
.login-brand > p { font-size: .98rem; line-height: 1.7; color: #d3d5d8; max-width: 340px; margin: 0; }
.login-brand ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: .88rem; color: #d3d5d8; }
.login-brand li { display: flex; gap: 10px; align-items: flex-start; }
.login-brand li::before { content: "✓"; color: var(--accent-bright); font-weight: 800; }
.login-panel { padding: clamp(26px, 4vw, 46px); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.login-heading { margin-bottom: 22px; }
.login-heading h2 { font-size: 1.8rem; letter-spacing: -.035em; margin: 6px 0 5px; }
.login-heading p { margin: 0; font-size: .92rem; color: var(--muted); }
.login-panel .field { margin-bottom: 15px; }
.login-panel input:not([type=checkbox]):not([type=radio]), .login-panel select { min-height: 46px; border-radius: 10px; background: var(--bg); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.password-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.eye-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-submit { width: 100%; min-height: 46px; margin-top: 4px; border-radius: 10px; font-size: .95rem; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.register-btn { width: 100%; min-height: 44px; }
.forgot-link { display: block; margin: 14px auto 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.login-note { font-size: .76rem; line-height: 1.5; text-align: center; color: var(--muted); margin: 20px 0 0; }
.required-note { font-size: .8rem; color: var(--muted); margin: 0 0 14px; }
.password-help { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.password-count { font-size: .76rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.password-rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
.password-rules li { font-size: .76rem; color: var(--muted); display: flex; gap: 6px; font-weight: 500; }
.password-rules li::before { content: "○"; font-weight: 800; line-height: 1.25; }
.password-rules li.valid, .password-match.valid { color: var(--ok); }
.password-rules li.valid::before { content: "✓"; }
.password-match { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.password-match.invalid { color: var(--err); }
.login-done { max-width: 520px; margin: 48px auto; }
@media (max-width: 820px) {
  .login-shell, .login-shell.wide { grid-template-columns: 1fr; max-width: 520px; margin: 14px auto; border-radius: 18px; }
  .login-brand { padding: 24px 26px 22px; }
  .brand-mark { width: 76px; height: 76px; margin-bottom: 14px; } .brand-mark img { width: 68px; height: 68px; }
  .login-brand h1 { font-size: 1.6rem; margin: 8px 0; }
  .login-brand > p { font-size: .9rem; line-height: 1.5; }
  .login-brand ul { display: none; }
}
@media (max-width: 400px) { .password-rules { grid-template-columns: 1fr; } }

/* ---------- avvisi / stati ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 14px; font-size: .9rem; border: 1px solid transparent; }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-error { background: var(--err-bg); color: var(--err); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 30px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface); }
.empty strong { color: var(--ink); font-size: 1rem; }
.empty p { margin: 0 0 8px; max-width: 48ch; }

/* ---------- area società ---------- */
.area-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; padding: clamp(18px, 3vw, 28px); border-radius: 18px; background: linear-gradient(125deg, var(--surface), var(--accent-soft)); border: 1px solid var(--line); }
.area-head h1 { margin: 0; }
.isc-card { margin-bottom: 14px; padding: 16px; }
.isc-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.isc-head > div:nth-child(2) { flex: 1; min-width: 0; }
.isc-head h3 { margin: 0 0 2px; }
.isc-head h3 a { color: inherit; text-decoration: none; }

/* ---------- giorno di gara ---------- */
.admin-bar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.admin-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.step { font-size: .76rem; font-weight: 650; padding: 3px 10px; border-radius: 99px; background: var(--mute-bg); color: var(--muted); }
.step.done { background: var(--ok-bg); color: var(--ok); }
.step.doing { background: var(--warn-bg); color: var(--warn); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.gironi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.girone { padding: 0; overflow: hidden; }
.girone-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.girone-head h4 { margin: 0; }
.standings tr.qualified td:nth-child(2) { font-weight: 700; }
.standings tr.qualified td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.matches { list-style: none; margin: 0; padding: 6px; border-top: 1px solid var(--line); background: var(--surface-2); }
.match-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; padding: 8px; border-radius: 8px; font: inherit; font-size: .86rem; color: var(--ink); background: none; border: 1px solid transparent; text-align: left; }
.match-row.editable { cursor: pointer; }
.match-row.editable:hover { background: var(--surface); border-color: var(--line); }
.m-turno { font-size: .68rem; color: var(--muted); font-weight: 700; }
.m-g { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-g.right { text-align: right; }
.m-g.win { font-weight: 750; }
.m-score { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--muted); min-width: 34px; text-align: center; }
.m-sets { grid-column: 2 / -1; color: var(--muted); font-size: .74rem; text-align: center; margin-top: -4px; font-variant-numeric: tabular-nums; }
.bracket-scroll { overflow-x: auto; padding-bottom: 8px; }
.bracket { display: grid; grid-template-columns: repeat(var(--turni), minmax(190px, 1fr)); gap: 16px; min-width: calc(var(--turni) * 200px); }
.b-col h5 { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; font-weight: 800; }
.b-matches { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; height: calc(100% - 26px); }
.b-match { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font: inherit; font-size: .86rem; color: var(--ink); padding: 0; text-align: left; width: 100%; box-shadow: var(--shadow); }
.b-match.editable { cursor: pointer; }
.b-match.editable:hover { border-color: var(--accent); }
.b-match.bye { opacity: .7; }
.b-p { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; }
.b-p + .b-p { border-top: 1px solid var(--line); }
.b-p > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-p.win { font-weight: 750; background: var(--accent-soft); }
.b-p b { font-variant-numeric: tabular-nums; }
.b-match small { color: var(--muted); font-size: .72rem; padding: 3px 10px 6px; font-variant-numeric: tabular-nums; }

.score-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; font-weight: 750; align-items: center; margin-bottom: 8px; }
.score-head span:last-child { text-align: right; }
.sets { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.set-row { display: grid; grid-template-columns: 56px 1fr auto 1fr; gap: 10px; align-items: center; }
.set-n { font-size: .76rem; color: var(--muted); font-weight: 700; }
.set-row input { text-align: center; font-size: 1.25rem; font-weight: 750; min-height: 48px; font-variant-numeric: tabular-nums; }
.score-live { min-height: 1.4em; font-weight: 650; margin: 0; }
.score-live.ok { color: var(--ok); }
.score-live.err { color: var(--err); }
.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.more summary { cursor: pointer; color: var(--muted); font-size: .86rem; margin-bottom: 10px; }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--muted); padding: 6px 10px; font: 600 .8rem var(--font); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on.ok { background: var(--ok-bg); color: var(--ok); }
.seg button.on.no { background: var(--err-bg); color: var(--err); }

/* ---------- modale / avviso ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(10,11,12,.5); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: max(24px, env(safe-area-inset-top, 0px)) 12px 24px; overflow-y: auto; animation: fade .15s ease-out; }
.modal { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 560px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: rise .18s ease-out; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--band); color: #fff; border: 1px solid var(--band-line); padding: 11px 16px; border-radius: var(--radius-sm); font-weight: 500; z-index: 60; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--err); border-color: var(--err); }
.toast-warn { background: #6b4700; border-color: #6b4700; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }

/* ---------- piè di pagina ---------- */
.site-footer { background: var(--band); color: var(--band-muted); margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-block: 26px calc(26px + env(safe-area-inset-bottom, 0px)); font-size: .86rem; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand img { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.footer-inner p { max-width: 48ch; margin: 4px 0 0; }
.footer-inner strong { color: var(--band-ink); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--band-ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- società organizzatrici ---------- */
.org-section { padding-block: 22px 0; }
.org-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.org-card { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 12px; box-shadow: var(--shadow); text-align: center; min-width: 0; }
.org-logo { display: grid; place-items: center; height: 86px; width: 100%; background: #fff; border-radius: 10px; }
.org-logo img { max-height: 80px; max-width: 100%; object-fit: contain; }
.org-name { font-weight: 650; font-size: .86rem; line-height: 1.3; }
@media (max-width: 760px) { .org-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.loghi { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.logo-chip { display: grid; place-items: center; background: #fff; border-radius: 10px; height: 52px; min-width: 52px; padding: 4px 8px; }
.logo-chip img { max-height: 44px; max-width: 96px; object-fit: contain; }
.loghi.small .logo-chip { height: 40px; min-width: 40px; border-radius: 8px; }
.loghi.small .logo-chip img { max-height: 32px; max-width: 72px; }
.login-org { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.login-org > span { font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--band-muted); }
#footer-loghi { margin-top: 12px; }

/* ---------- modulo tappa ---------- */
.form-sec { margin: 22px 0 10px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.form-sec:first-of-type { border-top: 0; padding-top: 0; margin-top: 4px; }
.grid-tit { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.cat-orari { display: grid; gap: 8px; margin-bottom: 6px; }
.cat-ora { display: grid; grid-template-columns: auto 1fr 120px; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.cat-ora span { display: flex; flex-direction: column; min-width: 0; }
.cat-ora small { color: var(--muted); }
.cat-ora input[type=time]:disabled { opacity: .4; }
@media (max-width: 520px) { .cat-ora { grid-template-columns: auto 1fr; } .cat-ora input[type=time] { grid-column: 2; } .grid-tit { grid-template-columns: 80px 1fr; } }

/* ---------- pagina tappa ---------- */
.orari { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; max-width: 520px; }
.orari li { display: flex; gap: 14px; align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.orari .ora { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 1.05rem; color: var(--accent); min-width: 52px; }
.orari li span:last-child { display: flex; flex-direction: column; }
.orari small { color: var(--muted); }
.prova { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.tag b { font-variant-numeric: tabular-nums; }

/* ---------- locandina generata ---------- */
body.poster-mode .site-header, body.poster-mode .site-footer { display: none; }
body.poster-mode { background: #e9e9e6; }
.poster-tools { display: flex; gap: 8px; align-items: center; max-width: 794px; margin: 16px auto 0; padding: 0 16px; flex-wrap: wrap; }
.poster-tools .spacer { flex: 1; }
.poster { --pa: #d65a1f; --pb: #10243f; width: min(794px, calc(100% - 32px)); margin: 16px auto 32px; background: #fff; color: #17191c; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.12); overflow: hidden; display: flex; flex-direction: column; font-family: var(--font); }
.poster-head { background: var(--pb); color: #fff; display: flex; align-items: center; gap: 18px; padding: 28px 32px; position: relative; }
.poster-logo { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 3px #fff; flex: none; }
.poster-kicker { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #f5a26c; font-weight: 700; }
.poster-head h1 { margin: 2px 0 0; font-size: clamp(1.8rem, 5vw, 2.9rem); line-height: 1; letter-spacing: -.02em; color: #fff; }
.poster-prova { margin-left: auto; flex: none; width: 92px; height: 92px; border-radius: 50%; background: var(--pa); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: .1em; }
.poster-prova b { font-size: 2.2rem; line-height: 1; letter-spacing: 0; }
.poster-when { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 28px 32px 8px; }
.poster-date { display: flex; flex-direction: column; align-items: center; border-right: 3px solid var(--pa); padding-right: 28px; }
.poster-date .g { font-size: 5.2rem; font-weight: 800; line-height: .9; letter-spacing: -.04em; }
.poster-date .m { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--pa); }
.poster-date .a { font-size: .85rem; color: #555; text-transform: capitalize; }
.poster-where { display: flex; flex-direction: column; gap: 4px; font-size: 1.05rem; }
.poster-where strong { font-size: 1.45rem; line-height: 1.2; }
.poster-org { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: .92rem; color: #444; }
.poster-org img { height: 40px; max-width: 90px; object-fit: contain; }
.poster-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 20px 32px; }
.poster-cat { border: 2px solid var(--pb); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.poster-cat .ora { font-weight: 800; color: var(--pa); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.poster-cat strong { font-size: 1.5rem; line-height: 1.1; }
.poster-cat small { color: #555; font-size: .9rem; }
.poster-info { padding: 4px 32px 8px; }
.poster-chi { font-size: 1rem; margin: 0 0 12px; }
.poster-info ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.poster-info li { background: #f2f4f4; border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.poster-info li span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #555; font-weight: 700; }
.poster-info li b { font-size: 1.1rem; }
.poster-iscr { margin: 16px 32px; background: var(--pa); color: #fff; border-radius: 14px; padding: 18px 20px; display: flex; gap: 18px; align-items: center; justify-content: space-between; }
.poster-iscr > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.poster-iscr strong { font-size: 1.2rem; }
.poster-link { font-weight: 800; font-size: 1.05rem; word-break: break-all; }
.poster-qr { flex: none; width: 112px; height: 112px; background: #fff; padding: 8px; border-radius: 10px; }
.poster-qr svg { width: 100%; height: 100%; display: block; }
.poster-premi { margin: 0 32px 16px; text-align: center; font-weight: 800; font-size: 1.1rem; padding: 12px; border: 2px dashed var(--pa); border-radius: 12px; }
.poster-foot { margin-top: auto; border-top: 1px solid #e3e3df; padding: 16px 32px 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.poster-foot span { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: #666; font-weight: 700; }
.poster-foot div { display: flex; gap: 26px; align-items: center; justify-content: center; flex-wrap: wrap; }
.poster-foot img { height: 54px; max-width: 120px; object-fit: contain; }
@media (max-width: 600px) {
  .poster-head { padding: 20px; gap: 12px; } .poster-logo { width: 52px; height: 52px; } .poster-prova { width: 64px; height: 64px; font-size: .6rem; } .poster-prova b { font-size: 1.5rem; }
  .poster-when { grid-template-columns: 1fr; padding: 20px; gap: 14px; } .poster-date { border-right: 0; border-bottom: 3px solid var(--pa); padding: 0 0 12px; }
  .poster-cats, .poster-info { padding-inline: 20px; } .poster-iscr, .poster-premi { margin-inline: 20px; } .poster-qr { width: 84px; height: 84px; }
}
@media print {
  @page { size: A4 portrait; margin: 0; }
  body.poster-mode { background: #fff; }
  .poster-tools { display: none; }
  .poster { width: 210mm; min-height: 296mm; margin: 0; box-shadow: none; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.col-tappa { min-width: 220px; }
.actions .acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 300px; margin-left: auto; }
.cat-ora input[type=time] { min-width: 0; }
@media (min-width: 521px) { .cat-ora { grid-template-columns: auto 1fr 136px; } }
.passi-nota { margin: 14px 0 0; }
.hero-brand { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); margin-bottom: 20px; }
.hero-brand h1 { margin-bottom: 0; }
.hero-logo { width: clamp(112px, 15vw, 176px); height: auto; aspect-ratio: 1; flex: none; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.92), 0 18px 40px rgba(0,0,0,.35); }
@media (max-width: 560px) { .hero-brand { flex-direction: column; align-items: flex-start; } .hero-logo { width: 132px; } }
.choice-row.three { grid-template-columns: 1fr; }
.mini-azioni { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: .9rem; }

/* Composizione gironi */
.modal.modal-wide { max-width: 1040px; }
.ge-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; }
.ge-stato { font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: var(--radius-sm); margin: 8px 0 14px; }
.ge-stato.ok { background: color-mix(in srgb, #1f8a4c 12%, transparent); color: #1b6b3d; }
.ge-stato.warn { background: color-mix(in srgb, #c98a00 16%, transparent); color: #6b4700; }
.ge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ge-gir { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card, var(--bg)); }
.ge-gir h4 { margin: 0 0 6px; font-size: 1rem; display: flex; gap: 8px; align-items: baseline; }
.ge-gir ul { list-style: none; margin: 0; padding: 0; }
.ge-row { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 6px; align-items: center; padding: 6px 4px; border-top: 1px solid var(--line); }
.ge-row:first-child { border-top: 0; }
.ge-row.conflitto { background: color-mix(in srgb, #c98a00 14%, transparent); border-radius: 6px; }
.ge-ts { color: var(--accent); font-weight: 800; }
.ge-nome { display: flex; flex-direction: column; min-width: 0; font-weight: 600; font-size: .93rem; }
.ge-nome small { font-weight: 400; color: var(--muted); font-size: .78rem; }
.ge-row:not(:has(.ge-btn)) .ge-sel { grid-column: 3 / 5; justify-self: end; }
.ge-sel { max-width: 120px; }
.ts { color: var(--accent); font-size: .85em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ge-stato.ok { color: #7fd6a3; } :root:not([data-theme="light"]) .ge-stato.warn { color: #f2c46b; } }

/* Certificati medici */
.cert-list { list-style: none; margin: 0 0 16px; padding: 0; }
.cert-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cert-form { border-top: 1px solid var(--line); padding-top: 14px; }
.cert-form h4 { margin: 0 0 10px; }
.cert-form input[type=file] { width: 100%; }
