:root {
  --ink: #05040a;
  --ink-2: #0a0812;
  --panel: #12101a;
  --panel-2: #1a1524;
  --panel-elev: #211c2e;
  --line: rgba(186, 150, 255, 0.14);
  --line-strong: rgba(255, 176, 120, 0.22);
  --text: #f8f4ff;
  --muted: #a89bb8;
  --violet: #8b5cff;
  --violet-dim: #5c3dcc;
  --magenta: #e23d8c;
  --flame: #ff6a2c;
  --amber: #ffb347;
  --gold: #f0c27a;
  --ok: #5ecf9a;
  --bad: #ff6b7a;
  --info: #6aa4ff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow-flame: 0 0 24px rgba(255, 106, 44, 0.25);
  --shadow-glow-violet: 0 0 28px rgba(139, 92, 255, 0.2);
  --space-page-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  --font-display: Fraunces, Georgia, serif;
  --font-ui: Outfit, "Segoe UI", sans-serif;
  color-scheme: dark;
  font-family: var(--font-ui);
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  color: var(--text);
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse 120% 55% at 50% -20%, rgba(139, 92, 255, 0.2), transparent 58%),
    radial-gradient(ellipse 80% 40% at 100% 10%, rgba(255, 106, 44, 0.1), transparent 50%),
    radial-gradient(ellipse 60% 35% at 0% 85%, rgba(94, 200, 255, 0.05), transparent 45%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(139, 92, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 75%);
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.top {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 18px;
  background: rgba(5, 4, 10, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 176, 120, 0.06);
}
.top.scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 12px; object-fit: cover; background: #241c30; }
.word { font-family: Fraunces, Georgia, serif; font-weight: 680; letter-spacing: -0.03em; font-size: 1.2rem; }
.word em { font-style: normal; color: #d7b4ff; }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.nav a, .dock a {
  text-decoration: none; color: var(--muted); font-weight: 650; font-size: .92rem;
  padding: 8px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
}
.nav a.active, .dock a.active { color: white; background: rgba(139, 92, 255, .22); }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.account, .iconbtn {
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  border-radius: 999px; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
}
.iconbtn { width: 38px; height: 38px; padding: 0; justify-content: center; position: relative; }
.iconbtn .bell { width: 18px; height: 18px; display: block; }
.iconbtn .dot { position: absolute; top: -4px; right: -4px; }
.account > img, .face, .ph, .who-mini img, .rank img, .person img, .challenge img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #241c30; flex: none;
}
.account b { display: block; font-size: .82rem; line-height: 1.1; }
.account small { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 0; color: var(--muted); font-weight: 600; }
.account small .coins {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--flame);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.account small .coin-emoji {
  width: 14px;
  height: 14px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255, 106, 44, 0.35));
}
.account small .lv { color: var(--muted); font-weight: 600; }
.coins { color: var(--flame); font-weight: 700; font-variant-numeric: tabular-nums; }
.coins.tick { animation: coin .45s ease; }
@keyframes coin { 50% { color: #fff; text-shadow: 0 0 12px rgba(255, 106, 44, .8); } }
.dot {
  min-width: 1.15rem; height: 1.15rem; padding: 0 4px; border-radius: 99px;
  background: var(--flame); color: #1a0d08; font-style: normal; font-size: .7rem; font-weight: 800;
  display: inline-grid; place-items: center;
}
.menu, .notices {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(320px, 80vw);
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 8px;
  display: grid; gap: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.4);
}
.menu a, .menu button, .notices a {
  text-align: left; text-decoration: none; background: transparent; border: 0; border-radius: 10px;
  padding: 8px 10px; color: var(--text);
}
.menu a:hover, .menu button:hover, .notices a:hover { background: rgba(255,255,255,.05); }
.notices a small { display: block; color: var(--muted); }
.notices a.new { box-shadow: inset 2px 0 var(--magenta); }
main { position: relative; z-index: 1; width: min(1120px, calc(100% - 28px)); margin: 14px auto var(--space-page-bottom); min-width: 0; }
.page { display: grid; gap: 16px; animation: rise .35s ease both; }
.page-home { gap: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
h1, .hero h1 {
  font-family: Fraunces, Georgia, serif; font-weight: 680; letter-spacing: -0.04em;
  font-size: clamp(2rem, 4vw, 3.4rem); line-height: .98; margin: 0;
}
h2 { margin: 0; font-size: 1.05rem; }
.kicker { margin: 0 0 6px; color: #d7b4ff; font-size: .72rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.lead, .muted, .card p, .tile p { color: var(--muted); line-height: 1.45; margin: 0; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 240px); gap: 14px; align-items: center;
  padding: 4px 0 0;
}
.page-home .hero h1 { font-size: clamp(1.65rem, 3.2vw, 2.55rem); }
.balance {
  display: grid; align-content: center; gap: 2px; text-decoration: none; border-radius: var(--radius-xl); padding: 14px 16px;
  background:
    linear-gradient(145deg, rgba(255, 106, 44, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(226, 61, 140, 0.12), transparent),
    var(--panel-elev);
  border: 1px solid var(--line-strong);
  min-height: unset;
  box-shadow: var(--shadow-glow-flame), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform .15s ease, border-color .15s ease;
}
.balance:hover { transform: translateY(-1px); border-color: rgba(255, 106, 44, 0.45); }
.balance > span {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 184, 120, 0.82);
}
.balance strong {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.45rem, 5.2vw, 3.35rem);
  font-variant-numeric: tabular-nums;
  color: var(--flame);
}
.balance .coins {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}
.balance .coin-emoji {
  width: clamp(1.55rem, 4.2vw, 2.05rem);
  height: clamp(1.55rem, 4.2vw, 2.05rem);
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 106, 44, 0.45));
}
[data-ppanel] { display: grid; gap: 22px; align-content: start; }
.beat { display: grid; gap: 6px; }
.stats, .pulse { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat, .pulse a, .pulse div {
  --accent: var(--violet);
  position: relative; overflow: hidden; min-width: 0;
  padding: 16px 16px 16px 18px; border-radius: 16px;
  background:
    radial-gradient(140px 70px at 0 0, color-mix(in srgb, var(--accent) 28%, transparent), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 46%),
    var(--panel);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.stat::before, .pulse a::before, .pulse div::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #fff, var(--accent));
}
.stats > :nth-child(4n+1) { --accent: #8b5cff; }
.stats > :nth-child(4n+2) { --accent: #6aa4ff; }
.stats > :nth-child(4n+3) { --accent: #3dbe8b; }
.stats > :nth-child(4n+4) { --accent: #ff6a2c; }
.stat[data-kind="messaggi"] { --accent: #c084fc; }
.stat[data-kind="vocale"] { --accent: #6aa4ff; }
.stat[data-kind="inviti"] { --accent: #3dbe8b; }
.stat[data-kind="quiz"] { --accent: #f0c27a; }
.stat[data-kind="fiamme"] { --accent: #ff6a2c; }
.stat[data-kind="livello"] { --accent: #c084fc; }
.stat[data-kind="prestigio"] { --accent: #ffb089; }
.stat[data-kind="vittorie"] { --accent: #e23d8c; }
.stat[data-kind="sfide"] { --accent: #8b5cff; }
a.stat:hover, .pulse a:hover { border-color: color-mix(in srgb, var(--accent) 70%, white); }
.stat b, .pulse b {
  display: block; margin-top: 12px; color: var(--text);
  font-family: Fraunces, Georgia, serif; font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 650;
  letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums;
}
.stat.wide { grid-column: 1 / -1; }
.stat .record { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.stat .record span { display: grid; gap: 6px; min-width: 0; }
.stat .record b { margin-top: 0; }
.stat .record small { color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.band { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.band .panel-leader {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 12px 14px;
}
.band .panel-head { min-height: 3.25rem; display: grid; align-content: end; gap: 4px; }
.band .panel-head .kicker { margin: 0; }
.band .panel-head h2 { margin: 0; line-height: 1.15; }
.band .panel-leader .list {
  flex: 1;
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 9.5rem;
}
.band .panel-leader .list .rank {
  min-height: 44px;
  align-items: center;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}
.band .band-meta {
  margin: 0;
  min-height: 1.35rem;
  font-size: .82rem;
  line-height: 1.35;
}
.band .band-foot {
  margin-top: auto;
  font-size: .82rem;
  font-weight: 750;
  color: var(--amber);
  text-decoration: none;
  padding-top: 2px;
}
.band .band-foot:hover { color: var(--flame); }
.panel, .card, .tile, .place, .rank, .product, .modal {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.actions .tile {
  position: relative; overflow: hidden; min-height: 108px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.actions .tile::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background: radial-gradient(120px 80px at 100% 0%, rgba(139, 92, 255, 0.25), transparent 70%);
}
.actions .tile:nth-child(2)::before { background: radial-gradient(120px 80px at 100% 0%, rgba(255, 106, 44, 0.28), transparent 70%); }
.actions .tile:nth-child(3)::before { background: radial-gradient(120px 80px at 100% 0%, rgba(240, 194, 122, 0.22), transparent 70%); }
.actions .tile:hover { transform: translateY(-2px); border-color: rgba(139, 92, 255, 0.45); box-shadow: var(--shadow-soft); }
.actions .tile h2 { position: relative; font-family: var(--font-display); font-size: 1.15rem; }
.panel, .card, .tile, .product { padding: 14px; display: grid; gap: 6px; align-content: start; text-decoration: none; }
.tile:hover, .product:hover, .rank:hover { border-color: rgba(226, 61, 140, .45); }
.product {
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.product:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: rgba(226, 61, 140, 0.35); }
.product .shot {
  width: 100%; height: 152px; object-fit: cover; border-radius: var(--radius-md);
  background: #0c0a10;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.product h2 { font-family: var(--font-display); font-size: 1.08rem; letter-spacing: -0.02em; }
.grid, .actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid.pieces { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid.pieces .piece small { max-width: 100%; }
.series { gap: 10px; }
.series[data-series] { cursor: pointer; }
.series.on { border-color: rgba(226, 61, 140, .75); box-shadow: inset 0 0 0 1px rgba(226, 61, 140, .45); }
.series-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.series-top b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.series-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.series-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--flame)); }
.series.done { border-color: rgba(125, 206, 160, .5); }
.series.done .series-top b { color: var(--ok); }
.series.done .series-bar i { background: var(--ok); }
.series-pieces { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.series-pieces li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); font-size: .78rem; }
.series-pieces li.have { color: var(--text); border-color: rgba(139, 92, 255, .5); background: rgba(139, 92, 255, .14); }
.grid.two { grid-template-columns: 1.2fr .8fr; }

.game-center .lead { max-width: 52ch; }
.game-hub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.game-hub__card {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 240px;
  padding: 18px 18px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(160px 100px at 100% 0%, color-mix(in srgb, var(--game-accent, var(--violet)) 32%, transparent), transparent 72%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 45%),
    var(--panel-elev);
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.game-hub__card:hover {
  border-color: color-mix(in srgb, var(--game-accent, var(--violet)) 55%, white);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .28);
}
.game-hub__card[data-kind="slot"] { --game-accent: var(--flame); }
.game-hub__card[data-kind="sfide"] { --game-accent: #8b5cff; }
.game-hub__card[data-kind="aua"] { --game-accent: var(--gold); }
.game-hub__card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.15;
  background: var(--game-accent, var(--violet));
  filter: blur(24px);
  pointer-events: none;
}
.game-hub__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 1.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid color-mix(in srgb, var(--game-accent, var(--violet)) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.game-hub__tag {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--game-accent, var(--violet)) 70%, white);
  background: color-mix(in srgb, var(--game-accent, var(--violet)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--game-accent, var(--violet)) 35%, transparent);
}
.game-hub__card h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.game-hub__card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: .92rem;
  flex: 1;
}
.game-hub__go {
  margin-top: auto;
  padding-top: 6px;
  font-weight: 800;
  font-size: .88rem;
  color: color-mix(in srgb, var(--game-accent, var(--violet)) 75%, white);
}
.game-hub__go::after { content: ' →'; }
.game-hub__badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}
.mark {
  height: 72px; border-radius: 14px;
  background:
    radial-gradient(80px 40px at 80% 20%, rgba(255, 106, 44, .45), transparent 60%),
    linear-gradient(135deg, #2a1844, #121018 70%);
}
.mark[data-kind="collezione"] { background: linear-gradient(135deg, #4a2060, #1a1020); }
.mark[data-kind="ruolo_custom"] { background: linear-gradient(135deg, #2a2458, #14121c); }
.mark[data-kind="stanza"] { background: linear-gradient(135deg, #3a2218, #14110f); }
.mark[data-kind="gift"] { background: linear-gradient(135deg, #243044, #12141a); }
.price { color: var(--flame); font-family: Fraunces, Georgia, serif; font-size: 1.4rem; margin: 2px 0; }
.piece .ask { color: var(--flame); font-family: Fraunces, Georgia, serif; font-size: 1rem; }
.modal label.field { display: grid; gap: 6px; color: var(--muted); font-size: .85rem; }
.btn, .ghost {
  border-radius: 999px; padding: 10px 14px; font-weight: 750; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn { border: 0; color: #1a0d08; background: linear-gradient(90deg, var(--violet), var(--magenta) 60%, var(--flame)); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.row, .chips, .tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tabs-scroll {
  position: relative;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding-bottom: 6px;
  margin: 0 -4px;
  padding-left: 4px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 255, 0.45) transparent;
}
.tabs-scroll::after {
  content: "";
  position: sticky;
  right: 0;
  flex: none;
  width: 28px;
  margin-left: -28px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ink-2));
}
.tabs-scroll button { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
.tabs { flex-wrap: nowrap; overflow: auto; padding-bottom: 2px; }
.chips button, .tabs button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 7px 11px; font-weight: 700;
}
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; }
.chips button.on, .tabs button.on { color: white; border-color: var(--violet); background: rgba(139, 92, 255, .16); }
input, textarea, select {
  width: 100%; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.28); padding: 11px 12px;
}
textarea { min-height: 88px; resize: vertical; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.tag, .status {
  display: inline-flex; width: fit-content; border-radius: 999px; padding: 3px 8px;
  background: rgba(255,255,255,.06); color: var(--muted); font-size: .75rem; font-weight: 700;
}
.tag.r-Raro { color: #d7b4ff; }
.tag.r-Epico { color: var(--gold); }
.tag.r-Non { color: #9ad7ff; }
.status.live { color: #1a0d08; background: #f0c27a; }
.status.win { color: #10281c; background: var(--ok); }
.status.loss { color: #3a1218; background: var(--bad); }
.you-line, .banner {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none;
  background: rgba(139, 92, 255, .08);
}
#board { display: grid; gap: 18px; }
.page-board .you-line {
  background: linear-gradient(90deg, rgba(139, 92, 255, 0.14), rgba(255, 106, 44, 0.08));
  border-color: var(--line-strong);
}
.podium .place {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--panel-elev);
}
.podium .place[data-rank="1"] {
  border-color: rgba(240, 194, 122, 0.45);
  box-shadow: var(--shadow-glow-flame);
}
.list .rank {
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
}
.list .rank:hover { border-color: var(--line); background: rgba(139, 92, 255, 0.08); }
.rank > b .prestige, .place > b .prestige, .you-line strong .prestige { vertical-align: middle; }
.rank > b, .place > b { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 0; }
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 14px; align-items: end; }
.podium.n-1 { grid-template-columns: minmax(0, 260px); }
.podium.n-2 { grid-template-columns: 1fr 1fr; }
.place { padding: 14px; display: grid; justify-items: center; gap: 4px; text-align: center; text-decoration: none; }
.place img, .place .ph { width: 64px; height: 64px; border-radius: 50%; }
.place[data-rank="1"] img { box-shadow: 0 0 0 3px var(--gold); }
.place[data-rank="2"] img { box-shadow: 0 0 0 3px #d5d8df; }
.place[data-rank="3"] img { box-shadow: 0 0 0 3px #d08a52; }
.list { display: grid; gap: 8px; }
.rank {
  padding: 8px 12px; display: flex; gap: 10px; align-items: center; text-decoration: none;
}
.rank > b { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank.you, .place.you { border-color: rgba(226, 61, 140, .6); }
.pos { width: 1.4rem; color: var(--gold); font-weight: 800; }
.who-mini { display: flex; gap: 8px; align-items: center; min-width: 0; flex: 1; }
.who-mini > span { flex: 1; min-width: 0; }
.meter { display: block; height: 3px; border-radius: 99px; background: rgba(255,255,255,.08); margin-top: 5px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--flame)); }
.xp { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.xp i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--magenta)); }
.levelbar { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; margin: 2px 0 0; min-width: 0; }
.levelbar-main { min-width: 0; }
.levelbar-meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin: 0 2px 4px; font-size: .78rem; }
.levelbar-meta span { font-weight: 750; }
.levelbar-meta b { font-variant-numeric: tabular-nums; color: #f6ecff; font-weight: 650; }
.levelbar-track {
  height: 16px; padding: 2px; border-radius: 6px;
  background: linear-gradient(180deg, #efe7ff, #6d647e 16%, #16121c 52%, #a78472);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 1px #0b090f, 0 8px 16px rgba(0,0,0,.35);
}
.levelbar-fill {
  width: 0%; height: 100%; border-radius: 5px; position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.18) 0 1px, transparent 1px 11px),
    linear-gradient(90deg, #6d28d9, #e23d8c 64%, #ff6a2c);
  box-shadow: 0 0 16px rgba(226, 61, 140, .5), inset 0 0 12px rgba(255,255,255,.28);
  transition: width .9s cubic-bezier(.2, .8, .2, 1);
}
.levelbar-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 15%, rgba(255,255,255,.5), transparent 85%);
  opacity: .18;
}
.spark {
  position: absolute; top: 40%; width: 3px; height: 3px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px #fff; opacity: 0;
}
.spark:nth-child(1) { left: 22%; }
.spark:nth-child(2) { left: 48%; }
.spark:nth-child(3) { left: 74%; }
.levelbar-shield { position: relative; width: 52px; }
.levelbar-shield svg { display: block; width: 100%; height: auto; }
.levelbar-lv { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; line-height: .85; }
.levelbar-lv small { font-size: .48rem; letter-spacing: .14em; font-weight: 800; color: #ffb089; }
.levelbar-lv strong { font-family: Fraunces, Georgia, serif; font-size: 1.05rem; color: #fff; text-shadow: 0 0 8px rgba(196, 166, 255, .85); }
.levelup { position: absolute; left: 64px; top: -2px; margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .16em; color: #fff; text-shadow: 0 0 14px #e23d8c; }
.levelbar.is-up .levelbar-shield { animation: lb-pop .7s ease; }
@keyframes lb-pop { 40% { transform: scale(1.08); } }
.person { width: 100%; text-align: left; display: flex; gap: 8px; align-items: center; padding: 8px; color: var(--text); }
.person .go { margin-left: auto; color: #d7b4ff; font-weight: 750; }
.challenge { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head img, .profile-head .ph { width: 76px; height: 76px; border-radius: 24px; }
.facts { display: grid; gap: 4px; }
.facts div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.back { color: var(--muted); text-decoration: none; font-weight: 700; }
.stage {
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: var(--shadow-soft), var(--shadow-glow-violet);
}
.page-slot .stage { margin-bottom: 8px; }
.page-slot .stage { background: radial-gradient(80% 50% at 50% 0%, rgba(255, 106, 44, .14), transparent 70%), #0b0810; }
.page-slot iframe.game { min-height: 640px; background: transparent; transition: height .25s ease; }
iframe.game { width: 100%; height: 900px; min-height: 900px; border: 0; display: block; background: #000; }
@media (max-width: 860px) {
  .page-slot iframe.game { height: 860px; min-height: 640px; }
  .page-slot .stage { border-radius: var(--radius-lg); }
}
.login { max-width: 520px; margin: 10vh auto; padding: 22px; }
.warn { color: var(--bad); }
.ok { color: var(--ok); }
.facts b.bad { color: var(--bad); }
.facts b.mid { color: #f5c542; }
.facts b.ok { color: var(--ok); }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.66); display: grid; place-items: center; padding: 16px; z-index: 12; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); min-width: 0; overflow: auto; padding: 16px; display: grid; gap: 8px; align-content: start; }
.modal img.shot { width: 100%; height: 140px; object-fit: cover; object-position: center; border-radius: 12px; background: #0c0a10; }
.modal.done { animation: pop .4s ease; }
@keyframes pop { from { transform: scale(.96); } to { transform: none; } }
.ph { display: grid; place-items: center; font-weight: 800; color: var(--gold); }
#toasts { position: fixed; right: 14px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 14; display: grid; gap: 8px; }
.toast { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-width: 280px; }
.dock { display: none; }
.foot { color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
@media (min-width: 861px) {
  .place[data-rank="1"] { order: 2; }
  .place[data-rank="2"] { order: 1; }
  .place[data-rank="3"] { order: 3; }
}
@media (max-width: 860px) {
  .grid.pieces { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav { display: none; }
  main { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); --space-page-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .hero, .band, .grid.two { grid-template-columns: 1fr; }
  .game-hub { grid-template-columns: 1fr; }
  .actions, .grid, .stats, .pulse { grid-template-columns: 1fr 1fr; }
  .podium, .podium.n-2 { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .challenge { grid-template-columns: auto 1fr; }
  .challenge .row { grid-column: 1 / -1; }
  .levelbar { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
  .levelbar-shield { width: 44px; }
  .levelbar-lv strong { font-size: .95rem; }
  .levelbar-track { height: 14px; }
  .levelbar-meta { font-size: .72rem; }
  .levelup { left: 54px; font-size: .68rem; }
  .account b, .account .lv { display: none; }
  .account small { white-space: nowrap; }
  .dock {
    display: flex; position: fixed; left: 8px; right: 8px; z-index: 8;
    bottom: calc(8px + env(safe-area-inset-bottom));
    background: rgba(10, 8, 18, 0.94);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    padding: 4px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  }
  .dock a, .dock-more-btn {
    flex: 1; justify-content: center; min-width: 0; max-width: 100%;
    min-height: 44px; font-size: .72rem; padding: 8px 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .dock a span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .dock-slot { position: relative; flex: 1; min-width: 0; display: flex; }
  .dock-more-btn {
    width: 100%; border: 0; background: transparent; color: var(--muted); font-weight: 650; border-radius: 999px;
  }
  .dock-more-btn.active, .dock a.active { color: white; background: rgba(139, 92, 255, .22); }
  .dock-pop {
    position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 9;
    display: grid; min-width: 196px; padding: 6px; gap: 4px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  }
  .dock-pop[hidden] { display: none; }
  .dock-pop a { flex: none; width: 100%; justify-content: flex-start; overflow: visible; padding: 8px 12px; }
  .btn, .ghost, .chips button, .filters input, .filters select { min-height: 44px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .grid.pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product { gap: 8px; }
  .product h2, .product p, .price { overflow-wrap: anywhere; }
  .product .btn, .product .ghost { width: 100%; }
  #cats { width: 100%; max-width: 100%; }
  #cats button { flex: 0 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .page, .coins.tick, .modal.done, .relic[data-rarity="leggendario"] .art, .relic[data-rarity="mitico"] .art, .player.has-fx,
  .levelbar-fill::after, .spark, .levelbar-shield, .levelbar.is-up .levelbar-shield,
  body::before { animation: none; }
  .levelbar-fill { transition: none; }
  .game-hub__card:hover, .actions .tile:hover, .product:hover, .balance:hover { transform: none; }
}
.challenge {
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--violet);
  transition: border-color .15s ease, background .15s ease;
}
.page-sfide .card.challenge:hover { border-left-color: var(--flame); background: rgba(139, 92, 255, 0.06); }
.page-sfide .list { gap: 10px; padding-bottom: 12px; }
.page-collection h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.page-shop .banner {
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgba(139, 92, 255, 0.16), rgba(255, 106, 44, 0.1));
}
.boot { padding: 24px; text-align: center; }
.catrail::-webkit-scrollbar { display: none; }
.catrail a { flex: none; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.catrail a.on, .catrail a:hover { color: var(--text); border-color: rgba(226, 61, 140, .45); background: rgba(139, 92, 255, .12); }
.catrail small { color: var(--gold); }
.relic { position: relative; display: grid; gap: 6px; padding: 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%), var(--panel); border: 1px solid color-mix(in srgb, var(--rare, var(--line)) 55%, transparent); overflow: hidden; }
.relic[data-rarity="comune"] { --rare: #9a93a8; }
.relic[data-rarity="non_comune"] { --rare: #3dbe8b; }
.relic[data-rarity="raro"] { --rare: #6aa4ff; }
.relic[data-rarity="epico"] { --rare: #c084fc; }
.relic[data-rarity="leggendario"] { --rare: #f0c27a; }
.relic[data-rarity="mitico"] { --rare: #ff6a2c; }
.relic .art {
  height: 148px; border-radius: var(--radius-md); display: grid; place-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 85%, rgba(255, 106, 44, 0.12), transparent 55%),
    radial-gradient(120px 80px at 50% 35%, color-mix(in srgb, var(--rare) 35%, transparent), transparent 72%),
    linear-gradient(180deg, rgba(139, 92, 255, 0.08), rgba(0, 0, 0, 0.55));
  border: 1px solid color-mix(in srgb, var(--rare, var(--line)) 35%, transparent);
  overflow: hidden;
  box-shadow: inset 0 -12px 24px rgba(0, 0, 0, 0.45);
}
.grid.pieces .modelbox {
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 70% 45% at 50% 92%, rgba(255, 106, 44, 0.15), transparent 60%),
    radial-gradient(100px 70px at 50% 40%, rgba(139, 92, 255, 0.2), transparent 70%),
    linear-gradient(180deg, #1a1524, #0a0812 85%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.grid.pieces .piece strong { font-family: var(--font-display); }
.relic .art img, .relic model-viewer { width: 100%; height: 148px; object-fit: contain; }
.relic .crest { font-family: Fraunces, serif; font-size: 2.4rem; color: var(--rare); }
.relic:hover { transform: translateY(-2px); }
.player { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.player .banner { height: 132px; background: linear-gradient(100deg, rgba(139, 92, 255, .35), rgba(255, 106, 44, .18) 55%, #14111a) center/cover no-repeat; }
.player .identity { display: grid; gap: 14px; padding: 0 16px 16px; }
.identity-row { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.id-text { min-width: 0; flex: 1; display: grid; gap: 4px; align-content: start; padding-top: 12px; }
.name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.roles { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.role {
  --role: var(--muted);
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--role) 55%, transparent);
  background: color-mix(in srgb, var(--role) 16%, transparent);
  color: var(--role); font-size: .72rem; font-weight: 800; line-height: 1.35; letter-spacing: .01em;
}
.role[data-role="founder"] { --role: #ff5a5a; }
.role[data-role="admin"] { --role: #7ec8e3; }
.role[data-role="helper"] { --role: #7dcea0; }
.role[data-role="utente"] { --role: #f0c27a; }
.role[data-role="booster"] { --role: #f47fff; }
.role[data-role="streamer"] { --role: #c084fc; }
.prestige {
  display: inline-flex; align-items: center; margin: 0; padding: 2px 8px; border-radius: 8px;
  border: 1px solid rgba(255, 176, 137, .55); color: #ffb089; background: linear-gradient(180deg, rgba(255, 106, 44, .2), rgba(18, 8, 20, .72));
  font-size: .72rem; font-weight: 800; letter-spacing: .03em; line-height: 1.45; vertical-align: middle;
}
.avatar-box { position: relative; width: 84px; height: 84px; flex: none; margin-top: -42px; }
.avatar-box > img, .avatar-box > .ph { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid #07060b; }
.avatar-box .frame { position: absolute; inset: -8px; width: 100px; height: 100px; pointer-events: none; }
.avatar-box .emblem { position: absolute; right: -6px; bottom: -4px; width: 28px; height: 28px; border-radius: 8px; background: #07060b; }
.player h1 { margin: 0; font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.03em; }
.marks { display: inline-flex; gap: 4px; }
.marks img, .marks .chip { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.marks .chip { display: inline-grid; place-items: center; padding: 0 6px; width: auto; font-style: normal; font-size: .68rem; background: var(--panel-2); border: 1px solid var(--line); }
.player .title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--gold); font-weight: 700; }
.player .id-text .muted { margin: 0; }
.plate { display: inline-flex; gap: 6px; align-items: center; margin: 0; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.plate img { width: 16px; height: 16px; }
.piece { display: grid; justify-items: center; gap: 4px; margin: 0; padding: 0; background: none; border: 0; cursor: pointer; }
button.piece { width: 100%; font: inherit; color: inherit; }
.modelbox { display: block; width: min(100%, 280px); aspect-ratio: 1; position: relative; }
.piece .modelbox model-viewer, .piece .modelbox img, .piece .modelbox .crest {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: hidden;
  background: transparent; object-fit: contain;
}
.piece .modelbox .crest { display: grid; place-items: center; }
.piece model-viewer { --progress-bar-height: 0px; --progress-bar-color: transparent; }
.piece img { pointer-events: none; }
.piece model-viewer { pointer-events: auto; cursor: grab; touch-action: pan-y; }
@media (hover: none) and (pointer: coarse) {
  .relic model-viewer, .piece model-viewer { touch-action: pan-y; cursor: auto; }
}
.piece .rarity { color: var(--rare, var(--muted)); font-size: .8rem; font-weight: 700; }
.piece .mine { display: inline-block; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; color: #d7ffe8; background: rgba(61, 190, 139, .16); border: 1px solid rgba(61, 190, 139, .45); }
.piece strong, .piece-name { font-size: 1.05rem; text-align: center; }
.piece small { display: block; max-width: 36ch; text-align: center; }
button.gift { margin-top: 4px; }
.page.agent {
  display: grid; grid-template-columns: 248px minmax(0, 1fr) 250px;
  height: calc(100dvh - 88px); margin: 0 -8px;
  background: linear-gradient(180deg, var(--panel-2), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.page.agent aside { min-height: 0; overflow: auto; padding: 12px; background: rgba(0, 0, 0, 0.25); border-right: 1px solid var(--line); }
.agent-rail #sessions button:hover, .agent-rail #sessions button.on { background: rgba(139, 92, 255, 0.18); color: var(--text); }
.page.agent .composer-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: rgba(18, 14, 26, 0.92); }
.page.agent .agent-top { border-bottom: 1px solid var(--line); color: var(--text); }
.page.agent .agent-top p { color: var(--muted); }
.transcript { flex: 1; overflow: auto; padding: 22px 8% calc(12px + env(safe-area-inset-bottom)); }
.page.agent .composer {
  margin: 0 8% calc(14px + env(safe-area-inset-bottom));
  background: var(--panel-elev);
  border: 1px solid var(--line-strong);
}
.turn.user .turn-body { background: rgba(139, 92, 255, 0.12); border: 1px solid var(--line); }
.agent-rail { display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.agent-rail #sessions { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.agent-rail #sessions button { width: 100%; text-align: left; border: 0; background: transparent; color: #d4d4d4; border-radius: 8px; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-rail #sessions button:hover, .agent-rail #sessions button.on { background: #2a2a2a; }
.agent-settings { border-top: 1px solid #2a2a2a; padding-top: 8px; }
.agent-settings summary { cursor: pointer; color: #9a9a9a; font-size: .85rem; }
.agent-settings h3 { margin: 12px 0 6px; font-size: .78rem; color: #9a9a9a; font-weight: 650; }
.agent-settings form, .agent-settings #agent-users, .agent-settings #agent-audit { display: grid; gap: 6px; margin-top: 8px; }
.agent-settings p { margin: 0; font-size: .8rem; color: #c8c8c8; }
.page.agent aside:last-child { border-right: 0; border-left: 1px solid #2a2a2a; }
.page.agent .composer-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #1e1e1e; }
.page.agent .agent-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #2a2a2a; color: #d4d4d4; }
.page.agent .agent-top h1 { margin: 0; font-size: .95rem; font-weight: 600; }
.page.agent .agent-top p { margin: 0; color: #8d8d8d; font-size: .78rem; }
.transcript { flex: 1; overflow: auto; padding: 22px 8% 12px; }
.turn { margin: 0 0 16px; color: #ececec; font-size: 14.5px; line-height: 1.55; }
.turn.user { margin-left: 18%; }
.turn.user .turn-body { background: #2b2b2b; border: 1px solid #3a3a3a; border-radius: 14px; padding: 10px 14px; }
.turn.assistant .turn-body { padding: 2px 2px 0; }
.turn.system .turn-body { color: #f0a8a8; font-size: .85rem; }
.turn .c-inline { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: #2a2a2a; border-radius: 4px; padding: 1px 5px; }
.turn .c-code { margin: 10px 0; padding: 12px; overflow: auto; background: #141414; border: 1px solid #2e2e2e; border-radius: 8px; }
.turn .c-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; white-space: pre; }
.thought { margin: 0 0 10px; color: #9a9a9a; font-size: .82rem; }
.thought summary { cursor: pointer; }
.tool-row { margin: 0 0 8px; color: #bdbdbd; font-size: .82rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tool-row i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #8a8a8a; }
.tool-row.run i { background: #d6d6d6; }
.composer { position: relative; margin: 0 8% 14px; background: #2b2b2b; border: 1px solid #3c3c3c; border-radius: 16px; padding: 8px 10px 8px 12px; }
.mention-menu { position: absolute; z-index: 6; left: 8px; right: 8px; bottom: calc(100% + 6px); max-height: 240px; overflow: auto; background: #1a1a1a; border: 1px solid #3c3c3c; border-radius: 12px; padding: 6px; display: grid; gap: 2px; }
.mention-menu[hidden] { display: none; }
.mention-label { margin: 6px 8px 2px; color: #9a9a9a; font-size: .72rem; }
.mention-opt { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; color: #f3f3f3; border-radius: 8px; padding: 6px 8px; }
.mention-opt.on, .mention-opt:hover { background: #333; }
.mention-opt img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.mention-opt i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mention-opt b { color: #9a9a9a; font-size: .68rem; min-width: 52px; font-weight: 700; }
.mention-opt span { display: grid; min-width: 0; }
.mention-opt small { color: #9a9a9a; }
.composer textarea { width: 100%; min-height: 44px; max-height: 180px; margin: 0; padding: 6px 2px; resize: none; border: 0; background: transparent; color: #f3f3f3; box-shadow: none; }
.composer-bar { display: flex; align-items: center; gap: 8px; }
.composer-bar select { width: auto; max-width: 46%; margin: 0; padding: 4px 8px; border: 0; background: transparent; color: #c8c8c8; }
.composer .send, .composer .stop { width: 28px; height: 28px; margin-left: auto; border: 0; border-radius: 50%; }
.composer .send { background: #ececec; color: #1a1a1a; font-weight: 700; }
.composer .stop { background: #ececec; color: #1a1a1a; }
.composer .send:disabled { opacity: .45; }
#agent-msg { margin: -6px 8% 10px; color: #e0b4b4; font-size: .82rem; }
@media (max-width: 860px) {
  .page.agent { grid-template-columns: 1fr; height: auto; }
  .composer-col { min-height: 72dvh; }
  .transcript, .composer, #agent-msg { margin-left: 10px; margin-right: 10px; padding-left: 10px; padding-right: 10px; }
  .turn.user { margin-left: 8%; }
}
.piece[data-rarity="comune"] { --rare: #9a93a8; }
.piece[data-rarity="non_comune"] { --rare: #3dbe8b; }
.piece[data-rarity="raro"] { --rare: #6aa4ff; }
.piece[data-rarity="epico"] { --rare: #c084fc; }
.piece[data-rarity="leggendario"] { --rare: #f0c27a; }
.piece[data-rarity="mitico"] { --rare: #ff6a2c; }
.trophy { margin-left: auto; width: 92px; text-align: center; }
.trophy .modelbox { width: 100%; height: 72px; aspect-ratio: auto; }
.trophy .art, .trophy img, .trophy model-viewer { height: 72px; }
.trophy b { display: block; font-size: .75rem; }
#itemform { display: grid; gap: 8px; }
#itemform h3 { margin: 10px 0 0; font-size: 1rem; }
#itemform label, [data-panel="saldo"] label { display: grid; gap: 4px; color: var(--muted); font-size: .85rem; }
#itemform label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
#itemform label.check input { width: auto; }
#itemform .split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-tabs, .profile-tabs { position: sticky; top: 62px; z-index: 7; background: rgba(7, 6, 11, .94); padding: 8px 0 10px; }
section[hidden] { display: none !important; }
.admin-item { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; }
.admin-thumb { width: 88px; height: 64px; object-fit: cover; border-radius: 10px; background: #0c0a10; display: grid; place-items: center; color: var(--gold); font-weight: 800; }
.pill { font-weight: 750; margin: 4px 0; }
.pill.bad { color: var(--bad); }
.pill.mid, p.mid { color: #f5c542; }
.pill.ok { color: var(--ok); }
@media (max-width: 860px) {
  .identity-row { flex-wrap: wrap; }
  .trophy { margin-left: 0; align-self: flex-end; }
  #itemform .split { grid-template-columns: 1fr; }
  .admin-item { grid-template-columns: 1fr; }
}
.shop-admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.shop-nav { display: grid; gap: 6px; position: sticky; top: 118px; align-content: start; }
.shop-nav button { text-align: left; background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 8px 10px; color: var(--muted); white-space: nowrap; }
.shop-nav button.on { color: var(--text); border-color: var(--line); background: var(--panel); }
.shop-pane { display: grid; gap: 12px; min-width: 0; }
.shop-pane form { display: grid; gap: 8px; }
.shop-pane label { display: grid; gap: 4px; color: var(--muted); font-size: .85rem; }
.shop-pane input, .shop-pane textarea, .shop-pane select { width: 100%; background: #0c0a10; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.shop-pane textarea { min-height: 72px; resize: vertical; }
.shop-pane label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.shop-pane label.check input { width: auto; }
.product[style*="--card"] { border-color: color-mix(in srgb, var(--card) 55%, transparent); }
.product[data-effect="glow"] { box-shadow: 0 0 24px color-mix(in srgb, var(--card, var(--violet)) 35%, transparent); }
.product[data-effect="rise"] { transition: transform .2s ease; }
.product[data-effect="rise"]:hover { transform: translateY(-2px); }
.toast.bad { border-color: var(--bad); }
.rank small { display: block; color: var(--muted); font-weight: 500; }
@media (max-width: 860px) {
  .shop-admin { grid-template-columns: 1fr; }
  .shop-nav { position: static; grid-auto-flow: column; overflow: auto; }
}
.dpick { display: grid; gap: 6px; }
.dpick-field { position: relative; }
.dpick-q { width: 100%; background: #0c0a10; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); }
.dpick-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dpick-tags:empty { display: none; }
.dpick-tag, .dpick-opt { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; color: var(--text); }
.dpick-tag { width: auto; background: #16131c; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px 4px 4px; }
.dpick-tag img, .dpick-opt img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #0c0a10; }
.dpick-tag i, .dpick-opt i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dpick-tag span, .dpick-opt span { display: grid; min-width: 0; }
.dpick-tag small, .dpick-opt small, .dpick-group, .dpick-msg { color: var(--muted); }
.dpick-tag em { font-style: normal; color: var(--muted); padding: 0 4px; }
.dpick-tag.missing { border-color: var(--bad); }

/* Shared interaction and responsive finishing pass. */
:root {
  --surface-0: #05040a;
  --surface-1: #100d15;
  --surface-2: #19151e;
  --surface-3: #231d27;
  --focus-ring: #ffd18a;
  --transition-ui: 160ms ease;
}
:focus-visible { outline-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(255, 177, 71, .22); }
.btn {
  color: #27130a;
  background: linear-gradient(115deg, #ffc36c 0%, #ff9a46 42%, #ef6238 100%);
  box-shadow: 0 8px 22px rgba(255, 106, 44, .16);
  transition: transform var(--transition-ui), filter var(--transition-ui), box-shadow var(--transition-ui);
}
.btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 106, 44, .24); }
.btn:active:not(:disabled) { transform: translateY(0); }
.ghost:hover:not(:disabled), .iconbtn:hover, .account:hover { background-color: rgba(255, 255, 255, .07); }
.account { max-width: min(280px, 42vw); }
.account > span { min-width: 0; }
.account b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.account[aria-expanded="true"], .iconbtn[aria-expanded="true"] { border-color: var(--line-strong); background: var(--panel-2); }
.menu, .notices { z-index: 20; }
.menu [role="menuitem"]:focus-visible, .notices a:focus-visible, .dock-pop a:focus-visible { outline-offset: -2px; }
.admin-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 179, 71, .42) transparent;
}
.admin-tabs button { flex: 0 0 auto; min-height: 42px; scroll-snap-align: start; white-space: nowrap; }
.admin-tabs button.on { color: #fff6e7; border-color: rgba(255, 179, 71, .62); background: rgba(255, 154, 70, .13); }
.aua-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.aua-config-grid label { display: grid; gap: 5px; color: var(--muted); font-size: .86rem; }
.aua-config-grid input { min-width: 0; }
.modelbox { overflow: hidden; isolation: isolate; }
.modelbox.is-loading { background-color: #17121c; }
.model-loading {
  position: absolute;
  z-index: 2;
  inset: auto 8px 8px;
  width: auto;
  height: auto;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: #f2e6d9;
  background: rgba(12, 9, 15, .84);
  font-size: .72rem;
  line-height: 1.2;
  text-align: center;
  backdrop-filter: blur(8px);
}
.modelbox.is-ready .model-loading, .modelbox.is-fallback .model-loading { display: none; }
.model-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ff9a46;
  background: radial-gradient(ellipse at 50% 74%, rgba(255, 106, 44, .23), transparent 48%), linear-gradient(145deg, #211729, #0e0a12 76%);
}
.model-fallback svg { width: 48%; height: 68%; filter: drop-shadow(0 8px 16px rgba(255, 106, 44, .28)); }
.model-fallback b { position: absolute; color: #fff0d9; font: 700 1rem var(--font-display); }
.collection-empty { grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; max-width: 640px; padding: 18px; }
.collection-empty > span { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--amber); background: rgba(255, 154, 70, .1); font-size: 1.5rem; }
.collection-empty h3, .collection-empty p { margin: 0; }
.piece[role="button"]:focus-visible, .series[role="button"]:focus-visible { outline-offset: 4px; }
.page.agent {
  min-height: min(720px, calc(100dvh - 112px));
  background: linear-gradient(180deg, rgba(26, 21, 33, .96), rgba(10, 8, 14, .98));
}
.page.agent aside { background: rgba(12, 9, 16, .64); border-color: var(--line); }
.page.agent aside:last-child { border-left-color: var(--line); }
.page.agent .composer-col { background: linear-gradient(180deg, rgba(24, 19, 29, .98), rgba(15, 12, 19, .98)); }
.page.agent .agent-top { min-height: 54px; border-color: var(--line); padding: 8px 12px; }
.page.agent .agent-top h1 { min-width: 0; overflow-wrap: anywhere; font: 650 1.12rem/1.2 var(--font-display); }
.page.agent .agent-top p { flex: none; max-width: 35%; overflow-wrap: anywhere; text-align: right; }
.agent-archive-toggle { display: none; min-height: 40px; padding: 7px 11px; }
.page.agent .composer { background: var(--panel-elev); border-color: var(--line-strong); }
.page.agent .composer textarea { color: var(--text); }
.page.agent .composer-bar select { color: var(--text); }
.page.agent .composer .send, .page.agent .composer .stop { width: 38px; height: 38px; background: var(--amber); color: #241108; }
.page.agent .transcript { overscroll-behavior: contain; scrollbar-color: rgba(255, 179, 71, .25) transparent; }
.agent-rail #sessions button { color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.agent-rail #sessions button[aria-current="true"] { background: rgba(255, 154, 70, .12); color: #fff4e4; box-shadow: inset 2px 0 var(--amber); }
.agent-archive-scrim { display: none; }
.page.agent #agent-msg:empty { display: none; }
.page.agent #agent-msg { color: #ffd4c8; }
@media (max-width: 860px) {
  .account { max-width: min(190px, 45vw); }
  .account b { display: block; max-width: 12ch; font-size: .76rem; }
  .account .lv { display: none; }
  .account small { white-space: nowrap; font-size: .72rem; }
  .admin-tabs { position: sticky; top: 62px; margin-left: -4px; margin-right: -4px; padding-left: 4px; padding-right: 24px; background: rgba(10, 8, 14, .96); }
  .agent-archive-toggle { display: inline-flex; flex: none; }
  .page.agent {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    height: calc(100dvh - 128px - env(safe-area-inset-bottom, 0px));
    min-height: 560px;
    max-height: 900px;
    margin: 0 -4px;
    overflow: visible;
  }
  .page.agent .agent-rail { display: none; }
  .page.agent .agent-rail.open {
    position: fixed;
    display: flex;
    left: 12px;
    top: 68px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    z-index: 12;
    width: min(340px, calc(100vw - 24px));
    min-height: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 54px rgba(0, 0, 0, .56);
  }
  .agent-archive-scrim:not([hidden]) {
    position: fixed;
    display: block;
    inset: 0;
    z-index: 11;
    border: 0;
    background: rgba(0, 0, 0, .58);
  }
  .page.agent .composer-col { min-height: 0; height: 100%; }
  .page.agent .agent-top { gap: 8px; padding: 8px; }
  .page.agent .agent-top h1 { flex: 1; font-size: 1rem; }
  .page.agent .agent-top p { max-width: 32%; font-size: .72rem; }
  .page.agent .transcript { min-height: 0; padding: 14px 12px; }
  .page.agent .composer { flex: none; margin: 0 10px calc(10px + env(safe-area-inset-bottom, 0px)); padding: 8px 10px; }
  .page.agent #agent-msg { flex: none; margin: 0 12px 8px; }
  .page.agent #agent-side { display: none; }
}
@media (max-width: 640px) {
  .aua-config-grid { grid-template-columns: 1fr; }
  .page.agent { height: calc(100dvh - 120px - env(safe-area-inset-bottom, 0px)); min-height: 500px; }
  .page.agent .composer textarea { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.dpick-menu { position: static; z-index: 30; width: 100%; max-height: min(420px, 55vh); overflow: auto; background: #16131c; border: 1px solid var(--line); border-radius: 14px; padding: 6px; display: grid; gap: 2px; }
.dpick-menu[hidden] { display: none; }
.dpick-opt { background: transparent; border: 0; border-radius: 10px; padding: 6px; }
.dpick-opt:hover, .dpick-opt:focus { background: #221c2c; }
.dpick-opt b { color: var(--muted); font-size: .72rem; min-width: 58px; font-weight: 700; }
.dpick-group { margin: 6px 6px 2px; font-size: .75rem; }
.dpick-msg { min-height: 0; font-size: .85rem; }
.dpick-msg:empty { display: none; }

.page-feed .feed-stream,
.feed-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.feed-card {
  background: linear-gradient(165deg, rgba(28, 24, 36, .95), rgba(14, 12, 18, .98));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feed-card-head { padding: 12px 14px 0; }
.feed-author {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.feed-author img, .feed-author .ph { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.feed-author small { display: block; color: var(--muted); font-weight: 500; }
.feed-media {
  display: block;
  width: 100%;
  max-height: min(520px, 70vh);
  object-fit: contain;
  background: #0a090d;
  margin-top: 10px;
}
.feed-card-body { padding: 12px 14px; }
.feed-text { margin: 0; white-space: pre-wrap; line-height: 1.45; }
.feed-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.feed-tag {
  font-size: .82rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--muted);
}
.feed-tag.on, .feed-tag:hover { color: #fff; border-color: var(--accent); }
.feed-tag small { margin-left: 4px; opacity: .7; }
.feed-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
  flex-wrap: wrap;
}
.feed-actions button {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.feed-like.is-on { border-color: #f472b6; color: #fda4af; }
.feed-dislike.is-on { border-color: #94a3b8; color: #cbd5e1; }
.feed-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.feed-grid.feed-card--compact .feed-card { border-radius: var(--radius-md); }
.feed-comments {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  max-height: 40vh;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.feed-comment { min-width: 0; max-width: 100%; }
.feed-comment .feed-author { min-width: 0; align-items: flex-start; }
.feed-comment .feed-author > span:last-child { min-width: 0; flex: 1; }
.feed-comment .feed-author b {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.feed-comment p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
  max-width: 100%;
}
.feed-upload { display: block; margin: 12px 0; font-size: .9rem; color: var(--muted); }
.feed-tags--bar { margin: 16px 0; }
.feed-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.feed-manage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}
.feed-manage .ghost,
.feed-modal-manage .ghost {
  font-size: .78rem;
  padding: 4px 10px;
}
.feed-danger { color: #fca5a5 !important; border-color: rgba(248, 113, 113, .35) !important; }
.feed-check { display: block; margin: 10px 0; font-size: .9rem; color: var(--muted); }
.feed-modal-manage { margin: 8px 0 4px; }

.page-tracker .tracker-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 10px;
}
.tracker-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.tracker-link:hover { background: rgba(255, 255, 255, .04); }
.tracker-search { margin-bottom: 16px; }
.tracker-search label { display: block; }
.tracker-search input { width: 100%; margin-top: 6px; }
.tracker-search-hit {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.tracker-pager {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.page-lavoro { gap: 18px; }
.page-lavoro h1 { font-family: var(--font-display); letter-spacing: -.03em; }
.lw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.lw-card, .lw-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-soft);
}
.lw-card { display: grid; gap: 8px; transition: transform .2s ease, border-color .2s ease; }
.lw-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.lw-ico { font-size: 1.6rem; }
.lw-card ul { margin: 0; padding-left: 18px; color: var(--muted); }
.lw-pay { color: var(--gold); font-weight: 650; }
.lw-goals { display: grid; gap: 10px; }
.lw-goal { display: grid; gap: 6px; }
.lw-goal-top { display: flex; justify-content: space-between; gap: 10px; }
.lw-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.lw-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--flame)); }
.lw-goal.done .lw-track i { background: var(--ok); }
.lw-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.lw-day {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px;
  background: var(--panel-2); font-size: .82rem; font-weight: 650;
}
.lw-day.completed { background: rgba(94, 207, 154, .22); color: #9cf3c6; }
.lw-day.vacation { background: rgba(106, 164, 255, .2); color: #9cc4ff; }
.lw-day.sick { background: rgba(240, 194, 122, .2); color: var(--gold); }
.lw-day.unpaid { background: rgba(255, 107, 122, .18); color: #ff9aa4; }
.lw-day.rest, .lw-day.future, .lw-day.empty { opacity: .45; }
.lw-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lw-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.lw-legend i.completed { background: #5ecf9a; }
.lw-legend i.vacation { background: #6aa4ff; }
.lw-legend i.sick { background: #f0c27a; }
.lw-legend i.unpaid { background: #ff6b7a; }
.lw-legend i.rest { background: #5a5168; }
.lw-table { overflow: auto; }
.lw-table table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.lw-table th, .lw-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.lw-slip .stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.bp-toolbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.bp-sheet {
  background: #fff;
  color: #111;
  border: 2px solid #111;
  padding: 18px;
  display: grid;
  gap: 12px;
  max-width: 920px;
}
.bp-title { text-align: center; font-size: 1.65rem; letter-spacing: .12em; margin: 0; font-weight: 800; }
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bp-box { border: 1px solid #111; padding: 10px 12px; }
.bp-box h2 { font-size: .72rem; letter-spacing: .08em; margin: 0 0 8px; font-weight: 800; }
.bp-box p { margin: 4px 0; font-size: .92rem; }
.bp-full { grid-column: 1 / -1; }
.bp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.bp-table td { border-top: 1px solid #ccc; padding: 6px 4px; vertical-align: top; }
.bp-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bp-total td { border-top: 2px solid #111; font-weight: 800; }
.bp-net {
  border: 3px solid #111;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.1rem;
  font-weight: 800;
}
.bp-net strong { font-size: 1.45rem; }
.bp-foot { font-size: .78rem; margin: 0; color: #444; }
@media (max-width: 720px) {
  .bp-grid { grid-template-columns: 1fr; }
}
@media print {
  body * { visibility: hidden; }
  .bp-sheet, .bp-sheet * { visibility: visible; }
  .bp-sheet { position: absolute; left: 0; top: 0; width: 100%; border: none; }
  .no-print { display: none !important; }
}
@media (max-width: 720px) {
  .lw-grid { grid-template-columns: 1fr; }
}

/* ===== Redesign globale v2 — tutto il portale ===== */
:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --warm: #ffb062;
  --warm-line: rgba(255, 179, 71, .42);
  --glass: rgba(16, 13, 22, .72);
  --hairline: linear-gradient(90deg, transparent, rgba(255, 176, 98, .45), rgba(139, 92, 255, .45), transparent);
}
::selection { background: rgba(255, 140, 60, .35); color: #fff; }
html { scrollbar-color: rgba(139, 92, 255, .45) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 255, .35); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 154, 70, .5); }

/* Sfondo: aurora lenta */
body::after {
  content: ""; position: fixed; inset: -20vmax; z-index: 0; pointer-events: none; opacity: .55;
  background:
    radial-gradient(28vmax 22vmax at 18% 22%, rgba(139, 92, 255, .16), transparent 70%),
    radial-gradient(26vmax 20vmax at 82% 18%, rgba(255, 106, 44, .12), transparent 70%),
    radial-gradient(30vmax 22vmax at 60% 88%, rgba(226, 61, 140, .08), transparent 70%);
  animation: tf-aurora 38s ease-in-out infinite alternate;
}
@keyframes tf-aurora { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(-4vmax, 3vmax, 0) rotate(8deg); } }

/* Barra in alto */
.top {
  background: rgba(6, 5, 11, .72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom-color: transparent;
}
.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: var(--hairline); background-size: 200% 100%; opacity: .8;
  animation: tf-hairline 9s linear infinite;
}
@keyframes tf-hairline { from { background-position: 0 0; } to { background-position: 200% 0; } }
.brand img { transition: transform .5s var(--ease-spring), box-shadow .3s ease; }
.brand:hover img { transform: rotate(-8deg) scale(1.06); box-shadow: 0 0 18px rgba(255, 106, 44, .45); }
.word em { background: linear-gradient(90deg, #d7b4ff, #ffb889); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a { position: relative; transition: color .2s ease, background-color .2s ease; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.active {
  color: #fff6e7;
  background: linear-gradient(100deg, rgba(255, 154, 70, .2), rgba(226, 61, 140, .14) 60%, rgba(139, 92, 255, .14));
  box-shadow: inset 0 0 0 1px rgba(255, 179, 71, .38), 0 4px 16px rgba(255, 106, 44, .12);
}
.account, .iconbtn { transition: background-color .2s ease, border-color .2s ease, transform .2s var(--ease-out); }
.iconbtn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .2); }
.iconbtn:hover .bell { animation: tf-ring .6s ease; transform-origin: 50% 10%; }
@keyframes tf-ring { 20% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); } 70% { transform: rotate(5deg); } 100% { transform: none; } }
.dot { box-shadow: 0 0 10px rgba(255, 106, 44, .55); animation: tf-pop .45s var(--ease-spring) both; }
.menu, .notices {
  background: rgba(18, 15, 26, .92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-color: rgba(255, 255, 255, .08); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .05);
  transform-origin: top right; animation: tf-drop .22s var(--ease-out) both;
}
.menu a, .menu button, .notices a { transition: background-color .15s ease, padding-left .2s var(--ease-out); }
.menu a:hover, .menu button:hover, .notices a:hover { background: rgba(255, 154, 70, .08); padding-left: 14px; }
@keyframes tf-drop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* Ingresso pagine con cascata */
.page { animation: tf-page .5s var(--ease-out) both; }
@keyframes tf-page { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.page:not(.admin-page):not(.agent) > * { animation: tf-rise .5s var(--ease-out) both; }
.page:not(.admin-page):not(.agent) > :nth-child(2) { animation-delay: .04s; }
.page:not(.admin-page):not(.agent) > :nth-child(3) { animation-delay: .08s; }
.page:not(.admin-page):not(.agent) > :nth-child(4) { animation-delay: .12s; }
.page:not(.admin-page):not(.agent) > :nth-child(5) { animation-delay: .16s; }
.page:not(.admin-page):not(.agent) > :nth-child(6) { animation-delay: .2s; }
.page:not(.admin-page):not(.agent) > :nth-child(n+7) { animation-delay: .24s; }
@keyframes tf-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes tf-pop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes tf-fade { from { opacity: 0; } to { opacity: 1; } }

/* Titoli */
.page > h1, .page > .kicker + h1, .hero h1 {
  background: linear-gradient(100deg, #ffffff 0%, #f3e6ff 45%, #ffc38a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em;
}
.page > h1::after, .page > .kicker + h1::after {
  content: ""; display: block; width: 64px; height: 3px; margin-top: 12px; border-radius: 3px;
  background: linear-gradient(90deg, var(--flame), var(--magenta), transparent);
  transform-origin: left; animation: tf-line .7s var(--ease-out) .2s both;
}
@keyframes tf-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: #ffcf9a; }
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--flame); box-shadow: 0 0 10px var(--flame); flex: none; }
.page > h2, [data-ppanel] > h2, .page-collection h2 { font-family: var(--font-display); font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 650; letter-spacing: -.02em; }
.lead { max-width: 72ch; }

/* Superfici con luce che segue il puntatore */
.panel, .card, .tile, .product, .game-hub__card, .stat, .lw-card, .lw-panel, .feed-card, .relic, .series {
  --mx: 50%; --my: 0%;
}
.panel, .card, .tile, .product, .modal {
  background:
    radial-gradient(420px 220px at var(--mx) var(--my), rgba(255, 154, 70, .07), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 38%),
    var(--panel);
  border-color: rgba(186, 150, 255, .12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .22);
  transition: border-color .25s ease, box-shadow .3s ease, transform .3s var(--ease-out);
}
.tile:hover, .product:hover, .actions .tile:hover {
  transform: translateY(-4px);
  border-color: var(--warm-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 22px 44px rgba(0, 0, 0, .38), 0 0 0 1px rgba(255, 154, 70, .08);
}
.card:hover, .panel:hover { border-color: rgba(255, 179, 71, .22); }
.actions .tile { min-height: 124px; padding: 18px; }
.actions .tile h2::after { content: " →"; display: inline-block; opacity: 0; transform: translateX(-6px); transition: opacity .25s ease, transform .3s var(--ease-out); color: var(--warm); }
.actions .tile:hover h2::after { opacity: 1; transform: none; }

/* Statistiche */
.stat, .pulse a, .pulse div { transition: transform .3s var(--ease-out), border-color .25s ease, box-shadow .3s ease; }
.stat:hover, .pulse a:hover, .pulse div:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 0, 0, .3); }
.stat::after, .pulse a::after, .pulse div::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .07) 50%, transparent 65%);
  transform: translateX(-100%); transition: transform .9s var(--ease-out);
}
.stat:hover::after, .pulse a:hover::after, .pulse div:hover::after { transform: translateX(100%); }
.stats > *, .pulse > * { animation: tf-rise .5s var(--ease-out) both; }
.stats > :nth-child(2), .pulse > :nth-child(2) { animation-delay: .06s; }
.stats > :nth-child(3), .pulse > :nth-child(3) { animation-delay: .12s; }
.stats > :nth-child(n+4), .pulse > :nth-child(n+4) { animation-delay: .18s; }

/* Saldo in home */
.balance { position: relative; overflow: hidden; isolation: isolate; }
.balance::before {
  content: ""; position: absolute; inset: -40%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 154, 70, .35) 80%, transparent 90%);
  animation: tf-spin 7s linear infinite;
}
.balance::after { content: ""; position: absolute; inset: 1px; z-index: -1; border-radius: inherit; background: linear-gradient(145deg, rgba(255, 106, 44, .16), transparent 42%), var(--panel-elev); }
.balance strong { background: linear-gradient(180deg, #ffd18a, #ff6a2c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.balance .coin-emoji { animation: tf-float 3.4s ease-in-out infinite; }
@keyframes tf-spin { to { transform: rotate(360deg); } }
@keyframes tf-float { 50% { transform: translateY(-3px) rotate(-6deg); } }

/* Banner */
.you-line, .banner {
  position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(255, 154, 70, .12), rgba(226, 61, 140, .08) 50%, rgba(139, 92, 255, .1));
  border-color: rgba(255, 179, 71, .26);
  transition: border-color .25s ease, transform .3s var(--ease-out);
}
a.banner:hover { border-color: rgba(255, 179, 71, .55); transform: translateY(-1px); }
a.banner b::after { content: " →"; display: inline-block; transition: transform .3s var(--ease-out); }
a.banner:hover b::after { transform: translateX(3px); }
.page-home > a.banner::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--flame); flex: none;
  box-shadow: 0 0 0 0 rgba(255, 106, 44, .6); animation: tf-ping 2s ease-out infinite;
}
.page-home > a.banner > span { margin-right: auto; }
@keyframes tf-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 106, 44, .55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(255, 106, 44, 0); } }

/* Pulsanti */
.btn, .ghost { transition: transform .2s var(--ease-out), filter .2s ease, box-shadow .25s ease, background-color .2s ease, border-color .2s ease; }
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .65s var(--ease-out);
}
.btn:hover:not(:disabled)::after { transform: translateX(120%); }
.ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.btn:active:not(:disabled), .ghost:active:not(:disabled) { transform: scale(.97); }

/* Campi */
input, textarea, select { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; background-color: rgba(4, 3, 8, .45); }
input:hover, textarea:hover, select:hover { border-color: rgba(186, 150, 255, .28); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: rgba(255, 179, 71, .6); background-color: rgba(10, 7, 14, .7);
  box-shadow: 0 0 0 3px rgba(255, 154, 70, .14);
}
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--flame); box-shadow: none; }

/* Chip e schede */
.chips button, .catrail a, .feed-tag { transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s var(--ease-out); }
.chips button:hover, .catrail a:hover { color: var(--text); border-color: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.chips button.on, .catrail a.on {
  color: #fff6e7; border-color: rgba(255, 179, 71, .6);
  background: linear-gradient(100deg, rgba(255, 154, 70, .18), rgba(226, 61, 140, .1));
  box-shadow: 0 4px 16px rgba(255, 106, 44, .12);
}
.tabs button { position: relative; transition: color .2s ease; }
.tabs button::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--warm), var(--magenta));
  transform: scaleX(0); transition: transform .35s var(--ease-out);
}
.tabs button:hover { color: var(--text); }
.tabs button.on { background: transparent; color: #fff6e7; border-bottom-color: transparent; }
.tabs button.on::after { transform: scaleX(1); }
.profile-tabs { background: rgba(7, 6, 11, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* Liste e classifiche */
.list > * { animation: tf-rise .45s var(--ease-out) both; }
.list > :nth-child(2) { animation-delay: .03s; }
.list > :nth-child(3) { animation-delay: .06s; }
.list > :nth-child(4) { animation-delay: .09s; }
.list > :nth-child(5) { animation-delay: .12s; }
.list > :nth-child(6) { animation-delay: .15s; }
.list > :nth-child(n+7) { animation-delay: .18s; }
.list .rank { transition: transform .25s var(--ease-out), border-color .2s ease, background-color .2s ease; }
.list .rank:hover { transform: translateX(4px); border-color: rgba(255, 179, 71, .28); background: rgba(255, 154, 70, .06); }
.who-mini > .ph { flex: none; }
.ph { background: linear-gradient(145deg, #3a2752, #1d1528); color: #ffd6a6; }
.pos { font-variant-numeric: tabular-nums; }
.meter i { transform-origin: left; animation: tf-meter .9s var(--ease-out) .2s both; }
@keyframes tf-meter { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.podium .place { transition: transform .35s var(--ease-out), box-shadow .3s ease, border-color .25s ease; animation: tf-rise .55s var(--ease-out) both; }
.podium .place:hover { transform: translateY(-4px); }
.podium .place[data-rank="1"] { animation-delay: .05s; position: relative; background: radial-gradient(260px 140px at 50% 0%, rgba(240, 194, 122, .18), transparent 70%), var(--panel-elev); }
.podium .place[data-rank="2"] { animation-delay: .12s; }
.podium .place[data-rank="3"] { animation-delay: .18s; }
.podium .place[data-rank="1"] img, .podium .place[data-rank="1"] .ph { animation: tf-glow 2.8s ease-in-out infinite; }
.place .ph { width: 64px; height: 64px; font-size: 1.4rem; }
@keyframes tf-glow { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(240, 194, 122, .55); } }

/* Shop e collezione */
.product .shot, .product .mark { transition: transform .5s var(--ease-out), filter .3s ease; }
.product:hover .shot, .product:hover .mark { transform: scale(1.03); filter: saturate(1.2); }
.product .price { background: linear-gradient(180deg, #ffd18a, #ff6a2c); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.grid > *, .grid.pieces > * { animation: tf-rise .5s var(--ease-out) both; }
.grid > :nth-child(2) { animation-delay: .05s; }
.grid > :nth-child(3) { animation-delay: .1s; }
.grid > :nth-child(4) { animation-delay: .15s; }
.grid > :nth-child(5) { animation-delay: .2s; }
.grid > :nth-child(n+6) { animation-delay: .25s; }
.piece { transition: transform .35s var(--ease-out); }
.piece:hover { transform: translateY(-4px); }
.piece .modelbox { transition: box-shadow .35s ease, border-color .3s ease; }
.piece:hover .modelbox { box-shadow: 0 16px 36px rgba(0, 0, 0, .4), 0 0 28px color-mix(in srgb, var(--rare, var(--violet)) 30%, transparent); border-color: color-mix(in srgb, var(--rare, var(--violet)) 55%, transparent); }
.series { transition: transform .3s var(--ease-out), border-color .25s ease; }
.series[data-series]:hover { transform: translateY(-2px); }
.series-bar i, .lw-track i { position: relative; overflow: hidden; }
.series-bar i::after, .lw-track i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: translateX(-100%); animation: tf-sheen 2.8s ease-in-out infinite;
}
@keyframes tf-sheen { 60%, 100% { transform: translateX(100%); } }

/* Game Center */
.game-hub__card { transition: border-color .25s ease, transform .35s var(--ease-out), box-shadow .3s ease; }
.game-hub__card:hover { transform: translateY(-5px); box-shadow: 0 26px 50px rgba(0, 0, 0, .4), 0 0 40px color-mix(in srgb, var(--game-accent, var(--violet)) 16%, transparent); }
.game-hub__card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(300px 180px at var(--mx) var(--my), color-mix(in srgb, var(--game-accent, var(--violet)) 16%, transparent), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
}
.game-hub__card:hover::before { opacity: 1; }
.game-hub__icon { transition: transform .5s var(--ease-spring); }
.game-hub__card:hover .game-hub__icon { transform: rotate(-8deg) scale(1.1); }
.game-hub__go::after { display: inline-block; transition: transform .3s var(--ease-out); }
.game-hub__card:hover .game-hub__go::after { transform: translateX(4px); }
.game-hub__card:hover::after { opacity: .28; }
.game-hub__card::after { transition: opacity .35s ease; }
.game-hub > * { animation: tf-rise .55s var(--ease-out) both; }
.game-hub > :nth-child(2) { animation-delay: .07s; }
.game-hub > :nth-child(3) { animation-delay: .14s; }
.game-hub > :nth-child(4) { animation-delay: .21s; }

/* Sfide */
.page-sfide .card.challenge:hover { transform: translateX(3px); }
.status.live { animation: tf-breathe 2.4s ease-in-out infinite; }
@keyframes tf-breathe { 50% { box-shadow: 0 0 14px rgba(240, 194, 122, .55); } }

/* Feed */
.feed-card { transition: transform .3s var(--ease-out), border-color .25s ease, box-shadow .3s ease; }
.feed-card:hover { transform: translateY(-2px); border-color: rgba(255, 179, 71, .24); box-shadow: 0 18px 40px rgba(0, 0, 0, .32); }
.feed-stream > *, .feed-grid > * { animation: tf-rise .5s var(--ease-out) both; }
.feed-stream > :nth-child(2), .feed-grid > :nth-child(2) { animation-delay: .06s; }
.feed-stream > :nth-child(n+3), .feed-grid > :nth-child(n+3) { animation-delay: .12s; }
.feed-actions button { transition: transform .2s var(--ease-spring), color .2s ease, background-color .2s ease; }
.feed-actions button:hover { transform: translateY(-1px); }
.feed-actions button:active { transform: scale(.9); }
.feed-like.is-on { animation: tf-pop .4s var(--ease-spring); }

/* Profilo */
.player { box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.player .banner { position: relative; overflow: hidden; }
.player .banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%);
  transform: translateX(-100%); animation: tf-sheen 6s ease-in-out infinite;
}

/* Lavoro */
.lw-card { transition: transform .3s var(--ease-out), border-color .25s ease, box-shadow .3s ease; }
.lw-card:hover { transform: translateY(-3px); border-color: var(--warm-line); box-shadow: 0 18px 40px rgba(0, 0, 0, .32); }

/* Modali e toast */
.modal-back { background: rgba(4, 3, 8, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: tf-fade .2s ease both; }
.modal-back > .modal, .modal-back > article { animation: tf-modal .32s var(--ease-out) both; }
.modal { border-color: rgba(255, 255, 255, .08); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06); }
@keyframes tf-modal { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.toast {
  background: rgba(24, 19, 32, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: rgba(94, 207, 154, .35); border-left: 3px solid var(--ok); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45); animation: tf-toast .35s var(--ease-spring) both;
}
.toast.bad { border-color: rgba(255, 107, 122, .4); border-left-color: var(--bad); }
@keyframes tf-toast { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }

/* Dock mobile */
@media (max-width: 860px) {
  .dock {
    background: rgba(10, 8, 18, .78); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-color: rgba(255, 179, 71, .18); border-radius: 22px;
    box-shadow: 0 -2px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
    animation: tf-dock .5s var(--ease-out) both;
  }
  .dock a, .dock-more-btn { transition: color .2s ease, background-color .25s ease, transform .2s var(--ease-out); }
  .dock a:active, .dock-more-btn:active { transform: scale(.92); }
  .dock-more-btn.active, .dock a.active {
    color: #fff6e7;
    background: linear-gradient(100deg, rgba(255, 154, 70, .22), rgba(226, 61, 140, .16));
    box-shadow: inset 0 0 0 1px rgba(255, 179, 71, .35);
  }
  .dock-pop { animation: tf-drop .22s var(--ease-out) both; transform-origin: bottom right; background: rgba(18, 15, 26, .95); backdrop-filter: blur(18px); }
  .page > h1::after, .page > .kicker + h1::after { margin-top: 10px; width: 48px; }
}
@keyframes tf-dock { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (hover: none) {
  .tile:hover, .product:hover, .actions .tile:hover, .game-hub__card:hover, .stat:hover, .feed-card:hover, .lw-card:hover, .piece:hover, .podium .place:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  body::after, .top::after, .page, .page > *, .page > h1::after, .page > .kicker + h1::after, .dot, .menu, .notices,
  .stats > *, .pulse > *, .balance::before, .balance .coin-emoji, .page-home > a.banner::before, .list > *, .meter i,
  .podium .place, .podium .place img, .podium .place .ph, .grid > *, .series-bar i::after, .lw-track i::after,
  .game-hub > *, .status.live, .feed-stream > *, .feed-grid > *, .feed-like.is-on, .player .banner::after,
  .modal-back, .modal-back > .modal, .modal-back > article, .toast, .dock, .dock-pop, .iconbtn:hover .bell { animation: none !important; }
  .btn::after, .stat::after, .pulse a::after, .pulse div::after, .tabs button::after { transition: none; }
  .tile:hover, .product:hover, .game-hub__card:hover, .stat:hover, .list .rank:hover, .feed-card:hover, .lw-card:hover,
  .piece:hover, .podium .place:hover, .product:hover .shot, .product:hover .mark, .game-hub__card:hover .game-hub__icon { transform: none; }
}

/* ===== /admin — redesign (solo pagina Amministrazione) ===== */
main:has(> .admin-page) { width: min(1320px, calc(100% - 28px)); }
.admin-page { --adm-ease: cubic-bezier(.2, .8, .2, 1); gap: 22px; grid-template-columns: minmax(0, 1fr); }
.admin-page > *, .admin-side, .admin-main { min-width: 0; }

/* Header */
.admin-head {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 28px; align-items: end;
  padding: 26px 26px 24px; border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 46%),
    linear-gradient(120deg, rgba(139, 92, 255, .14), rgba(226, 61, 140, .06) 48%, rgba(255, 106, 44, .1)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: adm-rise .55s var(--adm-ease) both;
}
.admin-head::before, .admin-head::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(40px); pointer-events: none;
}
.admin-head::before { width: 320px; height: 220px; right: -60px; top: -110px; background: rgba(255, 106, 44, .28); animation: adm-drift 14s ease-in-out infinite alternate; }
.admin-head::after { width: 280px; height: 200px; left: 18%; bottom: -150px; background: rgba(139, 92, 255, .3); animation: adm-drift 18s ease-in-out infinite alternate-reverse; }
.admin-head__title { display: grid; gap: 8px; min-width: 0; }
.admin-head h1 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  background: linear-gradient(100deg, #fff 0%, #f3e6ff 40%, #ffc38a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.admin-head .kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: #ffcf9a; }
.admin-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(94, 207, 154, .6); animation: adm-ping 2.2s ease-out infinite; }
.admin-head .muted { max-width: 52ch; }

.admin-kpis { display: grid; grid-template-columns: repeat(3, minmax(150px, auto)); gap: 10px; }
.admin-kpi {
  --tone: var(--violet);
  position: relative; overflow: hidden; display: grid; gap: 6px; min-width: 0;
  padding: 12px 16px 13px; border-radius: 16px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 20%, transparent), transparent 70%), rgba(8, 6, 14, .55);
  border: 1px solid color-mix(in srgb, var(--tone) 32%, transparent);
  backdrop-filter: blur(10px);
  animation: adm-rise .5s var(--adm-ease) both;
  transition: transform .25s var(--adm-ease), border-color .25s ease;
}
.admin-kpi:nth-child(1) { animation-delay: .08s; }
.admin-kpi:nth-child(2) { animation-delay: .14s; }
.admin-kpi:nth-child(3) { animation-delay: .2s; }
.admin-kpi:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.admin-kpi[data-tone="flame"] { --tone: var(--flame); }
.admin-kpi[data-tone="violet"] { --tone: var(--violet); }
.admin-kpi[data-tone="ok"] { --tone: var(--ok); }
.admin-kpi[data-tone="bad"] { --tone: var(--bad); }
.admin-kpi span { color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.admin-kpi b {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text);
}
.admin-kpi b em { font-style: normal; }
.admin-kpi b .up { color: var(--ok); }
.admin-kpi b .down { color: #ff9aa4; font-size: .85em; }

/* Layout */
.admin-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-main { display: grid; min-width: 0; }
.admin-side {
  position: sticky; top: 78px;
  animation: adm-slide .5s var(--adm-ease) .1s both;
}

/* Navigazione schede */
.admin-page .admin-tabs {
  position: relative; top: auto; z-index: 1;
  display: grid; gap: 2px; padding: 10px; overflow: visible;
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 40%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}
.atab-group {
  padding: 12px 10px 5px; color: rgba(168, 155, 184, .72);
  font-size: .64rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.atab-group:first-of-type { padding-top: 4px; }
.admin-page .admin-tabs button {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 40px;
  padding: 8px 10px; border: 1px solid transparent; border-radius: 12px;
  background: transparent; color: var(--muted); font-weight: 650; font-size: .9rem; text-align: left;
  transition: color .2s ease, background-color .2s ease;
}
.admin-page .admin-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.admin-page .admin-tabs button.on { color: #fff6e7; background: transparent; border-color: transparent; }
.admin-page .admin-tabs button:focus-visible { outline-offset: -2px; }
.atab-ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  opacity: .8; transition: transform .3s var(--adm-ease), color .2s ease, opacity .2s ease;
}
.admin-tabs button:hover .atab-ic { transform: translateX(1px) scale(1.08); opacity: 1; }
.admin-tabs button.on .atab-ic { color: #ffb062; opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 140, 60, .55)); }
.atab-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atab-count {
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center; flex: none;
  font-size: .7rem; font-weight: 800; color: #27130a;
  background: linear-gradient(115deg, #ffc36c, #ff8a3d);
  box-shadow: 0 0 12px rgba(255, 138, 61, .45);
  animation: adm-pop .5s var(--adm-ease) .45s both;
}
.atab-ink {
  position: absolute; left: 0; top: 0; z-index: 0; width: 0; height: 0; opacity: 0;
  border-radius: 12px; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 154, 70, .18), rgba(226, 61, 140, .12) 60%, rgba(139, 92, 255, .1));
  border: 1px solid rgba(255, 179, 71, .45);
  box-shadow: 0 6px 20px rgba(255, 106, 44, .16), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.atab-ink::before {
  content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #ffd18a, var(--flame));
  box-shadow: 0 0 10px rgba(255, 106, 44, .8);
}
.atab-ink.ready {
  opacity: 1;
  transition: transform .42s var(--adm-ease), width .42s var(--adm-ease), height .42s var(--adm-ease), opacity .2s ease;
}

/* Pannelli */
.admin-page [data-panel] { display: grid; gap: 14px; align-content: start; min-width: 0; outline: none; }
.admin-page [data-panel]:not([hidden]) { animation: adm-panel .45s var(--adm-ease) both; }
.admin-page [data-panel] > h2:first-child {
  position: relative; padding-bottom: 12px; margin-bottom: 2px;
  font-family: var(--font-display); font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 650; letter-spacing: -.02em;
}
.admin-page [data-panel] > h2:first-child::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--flame), var(--magenta), transparent);
  transform-origin: left; animation: adm-line .6s var(--adm-ease) .15s both;
}
.admin-page [data-panel] > .list > *,
.admin-page [data-panel] > .card,
.admin-page [data-panel] .stats > * { animation: adm-rise .45s var(--adm-ease) both; }
.admin-page [data-panel] > .list > :nth-child(2) { animation-delay: .04s; }
.admin-page [data-panel] > .list > :nth-child(3) { animation-delay: .08s; }
.admin-page [data-panel] > .list > :nth-child(4) { animation-delay: .12s; }
.admin-page [data-panel] > .list > :nth-child(5) { animation-delay: .16s; }
.admin-page [data-panel] > .list > :nth-child(n+6) { animation-delay: .2s; }
.admin-page [data-panel] .stats > :nth-child(2) { animation-delay: .05s; }
.admin-page [data-panel] .stats > :nth-child(3) { animation-delay: .1s; }
.admin-page [data-panel] .stats > :nth-child(n+4) { animation-delay: .15s; }
.admin-page .stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

/* Superfici e controlli dentro /admin */
.admin-page .card {
  padding: 18px; gap: 10px; border-radius: var(--radius-lg);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s var(--adm-ease);
}
.admin-page .admin-main .card:hover { border-color: rgba(255, 179, 71, .24); box-shadow: 0 14px 34px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .05); }
.admin-page .list { gap: 10px; }
.admin-page .list .rank {
  padding: 12px 14px; border-radius: 14px; border-color: var(--line); background: rgba(255, 255, 255, .025);
  transition: transform .25s var(--adm-ease), border-color .2s ease, background-color .2s ease;
}
.admin-page .list .rank:hover { transform: translateX(3px); border-color: rgba(255, 179, 71, .3); background: rgba(255, 154, 70, .06); }
.admin-page input, .admin-page textarea, .admin-page select, .admin-page .dpick-q {
  border-radius: 12px; background: rgba(4, 3, 8, .5); border: 1px solid var(--line);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.admin-page input:hover, .admin-page textarea:hover, .admin-page select:hover, .admin-page .dpick-q:hover { border-color: rgba(186, 150, 255, .28); }
.admin-page input:focus, .admin-page textarea:focus, .admin-page select:focus, .admin-page .dpick-q:focus {
  outline: none; border-color: rgba(255, 179, 71, .6); background: rgba(10, 7, 14, .7);
  box-shadow: 0 0 0 3px rgba(255, 154, 70, .14);
}
.admin-page input[type="checkbox"], .admin-page input[type="radio"] { accent-color: var(--flame); box-shadow: none; }
.admin-page .btn { position: relative; overflow: hidden; isolation: isolate; }
.admin-page .btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s var(--adm-ease);
}
.admin-page .btn:hover:not(:disabled)::after { transform: translateX(120%); }
.admin-page .ghost { transition: background-color .2s ease, border-color .2s ease, transform .2s var(--adm-ease); }
.admin-page .ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.admin-page .btn:active:not(:disabled), .admin-page .ghost:active:not(:disabled) { transform: scale(.97); }
.admin-page .admin-thumb { border: 1px solid var(--line); transition: transform .3s var(--adm-ease); }
.admin-page .card:hover .admin-thumb { transform: scale(1.04) rotate(-1deg); }
.admin-page .shop-nav { top: 78px; }
.admin-page .shop-nav button { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
.admin-page .shop-nav button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.admin-page .shop-nav button.on { border-color: rgba(255, 179, 71, .4); background: rgba(255, 154, 70, .1); }
.admin-page #adminmsg:not(:empty) { animation: adm-rise .3s var(--adm-ease) both; }

/* Animazioni */
@keyframes adm-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes adm-slide { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes adm-panel { from { opacity: 0; transform: translateY(8px) scale(.995); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes adm-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes adm-pop { 0% { transform: scale(0); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes adm-ping { 0% { box-shadow: 0 0 0 0 rgba(94, 207, 154, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(94, 207, 154, 0); } }
@keyframes adm-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 24px) scale(1.15); } }

/* Responsive */
@media (max-width: 1080px) {
  .admin-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .admin-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .admin-page { gap: 16px; }
  .admin-head { padding: 20px 16px 18px; }
  .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-kpi { padding: 10px 12px 11px; }
  .admin-kpi:first-child { grid-column: 1 / -1; }
  .admin-kpi b { font-size: 1.12rem; white-space: normal; overflow-wrap: anywhere; }
  .admin-kpi span { font-size: .62rem; letter-spacing: .1em; }
  .admin-shell { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .admin-side {
    top: 62px; z-index: 7; margin: 0 -14px; padding: 8px 14px 10px;
    background: rgba(7, 6, 11, .9); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    animation-name: adm-rise;
  }
  .admin-page .admin-tabs {
    display: flex; flex-wrap: nowrap; gap: 4px; padding: 4px;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    border-radius: 999px; box-shadow: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  }
  .admin-page .admin-tabs::-webkit-scrollbar { display: none; }
  .atab-group { display: none; }
  .admin-page .admin-tabs button { width: auto; flex: 0 0 auto; min-height: 40px; padding: 8px 13px; border-radius: 999px; gap: 8px; font-size: .85rem; }
  .atab-label { overflow: visible; }
  .atab-ink { border-radius: 999px; }
  .atab-ink::before { display: none; }
  .admin-page .shop-nav { top: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-head, .admin-head::before, .admin-head::after, .admin-dot, .admin-kpi, .admin-side, .atab-count,
  .admin-page [data-panel], .admin-page [data-panel] > h2:first-child::after,
  .admin-page [data-panel] > .list > *, .admin-page [data-panel] > .card, .admin-page [data-panel] .stats > *,
  .admin-page #adminmsg { animation: none !important; }
  .atab-ink.ready, .admin-page .btn::after { transition: none; }
  .admin-page .list .rank:hover, .admin-kpi:hover, .admin-page .card:hover .admin-thumb { transform: none; }
}


/* ===== Redesign v3 — "Ember Arcade" (tutto il portale) ===== */
:root {
  --ink: #04030a;
  --ink-2: #090712;
  --panel: #100d19;
  --panel-2: #171222;
  --panel-elev: #1d1729;
  --line: rgba(186, 150, 255, .13);
  --line-strong: rgba(255, 176, 120, .3);
  --warm: #ffb062;
  --neon: #ff7a3d;
  --hairline: linear-gradient(90deg, transparent, rgba(255, 176, 98, .6), rgba(226, 61, 140, .5), rgba(139, 92, 255, .6), transparent);
  --glass: rgba(14, 11, 22, .66);
  --glow-flame: 0 0 32px rgba(255, 106, 44, .28);
  --glow-violet: 0 0 32px rgba(139, 92, 255, .26);
}
body {
  background-image:
    radial-gradient(ellipse 110% 50% at 50% -15%, rgba(139, 92, 255, .26), transparent 60%),
    radial-gradient(ellipse 70% 40% at 100% 8%, rgba(255, 106, 44, .14), transparent 55%),
    radial-gradient(ellipse 60% 35% at 0% 90%, rgba(226, 61, 140, .09), transparent 50%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
body::before { opacity: .5; background-size: 40px 40px; mask-image: radial-gradient(ellipse 90% 70% at 50% 25%, #000 10%, transparent 72%); -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 25%, #000 10%, transparent 72%); }
body::after { opacity: .7; }
.tf-embers { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.tf-vignette { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 55%, rgba(0, 0, 0, .55) 100%); }

/* Barra in alto: pillola di vetro fluttuante */
.top {
  position: sticky; top: 10px; z-index: 8;
  width: min(1120px, calc(100% - 28px)); margin: 10px auto 0;
  padding: 8px 12px 8px 10px; border-radius: 20px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
}
.top::after { bottom: 0; left: 24px; right: 24px; border-radius: 2px; }
.top.scrolled { box-shadow: 0 22px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px rgba(255, 176, 120, .08); }
.brand img { border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 6px 16px rgba(0, 0, 0, .4); }
.word { font-size: 1.22rem; }
.word em { background: linear-gradient(90deg, #e9ccff, #ffb889 60%, #ff7a3d); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 10px rgba(255, 122, 61, .3)); }
.nav { gap: 2px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .05); flex: 0 1 auto; }
.nav a { padding: 7px 14px; font-size: .86rem; letter-spacing: .01em; }
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--warm), var(--magenta)); transform: scaleX(0); transition: transform .3s var(--ease-out);
}
.nav a:hover::after { transform: scaleX(1); }
.nav a.active { box-shadow: inset 0 0 0 1px rgba(255, 179, 71, .45), 0 6px 18px rgba(255, 106, 44, .22), 0 0 24px rgba(255, 106, 44, .12); }
.nav a.active::after { transform: scaleX(1); }
.account { padding-right: 12px; background: linear-gradient(100deg, rgba(255, 154, 70, .08), rgba(139, 92, 255, .08)); border-color: rgba(255, 255, 255, .08); }
.account:hover { border-color: rgba(255, 179, 71, .45); box-shadow: var(--glow-flame); }
.account > img { box-shadow: 0 0 0 2px rgba(255, 176, 98, .35); }
.iconbtn { background: rgba(0, 0, 0, .28); }

main { width: min(1120px, calc(100% - 28px)); margin-top: 18px; }

/* Titoli di pagina: più grandi, con riflesso */
.page > h1, .page > .kicker + h1, .hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem); letter-spacing: -.045em;
  background: linear-gradient(100deg, #fff 0%, #f6e8ff 40%, #ffc38a 75%, #ff7a3d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 106, 44, .18));
}
.page > h1::after, .page > .kicker + h1::after { width: 84px; height: 3px; box-shadow: 0 0 14px rgba(255, 106, 44, .6); }
.kicker { color: #ffd0a1; font-size: .7rem; letter-spacing: .22em; }
.kicker::before { box-shadow: 0 0 12px var(--flame), 0 0 0 3px rgba(255, 106, 44, .18); animation: tf-ping 2.2s ease-out infinite; }
.lead { font-size: 1.02rem; }

/* Superfici: bordo luminoso, vetro, spotlight */
.panel, .card, .tile, .product, .modal, .place, .rank, .game-hub__card, .lw-card, .feed-card {
  border-color: rgba(186, 150, 255, .11);
  background-image:
    radial-gradient(520px 260px at var(--mx, 50%) var(--my, 0%), rgba(255, 154, 70, .085), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 40%);
  background-color: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 36px rgba(0, 0, 0, .3);
}
.tf-tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out, border-color .25s ease, box-shadow .3s ease; }
.tile.tf-tilt:hover, .product.tf-tilt:hover, .game-hub__card.tf-tilt:hover, .stat.tf-tilt:hover, .place.tf-tilt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px); }
.tf-spot { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, .09), transparent 60%); mix-blend-mode: screen; }
.tf-tilt:hover > .tf-spot { opacity: 1; }
.stat, .tile, .product, .game-hub__card, .place, .panel-leader { position: relative; }

/* Hero home */
.page-home .hero { padding: 10px 0 4px; gap: 22px; }
.page-home .hero h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); }
.page-home .hero .lead { font-size: 1rem; }
.balance { padding: 18px 20px; border-radius: 24px; border-color: rgba(255, 176, 120, .4); box-shadow: var(--glow-flame), 0 24px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08); animation: tf-balance-glow 3.4s ease-in-out infinite; }
.balance::before { inset: -60%; background: conic-gradient(from 0deg, transparent 0 62%, rgba(255, 154, 70, .55) 76%, rgba(226, 61, 140, .4) 84%, transparent 92%); animation-duration: 5s; }
.balance::after { background: radial-gradient(140px 90px at 100% 0%, rgba(255, 106, 44, .26), transparent 70%), linear-gradient(145deg, rgba(255, 106, 44, .12), transparent 42%), var(--panel-elev); }
.balance > span { font-size: .62rem; letter-spacing: .2em; }
.balance strong { font-size: clamp(2.6rem, 5.6vw, 3.7rem); filter: drop-shadow(0 0 16px rgba(255, 140, 60, .45)); }
.balance .coin-emoji { filter: drop-shadow(0 0 12px rgba(255, 106, 44, .7)); }
@keyframes tf-balance-glow { 50% { box-shadow: 0 0 44px rgba(255, 106, 44, .38), 0 24px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08); } }
.banner, .you-line { border-radius: 16px; }

/* Statistiche: contatori HUD */
.stat, .pulse a, .pulse div { padding: 18px 18px 16px; border-radius: 18px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.stat::before, .pulse a::before, .pulse div::before { height: 3px; background: linear-gradient(90deg, var(--accent), transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent); }
.stat b, .pulse b { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-top: 10px; letter-spacing: -.035em; text-transform: none;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--accent) 55%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 45%, transparent)); }
a.stat:hover b { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 80%, transparent)); }

/* Pannelli classifica in home */
.band .panel-leader { padding: 16px 16px 14px; border-radius: 20px; }
.band .panel-head h2 { font-size: 1.3rem; }
.band .panel-leader .list .rank { background: rgba(0, 0, 0, .28); border-color: rgba(255, 255, 255, .05); }
.band .band-foot { display: inline-flex; align-items: center; gap: 6px; }
.band .band-foot::after { content: "→"; transition: transform .3s var(--ease-out); }
.band .band-foot:hover::after { transform: translateX(4px); }

/* Posizioni in classifica: medaglie */
.pos {
  width: 1.7rem; height: 1.7rem; flex: none; display: inline-grid; place-items: center; border-radius: 50%;
  font-size: .76rem; color: #1a0d08; background: linear-gradient(145deg, #3a2752, #241a33); color: #d7b4ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.list > :nth-child(1) .pos, .pos[data-pos="1"] { background: linear-gradient(145deg, #ffe6a7, #f0c27a 50%, #c9933a); color: #2a1a08; box-shadow: 0 0 14px rgba(240, 194, 122, .55); }
.list > :nth-child(2) .pos { background: linear-gradient(145deg, #ffffff, #cfd4de 50%, #8d94a3); color: #1a1d24; box-shadow: 0 0 12px rgba(213, 216, 223, .4); }
.list > :nth-child(3) .pos { background: linear-gradient(145deg, #ffb27a, #d08a52 50%, #8c5426); color: #2a1408; box-shadow: 0 0 12px rgba(208, 138, 82, .45); }
.list .rank { padding: 10px 12px; }
.list .rank:hover { transform: translateX(6px); box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.rank img, .place img { transition: transform .3s var(--ease-spring), box-shadow .3s ease; }
.rank:hover img { transform: scale(1.12); box-shadow: 0 0 0 2px rgba(255, 176, 98, .6), 0 0 16px rgba(255, 106, 44, .4); }
.podium .place { padding: 18px 14px 16px; }
.podium .place[data-rank="1"] { transform: translateY(-6px); border-color: rgba(240, 194, 122, .55); box-shadow: 0 0 40px rgba(240, 194, 122, .18), 0 20px 50px rgba(0, 0, 0, .4); }
.podium .place[data-rank="1"]::before { content: "👑"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 1.5rem; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); animation: tf-float 3s ease-in-out infinite; }
.podium .place:hover { transform: translateY(-8px); }

/* Tile azioni: icone grandi in filigrana */
.actions .tile { min-height: 136px; padding: 20px; border-radius: 20px; overflow: hidden; }
.actions .tile::after { content: "🛍️"; position: absolute; right: -6px; bottom: -14px; font-size: 5rem; opacity: .14; transform: rotate(-12deg); transition: transform .5s var(--ease-spring), opacity .3s ease; pointer-events: none; }
.actions .tile:nth-child(2)::after { content: "🎮"; }
.actions .tile:nth-child(3)::after { content: "🧩"; }
.actions .tile:hover::after { transform: rotate(-4deg) scale(1.15) translateY(-6px); opacity: .28; }
.actions .tile h2 { font-size: 1.3rem; }
.actions .tile h2::after { color: var(--neon); }

/* Pulsanti */
.btn { border-radius: 14px; padding: 11px 18px; font-weight: 750; letter-spacing: .01em; box-shadow: 0 10px 26px rgba(255, 106, 44, .28), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(80, 20, 10, .3); background: linear-gradient(100deg, var(--violet), var(--magenta) 55%, var(--flame)); background-size: 160% 100%; transition: transform .2s var(--ease-out), box-shadow .25s ease, background-position .5s ease; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(255, 106, 44, .4), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(80, 20, 10, .3); background-position: 100% 0; }
.ghost { border-radius: 14px; background: rgba(255, 255, 255, .03); backdrop-filter: blur(8px); }
.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .06); box-shadow: 0 0 20px rgba(139, 92, 255, .15); }
.tf-mag { transform: translate(var(--magx, 0), var(--magy, 0)); }

/* Game Center: cabinati */
.game-hub { gap: 16px; }
.game-hub__card { min-height: 280px; padding: 22px 20px 20px; border-radius: 24px; border-color: color-mix(in srgb, var(--game-accent, var(--violet)) 28%, transparent); }
.game-hub__card:nth-child(4) { --game-accent: #ff4ecd; }
.game-hub__card::after { width: 180px; height: 180px; opacity: .22; filter: blur(34px); }
.game-hub__card::before { background: radial-gradient(320px 200px at var(--px, 70%) var(--py, 20%), color-mix(in srgb, var(--game-accent, var(--violet)) 22%, transparent), transparent 70%); }
.game-hub__icon { width: 68px; height: 68px; font-size: 2rem; border-radius: 20px; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--game-accent, var(--violet)) 35%, transparent), rgba(0, 0, 0, .5) 70%); border-color: color-mix(in srgb, var(--game-accent, var(--violet)) 55%, transparent); box-shadow: 0 0 26px color-mix(in srgb, var(--game-accent, var(--violet)) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, .1); animation: tf-float 4s ease-in-out infinite; }
.game-hub__card:nth-child(2) .game-hub__icon { animation-delay: -1s; }
.game-hub__card:nth-child(3) .game-hub__icon { animation-delay: -2s; }
.game-hub__card:nth-child(4) .game-hub__icon { animation-delay: -3s; }
.game-hub__card[data-kind="uno"] { --game-accent: #e5262b; }
.game-hub__card[data-kind="museo"] { --game-accent: #f1c40f; }
.game-hub__card[data-kind="tavoli"] { --game-accent: #22c55e; }
.game-hub__card:nth-child(5) .game-hub__icon { animation-delay: -1.5s; }
.game-hub__card h2 { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -.02em; }
.game-hub__tag { border: 1px solid color-mix(in srgb, var(--game-accent, var(--violet)) 50%, transparent); background: color-mix(in srgb, var(--game-accent, var(--violet)) 14%, transparent); color: #fff; letter-spacing: .1em; text-transform: uppercase; font-weight: 750; }
.game-hub__go { margin-top: auto; width: fit-content; padding: 9px 14px; border-radius: 999px; font-weight: 750; color: #1a0d08; background: linear-gradient(100deg, #ffd18a, color-mix(in srgb, var(--game-accent, var(--violet)) 70%, #fff)); box-shadow: 0 8px 20px color-mix(in srgb, var(--game-accent, var(--violet)) 35%, transparent); }
.game-hub__card:hover .game-hub__go { box-shadow: 0 12px 28px color-mix(in srgb, var(--game-accent, var(--violet)) 55%, transparent); }
.game-hub__badge { box-shadow: 0 0 12px rgba(255, 106, 44, .6); }

/* Slot nel portale */
.page-slot .stage { position: relative; border-radius: 24px; border: 1px solid rgba(255, 176, 120, .3); box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 30px 70px rgba(0, 0, 0, .55), 0 0 60px rgba(255, 106, 44, .12); overflow: hidden; }
.page-slot .stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), inset 0 30px 60px rgba(0, 0, 0, .25); }

/* Shop e collezione */
.product { border-radius: 20px; padding: 14px; }
.product .shot { height: 168px; border-radius: 16px; }
.product .tag { width: fit-content; padding: 3px 9px; border-radius: 999px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 750; color: #ffd0a1; border: 1px solid rgba(255, 176, 98, .35); background: rgba(255, 154, 70, .1); }
.product h2 { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: -.02em; }
.product .price { font-size: 1.3rem; font-weight: 800; }
.product:hover { border-color: rgba(255, 179, 71, .5); box-shadow: 0 24px 50px rgba(0, 0, 0, .45), 0 0 34px rgba(255, 106, 44, .14); }
.piece .modelbox { border-radius: 18px; }

/* Sfide, feed, profilo */
.page-sfide .card.challenge { border-radius: 18px; }
.feed-card { border-radius: 20px; }
.player { border-radius: 24px; overflow: hidden; }
.profile-tabs { border-radius: 16px; }

/* Modali e toast */
.modal { border-radius: 24px; border-color: rgba(255, 255, 255, .1); background-color: #120e1c; }
.modal-back { background: rgba(3, 2, 7, .7); backdrop-filter: blur(12px) saturate(1.2); }
.toast { border-radius: 16px; }

/* Login */
.card.login { max-width: 560px; margin: 8vh auto 0; padding: 32px; text-align: center; border-radius: 28px; border-color: rgba(255, 176, 120, .35); box-shadow: 0 0 60px rgba(255, 106, 44, .15), 0 30px 80px rgba(0, 0, 0, .5); }
.card.login h1 { font-size: clamp(2rem, 5vw, 3rem); }
.card.login .btn { justify-self: center; padding: 14px 26px; font-size: 1.05rem; }

/* Footer pagina */
.foot { padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .05); background: rgba(0, 0, 0, .25); font-size: .78rem; letter-spacing: .02em; }

/* Scintille al click */
.tf-spark { position: fixed; z-index: 99; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; background: var(--c, var(--warm)); box-shadow: 0 0 10px var(--c, var(--warm)); animation: tf-spark .7s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes tf-spark { to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }

/* Reveal allo scroll */
.tf-rv { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.tf-rv.is-in { opacity: 1; transform: none; }

/* Dock mobile */
@media (max-width: 860px) {
  .top { top: 8px; width: calc(100% - 16px); margin-top: 8px; padding: 6px 10px 6px 8px; border-radius: 18px; }
  main { width: calc(100% - 20px); margin-top: 14px; }
  .dock { border-radius: 24px; padding: 6px; border: 1px solid rgba(255, 176, 120, .22); box-shadow: 0 -2px 30px rgba(0, 0, 0, .5), 0 0 40px rgba(255, 106, 44, .08), inset 0 1px 0 rgba(255, 255, 255, .06); }
  .dock a.active, .dock-more-btn.active { box-shadow: inset 0 0 0 1px rgba(255, 179, 71, .45), 0 0 18px rgba(255, 106, 44, .25); }
  .page-home .hero h1 { font-size: 2.1rem; }
  .balance strong { font-size: 2.4rem; }
  .actions .tile { min-height: 112px; }
  .actions .tile::after { font-size: 3.6rem; }
  .game-hub__card { min-height: 0; }
  .tf-vignette { display: none; }
}
@media (hover: none) {
  .tf-tilt, .tile.tf-tilt:hover, .product.tf-tilt:hover, .game-hub__card.tf-tilt:hover, .stat.tf-tilt:hover, .place.tf-tilt:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .balance, .kicker::before, .game-hub__icon, .podium .place[data-rank="1"]::before, .tf-spark { animation: none !important; }
  .tf-rv { opacity: 1; transform: none; transition: none; }
  .tf-embers { display: none; }
}

/* ---- fix audit (1.0.576) ---- */
.nav a { white-space: nowrap; }
.hero-week { margin: 6px 0 0; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: #ffd0a1; background: rgba(255, 154, 70, .1); border: 1px solid rgba(255, 176, 98, .28); }
.hero-week::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.player .banner { background-image: radial-gradient(600px 200px at 20% 0%, rgba(139, 92, 255, .35), transparent 70%), radial-gradient(500px 220px at 90% 100%, rgba(255, 106, 44, .3), transparent 70%), linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: auto, auto, 28px 28px, 28px 28px; }
.player .banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 50% 110%, rgba(5, 4, 10, .8), transparent 70%); }
.banner > b { white-space: nowrap; }
.podium .place { padding: 20px 14px 18px; }
@media (min-width: 861px) { .game-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); } .game-hub__card { min-height: 250px; } }
.ghost { color: var(--text); border-color: rgba(255, 255, 255, .16); }
.ghost:hover:not(:disabled) { color: #fff; border-color: rgba(255, 179, 71, .5); }
.page > .warn, .modal .warn { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 0; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255, 107, 122, .32); background: rgba(255, 107, 122, .08); color: #ffb3bc; box-shadow: 0 0 24px rgba(255, 107, 122, .1); }
.page > .warn::before, .modal .warn::before { content: "!"; flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; color: #1a0608; background: var(--bad); box-shadow: 0 0 12px rgba(255, 107, 122, .6); }
.page > .warn + a, .page > .warn + p > a { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--text); border: 1px solid var(--line-strong); background: rgba(255, 154, 70, .08); font-weight: 700; }
main, .page, .page > *, .band, .band > *, .list, .rank, .who-mini, .who-mini > span { min-width: 0; }
.who-mini > span, .rank > span:not(.pos):not(.who-mini) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank > b { flex: none; }
@media (max-width: 860px) {
  .podium { grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
  .podium .place[data-rank="1"] { grid-column: 1 / -1; transform: none; }
  .podium.n-1 { grid-template-columns: 1fr; }
  .podium .place { padding: 14px 10px 12px; }
  .place img, .place .ph { width: 56px; height: 56px; }
  .actions { grid-template-columns: 1fr; gap: 10px; }
  .actions .tile { min-height: 0; padding: 16px 18px; }
  .actions .tile::after { font-size: 2.6rem; right: 10px; bottom: -8px; opacity: .22; }
  .tabs-scroll { mask-image: linear-gradient(90deg, #000 86%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); }
}
@media (max-width: 480px) { .account > span { display: none; } .account { padding: 4px; } .rank > b { font-size: .86rem; } }
@media (max-width: 400px) { .top { padding: 6px; gap: 10px; } .word { font-size: 1rem; } .balance strong { font-size: 2.1rem; } .dock a, .dock-more-btn { padding: 8px 6px; font-size: .74rem; } }

/* ---------- Game Center in stile console (fila di giochi orizzontale) */
.ps-home { --acc: #ff6a2c; position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 18px; min-height: calc(100dvh - 160px); padding-bottom: 24px; }
.ps-bg { position: absolute; inset: -24px -40px auto; height: min(78dvh, 720px); z-index: -1; overflow: hidden; pointer-events: none; border-radius: 0 0 40px 40px;
  background: radial-gradient(70% 90% at 78% 30%, color-mix(in srgb, var(--acc) 55%, transparent), transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--acc) 22%, #05040a), #05040a 92%);
  transition: background .6s ease; -webkit-mask-image: radial-gradient(130% 100% at 50% 0%, #000 55%, transparent 100%); mask-image: radial-gradient(130% 100% at 50% 0%, #000 55%, transparent 100%); }
.ps-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #05040a 0%, rgba(5,4,10,.55) 45%, transparent 75%), linear-gradient(0deg, #05040a 0%, transparent 35%); }
.ps-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.ps-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ps-top .kicker { margin: 0; }
.ps-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.ps-cats button { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: var(--text); border-radius: 999px; padding: 6px 14px; font: 700 13px/1.2 inherit; cursor: pointer; transition: background .2s, border-color .2s; }
.ps-cats button.on { background: #fff; color: #120a08; border-color: #fff; }
.ps-row { display: flex; gap: 14px; align-items: flex-end; overflow-x: auto; overflow-y: visible; padding: 26px 8px 34px; margin: 0 -8px; scrollbar-width: none; outline: none; }
.ps-row::-webkit-scrollbar { display: none; }
.ps-row__end { flex: 0 0 40vw; }
.ps-tile { --size: clamp(84px, 11vw, 118px); position: relative; flex: 0 0 auto; width: var(--size); height: var(--size); border: 0; padding: 0; cursor: pointer; scroll-snap-align: start; border-radius: 22px;
  background: radial-gradient(120% 120% at 25% 15%, color-mix(in srgb, var(--acc) 85%, #fff 15%), color-mix(in srgb, var(--acc) 60%, #000) 75%);
  box-shadow: 0 10px 24px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.18); display: grid; place-items: center;
  transition: width .32s cubic-bezier(.2,.8,.2,1), height .32s cubic-bezier(.2,.8,.2,1), box-shadow .3s, filter .3s; filter: saturate(.75) brightness(.85); }
.ps-tile { overflow: visible; }
.ps-tile__art { width: 100%; height: 100%; border-radius: inherit; display: block; object-fit: cover; transition: transform .32s; }
.ps-tile__name { position: absolute; left: 0; top: calc(100% + 10px); white-space: nowrap; font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1; color: var(--text); opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; pointer-events: none; }
.ps-tile__badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font: 800 12px/22px inherit; font-style: normal; box-shadow: 0 0 0 3px #05040a; }
.ps-tile:hover { filter: saturate(.95) brightness(1); }
.ps-tile.on { --size: clamp(120px, 16vw, 172px); filter: none; box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 3px #fff, 0 0 40px color-mix(in srgb, var(--acc) 60%, transparent); }

.ps-tile.on .ps-tile__name { opacity: 1; transform: none; }
.ps-tile:focus-visible { outline: 3px solid var(--focus-ring, #ffd18a); outline-offset: 4px; }
.ps-hero { max-width: 620px; display: flex; flex-direction: column; gap: 10px; min-height: 230px; }
.ps-hero__tag { align-self: flex-start; font-family: inherit; font-weight: 800; font-size: 11px; line-height: 1; letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--acc) 30%, rgba(255,255,255,.08)); border: 1px solid color-mix(in srgb, var(--acc) 60%, transparent); }
.ps-hero h1 { margin: 0; font-size: clamp(34px, 6vw, 60px); line-height: 1; text-wrap: balance; text-shadow: 0 6px 30px rgba(0,0,0,.5); }
.ps-hero p { margin: 0; color: rgba(248,244,255,.86); font-size: 16px; line-height: 1.5; max-width: 56ch; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-chips span { padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); font-size: 13px; font-weight: 600; }
.ps-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.ps-play { padding: 14px 30px; font-size: 16px; border-radius: 999px; }
.ps-count { color: var(--muted); font-size: 13px; font-weight: 700; }
.ps-help { margin: auto 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  .ps-bg { inset: -16px -16px auto; height: 70dvh; }
  .ps-bg img { object-position: 78% 30%; opacity: .7; }
  .ps-row { gap: 10px; padding: 20px 8px 30px; }
  .ps-hero h1 { font-size: 36px; }
  .ps-help { display: none; }
}
@media (hover: none) { .ps-help { display: none; } }
@media (prefers-reduced-motion: reduce) { .ps-tile, .ps-tile__art, .ps-bg { transition: none; } }
.ps-tile[hidden] { display: none; }
@media (max-width: 640px) { .ps-bg img { opacity: .4; } .ps-bg::after { background: linear-gradient(0deg, #05040a 0%, rgba(5,4,10,.5) 60%, rgba(5,4,10,.2) 100%); } }
.ps-bet { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 6px; }
.ps-bet .coin-emoji { vertical-align: -3px; }
.ps-bet__seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.12); }
.ps-bet__seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 14px; font-family: inherit; font-weight: 800; font-size: 13px; line-height: 1; cursor: pointer; transition: background .15s, color .15s; }
.ps-bet__seg button.on { background: #fff; color: #120a08; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.ps-bet__seg button:disabled { opacity: .45; cursor: not-allowed; }
.ps-bet__amt { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: linear-gradient(180deg, rgba(255,140,40,.18), rgba(255,90,20,.08)); border: 1px solid rgba(255,170,80,.45); }
.ps-bet__step { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; font-family: inherit; font-weight: 800; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.ps-bet__step:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.ps-bet__step:disabled { opacity: .35; cursor: not-allowed; }
.ps-bet__val { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; cursor: text; }
.ps-bet__val input { width: 4.2ch; border: 0; background: transparent; color: #ffe2b8; font-family: inherit; font-weight: 800; font-size: 20px; line-height: 1; text-align: center; padding: 0; -moz-appearance: textfield; appearance: textfield; outline: none; }
.ps-bet__val input::-webkit-outer-spin-button, .ps-bet__val input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ps-bet__val:focus-within { border-radius: 10px; box-shadow: 0 0 0 2px rgba(255,190,110,.6); }
.ps-bet__hint { color: rgba(255,226,184,.7); font-size: 11px; font-weight: 700; padding-right: 10px; }
.ps-bet__wallet { color: var(--muted); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.ps-bet__wallet b { color: var(--text); }
.ps-play .coin-emoji { vertical-align: -3px; }
/* Sfide 1v1 nel Game Center: modalità → avversario → importo */
.ps-step { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.ps-step b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--acc, #8b5cff); color: #fff; font-size: 12px; }
.ps-step small { color: var(--muted); font-weight: 600; font-size: 11px; }
.ps-modes { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.ps-mode { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; padding: 10px 6px 8px; border-radius: 16px; border: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.3); color: var(--text); cursor: pointer; font-family: inherit; transition: transform .15s, border-color .15s, background .15s; }
.ps-mode i { font-style: normal; font-size: 26px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--mc) 85%, #fff), var(--mc) 60%, color-mix(in srgb, var(--mc) 55%, #000)); box-shadow: 0 6px 16px color-mix(in srgb, var(--mc) 40%, transparent); }
.ps-mode span { font-size: 11.5px; font-weight: 800; text-align: center; line-height: 1.15; }
.ps-mode:hover, .ps-mode:focus-visible { transform: translateY(-3px); border-color: rgba(255,255,255,.35); outline: none; }
.ps-mode.on { border-color: #fff; background: rgba(255,255,255,.12); box-shadow: 0 0 0 2px var(--mc); }
.ps-mode-desc { margin: 0; color: var(--muted); font-size: 13px; }
.ps-botrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ps-botrow small { color: var(--muted); font-size: 12.5px; min-width: 0; flex: 1 1 200px; }
.ps-pick { max-width: 420px; }
.ps-target { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); width: fit-content; }
.ps-target img { width: 32px; height: 32px; border-radius: 50%; }
.ps-note { margin: 0; font-size: 12px; color: var(--muted); }
.ps-note.warn { color: #ffb4b4; }
.ps-chs { display: flex; flex-direction: column; gap: 6px; }
.ps-ch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.1); }
.ps-ch.in { border-color: rgba(255,209,102,.55); background: rgba(255,209,102,.1); }
.ps-ch img { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.ps-ch span { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.ps-ch small { color: var(--muted); font-size: 12px; }
.ps-ch .btn.small, .ps-ch .ghost.small, .ps-target .ghost.small { padding: 7px 12px; font-size: 12.5px; min-height: 0; }
@media (max-width: 560px) { .ps-mode { width: 74px; } .ps-ch { flex-wrap: wrap; } }
.ps-ch small, .ps-ch .coin-emoji { vertical-align: -2px; }
.ps-ch .coin-emoji, .ps-play .coin-emoji { width: 14px !important; height: 14px !important; display: inline-block; }
.ps-play .coin-emoji { width: 18px !important; height: 18px !important; }
