/* =======================================================
   K.e.Q — Ripiano ASPETTO
   Colori, Fasce, Pulsanti, Card, Menu, Home, Tablet
   (il FONT sta nel file separato font.css)
   ======================================================= */

/* ---------- Cassetto COLORI (i colori dell'app) ---------- */
:root{ color-scheme: dark; }
html[data-tema="chiaro"]{ color-scheme: light; }
:root{
  /* Interfaccia */
  --bg:#0D0D0D; --card:#1A1A1A; --sidebar:#1F1F1F; --muted-bg:#262626;
  --line:#2A2A2A; --warm:#313131;
  /* Brand */
  --gold:#DC3045; --gold-glow:#FF5A6E; --gold-dark:#B32235;
  --sage:#6B8F71; --text:#EDEDED; --muted:#848484;
  /* 6 colori dei protocolli (oro, salvia, tabacco, lavanda, terracotta, arancio) */
  --c-oro:#DC3045;       --c-oro-d:#B32235;
  --c-salvia:#6B8F71;    --c-salvia-d:#4E6B53;
  --c-tabacco:#707070;   --c-tabacco-d:#4F4F4F;
  --c-lavanda:#9B7EC8;   --c-lavanda-d:#6E5494;
  --c-terracotta:#C4725A;--c-terracotta-d:#8F4F3D;
  --c-arancio:#E8741A;   --c-arancio-d:#A85311;
  /* Font */
  --serif:'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

/* ---------- Base ---------- */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; background:var(--bg); color:var(--text);
  font-family:var(--serif); -webkit-text-size-adjust:100%; }
body{ min-height:100dvh; }
h1,h2,h3{ font-weight:700; margin:0; }
p{ margin:0 0 12px; line-height:1.55; color:var(--text); }

/* ---------- Cassetto BARRA IN ALTO (crest a sinistra + lingua IT/EN a destra) ---------- */
.topbar{ display:flex; justify-content:space-between; align-items:center;
  padding:calc(env(safe-area-inset-top,8px) + 10px) 18px 8px;
  background:var(--bg); font-family:var(--serif); }
.topbar .crest{ color:var(--gold); font-size:13px; letter-spacing:2px; opacity:.9; }
.lang{ display:inline-flex; background:#222222; border-radius:18px; padding:3px; }
.lang button{ border:none; background:none; color:var(--muted); cursor:pointer;
  font-family:var(--serif); font-weight:700; font-size:14px; padding:5px 14px; border-radius:15px; }
.lang button.on{ background:var(--gold); color:#0D0D0D; }
/* nelle pagine che hanno gia' il loro IT/EN (Indagini), nascondo quello in alto */
/* La barra nascosta resta "fantasma": invisibile ma tiene il suo spazio,
   cosi' la pagina non salta sotto il dito quando cambia schermata (bug tocchi). */
body.hide-toplang .topbar{ visibility:hidden; pointer-events:none; }

/* ---- Intestazione con FOTO GRANDE riutilizzabile (Respiro, Frequenze, Coerenza) ---- */
.keq-rimhead{ padding-top:14px; }
.keq-eyebrow{ text-align:center; letter-spacing:3px; text-transform:uppercase;
  font-size:12px; color:#EBEBEB; opacity:.75; margin:0 0 8px; }
.keq-art{ background:#0D0D0D; border:1px solid #2E2E2E; border-radius:18px; padding:9px;
  margin:0 auto; display:flex; justify-content:center; max-width:262px; }
.keq-art img{ width:100%; max-width:238px; height:auto; aspect-ratio:1/1;
  object-fit:contain; border-radius:12px; display:block; }
.keq-title{ text-align:center; font-family:var(--serif); font-size:30px; margin:16px 0 12px; line-height:1.12; }
.keq-sotto{ text-align:center; color:#959595; font-style:italic; font-size:15px;
  margin:-4px auto 12px; max-width:520px; line-height:1.35; }
.keq-lang{ display:flex; justify-content:center; gap:0; width:max-content; margin:0 auto 6px;
  border:1.5px solid; border-radius:18px; padding:3px; }
.keq-lg{ border:none; background:transparent; color:#959595; cursor:pointer;
  font-family:var(--serif); font-weight:700; font-size:16px; padding:6px 20px; border-radius:15px; }

/* ---------- Cassetto FASCE / GRADIENTI ---------- */
/* Fascia del logo (scura -> oro). Si può cambiare colore con --band */
.band{
  position:relative;
  background:linear-gradient(135deg,#1A1A1A 0%, var(--band, var(--gold)) 100%);
  padding:18px 20px 22px;
  text-align:center;
}
.logo{ color:var(--gold); font-size:40px; line-height:1.05; margin-top:10px; }
.tagline{ color:var(--text); opacity:.85; font-style:italic; font-size:14px;
  letter-spacing:1px; margin-top:2px; }

/* ---------- Cassetto CARD ---------- */
.wrap{ padding:18px 16px 40px; max-width:680px; margin:0 auto; }
.card{ background:var(--card); border:1px solid var(--line); border-radius:16px;
  padding:18px 18px; margin-bottom:14px; }
.card h3{ color:var(--gold); font-size:22px; margin-bottom:4px; }
.card .sub{ color:var(--muted); font-size:14px; }

/* ---------- Cassetto PULSANTI ---------- */
/* Regola K.e.Q: gradient colore -> colore scuro + alone dello stesso colore */
.btn{ display:inline-block; border:none; cursor:pointer; color:#fff;
  font-family:var(--serif); font-weight:700; font-size:16px;
  padding:12px 20px; border-radius:13px; margin:4px 4px 4px 0;
  background:linear-gradient(135deg,var(--gold),var(--gold-dark));
  box-shadow:0 4px 15px rgba(220,48,69,.30); }
.btn:active{ transform:translateY(1px); }
.btn-oro{ background:linear-gradient(135deg,var(--c-oro),var(--c-oro-d)); box-shadow:0 4px 15px rgba(220,48,69,.30); }
.btn-salvia{ background:linear-gradient(135deg,var(--c-salvia),var(--c-salvia-d)); box-shadow:0 4px 15px rgba(107,143,113,.30); }
.btn-tabacco{ background:linear-gradient(135deg,var(--c-tabacco),var(--c-tabacco-d)); box-shadow:0 4px 15px rgba(123,110,93,.30); }
.btn-lavanda{ background:linear-gradient(135deg,var(--c-lavanda),var(--c-lavanda-d)); box-shadow:0 4px 15px rgba(155,126,200,.30); }
.btn-terracotta{ background:linear-gradient(135deg,var(--c-terracotta),var(--c-terracotta-d)); box-shadow:0 4px 15px rgba(196,114,90,.30); }
.btn-arancio{ background:linear-gradient(135deg,var(--c-arancio),var(--c-arancio-d)); box-shadow:0 4px 15px rgba(232,116,26,.30); }

/* pastiglia colore (per mostrare la palette) */
.swatch{ display:inline-block; width:54px; height:54px; border-radius:12px;
  margin:4px; border:1px solid var(--line); vertical-align:middle; }
.swrow{ display:flex; flex-wrap:wrap; align-items:center; gap:2px; }
.swlab{ color:var(--muted); font-size:12px; width:100%; margin-top:2px; }

/* ---------- Cassetto VISTE + MENU IN BASSO (Motore) ---------- */
[hidden]{ display:none !important; }
body{ padding-bottom:calc(env(safe-area-inset-bottom,6px) + 62px); }

.page-head{ text-align:center; padding:24px 20px 8px; }
.page-head h2{ color:var(--gold); font-size:27px; }

.bottom-nav{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  display:flex; justify-content:space-around; align-items:center;
  background:#121212; border-top:1px solid var(--line);
  padding:8px 6px calc(env(safe-area-inset-bottom,6px) + 8px);
}
.nav-btn{
  flex:1; border:none; background:none; cursor:pointer;
  color:var(--muted); font-family:var(--serif); font-weight:700; font-size:14px;
  padding:4px 2px;
}
.nav-btn.on{ color:var(--gold); }

/* tasto INDIETRO grande nella barra in basso (compare solo dentro una scheda
   di dettaglio: Rimedi, Indagini, protocolli). Comodo da toccare col pollice. */
.nav-back{
  flex:1; border:none; background:none; cursor:pointer;
  color:var(--gold); font-family:var(--serif); font-weight:700; font-size:14.5px;
  padding:4px 2px; text-align:center; white-space:nowrap;
}
/* dentro una scheda l'Indietro si aggiunge in testa alla fila: i 5 menu restano */
/* dentro una scheda, il tasto Indietro che stava in alto non serve piu' */
#view-protocol .proto-back,
#view-protocol .rim-back2{ display:none !important; }

/* ---------- Cassetto AVVERTENZE (ⓘ sulla fascia + pagina) ---------- */
/* la ⓘ bianca cerchiata trasparente, in basso a destra della fascia */
.avv-i{ position:absolute; bottom:8px; right:12px; background:none; border:none;
  color:rgba(255,255,255,.92); font-size:24px; line-height:1; padding:4px; cursor:pointer;
  font-family:Georgia,serif; }

/* la pagina avvertenza (nascosta finché non serve) */
#keqAvvOv{ position:fixed; top:0; right:0; bottom:0; left:0; z-index:99999;
  background:var(--bg); display:none; flex-direction:column;
  overflow-y:auto; -webkit-overflow-scrolling:touch; }
#keqAvvOv.show{ display:flex; }
#keqAvvOv .kb{ background:linear-gradient(135deg,#1A1A1A 0%, var(--gold) 100%);
  padding:28px 20px 20px; text-align:center; }
#keqAvvOv .kb-lg{ color:#F6F6F6; font-size:34px; font-weight:700; }
#keqAvvOv .kb-tg{ color:#F6F6F6; opacity:.85; font-style:italic; font-size:13px; margin-top:2px; }
#keqAvvOv .kc{ padding:22px 22px 34px; max-width:680px; margin:0 auto; width:100%; }
#keqAvvOv h2{ color:var(--gold); font-size:25px; margin:0 0 14px; }
#keqAvvOv p{ color:#DEDEDE; font-size:15px; line-height:1.6; text-align:justify; margin:0 0 18px; }
#keqAvvOv .avv-ok{ display:block; width:100%; color:#fff; border:none; cursor:pointer;
  background:linear-gradient(135deg,var(--gold),var(--gold-dark));
  padding:15px; border-radius:14px; font-size:17px; font-weight:700;
  font-family:var(--serif); box-shadow:0 6px 16px rgba(220,48,69,.32); }

/* ---------- Cassetto HOME (filtri categoria + carte protocolli) ---------- */
.cat-pills{ display:flex; flex-wrap:wrap; gap:8px; margin:2px 0 14px; }
.cat-pill{ border:none; cursor:pointer; font-family:var(--serif); font-weight:700; font-size:15px;
  padding:7px 16px; border-radius:18px; background:#262626; color:var(--muted); }

.proto-grid{ display:flex; flex-wrap:wrap; gap:12px; }
.proto-card{ position:relative; flex:0 1 calc(50% - 6px); box-sizing:border-box;
  display:flex; flex-direction:column; align-items:flex-start; gap:9px; text-align:left;
  background:var(--card); border:1px solid var(--line); border-radius:16px; padding:15px 14px;
  cursor:pointer; font-family:var(--serif); min-height:92px; }
.proto-badge{ font-size:10.5px; font-weight:700; letter-spacing:.5px; text-transform:uppercase;
  padding:3px 9px; border-radius:9px; }
.proto-name{ color:var(--text); font-size:18px; font-weight:700; line-height:1.18; }

/* tasto Indietro sulla pagina-protocollo */
.proto-back{ position:absolute; top:4px; left:4px; background:none; border:none;
  color:#F6F6F6; font-family:var(--serif); font-weight:700; font-size:16px; padding:10px 16px; cursor:pointer; }

/* ---------- Cassetto TABLET / schermi larghi ---------- */
@media (min-width: 700px) {
  .wrap { max-width: 860px; }
  .proto-card { flex-basis: calc(33.333% - 8px); }   /* 3 colonne invece di 2 */
  .bottom-nav { justify-content: center; gap: 48px; }
  .nav-btn { flex: 0 0 auto; }
}

/* ---------- Cassetto PROTOCOLLO (passi, frasi, note) ---------- */
.proto-sec{ margin:2px 0 4px; }
.proto-h{ color:var(--gold); font-size:18px; font-weight:700; margin:16px 0 9px; }
.proto-steps{ margin:0; padding-left:24px; }
.proto-steps li{ color:var(--text); margin:0 0 10px; line-height:1.45; font-size:16px; }
.proto-frase{ background:var(--card); border-left:3px solid var(--gold); border-radius:9px;
  padding:11px 14px; margin:0 0 9px; color:var(--text); font-style:italic; font-size:16px; line-height:1.4; }
.proto-note{ background:var(--warm); border-radius:13px; padding:13px 15px; margin:16px 0 0;
  color:#D4D4D4; font-size:14.5px; line-height:1.5; }
.proto-note-t{ color:var(--gold); font-weight:700; font-size:13px; text-transform:uppercase;
  letter-spacing:.5px; margin-bottom:5px; }

/* ---------- Protocollo: immagine, nota intro, lista punti ---------- */
.proto-img{ width:100%; height:auto; display:block; border-radius:14px; margin:0 0 14px;
  border:1px solid var(--line); }
.proto-info{ background:var(--card); border-left:4px solid var(--gold); border-radius:12px;
  padding:15px 17px; margin:0 0 16px; color:#E7E7E7; font-size:17px; line-height:1.5; }
.proto-punti{ list-style:none; margin:0; padding:0; }
.proto-punti li{ display:flex; align-items:center; gap:14px; padding:13px 15px; margin:0 0 11px;
  background:var(--card); border:1px solid var(--line); border-radius:14px; }
.pt-n{ flex:0 0 auto; width:42px; height:42px; border-radius:50%; background:#DC3045;
  color:#1C1C1C; font-family:var(--serif); font-weight:700; font-size:18px;
  display:flex; align-items:center; justify-content:center; }
.pt-txt{ display:flex; flex-direction:column; }
.pt-em{ color:var(--text); font-family:var(--serif); font-weight:600; font-size:20px; line-height:1.15; }
.pt-or{ color:var(--muted); font-size:14.5px; margin-top:2px; }

/* ---------- ICONE: card, pagina aperta, Logo Home ---------- */
.proto-ico{ width:56px; height:56px; border-radius:13px; object-fit:cover;
  border:1px solid var(--line); background:#000; }
.proto-grid.big-ico .proto-ico{ width:88px; height:88px; border-radius:18px; object-fit:contain; background:#101012; padding:4px; }

.band-ico{ width:62px; height:62px; border-radius:14px; object-fit:cover; display:block;
  margin:8px auto 0; border:1px solid rgba(255,255,255,.22); }
.home-logo{ width:88px; height:88px; border-radius:20px; object-fit:cover; display:block;
  margin:2px auto 6px; border:1px solid rgba(255,255,255,.18); }

/* ---------- Cassetto TESTATA HOME (foto con cornice di luce, build v64) ---------- */
.home-head{ position:relative; padding:22px 16px 8px; text-align:center; background:var(--bg); }
.home-foto{ width:78%; max-width:340px; aspect-ratio:1/1; object-fit:cover;
  border-radius:24px; display:block; margin:0 auto;
  border:1.5px solid rgba(232,223,200,.55);
  box-shadow:0 0 26px rgba(220,48,69,.55), 0 0 60px rgba(220,48,69,.25); }
.home-head .logo{ margin-top:18px; }
.home-head .avv-i{ top:10px; right:12px; bottom:auto; }

/* ---------- Cassetto SESSIONE (carte-strumento + permesso) ---------- */
.sess-intro{ color:var(--muted); font-size:15px; line-height:1.55; margin:2px 0 16px; }

.tool-list{ margin:0 0 18px; }
.tool-card{ display:block; width:100%; text-align:left; cursor:pointer;
  background:var(--card); border:1px solid var(--line); border-left:4px solid var(--gold);
  border-radius:16px; padding:15px 16px; margin-bottom:12px; font-family:var(--serif); }
.tool-card:active{ transform:translateY(1px); }
.tool-card .tc-name{ color:var(--text); font-size:20px; font-weight:700; line-height:1.2; }
.tool-card .tc-sub{ color:var(--muted); font-size:14px; line-height:1.4; margin-top:4px; }

.permesso{ background:var(--card); border:1px solid var(--line); border-radius:16px;
  padding:18px 16px; }
.permesso h3{ color:var(--gold); font-size:21px; margin-bottom:6px; }
.permesso .pq{ color:var(--text); font-size:16px; line-height:1.45; margin-bottom:15px; }
.permesso .row{ display:flex; gap:10px; }
.permesso .row .btn{ flex:1; text-align:center; margin:0; }
.btn-stop{ background:linear-gradient(135deg,#B5564A,#7E382F);
  box-shadow:0 4px 15px rgba(181,86,74,.30); }
.permesso .esito{ margin-top:14px; font-size:16px; line-height:1.45; text-align:center;
  min-height:0; }

/* =======================================================
   SESSIONE — carte-strumento con icona, Permesso, sezioni
   (Test Muscolare, Pretest)
   ======================================================= */
:root{ --c-azzurro:#5B8FA8; --c-azzurro-d:#3E6B80; }

/* carte-strumento */
.tcard{ display:flex; gap:14px; align-items:center; width:100%; text-align:left;
  background:var(--card); border:1.5px solid var(--tc,var(--gold)); border-radius:18px;
  padding:16px 18px; margin:0 0 16px; cursor:pointer;
  box-shadow:0 4px 18px rgba(0,0,0,.35); font-family:var(--serif); }
.tcard:active{ transform:translateY(1px); }
.tcard .ico{ width:58px; height:58px; flex:0 0 58px; border-radius:14px; object-fit:cover;
  background:#0D0D0D; border:1px solid var(--tc,var(--gold)); }
.tcard .tcard-txt{ display:block; }
.tcard .lab{ display:block; color:var(--tc,var(--gold)); font-size:13px; letter-spacing:3px; font-weight:700; }
.tcard .nm{ display:block; color:var(--text); font-size:25px; font-style:italic; line-height:1.1; margin:2px 0 3px; }
.tcard .sb{ display:block; color:var(--muted); font-size:14px; line-height:1.4; }

/* Permesso di lavorare (con scudo) */
.perm{ background:var(--card); border:1.5px solid var(--c-oro); border-radius:18px;
  padding:18px; margin:0 0 16px; box-shadow:0 4px 18px rgba(0,0,0,.35); }
.perm .ph{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.perm .sh{ width:38px; height:38px; border-radius:50%; flex:0 0 38px; display:flex;
  align-items:center; justify-content:center; font-size:19px;
  background:linear-gradient(135deg,#222222,#313131); border:1px solid var(--c-oro); }
.perm .pt{ color:var(--gold); font-size:18px; letter-spacing:2px; font-weight:700; }
.perm .pq{ font-style:italic; color:var(--text); font-size:17px; line-height:1.5;
  text-align:center; margin:8px 4px 14px; }
.perm .row{ display:flex; gap:10px; }
.perm .row .btn{ flex:1; text-align:center; margin:0; }
.perm .esito{ margin-top:14px; font-size:16px; line-height:1.45; text-align:center; min-height:1px; }

/* sezioni Test Muscolare / Pretest */
.sez{ background:var(--card); border:1px solid var(--line); border-radius:16px;
  overflow:hidden; margin:0 0 16px; }
.sez-head{ display:flex; align-items:center; gap:10px; padding:14px 16px;
  border-left:5px solid var(--acc,var(--gold)); }
.sez-head .ic{ font-size:22px; }
.sez-head h2{ color:var(--acc,var(--gold)); font-size:24px; letter-spacing:.3px; }
.sez-body{ padding:14px 16px 6px; }
.sez-body p{ color:var(--text); font-size:16px; }
.sez-lab{ color:var(--acc,var(--gold)); font-weight:700; font-size:14px; letter-spacing:.6px;
  text-transform:uppercase; margin:8px 0 10px; }
.intro-it{ font-style:italic; color:var(--muted); font-size:15px; line-height:1.55; margin:2px 0 4px; }

/* liste numerate con numero colorato */
.kq-ol{ list-style:none; counter-reset:n; padding:0; margin:0 0 8px; }
.kq-ol li{ counter-increment:n; position:relative; padding-left:30px; margin-bottom:11px;
  color:var(--text); font-size:16px; line-height:1.5; }
.kq-ol li::before{ content:counter(n)"."; position:absolute; left:2px; top:0;
  color:var(--acc,var(--gold)); font-weight:700; }

/* sotto-carte del Pretest */
.sub-card{ background:#141414; border:1px solid var(--line);
  border-left:5px solid var(--acc,var(--gold)); border-radius:12px;
  padding:14px 14px 6px; margin:14px 0; }
.sub-card h3{ color:var(--acc,var(--gold)); font-size:21px; margin-bottom:8px; }

/* parole evidenziate */
.cc-green{ color:var(--sage); font-weight:700; }
.cc-terra{ color:var(--c-terracotta); font-weight:700; }
.cc-gold{ color:var(--gold); font-weight:700; }

/* build v113: niente zoom col doppio tocco sui comandi (iOS) */
html, body, button, a { touch-action: manipulation; }

/* ---------- Cassetto LUCCHETTI (K.e.Q+) ---------- */
.tcard{ position:relative; }
.keq-plus{ position:absolute; top:9px; right:9px; background:rgba(10,10,10,.5);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  border:1px solid rgba(220,48,69,.55); border-radius:8px; padding:3px 8px;
  color:#FF5A6E; font-family:Georgia,serif; font-size:9.5px; letter-spacing:1.5px; pointer-events:none; }
.keq-r{ font-size:.6em; vertical-align:super; letter-spacing:0; line-height:0; }
.keq-sblocco{ text-align:center; padding-top:36px; }
.keq-medaglione{ width:86px; height:86px; border-radius:50%; margin:0 auto 16px;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle at 32% 28%, #FF5A6E, #DC3045 55%, #8E1B2A);
  box-shadow:0 4px 18px rgba(220,48,69,.35); color:#141414; font-weight:700; font-size:17px; letter-spacing:1px; }
.keq-sblocco h2{ color:#FF5A6E; font-family:var(--serif); font-size:23px; margin:0 0 6px; }
.keq-sblocco p{ color:var(--muted); font-size:14.5px; line-height:1.5; margin:0 0 20px; }
.keq-campo{ width:82%; max-width:280px; background:#0D0D0D; border:1px solid rgba(220,48,69,.4);
  border-radius:12px; color:var(--text); font-size:18px; letter-spacing:3px; text-align:center; padding:13px 10px; }
.keq-err{ color:#C96A5A; font-size:13.5px; min-height:20px; margin:8px 0 6px; }
.keq-btn-oro{ display:inline-block; background:linear-gradient(135deg,#FF5A6E,#DC3045); color:#141414;
  font-family:var(--serif); font-weight:700; font-size:17px; border:none; border-radius:14px;
  padding:13px 44px; box-shadow:0 3px 12px rgba(220,48,69,.3); cursor:pointer; }

/* =======================================================
   MODALITÀ CHIARA  (data-tema="chiaro" su <html>)
   Il vestito chiaro di K.e.Q. Le immagini restano dipinte
   sul nero: qui vengono messe dentro un MEDAGLIONE scuro,
   così mantengono i loro bagliori.
   ======================================================= */
html[data-tema="chiaro"]{
  --bg:#F8F8F8; --card:#FFFFFF; --sidebar:#F2F2F2; --muted-bg:#F1F1F1;
  --line:#E0E0E0; --warm:#EEEEEE;
  --gold:#DC3045; --gold-glow:#DC3045; --gold-dark:#B32235;
  --text:#353535; --muted:#7E7E7E;
}
html[data-tema="chiaro"] body{ background:var(--bg); color:var(--text); }

/* barra in alto e pastiglie */
html[data-tema="chiaro"] .lang{ background:#E6E6E6; }
html[data-tema="chiaro"] .lang button.on{ background:var(--gold); color:#FFFFFF; }

/* fascia colorata delle pagine: scuro del colore -> colore */
html[data-tema="chiaro"] header.band{
  background:linear-gradient(135deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 100%),
             var(--band, var(--c-oro));
}

/* ---- MEDAGLIONI: le immagini restano sul loro nero ---- */
html[data-tema="chiaro"] .proto-ico{
  background:#0D0D0D; padding:4px; box-sizing:border-box; border-color:#D9D9D9; }
html[data-tema="chiaro"] .band-ico{
  background:#0D0D0D; padding:4px; box-sizing:border-box; border-color:rgba(0,0,0,.30); }
html[data-tema="chiaro"] .home-logo{
  background:#0D0D0D; padding:5px; box-sizing:border-box; border-color:#D9D9D9; }
html[data-tema="chiaro"] .home-foto{
  background:#0D0D0D; padding:8px; box-sizing:border-box;
  border:1.5px solid #D9D9D9;
  box-shadow:0 6px 22px rgba(140,110,80,.30); }
/* la ⓘ della Home in chiaro: bianca non si vedeva sul fondo crema → oro scuro.
   Sulle fasce colorate dei protocolli resta bianca, lì va bene. */
html[data-tema="chiaro"] .home-head .avv-i{ color:var(--gold); }
html[data-tema="chiaro"] .keq-art{ background:#0D0D0D; border-color:#D9D9D9; }

/* ---- ritocchi ai colori scritti a mano dentro i cassetti ---- */
html[data-tema="chiaro"] [style*="background:#1A1A1A"],
html[data-tema="chiaro"] [style*="background:#141414"],
html[data-tema="chiaro"] [style*="background:#161616"],
html[data-tema="chiaro"] [style*="background:#1B1B18"],
html[data-tema="chiaro"] [style*="background:#161613"],
html[data-tema="chiaro"] [style*="background:#101012"]{ background:var(--card) !important; }
html[data-tema="chiaro"] [style*="background:#0D0D0D"],
html[data-tema="chiaro"] [style*="background:#1F1F1F"]{ background:var(--bg) !important; }
html[data-tema="chiaro"] [style*="background:#2A2A2A"],
html[data-tema="chiaro"] [style*="background:#3a3a3a"]{ background:var(--muted-bg) !important; }
html[data-tema="chiaro"] [style*="color:#EDEDED"],
html[data-tema="chiaro"] [style*="color:#F3F3F3"],
html[data-tema="chiaro"] [style*="color:#EBEBEB"]{ color:var(--text) !important; }
/* dentro le fasce e sui pulsanti pieni il testo resta chiaro */
html[data-tema="chiaro"] header.band [style*="color:#EDEDED"],
html[data-tema="chiaro"] .btn[style*="color:#EDEDED"]{ color:#FFFFFF !important; }

/* dentro le fasce colorate il testo resta chiaro (il fondo è il colore) */
html[data-tema="chiaro"] header.band,
html[data-tema="chiaro"] header.band .logo,
html[data-tema="chiaro"] header.band .tagline,
html[data-tema="chiaro"] header.band h1,
html[data-tema="chiaro"] header.band h2,
html[data-tema="chiaro"] header.band p,
html[data-tema="chiaro"] header.band .band-sub{ color:#FFFFFF; }

/* riquadri scuri scritti nel foglio di stile */
html[data-tema="chiaro"] .sub-card{ background:var(--card); }
html[data-tema="chiaro"] .toolbar{ background:#F2F2F2; }
html[data-tema="chiaro"] .cat-pill{ background:var(--muted-bg); }
html[data-tema="chiaro"] .keq-campo{ background:#FFFFFF; border-color:rgba(138,100,64,.45); color:var(--text); }
html[data-tema="chiaro"] .tcard{ background:var(--card); }
html[data-tema="chiaro"] .proto-grid.big-ico .proto-ico{ background:#0D0D0D; }

/* v162b — colori chiari scritti fissi in QUESTO foglio (il traduttore non li vede):
   nota intro e nota finale dei protocolli, testo dell'Avvertenza */
html[data-tema="chiaro"] .proto-info{ color:var(--text); }
html[data-tema="chiaro"] .proto-note{ color:var(--text); background:var(--warm); }
html[data-tema="chiaro"] #keqAvvOv p{ color:var(--text); }
html[data-tema="chiaro"] .sess-intro,
html[data-tema="chiaro"] .intro-it{ color:var(--muted); }

/* etichette di categoria: sul crema serve il tono scuro dello stesso colore */
html[data-tema="chiaro"] .proto-badge[style*="color:#DC3045"]{ color:#7A5730 !important; }
html[data-tema="chiaro"] .proto-badge[style*="color:#6B8F71"]{ color:#3F5A45 !important; }
html[data-tema="chiaro"] .proto-badge[style*="color:#707070"]{ color:#484848 !important; }
html[data-tema="chiaro"] .proto-badge[style*="color:#9B7EC8"]{ color:#61468A !important; }
html[data-tema="chiaro"] .proto-badge[style*="color:#C4725A"]{ color:#8A4934 !important; }
html[data-tema="chiaro"] .proto-badge[style*="color:#E8741A"]{ color:#94480C !important; }
html[data-tema="chiaro"] .proto-badge[style*="color:#5B8FA8"]{ color:#356073 !important; }

/* sottotitolo oro della Home e tastino EN spento: un filo più scuri */
html[data-tema="chiaro"] .home-head [style*="color:#DC3045"]{ color:var(--gold) !important; }
html[data-tema="chiaro"] .keq-lg[style*="color:#959595"]{ color:#646464 !important; }

/* badge K.e.Q®+ : resta la pastiglia di vetro scuro anche in chiaro */
html[data-tema="chiaro"] .keq-plus{
  background:rgba(20,18,14,.82); border-color:rgba(220,48,69,.75); color:#EFCB96; }

/* =======================================================
   PASTIGLIE ☀ ☾  (barra in alto, accanto a IT/EN)
   ======================================================= */
.tema{ display:inline-flex; background:#222222; border-radius:18px; padding:3px; margin-right:6px; }
.tema button{ border:none; background:none; color:var(--muted); cursor:pointer;
  font-family:var(--serif); font-size:15px; line-height:1; padding:5px 11px; border-radius:15px; }
.tema button.on{ background:var(--gold); color:#0D0D0D; }
html[data-tema="chiaro"] .tema{ background:#E6E6E6; }
html[data-tema="chiaro"] .tema button.on{ background:var(--gold); color:#FFFFFF; }

/* =======================================================
   PAGINA INFORMAZIONI (si apre dalla ⓘ della Home)
   ======================================================= */
#keqInfoOv{ position:fixed; top:0; right:0; bottom:0; left:0; z-index:99998;
  background:var(--bg); display:none; overflow-y:auto; -webkit-overflow-scrolling:touch; }
#keqInfoOv.show{ display:block; }
.kinfo-wrap{ padding:calc(env(safe-area-inset-top,10px) + 22px) 18px
             calc(env(safe-area-inset-bottom,10px) + 30px);
  max-width:560px; margin:0 auto; font-family:var(--serif); }
.kinfo-tit{ color:var(--gold); font-size:29px; text-align:center; margin:0 0 20px; }
.kinfo-card{ display:block; width:100%; text-align:left; background:var(--card);
  border:1px solid var(--line); border-radius:16px; padding:15px 16px; margin:0 0 13px;
  font-family:var(--serif); }
.kinfo-tap{ cursor:pointer; }
.kinfo-h{ color:var(--gold); font-size:20px; margin:0 0 4px; }
.kinfo-riga{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin:9px 0 0; }
.kinfo-lab{ color:var(--text); font-size:16px; line-height:1.35; flex:1; }
.kinfo-note{ color:var(--muted); font-size:14px; font-style:italic; line-height:1.5; margin:9px 0 0; }
.kinfo-sw{ flex:0 0 auto; width:50px; height:29px; border:none; border-radius:15px;
  background:var(--warm); cursor:pointer; padding:3px; box-sizing:border-box;
  display:inline-flex; align-items:center; justify-content:flex-start;
  box-shadow:inset 0 0 0 1px rgba(220,48,69,.45); transition:background .18s ease; }
.kinfo-sw.on{ background:var(--gold); justify-content:flex-end;
  box-shadow:0 2px 9px rgba(220,48,69,.38); }
.kinfo-sw span{ display:block; width:23px; height:23px; border-radius:50%;
  background:var(--muted); box-shadow:0 1px 3px rgba(0,0,0,.35); }
.kinfo-sw.on span{ background:#FFFFFF; }
.kinfo-ok{ display:block; width:100%; margin:22px 0 0; border:none; cursor:pointer;
  border-radius:16px; padding:16px; font-family:var(--serif); font-size:19px; color:#FFFFFF;
  background:linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  box-shadow:0 4px 14px rgba(220,48,69,.30); }

/* build v185: pagina Informazioni — testo del Metodo, citazione, versione */
.kinfo-met{ color:var(--text); font-size:16.5px; line-height:1.55; margin:10px 0 0; }
.kinfo-met b{ color:var(--gold); font-weight:600; }
.kinfo-cit{ color:var(--gold); font-style:italic; font-size:17px; text-align:center; margin:16px 0 4px; line-height:1.45; }
.kinfo-cit span{ font-size:13px; letter-spacing:1px; color:var(--muted); font-style:normal; }
.kinfo-ver{ text-align:center; color:var(--muted); font-size:12.5px; letter-spacing:.5px; margin:16px 0 0; }

/* =======================================================
   Cassetto PELLE (build v202) — bianco, nero e il rosso del logo
   Voluto da Chiara. Il rosso sta in UN punto solo: --rosso.
   Queste regole stanno in fondo e comandano su quelle sopra
   e sui colori scritti a mano nelle pagine (per questo !important).
   ======================================================= */
:root{ --rosso:#DC3045; --rosso-d:#B32235; --rosso-ch:#FF5A6E;
  --bg:#0D0D0D; --card:#1A1A1A; --sidebar:#161616; --muted-bg:#262626; --line:#333; --warm:#222;
  --text:#F3F3F3; --muted:#9A9A9A; --gold:#FF5A6E; --gold-glow:#FF5A6E; --gold-dark:#DC3045; }
html[data-tema="chiaro"]{ --bg:#FFFFFF; --card:#FFFFFF; --sidebar:#F4F4F4; --muted-bg:#F0F0F0; --line:#E0E0E0; --warm:#F4F4F4;
  --text:#000000; --muted:#4F4F4F; --gold:#DC3045; --gold-glow:#DC3045; --gold-dark:#B32235; }
/* fasce: tutte rosse uguali, scritte bianche */
header.band, html[data-tema="chiaro"] header.band, #keqAvvOv .kb{ background:var(--rosso) !important; }
header.band .logo, header.band h1, header.band .tagline, header.band div{ color:#fff !important; }
header.band .band-ico{ border-color:rgba(255,255,255,.55) !important; }
/* linguette IT/EN e sole/luna */
.lang, html[data-tema="chiaro"] .lang{ background:var(--muted-bg); }
.lang button.on, html[data-tema="chiaro"] .lang button.on{ background:var(--rosso) !important; color:#fff !important; }
.keq-lang{ border-color:var(--line) !important; }
.keq-lg[style*="gradient"]{ background:var(--rosso) !important; color:#fff !important; }
/* pulsanti: tutti rossi */
.btn:not(.btn-salvia):not(.btn-stop), [class$="-btn"]:not(.nav-btn), [class*="-btn "]:not(.nav-btn), [class$="-slink"], .int-go, .resp-go, .keq-btn-oro, #keqAvvOv .avv-ok{
  background:var(--rosso) !important; box-shadow:0 4px 14px rgba(220,48,69,.28) !important; color:#fff !important; }
[class$="-btn"] span{ color:#fff !important; }
[class$="-slink"] span{ color:#fff !important; }
.resp-go{ border-color:var(--rosso) !important; }
.resp-chip.on{ border-color:var(--rosso) !important; color:var(--gold) !important; }
.cat-pill.on{ background:var(--rosso) !important; color:#fff !important; }
/* schede, numeri dei passi, riga a sinistra */
[class*="-tab"].on{ color:var(--gold) !important; }
[class*="-tab"].on:after{ background:var(--rosso) !important; }
html[data-tema="chiaro"] .sez-head{ background:var(--card) !important; }
[class$="-num"]{ color:var(--gold) !important; }
.ses-num, .p14-num{ background:var(--rosso) !important; color:#fff !important; }
[class$="-step"]{ border-left-color:var(--rosso) !important; }
.proto-info, .proto-frase{ border-left-color:var(--rosso) !important; }
/* titoli */
.home-head .logo, .page-head h2, .card h3{ color:var(--gold) !important; }
.home-foto{ box-shadow:0 0 26px rgba(255,255,255,.18), 0 0 60px rgba(220,48,69,.22) !important; border-color:rgba(255,255,255,.5) !important; }
html[data-tema="chiaro"] .home-foto{ box-shadow:0 6px 22px rgba(0,0,0,.22) !important; border-color:#DDD !important; }
html[data-tema="chiaro"] .proto-ico, html[data-tema="chiaro"] .home-logo, html[data-tema="chiaro"] .keq-art{ border-color:#DDD !important; }
/* barra in basso: nera, voce attiva rosso chiaro */
.bottom-nav{ background:#000 !important; border-top:1px solid #2A2A2A !important; }
.nav-btn{ color:#9A9A9A !important; } .nav-btn.on, .nav-back{ color:var(--rosso-ch) !important; }
/* K.e.Q+ : scritta BIANCA nel bollino rosso */
.keq-plus{ background:var(--rosso) !important; border:none !important; color:#fff !important; padding:4px 9px !important;
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important; box-shadow:0 1px 4px rgba(0,0,0,.25); }
.keq-plus .keq-r, .keq-medaglione .keq-r{ color:#fff !important; }
.keq-medaglione{ background:var(--rosso) !important; color:#fff !important; box-shadow:0 4px 18px rgba(220,48,69,.35) !important; }
.keq-sblocco h2{ color:var(--gold) !important; }
.keq-campo{ border-color:var(--line) !important; background:var(--card) !important; }
/* build v203: in chiaro il Talloncino Nero resta NERO (il traduttore del chiaro lo faceva bianco) */
html[data-tema="chiaro"] .tal-tag{ background:#000 !important; border-color:#fff !important;
  box-shadow:0 10px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.25) !important; }
/* build v204: la mappa nuova dei 14 punti e' una figura in piedi su fondo bianco: resta bianca anche in scuro */
.proto-img[src*="p14-mappa"], .p14-map{ background:#fff; max-width:420px; margin-left:auto !important; margin-right:auto !important; }
/* build v205: in chiaro le scritte sono piu' marcate. Stesso carattere (Cormorant Garamond),
   ma al posto del "normale" (400) si usa il "semi-grassetto" (600): sul bianco il normale sembrava grigio.
   File: cg-chiaro-n/-i/-b.woff2 = Cormorant Garamond 600, 600 corsivo, 700 (licenza libera OFL, da @fontsource 5.3.0, solo lettere latine). */
@font-face{ font-family:'Cormorant Chiaro'; font-style:normal; font-weight:400; font-display:swap; src:url(./cg-chiaro-n.woff2) format('woff2'); }
@font-face{ font-family:'Cormorant Chiaro'; font-style:italic; font-weight:400; font-display:swap; src:url(./cg-chiaro-i.woff2) format('woff2'); }
@font-face{ font-family:'Cormorant Chiaro'; font-style:normal; font-weight:700; font-display:swap; src:url(./cg-chiaro-b.woff2) format('woff2'); }
html[data-tema="chiaro"]{ --serif:'Cormorant Chiaro','Cormorant Garamond', Georgia, 'Times New Roman', serif; }

/* ===== v207 · 14 PUNTI: la figura si tocca ===== */
.p14-tocca{ position:relative; max-width:420px; margin:0 auto 8px; background:#fff; border-radius:16px; overflow:hidden; border:1px solid var(--line); -webkit-tap-highlight-color:transparent; }
.p14-tocca img{ display:block; width:100% !important; max-width:none !important; height:auto; margin:0 !important; border:0 !important; border-radius:0 !important; }
.p14-hot{ position:absolute; border:0 !important; background:transparent !important; padding:0; margin:0; border-radius:50%; cursor:pointer; box-shadow:none !important; min-height:0; }
.p14-an{ position:absolute; width:0; height:0; pointer-events:none; display:none; }
.p14-an::before{ content:""; position:absolute; left:-17px; top:-17px; width:34px; height:34px; border-radius:50%; border:3px solid #DC3045; box-shadow:0 0 0 3px rgba(255,255,255,.9); animation:p14batti 1.4s ease-in-out infinite; }
.p14-an.p14-an-p::before{ left:-9px; top:-9px; width:18px; height:18px; }
@keyframes p14batti{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.18); } }
@media (prefers-reduced-motion:reduce){ .p14-an::before{ animation:none; } }
.p14-fum{ position:absolute; display:none; width:200px; background:#fff !important; color:#000 !important; border:2px solid #DC3045; border-radius:14px; padding:10px 30px 11px 12px; box-shadow:0 8px 24px rgba(0,0,0,.28); z-index:5; text-align:left; }
.p14-fn{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:#DC3045; color:#fff; font-family:var(--serif); font-weight:700; font-size:16px; margin-right:8px; vertical-align:middle; }
.p14-fe{ font-family:var(--serif); font-weight:700; font-size:19px; line-height:1.2; color:#000 !important; vertical-align:middle; }
.p14-fo{ margin-top:6px; font-size:15.5px; color:#4F4F4F !important; }
.p14-fo b{ color:#000 !important; }
.p14-fx{ position:absolute; right:2px; top:0; border:0 !important; background:transparent !important; color:#777 !important; font-size:22px; line-height:1; padding:7px 8px; min-height:0; box-shadow:none !important; }
.p14-hint{ max-width:420px; margin:0 auto 16px; text-align:center; font-size:15px; color:var(--muted); }
.p14-card[data-p14]{ cursor:pointer; }
.p14-card.p14-on{ border-color:#DC3045 !important; box-shadow:0 0 0 2px #DC3045 inset; }
/* v208 · anche le righe del Protocollo 1 si toccano */
.proto-punti li[data-p14]{ cursor:pointer; -webkit-tap-highlight-color:transparent; }
.proto-punti li.p14-on{ box-shadow:0 0 0 2px #DC3045 inset; border-radius:12px; }

/* ===== SITO DI PROVA (non e' l'app vera): fascia sfumata - 25 nov 2026 ===== */
/* PROVA "rosso leggero": stesso rosso #DC3045, ma solo come accento */
:root{ --tinta:#F3F3F3; --tinta-t:#000; --cerchio:#2B2B2B; }
html[data-tema="chiaro"]{ --tinta:#000; --tinta-t:#fff; --cerchio:#000; }
/* fascia: non piu' rossa piena. Fondo della pagina, titolo nero/bianco, riga rossa sotto */
/* IT/EN e filtri: nero su bianco (bianco su nero in scuro) */
html .lang button.on, html[data-tema="chiaro"] .lang button.on{ background:var(--tinta) !important; color:var(--tinta-t) !important; }
html .cat-pill.on{ background:var(--tinta) !important; color:var(--tinta-t) !important; }
/* numeri dei passi: neri (bianchi in scuro), niente riga rossa a sinistra delle carte */
html [class$="-num"]{ color:var(--text) !important; }
/* cerchi coi numeri: neri */
html .ses-num, html .p14-num, html .pt-n{ background:var(--cerchio) !important; color:#fff !important; }
html .keq-lg[style*="gradient"]{ background:var(--tinta) !important; color:var(--tinta-t) !important; }
html .pt-n, html .pt-n *, html .ses-num, html .p14-num{ color:#fff !important; }
html:not([data-tema="chiaro"]) .pt-n, html:not([data-tema="chiaro"]) .ses-num, html:not([data-tema="chiaro"]) .p14-num{ box-shadow:0 0 0 1px #5A5A5A inset; }

/* FASCIA SFUMATA A: rosso pieno in alto che scende fino a sparire nello sfondo */
html header.band, html[data-tema="chiaro"] header.band{ background:linear-gradient(180deg,#DC3045 0%,#DC3045 14%,rgba(220,48,69,.62) 48%,rgba(220,48,69,.20) 82%,rgba(220,48,69,0) 100%), var(--bg) !important; border-bottom:0 !important; box-shadow:none !important; }
html header.band .logo, html header.band h1, html header.band h2, html header.band div{ color:var(--text) !important; }
html header.band .tagline, html header.band p, html header.band .band-sub{ color:var(--text) !important; opacity:.78; }

/* la fascia parte dal bordo in alto dello schermo: la striscia sopra diventa rossa nelle pagine con la fascia */
body:has(.view:not([hidden]) header.band) .topbar{ background:#DC3045 !important; visibility:visible !important; }
body:has(.view:not([hidden]) header.band) .topbar > *{ visibility:hidden !important; }
html header.band, html[data-tema="chiaro"] header.band{ background:linear-gradient(180deg,#DC3045 0%,rgba(220,48,69,.66) 42%,rgba(220,48,69,.22) 80%,rgba(220,48,69,0) 100%), var(--bg) !important; }

/* PALLINI: via il pallino pieno, resta solo il numero rosso (14 punti, Sessione, passi coi pallini) */
html .ses-num, html .p14-num, html .pt-n, html .cr-sdot, html .ene-step > .n, html .cf-fnum, html .cv-bnum, html .cod-num{ background:none !important; box-shadow:none !important; border-color:transparent !important; color:var(--gold) !important; font-weight:700 !important; }
html .pt-n *{ color:var(--gold) !important; }
html .ses-num, html .p14-num, html .pt-n{ font-size:24px !important; }
html .cr-sdot, html .ene-step > .n, html .cf-fnum, html .cv-bnum, html .cod-num{ font-size:20px !important; }

/* EQUILIBRIO: bianco PURO dappertutto (un solo bianco), nero un filo meno duro per le scritte lunghe, rosso solo come accento */
html:root[data-tema="chiaro"]{ --bg:#FFFFFF; --card:#FFFFFF; --line:#E6E6E6; --text:#1E1E1E; --muted:#5C5C5C; }
html:root:not([data-tema="chiaro"]){ --bg:#0E0E0E; --card:#1A1A1A; --line:#2E2E2E; --text:#E8E8E8; --muted:#9C9C9C; }
/* titoli: nero pieno (bianco pieno in scuro) */
html:root[data-tema="chiaro"] header.band h1, html:root[data-tema="chiaro"] header.band h2, html:root[data-tema="chiaro"] header.band .logo{ color:#000 !important; }
/* niente ombre rosse sotto i tasti: il tasto resta rosso ma non "vibra" */
html .btn, html [class$="-btn"], html [class$="-slink"]{ box-shadow:none !important; }

/* Sessione: la fascia era dentro la pagina, staccata dai bordi. Ora arriva ai bordi e parte dall'alto come nelle altre pagine */
html #prep-content > header.band{ margin:-18px -16px 18px !important; border-radius:0 !important; }
