@font-face { font-family: 'Saira'; src: url('../fonts/Saira-VF.ttf') format('truetype'); font-weight: 100 900; font-stretch: 50% 125%; font-display: swap; }
@font-face { font-family: 'Saira'; src: url('../fonts/Saira-Italic-VF.ttf') format('truetype'); font-style: italic; font-weight: 100 900; font-stretch: 50% 125%; font-display: swap; }
@font-face { font-family: 'Mono'; src: url('../fonts/ShareTechMono-Regular.ttf') format('truetype'); font-display: swap; }
:root { --ambra: #E2A53B; --ruggine: #ff6a4a; --ciano: #5fd6ec; --crema: #F3E4C8; --fondo: #02060a; --petrolio: #2C6A7C; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--fondo); color: var(--crema); font-family: 'Mono', monospace; }
#scena { position: fixed; inset: 0; }
#scena canvas { display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.velo { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 50; }

/* etichette 3D */
.strato-etichette { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.etichetta { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none; will-change: transform; }
.etichetta.cliccabile { pointer-events: auto; cursor: pointer; }
.hud-pl { display: inline-block; transform: translate(-50%, -100%); font-size: 10px; letter-spacing: .08em; color: #fff; background: rgba(2, 6, 10, .6); border-left: 2px solid var(--ciano); padding: 1px 5px; }
.hud-pl.nd { border-left-color: rgba(243, 228, 200, .4); }
.etichetta.cliccabile:hover .hud-pl { background: var(--ambra); color: #02060a; }
.hud-reg { display: inline-block; transform: translate(-50%, -50%); font-size: 9px; letter-spacing: .3em; color: rgba(95, 214, 236, .8); }
.hud-reg.rosso { color: rgba(255, 90, 90, .9); font-size: 12px; }
.hud-rotta { display: inline-block; transform: translate(-50%, -50%); font-size: 9px; letter-spacing: .18em; color: rgba(140, 210, 230, .8); text-shadow: 0 0 6px #000; }
.hud-rotta.canon { color: var(--ambra); }
.hud-strato { transform: translate(0, -50%); text-align: left; padding-left: 8px; border-left: 2px solid var(--c); }
.hud-strato b { display: block; font-family: 'Saira'; font-style: italic; font-weight: 800; font-size: 15px; color: var(--c); letter-spacing: .04em; }
.hud-strato i { display: block; font-style: normal; font-size: 10px; color: rgba(243, 228, 200, .65); }
.hud-strato em { display: inline-block; font-style: normal; font-size: 10px; margin-top: 3px; background: var(--c); color: #02060a; padding: 0 6px; }
.hud-globo { display: inline-block; transform: translate(-50%, -100%); font-family: 'Saira'; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 18px; color: var(--crema); text-shadow: 0 0 14px rgba(226, 165, 59, .7), 2px 2px 0 #C4502E; letter-spacing: .02em; }

/* barra superiore */
.barra { position: fixed; top: 0; left: 0; right: 0; height: 46px; display: flex; align-items: center; gap: 20px; padding: 0 16px; border-bottom: 1px solid rgba(226, 165, 59, .35); background: linear-gradient(180deg, rgba(2, 6, 10, .95), rgba(2, 6, 10, .6)); z-index: 10; font-size: 11px; }
.barra .sx { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.barra b { font-family: 'Saira'; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 15px; letter-spacing: .02em; }
.strisce { display: flex; gap: 3px; transform: skewX(-24deg); } .strisce i { width: 6px; height: 18px; display: block; }
.strisce i:nth-child(1) { background: var(--petrolio); } .strisce i:nth-child(2) { background: var(--ambra); } .strisce i:nth-child(3) { background: #C4502E; }
.tag { border: 1px solid var(--ruggine); color: var(--ruggine); padding: 2px 8px; letter-spacing: .15em; }
.barra nav { margin: 0 auto; display: flex; gap: 4px; }
.barra nav button { background: none; border: 1px solid rgba(226, 165, 59, .4); color: rgba(243, 228, 200, .7); padding: 4px 12px; letter-spacing: .15em; }
.barra nav button.on { background: var(--ambra); color: #02060a; border-color: var(--ambra); }
.solo-tel { display: none; }
.dx-info { letter-spacing: .12em; color: rgba(243, 228, 200, .7); } .dx-info b { color: var(--ambra); font-family: inherit; font-style: normal; font-size: 11px; }
.pallino { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5fec8f; box-shadow: 0 0 8px #5fec8f; margin-right: 6px; }

/* pannello sinistro */
.sx-pannello { position: fixed; left: 14px; top: 58px; bottom: 170px; width: 210px; z-index: 6; font-size: 11px; display: flex; flex-direction: column; }
.emblema { width: 92px; display: block; margin: 0 auto 6px; flex: none; }
.lbl { color: var(--ambra); letter-spacing: .25em; font-size: 10px; border-bottom: 1px solid rgba(226, 165, 59, .3); padding-bottom: 4px; margin: 10px 0 6px; flex: none; }
#cerca { width: 100%; background: rgba(2, 6, 10, .7); border: 1px solid rgba(95, 214, 236, .4); padding: 6px 8px; font-size: 11px; letter-spacing: .1em; outline: none; flex: none; }
#cerca:focus { border-color: var(--ambra); }
.elenco { overflow: auto; flex: 1; min-height: 60px; margin-top: 4px; scrollbar-width: thin; scrollbar-color: rgba(226, 165, 59, .4) transparent; }
.elenco button { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; border-bottom: 1px solid rgba(243, 228, 200, .08); padding: 5px 2px; text-align: left; letter-spacing: .08em; font-size: 11px; }
.elenco button i { display: flex; gap: 3px; } .elenco button em { width: 7px; height: 7px; background: var(--c); transform: rotate(45deg); }
.elenco button:hover span, .elenco button.on span { color: var(--ambra); }
.filtri { display: flex; gap: 10px; flex-wrap: wrap; color: rgba(243, 228, 200, .75); flex: none; } .filtri input { accent-color: var(--ambra); }

/* scheda destra */
.dx-pannello { position: fixed; right: 14px; top: 58px; bottom: 170px; width: 310px; z-index: 6; overflow: auto; border-left: 1px solid rgba(226, 165, 59, .35); padding: 4px 4px 4px 14px; font-size: 11px;
  background: linear-gradient(90deg, rgba(2, 6, 10, .55), rgba(2, 6, 10, .85)); transform: translateX(calc(100% + 30px)); transition: transform .45s cubic-bezier(.2, .7, .2, 1); scrollbar-width: thin; }
.dx-pannello.aperta { transform: none; }
.dx-pannello .chiudi { position: absolute; right: 4px; top: 0; background: none; border: 0; color: var(--ruggine); font-size: 22px; }
.dx-tit small { color: var(--ruggine); letter-spacing: .3em; font-size: 10px; }
.dx-tit h2 { font-family: 'Saira'; font-style: italic; font-weight: 900; font-stretch: 125%; font-size: 32px; margin: 2px 0; letter-spacing: .01em; text-shadow: 0 0 18px rgba(226, 165, 59, .45); line-height: 1; }
.dx-tit .sub { color: var(--ciano); font-size: 11px; }
.dx-blocco { margin-top: 12px; } .dx-blocco p { margin: 4px 0; line-height: 1.45; color: rgba(243, 228, 200, .85); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; } .chip { border: 1px solid rgba(243, 228, 200, .2); padding: 2px 6px; color: rgba(243, 228, 200, .35); }
.chip.on { border-color: var(--c); color: #02060a; background: var(--c); }
.fatto { display: grid; grid-template-columns: 26px 1fr; gap: 6px; border-top: 1px solid rgba(243, 228, 200, .1); padding: 6px 0; }
.fatto .n { color: var(--ambra); } .fatto p { margin: 0; line-height: 1.45; }
.nota { color: rgba(243, 228, 200, .6); font-style: italic; line-height: 1.4; }
.dx-fonti { margin-top: 12px; color: rgba(243, 228, 200, .45); letter-spacing: .1em; font-size: 9px; line-height: 1.6; word-break: break-word; }
.dx-fonti a { color: var(--ciano); }

/* fascia inferiore */
.basso { position: fixed; left: 14px; right: 14px; bottom: 8px; z-index: 6; }
.comandi { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 8px; }
.comandi button { background: var(--ruggine); color: #02060a; border: 0; padding: 6px 16px; font-family: 'Saira'; font-style: italic; font-weight: 900; font-size: 13px; transform: skewX(-12deg); box-shadow: 3px 3px 0 #000; letter-spacing: .04em; }
.suggerimento { font-size: 10px; letter-spacing: .14em; color: rgba(243, 228, 200, .5); }
.kpi { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kpi .k { border: 1px solid rgba(226, 165, 59, .35); border-top: 3px solid var(--ambra); background: rgba(2, 6, 10, .7); padding: 7px 10px; }
.kpi b { display: block; font-family: 'Saira'; font-style: italic; font-weight: 900; font-size: 26px; color: var(--ambra); line-height: 1; }
.kpi span { display: block; font-size: 10px; letter-spacing: .14em; margin-top: 3px; } .kpi i { font-style: normal; font-size: 10px; color: rgba(243, 228, 200, .5); }
.linea { display: flex; gap: 2px; margin-top: 6px; }
.linea button { flex: 1; border: 0; height: 16px; background: var(--c); color: #02060a; font-size: 9px; letter-spacing: .2em; box-shadow: 0 0 8px var(--c); padding: 0; }
.linea button.off { opacity: .25; box-shadow: none; }
.piede { margin: 5px 0 0; text-align: center; font-size: 9px; letter-spacing: .08em; color: rgba(243, 228, 200, .35); }

/* didascalie del reel (livrea) */
.didascalie { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.didascalia { position: absolute; left: 7%; right: 7%; bottom: 24%; display: flex; flex-direction: column; align-items: flex-start; }
.didascalia small { display: inline-block; background: var(--petrolio); color: var(--crema); font-family: 'Saira'; font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 2.1vh; padding: .4vh 1.4vh; transform: skewX(-12deg); box-shadow: .4vh .4vh 0 #000; letter-spacing: .04em; }
.didascalia h2 { font-family: 'Saira'; font-style: italic; font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: 6.2vh; line-height: .92; margin: 1.4vh 0 1vh; color: var(--crema); text-shadow: .6vh .6vh 0 #C4502E, 0 0 3vh rgba(0, 0, 0, .7); }
.didascalia p { margin: 0; background: var(--crema); color: #102A3A; font-family: 'Saira'; font-weight: 700; font-size: 2.2vh; padding: .6vh 1.4vh; transform: skewX(-12deg); box-shadow: .4vh .4vh 0 var(--ambra); max-width: 34ch; }
.didascalia.alto { bottom: auto; top: 20%; }
.firma-reel { display: none; }
body.modo-reel .barra, body.modo-reel .sx-pannello, body.modo-reel .dx-pannello, body.modo-reel .basso,
body.in-anteprima .barra, body.in-anteprima .sx-pannello, body.in-anteprima .dx-pannello, body.in-anteprima .kpi, body.in-anteprima .linea, body.in-anteprima .piede, body.in-anteprima .suggerimento { display: none !important; }
body.modo-reel .firma-reel, body.in-anteprima .firma-reel { display: flex; position: fixed; top: 12%; left: 7%; flex-direction: column; align-items: flex-start; z-index: 31; pointer-events: none; gap: .6vh; }
.firma-reel span { font-family: 'Saira'; font-style: italic; font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: 2.2vh; color: var(--crema); text-shadow: .3vh .3vh 0 #102A3A; }
.firma-reel i { font-style: normal; font-size: 1.5vh; color: var(--ambra); text-transform: uppercase; letter-spacing: .1em; }
body.modo-reel .hud-pl { font-size: 1.2vh; }
body.modo-reel .hud-strato b { font-size: 2.1vh; } body.modo-reel .hud-strato i, body.modo-reel .hud-strato em { font-size: 1.3vh; }
body.modo-reel .hud-reg { font-size: 1.2vh; } body.modo-reel .hud-globo { font-size: 3vh; }

/* smartphone */
@media (max-width: 760px) {
  .barra { height: auto; flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
  .dx-info, .tag { display: none; }
  .barra nav { margin: 0; width: 100%; } .barra nav button { flex: 1; padding: 5px 4px; font-size: 10px; }
  .solo-tel { display: block; }
  .sx-pannello { display: none; top: 86px; bottom: 120px; left: 8px; right: 8px; width: auto; background: rgba(2, 6, 10, .92); padding: 8px; border: 1px solid rgba(226, 165, 59, .35); }
  body.elenco-aperto .sx-pannello { display: flex; }
  .emblema { display: none; }
  .dx-pannello { top: auto; bottom: 108px; left: 8px; right: 8px; width: auto; max-height: 52vh; transform: translateY(calc(100% + 140px)); border: 1px solid rgba(226, 165, 59, .35); padding: 8px 10px; }
  .dx-pannello.aperta { transform: none; }
  .kpi { grid-template-columns: repeat(3, 1fr); } .kpi .k:nth-child(n+4) { display: none; } .kpi b { font-size: 20px; }
  .suggerimento, .piede { display: none; }
  .hud-strato b { font-size: 11px; } .hud-strato i { display: none; }
}
