/* Fuori Campo — sezione mappa dei campetti (#campetti). Token, base e componenti condivisi in page.css.
   Layout: --layout = wide (scheda a destra) · mid (scheda sopra l'elenco) · sheet (mobile, pannelli dal basso). */

.explorer { position: relative; isolation: isolate; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: #121617; }

/* Mappa */
#map { position: absolute; inset: 0; z-index: 0; background: #121617; }
.leaflet-container { background: #121617; font-family: var(--body); }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(.3) sepia(.15) brightness(.78) contrast(1.1); }
/* Con lo zoom frazionario il blend plus-lighter di Leaflet schiarisce i bordi dei tile e il filtro li inverte in righe scure:
   blend normale e mezzo pixel di sovrapposizione tra i tile. */
.leaflet-container img.leaflet-tile { mix-blend-mode: normal; width: 256.5px !important; height: 256.5px !important; }
.map-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgb(8 10 11 / .5), transparent 150px), radial-gradient(130% 95% at 62% 50%, transparent 55%, rgb(8 10 11 / .5));
}
.leaflet-control-attribution { background: rgb(14 16 17 / .75) !important; color: var(--dim) !important; font-size: 10px !important; border-radius: 10px 0 0 0; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-tooltip { padding: 8px 12px; border: 0; border-radius: 10px; background: var(--paper); color: var(--ink); box-shadow: 0 10px 30px rgb(0 0 0 / .35); font: 600 12.5px/1.3 var(--body); }
.leaflet-tooltip-top::before { border-top-color: var(--paper); }

/* Segnaposto */
.court-marker { background: none; border: 0; }
.court-marker:focus-visible { outline: none; }
.pin {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink);
  font: 800 19px/1 var(--display); box-shadow: 0 8px 20px rgb(0 0 0 / .45);
  transition: transform .25s var(--ease), background .2s, box-shadow .2s;
}
.pin.approx::after { content: ''; position: absolute; inset: -7px; border: 1.5px dashed rgb(243 241 233 / .8); border-radius: inherit; }
.court-marker:hover .pin, .court-marker:focus-visible .pin, .pin.hover { background: var(--orange); transform: scale(1.1); }
.court-marker:focus-visible .pin { box-shadow: 0 0 0 4px var(--ink), 0 0 0 6px var(--orange); }
.pin.active { background: var(--orange); transform: scale(1.2); box-shadow: 0 0 0 6px rgb(255 105 56 / .25), 0 12px 30px rgb(0 0 0 / .5); }
.pin.active::before { content: ''; position: absolute; inset: -2px; border: 2px solid var(--orange); border-radius: inherit; animation: ring 1.8s ease-out infinite; }
.pin.active.approx::after { border-color: var(--orange); }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.pin.twin { font-size: 16px; }
.pin.cluster {
  display: flex; flex-direction: column; justify-content: center; font-size: 25px;
  background: radial-gradient(circle at 32% 28%, #ffa168, var(--orange) 58%, #e2501f);
  box-shadow: 0 0 0 7px rgb(255 105 56 / .2), 0 0 0 15px rgb(255 105 56 / .08), 0 12px 30px rgb(0 0 0 / .5);
}
.pin.cluster small { margin-top: 2px; font: 700 7.5px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.js .explorer:not(.in) .pin { opacity: 0; }
.intro .pin { animation: pin-in .7s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: calc(.45s + var(--d, 0ms)); }
@keyframes pin-in { from { transform: scale(0); opacity: 0; } }
.me-marker span { display: block; width: 100%; height: 100%; border: 3px solid #fff; border-radius: 50%; background: #3d9bff; animation: me 2s infinite; }
@keyframes me { 0% { box-shadow: 0 0 0 0 rgb(61 155 255 / .6); } 100% { box-shadow: 0 0 0 24px rgb(61 155 255 / 0); } }

/* Comparsa dei pannelli quando la sezione entra nello schermo (la sezione resta ferma) */
.js .explorer[data-reveal] { opacity: 1; transform: none; transition: none; }
.topbar, .panel, .legend { transition: opacity .8s var(--ease); }
.js .explorer:not(.in) :is(.topbar, .panel, .map-controls, .legend) { opacity: 0; }

/* Barra in alto a destra */
.topbar { position: absolute; z-index: 40; top: var(--gap); right: var(--gap); display: flex; gap: 8px; }
.guide-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.guide-label em { font-style: normal; color: var(--dim); }

/* Pannello elenco */
.panel { position: absolute; z-index: 30; top: var(--gap); left: var(--gap); bottom: var(--gap); width: var(--panel-w); display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r); }
.sheet-toggle { display: none; }
.panel-scroll { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .18) transparent; }

.panel-head { padding: 26px 24px 22px; }
.panel-title { position: relative; margin: 0; font-size: 64px; font-weight: 800; line-height: .86; letter-spacing: -.01em; text-transform: uppercase; }
.panel-title span { background: linear-gradient(100deg, var(--orange) 30%, var(--orange-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel-title svg { position: absolute; right: 2px; bottom: 4px; width: 48px; fill: none; stroke: var(--orange); stroke-width: 7; stroke-linecap: round; transition: transform .4s var(--ease); }
.panel-head:hover .panel-title svg { transform: translate(4px, -4px); }
.lead { max-width: 32ch; margin: 16px 0 22px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; border-radius: 16px; background: linear-gradient(100deg, var(--orange), var(--orange-hi)); color: var(--ink); font-size: 14.5px; font-weight: 700; box-shadow: 0 14px 30px -12px rgb(255 105 56 / .7); transition: transform .2s, box-shadow .2s; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgb(255 105 56 / .9); }
.cta:active { transform: translateY(0); }
.locating #locate .ico, .locating #locate-ctrl .ico, .locating #hero-locate .ico { animation: spin 1s linear infinite; }

.finder { position: sticky; top: 0; z-index: 2; padding: 14px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgb(19 21 22); }
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / .06); transition: border-color .2s, box-shadow .2s, background .2s; cursor: text; }
.search:focus-within { border-color: rgb(255 105 56 / .7); background: rgb(255 255 255 / .08); box-shadow: 0 0 0 4px rgb(255 105 56 / .15); }
.search .ico { color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 14px; }
.search input::placeholder { color: var(--dim); }
.search:focus-within kbd { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 5px; margin-top: 12px; }
.filters button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
.filters button span { color: var(--dim); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.filters button:hover { border-color: rgb(255 255 255 / .4); }
.filters .active { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.filters .active span { color: rgb(14 16 17 / .5); }

.list-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
#count { color: var(--paper); }
.court-list { display: grid; gap: 4px; padding: 0 10px 14px; }
.court-card { display: grid; grid-template-columns: 64px 1fr 34px; align-items: center; gap: 14px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 18px; text-align: left; transition: background .2s, border-color .2s; animation: card-in .45s var(--ease) backwards; animation-delay: calc(var(--k, 0) * 35ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }
.court-card:hover { background: rgb(255 255 255 / .05); }
.court-card.selected { border-color: rgb(255 105 56 / .5); background: rgb(255 105 56 / .1); }
.thumb { position: relative; width: 64px; height: 64px; overflow: hidden; border-radius: 16px; background: var(--court); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12); }
.thumb::after, .sel-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgb(255 255 255 / .2), transparent 45%, rgb(0 0 0 / .35)); }
.court-art { position: absolute; fill: none; stroke: rgb(255 255 255 / .55); stroke-width: 1.6; }
.thumb .court-art { left: -3px; top: -26px; width: 70px; transform: rotate(-24deg); }
.thumb b { position: absolute; z-index: 1; left: 8px; bottom: 5px; color: #fff; font: 800 24px/1 var(--display); text-shadow: 0 2px 10px rgb(0 0 0 / .35); }
.card-copy { min-width: 0; }
.card-copy strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.card-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.status, .dist { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.status { background: rgb(255 189 89 / .12); color: var(--warn); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ok { background: rgb(106 212 142 / .12); color: var(--ok); }
.status.info { background: rgb(143 201 255 / .12); color: var(--info); }
.dist { background: rgb(255 255 255 / .08); color: var(--paper); }
.dist.near { background: var(--orange); color: var(--ink); }
.card-go { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--muted); transition: background .2s, border-color .2s, color .2s, transform .25s var(--ease); }
.card-go .ico { width: 16px; height: 16px; }
.court-card:hover .card-go { border-color: rgb(255 255 255 / .4); color: var(--paper); transform: rotate(45deg); }
.court-card.selected .card-go { border-color: var(--orange); background: var(--orange); color: var(--ink); transform: none; }
.empty { padding: 22px 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.empty strong { display: block; color: var(--paper); font-size: 15px; }
.empty button { display: block; margin-top: 10px; color: var(--orange); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* Scheda campo */
.selection { position: absolute; z-index: 35; top: var(--top); right: var(--gap); width: var(--sel-w); max-height: calc(100% - var(--top) - 48px); overflow-y: auto; border-radius: var(--r); scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .18) transparent; animation: sel-in .45s var(--ease); }
@keyframes sel-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.sel-art { position: relative; height: 150px; overflow: hidden; background: var(--court); animation: fade .4s; }
.sel-art .court-art { right: 6px; top: -118px; width: 236px; stroke: rgb(255 255 255 / .5); stroke-width: 1.1; transform: rotate(-66deg); }
.ball-art { position: absolute; z-index: 1; right: 64px; top: 24px; width: 54px; fill: #f38c35; stroke: rgb(20 22 23 / .85); stroke-width: 1.4; filter: drop-shadow(6px 10px 8px rgb(0 0 0 / .3)); animation: ball-in .8s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes ball-in { from { transform: translateY(-40px) rotate(-120deg); opacity: 0; } }
.sel-num { position: absolute; z-index: 1; left: 16px; bottom: -16px; color: #fff; font: 800 112px/1 var(--display); letter-spacing: -.03em; text-shadow: 0 8px 30px rgb(0 0 0 / .25); }
.sel-city { position: absolute; z-index: 1; left: 14px; top: 14px; display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; background: rgb(14 16 17 / .55); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sel-close { position: absolute; z-index: 2; right: 12px; top: 12px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgb(14 16 17 / .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .2s, transform .3s var(--ease); }
.sel-close:hover { background: var(--ink); transform: rotate(90deg); }
.sel-body { padding: 18px 22px 22px; animation: content-in .45s var(--ease); }
@keyframes content-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
.sel-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.selection h2 { margin: 12px 0 8px; font-size: 34px; font-weight: 700; line-height: 1; }
.selection h2:focus { outline: none; }
.address { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; }
.address .ico { width: 16px; height: 16px; margin-top: 1px; }
.desc { margin: 14px 0 18px; color: rgb(243 241 233 / .88); font-size: 14.5px; line-height: 1.6; }
.sel-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.sel-info { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sel-info summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.sel-info summary::-webkit-details-marker { display: none; }
.sel-info summary::after { content: '+'; color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1; }
.sel-info[open] summary::after { content: '−'; }
.sel-info p { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.sel-note { display: flex; gap: 9px; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / .045); color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.sel-note .ico { width: 16px; height: 16px; margin-top: 1px; color: var(--orange); }
.sel-note a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.related { display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 14px; font-size: 13px; text-align: left; transition: border-color .2s; }
.related:hover { border-color: var(--orange); }
.sel-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.sel-nav button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; transition: background .2s, color .2s; }
.sel-nav button:hover { background: var(--paper); color: var(--ink); }

/* Terzo tempo: aperitivo dopo la partita */
.apero { margin-top: 16px; padding: 14px 12px 12px; border: 1px solid rgb(216 223 138 / .22); border-radius: 18px; background: linear-gradient(160deg, rgb(216 223 138 / .11), rgb(216 223 138 / .02) 60%); }
.apero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0 4px 8px; }
.apero-kicker { margin: 0 0 4px; color: var(--lime); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.apero h3 { margin: 0; font: 700 22px/1.05 var(--display); text-transform: uppercase; }
.apero-map { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid rgb(216 223 138 / .35); border-radius: 999px; color: var(--lime); font-size: 12px; font-weight: 600; transition: background .2s, color .2s; }
.apero-map:hover { background: var(--lime); color: var(--ink); }
.apero-map .ico { width: 15px; height: 15px; }
.apero-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.apero-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; padding: 9px 6px; border-radius: 14px; transition: background .2s, box-shadow .2s; }
.apero-row:hover, .apero-row.hl { background: rgb(216 223 138 / .12); }
.apero-row.hl { box-shadow: inset 0 0 0 1px rgb(216 223 138 / .5); }
.apero-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--ink); }
.apero-ico .ico { width: 17px; height: 17px; }
.apero-copy { min-width: 0; }
.apero-copy strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.apero-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.apero-copy .apero-rate { color: var(--lime); font-weight: 600; }
.apero-dist { text-align: right; white-space: nowrap; }
.apero-dist b { display: block; font-size: 13px; font-weight: 700; }
.apero-dist small { color: var(--muted); font-size: 11px; }
.apero-row.is-staff { background: rgb(255 105 56 / .1); box-shadow: inset 0 0 0 1px rgb(255 105 56 / .45); }
.apero-row.is-staff .apero-ico { background: var(--orange); }
.apero-staff { display: inline-block; max-width: 100%; margin-bottom: 5px; padding: 3px 8px; border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 9.5px; font-weight: 700; line-height: 1.3; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.apero-copy .apero-credit { margin-top: 4px; color: var(--paper); font-size: 11px; font-style: italic; opacity: .75; }
.apero-note { margin: 8px 4px 0; color: var(--dim); font-size: 11.5px; line-height: 1.5; }
.bar-marker { background: none; border: 0; }
.bar-pin { display: grid; place-items: center; width: 100%; height: 100%; border: 2px solid var(--ink); border-radius: 50%; background: var(--lime); color: var(--ink); box-shadow: 0 6px 16px rgb(0 0 0 / .45); transition: transform .2s var(--ease); animation: pin-in .55s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: var(--d, 0ms); }
.bar-pin .ico { width: 15px; height: 15px; }
.bar-marker:hover .bar-pin, .bar-pin.hover { transform: scale(1.2); }

/* Controlli mappa, legenda e avvisi */
.map-controls { position: absolute; z-index: 20; right: var(--gap); bottom: 40px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; transition: right .45s var(--ease), opacity .6s var(--ease); }
.selection-open .map-controls { right: calc(var(--gap) * 2 + var(--sel-w)); }
.ctrl { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; transition: background .2s, color .2s; }
.ctrl:hover { background: var(--paper); color: var(--ink); }
.ctrl:disabled { opacity: .4; cursor: default; pointer-events: none; }
.ctrl-locate span { display: none; }
.ctrl-zoom { display: flex; flex-direction: column; overflow: hidden; border-radius: 15px; }
.ctrl-zoom .ctrl { border-radius: 0; }
.ctrl-zoom .ctrl + .ctrl { border-top: 1px solid var(--line); }
.legend { position: absolute; z-index: 20; left: calc(var(--gap) * 2 + var(--panel-w)); bottom: var(--gap); display: flex; align-items: center; gap: 18px; height: 40px; padding: 0 18px; border-radius: 999px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 9px; }
.legend .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 2px var(--ink); }
.legend .dot.approx { border: 1.5px dashed var(--paper); background: none; box-shadow: none; }
.legend .dot.bar { background: var(--lime); }
.legend .leg-bar { display: none; }
.selection-open .legend .leg-bar { display: inline-flex; }
.gesture-hint { position: absolute; z-index: 15; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(8 10 11 / .5); opacity: 0; pointer-events: none; transition: opacity .3s; }
.gesture-hint span { padding: 12px 18px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--glass-solid); font-size: 14px; font-weight: 600; text-align: center; }
.gesture-hint.show { opacity: 1; }

.map-error { position: absolute; z-index: 25; left: 50%; top: calc(var(--top) + 8px); width: max-content; max-width: min(380px, calc(100% - 32px)); padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--glass-solid); color: var(--muted); font-size: 13.5px; line-height: 1.6; transform: translateX(-50%); }
.map-error strong { display: block; margin-bottom: 6px; color: var(--paper); font-size: 15px; }
.map-error b { color: var(--paper); }
.map-error code { padding: 2px 6px; border-radius: 6px; background: rgb(255 255 255 / .08); color: var(--paper); font-size: 12.5px; }
.toast { position: fixed; z-index: 60; left: 50%; top: 16px; max-width: min(460px, calc(100% - 32px)); padding: 12px 18px; border-radius: 16px; font-size: 13.5px; font-weight: 500; text-align: center; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -12px); transition: opacity .3s, transform .35s var(--ease), visibility 0s .35s; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }

/* Schermi molto grandi */
@media (min-width: 1500px) {
  :root { --panel-w: 420px; --sel-w: 400px; }
  .panel-title { font-size: 70px; }
}
@media (max-width: 1240px) {
  .guide-label { display: none; }
}

/* Tablet e portatili piccoli: la scheda si apre sopra l'elenco */
@media (max-width: 1099px) {
  :root { --layout: mid; --panel-w: 356px; }
  .selection { top: var(--gap); left: var(--gap); right: auto; bottom: var(--gap); width: var(--panel-w); max-height: none; }
  .selection-open .map-controls { right: var(--gap); }
  .panel-title { font-size: 56px; }
}
@media (max-height: 800px) and (min-width: 861px) {
  .panel-head { padding: 20px 22px 18px; }
  .panel-title { font-size: 50px; }
  .lead { margin: 10px 0 16px; }
}
@media (max-height: 700px) and (min-width: 861px) {
  .panel-head .eyebrow, .lead, .panel-title br, .panel-title svg { display: none; }
  .panel-title { margin-bottom: 16px; font-size: 40px; }
  .cta { height: 46px; }
}

/* Mobile: mappa a tutta altezza, elenco e scheda dal basso, spostamento con due dita */
@media (max-width: 860px) {
  :root { --layout: sheet; --gap: 10px; --top: 70px; }
  .explorer { min-height: 560px; }
  .topbar { top: calc(var(--gap) + env(safe-area-inset-top)); }
  #about { justify-content: center; width: 50px; height: 50px; padding: 0; border-radius: 16px; }
  #about .ico { width: 22px; height: 22px; }
  .about-text { display: none; }

  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: calc(100% - var(--top) - env(safe-area-inset-top) - 8px); border-bottom: 0; border-radius: 26px 26px 0 0; transform: translateY(calc(100% - var(--peek, 172px) - env(safe-area-inset-bottom))); transition: transform .45s var(--ease), opacity .8s var(--ease); }
  .sheet-open .panel { transform: none; }
  .panel-scroll { overscroll-behavior: contain; }
  .sheet-toggle { position: relative; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; width: 100%; padding: 20px 18px 8px; text-align: left; touch-action: none; }
  .handle { position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgb(255 255 255 / .25); }
  .sheet-title { font: 800 24px/1 var(--display); text-transform: uppercase; }
  .sheet-title b { color: var(--orange); font-weight: 800; }
  .sheet-count { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: rgb(255 255 255 / .08); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .chev { transition: transform .35s var(--ease); }
  .sheet-open .chev { transform: rotate(180deg); }
  .panel-head { display: none; }
  .finder { padding: 8px 14px 14px; border-top: 0; }
  .search kbd { display: none; }
  .filters { flex-wrap: nowrap; margin: 10px -14px 0; padding: 0 14px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); }
  .filters::-webkit-scrollbar { display: none; }
  .court-list { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }

  .leaflet-bottom.leaflet-right { top: calc(var(--top) + env(safe-area-inset-top)); bottom: auto; }
  .leaflet-control-attribution { border-radius: 10px 0 0 10px; }
  .legend, .ctrl-zoom { display: none; }
  .map-controls { right: var(--gap); bottom: calc(var(--peek, 172px) + env(safe-area-inset-bottom) + 12px); flex-direction: row-reverse; align-items: center; }
  .selection-open .map-controls, .sheet-open .map-controls { right: var(--gap); opacity: 0; pointer-events: none; }
  .ctrl { width: 48px; height: 48px; border-radius: 16px; }
  .ctrl-locate { display: inline-flex; gap: 8px; width: auto; padding: 0 18px 0 14px; border-color: transparent; border-radius: 999px; background: linear-gradient(100deg, var(--orange), var(--orange-hi)); color: var(--ink); font-size: 13.5px; font-weight: 700; }
  .ctrl-locate span { display: inline; }

  .selection { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: min(62%, 600px); padding-bottom: env(safe-area-inset-bottom); overscroll-behavior: contain; border-bottom: 0; border-radius: 26px 26px 0 0; animation: sheet-in .45s var(--ease); }
  .sel-art { height: 112px; }
  .sel-art .court-art { top: -132px; }
  .sel-num { bottom: -10px; font-size: 84px; }
  .ball-art { right: 62px; top: 16px; width: 44px; }
  .sel-body { padding: 16px 18px 18px; }
  .selection h2 { font-size: 30px; }
  .desc { margin: 10px 0 16px; font-size: 14px; }
  .sel-actions .btn { height: 48px; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@media (max-width: 380px) {
  .sel-actions { grid-template-columns: 1fr; }
  .sheet-title { font-size: 21px; }
}
@media (hover: none) {
  .search kbd { display: none; }
}
