/* Poker Odds — tavolo verde scuro con dettagli oro. Un solo foglio di stile. */
:root {
  --feltro: #0b2f22;
  --feltro-2: #0f3d2c;
  --feltro-3: #14503a;
  --riga: rgba(217, 180, 90, .28);
  --oro: #e2bd62;
  --oro-2: #f3dc9a;
  --testo: #f4efe1;
  --testo-2: #c9d6cc;
  --ok: #7fe0a0;
  --no: #ff9a8a;
  --blu: #8fc2ff;
  --carta: #ffffff;
  --ombra: 0 10px 30px rgba(0, 0, 0, .35);
  --raggio: 14px;
  --seme-0: #111417; --seme-1: #d21f2b; --seme-2: #1463d6; --seme-3: #128a3a;
  --f-titoli: Georgia, 'Times New Roman', serif;
  --f-testo: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
body[data-tema="chiaro"] {
  --feltro: #f3efe2;
  --feltro-2: #fffdf6;
  --feltro-3: #e9e3d0;
  --riga: rgba(20, 80, 58, .28);
  --oro: #0f5a3e;
  --oro-2: #0b3f2c;
  --testo: #16211b;
  --testo-2: #45564c;
  --ok: #0f7a3c;
  --no: #b3261e;
  --blu: #0f4fa8;
  --ombra: 0 8px 24px rgba(20, 60, 40, .16);
}
body.due-colori { --seme-2: #d21f2b; --seme-3: #111417; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--testo);
  font: 17px/1.5 var(--f-testo);
  background: var(--feltro);
  background-image: radial-gradient(1200px 700px at 50% -10%, var(--feltro-3), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--oro); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-titoli); color: var(--oro-2); line-height: 1.15; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin-top: 2.2rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 .8rem; }
.sotto { color: var(--testo-2); font-size: 1.05rem; max-width: 62rem; }
.nota { color: var(--testo-2); font-size: .9rem; }
.num { font-variant-numeric: tabular-nums; }
abbr { text-decoration: underline dotted; cursor: help; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; border-radius: 6px; }

/* ---- testata ---- */
.testa {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem;
  padding: .8rem clamp(1rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--riga);
}
.marchio { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--testo); font: 700 1.5rem/1 var(--f-titoli); }
.marchio svg { width: 1.7rem; height: 1.7rem; fill: var(--oro); }
.marchio b { color: var(--oro); }
.testa__motto { margin: 0; color: var(--testo-2); font-size: .95rem; flex: 1 1 16rem; }
.testa__scelte { display: flex; gap: .5rem; flex-wrap: wrap; }
.testa__scelte button, .tasto {
  border: 1px solid var(--riga); background: transparent; border-radius: 999px; padding: .45rem .95rem; cursor: pointer; font-size: .92rem;
}
.testa__scelte button:hover, .tasto:hover { border-color: var(--oro); }
.tasto--pieno { background: var(--oro); color: #10261c; border-color: var(--oro); font-weight: 700; }
body[data-tema="chiaro"] .tasto--pieno { color: #fff; }
.tasto[aria-pressed="true"], .gruppo button[aria-pressed="true"] { background: var(--oro); color: #10261c; border-color: var(--oro); font-weight: 700; }
body[data-tema="chiaro"] .tasto[aria-pressed="true"], body[data-tema="chiaro"] .gruppo button[aria-pressed="true"] { color: #fff; }

/* ---- telaio: menu a sinistra su schermo largo, in riga che scorre su telefono ---- */
.telaio { display: grid; grid-template-columns: minmax(0, 1fr); }
.menu { display: flex; gap: .4rem; overflow-x: auto; padding: .7rem clamp(1rem, 3vw, 2.2rem); border-bottom: 1px solid var(--riga); scrollbar-width: thin; }
.menu a {
  flex: 0 0 auto; text-decoration: none; color: var(--testo); padding: .5rem .85rem; border-radius: 999px; border: 1px solid transparent; font-size: .95rem; white-space: nowrap;
}
.menu a small { color: var(--oro); font-weight: 700; margin-right: .35rem; }
.menu a:hover { border-color: var(--riga); }
.menu a[aria-current="page"] { background: var(--feltro-2); border-color: var(--oro); }
.vista { padding: clamp(1.1rem, 2.6vw, 2.4rem) clamp(1rem, 3vw, 2.6rem) 3rem; min-width: 0; outline: none; }
@media (min-width: 64rem) {
  .telaio { grid-template-columns: 15.5rem minmax(0, 1fr); align-items: start; }
  .menu { flex-direction: column; overflow: visible; border-bottom: 0; border-right: 1px solid var(--riga); padding: 1.4rem .9rem; position: sticky; top: 0; min-height: calc(100vh - 4.2rem); }
  .menu a { white-space: normal; border-radius: 10px; }
}

/* ---- pannelli ---- */
.pannello { background: var(--feltro-2); border: 1px solid var(--riga); border-radius: var(--raggio); padding: clamp(.9rem, 1.6vw, 1.4rem); box-shadow: var(--ombra); }
.griglia { display: grid; gap: clamp(.8rem, 1.4vw, 1.3rem); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14.5rem), 1fr)); }
.affianco { display: grid; gap: clamp(1rem, 2vw, 1.8rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 72rem) { .affianco { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }
.grande { font: 700 clamp(2rem, 4vw, 3rem)/1 var(--f-titoli); color: var(--oro-2); font-variant-numeric: tabular-nums; }
.etichetta { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--testo-2); }

/* ---- carte ---- */
.carta { width: var(--c, 3.4rem); height: auto; flex: 0 0 auto; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
.carta__fondo { fill: var(--carta); stroke: #c9c3b0; stroke-width: 2; }
.carta__val { font: 700 64px/1 Georgia, 'Times New Roman', serif; text-anchor: middle; }
.s0 { fill: var(--seme-0); } .s1 { fill: var(--seme-1); } .s2 { fill: var(--seme-2); } .s3 { fill: var(--seme-3); }
.carta--vuota .carta__fondo { fill: transparent; stroke: var(--riga); stroke-dasharray: 8 6; }
.carta--spenta { opacity: .28; }
.mano { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.mano--piccola { --c: 2.3rem; } .mano--mini { --c: 1.65rem; gap: .18rem; } .mano--grande { --c: 4.4rem; }
.mano .stacco { width: .7rem; }

/* ---- barre e torte ---- */
.barra { height: .85rem; border-radius: 999px; background: rgba(127, 127, 127, .25); overflow: hidden; display: flex; }
.barra i { display: block; height: 100%; background: var(--oro); }
.barra i.b { background: var(--blu); } .barra i.p { background: #9aa39d; } .barra i.r { background: var(--no); } .barra i.v { background: var(--ok); }
.barra--alta { height: 1.5rem; }
.riga-barra { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 4.6rem; gap: .6rem; align-items: center; margin: .28rem 0; }
.riga-barra .num { text-align: right; font-weight: 700; }
.torta { width: 5.2rem; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--oro) calc(var(--p) * 1%), rgba(127, 127, 127, .28) 0); display: grid; place-items: center; flex: 0 0 auto; }
.torta::after { content: ''; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--feltro-2); }

/* ---- tabelle ---- */
.scorri { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: .5rem .6rem; text-align: right; border-bottom: 1px solid var(--riga); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--oro-2); font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; position: sticky; top: 0; background: var(--feltro-2); }
tbody tr:hover { background: rgba(127, 127, 127, .1); }
td.forte { font-weight: 700; color: var(--oro-2); }

/* ---- classifica delle mani ---- */
.punto { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .3rem .9rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--riga); }
.punto:last-child { border-bottom: 0; }
.punto__n { font: 700 1.5rem/1 var(--f-titoli); color: var(--oro); text-align: center; }
.punto__dati { display: grid; gap: .25rem 1.2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); grid-column: 2; }

/* ---- fasi e posizioni ---- */
.fasi { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.fase { border: 1px dashed var(--riga); border-radius: 12px; padding: .8rem; }
.tavolo { width: 100%; max-width: 34rem; height: auto; display: block; margin: 0 auto; }
.tavolo .panno { fill: var(--feltro-3); stroke: var(--oro); stroke-width: 5; }
.tavolo text { fill: var(--testo); font: 700 15px var(--f-testo); text-anchor: middle; }
.tavolo .posto { fill: var(--feltro-2); stroke: var(--riga); stroke-width: 2; }
.tavolo .posto--bottone { stroke: var(--oro); stroke-width: 4; }

/* ---- griglia 13x13 ---- */
.g13 { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 2px; max-width: 46rem; user-select: none; }
.g13 button {
  aspect-ratio: 1; border: 0; padding: 0; border-radius: 4px; cursor: pointer; color: #0c1a13; background: hsl(var(--h, 150) 55% var(--l, 30%));
  font: 700 clamp(.56rem, 2.35vw, .95rem)/1 var(--f-testo); letter-spacing: -.02em; display: grid; place-items: center; min-width: 0;
}
.g13 button.coppia { outline: 1px solid rgba(255, 255, 255, .55); outline-offset: -1px; }
.g13 button[aria-pressed="true"] { outline: 3px solid #fff; outline-offset: -3px; }
.g13 button.fuori { background: rgba(127, 127, 127, .18); color: var(--testo-2); }
.g13 button.dentro { background: var(--oro); color: #10261c; }
.legenda { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--testo-2); margin-top: .6rem; }
.legenda i { flex: 1; max-width: 14rem; height: .7rem; border-radius: 999px; background: linear-gradient(90deg, hsl(205 55% 30%), hsl(150 55% 42%), hsl(48 80% 60%)); }
.gruppo { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 1rem; }
.gruppo button { border: 1px solid var(--riga); background: transparent; border-radius: 8px; padding: .4rem .7rem; cursor: pointer; min-width: 2.6rem; }

/* ---- schede con disegno ---- */
.scheda h3 { margin-bottom: .6rem; }
.scheda .mano { margin-bottom: .7rem; }
.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .6rem; align-items: center; }
.vs > div:last-child { text-align: right; } .vs > div:last-child .mano { justify-content: flex-end; }
.vs b.contro { font: 700 1rem var(--f-titoli); color: var(--testo-2); }
.vs .mano { --c: 3rem; flex-wrap: nowrap; }
.vs .grande { font-size: clamp(1.5rem, 2.3vw, 2.1rem); margin-top: .35rem; }
.quiz .vs .mano { --c: 3.6rem; }

/* ---- moduli ---- */
.campi { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin: .8rem 0; }
label.campo { display: grid; gap: .25rem; font-size: .88rem; color: var(--testo-2); }
input[type="number"], select {
  font: 700 1.15rem var(--f-testo); padding: .5rem .6rem; border-radius: 10px; border: 1px solid var(--riga); background: var(--feltro); color: var(--testo); width: 100%;
}
input[type="range"] { width: 100%; accent-color: var(--oro); }
.esito { border-radius: 12px; padding: .8rem 1rem; border: 2px solid var(--riga); margin-top: .6rem; }
.esito--si { border-color: var(--ok); } .esito--no { border-color: var(--no); }
.esito b { font-size: 1.2rem; }

/* ---- calcolatore ---- */
.posti { display: grid; gap: .7rem; }
.posto-g { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; border: 1px solid var(--riga); border-radius: 12px; padding: .7rem; }
.posto-g.attivo { border-color: var(--oro); box-shadow: 0 0 0 2px var(--oro) inset; }
.posto-g header { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.buca { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 8px; }
.buca.scelta .carta { outline: 3px solid var(--oro); outline-offset: 2px; border-radius: 8px; }
.mazzo { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; max-width: 46rem; }
.mazzo button { border: 0; background: none; padding: 0; cursor: pointer; min-width: 0; }
.mazzo .carta { width: 100%; filter: none; }
.mazzo button:disabled { opacity: .22; cursor: default; }
.avanza { height: .5rem; border-radius: 999px; background: rgba(127, 127, 127, .25); overflow: hidden; margin: .6rem 0; }
.avanza i { display: block; height: 100%; width: 0; background: var(--oro); transition: width .15s; }

/* ---- quiz ---- */
.quiz { max-width: 60rem; }
.risposte { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); margin: 1rem 0; }
.risposte button { border: 2px solid var(--riga); background: var(--feltro); border-radius: 12px; padding: .9rem .8rem; cursor: pointer; font-size: 1.15rem; font-weight: 700; }
.risposte button:hover:not(:disabled) { border-color: var(--oro); }
.risposte button.giusta { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 22%, transparent); }
.risposte button.sbagliata { border-color: var(--no); background: color-mix(in srgb, var(--no) 22%, transparent); }
.punteggio { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; align-items: baseline; margin-bottom: .8rem; }
.scatole { display: flex; gap: .35rem; align-items: flex-end; height: 4.2rem; }
.scatole div { flex: 1; background: var(--oro); border-radius: 6px 6px 0 0; min-height: 3px; position: relative; opacity: .85; }
.scatole div span { position: absolute; top: -1.3rem; left: 0; right: 0; text-align: center; font-size: .8rem; }

/* ---- glossario ---- */
.voci { columns: 22rem; column-gap: 2rem; }
.voci div { break-inside: avoid; margin: 0 0 .9rem; }
.voci dt { font-weight: 700; color: var(--oro-2); }
.voci dd { margin: 0; color: var(--testo-2); }
.attesa { color: var(--testo-2); }

/* ---- piede ---- */
.piede { border-top: 1px solid var(--riga); padding: 1.2rem clamp(1rem, 3vw, 2.6rem) 2rem; color: var(--testo-2); font-size: .9rem; }
.piede p { margin: 0 0 .4rem; max-width: 70rem; }
.piede__firma { margin-top: .7rem !important; }

@media (max-width: 30rem) {
  body { font-size: 16px; }
  .riga-barra { grid-template-columns: 5.2rem minmax(0, 1fr) 4rem; }
  .mano { --c: 2.9rem; } .mano--grande { --c: 3.6rem; } .mano--piccola { --c: 2rem; } .mano--mini { --c: 1.45rem; }
  th, td { padding: .45rem .4rem; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- stampa: solo il foglio A4 ---- */
@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff !important; color: #000; font-size: 8pt; line-height: 1.3; --testo: #000; --testo-2: #333; --oro: #000; --oro-2: #000; --riga: #999; --feltro-2: #fff; --feltro: #fff; }
  .testa, .menu, .piede, .non-stampa { display: none !important; }
  .telaio { display: block; } .vista { padding: 0; }
  .pannello { box-shadow: none; border: 0; padding: 0; }
  .foglio { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
  .foglio h3 { font-size: 9.5pt; margin: 0 0 1mm; }
  .foglio h3[style] { margin-top: 2.5mm !important; }
  th, td { padding: .55mm 1.2mm; font-size: 7.6pt; }
  .foglio .nota { font-size: 7pt; }
  .foglio p { margin: 0 0 1.5mm; }
  h2 { font-size: 13pt; margin: 0 0 2mm; }
  thead th { position: static; background: #eee; }
  .carta { filter: none; }
}

/* ---- schede del glossario (finestra) ---- */
.voce { all: unset; cursor: pointer; font-weight: 700; color: var(--oro-2); display: inline-flex; align-items: baseline; gap: .35rem; border-bottom: 1px dashed var(--riga); padding: .1rem 0; }
.voce span { color: var(--oro); font-size: 1.1em; transition: transform .15s; }
.voce:hover, .voce:focus-visible { color: var(--oro); border-bottom-color: var(--oro); }
.voce:hover span { transform: translateX(3px); }
.voce:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; border-radius: 4px; }
html.scheda-aperta { overflow: hidden; }
dialog.scheda { border: 1px solid var(--oro); border-radius: 18px; padding: 0; background: var(--feltro-2); color: var(--testo); width: min(46rem, calc(100vw - 1.5rem)); max-width: none; max-height: min(92dvh, 60rem); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; }
dialog.scheda::backdrop { background: rgba(4, 18, 12, .78); backdrop-filter: blur(3px); }
dialog.scheda[open] { animation: scheda-su .22s ease-out; }
@keyframes scheda-su { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.scheda__dentro { display: flex; flex-direction: column; max-height: min(92dvh, 60rem); }
.scheda__testa { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem .9rem; border-bottom: 1px solid var(--riga); background: linear-gradient(180deg, var(--feltro-3), var(--feltro-2)); }
.scheda__testa h2 { margin: .2rem 0 0; font-size: clamp(1.5rem, 4vw, 2rem); }
.scheda__chiudi { flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--riga); background: var(--feltro); color: var(--testo); font-size: 1.1rem; cursor: pointer; }
.scheda__chiudi:hover { border-color: var(--oro); color: var(--oro); }
.scheda__corpo { padding: 1.1rem 1.3rem; overflow-y: auto; overscroll-behavior: contain; }
.scheda__corpo p { margin: 0 0 .8rem; }
.scheda__breve { font: 700 1.15rem/1.4 var(--f-titoli); color: var(--oro-2); }
.scheda__esempio { border-left: 4px solid var(--oro); background: var(--feltro); border-radius: 0 12px 12px 0; padding: .75rem 1rem; margin: 1rem 0; }
.scheda__esempio p { margin: .25rem 0 0; }
.scheda__vai { margin: 1rem 0 0 !important; }
.scheda__piede { display: flex; justify-content: space-between; gap: .6rem; padding: .8rem 1.3rem calc(.8rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--riga); background: var(--feltro); }
.scheda__piede .tasto { min-width: 0; max-width: 48%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fig { margin: 1rem 0; padding: .9rem; border: 1px solid var(--riga); border-radius: 14px; background: var(--feltro-3); }
.fig figcaption { margin-top: .6rem; color: var(--testo-2); font-size: .92rem; }
.fig .scorri, .fig table { margin: 0; }
.fig__riga { display: grid; gap: .3rem; margin-bottom: .7rem; } .fig__riga:last-of-type { margin-bottom: 0; }
.fig__fianco { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; } .fig__fianco .grande { display: block; margin-top: .35rem; }
.fig .torta::after { background: var(--feltro-3); }
.combo { display: flex; flex-wrap: wrap; gap: .45rem .8rem; }
.duello { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.duello > div { display: grid; gap: .3rem; justify-items: start; } .duello > div:last-child { justify-items: end; }
.duello b { font: 700 1.5rem/1 var(--f-titoli); color: var(--oro-2); font-variant-numeric: tabular-nums; } .duello > div:last-child b { color: var(--blu); }
.duello > span { color: var(--testo-2); font-size: .85rem; }
.tavolo .posto--acceso { fill: var(--oro); stroke: var(--oro-2); stroke-width: 3; } .tavolo .posto--acceso + text { fill: #10261c; }
body[data-tema="chiaro"] .tavolo .posto--acceso + text { fill: #fff; }
body[data-tema="chiaro"] dialog.scheda::backdrop { background: rgba(30, 40, 34, .6); }
@media (max-width: 34rem) { .scheda__testa, .scheda__corpo { padding-left: 1rem; padding-right: 1rem; } .scheda__piede { padding-left: .8rem; padding-right: .8rem; } dialog.scheda { max-height: 94dvh; } .scheda__dentro { max-height: 94dvh; } }
@media print { dialog.scheda { display: none !important; } }
dialog.scheda table { width: 100%; } dialog.scheda th, dialog.scheda td { white-space: normal; padding: .4rem .45rem; } dialog.scheda thead th { position: static; background: transparent; font-size: .74rem; letter-spacing: .02em; }

/* ---- striscia sempre visibile in fondo: porta agli altri strumenti (lo spazio è riservato, non copre niente) ---- */
body { padding-bottom: calc(1.95rem + env(safe-area-inset-bottom, 0px)); }
.striscia { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: block; text-align: center; text-decoration: none; background: var(--oro); color: #10261c;
  font: 700 .8rem/1.95rem var(--f-testo); letter-spacing: .01em; padding: 0 .8rem env(safe-area-inset-bottom, 0px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 -4px 14px rgba(0, 0, 0, .3); }
.striscia:hover, .striscia:focus-visible { background: var(--oro-2); }
body[data-tema="chiaro"] .striscia { color: #fff; }
@media (min-width: 64rem) { .menu { min-height: calc(100vh - 6.2rem); } }
@media print { .striscia { display: none !important; } body { padding-bottom: 0; } }

/* ---- telefono e tablet: testata compatta, tasti a icona, menu in evidenza, tutto fisso in alto ---- */
.solo-stretto { display: none; }
@media (max-width: 63.99rem) {
  .solo-largo { display: none; }
  .solo-stretto { display: inline; }
  svg.solo-stretto { display: block; width: 1.35rem; height: 1.35rem; }
  .testa { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .1rem .8rem; padding: .5rem 1rem .5rem; position: sticky; top: 0; z-index: 4; background: var(--feltro); border-bottom: 0; }
  .marchio { font-size: 1.3rem; grid-column: 1; } .marchio svg { width: 1.4rem; height: 1.4rem; }
  .testa__motto { grid-column: 1; grid-row: 2; font-size: .78rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .testa__scelte { grid-column: 2; grid-row: 1 / span 2; flex-wrap: nowrap; gap: .45rem; }
  .testa__scelte button { width: 2.6rem; height: 2.6rem; padding: 0; display: grid; place-items: center; color: var(--oro-2); background: var(--feltro-2); }
  .testa__scelte .ico-semi { width: 1.7rem; height: 1.7rem; }
  .menu { position: sticky; top: var(--testa-h, 3.6rem); z-index: 3; padding: .45rem .8rem; gap: .3rem; background: linear-gradient(180deg, #1d6a4c, #14503a); border-top: 1px solid var(--oro); border-bottom: 2px solid var(--oro); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { color: #fff; padding: .42rem .8rem; font-size: .92rem; font-weight: 600; }
  .menu a small { color: var(--oro-2); }
  .menu a[aria-current="page"] { background: var(--oro); border-color: var(--oro-2); color: #10261c; font-weight: 700; }
  .menu a[aria-current="page"] small { color: #10261c; }
  body[data-tema="chiaro"] .menu { background: linear-gradient(180deg, #14694a, #0f5a3e); border-color: #0b3f2c; }
  body[data-tema="chiaro"] .menu a small { color: #f3dc9a; }
  body[data-tema="chiaro"] .menu a[aria-current="page"] { background: #fffdf6; border-color: #fffdf6; color: #0b3f2c; }
  body[data-tema="chiaro"] .menu a[aria-current="page"] small { color: #0f5a3e; }
  html { scroll-padding-top: calc(var(--testa-h, 3.6rem) + 3.4rem); }
}
@media (max-width: 63.99rem) and (max-height: 30rem) { .testa__motto { display: none; } .testa { padding-top: .35rem; padding-bottom: .35rem; } }
@media print { .testa, .menu { position: static; } }
/* i due tasti delle scelte sono icone anche su schermo largo */
.testa__scelte .solo-largo { display: none; } .testa__scelte svg.solo-stretto { display: block; width: 1.35rem; height: 1.35rem; } .testa__scelte svg.ico-semi { width: 1.7rem; height: 1.7rem; }
.testa__scelte button { width: 2.6rem; height: 2.6rem; padding: 0; display: grid; place-items: center; color: var(--oro-2); background: var(--feltro-2); }
.testa__scelte { flex-wrap: nowrap; gap: .45rem; }

/* ---- riquadri che si aprono in una scheda ---- */
.tocca { cursor: pointer; border: 1px solid var(--riga); border-radius: var(--raggio); padding: clamp(.9rem, 1.6vw, 1.4rem); background: var(--feltro-2); transition: border-color .15s, transform .15s; }
.tocca:hover, .tocca:focus-visible { border-color: var(--oro); } .tocca:active { transform: scale(.995); }
.tocca p:last-child { margin-bottom: 0; } .tocca .tasto { display: inline-block; }
.scheda__corpo h3 { margin: 1.3rem 0 .45rem; font-size: 1.15rem; }
.passi { margin: 0 0 .9rem; padding-left: 1.3rem; display: grid; gap: .35rem; }
.scheda__esempio .etichetta + p { margin-top: .25rem; }
/* marchio: asso di cuori al posto della picca */
.marchio svg.marchio__asso { width: 2rem; height: 2rem; fill: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
@media (max-width: 63.99rem) { .marchio svg.marchio__asso { width: 1.75rem; height: 1.75rem; } }
