/* Artom Scommesse — "la schedina": tagliandi di carta su una notte blu inchiostro */
:root {
  --ink: #0b1020; --ink2: #121936; --ink3: #1a2246; --line: rgba(255, 255, 255, .1);
  --tx: #e9ecf6; --mut: #8f98b8; --paper: #eceff5; --paper-ink: #141a30; --paper-line: rgba(20, 26, 48, .22);
  --red: #e5322d; --red2: #ff5a4d; --blue: #2c4bff; --gold: #ffb81c; --green: #1f9d68; --lose: #ff6b5e;
  --disp: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif; --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 64px; --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--tx); font: 400 16px/1.5 var(--body); min-height: 100dvh;
  background-image: radial-gradient(900px 420px at 12% -6%, rgba(44, 75, 255, .28), transparent 70%), radial-gradient(760px 380px at 100% 0%, rgba(229, 50, 45, .16), transparent 70%);
  background-attachment: fixed;
}
body.noscroll { overflow: hidden; }
h1, h2, h3 { font-family: var(--disp); font-weight: 800; line-height: 1.02; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); }
.h3 { font-size: 1.35rem; margin: 1.4rem 0 .6rem; }
p { margin: 0 0 .8rem; }
a { color: inherit; }
code { font: 500 .92em ui-monospace, Consolas, monospace; background: rgba(255, 255, 255, .08); padding: .1em .4em; border-radius: 5px; }
small, .fine { color: var(--mut); font-size: .84rem; }
.muted { color: var(--mut); }
.lead { color: #c3c9de; max-width: 62ch; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- accesso e schermate singole ---------- */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(460px, 100%); background: var(--ink2); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.gate-card h1 { margin: 22px 0 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand b { font: 800 1.25rem/1 var(--disp); letter-spacing: .02em; }
.brand.lg b { font-size: 1.5rem; }
.logo { display: grid; place-items: center; width: 34px; height: 34px; background: var(--red); color: #fff; font: 900 1.05rem/1 var(--disp); border-radius: 4px; transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--gold); }
.brand.lg .logo { width: 42px; height: 42px; font-size: 1.3rem; }
.err { color: var(--lose); min-height: 1.3em; margin: .3rem 0 .6rem; font-size: .92rem; }
.creds { display: grid; gap: 10px; margin: 12px 0 16px; }
.creds div { background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; }
.creds code { font-size: 1.05rem; background: none; padding: 0; word-break: break-all; }

/* ---------- struttura ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: rgba(11, 16, 32, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-r { display: flex; align-items: center; gap: 12px; }
.pts { display: flex; align-items: baseline; gap: 6px; font-family: var(--disp); }
.pts b { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.pts span { color: var(--mut); font-size: .95rem; }
.live { width: 9px; height: 9px; border-radius: 50%; background: #5b6384; display: inline-block; }
.live.on { background: #35d08a; box-shadow: 0 0 0 4px rgba(53, 208, 138, .18); }
main { width: min(1060px, 100%); margin: 0 auto; padding: 22px 16px calc(var(--nav-h) + 36px + env(safe-area-inset-bottom)); outline: none; }
.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(14, 19, 40, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--mut); font-size: .72rem; position: relative; }
.nav a.on { color: #fff; }
.nav a.on::before { content: ''; position: absolute; top: 0; width: 34px; height: 3px; background: var(--red); border-radius: 0 0 3px 3px; }
.nav em { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font: 700 .7rem/17px var(--body); text-align: center; }
@media (min-width: 900px) {
  .nav { top: 0; bottom: 0; right: auto; width: 92px; height: auto; flex-direction: column; justify-content: flex-start; padding: 84px 0 0; border-top: 0; border-right: 1px solid var(--line); }
  .nav a { flex: 0 0 auto; padding: 14px 0; }
  .nav a.on::before { top: 12px; left: 0; width: 3px; height: 34px; border-radius: 0 3px 3px 0; }
  .top { padding-left: 108px; }
  main { padding: 28px 24px 60px 116px; width: min(1180px, 100%); }
}
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 30px 0 14px; flex-wrap: wrap; }
.sec-h:first-child { margin-top: 4px; }
.lnk { color: var(--gold); text-decoration: none; font-size: .9rem; }
.empty { color: var(--mut); padding: 18px 0; }
.note { background: rgba(255, 184, 28, .1); border: 1px solid rgba(255, 184, 28, .35); color: #ffdf9a; padding: 10px 14px; border-radius: 10px; font-size: .92rem; }
.card { background: var(--ink2); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }

/* ---------- saldo ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 6px 0 4px; }
.score { display: flex; flex-direction: column; line-height: .85; }
.score .lbl { color: var(--mut); font-size: .9rem; line-height: 1.5; }
.score .big { font: 900 clamp(5rem, 22vw, 9.5rem)/.9 var(--disp); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hero-side { display: flex; gap: 28px; }
.stat { display: flex; flex-direction: column; }
.stat b { font: 800 2.2rem/1 var(--disp); }
.stat span { color: var(--mut); font-size: .85rem; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--ink3); border: 1px solid rgba(255, 184, 28, .4); border-radius: var(--r); padding: 14px 16px; margin: 18px 0 0; }
.notice p { margin: .2rem 0 0; color: #c3c9de; font-size: .92rem; }
.pair { display: flex; gap: 8px; }

/* ---------- la schedina ---------- */
.coupon { --cut: 58px; --nt: 9px; position: relative; background: var(--paper); color: var(--paper-ink); border-radius: 4px; display: flex; flex-direction: column; cursor: pointer; transition: transform .16s ease, filter .16s;
  -webkit-mask: radial-gradient(circle var(--nt) at 0 calc(100% - var(--cut)), #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--nt) at 100% calc(100% - var(--cut)), #0000 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle var(--nt) at 0 calc(100% - var(--cut)), #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--nt) at 100% calc(100% - var(--cut)), #0000 97%, #000) right / 51% 100% no-repeat; }
.coupon:hover { transform: translateY(-3px) rotate(-.25deg); }
.coupon.big { cursor: default; }
.coupon.big:hover { transform: none; }
.cp-head { display: flex; justify-content: space-between; gap: 10px; padding: 9px 16px; background: var(--red); color: #fff; font: 700 1.02rem/1.2 var(--disp); letter-spacing: .03em; }
.ph-closed .cp-head { background: var(--blue); } .ph-resolved .cp-head { background: var(--paper-ink); } .ph-void .cp-head, .ph-soon .cp-head { background: #6b738f; }
.cp-head .cd { font-variant-numeric: tabular-nums; }
.cp-title { font: 800 1.7rem/1.05 var(--disp); padding: 16px 16px 4px; }
.cp-desc { padding: 0 16px; margin: 0 0 4px; font-size: .88rem; color: #46506e; }
.cp-q { padding: 0 16px; margin: 4px 0 12px; font-size: .92rem; color: #3b4562; }
.cp-opts { list-style: none; margin: 0; padding: 0 16px 14px; display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 38px 1fr auto; grid-template-rows: auto 5px; column-gap: 12px; row-gap: 5px; align-items: center; }
.opt .box { grid-row: 1; position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--paper-ink); font: 800 1.25rem/1 var(--disp); border-radius: 2px; }
.opt .lab { font-weight: 600; line-height: 1.2; }
.opt .num { font-size: .74rem; color: #566080; white-space: nowrap; }
.opt .bar { grid-column: 2 / 4; grid-row: 2; height: 5px; background: rgba(20, 26, 48, .1); border-radius: 3px; overflow: hidden; }
.opt .bar i { display: block; height: 100%; background: var(--paper-ink); opacity: .7; transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.opt.mine .bar i { background: var(--red); opacity: 1; }
.opt.win .box { background: var(--paper-ink); color: var(--paper); }
.tick { position: absolute; inset: -5px; pointer-events: none; }
.tick::before, .tick::after { content: ''; position: absolute; left: 50%; top: 50%; width: 130%; height: 3.5px; background: var(--red); border-radius: 2px; transform-origin: center; }
.tick::before { transform: translate(-50%, -50%) rotate(41deg); } .tick::after { transform: translate(-50%, -50%) rotate(-47deg); }
.cp-stub { margin-top: auto; min-height: var(--cut); display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 2px dashed var(--paper-line); font-size: .86rem; }
.cta { font: 800 1.2rem/1 var(--disp); color: var(--red); letter-spacing: .02em; }
.cta::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.stamp { position: absolute; right: 14px; top: 46%; transform: rotate(-11deg); padding: 4px 14px; border: 4px double currentColor; border-radius: 6px; font: 900 2.2rem/1 var(--disp); text-align: center; mix-blend-mode: multiply; pointer-events: none; opacity: .9; }
.stamp small { display: block; font: 800 1.1rem/1 var(--disp); color: inherit; }
.stamp.won { color: var(--green); } .stamp.lost { color: var(--red); } .stamp.void { color: #5d6684; font-size: 1.5rem; }
.coupon.big .stamp { animation: stamp .34s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes stamp { from { transform: rotate(-11deg) scale(2); opacity: 0; } to { transform: rotate(-11deg) scale(1); opacity: .9; } }
.coupon.big .cp-title { font-size: 2.1rem; }
.sheet .coupon.big { --nt: 10px; margin-top: 18px; }

/* ---------- finestre ---------- */
#modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-end; justify-content: center; background: rgba(4, 7, 18, .72); backdrop-filter: blur(4px); }
#modal.on { display: flex; }
.sheet { position: relative; width: min(560px, 100%); max-height: 94dvh; overflow-y: auto; background: var(--ink2); border: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .26s cubic-bezier(.2, .8, .2, 1) both; }
.sheet.wide { width: min(860px, 100%); }
.sheet h2 { margin: 4px 36px 12px 0; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { #modal { align-items: center; } .sheet { border-radius: 22px; padding: 26px; } }
.x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); z-index: 2; }
.bet-form { margin-top: 18px; }
.picks { display: grid; gap: 10px; margin-bottom: 14px; }
.pick { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; background: var(--ink3); border: 2px solid var(--line); border-radius: 12px; font-weight: 600; transition: border-color .12s, background .12s; }
.pick .box { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--mut); font: 800 1.15rem/1 var(--disp); border-radius: 2px; }
.pick.on { border-color: var(--red2); background: rgba(229, 50, 45, .14); }
.pick.on .box { background: var(--red); border-color: var(--red); color: #fff; }
.stake { background: var(--ink3); border-radius: 12px; padding: 14px; margin: 12px 0; }
.stake-top { display: flex; justify-content: space-between; align-items: baseline; color: var(--mut); }
.stake-top b { font: 900 2.4rem/1 var(--disp); color: var(--tx); font-variant-numeric: tabular-nums; }
.quick { display: flex; gap: 8px; margin: 8px 0 4px; }
.quick button { flex: 1; padding: 7px 6px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: .85rem; }
.payout { margin: 10px 0 4px; font-size: 1.05rem; }
.payout b { font: 900 1.7rem/1 var(--disp); color: var(--gold); }
input[type=range] { width: 100%; height: 34px; background: none; -webkit-appearance: none; appearance: none; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--red), var(--gold)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--red), var(--gold)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--red); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--red); }

/* ---------- form e bottoni ---------- */
.fld { display: grid; gap: 5px; margin: 0 0 14px; font-size: .9rem; color: #c3c9de; }
.fld small { color: var(--mut); }
input, select, textarea { width: 100%; padding: 11px 12px; background: var(--ink); color: var(--tx); border: 1px solid var(--line); border-radius: 10px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.frow { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.frow > .fld { flex: 1 1 170px; margin-bottom: 8px; } .frow .grow { flex: 2 1 260px; } .frow > .btn { margin-bottom: 8px; }
details { margin-top: 10px; } summary { cursor: pointer; color: var(--gold); padding: 4px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border: 2px solid transparent; border-radius: 10px; font: 800 1.1rem/1 var(--disp); letter-spacing: .03em; background: var(--ink3); text-decoration: none; transition: transform .1s, filter .15s; }
.btn:hover { filter: brightness(1.12); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn.main { background: var(--red); color: #fff; box-shadow: 0 4px 0 #8f1f1c; }
.btn.main:active { box-shadow: 0 2px 0 #8f1f1c; transform: translateY(2px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--tx); }
.btn.ok { background: rgba(31, 157, 104, .18); border-color: var(--green); color: #7be0b3; }
.btn.no { background: rgba(229, 50, 45, .14); border-color: rgba(229, 50, 45, .6); color: #ff9b92; }
.btn.sm { padding: 7px 11px; font-size: .95rem; border-radius: 8px; }
.wide-btn { width: 100%; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; } .row-btns .btn { flex: 1 1 auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 8px 15px; border-radius: 999px; background: transparent; border: 1px solid var(--line); font-size: .9rem; }
.chip.on { background: var(--tx); color: var(--ink); border-color: var(--tx); font-weight: 600; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: .76rem; font-weight: 600; }
.tag.won, .tag.approved { background: rgba(31, 157, 104, .22); color: #7be0b3; } .tag.lost, .tag.rejected { background: rgba(229, 50, 45, .2); color: #ff9b92; }
.tag.open { background: rgba(44, 75, 255, .28); color: #aab8ff; } .tag.pending, .tag.closed { background: rgba(255, 184, 28, .18); color: #ffd477; }
.plain { list-style: none; margin: 0; padding: 0; } .plain li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.todo li { align-items: center; }
.cls { display: inline-block; padding: 1px 7px; border: 1.5px solid var(--mut); border-radius: 3px; font: 700 .82rem/1.4 var(--disp); letter-spacing: .05em; color: #c3c9de; vertical-align: middle; }
.av { display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 50%; font-size: calc(var(--s) * .52); background: linear-gradient(145deg, hsl(var(--h) 70% 42%), hsl(calc(var(--h) + 40) 70% 28%)); border: 2px solid rgba(255, 255, 255, .18); }
.sw { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw i { width: 38px; height: 22px; border-radius: 11px; background: #3a4266; position: relative; transition: background .15s; flex: none; }
.sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sw input:checked + i { background: var(--green); } .sw input:checked + i::after { transform: translateX(16px); }
.sw input:focus-visible + i { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- classifica ---------- */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 12px 0 18px; }
.pod { flex: 1 1 0; max-width: 190px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; background: none; border: 0; text-align: center; }
.pod b { font: 800 1.2rem/1.1 var(--disp); max-width: 100%; overflow-wrap: anywhere; }
.pod .pv { font: 900 1.5rem/1 var(--disp); color: var(--gold); font-variant-numeric: tabular-nums; }
.pod .step { display: grid; place-items: center; width: 100%; margin-top: 8px; font: 900 2.6rem/1 var(--disp); font-style: normal; color: rgba(255, 255, 255, .92); border-radius: 8px 8px 0 0; }
.p1 .step { height: 120px; background: linear-gradient(#ffb81c, #b87a00); } .p2 .step { height: 88px; background: linear-gradient(#aab3cf, #6c7596); } .p3 .step { height: 66px; background: linear-gradient(#cf8b57, #8a5326); }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ink2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.rank li.me { border-color: var(--gold); background: var(--ink3); }
.rank .rk { width: 28px; font: 800 1.35rem/1 var(--disp); color: var(--mut); text-align: center; }
.rank .nm { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rank .bc { color: var(--mut); font-size: .85rem; }
.rank .sc { font: 800 1.35rem/1 var(--disp); min-width: 60px; text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: #7be0b3; } .neg { color: var(--lose); }

/* ---------- profilo e badge ---------- */
.ph { display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; padding-right: 40px; flex-wrap: wrap; }
.ph h2 { margin: 0 0 4px; }
.ph-bal { margin-left: auto; text-align: right; display: flex; flex-direction: column; } .ph-bal b { font: 900 2.6rem/1 var(--disp); } .ph-bal span { color: var(--mut); font-size: .85rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stats div { background: var(--ink3); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.stats b { font: 800 1.9rem/1 var(--disp); } .stats span { color: var(--mut); font-size: .8rem; }
.spark { width: 100%; height: 64px; display: block; } .spark polyline { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-l { display: flex; justify-content: space-between; color: var(--mut); font-size: .75rem; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badges.row { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.bdg { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; opacity: .5; }
.bdg.on { opacity: 1; border: 1px solid rgba(255, 184, 28, .55); background: linear-gradient(160deg, rgba(255, 184, 28, .14), transparent 70%); }
.bdg .bi { font-size: 1.8rem; line-height: 1.2; } .bdg b { font: 800 1.1rem/1.1 var(--disp); } .bdg small { font-size: .76rem; } .bdg em { font-style: normal; color: var(--gold); font-size: .76rem; }
.timeline { list-style: none; margin: 0; padding: 0; } .timeline li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); } .timeline em { margin-left: auto; font-style: normal; color: var(--mut); font-size: .85rem; }
.avgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.avb { aspect-ratio: 1; font-size: 1.6rem; background: var(--ink3); border: 2px solid transparent; border-radius: 12px; } .avb.on { border-color: var(--red2); background: rgba(229, 50, 45, .16); }
.slip { background: var(--ink2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.legs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.legs li { display: flex; flex-direction: column; background: var(--ink3); border-radius: 10px; padding: 10px 40px 10px 12px; position: relative; } .legs span { color: var(--mut); font-size: .88rem; }
.rm { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); }

/* ---------- pannello admin ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px; scrollbar-width: none; }
.tab { flex: none; padding: 9px 16px; border-radius: 999px; background: transparent; border: 1px solid var(--line); font-size: .92rem; } .tab.on { background: var(--tx); color: var(--ink); font-weight: 600; border-color: var(--tx); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--ink2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; } .tile b { font: 900 2.6rem/1 var(--disp); } .tile span { color: var(--mut); font-size: .85rem; } .tile.alert { border-color: var(--gold); }
.tbl-wrap { overflow-x: auto; background: var(--ink2); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; } .tbl th { text-align: left; color: var(--mut); font-weight: 500; font-size: .78rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; } .tbl tr:last-child td { border-bottom: 0; } .tbl tr.off { opacity: .5; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; } .tbl select { padding: 6px 28px 6px 8px; min-width: 90px; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.tbl td.acts { display: table-cell; text-align: right; white-space: nowrap; }
.tbl td.acts .btn { margin: 2px 0 2px 4px; }
.exh { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; } .exh h3 { font-size: 1.5rem; }
.sw.lbl span { font-size: .85rem; color: #c3c9de; }
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 16px; }

/* ---------- avvisi ---------- */
#toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: calc(14px + env(safe-area-inset-top)); display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; padding: 12px 16px; border-radius: 12px; background: var(--ink3); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); animation: tin .25s ease both; font-size: .95rem; }
.toast.win { border-color: var(--green); } .toast.lose { border-color: var(--red); } .toast.badge { border-color: var(--gold); } .toast a { color: var(--gold); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .4s; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 80; }

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