/* Tilely · the map, flat (Tommaso 15/11/2026: «torniamo a mappa piatta e diamo più amore all'ambience, e non è con quei funghi
   che lo facciamo»). Used by app.html with mapa-plana.js. Nothing on stems, no blobs of light, nothing that changes size.
   The mood is the map's own: the light of the hour (body[data-cara] = noche | alba | dia | tarde), the tiles of the open
   venues lit like windows at night and the closed ones dark, the zones' names written on the map from far. */
:root { --ground: #0c0c0c; --tiles: brightness(1.5) contrast(.96); --ink: 242, 242, 240; --halo: 0, 0, 0; --veil: rgba(12, 12, 13, .62);
  --tone: radial-gradient(130% 90% at 50% 46%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, .46)); }
body[data-cara="dia"] { --ground: #f2f3f0; --tiles: none; --ink: 12, 12, 13; --halo: 255, 255, 255; --veil: rgba(12, 12, 13, .5); --tone: none; }
body[data-cara="tarde"] { --ground: #6b5a48; --tiles: sepia(.6) saturate(1.25) contrast(1.02) brightness(.62); --ink: 12, 12, 13; --halo: 255, 236, 214;
  --tone: linear-gradient(98deg, rgba(255, 168, 88, .2), rgba(255, 168, 88, 0) 62%), radial-gradient(130% 90% at 50% 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .34)); }
body[data-cara="alba"] { --ground: #6f6a70; --tiles: sepia(.28) hue-rotate(-12deg) contrast(1.02) brightness(.7); --ink: 12, 12, 13; --halo: 240, 226, 226;
  --tone: linear-gradient(262deg, rgba(255, 198, 170, .18), rgba(255, 198, 170, 0) 62%), radial-gradient(130% 90% at 50% 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .3)); }
#map { position: fixed; inset: 0; z-index: 0; background: var(--ground); }
.maplibregl-map { font: inherit; } .maplibregl-canvas { filter: var(--tiles); outline: 0; }   /* the light of the hour, on the drawn ground only */
.maplibregl-marker { cursor: default; }
/* the light of the hour over the ground; the top stays readable under the bar */
#tono { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: var(--tone); transition: opacity .8s; }
/* 17/11 (owner, on his phone as an app): the map must reach the very top, under the clock. iOS draws that clock in white, so a short shade
   stays behind it, only as tall as the status bar needs; in a browser tab (no status bar over the page) there is no shade at all */
.topfade { position: fixed; inset: 0 0 auto; height: calc(var(--sat) * 1.5); z-index: 1; pointer-events: none; background: linear-gradient(var(--veil) 40%, transparent); }

/* ---- a venue: a tile of one size. Open at night: lit like a window. Closed: dark. Its name under it when you are close ---- */
.tws, .zns, .cls, .you { width: 0 !important; height: 0 !important; }
.tl { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; padding: 0; cursor: pointer; transition: opacity .3s, transform .45s var(--spring, ease); animation: pinIn .55s var(--spring, ease) backwards; animation-delay: var(--dl, 0ms); }
@keyframes pinIn { from { transform: scale(.2); opacity: 0; } }
.tl.off { display: none; }
.tl::after { content: ""; position: absolute; inset: -3px; }   /* a finger-sized target */
.tf { position: absolute; inset: 0; border-radius: 12.5px; display: grid; place-items: center; font: 800 17px/1 var(--p-display); font-style: normal; background: #26262B; color: #F2F2F0;
  box-shadow: 0 0 0 2px #0C0C0D, 0 0 0 3px rgba(242, 242, 240, .22), 0 6px 14px rgba(0, 0, 0, .5); transition: box-shadow .4s, filter .5s; }
body[data-cara="noche"] .tl.on .tf, body[data-cara="tarde"] .tl.on .tf, body[data-cara="alba"] .tl.on .tf { box-shadow: 0 0 0 2px #0C0C0D, 0 0 0 3px rgba(242, 242, 240, .3), 0 0 16px 1px color-mix(in srgb, var(--c2) 78%, transparent), 0 6px 14px rgba(0, 0, 0, .5); }
.tl.shut .tf { filter: saturate(.3) brightness(.55); } body[data-cara="dia"] .tl.shut .tf { filter: saturate(.25) opacity(.7); }
.tl.dim { opacity: .34; } .tl.dim .tf { filter: saturate(.15); box-shadow: 0 0 0 2px #0C0C0D; }
.tl.hot { transform: scale(1.3); z-index: 3; } .tl.hot .tf { filter: none; box-shadow: 0 0 0 2px #0C0C0D, 0 0 0 4px #F2F2F0, 0 10px 22px rgba(0, 0, 0, .6); }
.tt { position: absolute; left: 50%; top: 45px; transform: translateX(-50%); display: grid; gap: 2px; justify-items: center; white-space: nowrap; opacity: 0; transition: opacity .25s; pointer-events: none; }
.tt b { font: 800 12px/1 var(--p-display); letter-spacing: -.2px; color: rgb(var(--ink)); text-shadow: 0 1px 8px rgb(var(--halo)), 0 0 2px rgb(var(--halo)), 0 0 12px rgb(var(--halo)); }
.tt em { font: 600 10px/1 var(--p-body); font-style: normal; color: rgba(var(--ink), .85); text-shadow: 0 0 6px rgb(var(--halo)), 0 0 2px rgb(var(--halo)); } .tt em:empty { display: none; }
#map.names .tt, .tl.hot .tt { opacity: 1; } .tl.dim .tt { opacity: 0 !important; } #map.names .tl.shut .tt { opacity: .6; }
.tl.hot .tt { top: 44px; } .tl.hot .tt b { font-size: 10.5px; } .tl.hot .tt em { font-size: 8.5px; }   /* the chosen tile is 1.3 times bigger: its words stay the same size */
/* something is on here now: one thin ring breathes around the tile. A lively place (where a till says so): a small dot */
.tl.live .tf::before { content: ""; position: absolute; inset: -6px; border-radius: 17px; box-shadow: 0 0 0 1.5px rgba(var(--ink), .8); animation: ring 2s var(--out, ease) infinite; }
@keyframes ring { from { transform: scale(.84); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.tl.l3 .tf::after, .tl.l4 .tf::after { content: ""; position: absolute; right: -4px; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: #F2F2F0; box-shadow: 0 0 0 2px #0C0C0D; animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
/* from far, a zone is its name written on the map: how many places, how many open, its venues as a row of tiles */
.strip { display: flex; gap: 2.5px; } .strip i { width: 13px; height: 13px; border-radius: 4px; box-shadow: 0 0 0 1.5px #0C0C0D; } .strip i.shut { filter: saturate(.3) brightness(.55); }
body[data-cara="noche"] .strip i.on, body[data-cara="tarde"] .strip i.on, body[data-cara="alba"] .strip i.on { box-shadow: 0 0 0 1.5px #0C0C0D, 0 0 9px 0 color-mix(in srgb, var(--c2) 80%, transparent); }
/* where you are */
.gme { position: relative; width: 0; height: 0; pointer-events: none; }
.gme .dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #F2F2F0; box-shadow: 0 0 0 3px #0C0C0D, 0 0 0 5px rgba(242, 242, 240, .45); }
.gme .rp { position: absolute; left: -34px; top: -34px; width: 68px; height: 68px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(var(--ink), .6); opacity: 0; animation: rip 2.8s var(--out, ease) infinite; } .gme .rp.b { animation-delay: 1.4s; }
@keyframes rip { 0% { transform: scale(.25); opacity: 0; } 18% { opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }
.gme b { position: absolute; left: 0; top: 14px; transform: translateX(-50%); padding: 4px 8px; border-radius: 99px; background: #F2F2F0; color: #0C0C0D; font: 800 11px/1 var(--p-display); white-space: nowrap; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
/* no blur over a map that moves under the fingers: it costs a phone too much */
.bar, .chips button { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; } .bar, .chips button:not(.on) { background-color: rgba(23, 23, 26, .95) !important; }
#loc { position: fixed; z-index: 5; right: max(14px, env(safe-area-inset-right)); bottom: calc(var(--h, 130px) + 20px + var(--sab)); width: 48px; height: 48px; border-radius: 50%; background: rgba(14, 14, 16, .92); color: #F2F2F0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 24px rgba(0, 0, 0, .45); display: grid; place-items: center; font-size: 22px; transition: bottom .55s var(--spring, ease), opacity .25s, background-color .25s, color .25s; }
#loc.on { background: #F2F2F0; color: #0C0C0D; } body[data-level="card"] #loc, body[data-size="full"] #loc, body.open #loc, body.pass #loc, body.acc #loc { opacity: 0; pointer-events: none; }
.vp.loc { background: #F2F2F0; color: #0C0C0D; padding-left: 12px; } .vp.loc small { color: #3a3a40; } .vp.loc svg { font-size: 22px; }

/* ---- when: now, tonight, the weekend ---- */
.cuando { display: flex; }
.seg { display: flex; border-radius: 22px; background: rgba(23, 23, 26, .95); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.bar, .chips button { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; } .bar, .chips button:not(.on) { background-color: rgba(23, 23, 26, .95) !important; }
.seg button { height: 44px; padding: 0 10px; border: 4px solid transparent; border-radius: 22px; background-clip: padding-box; color: var(--p-mute); font: 600 13.5px/1 var(--p-body); white-space: nowrap; transition: background-color .25s, color .25s; }
.seg button.on { background-color: var(--p-fg); color: #0C0C0D; }
/* the day and the hour: between the «when» button and the wallet, two short lines on the map itself */
.hora { flex: 1; min-width: 0; align-self: center; display: grid; gap: 4px; justify-items: center; text-align: center; font: 600 12px/1 var(--p-body); color: rgba(var(--ink), .92); text-shadow: 0 0 8px rgb(var(--halo)), 0 0 2px rgb(var(--halo)); pointer-events: none; }
.hora b, .hora i { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: normal; } .hora b { font-weight: 700; } .hora i { font-size: 11px; color: rgba(var(--ink), .78); }
@media (max-width: 380px) { .cuando { gap: 6px; } .cuando .pick { padding: 0 12px; gap: 6px; } .hora { font-size: 11.5px; } .hora i { font-size: 10.5px; letter-spacing: -.1px; } }
body[data-level="card"] .cuando, body[data-size="full"] .cuando { display: none; }
/* whose map this is: at the very bottom of the screen, under the list */
#osm { position: fixed; z-index: 1; left: 0; right: 0; bottom: max(0px, calc(var(--sab) - 17px)); text-align: center; font: 400 9px/10px var(--p-body); color: rgba(var(--ink), .62); text-shadow: 0 0 6px rgb(var(--halo)); pointer-events: none; }
/* how lively, in words, where a Tilely till says so */
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; flex: none; } .bars i { width: 3px; border-radius: 1.5px; background: var(--p-line, #3c3c42); }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 6.5px; } .bars i:nth-child(3) { height: 9px; } .bars i:nth-child(4) { height: 12px; }
.bars[data-l="1"] i:nth-child(-n+1), .bars[data-l="2"] i:nth-child(-n+2), .bars[data-l="3"] i:nth-child(-n+3), .bars[data-l="4"] i { background: var(--p-fg, #F2F2F0); }
.pvv { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 0 4px; font: 600 12.5px/1.2 var(--p-body); color: var(--p-mute); white-space: nowrap; overflow: hidden; } .pvv b { color: var(--p-fg); font-weight: 700; } .pvv span { min-width: 0; overflow: hidden; text-overflow: ellipsis; } .pvv .eg { margin: 0 0 0 auto; flex: none; font-style: normal; }
@media (prefers-reduced-motion: reduce) { .tl, .tl.live .tf::before, .gme .rp { animation: none !important; } }

/* the zones, as cards in the sheet */
.zt4 { flex: none; display: flex; align-items: center; } .zt4 i { position: relative; flex: none; width: 30px; height: 30px; margin-left: -6px; border-radius: 9.5px; display: grid; place-items: center; font: 800 13px/1 var(--p-display); font-style: normal; box-shadow: 0 0 0 2px var(--p-row, #232327); } .zt4 i:first-child { margin-left: 0; } .zt4 i.shut { filter: saturate(.3) brightness(.6); }
.vp.zc { padding-left: 8px; } .vp.zc small .dot { display: inline-block; margin-right: 5px; } .vp.back { padding: 0 14px 0 8px; gap: 4px; } .vp.back svg { font-size: 20px; color: var(--p-mute); }

/* ---- 16/11: the strip of venues drives the map («scorro Playa Paraíso, mi deve spostare nella mappa se cambio locale») ---- */
/* the venue the strip is on: the same tile, ringed, with its name, in front of the others */
.tl.at { transform: scale(1.14); z-index: 3; } .tl.at .tf { box-shadow: 0 0 0 2px #0C0C0D, 0 0 0 4px #F2F2F0, 0 8px 18px rgba(0, 0, 0, .55) !important; } .tl.at .tt { top: 44px; }
/* one card per venue, one at a time in the middle, the next one peeking */
.rail.car { --cw: min(296px, 100vw - 84px); gap: 10px; padding: 0 calc(50% - var(--cw) / 2) 4px; scroll-snap-type: x mandatory; scroll-padding: 0; overscroll-behavior-x: contain; }
.vk { flex: none; width: var(--cw); height: 84px; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 20px; background: var(--p-row); text-align: left; scroll-snap-align: center; scroll-snap-stop: always; opacity: .6; transition: opacity .25s, box-shadow .25s; }
.vk.at { opacity: 1; box-shadow: inset 0 0 0 1.5px rgba(242, 242, 240, .26); }
.vk .im { flex: none; width: 68px; height: 68px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--t0, #26262B) center / cover; color: var(--t1, #F2F2F0); font: 800 26px/1 var(--p-display); } .vk .im img { width: 100%; height: 100%; object-fit: contain; }
.vk .tx { flex: 1; min-width: 0; display: grid; gap: 5px; } .vk .tx > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vk b { font: 800 16px/1.1 var(--p-display); letter-spacing: -.3px; } .vk small { color: var(--p-mute); font-size: 12.5px; line-height: 1.1; } .vk em { font: 600 12.5px/1.2 var(--p-body); font-style: normal; } .vk em .dot { display: inline-block; margin-right: 6px; vertical-align: 1px; }
/* the zone's name is the way back to all the zones */
.ttl.zt { width: 100%; min-height: 44px; margin-top: -10px; padding: 0 18px 2px 10px; align-items: center; justify-content: flex-start; gap: 3px; text-align: left; } .ttl.zt svg { flex: none; font-size: 20px; color: var(--p-mute); } .ttl.zt small { margin-left: auto; padding-left: 8px; white-space: nowrap; }
/* a zone from far, or places too near to tell apart: a short row of their own tiles (no box), the name under, and from far one line more */
.zs { position: absolute; left: 0; top: 0; transform: translate(-50%, -17px); display: grid; justify-items: center; gap: 4px; padding: 0 6px 9px; white-space: nowrap; text-align: center; cursor: pointer; transition: opacity .3s; }
.zs .zt { display: flex; align-items: center; height: 34px; }
.zs .zt i { position: relative; flex: none; width: 30px; height: 30px; margin-left: -5px; border-radius: 9.5px; display: grid; place-items: center; font: 800 13px/1 var(--p-display); font-style: normal; box-shadow: 0 0 0 2px #0C0C0D, 0 4px 10px rgba(0, 0, 0, .45); transition: filter .5s, box-shadow .4s; }
.zs .zt i:first-child { margin-left: 0; width: 34px; height: 34px; border-radius: 10.5px; font-size: 14.5px; }
.zs .zt i.shut { filter: saturate(.3) brightness(.55); } body[data-cara="dia"] .zs .zt i.shut { filter: saturate(.25) brightness(.8); }
body[data-cara="noche"] .zs .zt i.on, body[data-cara="tarde"] .zs .zt i.on, body[data-cara="alba"] .zs .zt i.on { box-shadow: 0 0 0 2px #0C0C0D, 0 0 14px 1px color-mix(in srgb, var(--c2) 78%, transparent), 0 4px 10px rgba(0, 0, 0, .45); }
.zs .zt i.live::before { content: ""; position: absolute; inset: -5px; border-radius: 15px; box-shadow: 0 0 0 1.5px rgba(var(--ink), .8); animation: ring 2s var(--out, ease) infinite; }
.zs .zt em { position: relative; z-index: 0; margin-left: 5px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: #0C0C0D; color: #F2F2F0; font: 800 10.5px/20px var(--p-display); font-style: normal; box-shadow: 0 0 0 1px rgba(242, 242, 240, .28); }
.zs b { display: flex; align-items: flex-end; gap: 5px; font: 800 13px/1 var(--p-display); letter-spacing: -.2px; color: rgb(var(--ink)); text-shadow: 0 1px 8px rgb(var(--halo)), 0 0 2px rgb(var(--halo)), 0 0 12px rgb(var(--halo)); }
.zs small { font: 600 10.5px/1 var(--p-body); color: rgba(var(--ink), .88); text-shadow: 0 0 6px rgb(var(--halo)), 0 0 2px rgb(var(--halo)); }
.zs b s { align-self: flex-end; margin-left: -1px; font: 600 10.5px/1.15 var(--p-body); letter-spacing: 0; text-decoration: none; opacity: .88; }
.zs .now { flex: none; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: #5fd38a; box-shadow: 0 0 0 1.5px rgba(12, 12, 13, .55); animation: blink 1.8s ease-in-out infinite; }
.zs.shut b, .zs.shut small { opacity: .65; } .zs.dim { opacity: .34; }
/* how lively: three small bars that move, slow and low when quiet, fast and tall when full */
.zs .bars { display: flex; align-items: flex-end; gap: 1.5px; height: 11px; margin-bottom: 1px; filter: drop-shadow(0 0 2px rgb(var(--halo))); }
.zs .bars u { width: 2.5px; height: 100%; border-radius: 1px; background: rgb(var(--ink)); transform-origin: bottom; animation: eq var(--t, 1.2s) ease-in-out infinite alternate; }
.zs .bars u:nth-child(2) { animation-delay: calc(var(--t, 1.2s) * -.45); } .zs .bars u:nth-child(3) { animation-delay: calc(var(--t, 1.2s) * -.8); }
@keyframes eq { from { transform: scaleY(.22); } to { transform: scaleY(var(--top, .6)); } }
.zs.l1 { --t: 1.5s; --top: .45; } .zs.l2 { --t: 1.05s; --top: .68; } .zs.l3 { --t: .7s; --top: .88; } .zs.l4 { --t: .45s; --top: 1; }
@media (prefers-reduced-motion: reduce) { .zs .bars u, .zs .now, .zs .zt i.live::before { animation: none !important; } .zs .bars u { transform: scaleY(var(--top, .6)); } }
