:root {
  color-scheme: light;
  --system-bar: #F6E3AF;
  --cream: #FDF7EB;
  --cream-2: #F6EBD3;
  --cream-3: #EFDFBC;
  --card: #FFFDF8;
  --navy: #152242;
  --navy-2: #24386f;
  --navy-soft: #e8ebf5;
  --gold: #E6BE69;
  --gold-2: #F4D993;
  --gold-deep: #b98a25;
  --muted: #65708f;
  --ok: #2c8a58;
  --ok-bg: #dff3e7;
  --danger: #c4432c;
  --danger-bg: #fbe3dd;
  --warn-bg: #fdf0cf;
  --radius: 22px;
  --shadow: 0 2px 0 rgba(21, 34, 66, .06), 0 14px 30px -14px rgba(21, 34, 66, .28);
  --font: "Baloo 2", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Trebuchet MS", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background-color: var(--system-bar); color: var(--navy); font-family: var(--font);
  font-size: 17px; line-height: 1.4; min-height: 100vh; min-height: 100dvh;
  background-image: linear-gradient(to bottom, var(--system-bar) 0, transparent 220px), radial-gradient(circle at 12% -5%, var(--gold-2) 0, transparent 34%), radial-gradient(circle at 105% 30%, #f2e4c2 0, transparent 30%), linear-gradient(var(--cream), var(--cream));
  background-attachment: fixed;
}
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
a { color: var(--navy-2); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.hide { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grow { flex: 1; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- Layout app utenti ---------- */
.app { max-width: 560px; margin: 0 auto; padding: 18px 16px 110px; }
.topbar { display: flex; align-items: center; justify-content: center; padding: 6px 0 14px; }
.topbar img { height: 92px; width: auto; }
.logo-sm { height: 54px !important; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--cream) 60%, transparent);
}
/* Non animare: la barra non deve attraversare il modulo con la tastiera. */
.navigation-keyboard .tabbar { visibility: hidden; pointer-events: none; }
.tabbar nav {
  display: flex; gap: 4px; background: var(--navy); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); width: 100%; max-width: 520px;
}
.tabbar a {
  flex: 1; text-align: center; padding: 9px 4px 7px; border-radius: 999px; color: #cdd3ea; text-decoration: none; font-weight: 700; font-size: .78rem; line-height: 1.1;
}
.tabbar a b { display: block; font-size: 1.25rem; line-height: 1.2; }
.tabbar a.active { background: var(--gold); color: var(--navy); }

/* ---------- Componenti ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 2px solid var(--navy);
  position: relative;
}
.card.gold { background: var(--gold); }
.card.navy { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.card.navy .muted { color: #b5bfdf; }
.card.flat { box-shadow: none; }
.card h2 { margin-bottom: .3em; }
.suit { position: absolute; right: 16px; top: 10px; font-size: 1.6rem; opacity: .18; pointer-events: none; }

.btn {
  appearance: none; border: 2px solid var(--navy); background: var(--navy); color: var(--cream); font: inherit; font-weight: 800;
  padding: 13px 22px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s ease, box-shadow .08s ease, background .15s; box-shadow: 0 4px 0 rgba(21, 34, 66, .35); min-height: 50px;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(21, 34, 66, .35); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: none; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: 0 4px 0 rgba(120, 30, 15, .35); }
.btn.sm { min-height: 38px; padding: 7px 14px; font-size: .9rem; box-shadow: 0 3px 0 rgba(21, 34, 66, .3); }
.btn.block { width: 100%; }
.btn.tiny { min-height: 30px; padding: 3px 11px; font-size: .8rem; box-shadow: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: .8rem;
  background: var(--navy-soft); color: var(--navy); border: 1.5px solid rgba(21, 34, 66, .18); white-space: nowrap;
}
.chip.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(44, 138, 88, .3); }
.chip.bad { background: var(--danger-bg); color: var(--danger); border-color: rgba(196, 67, 44, .3); }
.chip.warn { background: var(--warn-bg); color: #8a6412; border-color: rgba(185, 138, 37, .4); }
.chip.gold { background: var(--gold); border-color: var(--navy); }

label.field { display: block; font-weight: 700; font-size: .92rem; }
.field > span { display: block; margin: 0 0 4px 4px; }
input, select, textarea {
  width: 100%; font: inherit; font-weight: 600; color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 16px;
  padding: 12px 14px; min-height: 48px; outline: none;
}
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px var(--gold-2); }
input:disabled { background: var(--cream-2); color: var(--muted); }
input::placeholder { color: #a5abc0; font-weight: 500; }
input[type=checkbox] { width: 24px; height: 24px; min-height: 0; accent-color: var(--navy); flex: none; }
input[type=number] { -moz-appearance: textfield; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: .92rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 440px) { .grid2.collapse { grid-template-columns: 1fr; } }

.seg { display: flex; background: var(--cream-2); border: 2px solid var(--navy); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { flex: 1; font: inherit; font-weight: 800; border: 0; background: transparent; color: var(--navy); padding: 10px 6px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--navy); color: var(--cream); }

.progress { height: 14px; border-radius: 99px; background: var(--cream-3); border: 2px solid var(--navy); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--gold); border-right: 2px solid var(--navy); transition: width .4s; }
.progress.big { height: 22px; }

.notice { border-radius: 18px; padding: 12px 14px; font-weight: 600; font-size: .92rem; background: var(--warn-bg); border: 2px solid var(--gold-deep); }
.notice.bad { background: var(--danger-bg); border-color: var(--danger); }
.notice.ok { background: var(--ok-bg); border-color: var(--ok); }
.notice.info { background: var(--navy-soft); border-color: var(--navy); }

.toast-wrap { position: fixed; left: 0; right: 0; top: 12px; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { background: var(--navy); color: var(--cream); padding: 12px 20px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); animation: pop .25s ease; max-width: 92vw; }
.toast.bad { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes pop { from { transform: translateY(-14px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-bg { position: fixed; inset: 0; background: rgba(21, 34, 66, .55); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@media (min-width: 620px) { .modal-bg { align-items: center; } }
.modal {
  background: var(--cream); border: 2px solid var(--navy); border-radius: 28px 28px 0 0; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: rise .2s ease;
  display: flex; flex-direction: column; gap: 14px;
}
.modal > * { margin: 0; }
.modal > .row { gap: 12px; }
@media (min-width: 620px) { .modal { border-radius: 28px; } }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.modal p { white-space: pre-line; }

/* ---------- Tabelle ---------- */
.tablewrap { overflow-x: auto; border-radius: 16px; border: 2px solid var(--navy); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th { background: var(--navy); color: var(--cream); text-align: left; padding: 9px 10px; font-weight: 800; white-space: nowrap; }
td { padding: 9px 10px; border-top: 1px solid var(--cream-3); vertical-align: middle; }
tr:nth-child(even) td { background: #fffaf0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Home / selezione ---------- */
.hero { text-align: center; }
.countdown { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.countdown div { background: var(--navy); color: var(--cream); border-radius: 16px; padding: 8px 10px; min-width: 64px; }
.card.navy .countdown div { background: rgba(255, 255, 255, .12); }
.countdown b { display: block; font-size: 1.6rem; line-height: 1; }
.countdown span { font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-2); }

.team-list { display: grid; gap: 8px; }
.team-btn {
  font: inherit; font-weight: 800; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 2px solid var(--navy); background: #fff; color: var(--navy); border-radius: 18px; padding: 13px 16px; cursor: pointer; min-height: 54px;
}
.team-btn:active { background: var(--gold-2); }
.team-btn[disabled] { opacity: .45; background: var(--cream-2); cursor: not-allowed; text-decoration: line-through; }

.codebox { font-size: 2.6rem; font-weight: 800; letter-spacing: .18em; text-align: center; background: var(--navy); color: var(--gold); border-radius: 20px; padding: 14px 8px 14px 20px; user-select: all; }
.codeinput { text-align: center; font-size: 1.9rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 800; }

/* ---------- Partita ---------- */
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.timer { text-align: center; }
.timer .clock { font-size: 4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer.low .clock { color: #ff8b73; animation: pulse 1s infinite; }
.timer.over .clock { color: var(--gold); }
.card.navy .progress { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .35); }
@keyframes pulse { 50% { opacity: .55; } }
.tablebadge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 84px; padding: 8px 16px; border-radius: 20px; background: var(--gold); color: var(--navy); border: 2px solid var(--navy); box-shadow: 0 4px 0 rgba(21, 34, 66, .3); line-height: 1; }
.tablebadge small { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tablebadge b { font-size: 2.3rem; font-weight: 800; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; text-align: center; }
.vs .team { font-weight: 800; font-size: 1.05rem; line-height: 1.15; overflow-wrap: break-word; word-break: normal; }
.vs .team.me { color: var(--gold-deep); }
.vs .sep { font-weight: 800; background: var(--gold); border: 2px solid var(--navy); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; font-size: .78rem; }
.mini > * + * { margin-top: 4px; }

/* Foglio punteggio */
.sheet { border: 2px solid var(--navy); border-radius: 20px; overflow: hidden; background: #fff; }
.sheet .srow { display: grid; grid-template-columns: 100px 1fr 1fr; gap: 8px; align-items: center; padding: 8px 12px; border-top: 2px dashed var(--cream-3); }
.sheet .shead { background: var(--navy); color: var(--cream); font-weight: 800; font-size: .82rem; border-top: 0; text-align: center; }
.sheet .shead > :first-child { text-align: left; }
.sheet .hand { background: var(--gold-2); font-weight: 800; grid-template-columns: 1fr auto; border-top: 2px solid var(--navy); }
.sheet .lbl { font-size: .76rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sheet .val { text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; min-height: 46px; display: grid; place-items: center; background: var(--cream-2); border-radius: 14px; font-size: 1.15rem; color: var(--muted); }
.sheet .val.tot { background: transparent; color: var(--navy); }
.sheet input { text-align: center; font-size: 1.3rem; font-variant-numeric: tabular-nums; padding: 8px; }
.sheet input.saved { border-color: var(--ok); background: #f4fbf7; }
.sheet input.dirty { border-color: var(--gold-deep); background: #fff9e8; }
.sheet .actions-row { grid-template-columns: 1fr; background: var(--cream); }
.sheet .locked { opacity: .5; }
.sheet .final { border-top: 3px solid var(--navy); }
.sheet .final .val { font-size: 1.4rem; color: var(--navy); }
.sheet .vprow .val { background: var(--gold); color: var(--navy); font-size: 1.5rem; border: 2px solid var(--navy); }
.vpbadge { display: inline-grid; place-items: center; min-width: 56px; padding: 4px 12px; border-radius: 14px; background: var(--gold); border: 2px solid var(--navy); font-weight: 800; font-size: 1.3rem; }
.result-card { display: grid; gap: 6px; }
.result-card .line { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.rules summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--gold-deep); }
.rules[open] summary::after { content: "\2212"; }
.rules[open] summary { margin-bottom: 12px; }
.rules h3 { margin: 16px 0 8px; }

/* ---------- Classifica ---------- */
.rank-list { display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; background: #fff; border: 2px solid var(--navy); border-radius: 18px; padding: 10px 12px; animation: rise .35s ease backwards; }
.rank-row .pos { font-weight: 800; font-size: 1.15rem; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--cream-2); border: 2px solid var(--navy); }
.rank-row .nm { font-weight: 800; line-height: 1.1; word-break: break-word; }
.rank-row .sub { font-size: .78rem; color: var(--muted); font-weight: 600; }
.rank-row .score { text-align: right; font-weight: 800; font-size: 1.35rem; line-height: 1; }
.rank-row .score small { display: block; font-size: .65rem; letter-spacing: .06em; color: var(--muted); }
.rank-row.me { background: var(--gold-2); }
canvas.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }
.share-img { width: 100%; height: auto; border-radius: 16px; border: 2px solid var(--navy); }

.loader { display: grid; place-items: center; padding: 60px 0; }
.loader i { width: 44px; height: 44px; border-radius: 50%; border: 6px solid var(--cream-3); border-top-color: var(--navy); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.phone { color: var(--navy-2); font-weight: 700; text-decoration: none; white-space: nowrap; }

/* ---------- Installazione app, foto squadra ---------- */
.install-banner { display: flex; flex-direction: column; gap: 10px; background: var(--gold); border: 2px solid var(--navy); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.install-text { display: flex; flex-direction: column; line-height: 1.25; }
.install-text b { font-size: 1.1rem; }
.install-text span { font-size: .9rem; font-weight: 600; }
.install-actions { display: flex; gap: 8px; }
.install-actions .btn { flex: 1; }
.install-banner .btn.gold { background: var(--navy); color: var(--cream); }
.install-banner .btn.ghost { border-color: var(--navy); }
.howto { padding-left: 20px; margin: 0; display: grid; gap: 12px; }
.howto li b, .howto li span { display: block; }

.avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; background: var(--gold-2); border: 2px solid var(--navy); color: var(--navy); font-weight: 800; font-size: 1.15rem; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 32px; height: 32px; font-size: .95rem; border-width: 2px; }
.avatar.md { width: 52px; height: 52px; font-size: 1.3rem; }
.avatar.lg { width: 68px; height: 68px; font-size: 1.7rem; }
.avatar.xl { width: 96px; height: 96px; font-size: 2.4rem; }
.card.navy .avatar { border-color: var(--gold); }
.team-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.team-head h1 { margin-bottom: .2em; overflow-wrap: break-word; }
.vs .team { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pod-av { display: flex; justify-content: center; margin-bottom: 4px; }
.rank-row { grid-template-columns: 42px 40px 1fr auto; }
.photo-preview { flex: none; }

/* Niente zoom accidentale */
html, body { touch-action: pan-x pan-y; }
/* Foto squadra cliccabile */
.avatar-btn { position: relative; appearance: none; border: 0; background: none; padding: 0; cursor: pointer; flex: none; }
.avatar-badge { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); border: 2px solid var(--navy); display: grid; place-items: center; font-size: .85rem; }

.row.center { justify-content: center; gap: 18px; }

.team-btn.picked { background: var(--gold-2); }
.team-btn > span:first-child { display: block; }
.tsel { margin-bottom: 14px; }

body.modal-open { position: fixed; width: 100%; overflow: hidden; }
.modal-bg, .modal { overscroll-behavior: contain; }

[hidden] { display: none !important; }

html { background: var(--system-bar); }
.app { padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.toast-wrap { top: calc(12px + env(safe-area-inset-top, 0px)); }
.team-head .grow { min-width: 0; }
.team-head h1 { overflow-wrap: anywhere; }
.match-heading { display: grid; gap: 16px; }
.match-heading > .tablebadge { justify-self: center; flex-direction: row; gap: 8px; min-width: 0; padding: 6px 16px; box-shadow: none; }
.match-heading > .tablebadge b { font-size: 1.2rem; }
.vs { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.vs .team { min-width: 0; overflow-wrap: anywhere; }
.sheet .srow { grid-template-columns: minmax(60px, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.sheet .hand { grid-template-columns: 1fr auto; }
.sheet .actions-row { grid-template-columns: 1fr; }
.sheet input { min-width: 0; width: 100%; }

/* Diretta pubblica: leggibile sia da telefono sia su uno schermo grande. */
.live-app { max-width: 1120px; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); gap: 14px; }
.live-match { display: grid; gap: 14px; }
.live-match h2 { margin: 0; }
.live-score { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.live-score b { overflow-wrap: anywhere; }
.live-score > span { font-size: 1.5rem; font-weight: 800; }
.timer .live-clock { font-size: clamp(3.5rem, 10vw, 7rem); }
.timer .live-clock.live-label { font-size: clamp(1.5rem, 5vw, 2.5rem); }

.live-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.live-team b { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Quota di partecipazione ---------- */
.pricebox { display: flex; align-items: center; gap: 16px; }
.pricebox p { margin: 2px 0 0; }
.price-amount { flex: 0 0 auto; font-size: 2.3rem; line-height: 1; letter-spacing: -.02em; background: var(--navy); color: var(--gold); border-radius: 16px; padding: 10px 14px; }
.field-hint { display: block; margin: 5px 0 0 4px; font-weight: 500; line-height: 1.35; }

/* ---------- Firma in fondo a ogni schermata ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.app > .credit { margin-top: auto; padding-top: 22px; text-align: center; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); opacity: .85; }
.app > .credit b { color: var(--navy); font-weight: 800; }

.communication-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Le pagine scorrono sotto la navigazione, senza trascinare la barra inferiore. */
#app { overflow-x: clip; }
#app > main.app { touch-action: pan-y; }
#app > main.app form, #app > main.app .sheet, #app > main.app .tablewrap { touch-action: pan-x pan-y; }
.user-route-overlay { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 10; contain: layout paint; }
.user-route-overlay > .user-route-copy { position: absolute; top: 0; left: 0; right: 0; width: 100%; margin: 0 auto; pointer-events: none; will-change: transform; }
.user-route-overlay > .live-app { max-width: 1120px; }
.user-navigating > main.app { pointer-events: none; }
.tabbar a { transition: background-color .18s ease, color .18s ease; }
@media (prefers-reduced-motion: reduce) { .tabbar a { transition: none; } }

html { scrollbar-gutter: stable; }
html.user-route-changing { overflow-y: hidden; overscroll-behavior-y: none; }

/* Schermate torneo: contenuti leggibili anche a 320px. */
.signed-input { display:flex; gap:4px; min-width:0; align-items:center; }
.signed-input input { min-width:0; width:100%; }
.sign-toggle { flex:none; min-width:36px; min-height:44px; padding:3px; border:1px solid var(--navy); border-radius:10px; background:var(--gold-soft); color:inherit; font:inherit; font-weight:700; }
.team-btn { min-width:0; max-width:100%; flex-wrap:wrap; gap:8px; text-align:left; }
.team-btn > span:first-child { min-width:0; overflow-wrap:anywhere; flex:1 1 130px; }
.team-btn .chip { white-space:normal; max-width:100%; }
.rank-row { width:100%; text-align:left; font:inherit; color:inherit; cursor:pointer; }
.rank-row > div { min-width:0; }
.rank-row .nm,.rank-row .sub { overflow-wrap:anywhere; }
.match-results { display:grid; gap:12px; }
.match-result { border:1px solid var(--navy); border-radius:16px; padding:14px; display:grid; gap:8px; }
.match-result > div { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:baseline; }
.match-result b { overflow-wrap:anywhere; }
.hand-history { margin-top:12px; min-width:0; }
.hand-history summary { cursor:pointer; font-weight:700; padding:8px 0; }
.history-hand { padding:12px 0; border-bottom:1px solid #d7d1c5; }
.history-hand > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px; margin-top:8px; overflow-wrap:anywhere; }
.history-hand small { grid-column:1 / -1; }
.prizes-slot { margin-bottom:18px; }
.prizes-slot:empty { display:none; }
.prize-new { animation:prize-arrival .8s ease-out; }
@keyframes prize-arrival { from { transform:translateY(-15px) scale(.97); opacity:.2; } to { transform:none; opacity:1; } }
@media(prefers-reduced-motion:reduce) { .prize-new { animation:none; } }
@media (max-width:480px) {
  .match-result > div { grid-template-columns:minmax(0,1fr) auto; }
  .match-result > div > b { grid-column:1 / -1; }
  .match-result > div > strong::after { content:' punti'; font-size:.8em; font-weight:500; }
}
.prizes-slot { margin-top:14px; }
.pod[role=button] { cursor:pointer; }
.pod[role=button]:focus-visible { outline:3px solid var(--gold-deep); outline-offset:3px; }
.result-card .line { flex-wrap:wrap; }
.result-card .line > span:first-child { min-width:0; overflow-wrap:anywhere; }
