/* 3.09 (27/10) L'Italia in 3D (static/italia.js, templates/_italia.html): il palco è sempre scuro (come le copertine
   in bianco e nero dell'app), nell'app e sul sito. Le schede delle città sotto usano i colori della pagina che lo ospita
   (--it-ink, --it-muted, --it-tint impostati da profilo_italia.html e citta_indice.html). */
.it-stage { position: relative; overflow: hidden; border-radius: 32px; aspect-ratio: 16 / 10; max-width: 100%; isolation: isolate;
  background: radial-gradient(90% 80% at 62% 30%, #2A2B34 0%, #15161C 48%, #09090C 100%); color: #fff; touch-action: pan-y; cursor: grab;
  -webkit-user-select: none; user-select: none; }
.it-stage.is-drag { cursor: grabbing; }
.it-stage.is-hover { cursor: pointer; }
.it-stage canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; }
.it-stage::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.it-pins { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.it-flat { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, #DCE6EE, #CFDDE7); pointer-events: none; }
/* i filtri della Mappa, sopra la carta: una riga sola, mai a capo */
.it-flat-chips { position: absolute; z-index: 3; left: 0; right: 0; top: 18px; display: flex; justify-content: center; gap: 6px; padding: 0 16px; pointer-events: none; }
.it-flat-chips span { flex: none; white-space: nowrap; padding: 7px 13px; border-radius: 999px; background: #fff; color: #0A0A0F; font: 600 13px/1.2 Inter, system-ui, sans-serif; box-shadow: 0 2px 8px rgba(20,20,60,.12); }
.it-flat-chips span:first-child { background: #0A0A0F; color: #fff; }
.it-flat-chips[hidden] { display: none; }
.it-nogl { display: none; position: absolute; inset: 0; z-index: 3; place-items: center; padding: 24px; text-align: center; color: rgba(255,255,255,.7); font-size: 15px; }
.it-stage.is-nogl .it-nogl { display: grid; }
.it-stage.is-nogl .it-side, .it-stage.is-nogl .it-hint, .it-stage.is-nogl .it-flat, .it-stage.is-nogl .it-flat-chips { display: none; }

/* le etichette: piccole, di lato al perno */
.it-pin { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px;
  background: rgba(12,12,16,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; text-decoration: none; white-space: nowrap;
  font: 600 13px/1.3 "Inter Tight", Inter, system-ui, sans-serif; letter-spacing: -.02em; opacity: 0; transition: background .2s, color .2s; will-change: transform; }
.it-pin::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 3px; background: #8C98FF; }
.it-pin small { font: 500 12px Inter, system-ui, sans-serif; color: rgba(255,255,255,.62); letter-spacing: -.01em; }
.it-pin.on, .it-pin:hover, .it-pin:focus-visible { background: #fff; color: #0A0A0F; outline: none; }
.it-pin.on small, .it-pin:hover small, .it-pin:focus-visible small { color: #5C5C66; }
.it-pin.on::before, .it-pin:hover::before, .it-pin:focus-visible::before { background: #0000F6; }
.it-pin.is-off { padding: 2px 8px 2px 6px; font-size: 12px; background: rgba(12,12,16,.42); color: rgba(255,255,255,.86); }
.it-pin.is-off::before { width: 5px; height: 5px; background: #8C98FF; }
.it-pin:not([href]) { cursor: default; }
.it-pin.is-town { padding: 2px 8px 2px 6px; font: 500 12px Inter, system-ui, sans-serif; background: rgba(12,12,16,.45); color: rgba(255,255,255,.9); }
.it-pin.is-town::before { width: 5px; height: 5px; background: rgba(255,255,255,.7); }
/* senza posto per il nome resta il puntino, che si tocca lo stesso (il nome è nell'aria-label) */
.it-pin.is-dot, .it-pin.is-town.is-dot { width: 18px; height: 18px; padding: 0; justify-content: center; gap: 0; font-size: 0; line-height: 0; overflow: hidden; color: transparent; }
.it-pin.is-dot small { display: none; }

/* a sinistra: il numero e l'elenco; con una regione aperta, la sua scheda */
.it-side { position: absolute; z-index: 3; left: 36px; top: 36px; bottom: 36px; width: 250px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.it-n { display: block; font: 700 64px/.9 "Inter Tight", Inter, system-ui, sans-serif; letter-spacing: -.05em; }
.it-l { display: block; margin-top: 6px; color: rgba(255,255,255,.62); font-size: 15px; }
.it-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; pointer-events: auto; max-height: 60%; overflow-y: auto; scrollbar-width: none; }
.it-list a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; margin: 0 -12px; border-radius: 12px; color: #fff; text-decoration: none;
  font: 600 16px "Inter Tight", Inter, system-ui, sans-serif; letter-spacing: -.02em; transition: background .2s; }
.it-list a small { font: 500 13px Inter, system-ui, sans-serif; color: rgba(255,255,255,.55); }
.it-list a.on, .it-list a:hover, .it-list a:focus-visible { background: rgba(255,255,255,.1); outline: none; }
.it-back { pointer-events: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px 9px 10px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; transition: background .2s; }
.it-back:hover, .it-back:focus-visible { background: rgba(255,255,255,.22); outline: none; }
.it-rk { margin: 18px 0 0; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.it-rh { margin: 4px 0 0; font: 700 46px/.95 "Inter Tight", Inter, system-ui, sans-serif; letter-spacing: -.05em; text-wrap: balance; color: #fff; }
.it-rl { margin: 8px 0 0; color: rgba(255,255,255,.62); font-size: 15px; }
.it-sch { display: grid; gap: 12px; margin-top: 16px; }
.it-sd { margin: 0; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.82); max-width: 34ch; }
.it-sn { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.it-sn div { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 7px; align-items: center; padding: 9px 10px; border-radius: 14px; background: rgba(255,255,255,.07); }
.it-sn svg { grid-row: span 2; color: #8C98FF; }
.it-sn b { font: 700 15px/1.1 "Inter Tight", Inter, system-ui, sans-serif; letter-spacing: -.02em; white-space: nowrap; }
.it-sn small { font-size: 11.5px; color: rgba(255,255,255,.55); }
.it-go { pointer-events: auto; justify-self: start; display: inline-flex; align-items: center; gap: 4px; color: #fff; font: 600 14px Inter, system-ui, sans-serif; text-decoration: none; opacity: .9; }
.it-go:hover, .it-go:focus-visible { opacity: 1; text-decoration: underline; }
.it-dish { pointer-events: auto; }
.it-dish p { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.it-dish div { display: flex; flex-wrap: wrap; gap: 6px; }
.it-dish a, .it-dish span { padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; font-size: 13.5px; transition: background .2s; }
.it-dish a:hover, .it-dish a:focus-visible { background: rgba(255,255,255,.2); outline: none; }
.it-hint { position: absolute; z-index: 3; right: 22px; bottom: 18px; margin: 0; font-size: 12.5px; color: rgba(255,255,255,.5); pointer-events: none; transition: opacity .6s; }
.it-stage.touched .it-hint { opacity: 0; }

/* la scheda della regione sotto il palco (telefono e tablet) */
.it-sheet { margin-top: 12px; padding: 18px; border-radius: 24px; background: #111116; color: #fff; }
.it-sheet .it-sch { margin-top: 0; }
.it-sheet .it-sd { max-width: none; }

/* le schede delle città */
.it-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.it-card { position: relative; display: block; overflow: hidden; border-radius: 26px; aspect-ratio: 4 / 3; max-width: 100%; background: #0A0A0B; color: #fff; text-decoration: none;
  scroll-margin-top: 80px; transition: box-shadow .45s cubic-bezier(.22,.8,.2,1); }
.it-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08) brightness(.8); transition: transform .8s cubic-bezier(.22,.8,.2,1); }
.it-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.82) 100%); }
.it-card > span { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; display: grid; gap: 2px; }
.it-card small { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.it-card b { font: 700 38px/1 "Inter Tight", Inter, system-ui, sans-serif; letter-spacing: -.05em; }
.it-card em { font-style: normal; font-size: 15px; opacity: .92; }
.it-card i { font-style: normal; font-size: 13px; opacity: .72; margin-top: 4px; }
.it-card:hover img, .it-card.on img { transform: scale(1.04); }
.it-card.on { box-shadow: 0 0 0 3px #0000F6, 0 16px 40px rgba(0,0,246,.18); }
.it-src { margin: 12px 0 0; font-size: 12.5px; color: var(--it-muted, #6E6E73); }

@media (min-width: 901px) {
  .it-sheet { display: none !important; }
  /* mai più alta della finestra: l'elenco delle città e la scheda della regione restano tutti visibili */
  .it-stage { max-height: max(460px, calc(100vh - 230px)); max-height: max(460px, calc(100dvh - 230px)); }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .it-rh { font-size: 36px; } .it-sd { display: none; } .it-sch { margin-top: 10px; gap: 8px; } .it-sn div { padding: 7px 9px; }
  .it-dish a, .it-dish span { padding: 6px 10px; font-size: 12.5px; } .it-rk { margin-top: 12px; }
}
@media (max-width: 1000px) { .it-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .it-list { display: none; } .it-side { left: 22px; top: 22px; bottom: auto; } .it-n { font-size: 44px; }
  .it-side.it-region { right: 22px; width: auto; bottom: 22px; gap: 14px; } .it-rh { font-size: 36px; } .it-rk { margin-top: 12px; }
  .it-side.it-region .it-sch { display: none; }
}
@media (max-width: 760px) {
  .it-stage { aspect-ratio: 4 / 5; border-radius: 26px; }
  .it-flat-chips { top: 14px; gap: 5px; } .it-flat-chips span { padding: 6px 11px; font-size: 12.5px; }
  .it-cards { grid-template-columns: 1fr; }
  .it-pin small, .it-hint { display: none; }
  .it-l { font-size: 14px; }
  .it-side { top: auto; bottom: 22px; }
  .it-side.it-region { top: 18px; bottom: 18px; left: 16px; right: 16px; }
  .it-rh { font-size: 30px; } .it-rl { font-size: 13.5px; }
  .it-dish a, .it-dish span { font-size: 12.5px; padding: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) { .it-card, .it-card img, .it-pin, .it-hint { transition: none; } }

/* 3.12.1 (27/10) dal PC di Antonio: con una regione aperta si vedevano anche il numero e l'elenco delle città sotto la
   sua scheda (.it-side ha display: flex, che vinceva su [hidden]), e la scheda lunga si schiacciava sopra se stessa
   («La pagina del Lazio» sopra «I piatti»). Ora l'altra sparisce davvero e la scheda scorre. Lo stemma sopra il nome. */
.it-side[hidden] { display: none !important; }
.it-side.it-region { justify-content: flex-start; gap: 18px; overflow-y: auto; scrollbar-width: none; pointer-events: auto; }
.it-side.it-region > * { flex: none; }
.it-crest { display: block; height: 64px; width: auto; margin: 18px 0 -6px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
/* 3.18.3 col mouse sopra la foto torna a colori, come la Home */
.it-card img { transition: filter .5s, transform .8s cubic-bezier(.22,.8,.2,1); }
@media (hover: hover) { .it-card:hover img, .it-card:focus-visible img { filter: grayscale(0) contrast(1.02) brightness(.88); } }
