/* =========================================================
   PARTYGAMES — DESIGN SYSTEM
   1. Font          6. Header / footer
   2. Token         7. Componenti (bottoni, chip, card…)
   3. Reset         8. Homepage
   4. Utility       9. Pagine di contenuto
   5. Layout       10. Slot pubblicitari
                   11. Cookie banner
   ========================================================= */

/* ---------- 1. FONT (SIL Open Font License, vedi assets/fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/poppins-latin-800.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/poppins-latin-900.woff2") format("woff2"); }

/* ---------- 2. TOKEN ---------- */
:root {
  /* Superfici */
  --bg: #0a0e1a;
  --bg-elev: #12172a;
  --bg-elev-2: #1a2038;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);

  /* Testo */
  --text: #f2f4ff;
  --text-muted: #a3acc8;
  --text-faint: #8690b2;
  --on-accent: #06090f;

  /* Accenti */
  --cyan: #4dd9ff;
  --violet: #b06aff;
  --pink: #ff2d55;
  --yellow: #ffd600;
  --green: #00e676;
  --orange: #ff9f1c;
  --danger: #ff4d6d;
  --gradient-brand: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--pink));
  --gradient-cta: linear-gradient(90deg, #ffe066, #ff9f4d);

  /* Tipografia */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-md: 1rem;
  --fs-lg: 1.15rem;
  --fs-xl: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  --fs-2xl: clamp(1.7rem, 1.3rem + 1.8vw, 2.4rem);
  --fs-hero: clamp(2.1rem, 1.3rem + 3.6vw, 4rem);

  /* Spaziature e forme */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --gutter: 16px;
  --content-max: 1120px;
  --rail-w: 160px;

  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 18px 50px -12px rgba(0, 0, 0, 0.6);
  --blur: blur(14px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --focus: 0 0 0 3px var(--bg), 0 0 0 5px var(--cyan);
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

/* ---------- 3. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #9be9ff; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; font-weight: 800; }
ul[class], ol[class] { list-style: none; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 4. UTILITY ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--cyan); color: var(--on-accent); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: var(--space-3); }
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

/* Sfondo animato a "blob" sfumati, generato solo in CSS */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(circle at 20% 20%, #131a33 0%, var(--bg) 55%); }
.bg-blobs span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .28; animation: blob-float 22s ease-in-out infinite; }
.bg-blobs span:nth-child(1) { width: 460px; height: 460px; background: var(--pink); top: -12%; left: -12%; }
.bg-blobs span:nth-child(2) { width: 520px; height: 520px; background: var(--violet); bottom: -18%; right: -12%; animation-duration: 26s; animation-delay: -6s; }
.bg-blobs span:nth-child(3) { width: 340px; height: 340px; background: var(--cyan); top: 40%; left: 58%; animation-duration: 20s; animation-delay: -3s; opacity: .18; }
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 25px) scale(.95); }
}

/* ---------- 5. LAYOUT ---------- */
.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: var(--space-6);
}
.page-main { min-width: 0; padding-bottom: var(--space-7); }
.page-main:focus { outline: none; }
.ad-rail { display: none; }

/* Sidebar pubblicitarie solo su schermi larghi */
@media (min-width: 1280px) {
  .page-shell--rails {
    grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--rail-w);
    max-width: calc(var(--content-max) + 2 * var(--rail-w) + 2 * var(--space-6) + 2 * var(--gutter));
  }
  .page-shell--rails .ad-rail { display: block; }
}
@media (min-width: 1600px) { :root { --rail-w: 300px; } }

.section { margin-top: var(--space-8); }
.section__head { margin-bottom: var(--space-5); max-width: 760px; }
.section__head h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-2); }
.section__head p { color: var(--text-muted); }

/* ---------- 6. HEADER / FOOTER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 26, .78);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.logo-mark { width: 38px; height: 38px; }
.brand__name { font-family: var(--font-display); font-weight: 900; font-size: 1.25rem; letter-spacing: .3px; }
.brand__club { font-style: normal; font-weight: 700; color: var(--text-muted); }
.brand__name span { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav { display: flex; align-items: center; gap: var(--space-1); overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: var(--fs-sm);
  padding: 8px 12px; border-radius: var(--radius-pill); white-space: nowrap; transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--text); background: var(--surface-hover); }
.main-nav .lang-switch { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); color: var(--text); margin-left: var(--space-1); }
@media (max-width: 560px) {
  .brand__name { display: none; }
  .main-nav a { padding: 8px 10px; }
}
@media (max-width: 420px) { .main-nav__optional { display: none; } }

.site-footer { border-top: 1px solid var(--border); background: rgba(10, 14, 26, .6); margin-top: var(--space-6); }
.site-footer__inner {
  max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto;
  padding: var(--space-7) var(--gutter) var(--space-5);
  display: grid; gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.site-footer__brand { grid-column: 1 / -1; max-width: 420px; }
@media (min-width: 900px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .site-footer__brand { grid-column: auto; }
}
.site-footer__brand p { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--space-3); }
.site-footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.site-footer__col h2 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: var(--space-1); }
.site-footer__col a, .link-button { color: var(--text-muted); text-decoration: none; font-size: var(--fs-sm); text-align: left; }
.site-footer__col a:hover, .link-button:hover { color: var(--text); text-decoration: underline; }
.site-footer__copy { text-align: center; color: var(--text-faint); font-size: var(--fs-xs); padding: 0 var(--gutter) var(--space-6); }

.breadcrumb { margin: var(--space-5) 0 var(--space-4); font-size: var(--fs-sm); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-faint); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--text-faint); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text); }

/* ---------- 7. COMPONENTI ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); line-height: 1.2;
  padding: 12px 22px; border-radius: var(--radius-pill); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary { background: var(--gradient-cta); color: var(--on-accent); box-shadow: 0 0 24px rgba(255, 170, 77, .35); }
.btn--primary:hover { color: var(--on-accent); box-shadow: 0 0 34px rgba(255, 170, 77, .6); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { color: var(--text); background: var(--surface-hover); border-color: var(--cyan); }
.btn--danger { background: rgba(255, 77, 109, .12); color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.btn--lg { padding: 15px 28px; font-size: var(--fs-lg); }
.btn--sm { padding: 8px 16px; font-size: var(--fs-sm); }

.chip {
  font-weight: 600; font-size: var(--fs-sm); color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  padding: 8px 18px; border-radius: var(--radius-pill); transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--cyan); transform: translateY(-1px); }
.chip.is-active { background: var(--cyan); color: var(--on-accent); border-color: var(--cyan); box-shadow: 0 0 18px rgba(77, 217, 255, .45); }

.game-card, .game-page { --card-text: color-mix(in srgb, var(--card) 62%, #fff); }
.badge {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--radius-pill);
  color: var(--card-text, var(--cyan)); background: color-mix(in srgb, var(--card, var(--cyan)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--card, var(--cyan)) 55%, transparent);
}

.card, .feature, .teams-panel, .faq__item, .step, .contact-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
}

.toast {
  margin-top: var(--space-4); text-align: center; font-weight: 600; color: var(--yellow);
}

/* Interruttore (checkbox) */
.switch {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 46px; height: 26px; border-radius: var(--radius-pill);
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  position: relative; cursor: pointer; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-muted); transition: transform .2s var(--ease), background .2s;
}
.switch:checked { background: var(--green); border-color: var(--green); }
.switch:checked::after { transform: translateX(20px); background: #fff; }

/* ---------- 8. HOMEPAGE ---------- */
.hero { text-align: center; padding: var(--space-7) 0 var(--space-4); max-width: 900px; margin: 0 auto; }
.hero__eyebrow {
  display: inline-block; font-size: var(--fs-sm); font-weight: 700; color: var(--yellow);
  background: rgba(255, 214, 0, .1); border: 1px solid rgba(255, 214, 0, .35);
  padding: 6px 14px; border-radius: var(--radius-pill); margin-bottom: var(--space-4);
}
.hero__title { font-size: var(--fs-hero); font-weight: 900; letter-spacing: -.5px; text-shadow: 0 0 40px rgba(77, 217, 255, .2); }
.hero__lead { color: var(--text-muted); font-size: var(--fs-lg); max-width: 680px; margin: var(--space-4) auto 0; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-6); }
.hero__stats { display: flex; justify-content: center; gap: var(--space-6); margin-top: var(--space-6); flex-wrap: wrap; }
.hero__stats li { display: flex; flex-direction: column; align-items: center; }
.hero__stats strong { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 900; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__stats span { color: var(--text-muted); font-size: var(--fs-sm); }
@media (max-width: 480px) { .hero__actions .btn { width: 100%; } }

.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }

.game-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.game-card {
  --card: var(--cyan);
  position: relative; display: flex; flex-direction: column;
  padding: var(--space-5); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.game-card:hover, .game-card:focus-within {
  transform: translateY(-6px); border-color: var(--card);
  box-shadow: 0 16px 42px -12px color-mix(in srgb, var(--card) 55%, transparent);
}
.game-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.game-card__icon {
  font-size: 2.2rem; line-height: 1; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px;
  background: color-mix(in srgb, var(--card) 16%, transparent); border: 1px solid color-mix(in srgb, var(--card) 40%, transparent);
}
.game-card__badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.game-card__title { font-size: var(--fs-xl); }
.game-card__link { color: var(--text); text-decoration: none; }
.game-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* tutta la card è cliccabile */
.game-card__link:focus-visible { box-shadow: none; }
.game-card:has(.game-card__link:focus-visible) { box-shadow: var(--focus); }
.game-card__tagline { color: var(--card-text); font-weight: 600; font-size: var(--fs-sm); margin-top: 2px; }
.game-card__desc { color: var(--text-muted); font-size: .95rem; margin: var(--space-3) 0 var(--space-4); flex-grow: 1; }
.game-card__meta { display: flex; gap: var(--space-4); color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--space-4); }
.game-card__meta li { display: inline-flex; align-items: center; gap: 6px; }
.game-card__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; padding: 12px 18px; border-radius: var(--radius);
  background: var(--card); color: var(--on-accent);
}
.game-card.is-soon .game-card__cta { background: transparent; color: var(--text-muted); border: 1px dashed var(--border-strong); }
.game-card.is-soon:hover { transform: translateY(-3px); }
.game-card.is-filtered { display: none; }
.game-card.is-shuffling { border-color: var(--cyan); box-shadow: 0 0 24px rgba(77, 217, 255, .5); }
.game-card.is-chosen { border-color: var(--yellow); box-shadow: 0 0 44px rgba(255, 224, 102, .75); animation: chosen-pulse 1s ease-in-out 2; }
@keyframes chosen-pulse { 50% { transform: scale(1.03); } }

/* Pannello squadre */
.teams-panel { padding: var(--space-5); }
@media (min-width: 768px) { .teams-panel { padding: var(--space-6); } }
.teams-count { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.teams-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin-bottom: var(--space-4); }
.team-card {
  border-radius: var(--radius); padding: 14px 16px; background: rgba(255, 255, 255, .03);
  border: 2px solid var(--team-color, var(--border)); display: flex; flex-direction: column; gap: var(--space-3);
}
.team-card__name { display: flex; align-items: center; gap: 10px; }
.team-card__name input[type="text"] {
  flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 700; padding: 4px 2px;
}
.team-card__name input[type="text"]:focus { outline: none; border-color: var(--team-color); }
.team-card__name input[type="color"] { width: 30px; height: 30px; border: 0; border-radius: 50%; padding: 0; background: none; cursor: pointer; flex-shrink: 0; }
.team-card__name input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.team-card__name input[type="color"]::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 50%; }
.team-card__score { display: flex; align-items: center; justify-content: space-between; }
.team-card__score output { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: var(--team-color); }
.team-card__score div { display: flex; gap: 6px; }
.team-card__score button {
  width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); font-weight: 800; font-size: 1.1rem; line-height: 1;
}
.team-card__score button:hover { border-color: var(--team-color); color: var(--team-color); }
.teams-actions { display: flex; justify-content: flex-end; }

.feature-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.feature { padding: var(--space-5); }
.feature__icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: var(--space-3);
  color: var(--cyan); background: rgba(77, 217, 255, .1); border: 1px solid rgba(77, 217, 255, .3);
}
.feature__icon .icon { width: 22px; height: 22px; }
.feature h3, .step h3 { font-size: var(--fs-lg); margin-bottom: var(--space-2); }
.feature p, .step p { color: var(--text-muted); font-size: .95rem; }

.steps { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.step { padding: var(--space-5); border-left: 3px solid var(--violet); }

.faq { display: grid; gap: var(--space-3); max-width: 860px; }
.faq__item { border-radius: var(--radius); padding: 0 var(--space-5); }
.faq__item summary { cursor: pointer; list-style: none; padding: var(--space-4) 0; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-family: var(--font-display); font-size: 1.5rem; color: var(--cyan); transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary h3 { font-size: var(--fs-md); font-weight: 700; }
.faq__item p { color: var(--text-muted); padding-bottom: var(--space-4); }

/* ---------- 9. PAGINE DI CONTENUTO ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose__head { margin: var(--space-5) 0 var(--space-6); }
.prose h1 { font-size: var(--fs-2xl); font-weight: 900; }
.prose__updated { color: var(--text-faint); font-size: var(--fs-sm); margin-top: var(--space-2); }
.prose__lead { font-size: var(--fs-lg); color: var(--text); }
.prose h2 { font-size: var(--fs-xl); margin: var(--space-7) 0 var(--space-3); }
.prose h3 { font-size: var(--fs-lg); margin: var(--space-5) 0 var(--space-2); font-weight: 700; }
.prose p, .prose li { color: var(--text-muted); }
.prose p + p { margin-top: var(--space-3); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: var(--space-3) 0; display: grid; gap: var(--space-2); }
.prose code { font-size: .88em; background: var(--bg-elev-2); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.table-wrap { overflow-x: auto; margin: var(--space-4) 0; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--text); background: var(--surface); font-weight: 700; }
.prose td { color: var(--text-muted); }
.prose tr:last-child td { border-bottom: 0; }
.contact-card { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-5); margin: var(--space-5) 0; }
.contact-card .feature__icon { margin: 0; }
.contact-card h2 { margin: 0; font-size: var(--fs-lg); }
.contact-card p { margin: 0; word-break: break-all; }

.not-found { text-align: center; padding: var(--space-8) 0; }
.not-found__code { font-family: var(--font-display); font-weight: 900; font-size: clamp(5rem, 20vw, 9rem); line-height: 1; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found h1 { font-size: var(--fs-2xl); margin: var(--space-3) 0; }
.not-found p { color: var(--text-muted); margin-bottom: var(--space-6); }

/* ---------- 10. SLOT PUBBLICITARI ----------
   Lo spazio è riservato in anticipo (min-height) per evitare
   spostamenti del layout (CLS) quando l'annuncio si carica.
   Gli annunci non vengono mai posizionati sopra o accanto ai
   controlli di gioco, per evitare clic accidentali. */
.ad-band { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: var(--space-4) auto 0; padding: 0 var(--gutter); }
.ad-band--bottom { margin-top: 0; }
.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.ad-slot__label { font-size: .68rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-faint); }
.ad-slot__inner { width: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.ad-slot__inner > ins { display: block; width: 100%; }
.ad-slot--top .ad-slot__inner { min-height: 100px; max-width: 970px; }
@media (min-width: 768px) { .ad-slot--top .ad-slot__inner { min-height: 90px; } }
.ad-slot--rail { position: sticky; top: 88px; margin-top: var(--space-6); }
.ad-slot--rail .ad-slot__inner { min-height: 600px; }
.ad-slot--bottom .ad-slot__inner, .ad-slot--results .ad-slot__inner { min-height: 280px; max-width: 970px; }
.ad-slot--results { margin: var(--space-6) 0; }

/* Segnaposto visibile in sviluppo (config adsense.showPlaceholders) */
.ad-slot.is-placeholder .ad-slot__inner {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 12px, transparent 12px 24px);
}
.ad-slot.is-placeholder .ad-slot__inner::before { content: "Ad · " attr(data-size); font-size: var(--fs-xs); color: var(--text-faint); text-align: center; padding: 0 8px; }
/* Slot che non hanno ricevuto annunci: si chiudono senza lasciare buchi */
.ad-slot.is-unfilled { display: none; }

/* ---------- 11. COOKIE BANNER ---------- */
.consent {
  position: fixed; z-index: 90; left: var(--gutter); right: var(--gutter); bottom: var(--gutter);
  max-width: 560px; max-height: calc(100vh - 2 * var(--gutter)); overflow-y: auto;
  background: rgba(18, 23, 42, .97); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--space-5); padding-top: var(--space-5);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  animation: consent-in .35s var(--ease);
}
@media (min-width: 640px) { .consent { right: auto; } }
@keyframes consent-in { from { opacity: 0; transform: translateY(16px); } }
.consent__close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--text-muted); }
.consent__close:hover { background: var(--surface-hover); color: var(--text); }
.consent__title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-lg); margin-bottom: var(--space-2); padding-right: 36px; }
.consent__title .icon { color: var(--green); }
.consent__text { color: var(--text-muted); font-size: var(--fs-sm); }
.consent__prefs { display: grid; gap: var(--space-2); }
.consent__row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-3); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.consent__row h3 { font-size: var(--fs-sm); font-weight: 700; }
.consent__row p { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.5; }
.consent__always { font-size: var(--fs-xs); font-weight: 700; color: var(--green); white-space: nowrap; }
.consent__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.consent__actions .btn { flex: 1 1 auto; padding: 10px 16px; font-size: var(--fs-sm); }
