/* =====================================================================
   DEVELOOP · CYBERPUNK CITY · UI LAYER
   Font: Orbitron (display, come il sito) + Montserrat (testo)
   Palette: ciano #0DBFE0 · verde neon #2EF10F · navy #070916 · magenta #D63CF0
   ===================================================================== */
:root {
  --cyan: #0DBFE0; --green: #2EF10F; --navy: #070916; --magenta: #D63CF0; --violet: #4C1D95; --orange: #F97316;
  --bg: #05060f; --ink: #F4FAFF; --ink-2: #C3D6E6; --ink-3: #8FA7BB;
  --panel: rgba(6, 8, 20, 0.94); --panel-2: rgba(14, 20, 46, 0.96); --line: rgba(13, 191, 224, 0.45); --line-2: rgba(255,255,255,0.14);
  --font-display: 'Orbitron', 'Montserrat', system-ui, sans-serif; --font-body: 'Montserrat', system-ui, sans-serif;
  --r: 14px; --r-sm: 9px; --ease: cubic-bezier(.16, 1, .3, 1); --t: 320ms var(--ease);
  --text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-lg: 19px; --text-xl: 24px; --text-2xl: clamp(28px, 4vw, 40px);
  --shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(13,191,224,.12);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.55; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--green); color: #000; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Canvas ---------- */
#scene { position: fixed; inset: 0; z-index: 0; }
#scene canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(5,6,15,.75) 100%); }

/* ---------- Loader (round 3): logo in rotazione + barra TRON ---------- */
#intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #0a1230 0%, #05060f 62%, #020308 100%); transition: opacity 700ms ease, visibility 700ms; }
#intro.hide { opacity: 0; visibility: hidden; }
/* pavimento "The Grid" in prospettiva */
.ld-grid { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 60%; transform: perspective(420px) rotateX(62deg); transform-origin: 50% 100%; background-image: linear-gradient(rgba(13,191,224,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(13,191,224,.35) 1px, transparent 1px); background-size: 56px 56px; animation: ldGrid 1.6s linear infinite; -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%); mask-image: linear-gradient(to top, #000 10%, transparent 85%); opacity: .55; }
@keyframes ldGrid { to { background-position: 0 56px, 0 0; } }
.ld-box { position: relative; text-align: center; width: min(420px, 82vw); }
.ld-logo { position: relative; width: 132px; height: 132px; margin: 0 auto 26px; perspective: 700px; }
.ld-coin { position: absolute; inset: 14px; transform-style: preserve-3d; animation: ldSpin 2.4s cubic-bezier(.45,.05,.55,.95) infinite; filter: drop-shadow(0 0 18px rgba(13,191,224,.65)) drop-shadow(0 0 40px rgba(46,241,15,.25)); }
.ld-coin img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; backface-visibility: hidden; }
.ld-coin img.back { transform: rotateY(180deg); filter: hue-rotate(40deg) brightness(.9); }
@keyframes ldSpin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
.ld-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.ld-ring.r1 { border-top-color: var(--cyan); border-right-color: rgba(13,191,224,.25); animation: ldRot 1.1s linear infinite; box-shadow: 0 0 18px rgba(13,191,224,.25) inset; }
.ld-ring.r2 { inset: -10px; border-bottom-color: var(--green); border-left-color: rgba(46,241,15,.2); animation: ldRot 1.7s linear infinite reverse; }
@keyframes ldRot { to { transform: rotate(360deg); } }
.ld-name { font-family: var(--font-display); font-weight: 900; font-size: clamp(20px, 4.4vw, 30px); letter-spacing: .32em; color: #fff; text-shadow: 0 0 22px rgba(13,191,224,.6); margin: 0 0 22px .32em; }
.ld-bar { position: relative; height: 6px; border: 1px solid rgba(13,191,224,.55); background: rgba(13,191,224,.06) repeating-linear-gradient(90deg, transparent 0 9px, rgba(13,191,224,.18) 9px 10px); box-shadow: 0 0 14px rgba(13,191,224,.25), inset 0 0 6px rgba(0,0,0,.8); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.ld-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(13,191,224,.2), var(--cyan) 70%, #fff); box-shadow: 0 0 12px var(--cyan); transition: width 160ms linear; }
.ld-bar b { position: absolute; top: -5px; bottom: -5px; width: 3px; left: 0; background: #fff; box-shadow: 0 0 10px #fff, 0 0 22px var(--cyan), 0 0 40px var(--green); transition: left 160ms linear; }
.ld-meta { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--font-display); font-size: 11px; letter-spacing: .22em; color: var(--cyan); }
.ld-meta span:last-child { color: var(--green); min-width: 4ch; text-align: right; }
body.flying #topbar, body.flying #hubBtn, body.flying #aiBtn { opacity: 0; pointer-events: none; }
#topbar, #hubBtn, #aiBtn { transition: opacity 600ms ease; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--r); border: 1px solid transparent; font-weight: 700; font-size: var(--text-sm); letter-spacing: .02em; transition: transform var(--t), box-shadow var(--t), background var(--t); text-decoration: none !important; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--green); color: #031003; box-shadow: 0 0 24px rgba(46,241,15,.35); }
.btn-primary:hover { box-shadow: 0 0 36px rgba(46,241,15,.55); }
.btn-ghost { background: rgba(13,191,224,.08); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: rgba(13,191,224,.16); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--ink-2); font-size: 13px; font-weight: 600; transition: var(--t); }
.chip:hover, .chip.on { border-color: var(--cyan); color: #fff; background: rgba(13,191,224,.14); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--cyan)); box-shadow: 0 0 8px var(--c, var(--cyan)); }

/* ---------- Top bar ---------- */
#topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; pointer-events: none; }
#topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-display); font-weight: 800; letter-spacing: .12em; font-size: 15px; text-decoration: none !important; }
.brand img { width: 38px; height: 38px; border-radius: 50%; box-shadow: 0 0 18px rgba(13,191,224,.5); }
.crumbs { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--ink-2); backdrop-filter: blur(10px); max-width: 60vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.crumbs b { color: #fff; font-weight: 700; }
.crumbs i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--cyan)); box-shadow: 0 0 10px var(--c, var(--cyan)); flex: none; }
.topbtns { display: flex; gap: 8px; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink); backdrop-filter: blur(10px); transition: var(--t); }
.iconbtn:hover { border-color: var(--cyan); }
.iconbtn svg { width: 20px; height: 20px; }

/* ---------- HUD hint ---------- */
#hint { position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); z-index: 15; background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; font-size: 13px; color: var(--ink-2); backdrop-filter: blur(10px); pointer-events: none; transition: opacity var(--t); white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
#hint.hide { opacity: 0; }
#tooltip { position: fixed; z-index: 16; pointer-events: none; background: var(--panel-2); border: 1px solid var(--c, var(--cyan)); color: #fff; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; transform: translate(-50%, -140%); opacity: 0; transition: opacity 150ms; box-shadow: 0 0 20px color-mix(in srgb, var(--c, var(--cyan)) 40%, transparent); }
#tooltip.on { opacity: 1; }
#tooltip small { display: block; color: var(--ink-2); font-weight: 500; }

/* ---------- HUB ---------- */
#hubBtn { position: fixed; left: 16px; bottom: calc(16px + var(--safe-b)); z-index: 30; width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(145deg, rgba(13,191,224,.22), rgba(7,9,22,.9)); border: 1px solid var(--cyan); color: #fff; font-family: var(--font-display); font-weight: 800; letter-spacing: .14em; font-size: 12px; display: grid; place-items: center; box-shadow: 0 0 28px rgba(13,191,224,.35); backdrop-filter: blur(10px); transition: var(--t); }
#hubBtn:hover { box-shadow: 0 0 44px rgba(13,191,224,.6); transform: translateY(-2px); }
#hubBtn .logo { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(13,191,224,.8)); }
#hubBtn span { font-size: 11px; margin-top: -2px; }
.hub-head { gap: 10px; }
.hub-logo { width: 30px; height: 30px; object-fit: contain; flex: none; }
.hub-head h2 { flex: 1; }
#hub { position: fixed; left: 16px; bottom: calc(92px + var(--safe-b)); z-index: 31; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 120px - var(--safe-b)); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); backdrop-filter: blur(16px); transform: translateY(16px) scale(.98); opacity: 0; visibility: hidden; transition: transform var(--t), opacity var(--t), visibility var(--t); display: flex; flex-direction: column; overflow: hidden; }
#hub.open { transform: none; opacity: 1; visibility: visible; }
.hub-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.hub-head h2 { margin: 0; font-family: var(--font-display); font-size: 13px; letter-spacing: .2em; color: var(--cyan); }
.hub-list { overflow: auto; padding: 8px; flex: 1; }
.hub-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03); margin-bottom: 4px; text-align: left; transition: var(--t); }
.hub-item:hover, .hub-item.active { background: rgba(13,191,224,.1); border-color: var(--line-2); }
.hub-item.active { border-color: var(--c, var(--cyan)); }
.hub-item .dot { width: 12px; height: 12px; border-radius: 3px; background: var(--c, var(--cyan)); box-shadow: 0 0 12px var(--c, var(--cyan)); flex: none; transform: rotate(45deg); }
.hub-item .lbl { font-weight: 700; font-size: 15px; color: #fff; flex: 1; }
.hub-item .sub { color: var(--ink-2); font-size: 12px; }
.hub-item .car { color: var(--ink-3); transition: transform var(--t); }
.hub-item[aria-expanded="true"] .car { transform: rotate(90deg); }
.hub-sub { display: none; padding: 2px 0 6px 34px; }
.hub-sub.open { display: block; }
.hub-sub button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.hub-sub button:hover, .hub-sub button.active { color: #fff; background: rgba(255,255,255,.05); }
.hub-sub button i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.hub-foot { border-top: 1px solid var(--line-2); padding: 10px 14px calc(10px); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; }
.hub-foot button, .hub-foot a { background: none; border: 0; color: var(--ink-2); font-size: 12px; padding: 4px 0; font-weight: 700; }
.hub-foot button:hover, .hub-foot a:hover { color: var(--cyan); text-decoration: none; }
.hub-foot .sp { flex: 1; }

/* ---------- Page panel ---------- */
#panel { position: fixed; top: 72px; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 25; width: min(520px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: blur(18px); display: flex; flex-direction: column; overflow: hidden; transform: translateX(24px); opacity: 0; visibility: hidden; transition: transform 420ms var(--ease), opacity 420ms var(--ease), visibility 420ms; }
#panel.open { transform: none; opacity: 1; visibility: visible; }
#panel.min { bottom: auto; height: 64px; }
#panel.min .panel-body, #panel.min .panel-foot { display: none; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,.03), transparent); }
.panel-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--cyan)); box-shadow: 0 0 14px var(--c, var(--cyan)); flex: none; }
.panel-head .k { font-family: var(--font-display); font-size: 12px; letter-spacing: .18em; color: var(--c, var(--cyan)); flex: 1; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-head .iconbtn { width: 38px; height: 38px; border-radius: 10px; }
.panel-body { overflow: auto; padding: 18px 20px 24px; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(13,191,224,.4) transparent; }
.panel-foot { border-top: 1px solid var(--line-2); padding: 12px 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel-foot .lbl { width: 100%; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.kicker { display: inline-block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--c, var(--cyan)); font-weight: 800; margin-bottom: 8px; }
.ttl { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; margin: 0 0 6px; color: #fff; text-transform: uppercase; letter-spacing: .02em; }
.sub { font-family: var(--font-display); color: var(--green); font-size: 13px; letter-spacing: .08em; margin: 0 0 18px; text-transform: uppercase; }
.lead p { margin: 0 0 12px; color: var(--ink); font-size: var(--text-base); }
.lead p:first-child { font-size: var(--text-lg); font-weight: 600; }
.cards { display: grid; gap: 10px; margin: 18px 0; }
.card { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px; transition: var(--t); }
.card:hover { border-color: var(--line); }
.card h4 { margin: 0 0 6px; font-size: 15px; color: #fff; display: flex; align-items: center; gap: 8px; }
.card h4 i { width: 6px; height: 16px; border-radius: 3px; background: var(--c, var(--cyan)); box-shadow: 0 0 10px var(--c, var(--cyan)); }
.card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.card.link { cursor: pointer; }
.card.link:hover { background: rgba(13,191,224,.08); }
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 16px 0; }
.num { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 10px; text-align: center; }
.num b { display: block; font-family: var(--font-display); font-size: clamp(15px, 1.5vw, 21px); overflow-wrap: anywhere; color: var(--cyan); font-variant-numeric: tabular-nums; }
.num span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.list { margin: 10px 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; }
.list li { padding: 8px 12px 8px 30px; position: relative; background: rgba(255,255,255,.03); border-radius: 8px; font-size: 14px; }
.list li::before { content: ''; position: absolute; left: 12px; top: 14px; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--c, var(--cyan)); box-shadow: 0 0 8px var(--c, var(--cyan)); }
.shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.shop { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; transition: var(--t); min-height: 96px; }
.shop:hover { border-color: var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 35%, transparent); transform: translateY(-2px); }
.shop .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.shop .ic svg { width: 20px; height: 20px; }
.shop b { font-size: 14px; color: #fff; line-height: 1.25; }
.shop small { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note { background: rgba(249,115,22,.08); border: 1px solid rgba(249,115,22,.3); color: #FFD9B8; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 12px 0; }
.legal { color: var(--ink-3); font-size: 12px; line-height: 1.6; }
.sec h4 { margin: 16px 0 4px; font-size: 15px; color: #fff; }
.sec p { margin: 0; color: var(--ink-2); font-size: 14px; }
.sec p a { color: var(--cyan, #00E5FF); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }

/* Portfolio */
.pf-tools { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.pf-tools input, .pf-tools select { flex: 1; min-width: 140px; min-height: 42px; background: var(--panel-2); border: 1px solid var(--line-2); color: #fff; border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pf { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; padding: 0; aspect-ratio: 4/3; transition: var(--t); }
.pf img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: var(--t); }
.pf:hover { border-color: var(--green); transform: translateY(-2px); }
.pf:hover img { opacity: 1; transform: scale(1.04); }
.pf b { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(5,6,15,.95)); line-height: 1.2; }
.pf small { position: absolute; top: 8px; left: 8px; right: 8px; width: max-content; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: rgba(5,6,15,.8); color: var(--green); padding: 3px 7px; border-radius: 999px; font-weight: 700; }
.pf-detail img { border-radius: var(--r); margin: 10px 0 14px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.pf-detail .links { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }

/* Story (La Visione) */
.story-step { padding: 16px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line-2); margin-bottom: 10px; }
.story-step .yr { font-family: var(--font-display); color: var(--cyan); font-size: 12px; letter-spacing: .2em; }
.story-step h4 { margin: 4px 0 6px; font-size: 16px; color: #fff; }
.story-step p { margin: 0; color: var(--ink-2); font-size: 14px; }
.story-nav { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; }
.story-dots { display: flex; gap: 6px; align-items: center; justify-content: center; margin: 8px 0; }
.story-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.15); }
.story-dots i.on { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

/* Locations */
.place { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--panel-2); border: 1px solid var(--line-2); margin-bottom: 8px; }
.place .fl { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; color: #000; background: var(--orange); }
.place b { display: block; color: #fff; font-size: 15px; }
.place span { color: var(--ink-2); font-size: 13px; display: block; }
.place small { color: var(--ink-3); font-size: 12px; }

/* Form */
.form { display: grid; gap: 12px; margin-top: 10px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fld { display: grid; gap: 5px; }
.fld label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); text-transform: uppercase; }
.fld label b { color: var(--green); }
.fld input, .fld select, .fld textarea { width: 100%; min-height: 46px; background: var(--panel-2); border: 1px solid var(--line-2); color: #fff; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; transition: var(--t); }
.fld textarea { min-height: 90px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(13,191,224,.18); }
.fld.err input, .fld.err select { border-color: #FF4D6D; }
.fld .msg { font-size: 12px; color: #FF8FA3; min-height: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green); flex: none; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slots button { min-height: 40px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); font-weight: 700; font-size: 14px; }
.slots button.on { background: var(--green); color: #000; border-color: var(--green); }
.slots button:disabled { opacity: .3; cursor: not-allowed; }
.ok { background: rgba(46,241,15,.1); border: 1px solid rgba(46,241,15,.4); color: #D9FFD2; padding: 14px; border-radius: var(--r); }

/* ---------- AI chat ---------- */
#aiBtn { position: fixed; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 30; min-height: 56px; padding: 0 18px 0 12px; border-radius: 999px; background: linear-gradient(135deg, rgba(214,60,240,.3), rgba(7,9,22,.92)); border: 1px solid var(--magenta); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .04em; display: flex; align-items: center; gap: 10px; box-shadow: 0 0 28px rgba(214,60,240,.35); backdrop-filter: blur(10px); transition: var(--t); }
#aiBtn:hover { box-shadow: 0 0 44px rgba(214,60,240,.6); transform: translateY(-2px); }
#aiBtn .orb, .ai-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 35%, #ffffff, #c8ecff 25%, var(--magenta) 70%, #4C1D95 100%); box-shadow: 0 0 16px var(--magenta); animation: orb 3s ease-in-out infinite; }
#aiBtn .orb img, .ai-avatar img { width: 22px; height: 22px; object-fit: contain; }
.ai-avatar { width: 30px; height: 30px; flex: none; }
@keyframes orb { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
#ai { position: fixed; right: 16px; bottom: calc(84px + var(--safe-b)); z-index: 31; width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100vh - 160px)); background: var(--panel); border: 1px solid rgba(214,60,240,.45); border-radius: 18px; box-shadow: var(--shadow); backdrop-filter: blur(16px); display: flex; flex-direction: column; overflow: hidden; transform: translateY(16px) scale(.98); opacity: 0; visibility: hidden; transition: transform var(--t), opacity var(--t), visibility var(--t); }
#ai.open { transform: none; opacity: 1; visibility: visible; }
.ai-head { padding: 12px 14px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.ai-head h2 { margin: 0; font-family: var(--font-display); font-size: 13px; letter-spacing: .18em; color: var(--magenta); flex: 1; }
.ai-head small { color: var(--ink-2); font-size: 11px; display: block; letter-spacing: 0; font-family: var(--font-body); }
.ai-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.msg.bot { background: rgba(214,60,240,.16); border: 1px solid rgba(214,60,240,.4); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: rgba(13,191,224,.2); border: 1px solid var(--line); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg .acts button { background: rgba(255,255,255,.06); border: 1px solid var(--line-2); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; }
.msg .acts button:hover { border-color: var(--magenta); }
.msg.think { color: var(--ink-3); font-style: normal; }
.ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line-2); }
.ai-form input { flex: 1; min-height: 44px; background: var(--panel-2); border: 1px solid var(--line-2); color: #fff; border-radius: 12px; padding: 8px 12px; font: inherit; font-size: 15px; }
.ai-form input:focus { border-color: var(--magenta); outline: none; }
.ai-form button { min-width: 44px; border-radius: 12px; background: var(--magenta); color: #fff; border: 0; font-weight: 800; }
.ai-sugg { display: flex; gap: 6px; padding: 0 10px 10px; flex-wrap: wrap; }
.ai-sugg button { font-size: 12px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--ink-2); }
.ai-sugg button:hover { color: #fff; border-color: var(--magenta); }

/* ---------- Toast / cookie ---------- */
#toast { position: fixed; top: 76px; left: 50%; transform: translate(-50%, -10px); z-index: 50; background: var(--panel-2); border: 1px solid var(--line); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; visibility: hidden; transition: var(--t); max-width: 90vw; }
#toast.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#cookie { position: fixed; left: 50%; transform: translateX(-50%); top: 70px; width: min(560px, calc(100vw - 32px)); z-index: 29; margin: 0 auto; max-width: 560px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--ink-2); box-shadow: var(--shadow); }
#cookie b { color: #fff; display: block; font-size: 13px; }
#cookie.hide { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  #panel { top: auto; right: 0; left: 0; bottom: 0; width: 100%; max-height: 62vh; border-radius: 20px 20px 0 0; transform: translateY(30px); padding-bottom: var(--safe-b); }
  #panel.open { transform: none; }
  #panel.min, #panel.open.min { height: 60px; max-height: 60px; padding-bottom: 0; }
  .panel-body { padding: 14px 16px 20px; }
  .form .row { grid-template-columns: 1fr; }
  .crumbs { max-width: 46vw; }
  #hint { bottom: auto; top: 70px; }
  #hubBtn { width: 56px; height: 56px; }
  #hub { bottom: calc(84px + var(--safe-b)); max-height: 70vh; }
  #ai { bottom: calc(80px + var(--safe-b)); height: min(520px, calc(100vh - 120px)); }
  #aiBtn span.t { display: none; }
  #aiBtn { padding: 0 12px; }
  #cookie { top: 108px; padding: 8px 10px; gap: 8px; font-size: 11px; line-height: 1.3; }
  #cookie .btn { min-height: 34px; padding: 4px 10px; white-space: nowrap; }
  #panel.open { padding-bottom: calc(64px + var(--safe-b)); }
  #toast { top: auto; bottom: calc(90px + var(--safe-b)); }
  .nums { grid-template-columns: repeat(3, 1fr); }
  .slots { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* ---------- Round 2: contrasto, colori Develoop, media ---------- */
.card { border-left: 3px solid var(--c, var(--cyan)); }
.panel-head { background: linear-gradient(90deg, color-mix(in srgb, var(--c, var(--cyan)) 18%, transparent), transparent 70%); }
.kicker { padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--cyan)) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--cyan)) 45%, transparent); color: #fff; }
.sub { color: var(--c, var(--green)); }
.lead p { color: var(--ink); }
.legal { color: var(--ink-2); }
.pf em { position: absolute; right: 8px; top: 8px; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: rgba(46,241,15,.22); border: 1px solid rgba(46,241,15,.5); padding: 2px 7px; border-radius: 999px; }
.pf img { opacity: 1; }
.pf b { background: linear-gradient(transparent, rgba(5,6,15,.98) 60%); font-size: 13px; }
.pf small { background: rgba(5,6,15,.92); color: #fff; border: 1px solid rgba(46,241,15,.5); }
.shot-hero { display: block; width: 100%; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: #000; margin: 10px 0 14px; position: relative; cursor: zoom-in; }
.shot-hero img { display: block; width: 100%; max-height: 300px; object-fit: cover; object-position: top; }
.shot-hero .shot-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(5,6,15,.95)); text-align: left; }
.sec-h { margin: 18px 0 10px; font-family: var(--font-display); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--c, var(--cyan)); display: flex; align-items: center; gap: 8px; }
.sec-h small { font-family: var(--font-body); color: var(--ink-2); letter-spacing: 0; text-transform: none; font-weight: 600; }
.sec-h::after { content: ''; flex: 1; height: 1px; background: color-mix(in srgb, var(--c, var(--cyan)) 40%, transparent); }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 72px; grid-auto-flow: dense; gap: 8px; margin-bottom: 14px; }
.shot { padding: 0; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #0a0d1c; cursor: zoom-in; transition: var(--t); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.shot.wide { grid-column: span 2; }
.shot.tall { grid-row: span 2; }
.shot:hover { border-color: var(--c, var(--cyan)); transform: translateY(-2px); }
.deck-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: linear-gradient(135deg, rgba(214,60,240,.22), rgba(76,29,149,.3)); border: 1px solid rgba(214,60,240,.5); margin: 12px 0; }
.deck-cta b { display: block; font-size: 14px; color: #fff; }
.deck-cta span { font-size: 12px; color: var(--ink-2); }
.lightbox, .deck { position: fixed; inset: 0; z-index: 60; background: rgba(3,4,10,.94); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: min(1200px, 92vw); max-height: 86vh; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 92vw; max-height: 78vh; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); border: 1px solid var(--line-2); }
.lightbox figcaption { color: #fff; font-size: 14px; font-weight: 600; text-align: center; }
.lb-close { position: absolute; top: 14px; right: 14px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 26px; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink-2); font-weight: 700; letter-spacing: .1em; }
.deck { flex-direction: column; align-items: stretch; }
.deck-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid rgba(214,60,240,.4); }
.deck-bar b { flex: 1; font-family: var(--font-display); font-size: 12px; letter-spacing: .16em; color: var(--magenta); }
.deck iframe { flex: 1; border: 0; width: 100%; background: #0b0a14; }
body.lb-open { overflow: hidden; }
@media (max-width: 760px) { .shots { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 64px; } .lb-prev, .lb-next { top: auto; bottom: 44px; transform: none; } .shot-hero img { max-height: 200px; } }

/* =====================================================================
   Round 3 · Pannelli "develoopeu.com": superfici antracite solide, schede
   grigie in rilievo con ombre stratificate, titoli ciano, CTA verde 3D.
   ===================================================================== */
:root {
  --sf-0: #121215;            /* fondo pannello (come le sezioni scure del sito) */
  --sf-1: #1c1d22;            /* testata / piede */
  --sf-2: #3b3d45;            /* scheda in rilievo (grigio delle card del sito) */
  --sf-2b: #2f3138;
  --sf-in: #0c0d10;           /* campi incassati */
  --edge: #3a3a40; --edge-hi: rgba(255,255,255,.09);
  --sh-raise: 0 1px 0 rgba(255,255,255,.07) inset, 0 -1px 0 rgba(0,0,0,.5) inset, 0 2px 3px rgba(0,0,0,.45), 0 8px 16px rgba(0,0,0,.4), 0 18px 34px rgba(0,0,0,.3);
  --sh-raise-hi: 0 1px 0 rgba(255,255,255,.1) inset, 0 -1px 0 rgba(0,0,0,.5) inset, 0 4px 6px rgba(0,0,0,.45), 0 14px 26px rgba(0,0,0,.45), 0 28px 50px rgba(0,0,0,.35);
  --sh-float: 0 2px 0 rgba(255,255,255,.05) inset, 0 10px 20px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.6), 0 60px 120px rgba(0,0,0,.45);
  --sh-in: inset 0 2px 5px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.04), 0 1px 0 rgba(255,255,255,.05);
}
/* superfici flottanti principali */
#panel, #hub, #ai { background: linear-gradient(180deg, #17181c 0%, var(--sf-0) 40%); border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--sh-float); backdrop-filter: none; }
#ai { border-color: #4a3a52; }
.panel-head, .hub-head, .ai-head { background: linear-gradient(180deg, #24252b, var(--sf-1)) !important; border-bottom: 1px solid #000 !important; box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 6px 12px -6px rgba(0,0,0,.7); position: relative; z-index: 1; }
.panel-head::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--cyan)); border-radius: 12px 0 0 0; }
.panel-head .dot { box-shadow: 0 0 0 3px rgba(0,0,0,.5), 0 0 10px var(--c, var(--cyan)); }
.panel-foot, .hub-foot { background: var(--sf-1); border-top: 1px solid #000; box-shadow: 0 -1px 0 rgba(255,255,255,.04) inset, 0 -8px 14px -8px rgba(0,0,0,.7); }
.panel-body { scrollbar-color: #4a4c55 transparent; }

/* titoli: ciano come sul sito, sottotitolo verde */
.ttl { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.5); }
.kicker { background: var(--sf-2b); border: 1px solid #000; box-shadow: var(--sh-raise); color: var(--c, var(--cyan)); }
.lead p:first-child { color: #fff; }

/* schede in rilievo */
.card, .num, .shop, .story-step, .place, .deck-cta, .hub-item, .list li {
  background: linear-gradient(180deg, var(--sf-2) 0%, var(--sf-2b) 100%); border: 1px solid #0a0a0c; border-radius: 10px; box-shadow: var(--sh-raise);
}
.card { border-left: 1px solid #0a0a0c; position: relative; overflow: hidden; }
.card::before, .shop::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c, var(--cyan)); opacity: .9; }
.shop { position: relative; overflow: hidden; }
.card h4 { color: var(--c, var(--cyan)); font-size: 16px; font-weight: 800; }
.card h4 i { display: none; }
.card p, .shop small, .story-step p, .place span { color: #d4d7de !important; }
.card.link:hover, .shop:hover, .place:hover, .hub-item:hover, .story-step:hover { transform: translateY(-3px); box-shadow: var(--sh-raise-hi); background: linear-gradient(180deg, #44464f 0%, #34363d 100%); }
.shop:hover { border-color: #0a0a0c; }
.shop .ic { background: #1a1b20; box-shadow: var(--sh-in); color: var(--c); border-radius: 10px; }
.num { background: linear-gradient(180deg, #2a2c33, #202127); }
.num b { text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.num span { color: #b9bec8; }
.list li { padding: 9px 12px 9px 30px; }
.deck-cta { background: linear-gradient(180deg, #3d3446, #2d2734); border-color: #0a0a0c; }
.story-step .yr { color: var(--green); }
.place .fl { box-shadow: 0 2px 0 rgba(255,255,255,.25) inset, 0 4px 8px rgba(0,0,0,.5); }

/* HUB */
.hub-item { margin-bottom: 6px; border: 1px solid #0a0a0c; }
.hub-item.active { box-shadow: var(--sh-raise), inset 4px 0 0 var(--c, var(--cyan)); border-color: #0a0a0c; }
.hub-item .dot { box-shadow: 0 0 0 2px rgba(0,0,0,.5), 0 0 8px var(--c, var(--cyan)); }
.hub-sub { background: var(--sf-in); box-shadow: var(--sh-in); border-radius: 10px; margin: -2px 0 8px; padding: 4px 4px 4px 22px; }

/* portfolio: miniature come schede fotografiche in rilievo */
.pf { border: 1px solid #0a0a0c; border-radius: 10px; box-shadow: var(--sh-raise); background: var(--sf-2b); }
.pf:hover { box-shadow: var(--sh-raise-hi); border-color: #0a0a0c; transform: translateY(-3px); }
.pf::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); pointer-events: none; }
.pf small { background: #16171b; border: 1px solid #000; color: var(--green); box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.shot, .shot-hero { border: 1px solid #0a0a0c; box-shadow: var(--sh-raise); }

/* bottoni: CTA verde "fisica" come sul sito, secondari grigi in rilievo */
.btn { border-radius: 9px; }
.btn-primary { background: linear-gradient(180deg, #4dff31 0%, var(--green) 55%, #25c90b 100%); color: #041004; font-weight: 800; box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 4px 0 #168a06, 0 8px 16px rgba(0,0,0,.5), 0 0 22px rgba(46,241,15,.2); }
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 5px 0 #168a06, 0 12px 22px rgba(0,0,0,.5), 0 0 30px rgba(46,241,15,.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 1px 0 #168a06, 0 3px 6px rgba(0,0,0,.5); }
.btn-ghost { background: linear-gradient(180deg, #474952, #383a42); border: 1px solid #0a0a0c; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 3px 0 #1d1e23, 0 6px 12px rgba(0,0,0,.45); }
.btn-ghost:hover { background: linear-gradient(180deg, #51535d, #40424b); }
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 1px 0 #1d1e23, 0 2px 4px rgba(0,0,0,.45); }
.chip { background: linear-gradient(180deg, #3e4048, #313339); border: 1px solid #0a0a0c; color: #e6e8ee; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 3px 6px rgba(0,0,0,.4); }
.chip:hover, .chip.on { background: linear-gradient(180deg, #4a4c55, #3a3c44); border-color: #0a0a0c; color: #fff; }

/* controlli superiori e flottanti */
.crumbs, .iconbtn, #hint, #toast, #cookie, #tooltip { background: linear-gradient(180deg, #26272d, #17181c); border: 1px solid #000; box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 6px 14px rgba(0,0,0,.55); backdrop-filter: none; }
.iconbtn:hover { background: linear-gradient(180deg, #30323a, #1d1e23); border-color: #000; color: var(--cyan); }
#tooltip { border-top: 3px solid var(--c, var(--cyan)); }
#hubBtn { background: linear-gradient(180deg, #2a2c33, #141519); border: 1px solid #000; box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 4px 0 #050506, 0 10px 22px rgba(0,0,0,.6), 0 0 0 2px rgba(13,191,224,.55), 0 0 24px rgba(13,191,224,.3); }
#aiBtn { background: linear-gradient(180deg, #2c2631, #16131a); border: 1px solid #000; box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 4px 0 #050506, 0 10px 22px rgba(0,0,0,.6), 0 0 0 2px rgba(214,60,240,.6), 0 0 24px rgba(214,60,240,.28); }

/* campi form incassati */
.fld input, .fld select, .fld textarea, .pf-tools input, .pf-tools select, .ai-form input { background: var(--sf-in); border: 1px solid #2c2d33; box-shadow: var(--sh-in); }
.fld input:focus, .fld select:focus, .fld textarea:focus, .pf-tools input:focus, .ai-form input:focus { border-color: var(--cyan); box-shadow: var(--sh-in), 0 0 0 3px rgba(13,191,224,.22); outline: none; }
.slots button { background: linear-gradient(180deg, #3b3d45, #2f3138); border: 1px solid #0a0a0c; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 3px 6px rgba(0,0,0,.4); }
@media (max-width: 760px) { #panel { border-radius: 14px 14px 0 0; } }
/* chat C.R.I.O.: fumetti in rilievo */
.msg.bot { background: linear-gradient(180deg, #3b3342, #2c2632); border: 1px solid #0a0a0c; box-shadow: var(--sh-raise); }
.msg.user { background: linear-gradient(180deg, #1f4f5c, #173c47); border: 1px solid #0a0a0c; box-shadow: var(--sh-raise); }
.msg .acts button { background: linear-gradient(180deg, #474952, #383a42); border: 1px solid #0a0a0c; box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 3px 6px rgba(0,0,0,.4); }
/* banner cookie: su desktop sopra il pulsante HUB, lontano dal pannello di destra */
@media (min-width: 761px) { #cookie { top: auto; left: 16px; transform: none; bottom: calc(96px + var(--safe-b)); width: min(440px, calc(100vw - 600px)); margin: 0; } }
#cookie .btn { white-space: nowrap; flex: none; }
.ld-grid { background-image: linear-gradient(rgba(13,191,224,.7) 2px, transparent 2px), linear-gradient(90deg, rgba(13,191,224,.7) 2px, transparent 2px); opacity: .7; }

/* Fix HUB: la transizione "all" ereditava visibility/background e lasciava le voci invisibili.
   Transizioni limitate alle sole proprietà animate. */
.hub-item, .hub-sub button, .card, .shop, .place, .story-step {
  transition: transform var(--t), box-shadow var(--t), border-color var(--t), filter var(--t);
}

/* Desktop: il pannello si ferma sopra il pulsante C.R.I.O. (niente sovrapposizioni con i chip)
   e il suggerimento in basso si centra nello spazio libero a sinistra del pannello. */
@media (min-width: 761px) {
  #panel { bottom: calc(88px + var(--safe-b)); }
  body:has(#panel.open:not(.min)) #hint { left: calc((100vw - min(520px, calc(100vw - 32px)) - 32px) / 2 + 40px); max-width: calc(100vw - min(520px, calc(100vw - 32px)) - 200px); }
}

/* ===================== Round 6 · Explore (Enter the Grid / Light Cycle) ===================== */
.hub-modes { padding: 10px 8px 2px; border-bottom: 1px solid rgba(255,255,255,.06); }
.hub-modes .hm-t { font-family: var(--font-display); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); padding: 0 4px 8px; }
.hub-modes .hm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hm-b { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: linear-gradient(150deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(7,9,22,.6)); color: #fff; text-align: left; transition: var(--t); }
.hm-b svg { width: 26px; height: 26px; flex: none; color: var(--c); filter: drop-shadow(0 0 6px var(--c)); }
.hm-b span { min-width: 0; display: grid; }
.hm-b b { font-family: var(--font-display); font-size: 12.5px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-b small { font-size: 10.5px; color: var(--ink-2); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-b:hover, .hm-b.active { box-shadow: 0 0 22px color-mix(in srgb, var(--c) 40%, transparent), inset 0 0 0 1px var(--c); }
.hm-exit { width: 100%; margin: 6px 0 8px; padding: 9px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--ink); font-size: 13px; font-weight: 600; }
.hm-exit:hover { border-color: var(--cyan); }

#gridHud { position: fixed; top: 64px; left: 16px; z-index: 22; display: none; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 32px); }
body.grid-mode #gridHud { display: flex; }
#gridHud .chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--cyan); font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #fff; backdrop-filter: blur(10px); }
#gridHud .chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: gridPulse 1.6s ease-in-out infinite; }
body.grid-bike #gridHud .chip { border-color: var(--green); } body.grid-bike #gridHud .chip i { background: var(--green); box-shadow: 0 0 10px var(--green); }
#gridSpeed { display: none; min-width: 86px; padding: 7px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); font-family: var(--font-display); font-size: 15px; letter-spacing: .06em; color: var(--green); text-align: center; backdrop-filter: blur(10px); font-variant-numeric: tabular-nums; }
body.grid-bike #gridSpeed { display: inline-block; }
#gridHud .btn { backdrop-filter: blur(10px); }
@keyframes gridPulse { 50% { opacity: .35; } }

#gridPrompt { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translate(-50%, 12px); z-index: 21; display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px)); padding: 9px 16px 9px 9px; border-radius: 14px; background: var(--panel); border: 1px solid var(--c, var(--cyan)); box-shadow: 0 0 24px color-mix(in srgb, var(--c, #0DBFE0) 35%, transparent); color: #fff; text-align: left; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; backdrop-filter: blur(12px); }
#gridPrompt.on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
body:not(.grid-mode) #gridPrompt, body.panel-open #gridPrompt { opacity: 0; pointer-events: none; }
#gridPrompt kbd { flex: none; min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 9px; background: var(--c, var(--cyan)); color: #04060d; font-family: var(--font-display); font-weight: 800; font-size: 13px; }
#gridPrompt span { display: grid; min-width: 0; }
#gridPrompt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#gridPrompt small { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#joy { position: fixed; left: 20px; bottom: calc(96px + var(--safe-b)); z-index: 21; width: 124px; height: 124px; border-radius: 50%; display: none; place-items: center; background: radial-gradient(circle, rgba(13,191,224,.10), rgba(7,9,22,.55) 70%); border: 1px solid rgba(13,191,224,.55); box-shadow: inset 0 0 24px rgba(13,191,224,.18), 0 0 18px rgba(13,191,224,.18); touch-action: none; backdrop-filter: blur(6px); }
#joy i { width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), rgba(13,191,224,.55) 45%, rgba(7,9,22,.85)); border: 1px solid var(--cyan); box-shadow: 0 0 16px rgba(13,191,224,.6); pointer-events: none; transition: transform .08s linear; }
#joy.on i { transition: none; }
body.grid-mode.touch #joy { display: grid; }
body.grid-mode.panel-open #joy { display: none; }
body.grid-bike #joy { border-color: rgba(46,241,15,.55); }

#gridFlash { position: fixed; inset: 0; z-index: 19; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 60%, rgba(13,191,224,.28), transparent 60%); }
#gridFlash.on { animation: gridFlash .7s ease-out; }
@keyframes gridFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
body.grid-mode #scene canvas { touch-action: none; }
body.grid-mode #tooltip { display: none; }

@media (max-width: 759px) {
  #gridHud { top: 62px; left: 12px; gap: 6px; flex-wrap: nowrap; max-width: calc(100vw - 24px); }
  #gridHud .chip { padding: 6px 9px; font-size: 10px; letter-spacing: .06em; gap: 6px; white-space: nowrap; }
  #gridHud .btn { padding: 6px 9px; font-size: 11px; white-space: nowrap; }
  #gridSpeed { min-width: 58px; font-size: 12px; padding: 5px 8px; }
  body.grid-mode #hint { top: 106px; white-space: normal; text-align: center; line-height: 1.35; border-radius: 14px; width: max-content; max-width: calc(100vw - 24px); }
  #gridPrompt { bottom: calc(88px + var(--safe-b)); left: auto; right: 12px; transform: translate(0, 12px); max-width: calc(100vw - 172px); }
  #gridPrompt.on { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { #gridFlash.on { animation: none; } #gridHud .chip i { animation: none; } }

/* ===================== Round 7 · pannelli informativi su smartphone =====================
   Obiettivo: più spazio al testo. Pannello più alto, header e footer compatti (una sola riga
   scorrevole per CTA e distretti collegati), HUB e C.R.I.O. nascosti mentre si legge. */
@media (max-width: 760px) {
  #panel { max-height: min(78vh, calc(100dvh - 128px)); height: min(78vh, calc(100dvh - 128px)); padding-bottom: var(--safe-b) !important; bottom: 0 !important; border-radius: 16px 16px 0 0; }
  #panel.min, #panel.open.min { height: 52px; max-height: 52px; bottom: calc(82px + var(--safe-b)) !important; left: 10px; right: 10px; width: auto; border-radius: 14px; }
  body.panel-open:not(:has(#panel.min)) #hubBtn, body.panel-open:not(:has(#panel.min)) #aiBtn { opacity: 0; pointer-events: none; transform: translateY(20px); }
  .panel-head { padding: 6px 8px 6px 14px; gap: 8px; min-height: 52px; }
  .panel-head .k { font-size: 11px; letter-spacing: .12em; }
  .panel-head .iconbtn { width: 38px; height: 38px; border-radius: 10px; }
  .panel-body { padding: 14px 16px 18px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .ttl { font-size: 21px; line-height: 1.18; margin-bottom: 4px; }
  .sub { font-size: 11.5px; letter-spacing: .06em; margin-bottom: 12px; }
  .kicker { font-size: 11px; margin-bottom: 6px; }
  .lead p { font-size: 15px; line-height: 1.6; margin-bottom: 10px; }
  .lead p:first-child { font-size: 16px; }
  .panel-body p, .panel-body li { font-size: 14.5px; line-height: 1.6; }
  .panel-body h3 { font-size: 16px !important; }
  .cards { gap: 8px; margin: 14px 0; }
  .card { padding: 11px 13px; }
  .card h4 { font-size: 14.5px; margin-bottom: 3px; }
  .card p { font-size: 13.5px; line-height: 1.5; margin: 0; }
  .nums { gap: 6px; }
  /* footer: una riga orizzontale scorrevole, alta ~56px */
  .panel-foot { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; padding: 8px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scroll-padding-inline: 10px; mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .panel-foot::-webkit-scrollbar { display: none; }
  .panel-foot > * { flex: none; scroll-snap-align: start; }
  .panel-foot .btn { min-height: 38px; padding: 6px 12px; font-size: 13px; }
  .panel-foot .lbl { display: none; }
  .panel-foot .lbl + .chip { margin-left: 6px; position: relative; }
  .panel-foot .lbl + .chip::before { content: ''; position: absolute; left: -7px; top: 8px; bottom: 8px; width: 1px; background: rgba(255,255,255,.14); }
  .panel-foot .chip { padding: 7px 11px; font-size: 12.5px; min-height: 38px; }
  .panel-foot:empty { display: none; }
}
@media (max-width: 760px) and (max-height: 640px) {
  #panel { height: calc(100dvh - 96px); max-height: calc(100dvh - 96px); }
}
@media (max-width: 430px) {
  #topbar { padding: 10px 12px; }
  .brand { font-size: 13px; gap: 8px; letter-spacing: .1em; }
  .brand img { width: 34px; height: 34px; }
  .crumbs { font-size: 12px; padding: 5px 11px; max-width: 38vw; }
}
@media (max-width: 380px) { .brand span, .brand b { display: none; } }
/* Round 7 · joystick più grande e leggibile; anello verde quando si corre (tenendo il bordo) */
#joy { width: 138px; height: 138px; left: max(18px, env(safe-area-inset-left)); }
#joy::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed rgba(13,191,224,.25); transition: border-color .2s, box-shadow .2s; pointer-events: none; }
#joy.run::after { border-color: rgba(46,241,15,.85); box-shadow: 0 0 16px rgba(46,241,15,.45); border-style: solid; }
#joy i { width: 56px; height: 56px; }

/* Round 8 · prenotazione: fasce mostrate solo se disponibili */
.slots:empty { display: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--cyan, #0DBFE0); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
#cookie a#cookieLink { color: var(--cyan, #0DBFE0); text-decoration: underline; font-weight: 700; }
/* Round 8 · la chip della sezione non si sovrappone mai al logo: si restringe con ellissi */
#topbar { gap: 8px; }
.brand, .topbtns { flex: none; }
.crumbs { flex: 0 1 auto; min-width: 0; }
.crumbs b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
