/* ============================================================================
   cartellino-shell.css — guscio di navigazione «Y» (spec restyling 2026-09-23 §5)
   Intestazione, fascia LIVE, binario di icone che si apre a cartellini, barra in basso.
   Solo classi `ct-*`: layouts.css (che Management usa) non viene toccato.
   Caricato da Web (App.razor) e MAUI (index.html) dopo cartellino-skin.css.
   ========================================================================== */

:root {
  --ct-header-h: 64px;
  --ct-live-h: 36px;
  --ct-rail-w: 78px;
  --ct-rail-open-w: 256px;
  --ct-tabs-h: 64px;
  --ct-band-bg: #1b1813;
  --ct-band-fg: #f6f0e6;
}
html[data-theme="dark"] {
  --ct-band-bg: #08090b;
  --ct-band-fg: #f3efe7;
}

/* ── Griglia del guscio ───────────────────────────────────────────────────── */
.ct-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--ct-rail-w) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas: "banner banner" "top top" "rail main" "rail foot";
}
.ct-shell:has(.ct-rail.is-pinned) { grid-template-columns: var(--ct-rail-open-w) minmax(0, 1fr); }
.ct-shell__banner { grid-area: banner; }
.ct-shell__top { grid-area: top; position: sticky; top: 0; z-index: 220; }
.ct-shell__main { grid-area: main; min-width: 0; }
.ct-shell__foot { grid-area: foot; min-width: 0; }
.ct-shell > .ct-rail { grid-area: rail; }

/* Il banner «Scarica l'app» serve solo dove l'app esiste: telefono e tablet */
@media (min-width: 1024px) { .ct-shell__banner { display: none; } }

/* ── Banner «Scarica l'app» (solo sito, telefono; spento di default) ──────── */
/* Banner «Scarica l'app» (Danny 17-11: «graficamente brutto»). Sta sempre sul giallo del cartellino, quindi usa SOLO
   --tag e --tag-ink, uguali nei due temi: con --ink e --surface in tema scuro il bottone diventava chiaro e la riga
   sotto il titolo spariva. */
.ct-appbanner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px 10px 14px;
  background: var(--tag); color: var(--tag-ink);
  border-bottom: 2px solid var(--tag-ink);
}
.ct-appbanner__icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--tag-ink); color: var(--tag);
  font-weight: 900; font-size: 15px; letter-spacing: -0.04em;
  transform: rotate(-4deg);
}
.ct-appbanner__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.ct-appbanner__title { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.ct-appbanner__sub { font: 500 11px var(--font-mono); color: var(--tag-ink); opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-appbanner__btn {
  flex: none; min-height: 40px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--tag-ink); color: var(--tag);
  font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.ct-appbanner__btn:active { transform: translateY(1px); }
.ct-appbanner__close {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 50%;
  color: var(--tag-ink); font-size: 18px; cursor: pointer;
}
.ct-appbanner__btn:focus-visible, .ct-appbanner__close:focus-visible { outline: 3px solid var(--tag-ink); outline-offset: 2px; }
@media (min-width: 640px) { .ct-appbanner { display: none; } }

/* ── Intestazione ─────────────────────────────────────────────────────────── */
.ct-header {
  height: var(--ct-header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
}
.ct-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.ct-brand__mark {
  width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--ct-band-bg); color: var(--tag);
  font-weight: 900; font-size: 15px; letter-spacing: -0.04em;
  border: 2px solid var(--ink);
  transform: rotate(-4deg);
}
.ct-brand__name { font-weight: 900; font-size: 19px; letter-spacing: -0.035em; }
.ct-search {
  flex: 1; max-width: 680px; height: 42px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper);
}
.ct-search i { color: var(--ink-muted); }
.ct-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: 500 14px var(--font-mono); color: var(--ink);
  /* A 360 px il segnaposto finiva tagliato a metà parola («Cerca nelle offert»): almeno coi puntini */
  text-overflow: ellipsis;
}
.ct-search input::placeholder { color: var(--ink-muted); text-overflow: ellipsis; }
.ct-search:focus-within { box-shadow: var(--shadow-hard-sm); }
.ct-header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ct-icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink);
  font-size: 18px; text-decoration: none; cursor: pointer;
}
.ct-icon-btn:hover { background: var(--tag); color: var(--tag-ink); }

/* Campanella con il numero degli avvisi non letti (V13 Task 12) e carrello col numero delle offerte */
.ct-bell, .ct-cart { position: relative; }
.ct-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  display: inline-grid; place-items: center;
  border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--danger, #d92d0f); color: #fff;
  font: 700 11px/1 var(--font-mono);
}
.ct-badge--inline { position: static; margin-left: auto; }

/* Menu dell'avatar */
.ct-account { position: relative; }
.ct-account__veil { position: fixed; inset: 0; z-index: 230; }
.ct-account__menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 240;
  min-width: 240px; padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow-hard);
}
.ct-account__item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px;
  background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
}
.ct-account__item:hover { background: var(--tag); color: var(--tag-ink); }
.ct-account__row { padding: 4px; border-top: 1.5px dashed var(--rule); }
.ct-account__row .header-action, .ct-account__row .theme-toggle-btn {
  width: 100%; justify-content: flex-start; gap: 10px; padding: 8px; border-radius: 8px;
  background: none; border: 0; color: var(--ink); font: 700 14px var(--font-sans); display: flex; align-items: center;
}
.ct-account__row .language-selector .lang-btn-current {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px;
  background: none; border: 0; color: var(--ink); font: 700 14px var(--font-sans);
}
.ct-account__row .lang-dropdown {
  background: var(--surface); border: 2px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow-hard-sm);
}
.ct-account__row .lang-option { color: var(--ink); background: none; }
.ct-account__row .lang-option.active, .ct-account__row .lang-option:hover { background: var(--tag); color: var(--tag-ink); }

/* ── Fascia LIVE ──────────────────────────────────────────────────────────── */
.ct-live {
  height: var(--ct-live-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 12px;
  background: var(--ct-band-bg); color: var(--ct-band-fg);
  overflow: hidden;
}
.ct-live__count {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: 5px;
  background: var(--danger); color: var(--on-danger);
  font: 500 11px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
}
.ct-live__count .ct-live-dot { background: currentColor; box-shadow: none; width: 7px; height: 7px; }
.ct-live__viewport { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ct-live__track { display: flex; width: max-content; gap: 28px; }
@media (prefers-reduced-motion: no-preference) {
  .ct-live__track { animation: ct-marquee var(--ct-live-duration, 60s) linear infinite; }
  .ct-live__viewport:hover .ct-live__track, .ct-live__viewport:focus-within .ct-live__track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-live__viewport { overflow-x: auto; scrollbar-width: none; }
  .ct-live__track > [aria-hidden="true"] { display: none; }
}
@keyframes ct-marquee { to { transform: translateX(-50%); } }
.ct-live__item {
  display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap;
  color: var(--ct-band-fg); text-decoration: none; font: 500 12px var(--font-mono);
}
.ct-live__item:hover .ct-live__title { text-decoration: underline; }
.ct-live__item > i { color: var(--save); font-size: 10px; }
.ct-live__err { background: var(--danger); color: var(--on-danger); padding: 1px 5px; border-radius: 3px; font-size: 10px; }
.ct-live__store { opacity: 0.7; text-transform: uppercase; font-size: 10px; letter-spacing: 0.08em; }
.ct-live__title { font-family: var(--font-sans); font-weight: 500; }
.ct-live__price { color: var(--tag); font-family: var(--font-sans); font-weight: 900; font-size: 14px; }
.ct-live__pct { color: #6ee7a8; }

/* ── Binario / menu a cartellini ──────────────────────────────────────────── */
.ct-rail {
  position: sticky; top: calc(var(--ct-header-h) + var(--ct-live-h));
  height: calc(100vh - var(--ct-header-h) - var(--ct-live-h));
  height: calc(100dvh - var(--ct-header-h) - var(--ct-live-h));
  z-index: 180;
}
.ct-rail__panel {
  position: absolute; inset: 0 auto 0 0;
  width: var(--ct-rail-w);
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 8px;
  background: var(--surface); border-right: 2px solid var(--ink);
  overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
  transition: width 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.ct-rail__toggle {
  display: none; align-self: center;
  width: 44px; height: 44px; margin-bottom: 6px; border-radius: 10px;
  border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 18px; cursor: pointer;
}
.ct-rail__group {
  height: 0; overflow: hidden; opacity: 0;
  font: 500 10px var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted);
  padding: 0 10px;
}
.ct-rail__group:not(:first-of-type) { margin-top: 6px; }
.ct-rail__group + .ct-rail__item { margin-top: 2px; }
.ct-rail__item, .ct-rail__telegram, .ct-rail__pin {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px; border-radius: 10px;
  color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer;
  font-family: var(--font-sans);
}
.ct-rail__item:hover, .ct-rail__pin:hover { background: var(--surface-sunk); }
.ct-rail__icon { position: relative; display: grid; place-items: center; width: 40px; height: 32px; border-radius: 9px; font-size: 18px; }
.ct-rail__short { font-size: 10.5px; font-weight: 700; line-height: 1.1; text-align: center; }
.ct-rail__label, .ct-rail__count { display: none; }
.ct-rail__dot {
  position: absolute; top: -4px; right: -8px;
  min-width: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  font: 500 9px/16px var(--font-mono); text-align: center;
}
.ct-rail__dot.is-live { background: var(--danger); color: var(--on-danger); }
.ct-rail__item.is-active .ct-rail__icon { background: var(--tag); color: var(--tag-ink); border: 2px solid var(--ink); }
.ct-rail__item.is-active .ct-rail__short { color: var(--ink); }
.ct-rail__foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1.5px dashed var(--rule); }
.ct-rail__telegram i { font-size: 20px; color: #229ed9; }
.ct-rail__pin i { font-size: 16px; }
.ct-rail__veil { display: none; }

/* Aperto: puntina (PC), tocco (tablet), passaggio del mouse (solo PC con mouse) */
.ct-rail:is(.is-pinned, .is-open) .ct-rail__panel { width: var(--ct-rail-open-w); }
.ct-rail.is-open .ct-rail__panel { box-shadow: 6px 0 0 rgba(27, 24, 19, 0.14); }
.ct-rail:is(.is-pinned, .is-open) .ct-rail__group { height: auto; opacity: 1; padding: 8px 10px 4px; }
.ct-rail:is(.is-pinned, .is-open) :is(.ct-rail__item, .ct-rail__telegram, .ct-rail__pin) { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 6px 10px; }
.ct-rail:is(.is-pinned, .is-open) .ct-rail__short { display: none; }
.ct-rail:is(.is-pinned, .is-open) :is(.ct-rail__label, .ct-rail__count) { display: inline; }
.ct-rail:is(.is-pinned, .is-open) .ct-rail__label { font-size: 14px; font-weight: 700; white-space: nowrap; }
.ct-rail:is(.is-pinned, .is-open) .ct-rail__dot { display: none; }
.ct-rail:is(.is-pinned, .is-open) .ct-rail__item.is-active {
  background: var(--tag); color: var(--tag-ink);
  border: 2px solid var(--ink);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  padding-left: 18px;
}
.ct-rail:is(.is-pinned, .is-open) .ct-rail__item.is-active .ct-rail__icon { background: none; border: 0; }

@media (min-width: 1024px) and (hover: hover) {
  .ct-rail:is(:hover, :focus-within) .ct-rail__panel { width: var(--ct-rail-open-w); box-shadow: 6px 0 0 rgba(27, 24, 19, 0.14); }
  .ct-rail.is-pinned .ct-rail__panel { box-shadow: none; }
  .ct-rail:is(:hover, :focus-within) .ct-rail__group { height: auto; opacity: 1; padding: 8px 10px 4px; }
  .ct-rail:is(:hover, :focus-within) :is(.ct-rail__item, .ct-rail__telegram, .ct-rail__pin) { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 6px 10px; }
  .ct-rail:is(:hover, :focus-within) .ct-rail__short { display: none; }
  .ct-rail:is(:hover, :focus-within) :is(.ct-rail__label, .ct-rail__count) { display: inline; }
  .ct-rail:is(:hover, :focus-within) .ct-rail__label { font-size: 14px; font-weight: 700; white-space: nowrap; }
  .ct-rail:is(:hover, :focus-within) .ct-rail__dot { display: none; }
  .ct-rail:is(:hover, :focus-within) .ct-rail__item.is-active {
    background: var(--tag); color: var(--tag-ink);
    border: 2px solid var(--ink);
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
    padding-left: 18px;
  }
  .ct-rail:is(:hover, :focus-within) .ct-rail__item.is-active .ct-rail__icon { background: none; border: 0; }
}
.ct-rail__count {
  margin-left: auto;
  font: 500 11px var(--font-mono); color: var(--ink-muted);
}
.ct-rail__count.is-live { color: var(--on-danger); background: var(--danger); padding: 1px 6px; border-radius: 4px; }

/* Tablet: niente passaggio del mouse, si apre col bottone come cassetto sopra il contenuto */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .ct-rail__toggle { display: grid; place-items: center; }
  .ct-rail__pin { display: none; }
  .ct-shell:has(.ct-rail.is-pinned) { grid-template-columns: var(--ct-rail-w) minmax(0, 1fr); }
  .ct-rail.is-pinned:not(.is-open) .ct-rail__panel { width: var(--ct-rail-w); }
  .ct-rail.is-open ~ .ct-rail__veil,
  .ct-rail__veil { display: block; position: fixed; inset: 0; z-index: 170; background: rgba(27, 24, 19, 0.35); }
}

/* ── Footer su telefono (Danny 14-10: «troppo ingombrante») ───────────────────
   A 390 px il footer era alto 942 px, più di uno schermo. Su telefono le voci di «Esplora» stanno già nella
   barra in basso e nel foglio «Altro»: il blocco si toglie, la frase sotto il logo pure, e i tre blocchi
   restanti vanno su due colonne fitte. Il footer chiude sopra la barra in basso, che altrimenti lo copre. */
@media (max-width: 639.98px) {
  .ct-shell__foot.app-footer {
    padding: 18px 16px calc(var(--ct-tabs-h) + var(--safe-area-bottom, 0px) + 12px);
  }
  .ct-shell__main:has(+ .ct-shell__foot) { padding-bottom: 16px; }
  /* Nella Home il footer è nascosto (dashboard-redesign.css, `body:has(.rd) .app-footer`) ma resta nel DOM, quindi la
     regola sopra scattava lo stesso e il fondo della pagina finiva sotto la barra in basso (28-10: riquadro Coupon
     coperto per 48 px su 64 a 360 px). Lì torna lo spazio della barra. */
  body:has(.rd) .ct-shell__main:has(+ .ct-shell__foot) { padding-bottom: calc(var(--ct-tabs-h) + var(--safe-area-bottom, 0px) + 12px); }
  .ct-shell__foot .footer-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px; margin-bottom: 14px;
  }
  .ct-shell__foot .footer-brand { grid-column: 1 / -1; max-width: none; }
  .ct-shell__foot .footer-logo { margin-bottom: 0; font-size: 1rem; }
  .ct-shell__foot .footer-brand p,
  .ct-shell__foot .footer-section--explore { display: none; }
  .ct-shell__foot .footer-section h5 { margin-bottom: 4px; font-size: 11px; }
  .ct-shell__foot .footer-section li { margin-bottom: 0; }
  .ct-shell__foot .footer-section a { padding: 5px 0; font-size: 13px; }   /* bersaglio di tocco ≥ 24 px */
  .ct-shell__foot .footer-bottom { padding-top: 10px; }
  .ct-shell__foot .footer-bottom p { font-size: 11px; }
}

/* ── Segnalazioni beta: FeedbackSheet (foglio dal basso su telefono e app, dialogo da 480 px su PC) ───────── */
/* Sopra il modale del dettaglio (z 400/500): «Segnala» si apre anche da lì */
.ct-fb__veil { position: fixed; inset: 0; z-index: 610; background: rgba(27, 24, 19, 0.45); }
.ct-fb {
  position: fixed; z-index: 615; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 12px;
  max-height: 92vh; overflow-y: auto;
  padding: 10px 14px calc(var(--safe-area-bottom, 0px) + 14px);
  background: var(--surface); color: var(--ink); border-top: 2px solid var(--ink); border-radius: 18px 18px 0 0;
}
.ct-fb__grab { width: 44px; height: 5px; border-radius: 3px; background: var(--rule); margin: 0 auto; }
.ct-fb__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ct-fb__title { margin: 0; font-weight: 900; font-size: 18px; }
.ct-fb__deal { margin: 0; color: var(--ink-muted); font-size: 13px; overflow-wrap: anywhere; }
.ct-fb__reasons { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ct-fb__reasons legend { padding: 0; margin-bottom: 6px; font: 700 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.ct-fb__reason {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 12px; background: var(--surface); font-weight: 700; font-size: 14px;
}
.ct-fb__reason input { width: 18px; height: 18px; flex: none; accent-color: var(--ink); }
.ct-fb__reason.is-on { background: var(--tag); color: var(--tag-ink); }
.ct-fb__reason:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.ct-fb__field { display: flex; flex-direction: column; gap: 4px; }
.ct-fb__field label { font-weight: 700; font-size: 13px; }
.ct-fb__field textarea, .ct-fb__field input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font: 500 16px var(--font-sans);
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--ink); border-radius: 10px;
}
.ct-fb__field textarea { resize: vertical; min-height: 96px; }
.ct-fb__field [aria-invalid="true"] { border-color: var(--danger); }
.ct-fb__count { align-self: flex-end; font: 500 11px var(--font-mono); color: var(--ink-muted); }
.ct-fb__note { margin: 0; font-size: 12px; color: var(--ink-muted); }
.ct-fb__result { min-height: 18px; font-size: 13px; font-weight: 700; }
.ct-fb__error { color: var(--danger); font-size: 13px; font-weight: 700; }
.ct-fb__hint { color: var(--ink-muted); }
.ct-fb__send { align-self: stretch; min-height: 48px; }
.ct-fb__send:disabled { opacity: 0.5; cursor: not-allowed; }
.ct-fb__thanks { display: flex; align-items: center; gap: 10px; margin: 8px 0 16px; font-weight: 900; font-size: 18px; }
.ct-fb__thanks:empty { margin: 0; }
.ct-fb__thanks:focus { outline: none; }
@media (min-width: 640px) {
  .ct-fb {
    left: 50%; right: auto; bottom: auto; top: 50%; width: min(480px, calc(100vw - 32px));
    transform: translate(-50%, -50%); max-height: 88vh;
    padding: 16px 18px 18px; border: 2px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink);
  }
  .ct-fb__grab { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .ct-fb { animation: ct-fb-in 0.18s ease-out; }
}
@keyframes ct-fb-in { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

/* ── Telefono: niente binario, barra in basso ─────────────────────────────── */
.ct-tabs, .ct-sheet, .ct-sheet__veil { display: none; }
@media (max-width: 639.98px) {
  :root { --ct-header-h: 58px; --ct-live-h: 32px; --tabbar-h: var(--ct-tabs-h); }  /* barra in basso presente: gli avvisi (.ct-undo) la scavalcano */
  .ct-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "banner" "top" "main" "foot"; }
  .ct-shell:has(.ct-rail.is-pinned) { grid-template-columns: minmax(0, 1fr); }
  .ct-shell > .ct-rail, .ct-rail__veil { display: none; }
  .ct-shell__main { padding-bottom: calc(var(--ct-tabs-h) + var(--safe-area-bottom, 0px) + 12px); }
  .ct-header { gap: 10px; padding: 0 10px; }
  .ct-brand__name, .ct-hide-phone { display: none; }
  .ct-search { height: 40px; padding: 0 12px; }
  .ct-search input { font-size: 16px; }   /* sotto i 16 px iOS ingrandisce la pagina al fuoco */
  .ct-live { gap: 8px; padding: 0 8px; }
  .ct-live__count { padding: 3px 8px; font-size: 10px; }

  .ct-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    display: flex; height: calc(var(--ct-tabs-h) + var(--safe-area-bottom, 0px));
    padding-bottom: var(--safe-area-bottom, 0px);
    background: var(--surface); border-top: 2px solid var(--ink);
  }
  .ct-tabs__item {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--ink-muted); text-decoration: none; background: none; border: 0; cursor: pointer;
    font: 700 11px var(--font-sans);
  }
  .ct-tabs__icon { display: grid; place-items: center; width: 48px; height: 30px; border-radius: 10px; font-size: 19px; }
  .ct-tabs__item.is-active { color: var(--ink); }
  .ct-tabs__item.is-active .ct-tabs__icon { background: var(--tag); color: var(--tag-ink); border: 2px solid var(--ink); }

  .ct-sheet__veil { display: block; position: fixed; inset: 0; z-index: 210; background: rgba(27, 24, 19, 0.45); }
  .ct-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 215;
    display: flex; flex-direction: column; gap: 12px;
    max-height: 85vh; overflow-y: auto;
    padding: 10px 14px calc(var(--ct-tabs-h) + var(--safe-area-bottom, 0px) + 14px);
    background: var(--surface); border-top: 2px solid var(--ink); border-radius: 18px 18px 0 0;
  }
  .ct-sheet__grab { width: 44px; height: 5px; border-radius: 3px; background: var(--rule); margin: 0 auto; }
  .ct-sheet__head { display: flex; align-items: center; justify-content: space-between; font-weight: 900; font-size: 18px; }
  .ct-sheet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ct-sheet__item {
    position: relative; min-height: 76px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--ink); background: var(--paper);
    color: var(--ink); text-decoration: none; font-weight: 700; font-size: 12px; text-align: center;
  }
  .ct-sheet__item i { font-size: 20px; }
  .ct-sheet__item.is-active { background: var(--tag); color: var(--tag-ink); }
  .ct-sheet__item .ct-rail__count { display: inline; position: absolute; top: 6px; right: 6px; margin: 0; }
  .ct-sheet__telegram { align-self: stretch; }
  .ct-sheet__feedback {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px;
    border: 1.5px dashed var(--ink); border-radius: 12px; background: none;
    color: var(--ink); font: 700 14px var(--font-sans); text-align: left; cursor: pointer;
  }
  .ct-sheet__feedback i { font-size: 18px; }
}

/* ── Tocco (verifica da telefono del 23-10) ─────────────────────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* La barra di 8 px di unified-theme.css, pensata per il mouse, nei fogli dal basso passava sopra la X e le «›» */
  ::-webkit-scrollbar { width: 0; height: 0; }
  /* Link del piede: alti 30 px, uno sotto l'altro */
  .app-footer .footer-section a { display: inline-flex; align-items: center; min-height: 40px; }
}

/* ── Sezioni «in arrivo» (voce 2 app, 2026-11-01) ─────────────────────────────
   PRESTO: piccola etichetta gialla accanto alla voce. Pannello: timbro giallo, frase e bottone Telegram. */
.ct-soon-tag {
  display: inline-block; flex: none; margin-left: 6px; padding: 1px 5px;
  font: 700 9px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  color: var(--tag-ink); background: var(--tag); border: 1.5px solid var(--ink); border-radius: 4px;
  transform: rotate(-3deg);
}
.ct-tabs__item .ct-soon-tag { position: absolute; top: 2px; right: 2px; margin: 0; font-size: 8px; padding: 0 3px; }
.ct-tabs__item { position: relative; }
.ct-sheet__item .ct-soon-tag { position: absolute; top: 6px; right: 6px; margin: 0; }
.ct-sheet__row .ct-soon-tag { margin-left: auto; }
.ct-rail .ct-soon-tag { display: none; }
.ct-rail:is(.is-pinned, .is-open) .ct-soon-tag { display: inline-block; }
@media (min-width: 1024px) and (hover: hover) {
  .ct-rail:is(:hover, :focus-within) .ct-soon-tag { display: inline-block; }
}
.footer-section h5 .ct-soon-tag, .footer-section li .ct-soon-tag { vertical-align: middle; }

.ct-soon {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  max-width: 460px; margin: 48px auto; padding: 28px 20px; text-align: center;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 10px; box-shadow: var(--shadow-hard);
}
.ct-soon__badge {
  padding: 3px 14px; font: 900 18px/1.2 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--tag-ink); background: var(--tag); border: 3px double var(--ink); border-radius: 6px;
  transform: rotate(-4deg);
}
.ct-soon__title { margin: 0; font: 900 24px/1.15 var(--font-sans); color: var(--ink); overflow-wrap: anywhere; }
.ct-soon__text { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.ct-soon__home { color: var(--ink-muted); font-size: 14px; }
.ct-soon__mail { margin: 0; color: var(--ink-soft); line-height: 1.5; overflow-wrap: anywhere; }
.ct-soon__mail a { font-weight: 700; color: var(--ink); }
@media (max-width: 399.98px) {
  .ct-soon { margin: 24px 16px; padding: 22px 14px; }
}

/* Voce «Beta · scrivici» del piede: un bottone che si legge come gli altri link della colonna */
.footer-section .footer-link-btn {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: 0;
  background: none; border: 0; cursor: pointer; font: inherit;
  color: var(--text-secondary); font-size: var(--text-sm); transition: var(--transition-fast);
}
.footer-section .footer-link-btn:hover { color: var(--brand-primary); }
@media (max-width: 767.98px) {
  .ct-shell__foot .footer-section .footer-link-btn { padding: 5px 0; font-size: 13px; }
}
@media (hover: none) and (pointer: coarse) {
  .app-footer .footer-section .footer-link-btn { min-height: 40px; }
}

/* Avviso dei link di affiliazione nel piè di pagina (V10) */
.ct-shell__foot .footer-bottom .footer-affiliate-notice { margin: 0 0 6px; }
