/* ============================================================
   InfoComuni — Mobile Magic CSS (Steve Jobs touch)
   v1.0 — 2026-05-27 — Tutto mobile-only (<= 768px)
   ============================================================ */

@media (max-width: 768px) {

  /* ========== 1. ONBOARDING fullscreen ========== */
  .ic-mob-onboard {
    position: fixed; inset: 0;
    z-index: 9999;
    background: linear-gradient(160deg, #0b2340 0%, #0d4f3f 100%);
    display: flex; flex-direction: column;
    color: #fff;
    animation: ic-fade-in 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .ic-mob-onboard.is-closing { animation: ic-fade-out 280ms forwards; }
  .ic-mob-onboard__shell {
    flex: 1; display: flex; flex-direction: column;
    padding: 20px 0 32px;
    overflow: hidden;
  }
  .ic-mob-onboard__slides {
    display: flex;
    flex: 1;
    transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
  }
  .ic-mob-onboard__slide {
    flex: 0 0 100%;
    padding: 0 32px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
  }
  .ic-mob-onboard__art {
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(243,184,64,0.35) 0%, rgba(243,184,64,0.06) 60%, transparent 100%);
    margin-bottom: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 88px;
    position: relative;
  }
  .ic-mob-onboard__art::before {
    content: ""; position: absolute; inset: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
  }
  .ic-mob-onboard__art--map::after { content: "🗺"; position: relative; z-index: 1; }
  .ic-mob-onboard__art--bandi::after { content: "🎯"; position: relative; z-index: 1; }
  .ic-mob-onboard__art--save::after { content: "✨"; position: relative; z-index: 1; }

  /* Titolo: specificità massima + text-shadow safety + -webkit-text-fill per Safari */
  html body .ic-mob-onboard .ic-mob-onboard__slide h2,
  html body .ic-mob-onboard h2 {
    font-size: 30px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.18);
    line-height: 1.18 !important;
    text-align: center !important;
    opacity: 1 !important;
    background: none !important;
    -webkit-background-clip: initial !important;
  }
  /* Body text: più contrasto (78% -> 92%) + text-shadow leggera */
  html body .ic-mob-onboard .ic-mob-onboard__slide p,
  html body .ic-mob-onboard p {
    font-size: 16.5px !important;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.94) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.94) !important;
    margin: 0 !important;
    max-width: 340px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    text-align: center !important;
    opacity: 1 !important;
  }
  html body .ic-mob-onboard .ic-mob-onboard__slide strong,
  html body .ic-mob-onboard strong {
    color: #ffd57a !important;
    -webkit-text-fill-color: #ffd57a !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  }

  /* Background overlay più scuro per garantire contrasto su qualsiasi gradient */
  .ic-mob-onboard {
    background:
      radial-gradient(circle at 30% 20%, rgba(20, 161, 105, 0.20) 0%, transparent 55%),
      radial-gradient(circle at 80% 80%, rgba(243, 184, 64, 0.10) 0%, transparent 50%),
      linear-gradient(160deg, #061525 0%, #0b2340 50%, #0a3a32 100%) !important;
  }

  /* Pulsanti onboarding: maggiore contrasto label */
  html body .ic-mob-onboard .ic-mob-onboard__skip {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    font-weight: 700 !important;
  }
  html body .ic-mob-onboard .ic-mob-onboard__next {
    background: #f3b840 !important;
    color: #0b2340 !important;
    -webkit-text-fill-color: #0b2340 !important;
    font-weight: 800 !important;
  }

  .ic-mob-onboard__dots {
    display: flex; justify-content: center; gap: 8px;
    padding: 18px 0 14px;
  }
  .ic-mob-onboard__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.28);
    transition: background 200ms ease, width 200ms ease;
    cursor: pointer;
  }
  .ic-mob-onboard__dot.is-active {
    background: #f3b840;
    width: 24px;
    border-radius: 4px;
  }

  .ic-mob-onboard__actions {
    display: flex; gap: 12px; padding: 0 24px;
  }
  .ic-mob-onboard__skip,
  .ic-mob-onboard__next {
    flex: 1;
    min-height: 52px;
    border-radius: 14px;
    border: 0;
    font: inherit; font-size: 16px; font-weight: 700;
    cursor: pointer;
    transition: transform 120ms ease, background 200ms ease;
  }
  .ic-mob-onboard__skip {
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.78);
  }
  .ic-mob-onboard__next {
    background: #f3b840;
    color: #0b2340;
    box-shadow: 0 8px 24px rgba(243,184,64,0.32);
  }
  .ic-mob-onboard__skip:active,
  .ic-mob-onboard__next:active { transform: scale(0.97); }

  /* ========== 2. STAGGERED FADE-UP cards entrata ========== */
  .ic-mob-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 480ms cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 480ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
  }
  .ic-mob-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
  }
  @media (prefers-reduced-motion: reduce) {
    .ic-mob-reveal { transition: none; opacity: 1; transform: none; }
  }

  /* ========== 3. PULL-TO-REFRESH ========== */
  .ic-mob-ptr {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 14px rgba(11,35,64,0.18);
    display: flex; align-items: center; justify-content: center;
    color: #1f8763;
    z-index: 999;
    opacity: 0;
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
  }
  .ic-mob-ptr__spinner {
    display: flex; align-items: center; justify-content: center;
    transition: transform 240ms ease;
  }
  .ic-mob-ptr.is-ready .ic-mob-ptr__spinner {
    transform: rotate(180deg);
    color: #f3b840;
  }
  .ic-mob-ptr.is-loading .ic-mob-ptr__spinner {
    animation: ic-spin 0.9s linear infinite;
  }

  /* ========== 4. SEARCH AUTOSUGGEST dropdown ========== */
  .ic-mob-suggest {
    position: absolute;
    left: 0; right: 0; top: 100%;
    margin-top: 6px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(11,35,64,0.18);
    overflow: hidden;
    z-index: 50;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: ic-suggest-in 200ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .ic-mob-suggest__title {
    padding: 12px 16px 6px;
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7585;
  }
  .ic-mob-suggest__item {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 0;
    font: inherit; font-size: 14px;
    color: #0b2340;
    text-align: left;
    cursor: pointer;
    min-height: 44px;
  }
  .ic-mob-suggest__item:active { background: #f3f4f7; }
  .ic-mob-suggest__ic { width: 22px; text-align: center; opacity: 0.6; }

  /* ========== 5. SKELETON LOADERS per dataset in caricamento ========== */
  .ic-mob-skeleton {
    background: linear-gradient(90deg, #eef0f4 0%, #f8fafc 50%, #eef0f4 100%);
    background-size: 200% 100%;
    animation: ic-skel 1.4s linear infinite;
    border-radius: 6px;
  }
  .ic-mob-skeleton--card {
    height: 220px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  /* ========== 6. INPUT FIELD focus ring premium ========== */
  input:focus, textarea:focus, select:focus {
    outline: 0 !important;
  }
  input:focus-visible, textarea:focus-visible, select:focus-visible {
    box-shadow: 0 0 0 3px rgba(31,135,99,0.18);
  }

  /* Button press feedback universale */
  button:active:not(:disabled),
  a.nt-btn:active, a.bn-cta-fonte__btn:active, a.bn-back:active,
  .ic-mob-card:active, .jc-card:active {
    transform: scale(0.97) !important;
    transition: transform 100ms ease !important;
  }
}

/* ============================================================
   SEARCH BAR — Forza visibilità mobile (override regole legacy)
   v3.0 — 2026-05-27 — Specificity boost per battere
   ic-header-unify.css + ic-mobile-home-fit.css che lo nascondono
   ============================================================ */
@media (max-width: 768px) {
  /* SUPER-specificity override (5 layer) — batte:
     - body[data-view="home"] #ic-search-bar (0,2,2)
     - body.layout-mobile[data-view="home"] #ic-search-bar (0,3,2)
     - #ic-search-bar (0,1,0) */
  html body[data-view] #ic-search-bar,
  html body[class] #ic-search-bar,
  html body.layout-mobile #ic-search-bar,
  html body.layout-mobile[data-view] #ic-search-bar,
  html body.layout-mobile[data-view="home"] #ic-search-bar,
  html body[data-view="home"] #ic-search-bar,
  html body #ic-search-bar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
    margin: 8px 16px 18px !important;
    padding: 0 !important;
    max-width: none !important;
  }
  html body #ic-search-bar > div:first-child {
    display: block !important;
    position: relative !important;
  }
  html body #ic-search-bar input[type="search"] {
    width: 100% !important;
    background: #ffffff !important;
    color: #0b2340 !important;
    border: 2px solid rgba(243, 184, 64, 0.55) !important;
    border-radius: 14px !important;
    padding: 14px 18px 14px 48px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 18px rgba(11, 35, 64, 0.10) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    height: auto !important;
    min-height: 50px !important;
  }
  html body #ic-search-bar input[type="search"]::placeholder {
    color: rgba(11, 35, 64, 0.48) !important;
  }
  html body #ic-search-bar input[type="search"]:focus {
    border-color: #1f8763 !important;
    box-shadow: 0 0 0 4px rgba(31, 135, 99, 0.12), 0 4px 18px rgba(11, 35, 64, 0.10) !important;
  }
  html body #ic-search-bar svg {
    stroke: #d99a2c !important;
    fill: none !important;
    width: 20px !important;
    height: 20px !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    position: absolute !important;
  }
  /* Subtitle "257 Comuni ·..." nascosta su mobile per pulizia */
  html body #ic-search-bar > div:last-child:not(:first-child) {
    display: none !important;
  }
}

/* ============================================================
   PROVINCE PILL — Lista verticale stile iOS Settings (mobile)
   v2.0 — 2026-05-27
   Ogni provincia: icona-pallino sx + nome center-left + chevron dx
   6 pill impilate verticalmente, una sotto l'altra
   ============================================================ */
@media (max-width: 768px) {
  /* Container: 1 colonna verticale, gap 8px (densità ottimizzata) */
  html body #provPills,
  html body .prov-pills#provPills,
  html body section .prov-pills#provPills {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 0 16px 8px !important;
    margin: 0 auto !important;
    max-width: 100% !important;
  }

  /* === DENSITÀ verticale ottimizzata (solo padding/margin — no display) ===
     Comprime spazi morti senza toccare gli elementi interni */

  /* Hero: padding-top ridotto, padding-bottom minimo */
  html body section.hero,
  html body section.hero-section,
  html body section.hero--puglia-map {
    padding-top: 8px !important;
    padding-bottom: 4px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  /* Hero content gap ridotto */
  html body .hero-content--compact {
    padding-top: 0 !important;
    gap: 6px !important;
  }
  /* H1 title spacing */
  html body .ic-hero-h1-visible {
    margin: 0 !important;
    padding: 0 8px !important;
  }
  /* Sub h1 più discreto + spazio bottom ZERO (era 50px+) */
  html body .ic-hero-h1-visible__sub {
    font-size: 13.5px !important;
    line-height: 1.35 !important;
    color: rgba(11, 35, 64, 0.62) !important;
    font-weight: 500 !important;
    margin: 2px 0 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  /* HERO CONTENT — elimina gap esagerato sub-h1 → search */
  html body .hero-content > * + * { margin-top: 0 !important; }
  html body .hero-content { gap: 4px !important; padding-bottom: 0 !important; }
  html body .hero-content--compact { gap: 4px !important; padding-bottom: 0 !important; }

  /* Search bar — direttamente attaccata al subtitle */
  html body #ic-search-bar {
    margin: 2px 16px 4px !important;
  }
  /* Hero CTA-wrap se presente: rimuovi margin top esagerato */
  html body .ic-hero-cta-wrap {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
  }
  /* Claim "257 COMUNI · …" — compatto, vicino alla search */
  html body [data-i18n="home_search_subtitle"] {
    font-size: 10.5px !important;
    letter-spacing: 0.05em !important;
    line-height: 1.25 !important;
    margin-top: 4px !important;
    color: rgba(11, 35, 64, 0.55) !important;
  }

  /* Sezione province container: meno spazio sopra */
  html body section:has(#provPills) {
    padding-top: 4px !important;
  }

  /* Widget chat — sposto a basso-sx (NON copre il contenuto centrale).
     SOLO position/bottom/right/left, niente bg/display/width per non rompere */
  body > elevenlabs-convai,
  html body > elevenlabs-convai {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
    left: auto !important;
    right: 12px !important;
    margin: 0 !important;
    transform: none !important;
  }

  html body #provPills .prov-pill-wrap,
  html body #provPills > details {
    margin: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Pill: pallino GRANDE a sinistra + gap 18px + testo non tocca + chev dx */
  html body #provPills .prov-pill-wrap > summary.prov-pill,
  html body section #provPills .prov-pill-wrap > summary.prov-pill {
    display: grid !important;
    grid-template-columns: 56px 1fr 22px !important;
    grid-template-rows: auto !important;
    grid-template-areas: "icon text chev" !important;
    align-items: center !important;
    gap: 18px !important;          /* gap 18px → testo NON tocca pallino */
    padding: 10px 14px 10px 10px !important;  /* padding sx ridotto = pallino verso bordo */
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid rgba(11, 35, 64, 0.08) !important;
    box-shadow: 0 1px 2px rgba(11, 35, 64, 0.04), 0 4px 12px rgba(11, 35, 64, 0.04) !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    min-height: 72px !important;
    text-decoration: none !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease !important;
  }

  /* Hover/Active feedback */
  html body #provPills .prov-pill-wrap > summary.prov-pill:active {
    transform: scale(0.98) !important;
    background: #f8fafc !important;
  }
  html body #provPills .prov-pill-wrap > summary.prov-pill:hover {
    border-color: rgba(243, 184, 64, 0.36) !important;
    box-shadow: 0 4px 12px rgba(11, 35, 64, 0.06), 0 12px 24px rgba(11, 35, 64, 0.06) !important;
  }

  /* Icona pallino tondo GRANDE 56px (era 42px) */
  html body #provPills .prov-pill__icon {
    grid-area: icon !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    padding: 8px !important;
    background:
      radial-gradient(circle at 30% 28%, rgba(255, 213, 122, 0.50) 0%, transparent 60%),
      linear-gradient(135deg, rgba(243, 184, 64, 0.24) 0%, rgba(243, 184, 64, 0.08) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      inset 0 0 0 1.5px rgba(243, 184, 64, 0.22) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
  }
  /* Icone interne 36px (era 26px) — pallino "abitato" */
  html body #provPills .prov-pill__icon img,
  html body #provPills .prov-pill__icon svg {
    width: 36px !important;
    height: 36px !important;
    color: #0b2340 !important;
    stroke-width: 1.8 !important;
  }

  /* Testo: nome + meta */
  html body #provPills .prov-pill__text {
    grid-area: text !important;
    padding: 0 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    text-align: left !important;
  }
  html body #provPills .prov-pill__name {
    font-size: 15.5px !important;
    font-weight: 800 !important;
    color: #0b2340 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.014em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
    text-shadow: none !important;
    background: none !important;
  }
  /* BAT (Barletta/Andria/Trani): font 11.5px + tracking stretto + force show full */
  html body #provPills .prov-pill-wrap[data-prov="BT"] .prov-pill__name,
  html body #provPills .prov-pill-wrap[data-prov="BAT"] .prov-pill__name,
  html body #provPills .prov-pill-wrap[data-prov="bat"] .prov-pill__name {
    font-size: 11.5px !important;
    letter-spacing: -0.030em !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
    width: auto !important;
    word-spacing: -0.05em !important;
  }
  html body #provPills .prov-pill-wrap[data-prov="BT"] .prov-pill__text,
  html body #provPills .prov-pill-wrap[data-prov="BAT"] .prov-pill__text {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
  }
  /* Meta "41 comuni" - compatta */
  html body #provPills .prov-pill__meta {
    display: block !important;
    font-size: 11.5px !important;
    color: #6b7585 !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    margin-top: 0 !important;
  }

  /* Chevron a destra (›) */
  html body #provPills .prov-pill__chev {
    grid-area: chev !important;
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    color: #94a3b8 !important;
    flex-shrink: 0 !important;
    transition: transform 0.18s ease, color 0.18s ease !important;
  }
  html body #provPills .prov-pill-wrap[open] .prov-pill__chev {
    transform: rotate(90deg) !important;
    color: #f3b840 !important;
  }

  /* Open state — leggero shift gold per indicare apertura */
  html body #provPills .prov-pill-wrap[open] > summary.prov-pill {
    border-color: rgba(243, 184, 64, 0.45) !important;
    background: linear-gradient(135deg, #fffbf2 0%, #fff7e6 100%) !important;
    box-shadow: 0 4px 14px rgba(243, 184, 64, 0.18) !important;
  }

  /* Dropdown comuni: drawer sotto la pill, full-width */
  html body #provPills .prov-pill-wrap[open] .prov-dd {
    position: static !important;
    left: auto !important; right: auto !important;
    top: auto !important;
    margin: 6px 0 0 !important;
    width: 100% !important;
    background: #fff !important;
    border: 1px solid rgba(11, 35, 64, 0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(11, 35, 64, 0.06) !important;
    z-index: auto !important;
  }
}

/* Schermi molto stretti: dimensioni leggermente ridotte */
@media (max-width: 360px) {
  html body #provPills { gap: 8px !important; padding: 4px 12px 10px !important; }
  html body #provPills .prov-pill-wrap > summary.prov-pill {
    padding: 12px 14px !important;
    min-height: 64px !important;
    grid-template-columns: 44px 1fr 20px !important;
    gap: 12px !important;
  }
  html body #provPills .prov-pill__icon { width: 44px !important; height: 44px !important; padding: 7px !important; }
  html body #provPills .prov-pill__icon img,
  html body #provPills .prov-pill__icon svg { width: 24px !important; height: 24px !important; }
  html body #provPills .prov-pill__name { font-size: 15px !important; }
  html body #provPills .prov-pill__meta { font-size: 12px !important; }
}

/* ============================================================
   ARGOMENTI DEL CITTADINO — 4 tasti sequenziali stile iOS list (mobile)
   v1.0 — 2026-05-27
   ============================================================ */
@media (max-width: 768px) {
  /* Container delle 4 card: passa da grid a stack verticale */
  html body .ic-v3-args-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    grid-template-columns: 1fr !important;
    margin: 18px 16px 8px !important;
    padding: 0 !important;
  }

  /* Eyebrow + title compatti su mobile */
  html body .ic-v3-section .ic-v3-section__head { padding: 0 16px !important; margin-bottom: 8px !important; }
  html body .ic-v3-eyebrow {
    font-size: 11px !important;
    letter-spacing: 0.10em !important;
    font-weight: 700 !important;
    color: #6b7585 !important;
    margin: 0 0 6px !important;
    text-transform: uppercase !important;
  }
  html body #ic-v3-args-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #0b2340 !important;
    letter-spacing: -0.018em !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  /* Ogni card: "tasto sequenziale" stile iOS settings list */
  html body .ic-v3-arg-card {
    display: grid !important;
    grid-template-columns: 56px 1fr 24px !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "icon title chev"
      "icon desc  chev" !important;
    gap: 4px 14px !important;
    align-items: center !important;
    padding: 16px 18px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    border: 1px solid rgba(11, 35, 64, 0.07) !important;
    box-shadow: 0 1px 3px rgba(11, 35, 64, 0.04), 0 6px 16px rgba(11, 35, 64, 0.03) !important;
    text-decoration: none !important;
    color: inherit !important;
    position: relative;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
  }

  html body .ic-v3-arg-card:active {
    transform: scale(0.98) !important;
    background: #f9fafb !important;
  }

  html body .ic-v3-arg-card:hover {
    border-color: rgba(243, 184, 64, 0.36) !important;
    box-shadow: 0 4px 14px rgba(11, 35, 64, 0.08), 0 12px 26px rgba(11, 35, 64, 0.06) !important;
  }

  /* Icona container 56×56 gold soft a sinistra */
  html body .ic-v3-arg-card .ic-v3-arg-card__icon {
    grid-area: icon !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 14px !important;
    background:
      radial-gradient(circle at 30% 28%, rgba(255, 213, 122, 0.45) 0%, transparent 60%),
      linear-gradient(135deg, rgba(243, 184, 64, 0.22) 0%, rgba(243, 184, 64, 0.07) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      inset 0 0 0 1px rgba(243, 184, 64, 0.18) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    color: #0b2340 !important;
  }
  html body .ic-v3-arg-card .ic-v3-arg-card__icon .ic {
    width: 30px !important;
    height: 30px !important;
    color: #0b2340 !important;
  }
  html body .ic-v3-arg-card:hover .ic-v3-arg-card__icon { background: linear-gradient(135deg, rgba(243,184,64,0.32) 0%, rgba(243,184,64,0.12) 100%) !important; }

  /* Titolo card */
  html body .ic-v3-arg-card .ic-v3-arg-card__h {
    grid-area: title !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0b2340 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
    align-self: end !important;
  }

  /* Descrizione card (clamp 2 righe) */
  html body .ic-v3-arg-card .ic-v3-arg-card__d {
    grid-area: desc !important;
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    color: #6b7585 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    align-self: start !important;
  }

  /* Chevron destra ">" stile iOS */
  html body .ic-v3-arg-card::after {
    content: "" !important;
    grid-area: chev !important;
    width: 12px;
    height: 20px;
    background-color: #94a3b8;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 2l8 8-8 8'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 2l8 8-8 8'/></svg>");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    align-self: center !important;
    transition: background-color 0.16s ease, transform 0.16s ease;
  }
  html body .ic-v3-arg-card:hover::after {
    background-color: #f3b840;
    transform: translateX(2px);
  }

  /* Sezione container "Cosa cerchi oggi?" — riduce padding desktop su mobile */
  html body .ic-v3-section { padding: 22px 0 12px !important; }
}

/* ============================================================
   SEARCH BAR MOBILE VISIBLE (2026-05-27)
   Forza visibilità #ic-search-bar nella home su mobile con stile chiaro
   ============================================================ */
@media (max-width: 768px) {
  /* Garantisce visibilità anche se nascosta da regole legacy */
  html body #ic-search-bar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 50 !important;
    margin: 16px 16px 20px !important;
    max-width: none !important;
    padding: 0 !important;
  }
  /* Re-stylizza l'input per essere leggibile sul hero light della home mobile */
  html body #ic-search-bar input[type="search"] {
    width: 100% !important;
    background: #ffffff !important;
    color: #0b2340 !important;
    border: 2px solid rgba(243, 184, 64, 0.55) !important;
    border-radius: 14px !important;
    padding: 14px 20px 14px 48px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 18px rgba(11, 35, 64, 0.10) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  html body #ic-search-bar input[type="search"]::placeholder {
    color: rgba(11, 35, 64, 0.45) !important;
  }
  html body #ic-search-bar input[type="search"]:focus {
    border-color: var(--ic-mob-emerald, #1f8763) !important;
    box-shadow: 0 0 0 4px rgba(31, 135, 99, 0.12), 0 4px 18px rgba(11, 35, 64, 0.10) !important;
    outline: none !important;
  }
  /* Icona magnifier gold sopra l'input */
  html body #ic-search-bar svg {
    stroke: #d99a2c !important;
    width: 20px !important;
    height: 20px !important;
    left: 16px !important;
  }
  /* Subtitle: nascosta su mobile per pulizia */
  html body #ic-search-bar > div:last-child {
    display: none !important;
  }
}

/* ============================================================
   FIX SOVRAPPOSIZIONI BOTTOM NAV (2026-05-27)
   - Su pagine con bottom-nav legacy (.ic-appbar) → nascondo il mio .ic-mob-bnav
   - Sposto .ica-fab (omino accessibilità) + elevenlabs-convai + lang dd
     SOPRA il bottom nav con safe-area iOS
   ============================================================ */
@media (max-width: 1024px) {
  /* 1. Se esiste bottom nav legacy → nascondi il mio (no doppio nav) */
  html body:has(#ic-appbar) .ic-mob-bnav,
  html body:has(.ic-appbar) .ic-mob-bnav,
  html body:has(.bottom-nav-mobile) .ic-mob-bnav,
  html body.has-legacy-bnav .ic-mob-bnav {
    display: none !important;
  }

  /* 2. Riposiziona ica-fab (omino giallo accessibilità) sopra il nav */
  html .ica-fab,
  html body .ica-fab {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
    z-index: 1500 !important;
  }

  /* 3. Widget chat ElevenLabs: posizione legacy (rispettata).
        Le regole di ic-elevenlabs-fix.css lo posizionano correttamente
        sopra il bottom nav. NON applico override per evitare rottura
        del shadow DOM del custom element. */

  /* 4. Riposiziona dropdown lingua flottante */
  .ic-lang-flag-dd,
  #ic-lang-flag-dd,
  .lang-switcher--floating {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    right: 78px !important;
    z-index: 1498 !important;
  }

  /* 5. Padding-bottom esteso del body */
  body { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important; }

  /* 6. "Powered by ElevenAgents" label: meno invasivo */
  .elevenlabs-powered-by,
  [class*="powered-by"][class*="eleven"] {
    bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important;
    font-size: 9px !important;
    opacity: 0.45 !important;
  }

  /* 7. Quando widget chat è expanded → hide elementi sotto */
  body.cookie-consent-pending .ica-fab,
  body.cookie-consent-pending .ic-mob-bnav,
  body[data-cookie-consent="pending"] .ica-fab,
  body[data-cookie-consent="pending"] .ic-mob-bnav {
    display: none !important;
  }
}

/* === Keyframes (validi su tutti i viewport, no @media) === */
@keyframes ic-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ic-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes ic-spin {
  to { transform: rotate(360deg); }
}
@keyframes ic-skel {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@keyframes ic-suggest-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
