/* La Valley nella tua città: il banco a sinistra, il sito che cambia a destra. Sul telefono uno sotto l'altro. */
.tv-patto { max-width: 760px; margin: 14px 0 0; padding: 8px 0; border-block: 1px solid var(--line); font-family: var(--cond); font-size: 17px; font-weight: 500; line-height: 1.35; }
.tv { display: grid; gap: 28px; margin: 22px 0 8px; }
.tv[hidden] { display: none; }
.tv-banco { min-width: 0; }
.tv-via fieldset { margin-bottom: 0; }
.tv-banco fieldset { min-width: 0; margin: 0 0 30px; padding: 8px 0 0; border: 0; border-top: 4px solid var(--ink); }
.tv-banco legend { float: left; width: 100%; margin: 0 0 12px; padding: 0; font-family: var(--cond); font-size: 15px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--red); }
.tv-banco legend + * { clear: both; }
.tv-banco label { display: block; margin-top: 14px; font-family: var(--cond); font-size: 17px; font-weight: 700; line-height: 1.3; }
.tv-banco input[type="text"], .tv-banco input[type="email"], .tv-banco select { box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--ink); color: var(--ink); font: inherit; font-size: 18px; }
.tv-nota { margin: 8px 0 0; font-family: var(--cond); font-size: 16px; font-weight: 500; line-height: 1.35; color: var(--muted); }
.tv-nota:empty { display: none; }
.tv-esito:empty { margin: 0; }   /* sono regioni live: vuote ma presenti, se no il primo annuncio si perde */
.tv-banco input#tv-citta { min-height: 64px; padding: 2px 0; border: 0; border-bottom: 3px solid var(--ink); background: transparent !important; font-family: var(--font-display); font-size: clamp(32px, 9vw, 44px); font-weight: 800; letter-spacing: -.015em; line-height: 1.1; }
.tv-banco input#tv-citta::placeholder { color: var(--muted); opacity: 1; font-weight: 400; font-style: italic; }
.tv-cerca { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 12px; }
.tv-cerca .button { min-height: 48px; }
.tv-esito { margin: 10px 0 0; font-family: var(--cond); font-size: 17px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.tv-risultati { margin: 6px 0 0; padding: 0; list-style: none; }
.tv-risultati .linklike { min-height: 44px; color: var(--ink); font-family: var(--cond); font-size: 16px; line-height: 1.3; text-align: left; }
.tv-mappa-riquadro { position: relative; margin-top: 14px; }
#tv-mappa { height: 320px; border: 1px solid var(--ink); filter: saturate(.7); z-index: 0; }
.tv-mirino { position: absolute; left: 50%; top: 50%; z-index: 500; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none; }
.tv-mirino::before, .tv-mirino::after { content: ""; position: absolute; background: var(--red); box-shadow: 0 0 0 1px var(--paper); }
.tv-mirino::before { left: 16px; top: 0; width: 2px; height: 34px; }
.tv-mirino::after { left: 0; top: 16px; width: 34px; height: 2px; }
.tv-banco .pin.pin-discount { background: var(--spot); color: var(--on-spot); }
/* le tessere restano chiare anche di sera: il contorno resta scuro */
.tv-banco .leaflet-marker-icon:focus-visible { outline: 3px solid #17163a; outline-offset: 2px; }
.tv-due { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.tv-banco fieldset.tv-tavolozze { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; padding: 0; border: 0; }
.tv-banco .tv-tavolozze label { position: relative; display: block; margin: 0; cursor: pointer; }
.tv-tavolozze input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tv-tavolozze span { display: flex; flex-direction: column; gap: 4px; min-height: 64px; padding: 6px; border: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.tv-tavolozze i { display: block; height: 26px; }
.tv-tavolozze input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
.tv-tavolozze input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.tv-colore { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.tv-colore input { flex: none; width: 60px; height: 48px; padding: 2px; border: 1px solid var(--ink); background: var(--field); cursor: pointer; }
.tv-colore code { font-size: 15px; background: none; }
.tv-banco input[type="file"] { box-sizing: border-box; width: 100%; min-height: 48px; margin-top: 6px; padding: 8px; border: 1px dashed var(--ink); color: var(--ink); font-family: var(--cond); font-size: 16px; }
.tv-avviso { margin: 10px 0 0; padding: 8px 10px; border-left: 4px solid var(--red); background: var(--paper-2); font-family: var(--cond); font-size: 17px; font-weight: 500; line-height: 1.35; }
.tv-avviso .button { display: block; width: 100%; margin-top: 8px; min-height: 44px; }
.tv-avviso .button::before { content: ""; display: inline-block; width: .9em; height: .9em; margin-right: 8px; vertical-align: -1px; background: var(--tv-campione); box-shadow: 0 0 0 1px var(--ink); }
.tv-bene { margin: 10px 0 0; font-family: var(--cond); font-size: 16px; font-weight: 500; color: var(--muted); }
.tv-azioni { display: grid; gap: 10px; margin-top: 14px; }
.tv-azioni .button { width: 100%; min-height: 54px; text-align: center; }
.tv-azioni .tv-scarica { font-size: 20px; }
.tv-azioni .button:disabled { opacity: .55; cursor: wait; }
.tv-banco input#tv-link { margin-top: 10px; font-family: var(--mono); font-size: 14px; }
.tv-dopo { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--ink); font-size: 18px; line-height: 1.4; }
.tv-dopo[hidden] { display: none; }
.tv-dopo h3 { margin: 0 0 6px; font-size: 21px; }
.tv-dopo ol { margin: 0; padding-left: 22px; }
.tv-dopo code { font-size: 15px; }

/* Il nastro: sul telefono il sito che cambia resta in vista anche con la tastiera aperta */
.tv-nastro { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; gap: 10px; min-height: 52px; margin: 0 -16px; padding: 6px 16px; background: var(--tv-nastro, var(--night)); color: var(--tv-nastro-testo, var(--night-text)); font-weight: 700; font-size: 19px; line-height: 1.1; overflow: hidden; }
.tv-nastro img { flex: none; width: 36px; height: 36px; }
.tv-nastro span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.tv-vista { min-width: 0; }
.tv-barra { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-family: var(--mono); font-size: 14px; }
.tv-barra span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tv-barra .button { flex: none; min-height: 44px; padding: 8px 12px; font-size: 15px; }
.tv-barra .button[aria-pressed="true"] { background: var(--night); color: var(--night-text); }
/* sotto i 1000 px il nastro resta attaccato in alto: il campo col fuoco non deve finirci sotto */
@media (max-width: 999px) { html:has(.tv:not([hidden])) { scroll-padding-top: 64px; } }
.tv-cornice { height: 72vh; max-height: 640px; overflow-y: auto; border: 1px solid var(--ink); background: var(--paper-2); overscroll-behavior: auto; }
.tv-telaio { overflow: hidden; margin-inline: auto; }
.tv-cornice iframe { display: block; width: 100%; height: 900px; border: 0; transform-origin: 0 0; }
.tv-solo-schermo { display: none; }
.tv-vista figcaption { margin-top: 6px; }
.tv-carta { margin: 0; }

@media (min-width: 1000px) {
  .tv { grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 40px; align-items: start; }
  .tv-banco { grid-column: 1; }
  .tv-vista { grid-column: 2; grid-row: 1 / span 2; }
  .tv-nastro { display: none; }
  .tv-barra .tv-solo-schermo { display: block; margin-left: auto; }
  .tv-vista { position: sticky; top: 12px; }
  .tv-cornice { height: calc(100vh - 110px); max-height: none; }
  .tv-azioni { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .tv-nastro, .tv-tavolozze span { transition: background-color .25s ease, color .25s ease, box-shadow .15s ease; }
}
@media screen and (prefers-color-scheme: dark) {
  #tv-mappa { filter: saturate(.6) brightness(.8); }
  .tv-avviso { background: var(--paper-2); }
  /* nel tema scuro --night è quasi il fondo del bottone (1,2:1): il premuto si inverte come nel tema chiaro */
  .tv-barra .button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
}
@media print { .tv, .tv-patto { display: none !important; } }

/* Il testo sotto il banco */
.tv-testo .in-breve { max-width: none; }
.tv-mosse { padding-left: 1.5em; }
.tv-mosse li { margin-bottom: 6px; }
.tv-mosse li::marker { font-family: var(--mono); font-size: .8em; color: var(--red); }
.tv-soldi { margin: 24px 0; padding: 12px 14px; border: 2px solid var(--ink); }
.tv-soldi h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 26px; }
.tv-soldi p { margin: 0 0 8px; }
.tv-soldi p:last-child { margin-bottom: 0; }
