:root {
  color-scheme: dark;
  --fondo: #101813;
  --vetro: rgba(19, 27, 23, .94);
  --bordo: rgba(211, 223, 200, .17);
  --testo: #f4f1e6;
  --tenue: #b9c2b3;
  --fioco: #8c9b8a;
  --acceso: #b9dc87;
  --allarme: #ff9982;
  --attenzione: #e5bb71;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; width: 100%; }
body { margin: 0; overflow: hidden; color: var(--testo); background: var(--fondo); font: 14px/1.5 "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, summary, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--attenzione); outline-offset: 4px; }
[hidden] { display: none !important; }
#scena, #scena-voxel { position: absolute; inset: 0; overflow: hidden; }
#scena { background: radial-gradient(ellipse at 58% 44%, #173b3a, #081719 60%, #060f12); }
#scena-voxel { background: #bad5d0; touch-action: none; }
#scena canvas, #scena-voxel canvas { display: block; }
body[data-modalita="voxel"] #scena { visibility: hidden; }
body[data-modalita="voxel"] .strato.mappamondo, body[data-modalita="voxel"] .solo-mappa { display: none; }
.strato.voxel, .solo-voxel { display: none; }
body[data-modalita="voxel"] .strato.voxel, body[data-modalita="voxel"] .solo-voxel { display: block; }
.strato { position: fixed; z-index: 2; pointer-events: none; }
.pannello { pointer-events: auto; background: var(--vetro); border: 1px solid var(--bordo); border-radius: 5px; box-shadow: 0 8px 28px #06110d25, inset 0 1px #ffffff05; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.hud-header { inset: 0 0 auto; height: 74px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--bordo); background: linear-gradient(180deg, #111c18fa, #111c18ee); }
.marchio { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.marchio svg { width: 33px; height: 38px; }
.marchio h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .19em; line-height: 1; }
.marchio p { margin: 6px 0 0; font: 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .29em; color: var(--fioco); }
.modalita-titolo { display: flex; align-items: center; gap: 18px; margin-right: auto; margin-left: 32px; color: var(--tenue); font: 10px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.modalita-titolo::before { content: ""; height: 22px; width: 1px; background: var(--bordo); }
.modalita-titolo span::before { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--attenzione); margin-right: 9px; vertical-align: 2px; }
.chi { display: flex; align-items: center; gap: 12px; pointer-events: auto; font-size: 12px; min-width: 0; }
.chi-login { font-weight: 650; color: var(--testo); }
.chi-dio { padding: 3px 6px; color: #292313; background: var(--attenzione); border-radius: 2px; font: 700 9px/1.2 var(--mono); letter-spacing: .1em; }
.chi-stato { color: var(--fioco); font-size: 10px; max-width: 220px; }
.chi-stato::before { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--fioco); border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.chi-stato.ok::before { background: var(--acceso); box-shadow: 0 0 8px #b9dc8760; }
.chi-stato.attesa::before { background: var(--attenzione); }
.chi-stato.guasto::before { background: var(--allarme); }
.chi-esci { margin-left: 6px; }
#mondo, #voxel { position: fixed; left: 24px; top: 98px; width: 278px; padding: 20px; max-height: calc(100dvh - 290px); overflow: auto; scrollbar-width: thin; scrollbar-color: #53634d transparent; }
.titoletto { margin: 0 0 10px; color: var(--attenzione); text-transform: uppercase; font: 600 10px/1.3 var(--mono); letter-spacing: .18em; }
.titolo-pannello { margin: 0 0 9px; font-size: 22px; font-weight: 650; line-height: 1.2; letter-spacing: -.035em; }
.testo-pannello { color: var(--tenue); font-size: 12px; line-height: 1.7; margin: 0; }
.riga-divisoria { height: 0; border: 0; border-top: 1px solid var(--bordo); margin: 18px 0; }
.numeri { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 12px; margin: 12px 0 0; font-size: 11px; }
.numeri dt { color: var(--fioco); }
.numeri dd { margin: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.numeri .nota { display: block; margin-top: 2px; color: var(--fioco); font-size: 9px; }
sup { font-size: .7em; }
.interruttore { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-size: 12px; }
.interruttore input { position: absolute; opacity: 0; width: 0; height: 0; }
.leva { order: 1; display: block; flex: 0 0 auto; position: relative; width: 32px; height: 18px; border: 1px solid var(--bordo); background: #101914; border-radius: 3px; transition: background .2s; }
.leva::after { content: ""; position: absolute; inset: 3px auto 3px 3px; width: 10px; background: var(--fioco); border-radius: 1px; transition: transform .2s; }
.interruttore input:checked + .leva { border-color: #b9dc8755; background: #b9dc871d; }
.interruttore input:checked + .leva::after { transform: translateX(14px); background: var(--acceso); }
.interruttore input:focus-visible + .leva { outline: 2px solid var(--attenzione); outline-offset: 3px; }
.onesta { margin: 0; color: var(--fioco); font-size: 11px; line-height: 1.7; }
.onesta b { color: var(--tenue); font-weight: 600; }
.pannello details { border-top: 1px solid var(--bordo); margin-top: 18px; padding-top: 13px; }
.pannello summary { color: var(--tenue); cursor: pointer; font-size: 11px; user-select: none; }
.pannello details[open] summary { margin-bottom: 13px; }
.bottone { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 38px; padding: 10px 15px; border: 1px solid #cee4ac33; border-radius: 3px; background: var(--acceso); color: #1d2e1e; font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; cursor: pointer; transition: background .16s, border-color .16s, transform .16s; white-space: nowrap; box-shadow: inset 0 1px #ffffff30, 0 2px #00000025; }
.bottone:hover { background: #cce7a8; transform: translateY(-1px); }
.bottone:active { transform: translateY(1px); }
.bottone:disabled { background: #242f27; color: #73836f; border-color: var(--bordo); box-shadow: none; cursor: not-allowed; transform: none; }
.bottone.secondario { background: #ffffff03; border-color: var(--bordo); box-shadow: none; color: var(--tenue); }
.bottone.secondario:hover { background: #ffffff0b; border-color: #d3dfc844; color: var(--testo); }
.comando-pagina { gap: 8px; }
.icona-azione { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; flex: 0 0 19px; vertical-align: middle; }
.icona-azione svg, .comando-pagina > svg { display: block; width: 19px; height: 19px; flex: 0 0 19px; }
.comando-etichetta { display: inline-flex; align-items: center; gap: 8px; }
.pannello summary .icona-azione, .stato-vista summary .icona-azione { width: 16px; height: 16px; margin-right: 3px; }
.pannello summary .icona-azione svg, .stato-vista summary .icona-azione svg { width: 16px; height: 16px; }
.comando-pagina:disabled .icona-azione, .comando-pagina:disabled > svg { opacity: .68; }
.minimappa-mondo button svg, .minimappa-filtro-icona svg { display: block; width: 17px; height: 17px; }
.minimappa-mondo button:hover { border-color: #b9dc87 !important; background: #354d3b !important; }
.minimappa-mondo button[aria-pressed="true"], .minimappa-mondo button[aria-expanded="true"] { border-color: #cce8aa !important; color: #e6f6d5 !important; box-shadow: inset 0 0 0 1px #b9dc8733; }
.chi-esci { min-height: 30px; padding: 6px 9px; font-size: 9px; }
#strutture-elenco { max-height: 170px; overflow: auto; }
#strutture-elenco .tipo { color: var(--testo); font: 10px/1.4 var(--mono); }
.struttura { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #ffffff09; }
.struttura .tinta { width: 8px; height: 8px; border: 1px solid #ffffff55; flex-shrink: 0; }
.struttura .dove { font: 10px/1.5 var(--mono); color: var(--tenue); flex: 1; }
.struttura .bottone { min-height: 27px; padding: 6px 8px; font-size: 8px; }
#servizio { display: flex; flex-wrap: wrap; gap: 9px 12px; margin-top: 12px; }
#servizio a { color: var(--fioco); font-size: 10px; text-decoration-color: #ffffff25; text-underline-offset: 3px; }
#servizio a:hover { color: var(--testo); }
.guida-globo { position: fixed; left: 24px; bottom: 24px; color: #b9c2b3; font: 10px/1.9 var(--mono); }
.guida-globo b { color: #f4f1e6; font-weight: 400; }
#selezione { position: fixed; bottom: 24px; right: 24px; left: 330px; padding: 17px 20px; max-width: 960px; margin-left: auto; }
.testata { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
#selezione .testata { margin-bottom: 12px; }
#selezione .testata .titoletto { margin: 0; }
#selezione .bottone { min-width: 150px; }
#vuoto { margin: 0; color: var(--tenue); font-size: 13px; }
#campi { display: grid; grid-template-columns: .6fr 1fr 1.4fr .8fr .6fr 1.25fr; gap: 12px; }
.campo { min-width: 0; }
.etichetta { display: block; font: 9px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fioco); margin-bottom: 5px; }
.valore { display: block; font: 11px/1.5 var(--mono); overflow-wrap: anywhere; }
.assente { color: var(--fioco); }
.terra, .tua, #piazza-nota.ok { color: var(--acceso); }
.mare { color: #afcbd3; }
.altrui, #piazza-nota.guasto { color: var(--allarme); }
#nota-selezione, #entra-nota { margin: 12px 0 0; font-size: 11px; }
#entra-nota { color: var(--allarme); }
#voxel { padding-bottom: 16px; }
#v-bioma { font-size: 25px; font-weight: 650; line-height: 1.2; text-transform: capitalize; margin: 0; letter-spacing: -.03em; }
#v-coordinate { margin: 8px 0 18px; font: 10px/1.5 var(--mono); color: var(--fioco); }
.territorio-dati { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 16px; margin: 0; padding-top: 16px; border-top: 1px solid var(--bordo); }
.territorio-dati dt { color: var(--fioco); font: 9px/1.4 var(--mono); letter-spacing: .05em; margin-bottom: 4px; }
.territorio-dati dd { margin: 0; font: 12px/1.5 var(--mono); }
.territorio-dati .larga { grid-column: 1 / -1; }
.uscita-vista { width: 100%; margin-top: 18px; }
.uscita-vista kbd { margin-left: auto; }
kbd { display: inline-block; padding: 2px 5px; min-width: 20px; border: 1px solid #c7d4bc2b; border-bottom-width: 2px; border-radius: 3px; color: var(--testo); font: 9px/1.4 var(--mono); text-align: center; background: #ffffff05; }
#costruzione { position: fixed; left: 24px; bottom: 24px; width: 278px; padding: 18px 20px; }
.costruzione-testata { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.icona-base { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #d8bf8540; background: #e5bb7112; border-radius: 3px; flex-shrink: 0; }
.icona-base svg { width: 28px; height: 28px; }
.costruzione-testata .titoletto { margin-bottom: 3px; font-size: 9px; }
.costruzione-testata h2 { margin: 0; font-size: 16px; font-weight: 600; }
#piazza-base { width: 100%; }
#piazza-nota { margin: 11px 0 0; font-size: 10px; line-height: 1.6; }
#piazza-nota.attesa { color: var(--attenzione); }
#aiuto-voxel { position: fixed; right: 24px; bottom: 24px; left: 330px; display: flex; justify-content: center; pointer-events: none; }
.barra-comandi { padding: 11px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; border-radius: 4px; }
.barra-comandi span { font-size: 10px; white-space: nowrap; color: var(--tenue); }
.barra-comandi kbd { margin-right: 4px; }
.barra-comandi .separatore { width: 1px; height: 20px; background: var(--bordo); }
.stato-vista { position: fixed; right: 24px; top: 98px; max-width: 340px; text-align: right; }
#voxel-stato { display: inline-block; margin: 0; padding: 9px 13px; font: 10px/1.4 var(--mono); color: var(--tenue); border: 1px solid var(--bordo); border-radius: 3px; background: var(--vetro); backdrop-filter: blur(12px); }
.stato-vista details { margin-top: 8px; color: #213b2e; pointer-events: auto; text-shadow: 0 1px 6px #ffffff88; font: 9px/1.5 var(--mono); }
.stato-vista summary { cursor: pointer; }
#v-stato { margin: 6px 0 0; }
#avvisi { z-index: 7; right: 24px; top: 92px; width: 330px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 8px; }
.avviso { pointer-events: auto; border: 1px solid #ff998240; border-left: 3px solid var(--allarme); background: #1d2422f5; border-radius: 4px; box-shadow: 0 10px 30px #0005; padding: 13px 15px; font-size: 11px; color: var(--tenue); }
.avviso b { display: block; margin-bottom: 5px; color: var(--allarme); text-transform: uppercase; font-size: 10px; letter-spacing: .08em; }
.avviso.attenzione { border-color: #e5bb7140; border-left-color: var(--attenzione); }
.avviso.attenzione b { color: var(--attenzione); }
.avviso code { color: var(--testo); font-size: 10px; }
#scena [data-pianeta="cartello"] { z-index: 5 !important; }
#ingresso { position: fixed; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: flex-start; padding: 6vw 9vw; background: linear-gradient(90deg, #091510f2 0%, #091510e6 36%, #0915104d 72%, #09151022); overflow: auto; }
#ingresso .scheda { width: 420px; max-width: 100%; padding: 34px; border-top: 3px solid var(--acceso); background: #15221ded; box-shadow: 0 35px 100px #0006; }
#ingresso .marchio { margin-bottom: 38px; }
#ingresso .marchio h1 { font-size: 24px; }
.ingresso-occhiello { color: var(--attenzione); font: 9px/1.6 var(--mono); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 10px; }
#ingresso h2 { margin: 0 0 13px; font-size: 36px; font-weight: 650; letter-spacing: -.045em; line-height: 1.08; }
#ingresso .sottotitolo { margin: 0 0 27px; color: var(--tenue); font-size: 12px; line-height: 1.7; }
#ingresso .etichetta { margin-bottom: 7px; font-size: 9px; }
#ingresso input { width: 100%; display: block; height: 43px; margin-bottom: 17px; padding: 10px 12px; border: 1px solid #ced9c72b; border-radius: 3px; background: #08160f75; color: var(--testo); outline: none; }
#ingresso input::placeholder { color: #6f826e; font-size: 12px; }
#ingresso input:focus { border-color: var(--acceso); box-shadow: 0 0 0 3px #b9dc8710; }
#ingresso input:disabled { opacity: .6; }
#ingresso .bottoni { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
#ingresso .bottoni .bottone { min-height: 43px; padding: 10px 8px; }
#ingresso .bottoni .comando-pagina { letter-spacing: .04em; gap: 6px; }
#ingresso .errore { font-size: 12px; color: var(--allarme); margin: 5px 0 12px; }
#ingresso .nota { color: var(--tenue); }
#ingresso .riga-divisoria { margin: 23px 0 16px; }
#ingresso .onesta { font-size: 10px; }
.ingresso-edizione { position: fixed; left: 35px; bottom: 26px; font: 9px/1.6 var(--mono); color: #becdb5; text-transform: uppercase; letter-spacing: .18em; }
.ingresso-copyright { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); width: 420px; max-width: calc(100vw - 28px); margin: 0; color: #c0cbb9; font: 10px/1.45 "Segoe UI", system-ui, sans-serif; text-align: center; text-wrap: balance; white-space: normal; pointer-events: none; text-shadow: 0 1px 3px #07100f, 0 1px 8px #07100f; }
body[data-ingresso] .strato.mappamondo, body[data-ingresso] .strato.voxel, body[data-ingresso] #testata-gioco { display: none; }
@media (min-width: 1500px) { #mondo, #voxel, #costruzione { left: 32px; } .hud-header { padding-inline: 36px; } #voxel { top: 106px; } }
@media (max-width: 1050px) {
  .hud-header { padding-inline: 20px; }
  .modalita-titolo { margin-left: 10px; }
  .chi-stato { max-width: 125px; }
  #mondo, #voxel, #costruzione { width: 245px; left: 18px; }
  #selezione, #aiuto-voxel { left: 280px; right: 18px; }
  #campi { grid-template-columns: repeat(3, 1fr); }
  .guida-globo { left: 18px; font-size: 9px; }
  .barra-comandi { gap: 10px; padding: 10px 12px; }
  .barra-comandi .separatore { display: none; }
  #ingresso { padding-left: 6vw; }
}
@media (max-width: 720px) {
  .hud-header { height: 62px; padding: 0 14px; gap: 10px; }
  .marchio { gap: 8px; }
  .marchio svg { width: 24px; height: 29px; }
  .marchio h1 { font-size: 17px; letter-spacing: .13em; }
  .marchio p { font-size: 7px; letter-spacing: .2em; }
  .modalita-titolo { display: none; }
  .chi { font-size: 10px; gap: 7px; }
  .chi-stato { display: none; }
  .chi-esci { margin: 0; padding: 5px 7px; min-height: 27px; font-size: 8px; }
  #mondo, #voxel { left: 12px; top: 76px; width: 225px; padding: 16px; max-height: calc(100dvh - 290px); }
  #mondo .titolo-pannello { font-size: 19px; }
  #mondo .testo-pannello { font-size: 11px; }
  #mondo .riga-divisoria { margin: 13px 0; }
  #mondo .info-mondo { display: none; }
  #selezione { left: 12px; right: 12px; bottom: 12px; padding: 13px 15px; }
  #selezione .bottone { min-width: auto; min-height: 33px; padding: 8px 10px; font-size: 9px; }
  #campi { grid-template-columns: repeat(3, 1fr); gap: 9px; }
  #campi .valore { font-size: 10px; }
  #vuoto { font-size: 12px; }
  .guida-globo { display: none; }
  #v-bioma { font-size: 20px; }
  #v-coordinate { font-size: 9px; margin-bottom: 12px; }
  .territorio-dati { gap: 9px 10px; padding-top: 12px; }
  .territorio-dati dt { font-size: 8px; }
  .territorio-dati dd { font-size: 10px; }
  .uscita-vista { margin-top: 12px; font-size: 9px; min-height: 32px; padding: 8px 10px; }
  .stato-vista { top: 76px; right: 12px; max-width: calc(100vw - 263px); }
  #voxel-stato { font-size: 8px; padding: 8px; }
  .stato-vista details { font-size: 8px; }
  #costruzione { left: 12px; bottom: 92px; width: 225px; padding: 13px 16px; }
  .costruzione-testata { margin-bottom: 9px; gap: 10px; }
  .icona-base { width: 34px; height: 34px; }
  .costruzione-testata h2 { font-size: 14px; }
  #piazza-base { min-height: 34px; padding: 8px; }
  #piazza-nota { font-size: 9px; margin-top: 7px; }
  #aiuto-voxel { left: 12px; right: 12px; bottom: 12px; }
  .barra-comandi { width: 100%; gap: 7px 12px; padding: 9px; }
  .barra-comandi span { font-size: 9px; }
  #avvisi { top: 73px; right: 12px; width: 300px; }
  #ingresso { padding: 24px; justify-content: center; background: #091510b3; backdrop-filter: blur(3px); }
  #ingresso .scheda { width: 380px; padding: 27px; }
  #ingresso h2 { font-size: 32px; }
  #ingresso .marchio { margin-bottom: 30px; }
  .ingresso-edizione { display: none; }
  .ingresso-copyright { bottom: 12px; width: 370px; font-size: 9px; line-height: 1.4; }
}
@media (max-height: 650px) and (min-width: 721px) {
  #mondo, #voxel { max-height: calc(100dvh - 195px); }
  #voxel { width: 245px; padding: 14px 18px; }
  #voxel .territorio-dati { gap: 8px; }
  #costruzione { left: auto; right: 18px; bottom: 82px; width: 230px; padding: 14px 16px; }
  #ingresso { padding-block: 20px; }
  #ingresso .scheda { padding: 24px 30px; }
  #ingresso .marchio { margin-bottom: 22px; }
  #ingresso h2 { font-size: 30px; }
  #ingresso .sottotitolo { margin-bottom: 19px; }
}
@media (max-height: 850px) {
  #ingresso { flex-direction: column; align-items: center; justify-content: flex-start; padding-block: 20px; }
  #ingresso .scheda { flex: none; }
  .ingresso-edizione { display: none; }
  .ingresso-copyright { position: static; flex: none; transform: none; margin: 14px auto 0; }
}
@media (max-width: 400px) {
  #ingresso .bottoni { grid-template-columns: 1fr; }
  #ingresso .bottoni .comando-pagina { justify-content: flex-start; padding-inline: 18px; }
}
@media (max-width: 720px) and (max-height: 650px) {
  #voxel { max-height: calc(100dvh - 255px); }
  #voxel .territorio-dati .larga { display: none; }
  #costruzione { bottom: 81px; }
  #piazza-nota { max-height: 31px; overflow: auto; }
  .costruzione-testata { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
