/* Bumpkin Legends - Torneo (10 novembre 2026, public/js/tourney.js). Sopra il kit di Sunflower (sfl.css + game.css).
   Identita': gli stendardi a coda di rondine delle due leghe (Campioni cremisi e oro, Sfidanti verde bosco), cartellini di pergamena
   per gli scontri, la fiamma delle torce dell'Arena sul turno in corso. Il resto resta quieto, nei colori del kit. */
:root {
  --tn-ink: #3e2731; --tn-parch: #f7e6bd; --tn-parch2: #ecd29a;
  --tn-c: #9b2d3f; --tn-c-hi: #ffd84a; --tn-s: #2f6e5a; --tn-s-hi: #bff0b4;
  --tn-live: #ff7a2f; --tn-night: #2b1a3d; --tn-ok: #3f8f3a; --tn-bad: #b8392b;
}
.tn-body { font-size: 15px; line-height: 1.25; }
.tn-body button, .tn-body select, .tn-body input { font-size: 14px; line-height: 1.2; }
.tn-body h4 { margin: 0 0 6px; font-size: 16px; font-weight: normal; color: var(--tn-ink); }
.tn-muted { color: #6b4b45; font-size: 13px; }
.tn-body .btn { font-size: 16px; line-height: 16px; }
.tn-body .btn.big { font-size: 19px; padding: 11px 16px; width: 100%; }
.tn-body button:focus-visible, .tn-body select:focus-visible, .tn-body input:focus-visible { outline: 3px solid var(--tn-c-hi); outline-offset: 1px; }

/* stendardo della lega (coda di rondine) */
.tn-pen { display: inline-flex; align-items: center; height: 22px; padding: 0 14px 0 8px; font-size: 13px; line-height: 1; color: #fff; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%); background: #7d6f6a; text-shadow: 1px 1px 0 rgba(0,0,0,.45); flex: none; }
.tn-pen.tn-C { background: linear-gradient(var(--tn-c), #6e1d2b); box-shadow: inset 0 2px 0 var(--tn-c-hi); }
.tn-pen.tn-S { background: linear-gradient(var(--tn-s), #1f4d3e); box-shadow: inset 0 2px 0 var(--tn-s-hi); }
.tn-pen.big { height: 34px; padding: 0 22px 0 12px; font-size: 18px; clip-path: polygon(0 0, 100% 0, calc(100% - 11px) 50%, 100% 100%, 0 100%); }

.tn-chip { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; font-size: 12px; line-height: 14px; background: rgba(62,39,49,.14); color: var(--tn-ink); white-space: nowrap; }
.tn-chip.gold { background: var(--tn-c-hi); }
.tn-chip.ok, .tn-chip.p-paid { background: #cfeec0; color: #1f5a1a; }
.tn-chip.warn, .tn-chip.p-wait { background: #ffe3a6; color: #6e4a00; }
.tn-chip.p-held { background: #f7c9bd; color: #7a2016; }
.tn-chip.s-live { background: var(--tn-live); color: #fff; }
.tn-chip.s-signup { background: #cfe5ff; color: #133b6b; }
.tn-chip.s-void { background: #d8cfcb; color: #5b4f4b; }
.tn-cd { font-family: "SflSecondary", monospace; letter-spacing: 1px; }
.tn-cd.big { font-size: 34px; line-height: 34px; color: #fff; text-shadow: 2px 2px 0 var(--tn-ink); }

/* stemma della lega */
.tn-crest { display: flex; gap: 10px; align-items: center; padding: 10px; margin-bottom: 8px; border: 2px solid var(--tn-ink); border-radius: 8px; background: var(--tn-parch); }
.tn-crest.tn-C { background: linear-gradient(100deg, #f4d9a0, var(--tn-parch) 60%); }
.tn-crest.tn-S { background: linear-gradient(100deg, #d6edc3, var(--tn-parch) 60%); }
.tn-crest-r { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tn-pts { font-size: 20px; color: var(--tn-ink); }
.tn-crest small { font-size: 12px; color: #6b4b45; }
.tn-zone { color: var(--tn-ink) !important; }

/* manifesto del torneo di oggi */
.tn-poster { display: flex; flex-direction: column; gap: 8px; padding: 10px; margin-bottom: 8px; border: 2px solid var(--tn-ink); border-radius: 8px; color: #fff3d6;
  background: radial-gradient(ellipse at 50% 0%, #5a3a78, var(--tn-night) 75%); }
.tn-poster.tn-C { box-shadow: inset 0 4px 0 var(--tn-c); }
.tn-poster.tn-S { box-shadow: inset 0 4px 0 var(--tn-s); }
.tn-poster.live { box-shadow: inset 0 4px 0 var(--tn-live), 0 0 0 2px rgba(255,122,47,.35); }
.tn-ph { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tn-big { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; text-align: center; font-size: 17px; }
.tn-next { display: inline-flex; gap: 4px; align-items: baseline; font-size: 13px; color: #ffd9b8; }
.tn-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 13px; color: #e6cfe8; }
.tn-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.tn-ok { font-size: 17px; color: var(--tn-s-hi); }
.tn-why { padding: 8px; border-radius: 6px; background: rgba(0,0,0,.25); font-size: 14px; text-align: center; }
.tn-note { text-align: center; font-size: 12px; color: #e6cfe8; }
.tn-body .tn-hash { align-self: center; display: inline-flex; gap: 2px; flex-wrap: wrap; justify-content: center; padding: 3px 8px; border: 0; border-radius: 4px; background: rgba(0,0,0,.2); color: inherit; font-size: 12px; }
.tn-body > .tn-hash { display: flex; margin: 8px auto 2px; background: rgba(62,39,49,.12); color: var(--tn-ink); }

/* domenica */
.tn-sunday { display: flex; gap: 10px; align-items: center; padding: 10px; margin-bottom: 8px; border: 2px solid var(--tn-ink); border-radius: 8px; color: var(--tn-ink);
  background: repeating-linear-gradient(135deg, #ffe58a 0 14px, #ffd84a 14px 28px); }
.tn-sunday img { width: 64px; image-rendering: pixelated; flex: none; }
.tn-sunday > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tn-sunday b { font-size: 17px; }
.tn-sunday small { font-size: 12px; }
.tn-pool { font-family: "SflSecondary", monospace; font-size: 22px; line-height: 24px; color: #6e1d2b; }

.tn-sec { margin-bottom: 8px; }
.tn-body .tn-mini { display: flex; width: 100%; gap: 8px; align-items: center; padding: 6px; margin-bottom: 4px; border: 2px solid rgba(62,39,49,.35); border-radius: 6px; background: rgba(255,243,214,.6); color: var(--tn-ink); text-align: left; font-size: 13px; }
.tn-body .tn-mini[disabled] { opacity: 1; }
.tn-mini-d { font-family: "SflSecondary", monospace; }
.tn-body .tn-mini small { margin-left: auto; font-size: 11px; white-space: nowrap; }

.tn-rules { padding: 6px 8px; border: 2px solid rgba(62,39,49,.35); border-radius: 6px; background: rgba(255,243,214,.5); font-size: 13px; }
.tn-rules summary { font-size: 15px; cursor: pointer; }
.tn-rules ul { margin: 6px 0; padding-left: 18px; }
.tn-rules li { margin: 3px 0; }
.tn-cups { width: 100%; border-collapse: collapse; font-size: 11px; text-align: center; }
.tn-cups th, .tn-cups td { padding: 3px 1px; border-bottom: 1px solid rgba(62,39,49,.2); font-weight: normal; }
.tn-cups td { font-family: "SflSecondary", monospace; font-size: 14px; }
.tn-cups .tn-pen { font-size: 11px; height: 18px; padding: 0 10px 0 5px; }
.tn-lock, .tn-wait { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; text-align: center; color: var(--tn-ink); }
.tn-lock img, .tn-wait img { width: 72px; image-rendering: pixelated; }
.tn-wait .tn-cd.big { color: var(--tn-ink); text-shadow: none; }

/* ---------- Il mio set ---------- */
.tn-kh { display: flex; gap: 10px; align-items: center; padding: 8px 10px; margin-bottom: 6px; border: 2px solid var(--tn-ink); border-radius: 8px; background: var(--tn-night); color: #fff3d6; }
.tn-pow { display: flex; flex-direction: column; min-width: 92px; }
.tn-pow small { font-size: 12px; color: #e6cfe8; }
.tn-pow b { font-family: "SflSecondary", monospace; font-size: 30px; line-height: 30px; color: var(--tn-c-hi); font-weight: normal; }
.tn-pow em { font-style: normal; font-family: "SflSecondary", monospace; font-size: 15px; }
.tn-kst { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-left: auto; text-align: right; }
.tn-kst small { font-size: 11px; color: #e6cfe8; }
.tn-locked { padding: 6px 8px; margin-bottom: 6px; border-radius: 6px; background: #ffe3a6; font-size: 13px; color: #6e4a00; }
em.up, .tn-rd.up { color: #7ad04b; }
em.down, .tn-rd.down { color: #ff8a7a; }
.tn-stats em.up, .tn-row .tn-rd.up { color: var(--tn-ok); }
.tn-stats em.down, .tn-row .tn-rd.down { color: var(--tn-bad); }
.tn-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; margin-bottom: 6px; }
.tn-st { display: flex; flex-direction: column; padding: 4px 6px; border-radius: 5px; background: var(--tn-parch); min-width: 0; }
.tn-st span { font-size: 11px; color: #6b4b45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-st b { font-family: "SflSecondary", monospace; font-size: 15px; font-weight: normal; color: var(--tn-ink); }
.tn-st em { font-style: normal; font-family: "SflSecondary", monospace; font-size: 12px; }
.tn-sets { display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; }
.tn-set { display: grid; grid-template-columns: auto auto 1fr; gap: 2px 8px; align-items: center; padding: 4px 8px; border-radius: 5px; background: rgba(255,243,214,.55); font-size: 13px; }
.tn-set.on { background: #fff1b8; box-shadow: inset 3px 0 0 var(--tn-c-hi); }
.tn-set small { font-size: 12px; color: #6b4b45; }
.tn-set .tn-dull { grid-column: 1 / -1; }
.tn-set.dull { opacity: .75; }
.tn-pips { display: inline-flex; gap: 2px; }
.tn-pips i { width: 9px; height: 9px; border: 1px solid var(--tn-ink); background: #fff8e6; }
.tn-pips i.t { border-radius: 50%; }
.tn-pips i.f { background: var(--tn-c-hi); }
.tn-dull { color: #8a6f69 !important; }

.tn-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 6px; }
.tn-body .tn-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 4px 3px 5px; border: 2px solid rgba(62,39,49,.45); border-radius: 6px;
  background: #b96f50; color: #fff3d6; }
.tn-body .tn-slot img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.tn-sl-n { font-size: 11px; color: #ffe2c2; }
.tn-sl-e { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 24px; color: rgba(255,243,214,.6); }
.tn-sl-i { max-width: 100%; font-size: 11px; line-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-sl-c { position: absolute; top: 2px; right: 3px; font-size: 9px; color: var(--tn-c-hi); }
.tn-body .tn-slot.empty { background: #a4644a; }
.tn-body .tn-slot.chg { box-shadow: inset 0 0 0 2px var(--tn-c-hi); }
.tn-body .tn-slot.sel { border-color: var(--tn-ink); background: var(--tn-night); }

.tn-pick { scroll-margin-top: 4px; padding: 6px; margin-bottom: 6px; border: 2px solid var(--tn-ink); border-radius: 8px; background: var(--tn-parch); }
.tn-pick-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tn-pick-h b { font-size: 17px; }
.tn-pick-h small { font-size: 12px; color: #6b4b45; }
.tn-body .tn-none { margin-left: auto; padding: 4px 8px !important; font-size: 13px !important; }
.tn-body .tn-x { width: 28px; height: 28px; border: 0; background: url("/sfl/ui/close.png") center / contain no-repeat; image-rendering: pixelated; flex: none; }
.tn-pick-h .tn-x:first-of-type:last-child { margin-left: auto; }
.tn-body .tn-q { width: 100%; padding: 8px 10px; margin-bottom: 6px; border: 2px solid var(--tn-ink); border-radius: 6px; background: #fff8e6; color: var(--tn-ink); font: inherit; font-size: 16px; }
.tn-chips, .tn-fil, .tn-mode { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.tn-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tn-body .tn-fc { flex: none; padding: 5px 9px; border: 2px solid rgba(62,39,49,.5); border-radius: 14px; background: #fff8e6; color: var(--tn-ink); font-size: 13px; }
.tn-body .tn-fc.on { background: var(--tn-ink); color: #fff3d6; border-color: var(--tn-ink); }
.tn-body .tn-fil select { flex: 1 1 30%; min-width: 0; padding: 6px 4px; border: 2px solid rgba(62,39,49,.5); border-radius: 6px; background: #fff8e6; color: var(--tn-ink); font: inherit; font-size: 13px; }
.tn-hint { display: block; margin-bottom: 6px; font-size: 11px; }
.tn-list { display: flex; flex-direction: column; gap: 3px; }
.tn-body .tn-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 4px 8px 4px 4px; border: 0; border-radius: 6px; background: #fff8e6; color: var(--tn-ink); text-align: left; content-visibility: auto; contain-intrinsic-size: auto 48px; }
.tn-body .tn-row:active { background: #ffe9b0; }
.tn-body .tn-row.on { background: #fff1b8; box-shadow: inset 3px 0 0 var(--tn-c-hi); }
.tn-body .tn-row img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; flex: none; }
.tn-rn { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.tn-rn b { font-weight: normal; font-size: 14px; color: #8a3fc9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-rn small { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11px; color: #6b4b45; }
.tn-rset { padding: 0 4px; border-radius: 3px; background: rgba(62,39,49,.1); }
.tn-rset.hit { background: var(--tn-c-hi); color: var(--tn-ink); }
.tn-rd { flex: none; min-width: 52px; text-align: right; font-family: "SflSecondary", monospace; font-size: 16px; color: #8a6f69; }
.tn-body .tn-row.on .tn-rd { color: var(--tn-ok); }
.tn-more { margin-top: 4px; }
.tn-save { position: sticky; bottom: -6px; display: flex; gap: 6px; padding: 8px 0 4px; margin-top: 4px; background: linear-gradient(rgba(228,166,114,0), #e4a672 30%); }
.tn-save .btn { flex: 1; }
.tn-save .btn.gold { flex: 1.6; }

/* ---------- Tabellone ---------- */
.tn-seg { display: flex; gap: 4px; margin-bottom: 8px; }
.tn-body .tn-sg { flex: 1; display: flex; justify-content: center; align-items: center; padding: 6px; border: 2px solid rgba(62,39,49,.45); border-radius: 6px; background: rgba(255,243,214,.5); color: var(--tn-ink); font-size: 15px; }
.tn-body .tn-sg.on { background: #fff8e6; border-color: var(--tn-ink); box-shadow: inset 0 -3px 0 var(--tn-c-hi); }
.tn-bh { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tn-bh-t { font-size: 14px; }
.tn-bh .tn-next { color: var(--tn-ink); }
.tn-ov { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 6px; scrollbar-width: none; }
.tn-body .tn-ovr { flex: 1 0 58px; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: stretch; padding: 4px 5px; border: 2px solid rgba(62,39,49,.4); border-radius: 6px; background: rgba(255,243,214,.55); color: var(--tn-ink); text-align: left; }
.tn-body .tn-ovr b { font-weight: normal; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-body .tn-ovr i { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--tn-ink) calc(var(--p) * 100%), rgba(62,39,49,.15) 0); }
.tn-body .tn-ovr small { font-family: "SflSecondary", monospace; font-size: 11px; }
.tn-body .tn-ovr.on { background: #fff8e6; border-color: var(--tn-ink); }
.tn-body .tn-ovr.live { border-color: var(--tn-live); }
.tn-body .tn-ovr.live i { background: linear-gradient(90deg, var(--tn-live) calc(var(--p) * 100%), rgba(255,122,47,.2) 0); }
.tn-mode { align-items: center; }
.tn-zoom { display: inline-flex; gap: 4px; margin-left: auto; }
.tn-zoom .tn-fc { width: 34px; padding: 4px 0; font-size: 16px; }

.tn-rounds { transition: height .2s; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; align-items: flex-start; }
.tn-rounds::-webkit-scrollbar, .tn-ov::-webkit-scrollbar, .tn-chips::-webkit-scrollbar { display: none; }
.tn-col { flex: 0 0 100%; scroll-snap-align: start; display: flex; flex-direction: column; gap: 5px; padding: 0 2px; }
.tn-col.live h4 { color: #b84a12; }
.tn-flame { animation: tnflame 1s ease-in-out infinite alternate; display: inline-block; }
@keyframes tnflame { from { transform: scale(1); } to { transform: scale(1.18) translateY(-1px); } }

/* cartellino dello scontro */
.tn-body .tn-m { position: relative; display: flex; flex-direction: column; width: 100%; padding: 0; border: 2px solid rgba(62,39,49,.55); border-radius: 5px; background: var(--tn-parch); color: var(--tn-ink); text-align: left; overflow: hidden; }
.tn-body .tn-m.done { background: #f1e0b8; }
.tn-body .tn-m.bye { opacity: .78; }
.tn-body .tn-m.mine { border-color: #b8860b; box-shadow: 0 0 0 2px var(--tn-c-hi); }
.tn-body .tn-m.now { border-color: var(--tn-live); box-shadow: 0 0 0 2px rgba(255,122,47,.4); }
.tn-ln { display: flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 6px; font-size: 14px; }
.tn-ln + .tn-ln { border-top: 1px dashed rgba(62,39,49,.3); }
.tn-seed { flex: none; min-width: 20px; height: 18px; padding: 0 3px; border-radius: 3px; font-family: "SflSecondary", monospace; font-size: 12px; line-height: 18px; text-align: center; color: #fff; background: var(--tn-ink); }
.tn-seed:empty { background: transparent; }
.tn-nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-ln.tw { background: rgba(255,216,74,.35); }
.tn-ln.tl .tn-nm { color: #8a6f69; text-decoration: line-through; text-decoration-color: rgba(138,111,105,.6); }
.tn-ln.me .tn-nm { color: #7a1f2e; }
.tn-ln.tbd .tn-nm { color: #8a6f69; font-style: italic; }
.tn-w { flex: none; font-size: 12px; }
.tn-watch { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 2px 6px; border-radius: 10px; background: var(--tn-ink); color: #fff3d6; font-size: 11px; pointer-events: none; }
.tn-body .tn-m.see .tn-ln { padding-right: 70px; }

/* tabellone intero: colonne a pari altezza, scontri centrati sui due precedenti, linee */
.tn-fullw { overflow: auto; max-height: 62vh; border: 2px solid rgba(62,39,49,.35); border-radius: 6px; background: rgba(255,243,214,.35); -webkit-overflow-scrolling: touch; }
.tn-full { --z: 1; --mh: calc(64px * var(--z)); display: flex; padding: 6px; width: max-content; font-size: calc(14px * var(--z)); }
.tn-fcol { display: flex; flex-direction: column; width: calc(170px * var(--z)); flex: none; }
.tn-fcol h4 { height: 22px; margin: 0; font-size: calc(13px * var(--z)); text-align: center; }
.tn-fcol.live h4 { color: #b84a12; }
.tn-fm { display: flex; flex-direction: column; height: calc(var(--n) * var(--mh)); }
.tn-slotm { position: relative; flex: 1; display: flex; align-items: center; padding: 0 calc(12px * var(--z)); }
.tn-full .tn-m { font-size: inherit; }
.tn-full .tn-ln { min-height: calc(24px * var(--z)); font-size: inherit; padding: 1px 4px; }
.tn-full .tn-watch { display: none; }
.tn-full .tn-m.see .tn-ln { padding-right: 4px; }
.tn-fcol:not(:last-child) .tn-slotm::after { content: ""; position: absolute; right: 0; top: 50%; width: calc(12px * var(--z)); border-top: 2px solid rgba(62,39,49,.5); }
.tn-fcol:not(:last-child) .tn-slotm:nth-child(odd)::before { content: ""; position: absolute; right: 0; top: 50%; bottom: 0; border-right: 2px solid rgba(62,39,49,.5); }
.tn-fcol:not(:last-child) .tn-slotm:nth-child(even)::before { content: ""; position: absolute; right: 0; top: 0; bottom: 50%; border-right: 2px solid rgba(62,39,49,.5); }
.tn-fcol:not(.first) .tn-slotm .tn-m::before { content: ""; position: absolute; left: calc(-14px * var(--z)); top: 50%; width: calc(12px * var(--z)); border-top: 2px solid rgba(62,39,49,.5); }
.tn-full .tn-m { overflow: visible; }
.tn-full .tn-m .tn-ln:first-child { border-radius: 3px 3px 0 0; }

/* risultati */
.tn-res { margin-bottom: 8px; }
.tn-pod { display: flex; align-items: flex-end; gap: 4px; padding: 10px 6px 0; border: 2px solid var(--tn-ink); border-radius: 8px 8px 0 0; background: radial-gradient(ellipse at 50% 30%, #5a3a78, var(--tn-night) 75%); }
.tn-spot { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 6px 4px 8px; border: 2px solid var(--tn-ink); border-bottom: 0; border-radius: 6px 6px 0 0; text-align: center; color: var(--tn-ink); }
.tn-spot b { max-width: 100%; font-weight: normal; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-spot small { font-size: 11px; }
.tn-spot.p1 { min-height: 112px; background: linear-gradient(#ffe680, #e8b923); }
.tn-spot.p2 { min-height: 92px; background: linear-gradient(#eef3f6, #aab7c0); }
.tn-spot.p3 { min-height: 80px; background: linear-gradient(#f0b07a, #b8743e); }
.tn-spot.p1 b { font-size: 15px; }
.tn-medal { font-size: 22px; line-height: 24px; }
.tn-cup { font-family: "SflSecondary", monospace; }
.tn-bpl { color: #6e1d2b; font-family: "SflSecondary", monospace; }
.tn-mine { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 8px; border: 2px solid var(--tn-ink); border-top: 0; border-radius: 0 0 8px 8px; background: #fff1b8; font-size: 14px; }
.tn-res > .tn-muted { display: block; margin-top: 6px; font-size: 12px; }
.tn-prz { margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: rgba(255,243,214,.6); font-size: 13px; }
.tn-prz summary { font-size: 14px; cursor: pointer; }
.tn-prow { display: flex; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px solid rgba(62,39,49,.15); }
.tn-prow > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-prow b { font-weight: normal; font-family: "SflSecondary", monospace; }
.tn-prow.me { background: #fff1b8; }

/* verifica */
.tn-fair { display: flex; flex-direction: column; gap: 6px; padding: 6px; font-size: 14px; color: var(--tn-ink); }
.tn-fair p { margin: 0; }
.tn-fair label { font-size: 12px; color: #6b4b45; }
.tn-fair code { display: block; padding: 6px; border-radius: 4px; background: #fff8e6; font-size: 11px; word-break: break-all; user-select: all; -webkit-user-select: all; }

/* ---------- Storico e classifica ---------- */
.tn-hist { display: flex; flex-direction: column; gap: 4px; }
.tn-body .tn-hr { display: flex; gap: 8px; align-items: center; width: 100%; padding: 6px; border: 2px solid rgba(62,39,49,.35); border-radius: 6px; background: rgba(255,243,214,.6); color: var(--tn-ink); text-align: left; }
.tn-body .tn-hr.gold { background: #fff1b8; border-color: #b8860b; }
.tn-hd { font-family: "SflSecondary", monospace; font-size: 13px; flex: none; }
.tn-hm { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tn-hm b { font-weight: normal; font-size: 14px; }
.tn-hm small { font-size: 11px; color: #6b4b45; }
.tn-hp { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: none; font-size: 12px; }
.tn-hp b { font-weight: normal; font-family: "SflSecondary", monospace; font-size: 14px; }
.tn-rank { display: flex; flex-direction: column; gap: 2px; }
.tn-rr { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 5px; background: rgba(255,243,214,.6); font-size: 14px; }
.tn-rr.up { box-shadow: inset 4px 0 0 var(--tn-ok); }
.tn-rr.down { box-shadow: inset 4px 0 0 var(--tn-bad); }
.tn-rr.me { background: #fff1b8; }
.tn-rp { min-width: 26px; font-family: "SflSecondary", monospace; text-align: right; }
.tn-rnm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-rr b { font-weight: normal; font-family: "SflSecondary", monospace; }
.tn-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 12px; }
.tn-legend .up { padding-left: 8px; box-shadow: inset 4px 0 0 var(--tn-ok); }
.tn-legend .down { padding-left: 8px; box-shadow: inset 4px 0 0 var(--tn-bad); }

/* replay: testa di serie al posto della lega dell'Arena */
.ar-badge { color: #ffd84a; font-family: "SflSecondary", monospace; }

@media (min-width: 700px) {
  .tn-stats { grid-template-columns: repeat(5, 1fr); }
  .tn-slots { grid-template-columns: repeat(9, 1fr); }
  .tn-col { flex-basis: 50%; }
}
@media (prefers-reduced-motion: reduce) { .tn-flame { animation: none; } }
/* quattro schede anche a 360 px */
.tn-win .win-tabs .tab { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-size: 13px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-body .tn-mini { gap: 6px; }
.tn-mini-k { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
