@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist.woff2") format("woff2");
}
/* Titoli in Barlow Condensed: maiuscoli e stretti, come un tabellone sportivo. */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-700.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/barlow-condensed-800.woff2") format("woff2");
}
/* Le cifre (punti, dollari, timer) in Geist Mono: i soldi sono il protagonista. */
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-mono.woff2") format("woff2");
}

/* ------------------------------------------------ token */
:root {
  color-scheme: light;
  --bg: #f8f6f1;
  --surface: #ffffff;
  --surface-2: #f2efe7;
  --surface-3: #e8e4d9;
  --ink: #12110d;
  --ink-2: #3d3a32;
  --muted: #77736a;
  --line: #e7e2d6;
  --line-2: #d6d0c1;
  /* Oro: sfondo dei pulsanti (con testo scuro); per il testo su fondo chiaro serve un oro più scuro (--accent-fg). */
  --accent: #f5b400;
  --accent-hover: #e5a700;
  --accent-ink: #12110d;
  --accent-soft: #fbf0cf;
  --accent-fg: #8f6100;
  --grad: #c98a00;
  --money: #15803d;
  --ok: #138a48;
  --ok-soft: #e3f7ea;
  --warn: #9a6700;
  --warn-soft: #fff4d1;
  --danger: #d92d3a;
  --danger-soft: #ffe8ea;
  --header-bg: rgba(248, 246, 241, .8);
  --shadow-sm: 0 1px 2px rgba(18, 17, 13, .05);
  --shadow: 0 1px 2px rgba(18, 17, 13, .04), 0 10px 30px -12px rgba(18, 17, 13, .16);
  --shadow-lg: 0 2px 4px rgba(18, 17, 13, .04), 0 24px 60px -20px rgba(18, 17, 13, .28);
  --glow: rgba(245, 180, 0, .16);
  --gold: #d99a00;
  --silver: #8f96a6;
  --bronze: #c26a2c;
  /* Blocchi del podio: oro, argento, bronzo. */
  --medal-1: #f5b400;
  --medal-2: #c9ced9;
  --medal-3: #d98a4e;

  --t-violet-bg: #efeaff; --t-violet-fg: #5b3fe0;
  --t-pink-bg: #ffe8f2; --t-pink-fg: #cc2f73;
  --t-blue-bg: #e6f0ff; --t-blue-fg: #2c66d6;
  --t-green-bg: #e3f7ea; --t-green-fg: #17834a;
  --t-orange-bg: #fff0e2; --t-orange-fg: #c4600f;
  --t-gold-bg: #fff4d1; --t-gold-fg: #946c00;
  --t-gray-bg: #f1f1f4; --t-gray-fg: #5d5d68;
  --av-l: 90%; --av-fg-l: 32%; --av-s: 80%;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-ctl: 10px;
  --wrap: 1160px;
  --header-h: 64px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08080a;
  --surface: #111113;
  --surface-2: #19191c;
  --surface-3: #232327;
  --ink: #f7f5ef;
  --ink-2: #cbc8bf;
  --muted: #8c8981;
  --line: #222226;
  --line-2: #323238;
  --accent: #ffc53d;
  --accent-hover: #ffd46b;
  --accent-ink: #12100a;
  --accent-soft: #2a220f;
  --accent-fg: #ffc53d;
  --grad: #ffc53d;
  --money: #4ade80;
  --ok: #4cc78a;
  --ok-soft: #10291c;
  --warn: #f0c04a;
  --warn-soft: #2e250c;
  --danger: #ff6b74;
  --danger-soft: #34151a;
  --header-bg: rgba(8, 8, 10, .74);
  --shadow-sm: none;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 12px 32px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .85);
  --glow: rgba(255, 197, 61, .13);
  --gold: #ffc53d;
  --silver: #c3c8d4;
  --bronze: #e39257;

  --t-violet-bg: #241d45; --t-violet-fg: #b5a3ff;
  --t-pink-bg: #3b1a2b; --t-pink-fg: #ff8fc0;
  --t-blue-bg: #16243f; --t-blue-fg: #8fb6ff;
  --t-green-bg: #12301f; --t-green-fg: #6fd69a;
  --t-orange-bg: #3a2412; --t-orange-fg: #ffb27a;
  --t-gold-bg: #352b0e; --t-gold-fg: #f2cc5a;
  --t-gray-bg: #1f1f26; --t-gray-fg: #a9a9b6;
  --av-l: 22%; --av-fg-l: 80%; --av-s: 45%;
}

/* ------------------------------------------------ passaggio tra le pagine */
/* Il browser sfuma da una pagina all'altra; intestazione e barra in basso restano ferme. */
@view-transition { navigation: auto; }
.notice { view-transition-name: notice; }
.site-header { view-transition-name: site-header; }
.tabbar { view-transition-name: tabbar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }

/* ------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-weight: 700; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0; line-height: .92; font-size: clamp(2.6rem, 6.4vw, 4.8rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); letter-spacing: -.03em; }
h3 { font-size: 1.12rem; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
mark { background: var(--warn-soft); color: var(--warn); padding: 0 .25em; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
main { flex: 1; padding: 40px 0 96px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
/* Tutte le cifre in monospace: si leggono come un tabellone. */
.num, .podium .pts, .podium .block, .timer .n, .entry .pos, .entry .score, .stat-tile .v, .pf-stats .v, .rank-card .v, .figures .v,
.amounts button, .powerup .price, .dialog .total strong, .season-pill .countdown, .season li .num, .hero-price .v, .ticker .amt {
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "zero";
}
.label { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--ink-2); max-width: 46ch; line-height: 1.5; }
.grad { color: var(--accent-fg); }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; flex: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #ff3b5c; flex: none; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: #ff3b5c; opacity: .35; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(.5); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }

/* ------------------------------------------------ superfici */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.panel, .desk-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.desk-section + .desk-section { margin-top: 20px; }
.desk-section > h2:first-child, .desk-section > h1:first-child { margin-top: 0; }
.desk-section h2 { font-size: 1.3rem; margin-bottom: 4px; }
.desk-section h2 + .muted { margin-bottom: 20px; }
.section { margin-top: 72px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }

/* ------------------------------------------------ intestazione */
.notice { background: var(--accent-soft); color: var(--accent-fg); border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); text-align: center; font-size: .8rem; font-weight: 500; padding: 7px 20px; }
.site-header { position: sticky; top: 0; z-index: 30; background: var(--header-bg); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: 0; text-transform: uppercase; }
.logo-mark { width: 30px; height: 30px; border-radius: 7.5px; background: #ffc53d; color: #12110d; flex: none; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.site-nav { display: flex; gap: 2px; }
.site-nav a { text-decoration: none; font-size: .92rem; font-weight: 500; padding: 7px 12px; border-radius: var(--r-ctl); color: var(--muted); transition: color .15s, background-color .15s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); background: var(--surface-2); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hearts-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 500; color: var(--t-pink-fg); padding: 6px 11px; border-radius: var(--r-ctl); background: var(--t-pink-bg); }
.hearts-pill.spent { color: var(--muted); background: var(--surface-2); }
.heart-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; min-width: 56px; padding: 0 11px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: inherit; font-weight: 500; font-size: .85rem; cursor: pointer; transition: color .15s, border-color .15s, background-color .15s, transform .15s; }
.heart-btn .icon { font-size: 1rem; }
.heart-btn:hover { color: var(--t-pink-fg); border-color: color-mix(in srgb, var(--t-pink-fg) 45%, transparent); }
.heart-btn.given { color: var(--t-pink-fg); background: var(--t-pink-bg); border-color: transparent; }
.heart-btn:disabled { cursor: default; }
.heart-btn:disabled:hover { color: var(--muted); border-color: var(--line-2); }
.heart-btn.given:disabled:hover { color: var(--t-pink-fg); border-color: transparent; }
.heart-btn.large { height: 44px; padding: 0 18px; font-size: .95rem; }
/* Il pulsante grande contiene anche il testo ("Give a heart · 3"): niente monospace. */
.heart-btn.large .n { font-family: var(--font); }
.heart-btn.pop .icon { animation: heart-pop .4s cubic-bezier(.2, .8, .2, 1.4); }
@keyframes heart-pop { 40% { transform: scale(1.45); } }
.hearts-line { margin: 12px 0 0; }
.follow-btn.following { background: var(--surface-2); color: var(--muted); border-color: transparent; }
.btn.picked { color: var(--t-green-fg); background: var(--t-green-bg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h3 { margin: 0; }
.segmented.small { padding: 2px; }
.segmented.small button { height: 24px; padding: 0 10px; font-size: .78rem; }
.pick-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pick { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.pick:hover:not(:disabled) { border-color: var(--accent); }
.pick:disabled { opacity: .55; cursor: default; }
.pick.picked { border-color: var(--accent); background: var(--accent-soft); }
.pick-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-count { color: var(--muted); font-size: .8rem; }
.pick-foot { margin: 10px 0 0; }
.fans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.fans li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.fans a { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.fans .n { color: var(--muted); font-size: .8rem; width: 14px; }
.fans .who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.missions { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.missions li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
.missions li.done { background: var(--surface-2); border-color: transparent; }
.missions .ico { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; }
.mission-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: .92rem; }
.mission-note { margin: 8px 0 0; }
.progress { height: 6px; border-radius: var(--r-ctl); background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.done .progress span { background: var(--ok); }
.level { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px; border-radius: var(--r); background: var(--accent-soft); }
.level-name { font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; }
.level-next p { margin: 0 0 8px; }
.follow-list { list-style: none; margin: 0; padding: 0; }
.follow-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.follow-list li + li { border-top: 1px solid var(--line); }
.follow-list a { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; }
.season-pill { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 500; color: var(--ink-2); padding: 6px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); font-variant-numeric: tabular-nums; margin-right: 4px; }
.nav-link { text-decoration: none; font-size: .92rem; font-weight: 500; padding: 7px 12px; color: var(--ink-2); border-radius: var(--r-ctl); }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: var(--r-ctl); color: var(--ink-2); cursor: pointer; font-size: 1.05rem; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* barra in basso su mobile */
.tabbar { display: none; }

/* ------------------------------------------------ bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1; letter-spacing: -.01em;
  height: 44px; padding: 0 20px; border-radius: var(--r-ctl); border: 1px solid transparent;
  background: var(--ink); color: var(--bg); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-line { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-line:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .875rem; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--accent-fg); cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn.danger { color: var(--danger); }

/* ------------------------------------------------ campi */
label { display: block; }
.field { margin-bottom: 18px; }
.field > label, .field > .label { display: block; margin-bottom: 7px; font-size: .875rem; font-weight: 500; color: var(--ink-2); text-transform: none; letter-spacing: 0; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 6px; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-2) 60%, var(--muted)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--accent); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 2px; flex: none; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px; background: var(--surface-2); border-radius: var(--r); }
.choice label { position: relative; margin: 0; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.choice span { display: block; text-align: center; padding: 9px; font-weight: 500; font-size: .92rem; border-radius: var(--r-sm); color: var(--muted); transition: background-color .15s, color .15s; }
.choice input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: var(--r-ctl); background: var(--surface-3); border: 0; position: relative; cursor: pointer; flex: none; transition: background-color .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

.note { padding: 12px 16px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); margin-bottom: 20px; font-size: .92rem; border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); }
.note.error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.note.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 20%, transparent); }
.note.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.note .btn, .note .link-btn { margin-left: 6px; }
.note-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------ chip e toni */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 500; padding: 3px 9px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.t-violet { background: var(--t-violet-bg); color: var(--t-violet-fg); }
.t-pink { background: var(--t-pink-bg); color: var(--t-pink-fg); }
.t-blue { background: var(--t-blue-bg); color: var(--t-blue-fg); }
.t-green { background: var(--t-green-bg); color: var(--t-green-fg); }
.t-orange { background: var(--t-orange-bg); color: var(--t-orange-fg); }
.t-gold { background: var(--t-gold-bg); color: var(--t-gold-fg); }
.t-gray { background: var(--t-gray-bg); color: var(--t-gray-fg); }
.verified { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); vertical-align: 1px; margin-left: 6px; font-size: 11px; flex: none; }
.verified .icon { stroke-width: 3; }
.sponsored { font-size: .75rem; font-weight: 500; color: var(--muted); }
.status { display: inline-block; font-size: .75rem; font-weight: 500; padding: 2px 9px; border-radius: var(--r-ctl); }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.danger { background: var(--danger-soft); color: var(--danger); }
.status.plain { background: var(--surface-2); color: var(--muted); }

/* ------------------------------------------------ avatar */
/* Larghezza e altezza bloccate da --size: il cerchio resta tale anche dentro flex e grid, in ogni browser. */
.avatar {
  --h: 260; --size: 44px;
  flex: 0 0 var(--size); align-self: center; box-sizing: border-box;
  width: var(--size); height: var(--size); min-width: var(--size); min-height: var(--size); max-width: var(--size); max-height: var(--size);
  aspect-ratio: 1 / 1; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .95rem; line-height: 1; letter-spacing: -.02em; overflow: hidden;
  background: hsl(var(--h) var(--av-s) var(--av-l)); color: hsl(var(--h) 55% var(--av-fg-l));
}
.avatar img { width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 50%; }
.avatar.sm { --size: 32px; font-size: .78rem; }
.avatar.md { --size: 56px; font-size: 1.15rem; }
.avatar.lg { --size: 88px; font-size: 1.8rem; }
.avatar.xl { --size: 120px; font-size: 2.4rem; }
.avatar.avatar-empty { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-2); }

/* ------------------------------------------------ prima pagina */
main.home { padding-top: 48px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { margin: 18px 0 18px; font-size: clamp(3.4rem, 8.4vw, 6.6rem); line-height: .88; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-card { padding: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
/* Alone di colore: un cerchio vero (dimensione fissa e proporzione 1:1), non un ovale che cambia con la card. */

.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; position: relative; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; position: relative; }
.podium .step { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); min-width: 0; }
.podium .who { font-weight: 600; font-size: .92rem; line-height: 1.2; margin: 10px 0 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.podium .pts { color: var(--muted); font-size: .8rem; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.podium .block { width: 100%; border-radius: var(--r-sm) var(--r-sm) 0 0; display: grid; place-items: start center; padding-top: 10px; font-weight: 700; font-size: 1.6rem; letter-spacing: -.04em; background: var(--surface-2); color: var(--muted); }
/* Posto occupato: blocco a medaglia (oro, argento, bronzo); posto libero: grigio. */
.podium a.p1 .block { background: var(--medal-1); color: #3b2a00; }
.podium a.p2 .block { background: var(--medal-2); color: #3a3f4a; }
.podium a.p3 .block { background: var(--medal-3); color: #4a2408; }
.podium .p1 .block { height: 128px; }
.podium .p2 .block { height: 92px; }
.podium .p3 .block { height: 68px; }
.podium .p1 { order: 2; }
.podium .p2 { order: 1; }
.podium .p3 { order: 3; }
.podium .crown { color: var(--gold); font-size: 1.2rem; margin-bottom: 4px; }
.podium .p1 .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--gold); }
.podium a.p1 .pts { color: var(--accent-fg); font-weight: 600; }
.podium a.step:hover .who { text-decoration: underline; text-underline-offset: 3px; }

.timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; position: relative; }
.timer .unit { background: var(--surface-2); border-radius: var(--r); text-align: center; padding: 10px 4px 8px; }
.timer .n { display: block; font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.8rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.timer .u { font-size: .7rem; font-weight: 500; color: var(--muted); }
.timer-note { margin: 12px 0 0; font-size: .85rem; color: var(--muted); position: relative; }
.timer-note.overtime { color: var(--danger); font-weight: 600; }
.take-first { margin-top: 16px; position: relative; height: 52px; font-size: 1rem; }
/* Quanto vale il primo posto, sotto i pulsanti della home. */
.hero-price { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 520px; }
.hero-price .v { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.hero-price .v.money { color: var(--money); }
.hero-price .unit { font-family: var(--font); font-size: .5em; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.hero-price .l { font-size: .8rem; color: var(--muted); margin-top: 6px; }
/* Fascia che scorre con le ultime mosse (ferma passandoci sopra). */
.ticker { margin-top: 48px; border-block: 1px solid var(--line); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 10px; padding: 13px 28px; font-size: .88rem; color: var(--ink-2); white-space: nowrap; text-decoration: none; }
.ticker-item::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.ticker-item time { color: var(--muted); font-size: .8rem; }
@keyframes ticker { to { transform: translateX(-50%); } }
.take-first[hidden] { display: none; }

/* vetrina */
.spots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.spot { position: relative; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, border-color .25s; }
/* Spot attivo: copertina del profilo in alto, avatar sovrapposto, colore del profilo per i dettagli. */
.spot:not(.free) { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.spot:not(.free):hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.spot-cover { position: relative; height: 112px; overflow: hidden; }
.spot-cover .cover { position: absolute; inset: 0; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.spot:hover .spot-cover .cover { transform: scale(1.06); }
.spot-tag { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: var(--r-sm); background: rgba(8, 8, 10, .62); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.spot-tag .icon { color: var(--accent); }
.spot-time { left: auto; right: 12px; font-family: var(--mono); letter-spacing: 0; text-transform: none; font-weight: 600; }
.spot-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 0 20px 18px; }
.spot-body .avatar { --size: 72px; font-size: 1.5rem; margin-top: -36px; align-self: flex-start; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent); position: relative; }
.spot .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.spot-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .85rem; color: var(--accent-fg); white-space: nowrap; }
.spot-cta .icon { transition: transform .2s; }
.spot:hover .spot-cta .icon { transform: translateX(3px); }

.spot .name { font-weight: 700; font-size: 1.25rem; line-height: 1.15; letter-spacing: -.03em; margin-top: 12px; display: flex; align-items: center; min-width: 0; }
.spot .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spot .desc { color: var(--ink-2); font-size: .92rem; }
.spot .meta { color: var(--muted); font-size: .8rem; }
.spot .ad { position: absolute; top: 16px; right: 16px; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.spot.free { background: transparent; border-style: dashed; border-color: var(--line-2); padding: 20px; min-height: 236px; }
.spot.free .desc { flex: 1; color: var(--muted); }
.spot-free-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spot-price { font-family: var(--mono); font-size: .8rem; font-weight: 600; color: var(--accent-fg); }
.spot.free:hover { border-color: var(--accent); transform: translateY(-2px); }
.spot.free:hover .plus { transform: rotate(90deg); }
.spot.free .plus { transition: transform .3s cubic-bezier(.2, .8, .2, 1.4); }
.spot.free .name { margin-top: 14px; }
.spot.free .plus { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-fg); font-size: 1.1rem; }

/* classifica */
.board-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: var(--r-ctl); padding: 3px; gap: 2px; }
.segmented button { background: none; border: 0; height: 32px; padding: 0 14px; border-radius: var(--r-ctl); cursor: pointer; font: inherit; font-weight: 500; font-size: .875rem; color: var(--muted); transition: color .15s, background-color .15s; }
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.filters { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 140px; min-height: 38px; height: 38px; padding: 0 12px; font-size: .875rem; border-radius: var(--r-ctl); }
.filters select { padding-right: 34px; }
.board { list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.board > li + li { border-top: 1px solid var(--line); }
.entry { position: relative; display: grid; grid-template-columns: 40px 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r); color: var(--ink); transition: background-color .15s; }
.entry.by-hearts { grid-template-columns: 40px 44px minmax(0, 1fr) auto; }
.entry-link { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.entry-link:focus-visible { outline-offset: -2px; }
.entry .heart-btn { position: relative; z-index: 1; }
.entry:hover { background: var(--surface-2); }
.entry .avatar { transition: transform .2s cubic-bezier(.2, .8, .2, 1.4); }
.entry:hover .avatar { transform: scale(1.08); }
.board > li:has(.entry:hover) + li, .board > li:has(+ li .entry:hover) { border-top-color: transparent; }
.entry .pos { justify-self: center; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: var(--r-ctl); font-weight: 600; font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.entry.r1 { box-shadow: inset 3px 0 0 var(--gold); }
.entry.r1 .pos { background: var(--medal-1); color: #3b2a00; }
.entry.r2 .pos { background: color-mix(in srgb, var(--silver) 20%, transparent); color: var(--silver); }
.entry.r3 .pos { background: color-mix(in srgb, var(--bronze) 18%, transparent); color: var(--bronze); }
.entry .name { font-weight: 600; font-size: 1rem; line-height: 1.25; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.entry .name span:first-child { overflow: hidden; text-overflow: ellipsis; }
.entry .desc { color: var(--muted); font-size: .875rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; align-items: center; }
.entry .score { text-align: right; font-weight: 600; font-size: 1.05rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.15; }
.entry .score small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 6px; }
.empty .lede { margin: 0 auto 1.5em; }
.empty-box { border: 1px dashed var(--line-2); border-radius: var(--r-lg); }

/* colonna laterale */
.col-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.col-side .panel { padding: 20px; }
.col-side h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 1rem; }
/* Titolo con le schede accanto (Diretta): niente margine, così resta centrato sulle schede. */
.col-side .panel-head h3 { margin-bottom: 0; }
.chronicle { list-style: none; margin: 0; padding: 0; }
.chronicle li { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 12px; padding: 9px 0; font-size: .875rem; line-height: 1.4; color: var(--ink-2); }
.chronicle li + li { border-top: 1px solid var(--line); }
/* Messaggio quando non ci sono eventi: senza pallino, occupa tutta la riga. */
.chronicle li.empty-row { display: block; }
.chronicle .bullet { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: currentColor; }
.chronicle .bullet.t-violet { color: var(--t-violet-fg); }
.chronicle .bullet.t-pink { color: var(--t-pink-fg); }
.chronicle .bullet.t-blue { color: var(--t-blue-fg); }
.chronicle .bullet.t-green { color: var(--t-green-fg); }
.chronicle .bullet.t-orange { color: var(--t-orange-fg); }
.chronicle .bullet.t-gold { color: var(--t-gold-fg); }
.chronicle time { display: block; font-size: .75rem; color: var(--muted); margin-top: 1px; }
.chronicle a { text-decoration: none; }
.chronicle a:hover { color: var(--ink); }
.stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-tile { background: var(--surface-2); border-radius: var(--r); padding: 14px; }
.stat-tile .v { font-weight: 600; font-size: 1.5rem; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-tile .l { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.stat-tile.wide { grid-column: 1 / -1; }

/* ------------------------------------------------ profilo */
/* Colore scelto dal profilo: ridefinisce l'accento per tutta la pagina (--c1…--c3 disegnano la copertina). */
.pf-theme-violet { --accent: #6d4dff; --c1: #7b5cff; --c2: #c04dff; --c3: #ff5ca8; }
.pf-theme-blue { --accent: #2563eb; --c1: #1d4ed8; --c2: #3b9cff; --c3: #7ae0ff; }
.pf-theme-teal { --accent: #0f8a80; --c1: #0f766e; --c2: #14b8a6; --c3: #99f6e4; }
.pf-theme-green { --accent: #15803d; --c1: #166534; --c2: #22c55e; --c3: #bef264; }
.pf-theme-orange { --accent: #d9530b; --c1: #ea580c; --c2: #fb923c; --c3: #fcd34d; }
.pf-theme-red { --accent: #d42020; --c1: #b91c1c; --c2: #ef4444; --c3: #fb7185; }
.pf-theme-pink { --accent: #d02670; --c1: #be185d; --c2: #ec4899; --c3: #f9a8d4; }
.pf-theme-gold { --accent: #946c00; --c1: #a16207; --c2: #eab308; --c3: #fde68a; }
.pf-theme-mono { --accent: #18181b; --c1: #18181b; --c2: #52525b; --c3: #a1a1aa; }
:root[data-theme="dark"] .pf-theme-violet { --accent: #8f75ff; }
:root[data-theme="dark"] .pf-theme-blue { --accent: #6c9bff; }
:root[data-theme="dark"] .pf-theme-teal { --accent: #3dd0c0; }
:root[data-theme="dark"] .pf-theme-green { --accent: #4cd383; }
:root[data-theme="dark"] .pf-theme-orange { --accent: #ff9a5a; }
:root[data-theme="dark"] .pf-theme-red { --accent: #ff6b6b; }
:root[data-theme="dark"] .pf-theme-pink { --accent: #ff7ab8; }
:root[data-theme="dark"] .pf-theme-gold { --accent: #f2c14a; }
:root[data-theme="dark"] .pf-theme-mono { --accent: #f4f4f5; --c1: #27272a; --c2: #52525b; --c3: #a1a1aa; }
[class*="pf-theme-"] {
  --accent-fg: var(--accent);
  --accent-hover: color-mix(in srgb, var(--accent) 86%, #000);
  --accent-ink: #fff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--surface));
  --grad: linear-gradient(120deg, var(--c1) 0%, var(--c2) 50%, var(--c3) 100%);
}
:root[data-theme="dark"] [class*="pf-theme-"] { --accent-hover: color-mix(in srgb, var(--accent) 85%, #fff); --accent-ink: #0a0a0d; --accent-soft: color-mix(in srgb, var(--accent) 16%, var(--surface)); }

/* Copertine predefinite, tutte costruite sui colori del tema. */
.cover { background-color: var(--c1); background-size: cover; background-position: center; }
.cover-aurora { background-image: radial-gradient(60% 120% at 12% 10%, var(--c3) 0%, transparent 60%), radial-gradient(70% 140% at 88% 0%, var(--c2) 0%, transparent 62%), linear-gradient(160deg, var(--c1), color-mix(in srgb, var(--c1) 70%, #000)); }
.cover-sunset { background-image: linear-gradient(120deg, var(--c1) 0%, var(--c2) 55%, var(--c3) 100%); }
.cover-mesh { background-image: radial-gradient(40% 80% at 20% 30%, var(--c3) 0%, transparent 70%), radial-gradient(45% 90% at 75% 70%, var(--c2) 0%, transparent 70%), radial-gradient(35% 70% at 95% 10%, var(--c3) 0%, transparent 70%); }
.cover-grid { background-image: linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px), linear-gradient(135deg, var(--c1), var(--c2)); background-size: 28px 28px, 28px 28px, cover; }
.cover-stripes { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .12) 0 14px, transparent 14px 28px), linear-gradient(120deg, var(--c1), var(--c2)); }
.cover-solid { background-image: none; }
.cover.has-image { background-image: var(--cover-img); }

.profile-card { overflow: hidden; padding: 0; }
.pf-cover { height: clamp(150px, 24vw, 240px); }
.pf-body { padding: 0 28px 28px; }
.pf-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: end; }
.pf-head .avatar.xl { --size: 136px; font-size: 2.8rem; margin-top: -68px; box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px var(--accent); }
.pf-id { padding-top: 16px; min-width: 0; }
.pf-id h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin: 0 0 6px; display: flex; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.pf-id .verified { width: 24px; height: 24px; font-size: 14px; }
.pf-id .desc { font-size: 1.08rem; color: var(--ink-2); margin: 0 0 12px; }
.pf-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 24px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.pf-stats > div { background: var(--surface); padding: 14px 16px; }
.pf-stats .v { font-weight: 700; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pf-stats .lead .v { color: var(--accent-fg); }
.pf-stats .l { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.pf-socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.social { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); text-decoration: none; font-size: .86rem; color: var(--ink); background: var(--surface); transition: border-color .15s, color .15s; }
.social:hover { border-color: var(--accent); color: var(--accent-fg); }
.social b { font-weight: 600; }
.social span { color: var(--muted); }
.pf-links { display: grid; gap: 10px; margin-top: 20px; max-width: 560px; }
.pf-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 10px 18px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s, box-shadow .15s; }
.pf-link:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 8px 24px -14px var(--accent); }
.pf-link strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-link small { display: block; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-link .icon { color: var(--accent-fg); }
.pf-link.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 28px -14px var(--accent); }
.pf-link.main small, .pf-link.main .icon { color: inherit; opacity: .85; }
.pf-owner { margin-top: 18px; }

/* Editor dell'aspetto nella dashboard */
.look-preview { margin-bottom: 24px; }
.look-preview .pf-cover { height: 120px; }
.look-preview .pf-body { padding: 0 20px 20px; }
.look-preview .pf-head { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
.look-preview .pf-head .avatar.xl { --size: 84px; font-size: 1.7rem; margin-top: -42px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent); }
.look-preview .pf-id { padding-top: 10px; }
.look-preview .pf-id h1 { font-size: 1.35rem; margin: 0 0 2px; }
.look-preview .pf-id .desc { font-size: .9rem; margin: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: var(--grad); box-shadow: 0 0 0 1px var(--line-2); transition: transform .15s; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.covers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.narrow-form h3 { margin: 30px 0 12px; }
.narrow-form .strength + h3 { margin-top: 0; }
.cover-pick { height: 56px; border-radius: var(--r); border: 0; cursor: pointer; box-shadow: 0 0 0 1px var(--line-2); position: relative; }
.cover-pick[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.cover-pick span { position: absolute; left: 8px; bottom: 6px; font-size: .7rem; font-weight: 600; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.link-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.link-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 8px; }
.social-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.strength { display: grid; gap: 8px; padding: 16px; border-radius: var(--r); background: var(--accent-soft); margin-bottom: 24px; }
.strength .row { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.strength ul { margin: 0; padding-left: 18px; font-size: .86rem; color: var(--ink-2); }
.ranks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.rank-card { padding: 20px; }
.rank-card .v { font-weight: 700; font-size: 2.6rem; line-height: 1; margin: 10px 0 6px; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.rank-card.lead .v { color: var(--accent-fg); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.badge { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.badge .ico { width: 42px; height: 42px; border-radius: var(--r); display: grid; place-items: center; font-size: 1.2rem; }
.badge strong { display: block; font-weight: 600; font-size: .92rem; line-height: 1.2; letter-spacing: -.01em; }
.badge span.d { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.badge.locked { background: transparent; border-style: dashed; }
.badge.locked .ico { background: var(--surface-2); color: var(--muted); opacity: .7; }
.badge.locked strong { color: var(--muted); }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prose-box { max-width: 720px; }
.report-link { margin-top: 40px; font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.report-link .link-btn { color: var(--muted); font-size: .82rem; }
.report-link .link-btn:hover { color: var(--danger); }

/* ------------------------------------------------ area personale */
.desk { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.desk-nav { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.desk-nav button { text-align: left; background: none; border: 0; border-radius: var(--r-sm); height: 40px; padding: 0 12px; cursor: pointer; font: inherit; font-weight: 500; font-size: .92rem; color: var(--muted); display: flex; align-items: center; gap: 10px; transition: color .15s, background-color .15s; }
.desk-nav button:hover { color: var(--ink); background: var(--surface-2); }
.desk-nav button.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.desk-nav button .icon { font-size: 1.05rem; }
.desk-section h1 { font-size: clamp(1.7rem, 3.4vw, 2.2rem); display: flex; align-items: center; flex-wrap: wrap; }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.figures.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figures > div { border-radius: var(--r); padding: 16px; background: var(--surface-2); }
.figures .v { font-weight: 700; font-size: 1.8rem; line-height: 1; margin-bottom: 8px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.figures.three > div:first-child .v { color: var(--accent-fg); }
.figures .label { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 400; }
.amounts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.amounts button { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); height: 52px; font: inherit; font-weight: 600; font-size: 1.05rem; cursor: pointer; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.amounts button:hover { border-color: var(--accent); }
.amounts button.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.target { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); margin-bottom: 4px; }
.target p { margin: 0; font-size: .92rem; flex: 1 1 260px; }
.buy-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.buy-row .field { flex: 1; min-width: 180px; margin: 0; }
.powerups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.powerup { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.powerup .ico { width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; font-size: 1.25rem; }
.powerup h3 { margin: 8px 0 0; font-size: 1.15rem; }
.powerup .price { font-weight: 700; font-size: 1.5rem; line-height: 1; letter-spacing: -.04em; }
.powerup p { color: var(--muted); margin: 0; flex: 1; font-size: .9rem; }
.powerup .state { font-weight: 500; font-size: .82rem; color: var(--accent-fg); }
.chart { display: flex; align-items: flex-end; gap: 5px; height: 160px; margin-top: 18px; padding: 12px; background: var(--surface-2); border-radius: var(--r); }
.chart.chart-empty { align-items: center; justify-content: center; text-align: center; padding: 20px; }
.chart.chart-empty p { margin: 0; max-width: 40ch; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; gap: 2px; }
.chart .bar span { display: block; border-radius: 4px; min-height: 0; }
.chart .views { background: var(--accent); }
.chart .clicks { background: var(--money); }
.chart-labels { display: flex; gap: 5px; font-size: .68rem; color: var(--muted); margin-top: 6px; padding: 0 12px; }
.chart-labels span { flex: 1; text-align: center; min-width: 0; }
.legend { display: flex; gap: 18px; margin-top: 12px; font-size: .82rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .views-key { background: var(--accent); }
.legend .clicks-key { background: var(--money); }
.avatar-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.avatar-edit .actions { display: flex; gap: 8px; flex-wrap: wrap; }
pre, code { font-family: var(--mono); font-size: .8rem; }
pre { background: var(--surface-2); border-radius: var(--r); padding: 14px; white-space: pre-wrap; word-break: break-all; margin: 14px 0; color: var(--ink-2); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.r, th.r { text-align: right; }
.table-wrap { overflow-x: auto; }
.narrow-form { max-width: 600px; }
.narrow { max-width: 600px; margin: 0 auto; }
.row-head { display: flex; gap: 16px; align-items: center; }
.row-head h1 { margin: 0 0 4px; }
.row-head p { margin: 0; }
.section-gap { margin-top: 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0; }
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-row p { margin: 2px 0 0; }

/* admin */
.admin-title { margin-bottom: 20px; }
.admin-tab[hidden] { display: none; }
.admin-tab > .desk-section:first-child { margin-top: 0; }
#admin-alerts .note { margin-bottom: 10px; }
#admin-alerts { margin-bottom: 14px; }
/* Quante cose aspettano in Moderazione (profili e segnalazioni). */
.nav-count { margin-left: auto; font-family: var(--mono); font-size: .75rem; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: var(--r-sm); padding: 1px 7px; }
.nav-count:empty { display: none; }
.admin-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-filters input { flex: 1 1 260px; }
.admin-filters select { flex: 0 0 auto; width: auto; min-width: 180px; }
#users-more, #orders-more { margin-top: 14px; }
.funnel h3 { font-size: .95rem; margin: 18px 0 0; }
.funnel .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0 0; }
.settings-save { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; margin-top: 16px; }
.settings-row .switch { width: 100%; }
.settings-row .switch .hint { display: block; font-weight: 400; }
details.dialog-section summary { cursor: pointer; font-weight: 600; }
details.dialog-section[open] summary { margin-bottom: 10px; }
.queue-item { padding: 4px 0 24px; }
.queue-item + .queue-item { border-top: 1px solid var(--line); padding-top: 24px; }
.queue-item h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.queue-item th { width: 150px; font-weight: 500; color: var(--muted); font-size: .82rem; }
.queue-item .buy-row { margin-top: 14px; }
/* Pannello admin: motivazioni, gestione di un iscritto, registro. */
.reason-box { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.reason-box .field:last-child { margin-bottom: 0; }
.reason-box + .buy-row { margin-top: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dialog.wide { max-width: 720px; }
.dialog-section { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.dialog-section h4 { margin: 0 0 8px; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-line { padding: 10px 0; display: grid; gap: 3px; }
.log-line + .log-line { border-top: 1px solid var(--line); }
.log-line.decision { border-left: 3px solid var(--danger); padding-left: 10px; }
.log-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 16px 0; }
.cols-2 h4 { margin: 0 0 6px; }
.queue-item .share { margin-bottom: 12px; }
.avatar-compare { display: flex; align-items: center; gap: 10px; }
#queue .empty, #reports .empty { padding: 20px; }
.section-head input[type="search"] { width: 320px; max-width: 100%; min-height: 38px; height: 38px; border-radius: var(--r-ctl); }

/* ------------------------------------------------ accesso */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 64px; align-items: center; max-width: 1000px; }
.auth-side h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 14px; }
.auth-side li { display: flex; gap: 12px; align-items: center; color: var(--ink-2); }
.auth-side li .ico { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; }
.auth-form { padding: 32px; box-shadow: var(--shadow); }
.auth-form h2 { margin-bottom: 4px; }
.auth-form > .muted { margin-bottom: 24px; }
.auth-form .btn[type="submit"] { width: 100%; margin-top: 6px; }
.auth-form .btn-x { width: 100%; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .875rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.form-foot { margin: 22px 0 0; font-size: .9rem; color: var(--muted); text-align: center; }
.form-foot a { color: var(--ink); font-weight: 500; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; }
.field-row a { font-size: .82rem; color: var(--muted); }
.auth-narrow { max-width: 440px; margin: 0 auto; }

/* ------------------------------------------------ albo d'oro */
.archive { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.season { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.season ol { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.season li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .92rem; }
.season li .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .8rem; background: var(--surface-2); color: var(--muted); }
.season li:nth-child(1) .n { background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
.season li:nth-child(2) .n { background: color-mix(in srgb, var(--silver) 20%, transparent); color: var(--silver); }
.season li:nth-child(3) .n { background: color-mix(in srgb, var(--bronze) 18%, transparent); color: var(--bronze); }
.season li .who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season li .who a { text-decoration: none; }
.season li .who a:hover { text-decoration: underline; }
.season li .num { color: var(--muted); font-size: .85rem; }

/* ------------------------------------------------ testi lunghi */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose strong { color: var(--ink); }
.rules-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0 8px; }
.rules-grid .powerup p { flex: none; }

/* Come funziona: tre grandi riquadri numerati, ognuno con le sue parti divise da righe sottili. Niente icone. */
.rules-hero { max-width: 760px; margin-bottom: 40px; }
.rules-hero h1 { font-size: clamp(3rem, 7.4vw, 5.6rem); line-height: .9; margin: 14px 0 18px; }
.rules-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 44px); }
.rules-panel + .rules-panel { margin-top: 16px; }
.panel-top { margin-bottom: 28px; }
.panel-top h2 { margin: 0; font-family: var(--display); text-transform: uppercase; letter-spacing: 0; font-size: clamp(2rem, 4vw, 2.8rem); line-height: .95; }
.panel-top p { margin: 10px 0 0; max-width: 62ch; }
.rules-panel p { color: var(--ink-2); font-size: .95rem; margin: 0 0 .8em; max-width: 72ch; }
.rules-panel p:last-child { margin-bottom: 0; }
.rules-panel p.muted { color: var(--muted); }
.rules-panel strong { color: var(--ink); }
.rules-panel h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 2.4rem; line-height: 1; letter-spacing: -.05em; color: var(--accent-fg); margin-bottom: 14px; }
.panel-part { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.part-h { font-size: .75rem !important; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px !important; }
.season-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.season-cards > div { display: flex; flex-direction: column; gap: 4px; }
.season-cards strong { font-size: 1.15rem; letter-spacing: -.02em; }
.season-cards > div:first-child .label { color: var(--accent-fg); }
.pu-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pu-cols > div { padding: 0 28px; border-left: 1px solid var(--line); }
.pu-cols > div:first-child { padding-left: 0; border-left: 0; }
.pu-cols > div:last-child { padding-right: 0; }
.pu-cols .price { font-family: var(--mono); font-size: 2.2rem; font-weight: 500; line-height: 1; letter-spacing: -.04em; margin: 4px 0 8px; }
.pu-stat { display: block; font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.rule-item { padding: 18px 0; border-top: 1px solid var(--line); }
.rule-item:first-of-type { border-top: 0; padding-top: 0; }
.rule-item h4 { margin: 0 0 6px; font-size: 1rem; letter-spacing: -.01em; }
.rules-cta { margin-top: 72px; text-align: center; }
.rules-cta h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.4rem, 5.4vw, 3.8rem); line-height: .92; letter-spacing: 0; margin-bottom: 10px; }
.rules-cta .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.page-head { margin-bottom: 32px; }
.page-head h1 { margin-bottom: 12px; }

/* ------------------------------------------------ finestre e avvisi */
.overlay { position: fixed; inset: 0; background: rgba(10, 10, 13, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; animation: fade .15s ease-out; }
.dialog { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 28px; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto; animation: rise .2s cubic-bezier(.2, .8, .2, 1); }
.dialog h3 { font-size: 1.4rem; letter-spacing: -.03em; }
.dialog .total { display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); border-radius: var(--r); padding: 14px 18px; margin: 16px 0; font-weight: 500; }
.dialog .total strong { font-size: 1.4rem; letter-spacing: -.03em; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); border-radius: var(--r-ctl); box-shadow: var(--shadow-lg); padding: 11px 18px; font-weight: 500; font-size: .9rem; animation: rise .2s cubic-bezier(.2, .8, .2, 1); }
.toast.error { background: var(--danger); color: #fff; }

/* ------------------------------------------------ piede */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; font-size: .85rem; color: var(--muted); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: start; }
.site-footer p { margin: 12px 0 0; max-width: 62ch; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }
.lang-switch { display: flex; gap: 14px; margin-top: 14px; font-size: .85rem; }
.lang-switch .active { color: var(--ink); font-weight: 600; }
.lang-switch .link-btn { color: var(--ink-2); font-weight: 500; }

/* ------------------------------------------------ responsive */
@media (max-width: 980px) {
  .hero, .cols, .desk, .auth { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 32px; }
  .auth { gap: 32px; }
  .col-side { position: static; }
  .desk-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; margin: 0 -20px; padding: 2px 20px 6px; scrollbar-width: none; }
  .desk-nav::-webkit-scrollbar { display: none; }
  .desk-nav button { flex: none; height: 36px; border-radius: var(--r-ctl); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  .desk-nav button.active { background: var(--ink); color: var(--bg); box-shadow: none; }
  .archive, .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .figures:not(.three) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-head { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pf-head .avatar.xl { --size: 112px; margin-top: -56px; }
  .pf-actions { justify-content: flex-start; margin-top: 14px; }
  .site-nav a { padding: 7px 10px; }
}

@media (max-width: 720px) {
  :root { --header-h: 56px; }
  main { padding: 24px 0 calc(110px + env(safe-area-inset-bottom)); }
  main.home { padding-top: 28px; }
  .wrap { padding: 0 16px; }
  .section { margin-top: 52px; }
  .header-inner { gap: 12px; }
  .site-nav, .header-right .nav-link, .header-right .btn, .header-right .logout { display: none; }
  .season-pill { margin-right: 0; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--header-bg); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; text-decoration: none; font-size: .68rem; font-weight: 500; color: var(--muted); border-radius: var(--r); }
  .tabbar a .icon { font-size: 1.3rem; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.active .icon { color: var(--accent-fg); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .spots, .powerups, .ranks, .archive, .figures.three, .rules-grid, .steps, .season-cards, .pu-cols { grid-template-columns: minmax(0, 1fr); }
  .steps, .season-cards { gap: 24px; }
  .pu-cols > div, .pu-cols > div:first-child { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 22px; }
  .pu-cols > div:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

  .rules-cta .actions .btn { flex: 1; }
  .spot { min-height: 0; }
  .spot.free { min-height: 0; }
  .spot.free .desc { flex: none; margin-bottom: 10px; }
  .entry { grid-template-columns: 30px 36px minmax(0, 1fr) auto auto; gap: 8px; padding: 10px 8px; }
  .entry.by-hearts { grid-template-columns: 30px 36px minmax(0, 1fr) auto; }
  .entry .heart-btn { min-width: 0; height: 32px; padding: 0 9px; }
  .hearts-pill { padding: 6px 9px; }
  .section-head .segmented { width: 100%; }
  .entry .avatar { --size: 36px; font-size: .8rem; }
  .entry .desc { display: none; }
  .entry .meta { margin-top: 4px; }
  .board { padding: 4px; }
  .filters { margin-left: 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .filters select, .filters input { min-width: 0; width: 100%; }
  .filters input { grid-column: 1 / -1; }
  .board-controls .segmented { width: 100%; }
  .segmented button { flex: 1; padding: 0 8px; }
  .amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .podium .block { font-size: 1.3rem; }
  .podium .p1 .block { height: 104px; }
  .podium .p2 .block { height: 74px; }
  .podium .p3 .block { height: 56px; }
  .podium .avatar { --size: 44px; font-size: .9rem; }
  .desk-section, .panel, .auth-form { padding: 20px; }
  .pf-body { padding: 0 18px 20px; }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-row { grid-template-columns: minmax(0, 1fr) auto; }
  .link-row input:first-child { grid-column: 1 / -1; }
  .social-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .dialog { padding: 22px; border-radius: 22px; }
  .hero .actions .btn { flex: 1; }
  .hero-price { gap: 22px; margin-top: 24px; }
  .ticker { margin-top: 32px; }
}

/* ------------------------------------------------------------ animazioni (vedi js/motion.js) */
/* Classifica: chi sale si illumina di verde, chi scende di rosso, per un attimo. */
.entry.moved-up { animation: moved-up 1.6s ease-out; }
.entry.moved-down { animation: moved-down 1.6s ease-out; }
.entry.moved-up .pos { animation: pos-pop .5s cubic-bezier(.2, .8, .2, 1.4) .3s; }
@keyframes moved-up { from, 25% { background: color-mix(in srgb, var(--t-green-fg) 16%, transparent); } }
@keyframes moved-down { from, 25% { background: color-mix(in srgb, var(--danger) 10%, transparent); } }
@keyframes pos-pop { 50% { transform: scale(1.3); } }
/* Diretta: gli eventi nuovi hanno il pallino che pulsa per un po'. */
.chronicle li.fresh .bullet { animation: pulse-dot 1s ease-out 3; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 7px transparent; } }
/* Sezioni che salgono entrando nello schermo. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2, .8, .2, 1), transform .6s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
/* Dashboard: il contenuto della scheda entra in dissolvenza. */
.tab-enter { animation: tab-in .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } }
/* Barre di avanzamento che si riempiono. */
.progress span { transition: width .9s cubic-bezier(.2, .8, .2, 1); }
/* Badge appena sbloccato: entra con un rimbalzo e l'icona si illumina. */
.badge.unlocked { animation: badge-in .7s cubic-bezier(.2, .8, .2, 1.4) both; border-color: var(--accent); }
.badge.unlocked .ico { animation: badge-glow 1.4s ease-out .5s 2; }
@keyframes badge-in { from { opacity: 0; transform: scale(.6) rotate(-6deg); } }
@keyframes badge-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
/* Anteprima del profilo: colore e copertina cambiano in dissolvenza incrociata. */
.look-preview { view-transition-name: look-preview; }
::view-transition-group(look-preview) { animation-duration: .35s; }
.swatch[aria-pressed="true"], .cover-pick[aria-pressed="true"] { animation: pick-pop .3s cubic-bezier(.2, .8, .2, 1.4); }
@keyframes pick-pop { 50% { transform: scale(1.12); } }
/* Home: il titolo entra a righe, il resto lo segue. */
:root.seen .hero h1, :root.seen .hero .lede, :root.seen .hero .actions, :root.seen .hero-price, :root.seen .hero-card { animation: none; }
.hero h1 { animation: rise-in .7s cubic-bezier(.2, .8, .2, 1) both; }
.hero .lede { animation: rise-in .7s cubic-bezier(.2, .8, .2, 1) .08s both; }
.hero .actions { animation: rise-in .7s cubic-bezier(.2, .8, .2, 1) .16s both; }
.hero-price { animation: rise-in .7s cubic-bezier(.2, .8, .2, 1) .24s both; }
.hero-card { animation: rise-in .8s cubic-bezier(.2, .8, .2, 1) .12s both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } }
/* Podio: al primo arrivo i blocchi crescono dal basso, terzo, secondo e poi primo. */
.podium.intro .block { transform-origin: bottom; animation: grow-up .8s cubic-bezier(.2, .8, .2, 1) both; }
.podium.intro .p3 .block { animation-delay: .25s; }
.podium.intro .p2 .block { animation-delay: .4s; }
.podium.intro .p1 .block { animation-delay: .6s; }
@keyframes grow-up { from { transform: scaleY(0); } }
.podium .crown { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-4deg); } }
/* Una cifra che cambia (timer, prezzo del primo posto) fa un piccolo scatto. */
.bump { animation: bump .35s cubic-bezier(.2, .8, .2, 1.4); display: inline-block; }
.timer .n.bump { display: block; }
@keyframes bump { 40% { transform: translateY(-4px); opacity: .6; } }
.hero-price .v.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 20% { color: var(--accent-fg); transform: scale(1.06); } }

/* Coriandoli. */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.pre-line { white-space: pre-line; overflow-wrap: anywhere; }
.cover-thumb { width: 300px; max-width: 100%; aspect-ratio: 3 / 1; border-radius: var(--r-sm); }
