/* ============================================================================
   04 · Gioco a premi — energico e pieno di feedback.

   Tutto è un blocco ciccione: bordo nero di due pixel, ombra dura sotto, angoli
   generosi. Il rosa fa da premio, il giallo da moneta. Nessuna sfumatura, nessun
   grigio: solo cose che sembrano premere.  Mockup: blocco #04.
   ========================================================================= */

html[data-theme="premi"] {
  --bg: #faf7f2;
  --ink: #191622;
  --ink-2: #6d6878;
  --ink-3: #a49cb4;
  --line: #cfc8d8;
  --surface: #fff;
  --surface-ink: #191622;

  --accent: #ec407a;
  --accent-ink: #fff;
  --ok: #ffdf5e;
  --ok-ink: #191622;
  --warn: #fff;
  --warn-ink: #191622;
  --locked: #f2eff6;
  --locked-ink: #8b8399;
  --hint-locked: #fff;

  --lvl-bg: #faf7f2;
  --lvl-ink: #191622;
  --right-bg: #faf7f2;
  --right-ink: #191622;
  --wrong-bg: #faf7f2;
  --wrong-ink: #191622;
  --ask-bg: #faf7f2;
  --ask-ink: #191622;
  --full-bg: #faf7f2;
  --full-ink: #191622;

  --conf-1: #ec407a;
  --conf-2: #ffdf5e;
  --conf-3: #191622;
  --conf-4: #f2ecfa;

  --font: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-mono: 'Bricolage Grotesque', system-ui, sans-serif;
  --tt-display: none;
  --tt-label: uppercase;
  --ls-display: -.03em;
  --ls-label: .14em;
  --w-display: 800;
  --w-label: 700;

  --fs-huge: 46px;
  --fs-title: 29px;
  --fs-lead: 25px;
  --fs-body: 17px;
  --fs-small: 16px;
  --fs-label: 13px;

  --r: 20px;
  --r-lg: 26px;
  --r-pill: 999px;
  --bd: 2px;
  --bd-color: #191622;
  --shadow: 0 4px 0 #191622;

  --pad: 22px;
  --head-top: 26px;
  --gap: 10px;
  --gap-block: 16px;
  --block-pad: 17px 19px;
  --btn-pad: 15px;

  --ico-fav: 27px;
}

/* --- la tab bar galleggia: una barra scura con la pastiglia gialla --- */

html[data-theme="premi"] .app.has-tabs .tabbar {
  border: 0;
  margin: 0 18px 30px;
  padding: 10px;
  border-radius: 22px;
  background: #191622;
  color: #faf7f2;
  gap: 8px;
}

/* la barra è scura: le icone vanno schiarite, o spariscono sul fondo */
html[data-theme="premi"] .tabbar__item { padding: 15px 0; border-radius: 15px; color: #faf7f2; opacity: .75; }
html[data-theme="premi"] .tabbar__item.is-on { background: #ffdf5e; color: #191622; opacity: 1; }

html[data-theme="premi"] .head__title { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
html[data-theme="premi"] .brand__name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; text-transform: lowercase; }
html[data-theme="premi"] .mark i:nth-child(2) { background: #ec407a; }

html[data-theme="premi"] .head__back {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #6d6878;
}

html[data-theme="premi"] .head__back::before { content: '← '; }
html[data-theme="premi"] .head__back[data-racc] span { display: none; }
html[data-theme="premi"] .head__back[data-racc]::after { content: attr(data-racc); }

html[data-theme="premi"] .coins {
  background: #ffdf5e;
  border: 2px solid #191622;
  box-shadow: 0 3px 0 #191622;
  color: #191622;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 17px;
  font-weight: 800;
}

html[data-theme="premi"] .coins::before { content: '🪙 '; }
html[data-theme="premi"] .ico--fav[aria-pressed="true"] { color: #ec407a; }

/* --- home: il richiamo rosa, i due contatori, l'elenco --- */

html[data-theme="premi"] .tally {
  padding: 12px 16px;
  border-radius: 20px;
  background: #fff;
  border: 2px solid #191622;
  box-shadow: 0 4px 0 #191622;
  align-self: stretch;
}

html[data-theme="premi"] .tally__n { font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
html[data-theme="premi"] .tally__label { padding-top: 0; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #6d6878; }

html[data-theme="premi"] .resume {
  order: -1;
  background: #ec407a;
  color: #fff;
  border: 2px solid #191622;
  box-shadow: 0 5px 0 #191622;
  border-radius: 26px;
  padding: 18px;
}

html[data-theme="premi"] .resume__where { font-size: 13px; font-weight: 700; letter-spacing: .14em; opacity: .85; }
html[data-theme="premi"] .resume__text { font-size: 25px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }

html[data-theme="premi"] .resume__cta {
  background: #fff;
  color: #ec407a;
  border: 2px solid #191622;
  border-radius: 16px;
  padding: 11px 20px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

html[data-theme="premi"] .resume__cta::after { content: ' →'; }

html[data-theme="premi"] .colls { grid-template-columns: 1fr; gap: 7px; }

html[data-theme="premi"] .colls::before {
  content: 'Raccolte';
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6d6878;
}

html[data-theme="premi"] .coll {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid #191622;
  color: #191622;
}

html[data-theme="premi"] .coll:nth-child(5) { grid-column: auto; }

html[data-theme="premi"] .coll::before {
  content: attr(data-n);
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #ffdf5e;
  border: 2px solid #191622;
  font-size: 14px;
  font-weight: 800;
}

html[data-theme="premi"] .coll[data-state="locked"] {
  background: #f2eff6;
  border: 2px dashed #cfc8d8;
  color: #8b8399;
}

html[data-theme="premi"] .coll[data-state="locked"]::before { content: '🔒'; background: #e8e3ef; border: 0; font-size: 15px; }
html[data-theme="premi"] .coll__meta { display: contents; }
html[data-theme="premi"] .coll__name { order: 1; flex: 1; font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; }
html[data-theme="premi"] .coll__name::after { content: none; }
html[data-theme="premi"] .coll__count { order: 2; font-size: 14px; font-weight: 700; color: #6d6878; letter-spacing: 0; }
html[data-theme="premi"] .coll[data-state="done"] .coll__count::after { content: ' ✓'; }
html[data-theme="premi"] .coll__state { display: none; }

/* --- raccolta: nove blocchi per schermata --- */

html[data-theme="premi"] .scr__title { font-size: 38px; font-weight: 800; letter-spacing: -.03em; }
html[data-theme="premi"] .scr__title[data-n] .scr__title-a,
html[data-theme="premi"] .scr__title[data-n] .scr__title-b { display: none; }
html[data-theme="premi"] .scr__title[data-n]::after { content: 'Raccolta ' attr(data-n); }
html[data-theme="premi"] .scr__sub { font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #6d6878; }

html[data-theme="premi"] .cells { grid-template-columns: repeat(3, 1fr); gap: 14px; }

html[data-theme="premi"] .cell {
  flex-direction: column;
  gap: 2px;
  border-radius: 20px;
  background: #fff;
  border: 2px solid #191622;
  box-shadow: 0 4px 0 #191622;
  font-size: 24px;
  font-weight: 800;
  color: #191622;
}

html[data-theme="premi"] .cell[data-state="solved"] { background: #ffdf5e; }
html[data-theme="premi"] .cell[data-state="solved"]::after { content: '✓'; font-size: 16px; }
html[data-theme="premi"] .cell[data-state="skipped"] { background: #fff; box-shadow: none; }
html[data-theme="premi"] .cell[data-state="skipped"]::after { content: 'saltato'; font-size: 11px; font-weight: 700; color: #6d6878; text-transform: uppercase; }

html[data-theme="premi"] .cell[data-state="current"] {
  grid-column: auto;
  aspect-ratio: 1;
  background: #ec407a;
  color: #fff;
  font-size: 26px;
}

html[data-theme="premi"] .cell[data-state="current"]::after { content: 'ora'; font-size: 11px; font-weight: 700; text-transform: uppercase; }

html[data-theme="premi"] .cell[data-state="locked"] {
  background: #fff;
  border: 2px dashed #cfc8d8;
  box-shadow: none;
  color: #b6aec4;
}

html[data-theme="premi"] .cell[data-state="locked"] .cell__n { font-size: 0; }
html[data-theme="premi"] .cell[data-state="locked"] .cell__n::after { content: '🔒'; font-size: 20px; }
html[data-theme="premi"] .cell__fav::before { content: '★'; color: #ec407a; font-size: 20px; }

/* --- enigma: l'enunciato in una carta bianca --- */

html[data-theme="premi"] .app[data-scr="livello"] .scr__body { padding-top: 22px; }

html[data-theme="premi"] .riddle__meta {
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
}


html[data-theme="premi"] .riddle__meta span {
  border: 1px solid #191622;
  border-radius: 999px;
  padding: 5px 11px;
}

html[data-theme="premi"] .riddle__meta span:first-child { background: #ffdf5e; }

html[data-theme="premi"] .riddle__text {
  background: #fff;
  border: 2px solid #191622;
  box-shadow: 0 5px 0 #191622;
  border-radius: 26px;
  padding: 24px 22px;
  font-weight: 600;
  line-height: 1.28;
}

/* Uno sotto l'altro come negli altri nove temi: affiancati, il testo di un
   indizio finiva in colonne strette e non si leggeva. Il centrato resta ai soli
   indizi da comprare — due parole e un prezzo, dove non ostacola la lettura —
   mentre quelli aperti tornano allineati a sinistra come da `app.css`. */
html[data-theme="premi"] .hints { gap: 10px; }

html[data-theme="premi"] .hint {
  flex: 0 0 auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ec407a;
  color: #fff;
  border: 2px solid #191622;
}

html[data-theme="premi"] .hint[data-state="locked"] {
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  background: #fff;
  color: #191622;
}
/* Qui la riga di un indizio sta in colonna. Con la manopola a scorrimento in
   testa deve tornare in riga: in colonna la manopola diventa una fascia larga
   quanto la scheda, e non si capisce più che si trascina di lato. */
html[data-theme="premi"] .hint[data-state="locked"].slide {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
}

html[data-theme="premi"] .hint__label { font-size: 13px; font-weight: 800; letter-spacing: 0; }
html[data-theme="premi"] .hint__text { font-size: 15px; font-weight: 500; line-height: 1.4; }
html[data-theme="premi"] .hint__cost { font-size: 11px; font-weight: 700; color: #6d6878; }
html[data-theme="premi"] .hint__cost::before { content: '🪙 '; }

html[data-theme="premi"] .option {
  background: #fff;
  border: 2px solid #191622;
  box-shadow: 0 4px 0 #191622;
  border-radius: 18px;
  font-weight: 700;
}

html[data-theme="premi"] .app[data-scr="livello"] .scr__foot { padding: 16px 18px max(24px, var(--safe-b)); gap: 10px; }
html[data-theme="premi"] .answer { border: 0; gap: 10px; }

html[data-theme="premi"] .answer__input {
  background: #fff;
  border: 2px solid #191622;
  border-radius: 18px;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #191622;
}

html[data-theme="premi"] .answer__input::placeholder { color: #a49cb4; }

html[data-theme="premi"] .answer__send {
  width: 60px;
  background: #ec407a;
  color: #fff;
  border: 2px solid #191622;
  box-shadow: 0 4px 0 #191622;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 800;
}

html[data-theme="premi"] .answer__send::before { content: '→'; }

html[data-theme="premi"] .skip {
  background: none;
  color: #191622;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  padding: 0;
}

/* --- esiti --- */

html[data-theme="premi"] .verdict { gap: 10px; padding-top: 20px; }
html[data-theme="premi"] .verdict__word { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.02; color: #191622; text-transform: uppercase; }
html[data-theme="premi"] .verdict__line { order: -1; font-size: 13px; font-weight: 700; letter-spacing: .14em; color: #6d6878; }

html[data-theme="premi"] .reward,
html[data-theme="premi"] .solution {
  background: #ec407a;
  color: #fff;
  border: 2px solid #191622;
  box-shadow: 0 5px 0 #191622;
  border-radius: 22px;
  padding: 17px 19px;
}

html[data-theme="premi"] .why,
html[data-theme="premi"] .unlocked,
html[data-theme="premi"] .app[data-scr="sbagliato"] .reward {
  background: #fff;
  color: #191622;
  border: 2px solid #191622;
  box-shadow: 0 4px 0 #191622;
  border-radius: 20px;
  padding: 17px 19px;
}

html[data-theme="premi"] .app[data-scr="salto"] .reward {
  background: #f2ecfa;
  color: #191622;
  border: 2px solid #cfc8d8;
  box-shadow: none;
}

html[data-theme="premi"] .reward__label,
html[data-theme="premi"] .why__label,
html[data-theme="premi"] .solution__label,
html[data-theme="premi"] .unlocked__label,
html[data-theme="premi"] .themerow__label,
html[data-theme="premi"] .fav__where,
html[data-theme="premi"] .stat__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6d6878;
  opacity: 1;
}

html[data-theme="premi"] .reward .reward__label,
html[data-theme="premi"] .solution .solution__label { color: rgba(255, 255, 255, .82); }

html[data-theme="premi"] .reward__value,
html[data-theme="premi"] .solution__value,
html[data-theme="premi"] .unlocked__value,
html[data-theme="premi"] .stat__value,
html[data-theme="premi"] .themerow__name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.02;
}

html[data-theme="premi"] .why__text,
html[data-theme="premi"] .reward__note,
html[data-theme="premi"] .ask__text { font-size: 16px; font-weight: 500; line-height: 1.45; color: #4a4556; opacity: 1; }
html[data-theme="premi"] .app[data-scr="sbagliato"] .reward__note { color: #4a4556; }

html[data-theme="premi"] .more {
  background: #f2ecfa;
  border: 2px solid #cfc8d8;
  border-radius: 20px;
  padding: 17px 19px;
  color: #6d6878;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
}

html[data-theme="premi"] .app[data-scr="fatto"] .hint,
html[data-theme="premi"] .app[data-scr="giusto"] .hint {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: #f2ecfa;
  color: #191622;
  border: 2px solid #cfc8d8;
  border-radius: 20px;
  padding: 17px 19px;
}

html[data-theme="premi"] .app[data-scr="fatto"] .hint__label,
html[data-theme="premi"] .app[data-scr="giusto"] .hint__label { color: #6d6878; letter-spacing: .14em; }

html[data-theme="premi"] .ask__title,
html[data-theme="premi"] .done__title {
  flex-direction: row;
  flex-wrap: wrap;
  gap: .28em;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
}

html[data-theme="premi"] .done__sub { font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #6d6878; }

/* --- preferiti, profilo, negozio --- */

html[data-theme="premi"] .fav,
html[data-theme="premi"] .stat,
html[data-theme="premi"] .account,
html[data-theme="premi"] .empty {
  background: #fff;
  color: #191622;
  border: 2px solid #191622;
  box-shadow: 0 4px 0 #191622;
  border-radius: 20px;
  padding: 17px 19px;
}
html[data-theme="premi"] .account { background: var(--accent); color: var(--accent-ink); }

html[data-theme="premi"] .fav[data-state="skipped"] { background: #ec407a; color: #fff; box-shadow: 0 5px 0 #191622; border-radius: 22px; }
html[data-theme="premi"] .fav[data-state="skipped"] .fav__where { color: rgba(255, 255, 255, .82); }
html[data-theme="premi"] .fav__title { font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: 0; text-transform: none; }

html[data-theme="premi"] .stat[data-tone="accent"] { background: #ec407a; color: #fff; box-shadow: 0 5px 0 #191622; border-radius: 22px; }
html[data-theme="premi"] .stat[data-tone="accent"] .stat__label { color: rgba(255, 255, 255, .82); }
html[data-theme="premi"] .stat__value { font-size: 32px; display: block; padding-bottom: 8px; }

html[data-theme="premi"] .themerow {
  background: #f2ecfa;
  border: 2px solid #cfc8d8;
  border-radius: 20px;
  padding: 17px 19px;
}

html[data-theme="premi"] .themerow__name { font-size: 22px; }

html[data-theme="premi"] .themerow__cta {
  background: #fff;
  color: #191622;
  border: 2px solid #191622;
  border-radius: 18px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

html[data-theme="premi"] .account__name { font-size: 17px; font-weight: 600; letter-spacing: 0; }
html[data-theme="premi"] .shop { gap: 6px; }
html[data-theme="premi"] .scr__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: #6d6878; }
html[data-theme="premi"] .tdesc { font-size: 16px; font-weight: 500; line-height: 1.45; color: #4a4556; }
html[data-theme="premi"] .credits { font-size: 12px; font-weight: 500; color: #8b8399; }

/* --- pulsanti: tutti premibili --- */

html[data-theme="premi"] .btn {
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  border: 2px solid #191622;
}

html[data-theme="premi"] .btn--primary,
html[data-theme="premi"] .btn--go { background: #ec407a; color: #fff; box-shadow: 0 4px 0 #191622; }
html[data-theme="premi"] .btn--ghost,
html[data-theme="premi"] .btn--inert { background: #fff; color: #191622; font-weight: 700; font-size: 16px; }
html[data-theme="premi"] .btn--off { background: #f2eff6; border-color: #cfc8d8; color: #b6aec4; }
html[data-theme="premi"] .btn:active { transform: translateY(3px); box-shadow: none; }
html[data-theme="premi"] .btn[data-arrow="avanti"]::after { content: ' →'; }
html[data-theme="premi"] .btn[data-arrow="indietro"]::before { content: '← '; }

/* ============================================================================
   Anteprima nel negozio — fuori dallo scope del tema: è la vetrina.
   ========================================================================= */

.tpv--premi {
  border-radius: 16px;
  background: #faf7f2;
  border: 2px solid #191622;
  box-shadow: 0 3px 0 #191622;
  color: #191622;
}

.tpv--premi .tpv__num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 11px;
  font-weight: 800;
  background: #191622;
  color: #faf7f2;
  border-radius: 999px;
  padding: 3px 9px;
}

.tpv--premi .tpv__name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpv--premi .tpv__tag {
  background: #ffdf5e;
  border: 2px solid #191622;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #191622;
  white-space: nowrap;
}

.tpv--premi.tpv--card {
  border-radius: 24px;
  border: 3px solid #191622;
  box-shadow: 0 6px 0 #191622;
  padding: 20px;
}

.tpv--premi.tpv--card .tpv__num { font-size: 12px; padding: 4px 11px; }
.tpv--premi.tpv--card .tpv__name { font-size: 34px; line-height: 1; letter-spacing: -.03em; white-space: normal; }
.tpv--premi.tpv--card .tpv__tag { font-size: 14px; padding: 8px 15px; }
.tpv--premi.tpv--card[data-state="posseduto"] .tpv__tag,
.tpv--premi.tpv--card[data-state="attivo"] .tpv__tag { background: #faf7f2; }
