/* CityStrike — stile mobile-first, tema chiaro/scuro. */
:root {
  /* Palette CityStrike: viola #6A2BFF + arancio #FF5A1F (logo "5 · Viola + pin arancio").
     --accent e' l'arancio scurito quanto basta per il testo su fondo chiaro (3,9:1, solo testo grande). */
  --bg: #f6f4fb;
  --surface: #ffffff;
  --surface-2: #efebf9;
  --text: #1a1330;
  --text-dim: #5e5679;
  --border: #ddd6f0;
  --brand: #6a2bff;
  --brand-ink: #ffffff;
  --accent: #e8480c;
  --ok: #1a7f4b;
  --ok-bg: #e3f6ea;
  --ko: #b3261e;
  --ko-bg: #fdecea;
  --warn-bg: #fff6e0;
  --shadow: 0 6px 20px rgba(40, 20, 90, .08);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120b26;
    --surface: #1c1336;
    --surface-2: #251a45;
    --text: #ece8f8;
    --text-dim: #b3a8d1;
    --border: #362a5c;
    --brand: #a98bff;
    --brand-ink: #140833;
    --accent: #ff7a45;
    --ok: #58d59a;
    --ok-bg: #12301f;
    --ko: #ff8b82;
    --ko-bg: #351613;
    --warn-bg: #33290f;
    --shadow: 0 6px 20px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --bg: #120b26; --surface: #1c1336; --surface-2: #251a45; --text: #ece8f8;
  --text-dim: #b3a8d1; --border: #362a5c; --brand: #a98bff; --brand-ink: #140833; --accent: #ff7a45;
  --ok: #58d59a; --ok-bg: #12301f; --ko: #ff8b82; --ko-bg: #351613; --warn-bg: #33290f;
  --shadow: 0 6px 20px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
/* L'attributo hidden vale sempre: senza questa regola un display: flex/grid dell'autore lo scavalca. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: env(safe-area-inset-top) 0 0;
}
.app-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 0 auto; padding: .7rem 1rem;
}
.brand { display: flex; align-items: center; gap: .5rem; }
.logo { width: 30px; height: 30px; display: block; flex: none; }
.app-title { font-size: 1.35rem; margin: 0; letter-spacing: -.02em; color: var(--brand); font-weight: 600; }
.app-title-strike { color: var(--accent); font-weight: 800; }
.game-number { color: var(--text-dim); font-weight: 600; font-size: .95rem; }
.header-right { display: flex; align-items: center; gap: .5rem; }
.score-chip {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: .35rem .6rem; border-radius: 999px; font-weight: 700; font-size: .9rem;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.icon-btn {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; /* 44 px: area minima per il dito */
}
.icon-btn:active { transform: scale(.94); }

/* Altezza riservata ai pallini anche prima che il gioco li disegni: niente salto sotto l'header. */
.progress { max-width: 640px; min-height: calc(12px + .6rem); margin: 0 auto; padding: 0 1rem .6rem; }
.progress-dots { display: flex; gap: .35rem; flex-wrap: wrap; }
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
}
.dot-active { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.dot-ok { background: var(--ok); border-color: var(--ok); }
.dot-ko { background: var(--ko); border-color: var(--ko); }

/* ---------- Main ---------- */
.app-main { max-width: 640px; margin: 0 auto; padding: 1rem; }
/* Il round occupa sempre almeno lo schermo sotto l'header (7rem = header + margini di .app-main): il footer
   resta sotto la piega e non salta quando il gioco arriva da /api/today o il round è corto. */
.round-mount { display: flex; flex-direction: column; gap: 1rem; min-height: calc(100vh - 7rem); min-height: calc(100svh - 7rem); }

.round-head { text-align: center; }
.round-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; color: var(--text-dim); font-weight: 700; }
.round-title { margin: .2rem 0 .1rem; font-size: 1.4rem; }
/* Titoli che ricevono il fuoco al cambio di round (game.js): niente contorno, non sono controlli. */
.round-title:focus, .summary-title:focus { outline: none; }
.round-sub { margin: 0; color: var(--text-dim); font-size: .95rem; }
.round-body { display: flex; flex-direction: column; gap: 1rem; }

/* ---------- Media / immagini ---------- */
.media { display: flex; justify-content: center; }
.img-wrap {
  position: relative; width: 100%; max-width: 460px; min-height: 140px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
/* L'immagine definisce l'altezza del contenitore (niente bande vuote intorno). */
.img-wrap img { width: 100%; height: auto; display: block; }
.img-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: .9rem; text-align: center; padding: 1rem;
}
.img-placeholder.loading { animation: img-pulse 1.2s ease-in-out infinite; }
@keyframes img-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .img-placeholder.loading { animation: none; } }

/* ---------- Crediti delle foto (riga discreta sotto l'immagine) ---------- */
.photo-figure { width: 100%; max-width: 460px; }
.photo-credit {
  margin-top: .25rem; min-height: 1.35em; /* riga riservata anche da vuota: niente salti quando compare */
  font-size: 11px; line-height: 1.35; text-align: right; overflow-wrap: anywhere;
  color: var(--text-dim); opacity: .75;
}
.photo-credit a { color: inherit; }
.modal .photo-credit { margin-top: .5rem; }

/* ---------- Round 2: opzioni skyline ---------- */
.skyline-options { display: flex; flex-direction: column; gap: .8rem; }
.skyline-card {
  position: relative; display: block; width: 100%; padding: 0; cursor: pointer;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-align: left;
}
.skyline-card .img-wrap { border: none; border-radius: 0; aspect-ratio: 16 / 7; max-width: none; min-height: 0; background: #fff; }
.skyline-card .img-wrap img { height: 100%; object-fit: contain; }
.skyline-card:not(:disabled):hover { border-color: var(--brand); }
.skyline-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.skyline-card:disabled { cursor: default; }
.skyline-card.wrong { border-color: var(--ko); opacity: .6; }
.skyline-card.correct { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 35%, transparent); }
.skyline-num {
  position: absolute; z-index: 2; top: .5rem; left: .5rem;
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: .9rem;
}
.skyline-card.wrong .skyline-num { background: var(--ko); }
.skyline-card.correct .skyline-num { background: var(--ok); }

/* ---------- Round 4: griglia foto 2×2 ---------- */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.photo-cell { min-width: 0; }
.photo-card {
  position: relative; display: block; width: 100%; padding: 0; cursor: pointer; overflow: hidden; text-align: left;
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
}
.photo-card .img-wrap { border: none; border-radius: 0; aspect-ratio: 1 / 1; max-width: none; min-height: 0; }
.photo-card .img-wrap img { height: 100%; object-fit: cover; }
.photo-card:not(:disabled):hover { border-color: var(--brand); }
.photo-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.photo-card:disabled { cursor: default; }
.photo-card.wrong { border-color: var(--ko); opacity: .55; }
.photo-card.correct { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 35%, transparent); }
.photo-num {
  position: absolute; z-index: 2; top: .4rem; left: .4rem;
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: .85rem;
}
.photo-card.wrong .photo-num { background: var(--ko); }
.photo-card.correct .photo-num { background: var(--ok); }

/* ---------- "Lo sapevi che…" (inline + modale) ---------- */
.fact-card { background: var(--warn-bg); border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; }
.fact-kicker, .modal-kicker { text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; font-weight: 700; color: var(--brand); }
.fact-title, .modal-title { margin: .2rem 0 .3rem; font-size: 1.1rem; }
.fact-body, .modal-body { margin: 0; }

.modal-overlay {
  position: fixed; inset: 0; z-index: 9990; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); padding: 1rem;
}
.modal {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem; width: min(460px, 94vw);
}
.modal-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.modal-hero { display: flex; align-items: flex-start; gap: .9rem; }
.modal-textcol { flex: 1 1 auto; min-width: 0; }
.mascot { flex: 0 0 auto; width: 76px; }
.mascot svg { width: 100%; height: auto; display: block; }
@media (max-width: 380px) { .mascot { width: 60px; } }

/* ---------- Round 6: trivia ---------- */
.r6-sub { display: flex; flex-direction: column; gap: 1rem; }
.r6-progress { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.r6-count { font-size: .8rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.r6-cat {
  font-size: .85rem; font-weight: 700; color: var(--brand);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem;
}
.r6-question { margin: 0; font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
.r6-nav { display: flex; justify-content: center; }
.r6-nav .btn { min-width: 60%; }

/* ---------- Opzioni quiz (R3, R5, R6, R7) ---------- */
.quiz-options { display: flex; flex-direction: column; gap: .6rem; }
.quiz-option {
  display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left;
  padding: .8rem .9rem; font-size: 1rem; cursor: pointer;
  background: var(--surface); color: var(--text); border: 2px solid var(--border); border-radius: 12px;
}
.quiz-option:not(:disabled):hover { border-color: var(--brand); }
.quiz-option:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.quiz-option:disabled { cursor: default; }
.quiz-letter {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
  background: var(--surface-2); color: var(--text-dim);
}
.quiz-text { flex: 1 1 auto; }
.quiz-text.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .08em; }
.quiz-option.wrong { border-color: var(--ko); opacity: .65; }
.quiz-option.wrong .quiz-letter { background: var(--ko); color: #fff; }
.quiz-option.correct { border-color: var(--ok); background: var(--ok-bg); }
.quiz-option.correct .quiz-letter { background: var(--ok); color: #fff; }

/* ---------- Round 8: ordina toccando in sequenza ---------- */
.r8-hint { text-align: center; color: var(--text-dim); font-size: .9rem; margin: 0; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.rank-card {
  display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem;
  background: var(--surface); border: 2px solid var(--border); border-radius: 12px;
  user-select: none;
}
.rank-card.selectable { cursor: pointer; }
.rank-card.selectable:not(.selected):hover { border-color: var(--brand); }
.rank-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.rank-card.selected { border-color: var(--brand); }
.rank-card.locked { cursor: default; }
.rank-card.correct { border-color: var(--ok); background: var(--ok-bg); }
.rank-card.wrong { border-color: var(--ko); }
.pick-badge {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
  border: 2px dashed var(--border); color: var(--text-dim); background: transparent;
}
.rank-card.selected .pick-badge { border-style: solid; border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.rank-card.correct .pick-badge { border-color: var(--ok); background: var(--ok); color: #fff; }
.rank-card.wrong .pick-badge { border-color: var(--ko); background: var(--ko); color: #fff; }
.rank-body { flex: 1 1 auto; display: flex; flex-direction: column; }
.rank-city { font-weight: 600; }
.rank-country { color: var(--text-dim); font-size: .85rem; }
.rank-area { flex: 0 0 auto; color: var(--text-dim); font-variant-numeric: tabular-nums; font-weight: 600; }

.reveal-list:empty { display: none; }
.reveal-title { font-weight: 700; margin-bottom: .4rem; }
.reveal-ol { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: .3rem; }
.reveal-ol li { display: flex; justify-content: space-between; gap: .6rem; }
.reveal-area { color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ---------- Hint ---------- */
.hints { display: flex; flex-direction: column; gap: .4rem; }
.hint { background: var(--warn-bg); border: 1px solid var(--border); border-radius: 10px; padding: .5rem .8rem; font-size: .95rem; }

/* ---------- Lista tentativi ---------- */
.guess-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.guess-row {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: .5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem;
}
.guess-row.correct { background: var(--ok-bg); border-color: var(--ok); }
.guess-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guess-arrow { font-size: 1.15rem; display: inline-block; }
.guess-arrow.rot { transition: transform .2s; will-change: transform; }
.guess-compass { color: var(--text-dim); font-weight: 700; font-size: .85rem; min-width: 2.2ch; text-align: center; }
.guess-dist { font-variant-numeric: tabular-nums; color: var(--text-dim); min-width: 6ch; text-align: right; }

/* ---------- Input autocomplete ---------- */
.guess-input { position: relative; }
.city-input {
  width: 100%; padding: .8rem .9rem; font-size: 1.05rem;
  border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text);
}
.city-input:focus { outline: none; border-color: var(--brand); }
.suggestions {
  position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px);
  list-style: none; margin: 0; padding: .25rem; max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
}
.sugg {
  display: flex; justify-content: space-between; gap: .5rem; align-items: center;
  padding: .6rem .7rem; border-radius: 8px; cursor: pointer;
}
.sugg:hover, .sugg.active { background: var(--surface-2); }
.sugg-city { font-weight: 600; }
.sugg-country { color: var(--text-dim); font-size: .85rem; }

.guess-controls { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.attempts-left { color: var(--text-dim); font-size: .9rem; }

/* ---------- Bottoni ---------- */
.btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: .7rem 1.1rem; font-size: 1rem; font-weight: 600; border-radius: 12px; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }

.next-bar { display: flex; justify-content: center; padding-top: .4rem; }
.btn-next { min-width: 60%; padding: .9rem 1.2rem; font-size: 1.05rem; }

/* ---------- Notice / esito ---------- */
.notice { border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: .8rem 1rem; }
.notice.ok { background: var(--ok-bg); border-color: var(--ok); }
.notice.ko { background: var(--ko-bg); border-color: var(--ko); }
.notice.error { background: var(--ko-bg); border-color: var(--ko); }

/* ---------- Riepilogo ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.summary-title { margin: 0 0 .3rem; text-align: center; }
.summary-city { text-align: center; margin: .2rem 0; }
.summary-score { text-align: center; font-size: 1.15rem; margin: .5rem 0 .2rem; }
.summary-rating { text-align: center; font-size: 1.3rem; margin: 0 0 .3rem; color: var(--brand); }
.share-grid {
  text-align: center; line-height: 1.3;
  background: var(--surface-2); border-radius: 12px; padding: .8rem; margin: .8rem 0;
}
.share-title { font-weight: 700; }
.share-tiles { font-size: 1.4rem; letter-spacing: .1em; margin: .15rem 0; }
.share-streak { color: var(--text-dim); }
.sum-hint { text-align: center; color: var(--text-dim); font-size: .85rem; margin: .2rem 0 .4rem; }
.sum-list { list-style: none; margin: .5rem 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.sum-row {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: .6rem; align-items: center;
  width: 100%; text-align: left; padding: .55rem .6rem; cursor: pointer;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; font: inherit;
}
.sum-row:hover { border-color: var(--brand); }
.sum-row:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.sum-tile { font-size: 1.1rem; }
.sum-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-score { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.sum-chevron { color: var(--text-dim); font-size: 1.2rem; }
.summary-actions { display: flex; justify-content: center; margin-top: .8rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 9995;
  transform: translate(-50%, .6rem); max-width: 92vw; padding: .7rem 1.1rem; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; text-align: center; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- Modale revisione round ---------- */
.review-overlay { align-items: flex-start; padding: 1rem; overflow-y: auto; }
.review-modal {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); width: min(560px, 96vw);
  margin: auto; max-height: 90vh; display: flex; flex-direction: column;
}
.review-head {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .9rem 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface);
}
.review-title { font-weight: 700; }
.review-close {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 1rem;
}
.review-body { padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
/* Nel riepilogo la revisione è di sola lettura: neutralizza i controlli residui. */
.review-body .guess-controls, .review-body .next-bar, .review-body .r6-nav { display: none; }

/* R6: revisione compatta di tutte le 6 domande */
.r6-review { display: flex; flex-direction: column; gap: .9rem; }
.r6-review-q { border-top: 1px solid var(--border); padding-top: .7rem; }
.r6-review-q:first-child { border-top: none; padding-top: 0; }
.r6-review-cat { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.r6-mark { font-weight: 800; }
.r6-mark.ok { color: var(--ok); }
.r6-mark.ko { color: var(--ko); }
.r6-review-line { font-size: .95rem; }
.ok-text { color: var(--ok); }
.ko-text { color: var(--ko); }
.summary-note { text-align: center; color: var(--text-dim); font-size: .9rem; margin-top: .8rem; }

/* ---------- Footer ---------- */
.app-footer { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem 3rem; text-align: center; color: var(--text-dim); }
.stats { margin-bottom: .6rem; font-size: .95rem; }
.footer-links { display: flex; gap: .25rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.footer-links a, .cc-link { color: var(--brand); }
/* Area cliccabile di almeno 44 px anche se il testo è piccolo (:not([hidden]): "Preferenze cookie" resta nascosto). */
.footer-links a, .footer-links .cc-link:not([hidden]) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .5rem; }
.footer-note { font-size: .82rem; margin-top: .8rem; }

/* ---------- Pannello Modalità sviluppatore ---------- */
body.has-dev-panel { padding-bottom: 60px; }
.dev-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .5rem .8rem; background: #10151d; color: #e8eef6;
  border-top: 2px solid #f0b429; box-shadow: 0 -4px 16px rgba(0,0,0,.3);
}
.dev-badge { font-weight: 800; font-size: .8rem; color: #f0b429; letter-spacing: .05em; }
.dev-select {
  flex: 1 1 180px; min-width: 140px; max-width: 320px; padding: .4rem .5rem;
  border-radius: 8px; border: 1px solid #2b3a4f; background: #182231; color: #e8eef6; font: inherit;
}
.dev-btn {
  padding: .4rem .7rem; border-radius: 8px; border: 1px solid #2b3a4f; background: #182231; color: #e8eef6;
  font: inherit; font-weight: 600; cursor: pointer;
}
.dev-btn:hover { border-color: #f0b429; }
.dev-primary { background: #f0b429; color: #10151d; border-color: #f0b429; }
.dev-x { margin-left: auto; color: #ff8b82; }

/* ---------- Ad slot (vuoto in MVP) ---------- */
.ad-slot:empty { display: none; }

@media (min-width: 560px) {
  .round-title { font-size: 1.6rem; }
}

/* ---------- Banner di consenso (spento finché ADS_ENABLED è false, vedi js/consent.js) ---------- */
#cc-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9998}
#cc-banner{position:fixed;z-index:9999;left:50%;bottom:1rem;transform:translateX(-50%);
  width:min(680px,94vw);background:#fff;color:#1a1a1a;border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,.25);padding:1.25rem 1.4rem;font:15px/1.5 system-ui,sans-serif}
#cc-banner h2{font-size:1.15rem;margin:0 0 .5rem}
#cc-banner a{color:#6a2bff;text-decoration:underline}
.cc-row{display:flex;gap:.6rem;align-items:flex-start;padding:.5rem 0;border-top:1px solid #eee}
.cc-row input{margin-top:.2rem}
.cc-disabled span{color:#666}
.cc-actions{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:flex-end;margin-top:1rem}
.cc-btn{padding:.6rem 1.1rem;border-radius:9px;border:1px solid #6a2bff;cursor:pointer;font:inherit;font-weight:600}
.cc-btn-primary{background:#6a2bff;color:#fff}
.cc-btn-ghost{background:#fff;color:#6a2bff}
.cc-btn:focus-visible{outline:3px solid #c9b6ff;outline-offset:2px}
.cc-link{background:none;border:none;color:inherit;text-decoration:underline;cursor:pointer;font:inherit}
@media(max-width:480px){.cc-actions{justify-content:stretch}.cc-btn{flex:1 1 auto}}
