/* Silk & Steel · schermata di campagna (stile Three Kingdoms: mappa dipinta, pannelli a macchia d'inchiostro) */
:root {
  --inchiostro: rgba(9, 8, 7, .93);
  --oro: #c9a45a;
  --oro-chiaro: #e8cf94;
  --testo: #efe6d2;
  --testo-2: #a99f8c;
  --f-titolo: "Shippori Mincho", "Yu Mincho", Georgia, serif;
  --f-testo: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif;
  --f-pennello: "Yuji Syuku", "Shippori Mincho", serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: #b9c3c3; color: var(--testo); font: 13px/1.4 var(--f-testo); user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- mappa */
.vista { position: fixed; inset: 0; overflow: hidden; cursor: grab; touch-action: none; background: #c5cfcf; }
.vista.trascina { cursor: grabbing; }
.piano { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.piano > img, .piano > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.piano .tinta { mix-blend-mode: multiply; opacity: .9; }
.piano .confini { opacity: .85; }
.piano .luce { mix-blend-mode: screen; }
.segni { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.segno { position: absolute; transform: translate(-50%, -50%) scale(var(--s, 1)); transform-origin: 50% 50%; pointer-events: auto; }
.segno.alto { transform: translate(-50%, -100%) scale(var(--s, 1)); transform-origin: 50% 100%; }
.segno.armata-segno { z-index: 5; }

/* segnalini neri (villaggi e risorse), come nella mappa di Three Kingdoms */
.icona { width: 22px; height: 22px; display: grid; place-items: center; background: #121110; border: 1px solid rgba(255, 255, 255, .55); box-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .6); cursor: pointer; transition: transform .15s; }
.icona svg { width: 16px; height: 16px; fill: #f3eee2; }
.icona.villaggio { width: 26px; height: 26px; }
.icona.villaggio svg { width: 20px; height: 20px; }
.icona.posseduta { border-color: var(--fz); box-shadow: 0 0 0 1px #000, 0 0 0 3px color-mix(in srgb, var(--fz) 80%, transparent), 0 1px 4px rgba(0, 0, 0, .6); }
.icona:hover { transform: scale(1.15); }

/* ---------------------------------------------------------------- targa della città (insediamento + nome) */
.citta { display: grid; justify-items: center; cursor: pointer; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.citta > img { width: var(--w, 150px); height: auto; display: block; margin-bottom: -10px; position: relative; z-index: 0; }
.targa { position: relative; z-index: 1; display: flex; align-items: stretch; min-height: 32px; background: linear-gradient(180deg, rgba(22, 19, 16, .95), rgba(8, 7, 6, .95)); border-top: 1px solid rgba(232, 207, 148, .55); border-bottom: 1px solid rgba(232, 207, 148, .35); box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 3px 10px rgba(0, 0, 0, .45); white-space: nowrap; }
.targa .stendardo { position: relative; width: 25px; margin: -7px 0 -9px 7px; display: grid; place-items: start center; padding-top: 7px; background: linear-gradient(180deg, color-mix(in srgb, var(--fz) 95%, #fff 5%), color-mix(in srgb, var(--fz) 70%, #000)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.targa .stendardo b { font: 400 14px/1 var(--f-pennello); color: #fff6e2; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.targa .nome { display: grid; align-content: center; padding: 3px 10px 4px 8px; }
.targa .nome b { font: 700 13px/1.05 var(--f-titolo); letter-spacing: .09em; text-transform: uppercase; color: var(--testo); }
.targa .nome small { font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--testo-2); margin-top: 2px; }
.targa .pop { display: flex; align-items: center; gap: 4px; padding: 0 7px; border-left: 1px solid rgba(255, 255, 255, .08); font: 700 11px/1 var(--f-testo); color: #cfe0b4; }
.targa .pop svg { width: 14px; height: 14px; fill: #8fbf5a; }
.targa .edificio { width: 28px; display: grid; place-items: center; background: linear-gradient(180deg, #4f8c3b, #2e5e22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.targa .edificio svg { width: 16px; height: 16px; fill: #eaf6dc; }
.targa .livello { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); padding: 0 6px; font-size: 8px; letter-spacing: .3em; color: var(--oro-chiaro); background: #0b0a09; border: 1px solid rgba(232, 207, 148, .4); line-height: 11px; }
.citta.neutrale .targa .edificio { background: linear-gradient(180deg, #6a6a68, #3e3e3c); }
.citta.piccola .targa { min-height: 26px; }
.citta.piccola .targa .nome b { font-size: 11px; }
.citta.piccola .targa .stendardo { width: 20px; margin-top: -5px; margin-bottom: -7px; }
.citta.piccola .targa .stendardo b { font-size: 12px; }
.citta.piccola .targa .nome small { font-size: 7.5px; }
.citta.piccola .targa .pop { font-size: 10px; }
.citta.piccola .targa .edificio { width: 23px; }

/* generale sulla mappa: miniatura + bandierina con la forza */
.esercito { display: grid; justify-items: center; cursor: pointer; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .4)); }
.esercito img { width: var(--w, 74px); height: auto; display: block; }
.esercito .forza { margin-top: -4px; display: flex; align-items: center; gap: 5px; padding: 2px 7px 2px 3px; background: rgba(9, 8, 7, .92); border: 1px solid rgba(232, 207, 148, .45); font: 700 11px/1 var(--f-testo); white-space: nowrap; }
.esercito .forza i { width: 22px; height: 22px; border-radius: 50%; background: center 30% / 116% no-repeat #15120f; box-shadow: 0 0 0 1px #ecd59c, 0 0 0 3px color-mix(in srgb, var(--fz) 85%, #000), 0 0 0 4px #0b0a09; }
.esercito .forza span { display: block; width: 38px; height: 4px; background: #222; position: relative; }
.esercito .forza span::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: linear-gradient(90deg, var(--fz), color-mix(in srgb, var(--fz) 50%, #fff)); }
.esercito.scelto img { filter: drop-shadow(0 0 6px var(--oro-chiaro)) drop-shadow(0 0 2px #fff); }

/* ---------------------------------------------------------------- pannelli a macchia d'inchiostro */
.inchiostro { position: absolute; isolation: isolate; color: var(--testo); }
.inchiostro::before { content: ""; position: absolute; inset: -12px; z-index: -1; background: var(--inchiostro); filter: url(#bordo-inchiostro); }
.inchiostro.lieve::before { inset: -10px; filter: url(#bordo-inchiostro-lieve); }
.chiudi { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(232, 207, 148, .6); background: #141210; color: var(--oro-chiaro); cursor: pointer; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.chiudi:hover { background: #2a241c; }

/* barra in alto: fazione, stagione, risorse */
.barra-alta { top: 14px; left: 18px; display: flex; align-items: center; gap: 16px; padding: 8px 16px 8px 8px; }
.mon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--fz) 85%, #fff), var(--fz) 60%, color-mix(in srgb, var(--fz) 60%, #000)); box-shadow: 0 0 0 2px var(--oro), 0 0 0 4px #0b0a09; font: 400 30px/1 var(--f-pennello); color: #fff6e2; }
.stagione { display: grid; gap: 1px; }
.stagione b { font: 700 13px/1.1 var(--f-titolo); letter-spacing: .14em; text-transform: uppercase; color: var(--oro-chiaro); }
.stagione small { font-size: 11px; color: var(--testo-2); letter-spacing: .06em; }
.risorse { display: flex; gap: 14px; padding-left: 14px; border-left: 1px solid rgba(232, 207, 148, .25); }
.risorsa { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; }
.risorsa i { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 400 15px/1 var(--f-pennello); font-style: normal; color: #fff6e2; background: #2a241c; box-shadow: 0 0 0 1px rgba(232, 207, 148, .5); }
.risorsa b { font: 700 14px/1 var(--f-testo); }
.risorsa small { font-size: 10.5px; color: #8fbf5a; }
.risorsa small.meno { color: #d76c5b; }
.azioni { display: flex; gap: 6px; padding-left: 14px; border-left: 1px solid rgba(232, 207, 148, .25); }
.azioni button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(232, 207, 148, .45); background: radial-gradient(circle at 40% 30%, #3a3127, #141210); display: grid; place-items: center; cursor: pointer; font: 400 16px/1 var(--f-pennello); color: var(--oro-chiaro); }
.azioni button:hover { box-shadow: 0 0 0 2px var(--oro); }

/* barra dell'esercito in basso a sinistra */
.armata { left: 18px; bottom: 16px; display: flex; gap: 10px; align-items: stretch; padding: 10px 12px 10px 10px; }
.armata .capo { display: grid; justify-items: center; align-content: start; gap: 6px; width: 104px; }
.medaglione { position: relative; width: 84px; height: 84px; border-radius: 50%; background: center 30% / 116% no-repeat #15120f; box-shadow: inset 0 0 0 1px rgba(0,0,0,.85), inset 0 -16px 22px rgba(0,0,0,.5), 0 0 0 1.5px #ecd59c, 0 0 0 5px color-mix(in srgb, var(--fz) 82%, #000), 0 0 0 6px #b8924c, 0 0 0 8px #0b0a09, 0 6px 16px rgba(0,0,0,.6); }
.medaglione::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(120% 70% at 50% -10%, rgba(255,240,210,.22), transparent 55%); pointer-events: none; }
.armata .capo b { font: 700 12.5px/1.1 var(--f-titolo); letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.armata .capo small { font-size: 10px; color: var(--testo-2); text-align: center; letter-spacing: .08em; }
.armata .capo .stato { display: flex; gap: 10px; font: 700 11px/1 var(--f-testo); color: var(--testo-2); }
.armata .capo .barre { width: 100%; display: grid; gap: 3px; }
.armata .capo .barre i { height: 5px; background: #1d1b18; position: relative; }
.armata .capo .barre i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: var(--c); }
.armata .reparti { display: grid; grid-template-columns: repeat(6, auto); gap: 5px; }
.armata .ss-carta { --w: 70px; cursor: pointer; }
.armata .ss-carta:hover { outline: 1px solid var(--oro-chiaro); }

/* pannello del personaggio */
.personaggio { left: 50%; top: 47%; transform: translate(-56%, -50%); width: min(760px, calc(100vw - 60px)); display: grid; grid-template-columns: 300px 1fr; gap: 6px 26px; padding: 18px 22px 18px 6px; }
.personaggio[hidden] { display: none; }
.personaggio .figura { position: relative; grid-row: span 2; align-self: end; margin: -70px 0 -24px -30px; }
.personaggio .figura img { width: 100%; display: block; -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, #000 82%, transparent 100%); filter: drop-shadow(0 0 18px rgba(0,0,0,.6)); }
.personaggio .grado { position: absolute; top: 34%; right: -8px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font: 700 30px/1 var(--f-titolo); color: #fff; background: radial-gradient(circle at 40% 30%, #6d5a2a, #2a2210); box-shadow: 0 0 0 2px var(--oro), 0 0 12px rgba(201, 164, 90, .6); }
.personaggio header small { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--testo-2); }
.personaggio header h2 { margin: 2px 0 0; font: 700 34px/1 var(--f-titolo); letter-spacing: .06em; text-transform: uppercase; color: var(--oro-chiaro); }
.personaggio header p { margin: 4px 0 0; font: 700 12px/1.2 var(--f-titolo); letter-spacing: .14em; text-transform: uppercase; color: var(--testo); }
.personaggio .riga { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; padding: 7px 0; border-top: 1px solid rgba(232, 207, 148, .2); border-bottom: 1px solid rgba(232, 207, 148, .2); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--testo-2); }
.personaggio .riga b { color: var(--testo); }
.personaggio .corpo { display: grid; grid-template-columns: 1fr auto; gap: 18px; margin-top: 12px; }
.attributi { display: grid; gap: 8px; }
.attributo { display: grid; grid-template-columns: 22px 92px 1fr 22px; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.attributo i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 400 12px/1 var(--f-pennello); font-style: normal; color: #fff; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.attributo span { height: 4px; background: #24211d; position: relative; }
.attributo span::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 50%, #fff)); }
.attributo b { font: 700 12px/1 var(--f-testo); text-align: right; }
.tratti h3, .equip h3 { margin: 0 0 8px; font: 700 10.5px/1 var(--f-testo); letter-spacing: .2em; text-transform: uppercase; color: var(--testo-2); }
.tratti ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tratti li { display: flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.tratti li i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 400 13px/1 var(--f-pennello); font-style: normal; color: var(--oro-chiaro); background: #1d1a16; box-shadow: 0 0 0 1px rgba(232, 207, 148, .45); }
.schede { display: flex; gap: 2px; margin-top: 14px; }
.schede button { flex: 1; padding: 6px; border: 0; background: #1b1916; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; color: var(--testo-2); }
.schede button[aria-selected="true"] { background: var(--testo); color: #14120f; font-weight: 700; }
.equip { margin-top: 12px; }
.equip .slot { display: flex; gap: 10px; }
.equip .slot div { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 30%, #2e2924, #0f0e0c); box-shadow: 0 0 0 1px rgba(232, 207, 148, .35); font: 400 20px/1 var(--f-pennello); color: var(--oro-chiaro); }
.equip .slot div.vuoto { color: transparent; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }

/* elenco dei personaggi a destra */
.elenco { right: 18px; top: 120px; width: 230px; padding: 10px 8px; display: grid; gap: 4px; }
.elenco h3 { margin: 0 4px 4px; font: 700 10.5px/1 var(--f-testo); letter-spacing: .2em; text-transform: uppercase; color: var(--testo-2); }
.elenco button { display: grid; grid-template-columns: 22px 38px 1fr; align-items: center; gap: 8px; padding: 4px 6px; border: 0; background: rgba(255, 255, 255, .03); text-align: left; cursor: pointer; }
.elenco button:hover, .elenco button[aria-current="true"] { background: rgba(232, 207, 148, .14); }
.elenco button em { width: 22px; height: 22px; display: grid; place-items: center; font: 700 11px/1 var(--f-testo); font-style: normal; color: #fff; background: var(--fz); }
.elenco button i { width: 38px; height: 38px; border-radius: 50%; background: center 30% / 116% no-repeat #15120f; box-shadow: 0 0 0 1px #ecd59c, 0 0 0 3px color-mix(in srgb, var(--fz) 85%, #000), 0 0 0 4px #0b0a09; }
.elenco button b { display: block; font: 700 12px/1.1 var(--f-titolo); letter-spacing: .08em; text-transform: uppercase; }
.elenco button small { font-size: 10px; color: var(--testo-2); }

/* minimappa e fine turno */
.angolo { position: fixed; right: 18px; bottom: 14px; display: flex; align-items: flex-end; gap: 10px; }
.minimappa { position: relative; width: 104px; height: 104px; border-radius: 50%; overflow: hidden; background: center / cover; box-shadow: 0 0 0 3px #0b0a09, 0 0 0 4px var(--oro), 0 4px 14px rgba(0, 0, 0, .5); cursor: pointer; }
.minimappa i { position: absolute; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); pointer-events: none; }
.fine-turno { width: 66px; height: 66px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; font: 400 26px/1 var(--f-pennello); color: #fff6e2; background: radial-gradient(circle at 40% 30%, #c04a3a, #6e1d15); box-shadow: 0 0 0 2px var(--oro), 0 0 0 4px #0b0a09, 0 4px 14px rgba(0, 0, 0, .5); }
.fine-turno:hover { filter: brightness(1.15); }

/* scheda della provincia al passaggio del mouse */
.suggerimento { position: fixed; z-index: 30; pointer-events: none; min-width: 190px; padding: 9px 12px 10px; transform: translate(14px, 14px); }
.suggerimento[hidden] { display: none; }
.suggerimento b { display: block; font: 700 14px/1.1 var(--f-titolo); letter-spacing: .1em; text-transform: uppercase; color: var(--oro-chiaro); }
.suggerimento small { display: block; margin-top: 2px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--testo-2); }
.suggerimento ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 6px; }
.suggerimento li { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.suggerimento li .icona { width: 20px; height: 20px; }
.suggerimento li .icona svg { width: 14px; height: 14px; }

@media (max-width: 900px) {
  .barra-alta .risorse .risorsa:nth-child(n+3), .barra-alta .azioni, .elenco { display: none; }
  .armata .reparti { grid-template-columns: repeat(3, auto); }
  .personaggio { grid-template-columns: 1fr; right: 12px; width: calc(100vw - 24px); }
  .personaggio .figura { display: none; }
}

/* ================================================================ gioco: aggiunte */
[hidden] { display: none !important; }
.esercito { position: relative; }
.esercito .nave { display: none; width: 84px; height: auto; }
.esercito.in-mare .fig { display: none; }
.esercito.in-mare .nave { display: block; animation: onda 1.2s ease-in-out infinite; }
@keyframes onda { 50% { transform: translateY(-3px) rotate(-2deg); } }
.esercito .forza b { font: 700 10.5px/1 var(--f-testo); color: var(--testo); }
.esercito.mio .forza { border-color: rgba(232, 207, 148, .85); }
.esercito.stanco .fig { filter: grayscale(.5) brightness(.8) drop-shadow(0 6px 5px rgba(0,0,0,.4)); }
.esercito.scelto::before { content: ""; position: absolute; left: 50%; bottom: 14px; width: 74px; height: 26px; transform: translateX(-50%); border-radius: 50%; border: 2px solid var(--oro-chiaro); box-shadow: 0 0 14px rgba(232, 207, 148, .9); animation: anello 1.4s ease-in-out infinite; }
@keyframes anello { 50% { opacity: .45; transform: translateX(-50%) scale(1.12); } }
.esercito:hover .fig { filter: brightness(1.12) drop-shadow(0 0 6px rgba(255, 240, 200, .7)); }
.citta:hover > img { filter: brightness(1.1); }
.citta.sotto-assedio > img { filter: sepia(.4) brightness(.85); }
.targa .assediata { display: grid; place-items: center; width: 26px; background: linear-gradient(180deg, #b23a1d, #6e1d10); }
.targa .assediata svg { width: 16px; height: 16px; fill: #ffd9a8; animation: brucia .8s ease-in-out infinite alternate; }
@keyframes brucia { to { transform: scale(1.18); } }
.targa .pop svg { fill: #d9c48c; }
.targa .pop { color: #eadfc0; }
.icona.assedio { background: #6e1d10; }
.icona.assedio svg { fill: #ffd9a8; }

.barra-alta .risorsa small { color: #9fc77a; }

.elenco button em.zero { background: #3a3530; color: #888; }

/* barra dell'esercito */
.armata { max-width: calc(100vw - 180px); }
.armata .reparti .vuoto { width: 70px; aspect-ratio: 5 / 8; border: 1px dashed rgba(232, 207, 148, .18); background: rgba(255, 255, 255, .02); }
.armata .comandi { display: grid; align-content: start; gap: 8px; width: 170px; padding-left: 8px; }
.comandi button { padding: 9px 12px; border: 1px solid rgba(232, 207, 148, .45); border-radius: 2px; background: #1c1814; font: 700 12px/1.2 var(--f-testo); letter-spacing: .06em; color: var(--testo); cursor: pointer; text-align: left; }
.comandi button:hover:not(:disabled) { background: #2a241c; border-color: var(--oro-chiaro); }
.comandi button:disabled { opacity: .4; cursor: not-allowed; }
.comandi button.primario, button.primario { background: linear-gradient(180deg, #8e2a1e, #5b170f); border-color: #e8b98a; color: #fff3df; }
.comandi .nota { font-size: 11.5px; line-height: 1.45; color: var(--testo-2); }
.comandi .nota b { color: var(--testo); }

/* pannello provincia e reclutamento */
.pannello { right: 22px; top: 110px; width: min(430px, calc(100vw - 44px)); padding: 18px 20px 20px; z-index: 12; }
.pannello header small, .finestra header small { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--testo-2); }
.pannello header h2, .finestra header h2 { margin: 3px 0 0; font: 700 28px/1.05 var(--f-titolo); letter-spacing: .05em; text-transform: uppercase; color: var(--oro-chiaro); }
.pannello header p { margin: 5px 0 0; font-size: 12.5px; color: var(--testo); }
.pannello .ritratto-luogo { display: block; width: 62%; margin: -6px auto 6px; filter: drop-shadow(0 10px 12px rgba(0,0,0,.6)); }
.pannello .dati { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 14px 0; }
.pannello .dati div { padding: 8px 0; border-bottom: 1px solid rgba(232, 207, 148, .14); }
.pannello .dati dt { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--testo-2); }
.pannello .dati dd { margin: 3px 0 0; font: 700 14px/1.2 var(--f-testo); }
.pannello .comandi { display: grid; gap: 8px; }
.pannello.recluta { width: min(620px, calc(100vw - 44px)); }
.griglia-reclute { max-height: calc(100vh - 340px); overflow-y: auto; overflow-x: hidden; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 10px; margin-top: 14px; }
.recluta-voce { display: grid; justify-items: center; gap: 4px; padding: 6px 4px 8px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--testo); }
.recluta-voce .ss-carta { --w: 84px; }
.recluta-voce:hover:not(:disabled) { border-color: rgba(232, 207, 148, .5); background: rgba(255, 255, 255, .04); }
.recluta-voce:disabled { opacity: .38; cursor: not-allowed; }
.recluta-voce .nome-u { font: 700 11.5px/1.15 var(--f-titolo); text-align: center; }
.recluta-voce .prezzo { font: 700 11px/1 var(--f-testo); color: var(--oro-chiaro); }

/* finestre centrali: battaglia, guida, conferme */
.velo { position: fixed; inset: 0; z-index: 40; background: radial-gradient(circle, rgba(0,0,0,.35), rgba(0,0,0,.72)); }
.finestra { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 40px)); padding: 26px 28px; text-align: center; }
.finestra .esito small { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--testo-2); }
.finestra .esito h2 { margin: 6px 0 0; font: 800 52px/1 var(--f-titolo); letter-spacing: .06em; text-transform: uppercase; }
.finestra .esito.vinta h2 { color: var(--oro-chiaro); text-shadow: 0 0 24px rgba(232, 207, 148, .35); }
.finestra .esito.persa h2 { color: #d9654f; }
.scontro { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 22px 0 10px; }
.scontro .lato { display: grid; justify-items: center; gap: 4px; }
.scontro .lato .medaglione { width: 92px; height: 92px; }
.scontro .lato .muro { display: grid; place-items: center; background: #2a241c; }
.scontro .lato .muro svg { width: 44px; height: 44px; fill: #d9c48c; }
.scontro .lato b { margin-top: 8px; font: 700 16px/1.1 var(--f-titolo); letter-spacing: .08em; text-transform: uppercase; }
.scontro .lato small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--testo-2); }
.scontro dl { display: flex; gap: 18px; margin: 8px 0 0; }
.scontro dt { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--testo-2); }
.scontro dd { margin: 2px 0 0; font: 700 16px/1 var(--f-testo); }
.bilancia { display: grid; justify-items: center; gap: 10px; }
.bilancia span { font: 800 22px/1 var(--f-titolo); color: var(--oro); }
.bilancia i { display: block; width: 110px; height: 8px; background: linear-gradient(90deg, var(--fa) calc(var(--a) * 100%), var(--fd) 0); box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 0 0 2px rgba(232, 207, 148, .35); }
.finestra .finale { margin: 10px auto 18px; max-width: 46ch; font-size: 14px; line-height: 1.6; color: var(--testo); }
.finestra > button.primario, .finestra .comandi button { padding: 12px 26px; border: 1px solid #e8b98a; background: linear-gradient(180deg, #8e2a1e, #5b170f); font: 700 13px/1 var(--f-testo); letter-spacing: .14em; text-transform: uppercase; color: #fff3df; cursor: pointer; }
.finestra .comandi { display: flex; justify-content: center; gap: 10px; }
.finestra .comandi button:not(.primario) { background: #1c1814; border-color: rgba(232, 207, 148, .45); }
.guida { text-align: left; width: min(620px, calc(100vw - 40px)); }
.guida ol { margin: 16px 0 20px; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; line-height: 1.55; }
.guida ol b { color: var(--oro-chiaro); }

/* avvisi e turno dei rivali */
.avvisi { position: fixed; z-index: 30; top: 112px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; pointer-events: none; }
.avviso { display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; background: rgba(9, 8, 7, .9); border: 1px solid rgba(232, 207, 148, .35); font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,.45); animation: entraAvviso .35s ease; transition: opacity .7s, transform .7s; }
.avviso i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 400 14px/1 var(--f-pennello); font-style: normal; color: #fff; background: var(--fz); }
.avviso b { color: var(--oro-chiaro); }
.avviso.via { opacity: 0; transform: translateY(-8px); }
@keyframes entraAvviso { from { opacity: 0; transform: translateY(-10px); } }
.turno-rivale { left: 50%; top: 112px; transform: translateX(-50%); z-index: 25; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 12px 22px 12px 12px; min-width: 300px; }
.turno-rivale .mon { grid-row: span 2; width: 46px; height: 46px; font-size: 24px; }
.turno-rivale b { font: 700 16px/1.1 var(--f-titolo); letter-spacing: .1em; text-transform: uppercase; color: var(--oro-chiaro); }
.turno-rivale small { font-size: 12px; color: var(--testo-2); }
.turno-rivale a { color: var(--oro-chiaro); }
.turno-rivale .comandi { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 10px; }
.turno-rivale.scelta { top: 24px; }
.fine-turno:disabled { filter: grayscale(.8) brightness(.6); cursor: wait; }
.suggerimento em { display: block; margin-top: 7px; font: 700 11.5px/1 var(--f-testo); font-style: normal; letter-spacing: .08em; color: #f4c27a; }

/* schermata iniziale */
.inizio { position: fixed; inset: 0; z-index: 50; display: grid; align-content: center; justify-items: center; gap: 34px; padding: 30px 20px; overflow: auto; background: radial-gradient(80% 70% at 50% 40%, rgba(20, 16, 12, .72), rgba(6, 5, 4, .94)); }
.testata-inizio { text-align: center; }
.testata-inizio small { font-size: 11.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--testo-2); }
.testata-inizio h1 { margin: 10px 0 0; font: 400 clamp(56px, 8vw, 104px)/.9 var(--f-titolo); letter-spacing: -.02em; color: var(--testo); }
.testata-inizio h1 i { color: var(--oro); font-style: normal; }
.testata-inizio p { margin: 16px 0 0; font: 700 14px/1 var(--f-titolo); letter-spacing: .3em; text-transform: uppercase; color: var(--oro-chiaro); }
.popoli { display: grid; grid-template-columns: repeat(4, minmax(0, 220px)); gap: 16px; }
.popolo { position: relative; overflow: hidden; isolation: isolate; display: grid; justify-items: center; gap: 4px; padding: 26px 18px 22px; border: 1px solid color-mix(in srgb, var(--fz) 55%, transparent); border-radius: 4px; background: linear-gradient(180deg, color-mix(in srgb, var(--fz) 30%, #0d0b09), #0b0a08 75%); color: var(--testo); cursor: pointer; text-align: center; transition: transform .4s, box-shadow .4s, border-color .4s; }
.popolo:hover { transform: translateY(-6px); border-color: var(--oro-chiaro); box-shadow: 0 20px 40px rgba(0,0,0,.5), 0 0 30px color-mix(in srgb, var(--fz) 40%, transparent); }
.popolo .k { position: absolute; z-index: -1; right: -10px; top: -18px; font: 400 150px/1 var(--f-pennello); color: color-mix(in srgb, var(--fz) 60%, transparent); opacity: .45; }
.popolo .volto { width: 96px; height: 96px; border-radius: 50%; margin-bottom: 14px; background: center 30% / 116% no-repeat #15120f; box-shadow: 0 0 0 1.5px #ecd59c, 0 0 0 5px color-mix(in srgb, var(--fz) 82%, #000), 0 0 0 6px #b8924c, 0 0 0 8px #0b0a09, 0 10px 22px rgba(0,0,0,.6); }
.popolo b { font: 700 24px/1 var(--f-titolo); letter-spacing: .1em; text-transform: uppercase; }
.popolo small { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: color-mix(in srgb, var(--fz) 50%, #fff); }
.popolo p { margin: 10px 0 6px; font-size: 13px; line-height: 1.5; color: var(--testo-2); }
.popolo em { font-style: normal; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--oro-chiaro); }
.continua { padding: 13px 26px; border: 1px solid #e8b98a; background: linear-gradient(180deg, #8e2a1e, #5b170f); font: 700 13px/1 var(--f-testo); letter-spacing: .14em; text-transform: uppercase; color: #fff3df; cursor: pointer; }
@media (max-width: 900px) { .popoli { grid-template-columns: repeat(2, minmax(0, 1fr)); } .armata { max-width: calc(100vw - 24px); left: 12px; flex-wrap: wrap; } .armata .comandi { width: 100%; } .pannello { top: auto; bottom: 150px; } }

/* niente barre di scorrimento nel gioco: si scorre con rotella o dito */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

/* schermata iniziale: scelta del generale */
.inizio { align-content: start; padding: 46px 24px 60px; gap: 26px; }
.inizio .continua { justify-self: center; }
.schieramenti { width: min(1240px, 100%); display: grid; gap: 22px; }
.schieramento { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: stretch; padding: 14px; border: 1px solid color-mix(in srgb, var(--fz) 45%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--fz) 26%, #0d0b09), rgba(11, 10, 8, .85) 40%); position: relative; overflow: hidden; isolation: isolate; }
.schieramento header { position: relative; display: grid; align-content: center; padding: 6px 6px 6px 10px; }
.schieramento header .k { position: absolute; z-index: -1; left: -8px; top: 50%; transform: translateY(-50%); font: 400 150px/1 var(--f-pennello); color: color-mix(in srgb, var(--fz) 70%, transparent); opacity: .4; }
.schieramento header > div { display: grid; }
.schieramento header b { font: 700 26px/1 var(--f-titolo); letter-spacing: .1em; text-transform: uppercase; }
.schieramento header small { margin-top: 5px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: color-mix(in srgb, var(--fz) 50%, #fff); }
.schieramento header p { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--testo-2); }
.generali-fila { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.generale-carta { position: relative; aspect-ratio: 4 / 5; height: auto; padding: 0; border: 1px solid rgba(232, 207, 148, .2); background: none; cursor: pointer; overflow: hidden; isolation: isolate; color: var(--testo); transition: transform .35s, border-color .35s, box-shadow .35s; }
.generale-carta .fondo { position: absolute; inset: 0; z-index: -2; background: radial-gradient(90% 70% at 50% 35%, color-mix(in srgb, var(--fz) 45%, #1a1612), #0c0b09 75%); }
.generale-carta img { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform .6s; }
.generale-carta .nome { position: absolute; inset: auto 0 0; padding: 22px 6px 8px; display: grid; gap: 2px; text-align: center; background: linear-gradient(transparent, rgba(5, 4, 3, .92) 45%); }
.generale-carta .nome b { font: 700 13.5px/1.05 var(--f-titolo); letter-spacing: .08em; text-transform: uppercase; }
.generale-carta .nome small { font-size: 9.5px; line-height: 1.25; color: var(--testo-2); }
.generale-carta:hover { transform: translateY(-4px); border-color: var(--oro-chiaro); box-shadow: 0 14px 30px rgba(0,0,0,.5), 0 0 22px color-mix(in srgb, var(--fz) 50%, transparent); }
.generale-carta:hover img { transform: scale(1.06); }
@media (max-width: 760px) { .schieramento { grid-template-columns: 1fr; } .generali-fila { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); } }
.generale-carta::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 236, 190, .12), inset 0 -2px 0 var(--fz); }

/* territori vettoriali */
.piano .vett { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#v-tinte path { fill-opacity: .2; mix-blend-mode: multiply; }
.vett .banda { fill: none; stroke-width: 7px; stroke-opacity: .95; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.vett .linea { fill: none; stroke: #3b2a1a; stroke-opacity: .55; stroke-width: 1.2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.vett .luce-p { mix-blend-mode: screen; }
.vett .rotta { fill: none; stroke: #2a5a8c; stroke-width: 2.5px; stroke-dasharray: 7 7; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: rotta 1.2s linear infinite; }
@keyframes rotta { to { stroke-dashoffset: -28; } }

/* ================================================================ atmosfera cinematografica */
.vista .meteo { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.vista .vignetta { position: absolute; inset: 0; pointer-events: none; z-index: 4; background: radial-gradient(120% 95% at 50% 45%, transparent 55%, rgba(20, 14, 8, .42) 100%); }
.vista .lampo { position: absolute; inset: 0; pointer-events: none; z-index: 4; background: #eef4ff; opacity: 0; }
.vista .lampo.acceso { animation: lampo .7s ease-out; }
@keyframes lampo { 0% { opacity: 0; } 6% { opacity: .55; } 12% { opacity: .1; } 18% { opacity: .38; } 100% { opacity: 0; } }
.segni { z-index: 2; }
.vista.scossa { animation: scossa .45s ease-out; }
@keyframes scossa { 15% { transform: translate(6px, -4px); } 35% { transform: translate(-5px, 3px); } 55% { transform: translate(3px, 2px); } 75% { transform: translate(-2px, -1px); } }

/* generali: respiro leggero, come miniature vive */
.esercito .fig { animation: respiro 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.esercito:nth-child(odd) .fig { animation-delay: -1.7s; }
@keyframes respiro { 50% { transform: translateY(-2px) scale(1.01); } }

/* annuncio del turno */
.annuncio { position: fixed; z-index: 35; left: 50%; top: 36%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; text-align: center; pointer-events: none; opacity: 0; color: var(--testo); text-shadow: 0 2px 18px rgba(0, 0, 0, .8); }
.annuncio::before { content: ""; position: absolute; z-index: -1; inset: -50px -160px; background: radial-gradient(closest-side, rgba(8, 6, 5, .82), rgba(8, 6, 5, .4) 60%, transparent); }
.annuncio small { font-size: 12px; letter-spacing: .4em; text-transform: uppercase; color: var(--testo-2); }
.annuncio b { white-space: nowrap; font: 800 clamp(28px, 4vw, 54px)/1 var(--f-titolo); letter-spacing: .1em; text-transform: uppercase; color: var(--oro-chiaro); }
.annuncio span { white-space: nowrap; display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: .06em; }
.annuncio span i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 400 17px/1 var(--f-pennello); font-style: normal; background: #8e2a1e; color: #fff3df; box-shadow: 0 0 0 1px var(--oro); }
.annuncio.vivo { animation: annuncio 3.4s ease forwards; }
@keyframes annuncio { 0% { opacity: 0; transform: translate(-50%, -40%) scale(1.06); letter-spacing: .3em; } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -56%); } }

/* meteo nella barra in alto */
.meteo-chip { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid rgba(232, 207, 148, .25); max-width: 220px; }
.meteo-chip i { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 400 17px/1 var(--f-pennello); font-style: normal; color: #fff3df; background: radial-gradient(circle at 40% 30%, #4b6f8c, #1c2c3a); box-shadow: 0 0 0 1px rgba(232, 207, 148, .5); }
.meteo-chip b { display: block; font: 700 12px/1.1 var(--f-testo); }
.meteo-chip small { display: block; font-size: 10.5px; line-height: 1.3; color: var(--testo-2); }

/* battaglia: entrata a pennellata */
.finestra:not([hidden]) { animation: entraFinestra .55s cubic-bezier(.2, .9, .2, 1); }
@keyframes entraFinestra { from { opacity: 0; transform: translate(-50%, -46%) scale(.94); filter: blur(4px); } }
.finestra .esito h2 { animation: colpo .7s cubic-bezier(.2, .9, .2, 1); }
@keyframes colpo { from { letter-spacing: .5em; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .piano .nuvole i, .esercito .fig, .vett .onde { animation: none; } }

/* truppe speciali dei generali */
.ss-speciale { box-shadow: inset 0 0 0 1px rgba(255, 236, 190, .5), inset 0 0 calc(var(--w, 120px) * .22) rgba(0, 0, 0, .38), 0 0 0 1px #e8cf94, 0 3px 12px rgba(120, 90, 20, .5); }
.ss-speciale::before { content: "★"; position: absolute; z-index: 6; right: 6%; top: 3%; font-size: 11cqi; color: #f1d58e; text-shadow: 0 1px 2px #000; }
.griglia-reclute .sez-reclute { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 6px 0 0; padding-bottom: 6px; border-bottom: 1px solid rgba(232, 207, 148, .2); font: 700 11px/1 var(--f-testo); letter-spacing: .18em; text-transform: uppercase; color: var(--oro-chiaro); }
.griglia-reclute .sez-reclute .mini { width: 24px; height: 24px; border-radius: 50%; background: center 30% / 116% no-repeat #15120f; box-shadow: 0 0 0 1px #ecd59c; }

/* mappa animata (video in loop, ritagliato esattamente sulla mappa) */
.piano .mappa-viva { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; opacity: 0; transition: opacity 1.6s ease; }
.piano .mappa-viva.pronta { opacity: 1; }

/* mappa 3D */
.vista .tela3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vista { background: #a9bcc4; }
.segni .segno.armata-segno { z-index: auto; }

/* ================================================================ battaglia in tempo reale */
.bt { position: fixed; inset: 0; z-index: 60; background: #000; user-select: none; }
.bt-tela { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bt-strato { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bt-stendardo { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; display: grid; justify-items: center; gap: 2px; margin: -34px 0 0 -15px; width: 30px; }
.bt-stendardo b { width: 26px; height: 30px; display: grid; place-items: center; font: 400 15px/1 var(--f-pennello); color: #fff6e2; background: linear-gradient(180deg, color-mix(in srgb, var(--fz) 92%, #fff), color-mix(in srgb, var(--fz) 70%, #000)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.bt-stendardo i, .bt-stendardo u { display: block; width: 30px; height: 3px; background: rgba(0,0,0,.6); position: relative; }
.bt-stendardo i s { position: absolute; inset: 0 auto 0 0; background: #e6dcc2; text-decoration: none; }
.bt-stendardo u { height: 2px; overflow: hidden; } .bt-stendardo u { background: rgba(0,0,0,.6) linear-gradient(90deg, #6fbf5a, #6fbf5a) no-repeat; background-size: inherit; }
.bt-stendardo.mio b { box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 0 0 1px #e8cf94; }
.bt-stendardo.gen b { width: 32px; height: 36px; font-size: 18px; }
.bt-stendardo.sel b { box-shadow: 0 0 0 2px #fff3c4, 0 0 12px #f3d38a; transform: translateY(-3px); }
.bt-stendardo.mischia b::after { content: '⚔'; position: absolute; margin-top: -26px; font-size: 12px; color: #ffd7a8; text-shadow: 0 1px 2px #000; }
.bt-stendardo.vacilla b { animation: vacilla .6s ease-in-out infinite; }
.bt-stendardo.rotta b { filter: grayscale(.7) brightness(.7); background: #5a5450; }
.bt-stendardo.rotta b::before { content: '!'; position: absolute; margin-top: -24px; font: 700 14px/1 var(--f-testo); color: #ff7b6b; }
@keyframes vacilla { 50% { transform: translateY(-2px) rotate(-4deg); } }
.bt-riquadro { position: absolute; border: 1px solid #f3d38a; background: rgba(243, 211, 138, .1); pointer-events: none; }
.bt-linea { position: absolute; height: 3px; background: repeating-linear-gradient(90deg, #f3d38a 0 10px, transparent 10px 16px); transform-origin: 0 50%; pointer-events: none; }
.bt-segnale { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid var(--c); pointer-events: none; }
.bt-testa { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; padding: 10px 18px; z-index: 2; }
.bt-lato { display: grid; text-align: center; min-width: 130px; }
.bt-lato b { font: 700 15px/1.1 var(--f-titolo); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--fz) 55%, #fff); }
.bt-lato small { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--testo-2); }
.bt-bilancia { display: grid; justify-items: center; gap: 6px; }
.bt-bilancia i { width: 220px; height: 10px; background: linear-gradient(90deg, var(--fa) calc(var(--a) * 100%), var(--fd) 0); box-shadow: 0 0 0 1px #000, 0 0 0 2px rgba(232, 207, 148, .4); transition: background .4s; }
.bt-bilancia span { font: 700 12px/1 var(--f-testo); letter-spacing: .14em; text-transform: uppercase; color: var(--oro-chiaro); }
.bt-pulsanti { display: flex; gap: 6px; }
.bt-pulsanti button, .bt-comandi button { padding: 8px 12px; border: 1px solid rgba(232, 207, 148, .5); background: #1c1814; color: var(--testo); font: 700 12px/1 var(--f-testo); letter-spacing: .08em; cursor: pointer; }
.bt-pulsanti button.primario { background: linear-gradient(180deg, #8e2a1e, #5b170f); border-color: #e8b98a; color: #fff3df; padding: 10px 18px; text-transform: uppercase; letter-spacing: .14em; }
.bt-barra { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 12px; align-items: flex-end; padding: 10px 12px; max-width: calc(100vw - 24px); z-index: 2; }
.bt-carte { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.bt-carta { --w: 62px; cursor: pointer; position: relative; transition: transform .15s; }
.bt-carta.sel { transform: translateY(-8px); outline: 2px solid #f3d38a; box-shadow: 0 0 14px rgba(243, 211, 138, .7); }
.bt-carta.morto { filter: grayscale(1) brightness(.4); }
.bt-carta.rotta { filter: grayscale(.6); animation: vacilla .6s ease-in-out infinite; }
.bt-carta .bt-stato { position: absolute; z-index: 7; left: 0; right: 0; top: 40%; text-align: center; font: 700 9px/1 var(--f-testo); letter-spacing: .08em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.bt-gen-carta { margin: 0; width: 62px; aspect-ratio: 5 / 8; display: grid; align-content: end; justify-items: center; gap: 4px; padding: 4px 2px; border: 2px solid #e8cf94; background: #15120f; }
.bt-gen-carta span { width: 50px; height: 50px; border-radius: 50%; background: center 30% / 116% no-repeat; box-shadow: 0 0 0 1px #ecd59c; }
.bt-gen-carta figcaption { font: 700 9px/1.1 var(--f-titolo); text-align: center; text-transform: uppercase; color: var(--oro-chiaro); }
.bt-comandi { display: grid; gap: 6px; }
.bt-avviso { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); padding: 10px 18px; background: rgba(8, 7, 6, .85); border: 1px solid rgba(232, 207, 148, .4); color: var(--testo); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .4s; z-index: 3; text-align: center; max-width: 80vw; }
.bt-avviso.vivo { opacity: 1; }
.bt-avviso b { color: var(--oro-chiaro); }
/* scelta prima della battaglia */
.pre-battaglia .scontro { margin-bottom: 6px; }
.pre-battaglia .scelte { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pre-battaglia .scelte button { padding: 12px 22px; border: 1px solid rgba(232, 207, 148, .5); background: #1c1814; color: var(--testo); font: 700 13px/1 var(--f-testo); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.pre-battaglia .scelte button.primario { background: linear-gradient(180deg, #8e2a1e, #5b170f); border-color: #e8b98a; color: #fff3df; }
.pre-battaglia .probabile { font-size: 13px; color: var(--testo-2); }
.pre-battaglia .probabile b { color: var(--oro-chiaro); }
