/* WarCapitals — "tavolo da gioco di guerra": pannelli di carta con il bordo d'inchiostro e l'ombra piena
   (cartoncino, adesivi), titoli su nastri colorati, font Lilita One per titoli e numeri, pulsanti a pedina
   che si schiacciano. Le classi sono quelle usate da ui.js: se ne aggiungi, tienile qui ordinate per zona. */

:root {
  --ink: #1f2a44;
  --ink-2: #33405f;
  --paper: #fbf5e6;
  --paper-2: #f3e7c9;
  --paper-3: #e7d5ab;
  --line: rgba(31, 42, 68, 0.14);
  --text: #1f2a44;
  --muted: #6d6452;
  --faint: #9a8f76;
  --red: #dc4a31;
  --red-d: #9e2c1c;
  --gold: #f4b534;
  --gold-d: #b97f0f;
  --green: #52a13d;
  --green-d: #2f6b23;
  --blue: #3c8ad8;
  --blue-d: #22609f;
  --purple: #7b59cc;
  --pink: #df5b95;
  --teal: #2aa38f;
  --good: #2e8a3b;
  --ok: #6a9a22;
  --warn: #c07c08;
  --bad: #c9352a;
  --radius: 14px;
  --hard: 0 4px 0 var(--ink);
  --soft: 0 12px 26px rgba(20, 28, 48, 0.28);
  --display: "Lilita One", "Rubik", system-ui, sans-serif;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --surface: #ffffff;   /* ventesima sessione: fondo di pulsanti, campi e schede (cambia con i temi della HUD) */
  --cream: #fff3c9;     /* ... e il loro colore al passaggio del mouse */
  --paper-tex: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.7), transparent 38%),
    radial-gradient(circle at 85% 90%, rgba(190, 150, 80, 0.12), transparent 45%);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #6fa9d0; font-family: var(--font); color: var(--text); }
button { font-family: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
kbd { display: inline-block; min-width: 17px; padding: 0 4px; margin-left: 3px; border-radius: 5px; background: var(--surface); border: 1.5px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink); font: 700 10px var(--font); line-height: 14px; text-align: center; color: var(--ink); letter-spacing: 0; vertical-align: 1px; }
.ic { width: 1em; height: 1em; display: block; }
.good { color: var(--good); } .ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .muted { color: var(--muted); }

#map { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; cursor: grab; }
#map.dragging { cursor: grabbing; }
#map.pointer { cursor: pointer; }

/* ---------------- carta: la base di tutti i pannelli ---------------- */
.glass {
  background: var(--paper-tex), linear-gradient(180deg, var(--paper), var(--paper-2));
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--hard), var(--soft);
  color: var(--text);
}
/* titoli dei pannelli: un nastro colorato un po' storto */
.panel h3 { display: inline-flex; align-items: center; gap: 6px; margin: -3px 0 10px -3px; padding: 3px 12px 4px 7px; font: 400 15px/1.1 var(--display);
  letter-spacing: 0.03em; color: #fff; background: var(--red); border: 2px solid var(--ink); border-radius: 9px; box-shadow: 0 2.5px 0 var(--ink);
  text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.28); transform: rotate(-1.5deg); }
.panel h3 small { margin-left: 6px; font: 600 11px var(--font); letter-spacing: 0; color: rgba(255, 255, 255, 0.85); text-shadow: none; }
#leaderboard h3 { background: var(--gold); color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
#leaderboard h3 small { color: var(--ink-2); }
#objectives h3 { background: var(--purple); }

/* icona in un gettone colorato */
.chipi { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; color: #fff;
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.35); background: var(--blue); }
.chipi.sm { width: 20px; height: 20px; font-size: 11px; border-width: 1.5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.panel h3 .chipi.sm { background: rgba(255, 255, 255, 0.25); border-color: rgba(31, 42, 68, 0.6); color: #fff; }
#leaderboard h3 .chipi.sm { color: var(--ink); background: rgba(255, 255, 255, 0.55); }

/* bandiere (classi .fl-XX generate da flags.js) */
.flag { flex: none; display: inline-block; width: 21px; height: 14px; border-radius: 3px; background: #999 center / cover no-repeat;
  box-shadow: 0 0 0 1.5px var(--ink); vertical-align: -2px; }
.flag.none { background: repeating-linear-gradient(45deg, #e9dcbc 0 4px, #dccb9f 4px 8px); }
.flag.sm { width: 17px; height: 11.3px; border-radius: 2px; box-shadow: 0 0 0 1.2px var(--ink); }
.flag.lg { width: 29px; height: 19.3px; border-radius: 4px; box-shadow: 0 0 0 2px var(--ink), 0 2px 0 1.5px var(--ink); }
.flag.xl { width: 40px; height: 26.7px; border-radius: 5px; box-shadow: 0 0 0 2.5px var(--ink), 0 3px 0 2px var(--ink); }
.flag.xxl { width: 70px; height: 46.7px; border-radius: 8px; box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink); }
.flag.ring:not(.lg):not(.xl):not(.xxl) { box-shadow: 0 0 0 1.5px var(--ink), 0 0 0 3.5px var(--c); }
.flag.lg.ring { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4.5px var(--c), 0 0 0 6px var(--ink); }
.flag.xl.ring, .flag.xxl.ring { box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 5.5px var(--c), 0 0 0 7.5px var(--ink); }
.flag.fallen { filter: grayscale(0.9) contrast(0.9); transform: rotate(-9deg); }
.crest { --c: #888; flex: none; width: 16px; height: 18px; display: inline-block; background: var(--c); border: 1.5px solid var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%); }

.role { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; border-radius: 999px; font: 800 9.5px var(--font);
  letter-spacing: 0.07em; border: 1.5px solid var(--ink); vertical-align: 1px; }
.role .ic { width: 11px; height: 11px; }
.role.player { background: var(--gold); color: var(--ink); }
.role.cpu { background: #e3dccb; color: var(--ink-2); }
.role.spec { background: #cfe3fb; color: var(--blue-d); padding-left: 7px; }

/* ---------------- barra superiore ---------------- */
#topbar { position: fixed; top: 10px; left: 10px; right: 10px; display: flex; gap: 10px; align-items: stretch; pointer-events: none; z-index: 5; }
#topbar > * { pointer-events: auto; }
.me { display: flex; align-items: center; gap: 12px; padding: 7px 16px 7px 10px; min-width: 200px; }
.me-flag { display: grid; place-items: center; width: 46px; }
.me-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.me-text b { font: 400 20px var(--display); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; font-weight: 600; }

.res { flex: 1; display: flex; gap: 2px; padding: 6px 8px; min-width: 0; overflow: hidden; }
.stat { flex: 1 1 auto; justify-content: center; display: flex; align-items: center; gap: 8px; padding: 2px 7px; border-radius: 11px; min-width: 0; cursor: default; }
.stat + .stat { border-left: 2px dashed var(--line); }
.stat .chipi { width: 33px; height: 33px; font-size: 17px; }
.stat.power .chipi { background: var(--purple); }
.stat.gold .chipi { background: var(--gold); color: var(--ink); }
.stat.troops .chipi { background: var(--green); }
.stat.terr .chipi { background: var(--blue); }
.stat.stab .chipi { background: var(--pink); }
.stat.allies .chipi { background: var(--teal); }
.stat > div { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.stat b { font: 400 20px var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.stat b.warn { color: var(--bad); }
.stat small { font-size: 9.5px; color: var(--muted); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
.stat small.pos { color: var(--good); text-transform: none; letter-spacing: 0; font-size: 11.5px; }

.match { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 7px 14px; min-width: 230px; }
.match-top { display: flex; align-items: center; gap: 8px; }
.match-top .chipi.sm { background: var(--blue); color: #fff; }
.match-top small { color: var(--muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-top b { margin-left: auto; font: 400 22px var(--display); font-variant-numeric: tabular-nums; }
.conquest { display: flex; flex-direction: column; gap: 3px; }
.conquest .bar { height: 9px; border-radius: 5px; background: var(--surface); border: 1.5px solid var(--ink); overflow: hidden; }
.conquest .bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.6s ease; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4); }
.conquest small { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn { position: relative; width: 50px; display: grid; place-items: center; font-size: 21px; color: var(--ink); padding: 0; transition: transform 0.06s, box-shadow 0.06s; }
.icon-btn:hover { background: var(--paper-tex), linear-gradient(180deg, #fff, var(--paper)); }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink), var(--soft); }
#restart-btn { color: var(--red); }
#restart-btn.armed { color: #fff; background: var(--red); }
#noally-btn { color: var(--faint); }
#noally-btn.on { color: #fff; background: var(--red); }
#sound-btn.off { color: var(--faint); }
#chat-btn { display: none; }
.badge-dot { position: absolute; top: 6px; right: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); }

/* ---------------- colonne ---------------- */
#left { position: fixed; left: 10px; top: 94px; width: 266px; display: flex; flex-direction: column; gap: 10px; z-index: 4; }
/* quindicesima sessione: la colonna destra finisce sopra la barra comandi (e sopra la legenda, se c'è), non più dietro */
#right { position: fixed; right: 10px; top: 94px; width: 290px; display: flex; flex-direction: column; gap: 10px; z-index: 4;
  height: calc(100vh - 94px - var(--cmd-h, 108px) - 24px - var(--legend-h, 0px)); }
#hud.spectating #right { height: calc(100vh - 94px - 22px - var(--legend-h, 0px)); }
#objectives, #leaderboard, #chatbox { padding: 12px 12px 10px; }
#objectives:empty { display: none; }
/* undicesima sessione: sul mondo fino a tre eventi insieme; le righe scorrono invece di coprire il biglietto della missione */
#objectives .obj-list { max-height: calc(100vh - var(--cmd-h, 88px) - 250px); overflow-y: auto; scrollbar-width: thin; margin-right: -6px; padding-right: 6px; }
.obj { display: flex; gap: 9px; align-items: flex-start; padding: 7px 9px; margin-top: 6px; border-radius: 11px; background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--line); font-size: 12.5px; line-height: 1.35; color: var(--text); }
.obj .i { font-size: 15px; width: 18px; text-align: center; }
.obj .t { flex: 1; }
.obj .t b { font-weight: 800; }
.obj .time { font: 400 14px var(--display); font-variant-numeric: tabular-nums; color: var(--ink); background: var(--surface); border: 1.5px solid var(--ink);
  border-radius: 7px; padding: 0 6px; }
.obj.good { background: #e3f3d8; border-color: rgba(47, 107, 35, 0.4); }
.obj.gold { background: var(--cream); border-color: rgba(185, 127, 15, 0.5); }
.obj.danger { background: #fde0d8; border-color: rgba(158, 44, 28, 0.45); }
.obj.danger .time { background: var(--red); color: #fff; }
.obj.clickable { cursor: pointer; }
.obj.clickable:hover { border-color: var(--ink); }
.obj.wars .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.war-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 4px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--ink);
  font-size: 11.5px; font-weight: 700; }
.war-chip.clickable { cursor: pointer; }
.war-chip.clickable:hover { background: var(--gold); }

/* missione segreta (ottava sessione): il biglietto sigillato in basso a sinistra, clic = la finestra con i dettagli */
#mission-btn { position: fixed; left: 10px; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 14px 9px 9px; width: 230px;
  text-align: left; border-color: var(--gold-d); background: var(--paper-tex), linear-gradient(180deg, #fff8df, #f4dd9a); cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s; animation: cardin 0.3s ease; }
#mission-btn:hover { transform: translateY(-2px) rotate(-0.6deg); }
#mission-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink), var(--soft); }
#hud.spectating #mission-btn { display: none; }
.mb-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--ink);
  border: 2px solid var(--ink); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), inset 0 0 0 2px var(--gold); }
.mb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.mb-t b { font: 400 16px var(--display); letter-spacing: 0.02em; color: var(--ink); }
.mb-t small { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mb-bar { display: block; height: 7px; margin-top: 5px; border-radius: 4px; background: var(--surface); border: 1.5px solid var(--ink); overflow: hidden; }
.mb-bar i { display: block; height: 100%; background: var(--gold); transition: width 0.5s; }
#match .conquest { cursor: pointer; }
.mission-modal { text-align: left; }
.mission-modal h2 { margin-top: 10px; }
.mm-seal { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px; border-radius: 9px; background: var(--ink); color: #ffd23f; border: 2px solid var(--ink);
  font: 400 15px var(--display); letter-spacing: 0.05em; box-shadow: 0 2.5px 0 rgba(0, 0, 0, 0.3); transform: rotate(-1.5deg); }
.mm-seal small { font: 700 11px var(--font); color: rgba(255, 255, 255, 0.8); letter-spacing: 0; }
.mm-seal.rally { background: var(--red); color: #fff; }
.mm-prog { margin: 8px 0 4px; }
.mm-group { margin-top: 10px; padding: 8px 10px 9px; border-radius: 13px; background: rgba(255, 255, 255, 0.65); border: 2px solid var(--ink); box-shadow: 0 2.5px 0 var(--ink); }
.mm-group.done { background: #e3f3d8; }
.mm-gh { display: flex; align-items: center; justify-content: space-between; font: 400 17px var(--display); margin-bottom: 4px; }
.mm-gh span { font-size: 15px; padding: 0 8px; border-radius: 7px; background: var(--surface); border: 1.5px solid var(--ink); }
.mm-group.done .mm-gh span { background: var(--green); color: #fff; }
.mm-nation { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; }
.mm-nation + .mm-nation { border-top: 1.5px dashed var(--line); }
.mm-nn { flex: none; width: 108px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12.5px; padding-top: 5px; }
.mm-cs { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; }
.mm-city { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink); font-size: 12px; text-align: left; transition: transform 0.06s, background 0.12s; }
.mm-city:hover { background: var(--cream); transform: translateY(-1px); }
.mm-city b { font: 400 14px var(--display); }
.mm-city small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: 11px; }
.mm-city.mine { background: #dcf0d0; }
.mm-city.mine small { color: var(--green-d); }
.mm-sym { display: inline-grid; place-items: center; width: 18px; }
.mission-modal ul, .rally-dlg ul { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.mission-modal h3 { display: inline-block; margin: 14px 0 6px; padding: 2px 11px; font: 400 15px var(--display); letter-spacing: 0.04em; color: #fff; background: var(--blue);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 2px 0 var(--ink); transform: rotate(-1deg); }
/* simboli delle città nei testi (gli stessi della mappa) e il segnalino delle città della missione */
.sym { display: inline-block; vertical-align: -2px; font-style: normal; }
.sym.cap { width: 17px; height: 17px; line-height: 13px; text-align: center; font-size: 11px; color: #ffd23f; border-radius: 50%; background: #3a3440;
  border: 2px solid #fff; box-shadow: 0 0 0 1.2px var(--ink); text-shadow: 0 0 1px #000; }
/* ex capitale: stessa grandezza, stella spenta e spezzata da una crepa */
.sym.cap.ex { color: #e2ddca; position: relative; }
.sym.cap.ex::after { content: ""; position: absolute; left: 6px; top: 1px; width: 2px; height: 11px; background: #3a3440; transform: rotate(18deg); }
.sym.city { width: 11px; height: 11px; border-radius: 50%; background: #3a3440; border: 2px solid #fff; box-shadow: 0 0 0 1.2px var(--ink); }
.sym.town { width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 1.5px solid #3a3440; }
.mm-target { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: -2px; border: 1.3px solid var(--ink);
  background: radial-gradient(circle, #e23b3b 0 26%, #fff 27% 57%, #e23b3b 58%); }

/* barra di comando degli eserciti scelti (ottava sessione), in alto al centro come quella della modalità attacco */
#army-bar { position: fixed; left: 50%; top: 78px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  justify-content: center; padding: 8px 12px; max-width: min(820px, calc(100vw - 20px)); border-color: var(--gold-d);
  background: var(--paper-tex), linear-gradient(180deg, #fff8df, #f7e6b3); }
.ab-title { font: 400 16px var(--display); color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 9px; padding: 1px 10px;
  box-shadow: 0 2px 0 var(--ink); letter-spacing: 0.03em; white-space: nowrap; }

/* armate sul campo: la lista a sinistra (clic = scegli e vai lì) */
#armies { padding: 12px 12px 10px; }
#armies h3 { background: var(--green); }
#armies .aall { position: absolute; right: 12px; top: 10px; }
#armies { position: relative; }
.arow { display: flex; align-items: center; gap: 8px; padding: 5px 7px; margin-top: 5px; border-radius: 11px; background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--line); cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.arow:hover { border-color: var(--ink); }
.arow.on { background: var(--cream); border-color: var(--gold-d); box-shadow: 0 0 0 2px var(--gold); }
.arow.fight { background: #fde0d8; }
.anum { --c: #888; flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font: 400 15px var(--display); color: var(--ink);
  background: var(--surface); border: 2px solid var(--ink); box-shadow: inset 0 -3px 0 var(--c); }
.ainfo { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ainfo b { font: 400 15px var(--display); color: var(--ink); }
.ainfo small { font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abtn { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--surface); border: 1.5px solid var(--ink);
  font-size: 11px; box-shadow: 0 2px 0 var(--ink); }
.abtn:hover { background: var(--gold); }
.ahint { margin-top: 7px; font-size: 11px; color: var(--muted); font-weight: 600; line-height: 1.35; }
.ahint b { color: var(--ink); }
.btn.act.deploy { flex: none; }
.btn.act.deploy .bi { color: var(--green-d); }

/* rally con gli alleati: la finestra per lanciarlo, l'invito, il pulsante nella scheda */
.btn.rally { background: linear-gradient(180deg, #ffd766, #ffb627); }
.rally-dlg p { font-size: 13.5px; }
.rd-sec { margin-top: 12px; }
.rd-sec > label { display: block; font: 800 10.5px var(--font); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.rd-sec > label b { font: 400 15px var(--display); color: var(--ink); letter-spacing: 0; text-transform: none; }
.rd-sec > label small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.rd-allies { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-ally { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 8px; border-radius: 11px; background: var(--surface); border: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink); cursor: pointer; font-size: 13px; }
.rd-ally b { font: 400 15px var(--display); }
.rd-ally small { color: var(--muted); font-weight: 700; }
.rd-ally input { width: 16px; height: 16px; accent-color: var(--green); margin: 0; }
#rd-pct { --fill: 50%; flex: 1; min-width: 0; height: 18px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
#rd-pct::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--gold) var(--fill), #fff var(--fill)); }
#rd-pct::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--ink); }
.rd-msg { width: 100%; padding: 9px 12px; border-radius: 11px; border: 2px solid var(--ink); background: var(--surface); font: 500 13.5px var(--font); color: var(--text); outline: none; }
.rd-msg:focus { box-shadow: 0 0 0 3px rgba(244, 181, 52, 0.55); }
.rd-warn { color: var(--red-d) !important; font-weight: 700 !important; }
.rally-inv { border-color: var(--gold-d); background: var(--paper-tex), linear-gradient(180deg, #fff8df, #f7e6b3); }
.rally-inv .row { flex-wrap: wrap; }
.rally-inv .btn small { display: block; font-size: 10.5px; }
.rally-msg { margin: -2px 0 10px; padding: 7px 11px; border-radius: 10px; background: var(--surface); border: 1.5px dashed var(--ink); font: 400 15px var(--display);
  letter-spacing: 0.01em; color: var(--ink-2); }
.rally-obj .btn.sm { display: block; margin-top: 5px; }

/* avvisi d'attacco: telegrammi rossi, cliccabili */
#alerts { display: flex; flex-direction: column; gap: 7px; }
#alerts:empty { display: none; }
.alert { display: flex; align-items: center; gap: 10px; padding: 9px 11px; cursor: pointer; background: var(--paper-tex), linear-gradient(180deg, #ff6f55, var(--red));
  color: #fff; animation: alertin 0.4s cubic-bezier(0.2, 1.5, 0.4, 1); transition: opacity 0.3s, transform 0.3s; }
.alert.ally { background: var(--paper-tex), linear-gradient(180deg, #ffc15a, #ef8f1c); color: var(--ink); }
.alert.help { background: var(--paper-tex), linear-gradient(180deg, #6fb3ff, var(--blue)); }
.alert:hover { transform: translateY(-1px) rotate(-0.4deg); }
.alert.out { opacity: 0; transform: translateX(-14px); }
.al-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.al-body b { font: 400 15px var(--display); letter-spacing: 0.02em; text-shadow: 0 1.5px 0 rgba(0, 0, 0, 0.25); }
.alert.ally .al-body b { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); }
.al-body small { font-size: 11.5px; font-weight: 600; margin-top: 2px; opacity: 0.95; }
.al-eye { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink); font-size: 15px; }
@keyframes alertin { from { opacity: 0; transform: translateX(-24px) scale(0.95) rotate(-3deg); } to { opacity: 1; transform: none; } }

/* classifica */
#lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
#lb li { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 11px; font-size: 13px; cursor: pointer; background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid transparent; transition: border-color 0.12s, transform 0.12s; }
#lb li:hover { border-color: var(--ink); transform: translateX(-2px); }
#lb li.me { background: var(--cream); border-color: var(--gold-d); }
#lb li.empty { cursor: default; color: var(--muted); font-size: 12.5px; line-height: 1.35; background: none; }
#lb li.empty:hover { transform: none; border-color: transparent; }
#lb .rank { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 400 12px var(--display);
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--ink); }
#lb .rank.r1 { background: var(--gold); }
#lb .rank.r2 { background: #d9dee8; }
#lb .rank.r3 { background: #e7a574; }
#lb .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
#lb .nm b { font: 400 14.5px var(--display); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lb .nm small { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lb .tags { flex: none; display: flex; gap: 2px; align-items: center; }
#lb .share { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; width: 54px; }
#lb .share b { font: 400 15px var(--display); font-variant-numeric: tabular-nums; }
#lb .share b small { color: var(--muted); font: 600 10px var(--font); }
.mini { display: block; width: 100%; height: 5px; border-radius: 3px; background: var(--surface); border: 1px solid var(--ink); overflow: hidden; }
.mini i { display: block; height: 100%; }
.tg { font-style: normal; font-size: 11px; }
.tg.you { font: 800 9px var(--font); letter-spacing: 0.06em; color: var(--ink); background: var(--gold); padding: 0 5px; border-radius: 4px; }
.tg.cpu { font: 800 8.5px var(--font); letter-spacing: 0.07em; color: var(--ink-2); background: #e3dccb; border: 1px solid rgba(31, 42, 68, 0.35);
  padding: 0 4px; border-radius: 4px; vertical-align: 1px; }
.lb-cpu { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border-radius: 11px; background: rgba(255, 255, 255, 0.4);
  border: 2px dashed rgba(31, 42, 68, 0.3); font-size: 12.5px; line-height: 1.25; }
.lb-cpu b { font: 400 15px var(--display); }
.lb-cpu small { display: block; color: var(--muted); font-size: 11px; }
.cpu-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; color: var(--ink); background: #e3dccb;
  border: 2px solid var(--ink); flex: none; }

/* ---------------- chat e notizie: il taccuino del comandante ---------------- */
#chatbox { flex: 1; min-height: 200px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper-tex), repeating-linear-gradient(180deg, transparent 0 21px, rgba(60, 110, 180, 0.08) 21px 22px), linear-gradient(180deg, var(--paper), var(--paper-2)); }
#chatbox .tabs { display: flex; gap: 4px; margin-bottom: 8px; }
#chatbox .tabs button { flex: 1; position: relative; border: 2px solid var(--ink); background: var(--surface); border-radius: 10px 10px 4px 4px; padding: 5px 4px 4px;
  font: 400 13px var(--display); letter-spacing: 0.02em; color: var(--ink-2); white-space: nowrap; box-shadow: 0 2px 0 var(--ink); transition: transform 0.08s; }
#chatbox .tabs button:hover { transform: translateY(-1px); }
#chatbox .tabs button.on { background: var(--blue); color: #fff; text-shadow: 0 1.5px 0 var(--blue-d); }
#chatbox .tabs button.muted { background: #e4dccb; color: var(--faint); }
#chatbox .tabs button.muted.on { background: #8d97a8; color: #fff; }
/* decima sessione: interruttori sopra ogni chat (filtro parolacce, chat spenta) e conversazioni private */
.chat-tools { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 6px; }
.ct-btn { border: 1.5px solid var(--ink); background: var(--surface); border-radius: 8px; padding: 2px 7px; font: 700 10.5px var(--font); color: var(--ink-2);
  box-shadow: 0 1.5px 0 var(--ink); white-space: nowrap; }
.ct-btn b { font-weight: 900; }
.ct-btn.on { background: var(--gold); color: var(--ink); }
.ct-btn.off { background: #8d97a8; color: #fff; }
.ct-btn.danger { color: var(--red-d); }
.ct-btn:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.ct-btn:active:not(:disabled) { transform: translateY(1.5px); box-shadow: none; }
.pm-threads { display: flex; gap: 4px; overflow-x: auto; padding: 1px 1px 5px; margin-bottom: 4px; scrollbar-width: thin; }
.pm-empty { font-size: 11px; color: var(--muted); font-weight: 600; }
.pm-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.7);
  border-radius: 999px; padding: 2px 8px 2px 4px; font: 700 11px var(--font); color: var(--ink); position: relative; }
.pm-chip.on { border-color: var(--ink); background: var(--surface); box-shadow: 0 1.5px 0 var(--ink); }
.pm-n { font-style: normal; background: var(--red); color: #fff; border-radius: 9px; padding: 0 5px; font: 400 10.5px/15px var(--display); }
.msg.pm { background: #eee6fb; border-color: rgba(96, 64, 170, 0.35); }
.msg.pm.mine { background: var(--cream); border-color: rgba(185, 127, 15, 0.45); }
.unread { display: none; position: absolute; top: -8px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red);
  border: 1.5px solid var(--ink); color: #fff; font: 400 11px/15px var(--display); font-style: normal; text-shadow: none; }
.unread.on { display: block; }
.msgs { list-style: none; margin: 0; padding: 0 3px 0 0; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; min-height: 0;
  scrollbar-width: thin; scrollbar-color: rgba(31, 42, 68, 0.35) transparent; }
.msgs::-webkit-scrollbar { width: 6px; }
.msgs::-webkit-scrollbar-thumb { background: rgba(31, 42, 68, 0.35); border-radius: 3px; }
.msgs > li:first-child { margin-top: auto; }
.msg { font-size: 12.5px; line-height: 1.4; padding: 5px 8px; border-radius: 10px; overflow-wrap: anywhere; background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid var(--line); animation: slidein 0.25s ease; }
.msg .flag { margin-right: 5px; }
.msg b { --c: #888; display: inline-block; padding: 0 7px; margin-right: 5px; border-radius: 6px; background: var(--c); color: #fff; border: 1.5px solid var(--ink);
  font: 400 12.5px/17px var(--display); letter-spacing: 0.02em; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.msg small { color: var(--muted); font-size: 10.5px; font-weight: 700; margin-right: 6px; }
.msg .t { color: var(--text); font-weight: 500; }
.msg.mine { background: var(--cream); border-color: rgba(185, 127, 15, 0.45); }
.msg.ally { background: #e5f4dd; border-color: rgba(47, 107, 35, 0.4); }
.sys { font-size: 11.5px; line-height: 1.35; padding: 5px 9px; border-radius: 9px; color: var(--ink-2); font-weight: 600; background: rgba(255, 255, 255, 0.45);
  border-left: 4px solid rgba(31, 42, 68, 0.3); animation: slidein 0.25s ease; }
.sys.war { border-left-color: var(--red); background: #fde0d8; color: var(--red-d); font-weight: 700; }
.sys.ally, .sys.peace { border-left-color: var(--green); background: #e5f4dd; color: var(--green-d); }
.sys.betray { border-left-color: var(--pink); background: #fbe0ec; color: #8f2254; font-weight: 700; }
.sys.dead { border-left-color: var(--ink); }
.sys.era, .sys.conquest { border-left-color: var(--gold); background: var(--cream); color: #6d4a07; font-weight: 700; }
#feed-list li { font-size: 12px; line-height: 1.35; padding: 5px 9px; border-radius: 9px; background: rgba(255, 255, 255, 0.55); animation: slidein 0.3s ease;
  border-left: 4px solid rgba(31, 42, 68, 0.25); color: var(--text); font-weight: 500; }
#feed-list li.conquest { border-left-color: var(--blue); }
#feed-list li.war { border-left-color: var(--red); background: #fde0d8; }
#feed-list li.ally, #feed-list li.peace { border-left-color: var(--green); }
#feed-list li.betray { border-left-color: var(--pink); background: #fbe0ec; }
#feed-list li.event { border-left-color: var(--gold); }
#feed-list li.dead { border-left-color: var(--ink); }
#feed-list li.spawn { border-left-color: var(--teal); }
#feed-list li.era { border-left-color: var(--gold); font-weight: 700; background: var(--cream); }
@keyframes slidein { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
#chat-form { display: flex; gap: 6px; margin-top: 8px; }
#chat-input { flex: 1; min-width: 0; padding: 8px 11px; border-radius: 10px; border: 2px solid var(--ink); background: var(--surface); color: var(--text);
  font: 500 12.5px var(--font); outline: none; box-shadow: inset 0 2px 0 rgba(31, 42, 68, 0.08); }
#chat-input:focus { box-shadow: 0 0 0 3px rgba(244, 181, 52, 0.55); }
#chat-input:disabled { opacity: 0.55; }
#chat-form button { flex: none; width: 38px; border: 2px solid var(--ink); border-radius: 10px; background: var(--gold); font-size: 15px; box-shadow: 0 2.5px 0 var(--ink);
  transition: transform 0.06s, box-shadow 0.06s; }
#chat-form button:active { transform: translateY(2.5px); box-shadow: none; }

/* ---------------- scheda città ---------------- */
#card { position: fixed; left: 10px; bottom: calc(var(--cmd-h, 88px) + 24px); width: 330px; padding: 13px 14px; z-index: 6; animation: cardin 0.25s ease; }
@keyframes cardin { from { opacity: 0; transform: translateY(10px) rotate(-1deg); } to { opacity: 1; transform: none; } }
#hud.spectating #card { bottom: 16px; }
#card .head { display: flex; align-items: center; gap: 13px; }
#card .ttl { min-width: 0; display: flex; flex-direction: column; }
#card .head h2 { margin: 0; font: 400 25px/1 var(--display); letter-spacing: 0.01em; }
#card .head small { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 600; flex-wrap: wrap; }
#card .head small.city-of { margin-top: 3px; color: var(--ink-2); font-weight: 700; }
#card .head .owner { cursor: pointer; font-weight: 700; color: var(--ink); }
#card .head .owner:hover { text-decoration: underline; }
#card .close { margin-left: auto; align-self: flex-start; width: 30px; height: 30px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--ink);
  border-radius: 50%; color: var(--ink); font-size: 12px; box-shadow: 0 2px 0 var(--ink); flex: none; }
#card .close:hover { background: var(--red); color: #fff; }
#card .chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0 4px; }
.chip { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--ink); white-space: nowrap; font-weight: 700; color: var(--ink); }
.chip.gold { background: var(--cream); }
.chip.bad { background: #fbd3c9; color: var(--red-d); }
.chip.good { background: #dcf0d0; color: var(--green-d); }
.chip.warn { background: var(--cream); color: #7a5104; }
.chip.terrain { background: #e3efd4; }
.chip.city { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); font: 400 12px var(--display); letter-spacing: 0.03em; padding: 2px 10px; }
.chip.city.t3 { background: var(--red); }
.chip.city.tex { background: #8c8576; }
.chip.city.t2 { background: var(--blue); }
.chip.city.t1 { background: var(--green); }
.chip.ally { background: #d8e5ff; color: #1d3fa8; }
.chip.mine { background: var(--cream); }
#card .kv b small.max { font: 400 14px var(--display); color: var(--muted); }
#card .kv b small.max.full { color: var(--red); }
.dev { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.dev span { display: inline-flex; align-items: center; gap: 4px; }
.dev .ic { width: 12px; height: 12px; color: var(--blue); }
.dev b { color: var(--ink); font: 400 14px var(--display); }
#card .grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px; }
#card .kv { background: var(--surface); border-radius: 11px; padding: 6px 9px 7px; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
#card .kv small { display: block; color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }
#card .kv b { font: 400 21px var(--display); font-variant-numeric: tabular-nums; }
#card .kv.tip { cursor: help; }
#card .kv .lock { font: 800 10.5px var(--font); color: var(--warn); }
#card .actions { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
#card .actions:empty { display: none; }
#card .actions .row { display: flex; gap: 7px; }
#card .note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.45; font-weight: 500; }
#card .note b { color: var(--ink); }

/* ---------------- pulsanti a pedina ---------------- */
.btn { border: 2.5px solid var(--ink); border-radius: 12px; padding: 8px 12px; font: 400 15px var(--display); letter-spacing: 0.02em; background: var(--surface); color: var(--ink);
  flex: 1; box-shadow: 0 3.5px 0 var(--ink); transition: transform 0.06s, box-shadow 0.06s, filter 0.12s; }
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0.5px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn small { font: 700 11.5px var(--font); opacity: 0.9; }
.btn.primary { background: linear-gradient(180deg, #ffd766, var(--gold)); }
.btn.danger { background: linear-gradient(180deg, #f27a5f, var(--red)); color: #fff; text-shadow: 0 1.5px 0 var(--red-d); }
.btn.good { background: linear-gradient(180deg, #7fcf5e, var(--green)); color: #fff; text-shadow: 0 1.5px 0 var(--green-d); }
.btn.big-act { padding: 11px 14px; font-size: 18px; }
.btn.act { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 9px; white-space: nowrap; min-width: 0; }
.btn.act .bi { flex: none; width: 20px; height: 20px; display: grid; place-items: center; font-size: 15px; }
.btn.act .bi .ic { width: 20px; height: 20px; }
.btn.act .bi.soldier { color: var(--green-d); }
.btn.act .bc { display: inline-flex; align-items: center; padding: 0 7px 0 5px; border-radius: 999px; background: var(--ink); color: #ffe08a; font: 400 12.5px var(--display); }
.coin { display: inline-block; width: 10px; height: 10px; margin: 0 3px 0 1px; border-radius: 50%; vertical-align: -1px;
  background: radial-gradient(circle at 35% 35%, #fff2b3, #f2b300 60%, #b87800); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }

/* ---------------- barra comandi: il cassetto del comandante ---------------- */
/* quindicesima sessione: centrata nello spazio tra il biglietto della missione (a sinistra) e il bordo destro, non a metà
   schermo: così non finisce sopra la missione. Sotto i 1620 px la missione sale sopra la barra e la barra usa tutta la larghezza */
#command { position: fixed; left: 260px; right: 10px; bottom: 12px; width: fit-content; margin: 0 auto; display: flex; gap: 14px; align-items: flex-end;
  padding: 9px 14px 11px; z-index: 5; }
#hud.spectating #command { display: none; }
#command .group label { display: block; font: 800 9.5px var(--font); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 6px 2px; white-space: nowrap; }
.seg { display: flex; background: var(--paper-3); border: 2px solid var(--ink); border-radius: 12px; padding: 3px; gap: 3px; box-shadow: inset 0 2px 0 rgba(31, 42, 68, 0.12); }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 8px; font: 400 14px var(--display); letter-spacing: 0.02em; white-space: nowrap; color: var(--ink-2); transition: background 0.12s, transform 0.08s; }
.seg button:hover { background: rgba(255, 255, 255, 0.6); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 2px var(--ink), 0 2px 0 2px var(--ink); transform: translateY(-1px); }
.pct-slider { display: flex; align-items: center; gap: 8px; margin-top: 7px; padding: 0 2px; }
.pct-slider b { min-width: 40px; text-align: right; font: 400 16px var(--display); font-variant-numeric: tabular-nums; color: var(--ink); }
#pct-range { --fill: 50%; flex: 1; min-width: 0; height: 18px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
#pct-range::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; border: 1.5px solid var(--ink);
  background: linear-gradient(90deg, var(--gold) var(--fill), #fff var(--fill)); }
#pct-range::-moz-range-track { height: 8px; border-radius: 4px; background: var(--surface); border: 1.5px solid var(--ink); }
#pct-range::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--gold); }
#pct-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink); }
#pct-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--ink); }
#pct-range:focus { outline: none; }
#pct-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(244, 181, 52, 0.6); }
#stance-group .seg button.on[data-stance="defensive"] { background: #cfeec4; }
#stance-group .seg button.on[data-stance="offensive"] { background: #ffd5c8; }
#mode-group .seg button.on[data-mode="assalto"] { background: var(--cream); }
#mode-group .seg button.on[data-mode="assedio"] { background: #dfe6f5; }
/* interruttore dell'addestramento automatico */
.toggle { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px 0 5px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-3);
  font: 400 14px var(--display); letter-spacing: 0.02em; color: var(--ink-2); box-shadow: 0 3px 0 var(--ink); transition: background 0.15s, transform 0.06s, box-shadow 0.06s; }
.toggle:active { transform: translateY(3px); box-shadow: none; }
.toggle .knob { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1), background 0.15s; }
.toggle b { font: 400 11px var(--display); padding: 1px 6px; border-radius: 6px; background: rgba(31, 42, 68, 0.15); }
.toggle.on { background: var(--green); color: #fff; text-shadow: 0 1.5px 0 var(--green-d); }
.toggle.on .knob { background: var(--gold); transform: rotate(180deg); }
.toggle.on b { background: var(--surface); color: var(--green-d); text-shadow: none; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.55; } }
/* modalità attacco (tasto A): interruttore rosso e pannello con le città scelte */
.toggle.atk.on { background: var(--red); text-shadow: 0 1.5px 0 var(--red-d); }
.toggle.atk.on b { color: var(--red-d); }
#map.attack { cursor: crosshair; }
#atk-panel { position: fixed; left: 50%; top: 78px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  justify-content: center; padding: 8px 12px; max-width: min(760px, calc(100vw - 20px)); border-color: var(--red); }
.atk-title { font: 400 16px var(--display); color: #fff; background: var(--red); border: 2px solid var(--ink); border-radius: 9px; padding: 1px 10px;
  box-shadow: 0 2px 0 var(--ink); letter-spacing: 0.03em; text-shadow: 0 1.5px 0 var(--red-d); white-space: nowrap; }
.atk-info { font-weight: 700; font-size: 13px; white-space: nowrap; }
.atk-info b { font: 400 16px var(--display); }
.atk-help { font-size: 12px; color: var(--muted); font-weight: 600; }
.atk-help b { color: var(--ink); }
.atk-btns { display: flex; gap: 6px; }
/* bomba atomica: pulsante giallo e nero, pannello della mira, la mappa che trema all'esplosione */
.nuke-btn { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px 0 6px; border: 2px solid var(--ink); border-radius: 12px;
  background: repeating-linear-gradient(-45deg, #ffd23f 0 8px, #ffc21a 8px 16px); box-shadow: 0 3px 0 var(--ink); font: 400 14px var(--display);
  color: var(--ink); white-space: nowrap; transition: transform 0.06s, box-shadow 0.06s; }
.nuke-btn:active { transform: translateY(3px); box-shadow: none; }
.nuke-btn .nk-i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #ffd23f; padding: 3px; }
.nuke-btn .nk-c { font: 400 12.5px var(--display); padding: 1px 7px; border-radius: 999px; background: var(--ink); color: #ffe08a; }
.nuke-btn.off { filter: grayscale(0.85); opacity: 0.7; }
.nuke-btn.on { background: var(--red); color: #fff; animation: blink 0.8s ease-in-out infinite; }
#map.nuking { cursor: crosshair; }
#map.shake { animation: shake 0.6s ease-out; }
@keyframes shake { 0%, 100% { transform: none; } 15% { transform: translate(-7px, 4px); } 30% { transform: translate(6px, -5px); } 45% { transform: translate(-4px, 3px); }
  60% { transform: translate(3px, -2px); } 80% { transform: translate(-1px, 1px); } }
#nuke-panel { position: fixed; left: 50%; top: 78px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  justify-content: center; padding: 8px 12px; max-width: min(760px, calc(100vw - 20px)); border-color: var(--gold-d);
  background: var(--paper-tex), linear-gradient(180deg, #fff7d6, #ffe89a); }
.nk-title { font: 400 16px var(--display); color: #ffd23f; background: var(--ink); border: 2px solid var(--ink); border-radius: 9px; padding: 1px 10px;
  box-shadow: 0 2px 0 var(--ink); letter-spacing: 0.03em; white-space: nowrap; }
.btn.sm { padding: 4px 10px; font-size: 13px; border-width: 2px; box-shadow: 0 2.5px 0 var(--ink); flex: none; }
.btn.sm kbd { margin-left: 3px; }
.tech-row { display: flex; gap: 6px; }
.tech-btn { display: flex; align-items: center; gap: 8px; text-align: left; background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; padding: 4px 10px;
  min-height: 38px; box-shadow: 0 3px 0 var(--ink); transition: transform 0.06s, box-shadow 0.06s, background 0.12s; }
.tech-btn:hover:not(:disabled) { background: var(--cream); }
.tech-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.tech-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tech-btn .i { font-size: 18px; }
.tech-btn .t { font: 400 14px/1.1 var(--display); white-space: nowrap; }
.tech-btn .c { font: 400 13px var(--display); color: var(--ink); white-space: nowrap; }
.lvl { display: flex; gap: 2px; margin-top: 3px; }
.lvl i { width: 9px; height: 5px; border-radius: 2px; background: var(--surface); border: 1px solid var(--ink); }
.lvl i.on { background: var(--gold); }

/* ---------------- banner di scelta, lobby, legenda ---------------- */
.lg-player, .lg-cpu { display: inline-block; width: 13px; height: 13px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1.5px solid var(--ink); }
.lg-player { background: linear-gradient(135deg, #1f6fff, #e63946); }
.lg-cpu { background: linear-gradient(135deg, #cfe0c0, #e6cfd8); }
.lg-lane { display: inline-block; width: 18px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; border: 1.5px solid var(--ink);
  background: linear-gradient(90deg, #fff 0 5px, transparent 5px 8px, #fff 8px 13px, transparent 13px) 0 50% / 100% 2px no-repeat, #6fa9d0; }
/* HUD d'inizio partita (nona sessione): la lista delle nazioni da prendere, a sinistra. Mentre si sceglie non servono
   la barra delle risorse (tutta a zero) né gli obiettivi */
#hud.spectating #res { visibility: hidden; }
#hud.picking #objectives, #hud.picking #alerts { display: none; }
#hud.picking #left { width: 348px; bottom: 16px; }
#hud.picking #card { left: 336px; }
#picker { display: flex; flex-direction: column; min-height: 0; max-height: 100%; padding: 12px 10px 10px; animation: cardin 0.3s ease; }
#picker h3 { align-self: flex-start; background: var(--gold); color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); font-size: 17px; }
#picker h3 small { color: var(--ink-2); }
#picker h3 .chipi.sm { background: rgba(255, 255, 255, 0.55); }
.pk-sub { margin: 0 2px 8px; font-size: 12.5px; line-height: 1.4; color: var(--muted); font-weight: 500; }
.pk-sub b { color: var(--ink); }
.pk-rand { flex: none; margin: 0; }
.pk-tools { display: flex; gap: 6px; margin: 0 0 8px; }
.pk-search { flex: 1; min-width: 0; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--ink); background: var(--surface); color: var(--text);
  font: 600 12.5px var(--font); outline: none; box-shadow: inset 0 2px 0 rgba(31, 42, 68, 0.08); }
.pk-search:focus { box-shadow: 0 0 0 3px rgba(244, 181, 52, 0.55); }
.pk-none { margin: 2px 2px 8px; font-size: 12px; line-height: 1.35; color: var(--muted); font-weight: 600; }
.pk-row[hidden] { display: none; }
.pk-exit { margin-top: 4px; }
.pk-list { list-style: none; margin: 0 -4px; padding: 2px 4px 4px; overflow-y: auto; min-height: 0; flex: 1; }
.pk-row { display: flex; align-items: center; gap: 10px; padding: 6px 7px 6px 8px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.62);
  cursor: pointer; transition: transform 0.08s, border-color 0.08s; }
.pk-row + .pk-row { margin-top: 5px; }
.pk-row:hover, .pk-row.on { border-color: var(--ink); background: var(--surface); transform: translateX(2px); box-shadow: 0 2px 0 var(--ink); }
.pk-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.pk-nm b { font: 400 15.5px var(--display); letter-spacing: 0.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-l2 { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 1px; }
.pk-l2 .pk-tag { flex: none; }
.pk-nm small { min-width: 0; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.pk-tag { font: 800 8.5px var(--font); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; border: 1.3px solid var(--ink); }
.pk-tag.strong { background: var(--gold); color: var(--ink); }
.pk-tag.under { background: #cfe3fb; color: var(--blue-d); }
.pk-bar { display: block; height: 5px; margin-top: 4px; border-radius: 3px; background: var(--surface); border: 1.2px solid var(--ink); overflow: hidden; }
.pk-bar i { display: block; height: 100%; }
.pk-go { padding: 5px 11px; }
.pk-fl { flex: none; display: flex; }
/* punti di forza (verdi) e debolezze (rosse) delle nazioni: lista di scelta, scheda, menu, scheda della nazione */
.perks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.perk { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 5px; border-radius: 999px; font: 700 10.5px var(--font);
  border: 1.3px solid; white-space: nowrap; cursor: help; }
.perk.strength { background: #e3f3d8; border-color: rgba(47, 107, 35, 0.45); color: var(--green-d); }
.perk.weakness { background: #fde0d8; border-color: rgba(158, 44, 28, 0.4); color: var(--red-d); }
.perks.big { gap: 6px; margin: 10px 0 4px; }
.perks.big .perk { font-size: 12px; padding: 3px 10px 3px 7px; white-space: normal; }
.pk-perks { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; min-width: 0; }
.pk-perks .perk { font-size: 9.5px; padding: 0 5px 0 3px; min-width: 0; flex: 0 0 auto; }
.pk-foot { display: block; margin: 8px 2px 0; font-size: 11px; color: var(--muted); line-height: 1.35; }
#lobby-panel { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 6; width: clamp(300px, calc(100vw - 700px), 480px); padding: 16px 18px; }
.lp-head { display: flex; align-items: center; gap: 12px; }
.lp-head .chipi { background: var(--blue); }
.lp-head b { display: block; font: 400 20px var(--display); }
.lp-head small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.lp-head small b { display: inline; font: 400 inherit var(--display); color: var(--red); }
.lp-count { margin-left: auto; font: 400 32px var(--display); font-variant-numeric: tabular-nums; }
.lp-count small { font-size: 16px; color: var(--muted); }
#lobby-panel p { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 10px 0 0; font-weight: 500; }
.meter { height: 8px; border-radius: 4px; background: var(--surface); border: 1.5px solid var(--ink); overflow: hidden; margin-top: 7px; }
.meter i { display: block; height: 100%; background: var(--gold); transition: width 0.5s; }
.meter.big { height: 13px; border-radius: 7px; margin-top: 12px; }
.lp-players { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 6px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface); border: 1.5px solid var(--ink); }
.pchip small { color: var(--muted); font-weight: 600; }
.lp-leave { margin: 10px 0 0 auto; font-size: 12px; }
/* quindicesima sessione: la legenda sta sopra la barra comandi, larga come la colonna destra (prima era dietro la barra) */
#legend { position: fixed; right: 10px; bottom: calc(var(--cmd-h, 108px) + 22px); width: 290px; z-index: 4; display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 3px 11px; padding: 6px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
#hud.spectating #legend { bottom: 12px; }
:root { --legend-h: 72px; }
#legend span { display: inline-flex; align-items: center; gap: 5px; }
#legend .lg-player, #legend .lg-cpu { margin-right: 0; }

/* ---------------- tooltip, toast, proposte ---------------- */
#tooltip { position: fixed; left: 0; top: 0; will-change: transform; z-index: 20; pointer-events: none; background: var(--paper-tex), var(--paper); color: var(--text); border: 2px solid var(--ink); border-radius: 12px;
  padding: 8px 11px 9px; font-size: 12.5px; max-width: 280px; line-height: 1.4; box-shadow: 0 3px 0 var(--ink), var(--soft); }
.tt-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tt-head b { font: 400 17px var(--display); letter-spacing: 0.01em; }
.tt-city { font-size: 11px; font-weight: 700; color: var(--muted); }
.tt-owner { display: flex; align-items: center; gap: 6px; margin: 3px 0 2px; font-weight: 600; }
.tt-role { font: 800 9.5px var(--font); letter-spacing: 0.05em; padding: 0 6px; border-radius: 5px; color: #fff; border: 1.5px solid var(--ink); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.tt-role.cpu { background: #e3dccb; color: var(--ink-2); text-shadow: none; }
.tt-row { color: var(--muted); display: flex; align-items: center; gap: 3px; flex-wrap: wrap; font-weight: 600; }
.tt-ic { display: inline-grid; width: 14px; height: 14px; color: var(--green-d); }
.tt-ic .ic { width: 14px; height: 14px; }
.tt-mood { margin-top: 3px; font-weight: 700; font-size: 12px; }
.tt-hint { margin-top: 5px; font-size: 11px; color: var(--faint); font-weight: 600; }
#tooltip .est { margin-top: 6px; padding-top: 6px; border-top: 2px dashed var(--line); font-weight: 600; }
#tooltip .est b { font-weight: 800; }
#tooltip .est.warn { color: var(--warn); }
/* quindicesima sessione: il fumetto dei pulsanti (hovertip.js), al posto del riquadro grigio di Windows (`title`) */
#hovertip { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; max-width: 260px; padding: 6px 10px 7px;
  background: var(--paper-tex), var(--paper); color: var(--text); border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink), var(--soft); font: 600 12px/1.38 var(--font); white-space: pre-line; text-align: left;
  animation: tt-in 0.12s ease-out; }
@keyframes tt-in { from { opacity: 0; margin-top: -3px; } to { opacity: 1; margin-top: 0; } }
#hovertip.up { animation-name: tt-in-up; }
@keyframes tt-in-up { from { opacity: 0; margin-top: 3px; } to { opacity: 1; margin-top: 0; } }

#toasts { position: fixed; left: 50%; bottom: calc(var(--cmd-h, 88px) + 28px); transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 7px;
  align-items: center; z-index: 30; pointer-events: none; }
#hud.spectating:not(.hidden) ~ #toasts { bottom: 232px; }
.toast { background: var(--paper-tex), var(--paper); color: var(--text); border: 2px solid var(--ink); padding: 7px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  animation: pop 0.3s cubic-bezier(0.2, 1.5, 0.4, 1); max-width: 90vw; text-align: center; box-shadow: 0 3px 0 var(--ink), var(--soft); }
.toast.bad { background: var(--red); color: #fff; text-shadow: 0 1px 0 var(--red-d); }
.toast.good { background: var(--green); color: #fff; text-shadow: 0 1px 0 var(--green-d); }
.toast.err { background: var(--cream); }
.toast.warn { background: var(--gold); color: var(--ink); }   /* piano di lancio 2A: parte del messaggio nascosta dal filtro */
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.9); } to { opacity: 1; transform: none; } }

/* consigli per chi comincia (quattordicesima sessione, tips.js): un biglietto sopra la barra dei comandi; i toast salgono
   sopra di lui (--tip-h, misurata da tips.js) */
#tip { position: fixed; left: 50%; bottom: calc(var(--cmd-h, 88px) + 16px); transform: translateX(-50%); width: min(540px, calc(100vw - 24px)); z-index: 7;
  display: flex; align-items: center; gap: 11px; padding: 9px 12px 9px 10px; border-color: var(--gold-d); animation: tipin 0.3s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes tipin { from { opacity: 0; transform: translate(-50%, 10px) scale(0.94); } to { opacity: 1; transform: translateX(-50%); } }
#hud.spectating #tip { bottom: 16px; }
#hud.lobby #tip { display: none; }
.tip-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: var(--cream);
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.tip-body { flex: 1; min-width: 0; }
.tip-body small { display: block; font: 800 10.5px var(--font); letter-spacing: 0.07em; color: var(--gold-d); }
.tip-body p { margin: 1px 0 0; font-size: 13px; line-height: 1.38; }
.tip-act { flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.tip-act .link { margin: 0; font-size: 11px; }
#toasts { bottom: calc(var(--cmd-h, 88px) + 28px + var(--tip-h, 0px)); }

/* proposte e inviti hanno una scadenza: stanno sopra anche alle finestre (la missione che si apre da sola, il rally) */
#proposals { position: fixed; top: 94px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 70; }
.proposal { padding: 12px 15px; min-width: 340px; max-width: calc(100vw - 20px); animation: pop 0.3s cubic-bezier(0.2, 1.5, 0.4, 1); }
.proposal .title { font: 400 17px var(--display); letter-spacing: 0.01em; display: flex; align-items: center; gap: 10px; }
.proposal .title small { color: var(--muted); font: 600 12px var(--font); }
.proposal .sub { font-size: 12.5px; color: var(--muted); margin: 6px 0 10px; line-height: 1.4; font-weight: 500; }
.proposal .sub b.warn { display: inline-block; margin-top: 4px; }
.proposal .row { display: flex; gap: 7px; }
.proposal .bar { height: 5px; background: var(--gold); border: 1px solid var(--ink); border-radius: 3px; margin-top: 10px; transition: width 1s linear; }

#conn { position: fixed; top: 0; left: 0; right: 0; background: var(--red); color: #fff; text-align: center; padding: 6px; font: 400 15px var(--display); letter-spacing: 0.03em;
  border-bottom: 2.5px solid var(--ink); z-index: 100; }

/* bordi dello schermo: rosso = ti attaccano, blu = rinforzi alleati */
#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 25; opacity: 0; }
#vignette.red { box-shadow: inset 0 0 110px 28px rgba(255, 25, 40, 0.72), inset 0 0 22px 6px rgba(255, 60, 60, 0.9); animation: vig 2.4s ease-out; }
#vignette.blue { box-shadow: inset 0 0 110px 28px rgba(40, 130, 255, 0.7), inset 0 0 22px 6px rgba(90, 170, 255, 0.9); animation: vig 2.4s ease-out; }
@keyframes vig { 0% { opacity: 0; } 10% { opacity: 1; } 28% { opacity: 0.45; } 42% { opacity: 1; } 100% { opacity: 0; } }

/* banner: guerra dichiarata, nazione sconfitta */
#banner { position: fixed; top: 100px; left: 50%; transform: translateX(-50%); z-index: 45; pointer-events: none; text-align: center; min-width: 340px;
  padding: 16px 32px 18px; border-radius: 20px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink), 0 20px 50px rgba(20, 28, 48, 0.4);
  animation: bannerin 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
#banner.war { background: var(--paper-tex), linear-gradient(180deg, #f2664b, #b82e1c); color: #fff; }
#banner.win { background: var(--paper-tex), linear-gradient(180deg, #ffd766, var(--gold)); color: var(--ink); }
#banner.out { animation: bannerout 0.38s ease-in forwards; }
.bn-flags { display: flex; align-items: center; justify-content: center; gap: 16px; }
.bn-x { font-size: 32px; filter: drop-shadow(0 2px 0 var(--ink)); animation: clang 0.6s ease 0.15s; }
.bn-title { font: 400 44px/1.05 var(--display); letter-spacing: 0.05em; margin-top: 10px; text-shadow: 0 3px 0 var(--ink); -webkit-text-stroke: 1.5px var(--ink); }
#banner.win .bn-title { color: #fff; }
.bn-sub { font-size: 15px; font-weight: 700; margin-top: 4px; }
.bn-sub small { opacity: 0.9; font-weight: 600; }
#banner .tg.cpu { background: rgba(255, 255, 255, 0.85); }
@keyframes bannerin { from { opacity: 0; transform: translate(-50%, -30px) scale(0.7) rotate(-4deg); } to { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0); } }
@keyframes bannerout { to { opacity: 0; transform: translate(-50%, -16px) scale(0.95); } }
@keyframes clang { 0%, 100% { transform: scale(1) rotate(0); } 40% { transform: scale(1.6) rotate(-15deg); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 44; overflow: hidden; }
#confetti i { position: absolute; top: -14px; width: 10px; height: 15px; border-radius: 2px; border: 1.5px solid var(--ink); animation: fall 2.4s cubic-bezier(0.25, 0.6, 0.5, 1) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); opacity: 0.9; } }

/* ---------------- menu del tasto destro ---------------- */
#ctx { position: fixed; z-index: 35; width: 300px; padding: 11px; border-radius: 16px; animation: pop 0.2s ease; }
.ctx-head { display: flex; align-items: center; gap: 12px; padding: 2px 3px 9px; }
.ctx-head > div { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.ctx-head b { font: 400 19px var(--display); letter-spacing: 0.01em; }
.ctx-city { display: block; font: 700 11px var(--font); color: var(--muted); letter-spacing: 0; }
.ctx-head small { color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 3px; }
.ctx-status { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 3px 8px; }
.rels { display: flex; flex-direction: column; gap: 5px; padding: 8px 9px; margin: 0 0 9px; border-radius: 11px; background: rgba(255, 255, 255, 0.6); border: 1.5px dashed rgba(31, 42, 68, 0.3); }
.rel { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.rel-k { flex: none; width: 76px; color: var(--muted); font-weight: 800; padding-top: 2px; }
.rel-v { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.rel-v .none { color: var(--faint); padding-top: 2px; font-weight: 600; }
.rel-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 4px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--ink); cursor: pointer;
  font-weight: 700; white-space: nowrap; }
.rel-chip:hover { background: var(--gold); }
.ctx-items { display: flex; flex-direction: column; gap: 5px; }
.ci { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 2px solid var(--ink); background: var(--surface); border-radius: 11px; padding: 6px 9px;
  font: 400 15px var(--display); letter-spacing: 0.01em; color: var(--ink); box-shadow: 0 2.5px 0 var(--ink); transition: transform 0.06s, box-shadow 0.06s, background 0.12s; }
.ci:hover:not(:disabled) { background: var(--cream); }
.ci:active:not(:disabled) { transform: translateY(2.5px); box-shadow: none; }
.ci:disabled { opacity: 0.45; cursor: not-allowed; }
.ci-i { flex: none; width: 24px; text-align: center; font-size: 17px; }
.ci-l { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.ci-l small { font: 600 11px var(--font); color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.ci-l small b { font-weight: 800; }
.ci.danger { background: linear-gradient(180deg, #f27a5f, var(--red)); color: #fff; text-shadow: 0 1.5px 0 var(--red-d); }
.ci.danger .ci-l small { color: rgba(255, 255, 255, 0.92); text-shadow: none; }
.ci.danger:hover:not(:disabled) { background: linear-gradient(180deg, #f58a70, #e45a40); }
.ci.good { background: linear-gradient(180deg, #7fcf5e, var(--green)); color: #fff; text-shadow: 0 1.5px 0 var(--green-d); }
.ci.good .ci-l small { color: rgba(255, 255, 255, 0.92); text-shadow: none; }
.ci.primary { background: linear-gradient(180deg, #ffd766, var(--gold)); }
.ci-note { font-size: 12px; color: var(--muted); padding: 6px 9px; line-height: 1.35; font-weight: 600; }
.ci-emotes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 9px; padding-top: 9px; border-top: 2px dashed var(--line); }
.ci-emotes button { border: 1.5px solid var(--ink); background: var(--surface); border-radius: 10px; font-size: 19px; padding: 3px 0; box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.1s; }
.ci-emotes button:hover { transform: translateY(-2px) scale(1.12) rotate(-5deg); background: var(--cream); }

/* ---------------- menu iniziale ---------------- */
.screen { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto;
  background: radial-gradient(ellipse at center, rgba(20, 30, 52, 0.15), rgba(20, 30, 52, 0.6)); }
.landing-card { width: min(480px, 100%); padding: 26px 26px 20px; border-radius: 26px; margin: auto; border-width: 3px; box-shadow: 0 7px 0 var(--ink), 0 26px 60px rgba(10, 16, 32, 0.45); }
.logo-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; }
/* il marchio di WarCapitals (scudo, stella della capitale, spade): client/img/logo-mark.svg */
.logo-mark { width: 84px; height: 84px; flex: none; margin: -10px -6px -8px -10px; }
.logo { margin: 0; font: 400 54px/1 var(--display); letter-spacing: 0.01em; color: #fff; -webkit-text-stroke: 3px var(--logo-ink, var(--ink)); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--logo-ink, var(--ink)); }
.logo span { color: var(--gold); }
.tagline { text-align: center; margin: 14px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.45; font-weight: 600; }
.defeat { margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; text-align: center; background: #fde0d8; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.defeat p { margin: 4px 0 0; font-size: 13px; color: var(--red-d); line-height: 1.45; font-weight: 600; }
.defeat-title { font: 400 26px var(--display); letter-spacing: 0.1em; color: var(--red); text-shadow: 0 2px 0 var(--ink); }
.defeat-title.big { font-size: 42px; margin-bottom: 6px; }
#name { width: 100%; padding: 12px 16px; border-radius: 14px; border: 2.5px solid var(--ink); background: var(--surface); color: var(--text); font: 400 20px var(--display);
  letter-spacing: 0.02em; outline: none; text-align: center; box-shadow: inset 0 3px 0 rgba(31, 42, 68, 0.1); }
#name::placeholder { color: var(--faint); }
#name:focus { box-shadow: 0 0 0 4px rgba(244, 181, 52, 0.55), inset 0 3px 0 rgba(31, 42, 68, 0.1); }
.btn-quick { width: 100%; margin-top: 14px; padding: 12px 16px 13px; border: 3px solid var(--ink); border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--paper-tex), linear-gradient(180deg, #ffd766, var(--gold)); color: var(--ink); box-shadow: 0 6px 0 var(--ink), 0 14px 26px rgba(10, 16, 32, 0.3);
  transition: transform 0.07s, box-shadow 0.07s, filter 0.15s; }
.btn-quick:hover { filter: brightness(1.05); transform: translateY(-1px) rotate(-0.5deg); }
.btn-quick:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink), 0 6px 12px rgba(10, 16, 32, 0.3); }
.q-title { font: 400 30px var(--display); letter-spacing: 0.06em; }
.q-sub { font-size: 12px; font-weight: 700; opacity: 0.8; }
.section-title { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 9px; font: 400 16px var(--display); letter-spacing: 0.04em; color: var(--ink); }
.section-title small { color: var(--muted); font: 600 11.5px var(--font); letter-spacing: 0; }
#servers { display: flex; flex-direction: column; gap: 8px; }
.srv { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  cursor: pointer; transition: transform 0.08s, box-shadow 0.08s, background 0.12s; }
.srv:hover:not(.disabled):not(.loading) { background: var(--cream); transform: translateY(-1px); }
.srv:active:not(.disabled):not(.loading) { transform: translateY(3px); box-shadow: none; }
.srv.disabled { cursor: not-allowed; opacity: 0.6; }
.srv.loading { cursor: default; color: var(--muted); font-size: 13px; font-weight: 600; }
.srv-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #fff; background: var(--blue); border: 2px solid var(--ink); flex: none; }
.srv-main { flex: 1; min-width: 0; }
.srv-main b { font: 400 17px var(--display); letter-spacing: 0.02em; }
.srv-main small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-main .meter { margin-top: 6px; }
.srv-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.srv-side small { color: var(--muted); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.badge { font: 400 11.5px var(--display); letter-spacing: 0.06em; padding: 1px 8px; border-radius: 7px; border: 1.5px solid var(--ink); }
.badge.lobby { background: var(--gold); }
.badge.live { background: var(--green); color: #fff; }
.badge.full { background: #e3dccb; color: var(--muted); }
.link { display: block; margin: 16px auto 0; background: none; border: 0; color: var(--ink-2); text-decoration: underline; font-size: 13px; font-weight: 700; }
.link:hover { color: var(--red); }

/* ---------------- modali ---------------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(16, 24, 44, 0.5); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.modal { padding: 24px; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 22px; border-width: 3px;
  box-shadow: 0 6px 0 var(--ink), 0 26px 60px rgba(10, 16, 32, 0.45); animation: pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1); }
.modal h2 { margin: 0 0 6px; font: 400 30px/1.1 var(--display); letter-spacing: 0.01em; }
.modal p { color: var(--muted); line-height: 1.5; font-size: 14px; font-weight: 500; }
.modal p b { color: var(--ink); }
.modal .row { display: flex; gap: 8px; margin-top: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stats-grid.four { grid-template-columns: repeat(4, 1fr); }
.stats-grid div { background: var(--surface); border-radius: 13px; padding: 9px 6px; text-align: center; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.stats-grid b { display: block; font: 400 24px var(--display); font-variant-numeric: tabular-nums; }
.stats-grid small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 800; }
.death { text-align: center; }
.death h2 { font-size: 24px; }
.end { text-align: center; }
.end > .ic { width: 70px; height: 70px; margin: 0 auto 8px; color: var(--gold); filter: drop-shadow(0 3px 0 var(--ink)); }
.podium { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; text-align: left; }
.podium div { display: flex; align-items: center; gap: 10px; background: var(--surface); padding: 9px 12px; border-radius: 13px; font-size: 15px; border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.podium div:first-child { background: var(--cream); }
.podium .medal { font-size: 24px; }
.podium b { flex: 1; font: 400 17px var(--display); }
.podium b small { color: var(--muted); font: 600 12px var(--font); }
.podium span:last-child { color: var(--muted); font-size: 13px; font-weight: 700; }
.help h3 { display: inline-block; margin: 18px 0 7px; padding: 2px 11px; font: 400 15px var(--display); letter-spacing: 0.04em; color: #fff; background: var(--blue);
  border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 2px 0 var(--ink); transform: rotate(-1deg); }
.help ul { margin: 0; padding-left: 20px; color: var(--text); font-size: 13.5px; line-height: 1.55; }
.help li { margin: 3px 0; }
.help li::marker { color: var(--red); }
.pc-head { display: flex; align-items: center; gap: 16px; }
.pc-sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.hint { font-size: 13px !important; }
.pc-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.pc-rel { margin: 8px 0 0; font-weight: 700; }
.modal .rels { margin-top: 10px; }
.proposal .title .flag, .pc-head .flag { margin-right: 2px; }

/* ---------------- responsive (tablet / smartphone) ---------------- */
@media (max-width: 1700px) {
  #legend { display: none; }
  :root { --legend-h: 0px; }
}
@media (max-width: 1620px) {
  #command { left: 10px; }
  #mission-btn { bottom: calc(var(--cmd-h, 88px) + 20px); width: 210px; padding: 6px 12px 7px 7px; }
  #card { bottom: calc(var(--cmd-h, 88px) + 86px); }
  .mb-ic { width: 30px; height: 30px; font-size: 16px; }
}
@media (max-width: 1450px) {
  .stat small { font-size: 9px; }
  .stat .chipi { width: 30px; height: 30px; font-size: 15px; }
  .stat b { font-size: 18px; }
  .match { min-width: 200px; }
}
/* diciannovesima sessione: a 1440 px le sei risorse si tagliavano ("Stability", "+18.5/s"): un po' meno spazio attorno */
@media (max-width: 1520px) {
  .me { min-width: 170px; padding-right: 12px; }
  .match { min-width: 176px; }
  .res { padding: 6px 4px; gap: 0; }
  .stat { gap: 5px; padding: 2px 4px; }
  .stat .chipi { width: 27px; height: 27px; font-size: 14px; }
  .stat small { letter-spacing: 0.03em; }
  .stat small.pos { font-size: 10.5px; }
}
/* quindicesima sessione: la barra intera (~1640 px) accanto alla missione ci sta solo da 1910 px in su */
@media (max-width: 1910px) {
  #mode-group .seg button .lbl, .tech-btn .t .nm, #train-group .tl, #atk-group .tl, .nuke-btn .nk-t { display: none; }
  #command { gap: 11px; }
  .seg button { padding: 5px 8px; }
  .tech-btn { padding: 4px 8px; gap: 6px; }
}
@media (max-width: 1200px) {
  /* quindicesima sessione: il consiglio non va sotto la colonna destra né sopra la scheda della città */
  #tip { width: min(540px, calc(100vw - 512px)); }
  #hud:has(#card:not(.hidden)) #tip { display: none; }
  .stat small:not(.pos) { display: none; }
  .res { gap: 2px; padding: 6px 5px; }
  .stat { gap: 5px; padding: 2px 5px; }
  .stat .chipi { width: 26px; height: 26px; font-size: 13px; }
  .stat b { font-size: 15.5px; }
  .match { min-width: 160px; max-width: 200px; }
  .me { min-width: 0; padding: 6px 12px 6px 8px; gap: 8px; }
  .me-flag { width: 40px; }
  #topbar { gap: 7px; }
  .icon-btn { width: 40px; font-size: 18px; }
  #left, #right { width: 236px; }
  #hud.picking #left { width: 272px; }
  #hud.picking #card { left: 290px; }
  .pk-row { gap: 8px; }
  .pk-tag { display: none; }   /* la barra della forza basta */
}
@media (max-width: 1280px) {
  #stance-group .seg button .lbl { display: none; }
  .tech-btn .lvl { display: none; }
}
/* quindicesima sessione: tra 761 e 1100 px la barra comandi usciva dallo schermo (~1050 px): gruppi più stretti, senza i tasti nelle etichette */
@media (max-width: 1100px) {
  #command { gap: 8px; padding: 8px 10px 10px; }
  #command .group label kbd { display: none; }
  .seg button { padding: 5px 6px; }
  .pct-slider b { min-width: 34px; font-size: 14px; }
  /* diciannovesima sessione: a 1024 px la barra delle risorse tagliava i numeri */
  .match { min-width: 0; max-width: 150px; padding: 6px 9px; }
  .match-top small { display: none; }
  .me { padding: 6px 8px 6px 6px; }
  .me-text small { display: none; }
  .res { flex: 1 0 auto; overflow: visible; }
  .stat { padding: 2px 4px; gap: 4px; }
  .stat .chipi { width: 22px; height: 22px; font-size: 11px; }
  .stat b { font-size: 14px; }
  #chatbox .tabs button { padding: 4px 5px; font-size: 11px; }
}
@media (max-width: 1000px) {
  .stat .chipi { display: none; }
  .stat + .stat { border-left-width: 1.5px; }
  .conquest small { display: none; }
}
@media (max-width: 760px) {
  #topbar { flex-wrap: wrap; top: 6px; left: 6px; right: 6px; gap: 6px; }
  .me { flex: 1; min-width: 0; padding: 5px 8px 5px 6px; gap: 6px; }
  .me-flag { width: 28px; }
  .me-flag .flag.xl { width: 27px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 2px var(--ink); }
  .me-text b { font-size: 16px; }
  .me-text small { font-size: 11px; margin-top: 1px; }
  .me-text small .role { display: none; }
  .res { order: 3; flex-basis: 100%; padding: 4px; }
  .stat { padding: 1px 3px; gap: 4px; justify-content: center; }
  .stat .chipi { display: grid; width: 18px; height: 18px; font-size: 10px; border-width: 1.5px; box-shadow: none; }
  .stat b { font-size: 14px; }
  .stat small.pos { font-size: 9.5px; }
  .match { flex: 1; min-width: 0; max-width: none; padding: 5px 8px; }
  .match-top small { display: none; }
  .match-top b { font-size: 17px; }
  .icon-btn { width: 34px; font-size: 15px; }
  #chat-btn { display: grid; }
  #left { top: 130px; left: 6px; width: calc(100vw - 210px); }
  #objectives { padding: 6px; }
  #objectives h3 { display: none; }
  #objectives .obj { margin-top: 0; padding: 5px 7px; font-size: 11.5px; }
  #objectives .obj:nth-of-type(n+3) { display: none; }
  #objectives .obj-list { max-height: none; overflow: visible; margin-right: 0; padding-right: 0; }
  #objectives .obj + .obj { margin-top: 4px; }
  .alert { padding: 6px 8px; }
  .al-body small { display: none; }
  #right { top: 130px; right: 6px; width: 190px; height: auto; max-height: 40vh; }
  #leaderboard { padding: 8px; }
  #leaderboard h3 { font-size: 13px; }
  .lb-cpu small { display: none; }
  #lb .share { width: 40px; }
  #chatbox { display: none; }
  #hud.chat-open #chatbox { display: flex; position: fixed; left: 6px; right: 6px; top: 130px; bottom: calc(var(--cmd-h, 100px) + 16px); z-index: 20; }
  #hud.chat-open.spectating #chatbox { bottom: 150px; }
  #card { left: 6px; right: 6px; width: auto; bottom: calc(var(--cmd-h, 100px) + 16px); padding: 10px 12px; }
  #card .head h2 { font-size: 21px; }
  #card .grid { margin-top: 6px; }
  #hud.spectating #card { bottom: 150px; }
  #command { flex-wrap: wrap; justify-content: center; gap: 6px 8px; bottom: 6px; left: 6px; right: 6px; width: auto; margin: 0; padding: 7px; }
  #atk-panel, #nuke-panel { top: auto; bottom: calc(var(--cmd-h, 100px) + 14px); padding: 6px 8px; gap: 6px 8px; }
  #army-bar .atk-help { display: none; }
  #armies { padding: 6px 8px; }
  #armies h3 { font-size: 12px; margin-bottom: 4px; padding: 2px 8px 2px 5px; }
  #armies .aall { display: none; }
  .ahint { display: none; }
  #mission-btn { left: 6px; bottom: calc(var(--cmd-h, 100px) + 12px); width: auto; padding: 4px 10px 4px 5px; }
  #mission-btn .mb-t small { display: none; }
  #card { bottom: calc(var(--cmd-h, 100px) + 62px); }
  #army-bar { top: auto; bottom: calc(var(--cmd-h, 100px) + 14px); padding: 6px 8px; gap: 6px 8px; }
  #hud.army-sel #mission-btn, #hud.chat-open #mission-btn { display: none; }
  .mm-nn { width: 84px; }
  .arow { padding: 3px 5px; margin-top: 3px; }
  .ainfo small { display: none; }
  .atk-help { display: none; }
  #hud.attacking:not(.hidden) ~ #toasts { bottom: calc(var(--cmd-h, 100px) + 96px); }
  #command .group label { display: none; }
  .seg button { padding: 5px 7px; font-size: 13px; }
  .seg button .lbl { display: none; }
  #pct-group { flex-basis: 100%; min-width: 0; display: flex; align-items: center; gap: 8px; }   /* min-width: il 50% usciva dallo schermo */
  .pct-slider { flex: 1; margin-top: 0; min-width: 0; }
  .toggle { height: 34px; }
  .tech-btn .lvl { display: none; }
  .tech-btn { padding: 3px 7px; gap: 5px; min-height: 34px; }
  .tech-btn .i { font-size: 15px; }
  .tech-btn .t { display: none; }
  #ctx { width: min(300px, calc(100vw - 16px)); }
  #banner { top: 134px; min-width: 0; width: calc(100vw - 24px); padding: 12px 14px; }
  .bn-title { font-size: 32px; }
  .flag.xxl { width: 54px; height: 36px; }
  #lobby-panel { bottom: 6px; width: calc(100vw - 12px); }
  /* su telefono la scelta della nazione è un foglio in basso, sopra la mappa */
  #hud.spectating #res { display: none; }
  #hud.picking #left { top: auto; bottom: 6px; left: 6px; right: 6px; width: auto; }
  #hud.picking #right { display: none; }
  #hud.picking.lobby #left { bottom: 200px; }
  #hud.picking #card { left: 6px; bottom: calc(44vh + 16px); max-height: 40vh; overflow-y: auto; }
  #picker { max-height: 44vh; padding: 8px 8px 6px; }
  #picker h3 { font-size: 14px; margin-bottom: 6px; }
  .pk-sub, .pk-foot { display: none; }
  .pk-tools { margin-bottom: 6px; }
  .pk-rand { padding: 3px 10px; }
  .pk-search { padding: 4px 8px; font-size: 12px; }
  .pk-row { padding: 4px 6px; gap: 8px; }
  .pk-row .flag.lg { width: 24px; height: 16px; }
  .pk-bar { display: none; }
  #proposals { top: 130px; }
  .proposal { min-width: 0; }
  #toasts { bottom: calc(var(--cmd-h, 100px) + 16px + var(--tip-h, 0px)); width: calc(100vw - 24px); }
  #hud.spectating:not(.hidden) ~ #toasts { bottom: 250px; }
  #tip { bottom: calc(var(--cmd-h, 100px) + 56px); padding: 7px 9px; gap: 8px; }
  #hud.spectating #tip, #hud.chat-open #tip, #hud:has(#card:not(.hidden)) #tip { display: none; }
  .tip-ic { width: 28px; height: 28px; font-size: 15px; }
  .tip-body p { font-size: 12px; }
  .toast { font-size: 12.5px; padding: 6px 12px; border-radius: 12px; }
  .logo { font-size: 40px; }
  .logo-mark { width: 64px; height: 64px; margin: -8px -6px -6px -8px; }
  .landing-card { padding: 20px 16px 16px; }
}

/* ---------------- tredicesima sessione: account, partite private, lobby, achievement ---------------- */
/* menù iniziale: invito, scheda dell'account, ospite / log in / sign up, pulsanti secondari */
.invite { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: 14px; background: #e7f0ff;
  border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.inv-ic { font-size: 26px; }
.inv-t { flex: 1; min-width: 0; }
.inv-t b { display: block; font: 400 16px var(--display); }
.inv-t small { color: var(--muted); font-size: 12px; font-weight: 600; }
.inv-t code { font: 400 14px var(--display); letter-spacing: 0.12em; color: var(--ink); background: var(--surface); padding: 0 6px; border-radius: 5px; border: 1.5px solid var(--ink); }
.inv-x { border: 0; background: none; font-size: 16px; color: var(--muted); padding: 4px; }
.acct { display: flex; align-items: center; gap: 11px; padding: 9px 10px 9px 9px; border-radius: 16px; background: var(--surface); border: 2.5px solid var(--ink);
  box-shadow: inset 0 3px 0 rgba(31, 42, 68, 0.08); }
.acct-main { flex: 1; min-width: 0; }
.acct-main b { display: block; font: 400 21px/1.1 var(--display); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-main small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.acct-ach { display: flex; align-items: baseline; gap: 3px; padding: 5px 10px; border-radius: 11px; border: 2px solid var(--ink); background: linear-gradient(180deg, #ffe38d, var(--gold));
  box-shadow: 0 2.5px 0 var(--ink); font: 400 15px var(--display); }
.acct-ach b { font: 400 18px var(--display); }
.acct-ach small { font: 700 11px var(--font); color: var(--ink-2); }
.acct-menu { border: 2px solid var(--ink); background: var(--surface); border-radius: 11px; padding: 5px 8px; font-size: 16px; box-shadow: 0 2.5px 0 var(--ink); }
.avatar { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--blue);
  border: 2px solid var(--ink); color: #fff; font: 400 17px var(--display); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 46px; height: 46px; font-size: 22px; box-shadow: 0 3px 0 var(--ink); }
.avatar.xl { width: 64px; height: 64px; font-size: 30px; box-shadow: 0 4px 0 var(--ink); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.auth-note { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.35; flex: 1 1 180px; }
.auth-note b { color: var(--ink); }
.auth-btns { display: flex; gap: 6px; }
.land-actions { display: flex; gap: 8px; margin-top: 12px; }
.land-btn { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 7px 8px; font-size: 16px; box-shadow: 0 3px 0 var(--ink); }
.land-btn small { font: 700 10.5px var(--font); color: var(--muted); }
/* server delle regioni: posti (nazioni) e giocatori per partire sono due cose diverse */
.srv-slots { display: block; font-size: 10.5px; font-weight: 800; color: var(--blue-d); letter-spacing: 0.02em; }
.srv-main small b { font: 800 11.5px var(--font); letter-spacing: 0; color: var(--ink); }
.srv-main small .cd { color: var(--red); }
.srv-side small b { color: var(--ink); font-size: 12px; }
.meter.srv-m { position: relative; overflow: visible; }
.meter.srv-m i { border-radius: 3px; }
.meter.live i { background: var(--green); }
.meter .mk { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--red); border-radius: 2px; box-shadow: 0 0 0 1px #fff; }
/* finestre: login, nome, account */
.modal.wide { width: min(640px, 100%); }
.login-dlg .provs { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.prov { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 13px; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  font: 400 17px var(--display); letter-spacing: 0.02em; color: var(--ink); background: var(--surface); text-decoration: none; transition: transform 0.07s; }
.prov:hover:not(.off) { transform: translateY(-1px); filter: brightness(1.04); }
.prov:active:not(.off) { transform: translateY(3px); box-shadow: 0 0.5px 0 var(--ink); }
.prov-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font: 700 17px var(--font); color: #fff; border: 2px solid var(--ink); }
.prov-google .prov-ic { background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.prov-discord { background: #e9ebff; }
.prov-discord .prov-ic { background: #5865f2; }
.prov-facebook { background: #e6efff; }
.prov-facebook .prov-ic { background: #1877f2; font-family: Georgia, serif; }
.prov.off { opacity: 0.5; cursor: not-allowed; font-size: 14px; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--muted); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.dev-row, .cd-join { display: flex; gap: 8px; }
.dev-row input, .cd-join input, .acc-name, .lp-inv input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 11px; border: 2px solid var(--ink); background: var(--surface);
  font: 400 16px var(--display); color: var(--ink); outline: none; }
.dev-login small { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.acc-name { width: 100%; font-size: 22px; text-align: center; padding: 10px; }
.acc-err { min-height: 18px; margin: 6px 0 0 !important; font-weight: 700 !important; }
.acct-big { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.acc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* partita privata: mappe e modalità */
.cd-sec { margin-top: 12px; }
.cd-sec > label { display: block; font: 400 14px var(--display); letter-spacing: 0.04em; margin-bottom: 6px; }
.cd-maps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.cd-map, .cd-mode { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 6px; border-radius: 12px; border: 2px solid var(--ink); background: var(--surface);
  box-shadow: 0 2.5px 0 var(--ink); text-align: center; }
.cd-map.on, .cd-mode.on { background: linear-gradient(180deg, #ffe38d, var(--gold)); }
.cd-mi { font-size: 22px; }
.cd-map b, .cd-mode b { font: 400 15px var(--display); }
.cd-map small, .cd-mode small { font-size: 10.5px; color: var(--ink-2); font-weight: 600; line-height: 1.3; }
.cd-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.cd-join input { text-transform: uppercase; letter-spacing: 0.2em; text-align: center; }
/* lobby: partita privata e server delle regioni */
.lp-priv { background: var(--purple) !important; font-size: 17px; }
.lp-code { margin-left: auto; font: 400 26px var(--display); letter-spacing: 0.14em; padding: 2px 10px; border-radius: 10px; background: var(--surface); border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink); }
.lp-inv { display: flex; gap: 6px; margin-top: 10px; }
.lp-inv input { font: 600 12px var(--font); padding: 5px 9px; color: var(--ink-2); }
.lp-set { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lp-maps { display: flex; flex-wrap: wrap; gap: 5px; }
.lp-opt { border: 1.5px solid var(--ink); background: var(--surface); border-radius: 999px; padding: 3px 10px; font: 700 12px var(--font); box-shadow: 0 2px 0 var(--ink); }
.lp-opt.on { background: var(--gold); }
.lp-info { margin-top: 8px !important; }
.lp-go { margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 2px dashed var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: center; }
.lp-go.on { border: 2px solid var(--ink); background: var(--cream); }
.lp-go b { font: 400 17px var(--display); color: var(--red); }
.lp-start { width: 100%; margin-top: 10px; display: flex; flex-direction: column; align-items: center; }
.lp-need { color: var(--red) !important; }
.lp-scale { position: relative; height: 16px; margin-top: 4px; font-size: 10.5px; font-weight: 800; color: var(--muted); }
.lp-scale span { position: absolute; top: 0; white-space: nowrap; }
.lp-scale span:first-child { left: 0; }
.lp-scale span:nth-child(2) { transform: translateX(-50%); color: var(--red); }
.lp-scale span:last-child { right: 0; }
/* chat: emoji lanciate (tredicesima sessione: aprono la chat privata con chi le manda) */
.msg.emo .big-e { font-size: 20px; vertical-align: -3px; margin: 0 2px; }
/* piano di lancio 2C.2: la scheda Emotes (chi, da dove, quando) */
#chat-emo .msg.emo time { float: right; padding-left: 6px; font-size: 11px; font-weight: 700; color: var(--faint); white-space: nowrap; }
#chat-emo .emo-empty { list-style: none; padding: 10px 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: center; }
#hud.lobby:not(.hidden) ~ #toasts { bottom: calc(var(--lobby-h, 260px) + 26px); }
/* pulsante 🏆 in alto, con il numero dei nuovi */
#ach-top.on { background: linear-gradient(180deg, #ffe38d, var(--gold)); }
.ach-top-n { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff;
  border: 1.5px solid var(--ink); font: 700 10.5px/14px var(--font); font-style: normal; text-align: center; }
/* menù a tendina degli achievement (in partita) */
#ach-drop { position: fixed; top: 78px; right: 10px; z-index: 30; width: min(430px, calc(100vw - 20px)); max-height: calc(100vh - 96px); display: flex; flex-direction: column;
  padding: 12px 12px 10px; animation: pop 0.2s ease; }
#ach-drop .ach-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
#ach-drop .ach-body { overflow-y: auto; min-height: 0; flex: 1; }
.ach-modal .ach-body { max-height: min(56vh, 560px); overflow-y: auto; }
.ach-head { display: flex; align-items: center; gap: 10px; }
.ach-trophy { font-size: 30px; filter: drop-shadow(0 2px 0 var(--ink)); }
.ach-sum b { display: block; font: 400 25px/1 var(--display); }
.ach-sum b small { font-size: 15px; color: var(--muted); }
.ach-sum > small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.ach-tiers { margin-left: auto; display: flex; gap: 7px; font-size: 13px; font-weight: 800; }
.ach-x { border: 0; background: none; font-size: 16px; padding: 2px 4px; color: var(--muted); }
.ach-panel .meter.big { margin-top: 8px; }
.ach-guest { margin-top: 10px; padding: 8px 10px; border-radius: 11px; background: var(--cream); border: 2px solid var(--ink); font-size: 12.5px; line-height: 1.4; }
.ach-guest-btns { display: flex; gap: 6px; margin-top: 6px; }
.ach-ctl { display: flex; gap: 8px; align-items: center; margin: 10px 0 8px; flex-wrap: wrap; }
.ach-tabs { display: flex; gap: 4px; }
.ach-tab { border: 1.5px solid var(--ink); background: var(--surface); border-radius: 999px; padding: 3px 9px; font: 700 11.5px var(--font); box-shadow: 0 2px 0 var(--ink); }
.ach-tab.on { background: var(--ink); color: #ffd23f; }
.ach-q { flex: 1 1 140px; min-width: 0; padding: 5px 10px; border-radius: 999px; border: 1.5px solid var(--ink); font: 600 12px var(--font); outline: none; }
.ach-cat { margin-bottom: 6px; }
.ach-cat summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 5px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--line); }
.ach-cat summary::-webkit-details-marker { display: none; }
.ach-cat summary b { font: 400 15px var(--display); letter-spacing: 0.02em; }
.ach-cat[open] summary { background: var(--surface); border-color: var(--ink); }
.ac-n { margin-left: auto; font-size: 11.5px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-bar { width: 60px; height: 6px; border-radius: 3px; background: #e9e0c9; overflow: hidden; }
.ac-bar i { display: block; height: 100%; background: var(--green); }
.ach-list { display: flex; flex-direction: column; gap: 5px; padding: 6px 2px 2px; }
.ai { display: flex; align-items: center; gap: 10px; padding: 6px 9px 6px 6px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); }
.ai.done { border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.ai.locked .ab { filter: grayscale(0.85) opacity(0.7); }
.ai-main { flex: 1; min-width: 0; }
.ai-main b { display: block; font: 400 14.5px/1.15 var(--display); letter-spacing: 0.01em; }
.ai-main small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.ai-bar { display: inline-block; width: calc(100% - 90px); height: 6px; margin-top: 4px; border-radius: 3px; background: #ece3cc; overflow: hidden; vertical-align: middle; }
.ai-bar i { display: block; height: 100%; background: var(--gold); }
.ai-n { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--ink-2); margin-left: 6px; vertical-align: middle; }
.ai-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; min-width: 44px; }
.ai-side b { font: 400 15px var(--display); }
.ai-side small { font-size: 10px; color: var(--muted); font-weight: 700; }
.ai-ok { color: var(--green-d); }
.ach-empty { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; padding: 14px 0; }
/* medaglie: bronzo, argento, oro, platino */
.ab { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
.ab-e { font-size: 20px; line-height: 1; }
.ab .flag.lg { width: 25px; height: 16.7px; box-shadow: 0 0 0 1.5px var(--ink); }
.ab.tier-bronze { background: radial-gradient(circle at 35% 30%, #f3c18f, #c77b3c 70%); }
.ab.tier-silver { background: radial-gradient(circle at 35% 30%, #ffffff, #aeb8c6 70%); }
.ab.tier-gold { background: radial-gradient(circle at 35% 30%, #fff1a8, #e3a21a 70%); }
.ab.tier-platinum { background: radial-gradient(circle at 35% 30%, #ffffff, #8fd8ee 55%, #b58cf0 100%); }
/* popup "achievement sbloccato": in alto al centro, non si clicca e se ne va da solo */
#ach-pop { position: fixed; top: 82px; left: 12px; right: 12px; display: flex; flex-direction: column; align-items: center; z-index: 65; pointer-events: none; }
.ach-pop { position: relative; display: flex; align-items: center; gap: 12px; min-width: 300px; max-width: min(460px, calc(100vw - 24px)); padding: 9px 14px 9px 10px;
  border-radius: 16px; overflow: hidden; background: var(--paper-tex), linear-gradient(180deg, #fffdf5, var(--paper-2)); border: 2.5px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink), 0 14px 30px rgba(10, 16, 32, 0.35); animation: achin 0.55s cubic-bezier(0.2, 1.5, 0.4, 1); }
.ach-pop.out { animation: achout 0.45s ease forwards; }
.ach-pop .ap-badge { width: 50px; height: 50px; }
.ach-pop .ap-badge .ab-e { font-size: 26px; }
.ach-pop .ap-badge .flag.xl { width: 32px; height: 21px; box-shadow: 0 0 0 2px var(--ink); }
.ap-text { flex: 1; min-width: 0; }
.ap-text small { display: block; font: 800 10px var(--font); letter-spacing: 0.08em; color: var(--gold-d); }
.ap-text b { display: block; font: 400 20px/1.1 var(--display); letter-spacing: 0.01em; }
.ap-text span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.3; }
.ap-text em { font-style: normal; color: var(--ink); font-weight: 800; }
.ap-count { font: 400 13px var(--display); color: var(--muted); align-self: flex-start; }
.ap-shine { position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  animation: achshine 1.1s 0.35s ease-out; }
.ach-pop.tier-gold { box-shadow: 0 5px 0 var(--ink), 0 0 0 4px rgba(244, 181, 52, 0.55), 0 14px 30px rgba(10, 16, 32, 0.35); }
.ach-pop.tier-platinum { box-shadow: 0 5px 0 var(--ink), 0 0 0 4px rgba(143, 216, 238, 0.7), 0 14px 30px rgba(10, 16, 32, 0.35); }
.ach-pop.tier-platinum .ap-text small { color: #6a4bc4; }
.ach-pop.hint { opacity: 0.95; }
.ach-pop.hint .ap-text small { color: var(--muted); }
@keyframes achin { from { transform: translateY(-30px) scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes achout { to { transform: translateY(-20px); opacity: 0; } }
@keyframes achshine { from { left: -80px; } to { left: 110%; } }
@media (max-width: 760px) {
  #ach-drop { top: auto; bottom: calc(var(--cmd-h, 100px) + 14px); max-height: 62vh; }
  #ach-pop { top: 118px; }
  .ach-pop { min-width: 0; }
  .ap-text b { font-size: 17px; }
  .cd-maps { grid-template-columns: repeat(2, 1fr); }
  .cd-modes, .acc-actions { grid-template-columns: 1fr; }
  .land-actions { flex-direction: column; }
  #lobby-panel .lp-set { max-height: 110px; overflow-y: auto; }
}

/* ---------------- tutorial a slide (diciassettesima sessione, tutorial.js) ----------------
   la scena è il gioco vero (un secondo Renderer su una tela piccola); sopra, copie dei pannelli del gioco con le stesse
   classi, rimpicciolite. Un titolo e una frase per slide: niente muri di testo. */
#tut { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(16, 24, 44, 0.55); }
.tu-card { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 14px 18px 12px; border-radius: 22px; border-width: 3px;
  text-align: center; box-shadow: 0 6px 0 var(--ink), 0 26px 60px rgba(10, 16, 32, 0.45); animation: pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
  user-select: none; touch-action: pan-y; }
.tu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; min-height: 22px; }
.tu-step { font: 400 15px var(--display); color: var(--muted); letter-spacing: 0.05em; }
.tu-skip { background: none; border: 0; padding: 2px 4px; font: 700 12.5px var(--font); color: var(--muted); text-decoration: underline; }
.tu-skip:hover { color: var(--red); }
.tu-stage { position: relative; aspect-ratio: 16 / 10; border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 0 3px 0 var(--ink);
  background: #6fa9d0; text-align: left; }
.tu-stage.tu-in { animation: tu-in 0.3s ease-out; }
.tu-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tu-stage.still canvas, .tu-stage.still .tu-ovl, .tu-stage.still .tu-cur, .tu-stage.still .tu-rip { display: none; }
.tu-still { display: none; position: absolute; inset: 0; }
.tu-stage.still .tu-still { display: block; }
.tu-wait { display: none; position: absolute; inset: 0; place-items: center; font: 400 16px var(--display); color: #fff; text-shadow: 0 2px 0 var(--ink); }
.tu-stage.loading .tu-wait { display: grid; }
.tu-ovl { position: absolute; inset: 0; pointer-events: none; }
.tu-o { position: absolute; opacity: 0; transition: opacity 0.18s; }
.tu-o.on { opacity: 1; }
.tu-o button.pressed { transform: translateY(3px); box-shadow: 0 0.5px 0 var(--ink); }
/* puntatore finto e cerchio del clic */
.tu-cur { position: absolute; left: 0; top: 0; width: 17px; height: 23px; margin: -1px 0 0 -1px; opacity: 0; pointer-events: none; z-index: 3;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.35)); }
.tu-cur.on { opacity: 1; }
.tu-rip { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; opacity: 0; pointer-events: none; z-index: 2;
  box-shadow: 0 0 0 1.5px var(--ink); }
/* copie dei pannelli del gioco, più piccole */
.tu-mb { left: 8px; bottom: 8px; display: flex; align-items: center; gap: 8px; padding: 6px 12px 7px 7px; width: 200px; border: 2.5px solid var(--gold-d);
  border-radius: 12px; background: var(--paper-tex), linear-gradient(180deg, #fff8df, #f4dd9a); box-shadow: 0 3px 0 var(--ink); }
.tu-mb .mb-ic { width: 30px; height: 30px; font-size: 16px; }
.tu-mb .mb-t b { font-size: 14px; }
.tu-mb .mb-t small { font-size: 10px; }
.tu-ctx { left: 0; top: 0; width: 186px; padding: 8px; border-radius: 13px; }
.tu-ctx .ctx-head { gap: 8px; padding: 0 2px 7px; }
.tu-ctx .ctx-head b { font-size: 15px; }
.tu-ctx .ctx-items { gap: 4px; }
.tu-ctx .ci { padding: 4px 7px; font-size: 12.5px; gap: 7px; box-shadow: 0 2px 0 var(--ink); }
.tu-ctx .ci-i { width: 18px; font-size: 13px; }
.tu-ban { left: 50%; top: 14px; transform: translateX(-50%); padding: 8px 22px 10px; border-radius: 14px; border: 2.5px solid var(--ink); text-align: center;
  background: var(--paper-tex), linear-gradient(180deg, #f2664b, #b82e1c); color: #fff; box-shadow: 0 4px 0 var(--ink); white-space: nowrap; }
.tu-ban.win { background: var(--paper-tex), linear-gradient(180deg, #ffd766, var(--gold)); color: var(--ink); top: 34%; }
.tu-ban .bn-title { font-size: 30px; margin-top: 4px; }
.tu-ban.win .bn-title { margin-top: 0; }
.tu-ban .bn-sub { font-size: 12px; margin-top: 2px; }
.tu-ban .bn-x { font-size: 22px; }
.tu-ban.on { animation: tu-ban 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.tu-red { inset: 0; box-shadow: inset 0 0 50px 14px rgba(255, 25, 40, 0.7), inset 0 0 12px 4px rgba(255, 60, 60, 0.9); }
.tu-red.on { animation: tu-red 1s ease-in-out infinite alternate; }
.tu-alert { right: 8px; bottom: 8px; width: 205px; padding: 6px 9px; gap: 8px; border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink);
  animation: none; cursor: default; }
.tu-alert .al-body b { font-size: 13px; }
.tu-alert .al-body small { font-size: 11px; font-weight: 700; }
.tu-pop { left: 0; top: 0; margin-left: -60px; width: 120px; text-align: center; font: 400 14px var(--display); color: #fff; letter-spacing: 0.02em;
  text-shadow: 0 2px 0 var(--ink), 0 0 3px var(--ink); white-space: nowrap; }
.tu-pop.good { font-size: 16px; color: #b8f59a; }
.tu-pop.plus { font-size: 20px; color: #9df07a; }
.tu-pop.ally { left: 50%; top: 14px; margin-left: 0; width: auto; transform: translateX(-50%); padding: 5px 12px; border-radius: 10px; font-size: 14px;
  text-shadow: none; color: #fff; background: linear-gradient(180deg, #6fb3ff, var(--blue)); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.tu-res { left: 50%; top: 8px; transform: translateX(-50%); display: flex; width: 250px; padding: 4px 6px; border-radius: 12px; }
.tu-res .stat .chipi { width: 26px; height: 26px; }
.tu-res .stat .chipi .ic { width: 15px; height: 15px; }
.tu-res .stat b { font-size: 17px; }
.tu-cardr { right: 8px; bottom: 8px; width: 168px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 13px; }
.tu-cardr .tu-cn { font: 400 16px var(--display); color: var(--ink); }
.tu-cardr .btn.act { font-size: 13px; padding: 5px 8px; box-shadow: 0 2.5px 0 var(--ink); }
.tu-prop { left: 50%; top: 12px; transform: translateX(-50%); min-width: 0; width: 290px; padding: 9px 11px; }
.tu-prop .title { font-size: 14px; gap: 8px; }
.tu-prop .row { margin-top: 8px; }
.tu-prop .btn { font-size: 13px; padding: 5px 8px; }
/* testi e navigazione */
#tut h2 { margin: 13px 0 4px; font: 400 30px/1.1 var(--display); color: var(--ink); }
#tut p { margin: 0 auto; max-width: 440px; min-height: 2.8em; font-size: 16px; line-height: 1.4; font-weight: 500; color: var(--ink-2); }
#tut p b { color: var(--red-d); }
#tut p .mm-target { vertical-align: -1px; }
.tu-dots { display: flex; justify-content: center; gap: 6px; margin: 11px 0; }
.tu-dots button { width: 10px; height: 10px; padding: 0; border-radius: 5px; border: 1.5px solid var(--ink); background: var(--paper-3); transition: width 0.2s; }
.tu-dots button.on { width: 24px; background: var(--red); }
.tu-nav { display: flex; gap: 10px; }
.tu-nav .tu-back { flex: 0 0 auto; padding-left: 18px; padding-right: 18px; }
.tu-nav .tu-next { font-size: 18px; }
.tu-nav .tu-go { background: linear-gradient(180deg, #ff7a5c, var(--red)); color: #fff; letter-spacing: 0.06em; text-shadow: 0 1.5px 0 var(--red-d); }
.tu-rules { margin-top: 9px; font-size: 12px; }
/* ultima slide: i comandi */
.tu-mouse { height: 100%; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; background: var(--paper-tex), var(--paper-2); }
.tu-msvg { width: 22%; max-width: 120px; flex: none; filter: drop-shadow(0 4px 0 var(--ink)); }
.tu-mcol { flex: 1; display: flex; flex-direction: column; gap: 12px; max-width: 170px; }
.tu-mk { padding: 7px 10px; border: 2px solid var(--ink); border-radius: 11px; background: var(--surface); box-shadow: 0 3px 0 var(--ink); line-height: 1.15; }
.tu-mk b { display: block; font: 400 16px var(--display); color: var(--ink); }
.tu-mk small { font-size: 12px; font-weight: 600; color: var(--muted); }
.tu-mk.l { border-left: 7px solid #f4b534; text-align: right; }
.tu-mk.r { border-right: 7px solid #ff8a6e; }
.tu-mk.w { border-right: 7px solid var(--blue); }
.tu-keys { height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; background: var(--paper-tex), var(--paper-2); }
.tu-key { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: var(--surface); border: 2px solid var(--ink);
  border-radius: 12px; box-shadow: 0 3px 0 var(--ink); text-align: center; }
.tu-key span { font-size: 28px; line-height: 1; }
.tu-key b { font: 400 16px var(--display); color: var(--ink); }
.tu-key small { font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1.25; padding: 0 4px; }
@media (max-width: 480px) {
  .tu-card { padding: 12px 12px 10px; }
  .tu-stage { aspect-ratio: 4 / 3; }
  #tut h2 { font-size: 25px; margin-top: 11px; }
  #tut p { font-size: 14.5px; }
  .tu-mb { width: 170px; }
  .tu-alert { width: 168px; }
  .tu-alert .al-body b { font-size: 12px; }
  .tu-mouse { gap: 8px; padding: 8px; }
  .tu-mk { padding: 5px 7px; }
  .tu-mk b { font-size: 13px; }
  .tu-mk small { font-size: 10px; }
}
@keyframes tu-in { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes tu-ban { from { transform: translateX(-50%) scale(0.6) rotate(-4deg); } to { transform: translateX(-50%) scale(1); } }
@keyframes tu-red { from { opacity: 0.55; } to { opacity: 1; } }

/* ------------------------------------------------------------------ diciottesima sessione: livelli, ranked, Elo */
/* pulsante RANKED nel menù (sotto la Partita rapida): blu notte e oro, "da torneo"; bloccato = grigio col lucchetto */
.btn-ranked { width: 100%; margin-top: 10px; padding: 9px 12px 9px 10px; border: 3px solid var(--ink); border-radius: 16px; display: flex; align-items: center; gap: 11px;
  background: linear-gradient(180deg, #3d4f86, #26325a); color: #fff; text-align: left; box-shadow: 0 5px 0 var(--ink), 0 12px 22px rgba(10, 16, 32, 0.28);
  transition: transform 0.07s, box-shadow 0.07s, filter 0.15s; cursor: pointer; }
.btn-ranked:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-ranked:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn-ranked.locked { background: linear-gradient(180deg, #8b8f9c, #6b707e); }
.rk-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: radial-gradient(circle at 35% 30%, #fff1a8, #e3a21a 70%);
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.btn-ranked.locked .rk-ic { filter: grayscale(0.8); }
.rk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-title { font: 400 24px/1 var(--display); letter-spacing: 0.08em; color: #ffd766; text-shadow: 0 2px 0 var(--ink); }
.btn-ranked.locked .rk-title { color: #eef0f5; }
.rk-main small { font-size: 11.5px; font-weight: 600; opacity: 0.9; line-height: 1.3; }
.rk-side { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.rk-side b { font: 400 20px/1.1 var(--display); }
.rk-side small { font-size: 10.5px; font-weight: 700; opacity: 0.85; }
.rk-xp { display: block; width: 62px; height: 7px; margin: 3px 0 1px; border-radius: 4px; background: rgba(255, 255, 255, 0.3); border: 1.5px solid var(--ink); overflow: hidden; }
.rk-xp i { display: block; height: 100%; background: var(--gold); }
/* livello sull'avatar e barra dell'esperienza nella scheda dell'account */
.acct-av { position: relative; flex: none; }
.acct-lv { position: absolute; right: -6px; bottom: -5px; min-width: 21px; height: 21px; padding: 0 4px; border-radius: 11px; display: grid; place-items: center;
  font: 400 12px var(--display); font-style: normal; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); }
.acct-xp { display: block; height: 6px; margin: 3px 0 2px; border-radius: 3px; background: var(--paper-2); border: 1.5px solid var(--ink); overflow: hidden; }
.acct-xp i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ffd766); }
/* livello ed Elo accanto ai nomi (classifica) */
.lv-tag, .elo-tag { font-style: normal; font-weight: 800; color: var(--blue-d); }
.elo-tag { color: var(--gold-d); }
.ws-tag { font-style: normal; font-weight: 800; color: var(--red-d, #a3302b); }
.ws-note { font-size: 12px; color: var(--ink-2); margin: 6px 0 0; }
.lp-rank { background: var(--gold) !important; font-size: 17px; }
/* finestre: come funziona la ranked, classifica Elo */
.rank-dlg p, .ladder-dlg p { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.rank-rules { display: flex; flex-direction: column; gap: 5px; margin: 10px 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 2px solid var(--ink);
  font-size: 13px; font-weight: 600; }
.rank-rules b:first-child { font: 400 16px var(--display); }
.ladder-you { text-align: center; }
.ladder-scroll { max-height: min(46vh, 420px); overflow: auto; margin: 10px 0; border-radius: 12px; border: 2px solid var(--ink); background: var(--surface); }
.ladder { width: 100%; border-collapse: collapse; font-size: 13px; }
.ladder th { position: sticky; top: 0; background: var(--paper-2); font: 800 10px var(--font); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
  padding: 6px 8px; text-align: left; }
.ladder td { padding: 5px 8px; border-top: 1px solid var(--line); font-weight: 600; }
.ladder td.lp { width: 34px; text-align: center; font: 400 15px var(--display); }
.ladder td.lf { width: 30px; }
.ladder td.ln small { color: var(--muted); font-weight: 600; }
.ladder td.le { font: 400 15px var(--display); font-variant-numeric: tabular-nums; }
.ladder td.ld { font: 400 15px var(--display); text-align: right; }
.ladder tr.ld-me td { background: var(--cream); }   /* non ".me": è già il riquadro in alto (display: flex) */
.ladder tr.gap td { text-align: center; color: var(--muted); padding: 0; }
.ld.up, .re-delta.up { color: var(--good); }
.ld.down { color: var(--bad); }
/* riepilogo di fine partita: posto ed Elo (ranked), XP con le voci, livello */
.res-box { margin: 12px 0; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); text-align: left; }
.res-box.wait { text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; }
.res-elo { display: flex; align-items: center; justify-content: space-around; gap: 8px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 2px dashed var(--line); }
.res-elo > span { display: flex; flex-direction: column; align-items: center; font: 400 28px/1 var(--display); }
.res-elo small { font: 700 10.5px var(--font); color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 3px; }
.res-elo.up .re-delta { color: var(--good); }
.res-elo.down .re-delta { color: var(--bad); }
.res-xp { text-align: center; font: 400 22px var(--display); color: var(--gold-d); text-shadow: 0 1px 0 var(--ink); }
.res-parts { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.res-parts li { display: flex; justify-content: space-between; gap: 10px; }
.res-parts b { color: var(--gold-d); }
.res-lvl { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.res-lvl .rk-xp { width: 90px; background: var(--paper-2); }
.res-lvl small { color: var(--muted); font-weight: 700; }
.res-lvl.guest { color: var(--muted); text-align: center; }
.res-up { color: var(--good); font: 400 16px var(--display); letter-spacing: 0.05em; }
.res-unlock { flex-basis: 100%; text-align: center; font: 400 16px var(--display); color: var(--blue-d); }
.defeat .res-box { margin-bottom: 0; }
.ranked-end h2 { margin-top: 6px; }
/* achievement leggendario: la missione segreta in Partita rapida */
.ab.tier-legendary { background: radial-gradient(circle at 35% 30%, #fffbe0, #ffcf3a 45%, #e0562b 100%); box-shadow: 0 2px 0 var(--ink), 0 0 0 3px rgba(255, 207, 58, 0.6); }
.ach-pop.tier-legendary { box-shadow: 0 5px 0 var(--ink), 0 0 0 5px rgba(255, 150, 40, 0.75), 0 14px 30px rgba(10, 16, 32, 0.35); }
.ach-pop.tier-legendary .ap-text small { color: #c2410c; }
@media (max-width: 480px) {
  .rk-title { font-size: 20px; }
  .rk-main small { font-size: 10.5px; }
  .res-elo > span { font-size: 22px; }
}
.acct-main small b { display: inline; font: 800 11.5px var(--font); color: var(--gold-d); }
.defeat.good { background: #e3f3d6; }
.defeat.good p { color: var(--green-d); }
@media (max-width: 480px) {
  .acct { gap: 8px; }
  .acct-ach small { display: none; }
  .acct-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ------------------------------------------------------------------ menù iniziale a tre colonne (diciannovesima sessione)
   sinistra: account, collezione, negozio · centro: si gioca · destra: Elo ladder, achievement, codice del creatore */
.land-grid { display: grid; grid-template-columns: 290px minmax(0, 480px) 290px; gap: 22px; align-items: start; justify-content: center; width: 100%; margin: auto; }
.land-grid .landing-card { width: 100%; margin: 0; }
/* schermi grandi: --land-z lo calcola setupLandingScale in ui.js (1 fino a 2048 px) */
.land-grid { zoom: var(--land-z, 1); }
/* anche le finestre aperte dal menù (login, achievement, regole); in partita restano come prima */
#landing:not(.hidden) ~ #modal .modal { zoom: var(--land-z, 1); max-height: calc((100vh - 32px) / var(--land-z, 1)); }
.land-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side-card { position: relative; padding: 14px; border-radius: 20px; border-width: 3px; box-shadow: 0 5px 0 var(--ink), 0 18px 36px rgba(10, 16, 32, 0.35); }
.side-label { display: block; margin: 0 0 6px 2px; font: 800 10.5px var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
/* scheda dell'account: dentro la carta niente secondo riquadro */
.side-card .acct { padding: 0; background: none; border: 0; box-shadow: none; gap: 12px; align-items: center; }
.side-card .acct-main b { font-size: 22px; }
.side-card .acct-xp { height: 8px; margin: 5px 0 4px; }
.acct-main small { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.acct-main small b { color: var(--gold-d); }
.side-card .acct-menu { align-self: flex-start; }
.side-card .avatar.lg { width: 52px; height: 52px; font-size: 25px; }
.side-card #name { padding: 10px 12px; font-size: 19px; }
.side-card .auth-row { flex-direction: column; align-items: stretch; gap: 9px; margin-top: 12px; }
.side-card .auth-note { flex: none; text-align: left; }
.side-card .acct + .auth-row { flex-direction: row; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 2px dashed var(--line); }
.side-card .acct + .auth-row .auth-note { flex: 1; font-size: 11.5px; }
.prov-mini-row { display: flex; flex-direction: column; gap: 7px; }
.prov-mini { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 6px 10px; border-radius: 12px; border: 2.5px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink); background: var(--surface); color: var(--ink); font: 400 15px var(--display); letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, filter 0.12s; }
.prov-mini .prov-ic { width: 26px; height: 26px; font-size: 15px; flex: none; }
.prov-mini:hover:not(.off) { transform: translateY(-1px); filter: brightness(1.04); }
.prov-mini:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.prov-mini.off { opacity: 0.6; }
/* riquadri: icona a sinistra, titolo e riga sotto, valore o freccia a destra (tutti allineati alla stessa maniera) */
.tile { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 2.5px solid var(--ink);
  box-shadow: 0 4px 0 var(--ink), 0 10px 20px rgba(10, 16, 32, 0.2); text-align: left; color: var(--ink); }
.tile-btn { cursor: pointer; transition: transform 0.08s, box-shadow 0.08s, background 0.12s; }
.tile-btn:hover { background: var(--cream); transform: translateY(-1px); }
.tile-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.tile-ic { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; line-height: 1; background: var(--paper-2); border: 2px solid var(--ink); }
.tile-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile-t b { font: 400 18px/1.1 var(--display); letter-spacing: 0.02em; }
.tile-t small { font: 600 11.5px/1.3 var(--font); color: var(--muted); }
.tile-go { flex: none; font: 400 28px/1 var(--display); color: var(--ink-2); padding-bottom: 3px; }
.tile-val { flex: none; min-width: 52px; text-align: center; padding: 3px 9px; border-radius: 10px; border: 2px solid var(--ink); background: linear-gradient(180deg, #ffe38d, var(--gold));
  font: 400 12px var(--display); color: var(--ink-2); }
.tile-val b { font: 400 18px var(--display); color: var(--ink); }
.tile-val:empty { display: none; }
.tile-btn#custom-btn { margin-top: 14px; }
.tile-tag { flex: none; padding: 2px 9px; border-radius: 8px; border: 2px solid var(--ink); background: var(--paper-3); font: 400 12px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.soon { cursor: not-allowed; filter: grayscale(0.45); opacity: 0.72; }
.soon input, .soon button { cursor: not-allowed; }
.creator { padding: 12px; }
.creator .tile-tag { position: absolute; top: 10px; right: 10px; }
.creator-head { display: flex; align-items: center; gap: 12px; }
.creator-head .tile-t { padding-right: 46px; }
.creator-row { display: flex; gap: 7px; margin-top: 11px; }
.creator-row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 11px; border: 2.5px solid var(--ink); background: var(--surface); font: 400 16px var(--display); letter-spacing: 0.06em; text-align: center; }
.creator-row .btn { flex: none; }
/* titolo dei server: il titolo sopra, la regola sotto (prima le due cose finivano a capo una accanto all'altra) */
.section-title { flex-direction: column; align-items: flex-start; gap: 3px; margin: 20px 0 10px; }
.section-title small { line-height: 1.35; }
/* schermi più stretti: una colonna sola, prima l'account, poi il gioco, poi il resto */
@media (max-width: 1160px) {
  .land-grid { display: flex; flex-direction: column; align-items: stretch; width: min(480px, 100%); gap: 14px; }
  .land-side { display: contents; }
  .land-side > * { order: 2; }
  .land-side > #acct-panel { order: 0; }
  .land-grid > .landing-card { order: 1; }
  .side-card, .land-side > .tile { box-shadow: 0 4px 0 var(--ink), 0 10px 20px rgba(10, 16, 32, 0.25); }
}
/* giro sul telefono (2 ottobre 2026): sul telefono la prima cosa che si vede è QUICK PLAY, poi nome e login (prima il
   riquadro dell'account spingeva il pulsante a metà schermo) */
@media (max-width: 640px) {
  .land-grid > .landing-card { order: 0; }
  .land-side > #acct-panel { order: 1; }
}
@media (max-width: 480px) {
  .prov-mini-row { flex-direction: row; flex-wrap: wrap; }
  .prov-mini { flex: 1 1 30%; justify-content: center; padding: 6px 4px; font-size: 13px; gap: 6px; }
  .tile-t small { font-size: 11px; }
}
.side-card .acct-main small b { display: inline; font: 800 11.5px var(--font); color: var(--gold-d); white-space: nowrap; }
/* rifiniture dell'HUD in partita: le schede della chat e il biglietto della missione non tagliano più il testo */
#chatbox .tabs button { display: flex; align-items: center; justify-content: center; gap: 3px; padding: 5px 2px 4px; font-size: 12.5px; letter-spacing: 0; min-width: 0; }
.mb-t small { overflow: hidden; text-overflow: ellipsis; }

/* diciannovesima sessione: schede della chat a 1024 px (in fondo per vincere sulle regole precedenti) */
@media (max-width: 1200px) {
  #chatbox .tabs button { padding: 2px 2px; font-size: 10px; gap: 1px; }
  #chatbox .tabs button .tl { letter-spacing: -0.02em; }
}

/* piano di lancio 2G.2: "Report a bug" */
.bug-dlg p { margin: 4px 0 10px; color: var(--muted); font-weight: 600; font-size: 13px; line-height: 1.45; }
.bug-dlg textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--surface);
  color: var(--text); font: 600 14px var(--font); resize: vertical; margin-bottom: 10px; }
.help h2 .bug-link { float: right; font-size: 12.5px; margin-top: 6px; }
.tu-links { display: flex; justify-content: center; gap: 16px; }
.bug-land { display: block; margin: 4px auto 0; font-size: 12px; opacity: 0.85; }
.version { display: block; text-align: center; margin-top: 2px; color: var(--faint); font: 700 10.5px var(--font); letter-spacing: 0.04em; }

/* piano di lancio 2D.1: il ping di una città nella chat e la finestra "Send to…" */
.ping-chip { display: inline-flex; align-items: center; gap: 3px; margin: 0 4px 0 2px; padding: 1px 7px; border: 1.5px solid var(--ink);
  border-radius: 999px; background: var(--gold); color: var(--ink); font: 800 11.5px var(--font); cursor: pointer; vertical-align: 1px; }
.ping-chip:hover { background: #ffd766; transform: translateY(-1px); }
.btn.ping-btn { font-size: 12.5px; }
.ping-dlg h2 { margin: 6px 0 4px; }
.ping-dlg p { margin: 0 0 10px; color: var(--muted); font-weight: 600; font-size: 13px; }
.pd-to { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; margin-bottom: 10px; }
.pd-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 2px solid var(--ink); border-radius: 12px;
  background: var(--surface); color: var(--text); font: 700 13px var(--font); text-align: left; cursor: pointer; }
.pd-opt small { color: var(--muted); font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pd-opt.on { background: var(--blue); color: #fff; }
.pd-opt.on small { color: #e8f0ff; }
.pd-opt:disabled { opacity: 0.5; cursor: default; }

/* piano di lancio 2C.2: con la scheda Emotes le schede della chat sono 5 e le etichette non ci stanno più: l'etichetta
   resta solo sulla scheda aperta (che si allarga), le altre mostrano l'icona (il nome è nel fumetto) */
#chatbox .tabs button { flex: 1 1 0; }
#chatbox .tabs button.on { flex: 2.6 1 0; }
#chatbox .tabs button:not(.on) .tl { display: none; }
#chatbox .tabs button:not(.on) { font-size: 15px; line-height: 1; }

/* piano di lancio 2I e 3.1: negozio e collezione "Coming soon!", donazioni, server delle regioni nascosti */
.regions-box { display: contents; }
.regions-box.hidden { display: none; }
.tile-tag.soon-tag { background: linear-gradient(180deg, #ffe38d, var(--gold)); color: var(--ink); letter-spacing: 0.04em; text-transform: none; }
/* Collection e Shop (2 ottobre 2026, l'utente: "coming soon tutto decentrato"): l'etichetta è un adesivo sull'angolo in alto
   a destra, uguale nei due riquadri; il testo sotto il titolo resta su tutta la larghezza */
#coll-btn .soon-tag, #shop-btn .soon-tag { position: absolute; top: -11px; right: 14px; transform: rotate(3deg); font-size: 11.5px; padding: 1px 8px;
  box-shadow: 0 2px 0 var(--ink); pointer-events: none; }
a.tile { color: inherit; text-decoration: none; }
.tile.donate .tile-ic { background: #fff1d6; }
/* piano di lancio 5.1: segnalare, bloccare, regole della community */
.land-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.land-links .bug-land { margin: 4px 0 0; }
.help h2 .bug-link + .bug-link { margin-right: 12px; }
.report-dlg h2 small { font: 600 13px var(--font); color: var(--muted); }
.rp-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 10px 0; }
.rp-r { display: flex; align-items: center; gap: 7px; font: 600 13px var(--font); cursor: pointer; }
.report-dlg .rd-msg { width: 100%; margin: 4px 0 10px; }
.report-dlg .row.col { flex-direction: column; align-items: stretch; }
.msg b[data-who] { cursor: pointer; }
.msg b[data-who]:hover { text-decoration: underline; }
.rules ul { padding-left: 18px; }
@media (max-width: 560px) { .rp-reasons { grid-template-columns: 1fr; } }
/* piano di lancio 5.2: categorie della finestra di supporto */
.bug-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.bug-cat input { position: absolute; opacity: 0; pointer-events: none; }
.bug-cat span { display: inline-block; padding: 5px 11px; border-radius: 999px; border: 2px solid var(--ink); background: var(--surface); font: 600 13px var(--font); cursor: pointer; }
.bug-cat input:checked + span { background: linear-gradient(180deg, #ffe38d, var(--gold)); }
.bug-cat input:focus-visible + span { outline: 2px solid var(--blue, #2f6fb3); outline-offset: 2px; }
.bug-dlg .rd-msg { width: 100%; margin-top: 8px; }

/* Al caricamento (classe "booting" su <html>, tolta da main.js quando sono arrivati account e stanze) menù e mappa restano
   invisibili e poi compaiono insieme: prima si vedeva il menù vuoto che "saltava" quando arrivavano i dati */
#landing > *, #map { transition: opacity .28s ease-out; }
.booting #landing > *, .booting #map { opacity: 0; }
@media (prefers-reduced-motion: reduce) { #landing > *, #map { transition: none; } }

/* Piano di lancio 5.3: privacy, termini e età minima (link sotto il menù, casella nella registrazione, nota sotto i login) */
.land-legal { text-align: center; margin-top: 3px; font: 600 11px var(--font); color: var(--faint); }
.land-legal a, .legal-note a, .pw-age a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal-note { display: block; margin-top: 6px; font-size: 11px; line-height: 1.35; opacity: 0.8; text-align: center; }
.pw-age { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 12.5px; line-height: 1.35; cursor: pointer; }
.pw-age input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red, #c8412b); }
