/* =====================================================================
   ALBO TACTICS — i materiali dell'interfaccia: noce, ottone, feltro,
   smalto, ricamo. Angoli vivi (2-4 px), niente pillole.
   Due composizioni: orizzontale (tratti a sinistra, villaggi a destra,
   bancarella in basso) e verticale (villaggi in striscia in alto, tratti in
   fila, bancarella in basso). La scena 3D si inquadra da sola nel
   rettangolo libero (game/main.js legge i rettangoli di questi pannelli).
   ===================================================================== */
@font-face { font-family: 'Young Serif'; src: url(../fonts/youngserif-latin.woff2) format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Young Serif'; src: url(../fonts/youngserif-latin-ext.woff2) format('woff2'); font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Barlow'; src: url(../fonts/barlow-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(../fonts/barlow-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url(../fonts/barlow-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --night: #0e1222; --night2: #161b30; --ivory: #efe8d8; --dim: rgba(239,232,216,.62);
  --brass: #c9a45c; --gold: #e9b44c; --lantern: #ffb54a; --filo: rgba(201,164,92,.38);
  --walnut: #3a2416; --walnut2: #24160d; --walnut3: #160d07; --felt: #6e1a20; --red: #c0282e;
  --c1: #8f99a3; --c2: #5aa25a; --c3: #3b78d6; --c4: #9b55d0; --c5: #e3a93a;
  --t-fshati: #d0894a; --t-mali: #8fb0c8; --t-qyteti: #c9b07a; --t-deti: #3fb0b6; --t-miti: #a97bdb;
  --t-mbrojtes: #9aa6b4; --t-luftetar: #cf5a4a; --t-gjuetar: #7fb05a; --t-magjistar: #6f8fe8; --t-dinak: #8c8c9a;
  --t-sherues: #79c98f; --t-kengetar: #e2b950;
  --ease: cubic-bezier(.2,.85,.25,1);
  --u: 1px;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--ivory); font-family: 'Barlow', system-ui, sans-serif; -webkit-font-smoothing: antialiased; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
/* niente trascinamento nativo delle immagini: col mouse Chrome lo avviava sul ritratto della carta e mandava pointercancel */
img { -webkit-user-drag: none; user-drag: none; }   /* un display:grid nel CSS batte l'attributo hidden: senza questa riga il velo del modale restava sopra tutto */

/* ----------------------------------------------------------------- il cielo dipinto */
#sky { position: fixed; inset: 0; background: radial-gradient(ellipse 90% 70% at 50% 18%, #26305a 0%, #141a33 45%, #0b0e1c 100%); overflow: hidden; }
#sky .stars { position: absolute; inset: 0 0 45% 0; background-image:
  radial-gradient(1.2px 1.2px at 12% 18%, #fff8, transparent), radial-gradient(1px 1px at 28% 8%, #fff9, transparent), radial-gradient(1.4px 1.4px at 41% 22%, #fffa, transparent),
  radial-gradient(1px 1px at 57% 12%, #fff8, transparent), radial-gradient(1.2px 1.2px at 69% 26%, #fff9, transparent), radial-gradient(1px 1px at 83% 9%, #fffa, transparent),
  radial-gradient(1.3px 1.3px at 92% 21%, #fff8, transparent), radial-gradient(1px 1px at 6% 31%, #fff7, transparent), radial-gradient(1px 1px at 35% 33%, #fff6, transparent),
  radial-gradient(1px 1px at 77% 35%, #fff6, transparent), radial-gradient(1.1px 1.1px at 50% 4%, #fff9, transparent), radial-gradient(1px 1px at 20% 40%, #fff5, transparent); }
#sky .moon { position: absolute; width: 11vmin; height: 11vmin; right: 16%; top: 7%; border-radius: 50%; background: radial-gradient(circle at 38% 36%, #fffaf0 0%, #f1e6c8 55%, #d8c9a2 100%); box-shadow: 0 0 6vmin 1vmin rgba(255,240,200,.25), 0 0 20vmin 6vmin rgba(160,180,255,.12); }
#sky .ridge { position: absolute; left: -5%; right: -5%; bottom: 0; }
#sky .r1 { height: 62%; background: #1b2140; clip-path: polygon(0 34%, 8% 22%, 14% 30%, 22% 12%, 30% 26%, 37% 18%, 45% 31%, 52% 14%, 60% 27%, 68% 10%, 76% 24%, 84% 16%, 92% 28%, 100% 20%, 100% 100%, 0 100%); }
#sky .r2 { height: 52%; background: #121731; clip-path: polygon(0 30%, 10% 40%, 18% 26%, 27% 38%, 35% 24%, 44% 36%, 55% 22%, 63% 35%, 72% 28%, 81% 40%, 90% 30%, 100% 38%, 100% 100%, 0 100%); }
#sky .haze { position: absolute; inset: 40% 0 0 0; background: linear-gradient(180deg, transparent, rgba(255,170,90,.09) 55%, rgba(14,18,34,.9)); }
/* i cieli delle altre fiere (A3): Berat al crepuscolo con la collina piena di finestre, Theth fredda sotto i picchi */
#sky { transition: filter .5s ease; }
#sky.cross { filter: brightness(.35) saturate(.6); }
#sky::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,28,40,.85), rgba(10,14,24,.55) 60%, rgba(8,10,18,.2)); opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
#sky.storm::after { opacity: 1; } #sky.storm .moon { opacity: .25; transition: opacity 1.2s; }
#sky[data-arena="berati"] { background: radial-gradient(ellipse 90% 70% at 40% 22%, #3a2c5a 0%, #20183a 45%, #100c1e 100%); }
#sky[data-arena="berati"] .moon { right: auto; left: 14%; top: 10%; width: 8vmin; height: 8vmin; }
#sky[data-arena="berati"] .r1 { height: 58%; background: #262040; clip-path: polygon(0 52%, 12% 40%, 26% 30%, 40% 22%, 52% 18%, 64% 21%, 78% 30%, 90% 40%, 100% 48%, 100% 100%, 0 100%); }
#sky[data-arena="berati"] .r2 { height: 46%; background-color: #1a1530; clip-path: polygon(0 40%, 18% 30%, 34% 24%, 50% 20%, 66% 24%, 82% 32%, 100% 38%, 100% 100%, 0 100%);
  background-image: radial-gradient(1.6px 2px at 20% 40%, #ffc46a, transparent), radial-gradient(1.6px 2px at 31% 52%, #ffc46a, transparent), radial-gradient(1.6px 2px at 44% 36%, #ffd08a, transparent), radial-gradient(1.6px 2px at 57% 48%, #ffc46a, transparent), radial-gradient(1.6px 2px at 69% 38%, #ffb44a, transparent), radial-gradient(1.6px 2px at 80% 55%, #ffc46a, transparent);
  background-size: 9vmin 6vmin; }
#sky[data-arena="berati"] .haze { background: linear-gradient(180deg, transparent, rgba(255,150,120,.1) 55%, rgba(16,12,30,.9)); }
#sky[data-arena="thethi"] { background: radial-gradient(ellipse 90% 70% at 60% 14%, #2a3a5a 0%, #121c32 45%, #080c18 100%); }
#sky[data-arena="thethi"] .moon { right: 30%; top: 5%; width: 9vmin; height: 9vmin; }
#sky[data-arena="thethi"] .r1 { height: 82%; background: linear-gradient(180deg, #c8d4e8 0%, #8a98b8 9%, #2a3452 22%, #1a2238 100%); clip-path: polygon(0 40%, 9% 18%, 15% 30%, 24% 4%, 33% 26%, 41% 14%, 50% 32%, 58% 8%, 67% 28%, 76% 12%, 85% 30%, 93% 16%, 100% 26%, 100% 100%, 0 100%); }
#sky[data-arena="thethi"] .r2 { height: 52%; background: #101a2a; clip-path: polygon(0 34%, 8% 24%, 16% 38%, 26% 26%, 36% 40%, 48% 28%, 60% 42%, 70% 30%, 82% 44%, 92% 32%, 100% 40%, 100% 100%, 0 100%); }
#sky[data-arena="thethi"] .haze { background: linear-gradient(180deg, transparent, rgba(150,190,255,.08) 55%, rgba(8,12,24,.92)); }
/* i cieli delle cinque fiere di A5 */
#sky[data-arena="butrinti"] { background: radial-gradient(ellipse 90% 70% at 50% 20%, #24405a 0%, #12243a 50%, #08121e 100%); }
#sky[data-arena="butrinti"] .r1 { height: 46%; background: #16303a; clip-path: polygon(0 46%, 14% 38%, 30% 44%, 46% 34%, 62% 42%, 78% 36%, 92% 44%, 100% 40%, 100% 100%, 0 100%); }
#sky[data-arena="butrinti"] .r2 { height: 30%; background: linear-gradient(180deg, #1c3a48, #0e2230); clip-path: none; }
#sky[data-arena="butrinti"] .haze { background: linear-gradient(180deg, transparent, rgba(160,220,230,.1) 50%, rgba(8,18,30,.9)); }
#sky[data-arena="durresi"] { background: linear-gradient(180deg, #2c2450 0%, #6a4070 38%, #c87a6a 52%, #2a3a5a 53%, #14203a 100%); }
#sky[data-arena="durresi"] .moon { right: 30%; top: 14%; }
#sky[data-arena="durresi"] .r1 { height: 47%; background: linear-gradient(180deg, #2a4066, #14203a); clip-path: none; }
#sky[data-arena="durresi"] .r2 { height: 47%; background: transparent; clip-path: none; background-image: radial-gradient(1.5px 1.5px at 10% 2%, #ffd08a, transparent), radial-gradient(1.5px 1.5px at 24% 2%, #ffd08a, transparent), radial-gradient(1.5px 1.5px at 61% 1.5%, #ffd08a, transparent), radial-gradient(1.5px 1.5px at 83% 2.5%, #ffd08a, transparent); }
#sky[data-arena="gjirokastra"] { background: radial-gradient(ellipse 90% 70% at 50% 16%, #2a3048 0%, #161a2c 50%, #0a0c16 100%); }
#sky[data-arena="gjirokastra"] .r1 { height: 78%; background: linear-gradient(180deg, #5a6070 0%, #2a3040 18%, #1a1e2c 100%); clip-path: polygon(0 30%, 8% 14%, 16% 26%, 26% 8%, 36% 22%, 46% 12%, 56% 28%, 66% 10%, 76% 24%, 86% 14%, 100% 26%, 100% 100%, 0 100%); }
#sky[data-arena="gjirokastra"] .r2 { height: 50%; background: #12141e; clip-path: polygon(0 36%, 12% 28%, 24% 40%, 38% 30%, 52% 42%, 66% 32%, 80% 44%, 100% 34%, 100% 100%, 0 100%); }
#sky[data-arena="tirana"] { background: radial-gradient(ellipse 90% 70% at 50% 22%, #3a2a5a 0%, #1e1832 50%, #0c0a18 100%); }
#sky[data-arena="tirana"] .r1 { height: 66%; background: #241e3a; clip-path: polygon(0 40%, 20% 18%, 34% 10%, 48% 20%, 62% 30%, 100% 38%, 100% 100%, 0 100%); }
#sky[data-arena="tirana"] .r2 { height: 40%; background-color: #16122a; clip-path: polygon(0 40%, 6% 40%, 6% 18%, 12% 18%, 12% 32%, 20% 32%, 20% 10%, 27% 10%, 27% 26%, 36% 26%, 36% 14%, 44% 14%, 44% 30%, 55% 30%, 55% 8%, 61% 8%, 61% 24%, 72% 24%, 72% 16%, 80% 16%, 80% 34%, 90% 34%, 90% 20%, 100% 20%, 100% 100%, 0 100%);
  background-image: radial-gradient(1.5px 2px at 30% 40%, #ffe0a0, transparent), radial-gradient(1.5px 2px at 60% 55%, #ffe0a0, transparent), radial-gradient(1.5px 2px at 80% 45%, #a0e0ff, transparent); background-size: 6vmin 4vmin; }
#sky[data-arena="korca"] { background: radial-gradient(ellipse 90% 70% at 50% 20%, #3a2a40 0%, #1e1622 50%, #0c0a10 100%); }
#sky[data-arena="korca"] .r1 { height: 56%; background: #241c28; clip-path: polygon(0 40%, 18% 30%, 36% 22%, 54% 14%, 72% 22%, 88% 32%, 100% 36%, 100% 100%, 0 100%); }
#sky[data-arena="korca"] .haze { background: linear-gradient(180deg, transparent, rgba(255,170,90,.14) 55%, rgba(12,10,16,.9)); }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#veil { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 34% 40% at 50% 48%, rgba(6,8,16,0) 40%, rgba(6,8,16,.75) 78%, rgba(6,8,16,1) 100%); }

/* ----------------------------------------------------------------- materiali comuni */
.hud { position: fixed; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.panel { background: linear-gradient(180deg, #2c1b10 0%, #1d120a 100%); border: 1px solid var(--filo); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.45), 0 10px 30px rgba(0,0,0,.45); }
.btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--filo); border-radius: 3px; background: linear-gradient(180deg, #3a2416, #23150c); color: var(--ivory); box-shadow: inset 0 1px 0 rgba(255,220,160,.12), 0 3px 10px rgba(0,0,0,.4); transition: transform .12s var(--ease), border-color .25s, filter .2s; }
.btn b { font: 700 13px/1 'Barlow'; letter-spacing: .16em; text-indent: .16em; }
.btn .sub { font: 600 12px/1 'Barlow'; color: var(--gold); display: flex; gap: 4px; align-items: center; }
.btn:hover { border-color: var(--brass); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.off { filter: grayscale(.8) brightness(.6); cursor: default; }
.btn.small { min-height: 40px; padding: 4px 10px; }
.btn.small b { font-size: 11px; }
.btn.go { min-height: 54px; background: linear-gradient(180deg, #b8262c, #7a1418); border-color: #e9b44c88; box-shadow: inset 0 1px 0 rgba(255,200,170,.3), 0 4px 16px rgba(160,20,20,.4); }
.btn.go b { font: 400 20px/1 'Young Serif'; letter-spacing: .08em; text-indent: .08em; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--filo); border-radius: 3px; background: linear-gradient(180deg, #3a2416, #23150c); padding: 0; }
.iconbtn svg { width: 22px; height: 22px; fill: var(--brass); }
.iconbtn.on { border-color: var(--gold); box-shadow: 0 0 12px rgba(233,180,76,.45); }
.iconbtn.on svg { fill: var(--gold); }
.coin { display: inline-block; width: 1em; height: 1em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c2, #e9b44c 45%, #a8731e 100%); box-shadow: inset 0 0 0 1px #7a5212; vertical-align: -0.12em; }
/* il ricamo: rombi rossi e neri su avorio, come i bordi delle qëndisje */
.embroidery { height: 7px; background:
  linear-gradient(135deg, transparent 0 25%, var(--red) 25% 50%, transparent 50% 75%, var(--red) 75%) 0 0 / 10px 10px,
  linear-gradient(45deg, transparent 0 25%, #1a0f0a 25% 50%, transparent 50% 75%, #1a0f0a 75%) 0 0 / 10px 10px, #e9dcc0; }

/* ----------------------------------------------------------------- in alto */
#top { position: fixed; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; }
#opt { position: fixed; top: max(8px, env(safe-area-inset-top)); right: 10px; }
.ribbon { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 12px; background: linear-gradient(180deg, #2c1b10, #1b1009); border: 1px solid var(--filo); border-radius: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.ribbon .num { font: 400 22px/1 'Young Serif'; color: var(--gold); letter-spacing: .02em; }
.ribbon .lbl { font: 600 11px/1.1 'Barlow'; letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.ribbon .lbl b { display: block; color: var(--ivory); font-weight: 700; letter-spacing: .12em; }
.pips { display: flex; gap: 5px; }
.pips i { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--filo); background: #1a110b; opacity: .55; }
.pips i svg { width: 12px; height: 12px; fill: var(--ivory); }
.pips i.now { opacity: 1; border-color: var(--gold); box-shadow: 0 0 10px rgba(233,180,76,.5); }
.pips i.done { opacity: .9; background: #3a2416; }
.pips i.mon svg { fill: #b88aff; }
.pips i.val svg { fill: var(--lantern); }

/* ----------------------------------------------------------------- tratti */
#traits { position: fixed; left: 10px; top: 72px; width: 196px; display: flex; flex-direction: column; gap: 5px; max-height: calc(100vh - 340px); overflow: auto; scrollbar-width: none; }
.trait { position: relative; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; background: linear-gradient(90deg, rgba(28,17,10,.97), rgba(28,17,10,.9)); border: 1px solid rgba(201,164,92,.22); border-left: 3px solid var(--tc); border-radius: 2px; text-align: left; }
.trait .ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #120b06; border: 1px solid var(--tc); }
.trait .ic svg { width: 18px; height: 18px; fill: var(--tc); }
.trait .nm { font: 700 12px/1 'Barlow'; letter-spacing: .12em; }
.trait .bp { display: flex; gap: 3px; margin-top: 4px; }
.trait .bp span { font: 600 10px/1 'Barlow'; padding: 2px 4px; border: 1px solid rgba(201,164,92,.25); border-radius: 2px; color: var(--dim); }
.trait .bp span.hit { color: #1a0f08; background: var(--tc); border-color: var(--tc); }
.trait .n { font: 400 18px/1 'Young Serif'; color: var(--dim); }
.trait.lit { background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 22%, #1c110a), rgba(28,17,10,.82)); border-color: color-mix(in srgb, var(--tc) 60%, transparent); }
.trait.lit .n { color: var(--ivory); }
.trait.lit .ic { background: var(--tc); }
.trait.lit .ic svg { fill: #140c06; }
.trait.off > * { opacity: .55; }   /* si attenua il contenuto, non il fondo: col fondo trasparente si vedevano i pali e le lanterne */

/* ----------------------------------------------------------------- i villaggi */
#ranks { position: fixed; right: 10px; top: 64px; width: 184px; display: flex; flex-direction: column; gap: 4px; }
.vil { display: grid; grid-template-columns: 38px 1fr; gap: 8px; align-items: center; padding: 4px 8px 4px 4px; background: linear-gradient(270deg, rgba(28,17,10,.97), rgba(28,17,10,.88)); border: 1px solid rgba(201,164,92,.2); border-radius: 2px; text-align: left; transition: transform .3s var(--ease); }
.vil .med { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--brass); background: radial-gradient(circle at 50% 40%, #3a2a48, #160f1e); overflow: hidden; display: grid; place-items: center; }
.vil .med img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.18) translateY(4%); }
.vil .nm { font: 700 12px/1 'Barlow'; letter-spacing: .1em; display: flex; justify-content: space-between; }
.vil .hp { position: relative; height: 7px; margin-top: 5px; background: #120b06; border-radius: 1px; overflow: hidden; }
.vil .hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #a8262c, #e04a4a); }
.vil .hp + .meta { display: flex; justify-content: space-between; margin-top: 3px; font: 600 10px/1 'Barlow'; color: var(--dim); }
.vil.me { border-color: var(--gold); box-shadow: 0 0 14px rgba(233,180,76,.25); }
.vil.me .med { border-color: var(--gold); }
.vil.dead { opacity: .38; filter: grayscale(1); }
.vil .streak { color: var(--lantern); }
.vil .streak.cold { color: #8fb0ff; }

/* ----------------------------------------------------------------- plaçka */
#items { position: fixed; left: 10px; bottom: 210px; display: flex; flex-wrap: wrap; gap: 6px; width: 104px; }
.tok { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--brass); background: radial-gradient(circle at 50% 35%, #3a2616, #170d07); display: grid; place-items: center; position: relative; touch-action: none; box-shadow: 0 4px 10px rgba(0,0,0,.45); }
.tok svg { width: 26px; height: 26px; }
.tok.full { border-color: var(--gold); background: radial-gradient(circle at 50% 35%, #4a3218, #1d1108); box-shadow: 0 0 12px rgba(233,180,76,.35), 0 4px 10px rgba(0,0,0,.45); }
.tok.full svg { width: 22px; height: 22px; }
.tok .two { display: flex; }
.tok .two svg { width: 17px; height: 17px; margin: 0 -2px; }
.tok.tool { border-color: #8fb0c8; }

/* ----------------------------------------------------------------- la bancarella */
#stall { position: fixed; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 10px; align-items: stretch; padding: 10px; background: linear-gradient(180deg, #2c1b10, #170d07); border: 1px solid var(--filo); border-radius: 4px; box-shadow: 0 -2px 0 rgba(0,0,0,.4), 0 12px 40px rgba(0,0,0,.6); }
#stall::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 7px; border-radius: 2px 2px 0 0;
  background: linear-gradient(135deg, transparent 0 25%, var(--red) 25% 50%, transparent 50% 75%, var(--red) 75%) 0 0 / 10px 10px, linear-gradient(45deg, transparent 0 25%, #1a0f0a 25% 50%, transparent 50% 75%, #1a0f0a 75%) 0 0 / 10px 10px, #e9dcc0; }
.side { display: flex; flex-direction: column; gap: 6px; width: 150px; }
.side .row { display: flex; gap: 6px; }
.side .row .btn { flex: 1; }
#fama { padding: 4px 2px; }
#fama .lv { display: flex; align-items: baseline; gap: 6px; font: 600 11px/1 'Barlow'; letter-spacing: .18em; color: var(--dim); }
#fama .lv b { font: 400 24px/1 'Young Serif'; color: var(--ivory); letter-spacing: 0; }
#fama .xp { height: 6px; margin-top: 5px; background: #120b06; border: 1px solid rgba(201,164,92,.25); border-radius: 1px; overflow: hidden; }
#fama .xp i { display: block; height: 100%; background: linear-gradient(90deg, #4a8ad6, #8ec2ff); transition: width .4s var(--ease); }
#fama .xpn { font: 600 10px/1 'Barlow'; color: var(--dim); margin-top: 3px; }
#purse { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 4px; border: 1px solid rgba(201,164,92,.25); border-radius: 3px; background: radial-gradient(ellipse at 50% 120%, rgba(233,180,76,.18), transparent 70%), #160d07; }
#purse .coin { width: 22px; height: 22px; }
#purse b { font: 400 28px/1 'Young Serif'; color: var(--gold); min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
#purse small { font: 600 11px/1.2 'Barlow'; color: var(--dim); }
#lock svg { width: 20px; height: 20px; }
#cards { display: flex; gap: 8px; }

.card { position: relative; width: 132px; height: 172px; padding: 0; border: 0; border-radius: 3px; background: var(--cc); box-shadow: 0 6px 16px rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden; touch-action: none; transition: transform .22s var(--ease), box-shadow .22s, opacity .2s; }
.card::after { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(255,240,200,.35); border-radius: 2px; pointer-events: none; }
.card .art { flex: 1; position: relative; margin: 3px 3px 0; border-radius: 2px 2px 0 0; overflow: hidden; background: var(--bd); }
.card .art img { position: absolute; left: 50%; bottom: -16%; height: 132%; transform: translateX(-50%); filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.card .art .tr { position: absolute; left: 4px; bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.card .art::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(180deg, transparent, rgba(10,6,3,.72)); pointer-events: none; }
.card .art .tr { z-index: 1; }
.card .art .tr i { display: flex; align-items: center; gap: 4px; height: 16px; padding: 0 2px; font: 700 9px/1 'Barlow'; letter-spacing: .1em; font-style: normal; color: var(--ivory); text-shadow: 0 1px 2px #000; }
.card .art .tr i svg { width: 13px; height: 13px; fill: var(--tc); }
.card .foot { display: flex; justify-content: space-between; align-items: center; height: 30px; margin: 0 3px 3px; padding: 0 7px; background: linear-gradient(180deg, #24150c, #140b06); border-radius: 0 0 2px 2px; }
.card .nm { font: 400 13px/1 'Young Serif'; letter-spacing: .01em; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .cost { display: flex; align-items: center; gap: 3px; font: 700 15px/1 'Barlow'; color: var(--gold); }
.card .badge { position: absolute; right: 6px; top: 6px; padding: 3px 6px; border-radius: 2px; background: rgba(233,180,76,.92); color: #1a0f08; font: 700 10px/1 'Barlow'; letter-spacing: .08em; }
.card.glow { box-shadow: 0 0 0 2px var(--hc), 0 0 22px color-mix(in srgb, var(--hc) 70%, transparent), 0 6px 16px rgba(0,0,0,.5); }
.card:hover { transform: translateY(-4px); }
.card.poor { filter: brightness(.55) saturate(.6); }
.card.sold { background: transparent; box-shadow: none; }
.card.sold::after { display: none; }
.card.sold .fold { position: absolute; inset: 3px; border-radius: 2px; background: repeating-linear-gradient(90deg, #5a1418 0 6px, #6e1a20 6px 12px); opacity: .5; display: grid; place-items: center; font: 700 10px/1 'Barlow'; letter-spacing: .3em; color: rgba(239,232,216,.6); }
.card.lift { transform: translateY(-30px) scale(1.04); opacity: 0; }

/* ----------------------------------------------------------------- fogli, toast, trascinamento */
#sheet { position: fixed; right: 10px; top: 64px; width: 320px; max-height: calc(100vh - 290px); z-index: 4; overflow: auto; padding: 0 0 12px; scrollbar-width: thin; }
#sheet .hd { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 52px 12px 12px; background: var(--bd, #1d120a); }
#sheet .hd img { width: 96px; height: 110px; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
#sheet h2 { margin: 6px 0 4px; font: 400 22px/1.05 'Young Serif'; }
#sheet .en { font: 600 11px/1.2 'Barlow'; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
#sheet .stars { color: var(--gold); letter-spacing: .1em; font-size: 15px; }
#sheet section { padding: 10px 14px 0; }
#sheet h3 { margin: 6px 0 6px; font: 700 11px/1 'Barlow'; letter-spacing: .24em; color: var(--brass); text-transform: uppercase; }
#sheet p { margin: 0 0 6px; font: 400 14px/1.4 'Barlow'; color: rgba(239,232,216,.86); }
#sheet .ab { font: 400 17px/1.1 'Young Serif'; color: var(--ivory); margin-bottom: 4px; }
#sheet .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
#sheet .nums span { padding: 5px 6px; background: #140b06; border: 1px solid rgba(201,164,92,.18); border-radius: 2px; font: 600 12px/1.2 'Barlow'; color: var(--dim); }
#sheet .nums span b { display: block; color: var(--ivory); font-size: 14px; font-variant-numeric: tabular-nums; }
#sheet .tlist { display: flex; flex-direction: column; gap: 4px; }
#sheet .tlist div { padding: 6px 8px; border-left: 3px solid var(--tc); background: #160d07; font: 400 12.5px/1.35 'Barlow'; color: var(--dim); }
#sheet .tlist div b { color: var(--ivory); letter-spacing: .1em; }
#sheet .act { display: flex; gap: 8px; padding: 12px 14px 0; }
#sheet .act .btn { flex: 1; }
#sheet .line { font: italic 400 14px/1.3 'Young Serif'; color: var(--brass); }
#sheet .x { position: absolute; right: 6px; top: 6px; }

#scoutbar { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 14px; border: 1px solid var(--gold); border-radius: 3px; background: rgba(22,13,7,.96); box-shadow: 0 8px 24px rgba(0,0,0,.5); font: 600 12px/1 'Barlow'; letter-spacing: .2em; color: var(--dim); }
#scoutbar b { font: 400 18px/1 'Young Serif'; letter-spacing: 0; color: var(--ivory); }
#toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toast div { padding: 8px 16px; border: 1px solid var(--filo); border-radius: 3px; background: rgba(22,13,7,.94); font: 600 14px/1.2 'Barlow'; letter-spacing: .04em; box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: toastIn .35s var(--ease); }
#toast div.bad { border-color: #c0282e; }
#toast div.big { font: 400 22px/1.1 'Young Serif'; padding: 12px 22px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.floatlbl { position: fixed; z-index: 8; pointer-events: none; font: 400 34px/1 'Young Serif'; color: #fff0c0; letter-spacing: .05em; text-shadow: 0 0 12px rgba(255,200,100,.9), 0 2px 0 #7a4a12, 0 4px 10px rgba(0,0,0,.6); white-space: nowrap; opacity: 0; }
.floatlbl.gold { color: #ffe08a; font-size: 44px; }
#drag { position: fixed; left: 0; top: 0; width: 96px; height: 120px; pointer-events: none; display: none; transform: translate(-50%, -70%); }
#drag img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 12px rgba(0,0,0,.6)); }
#drag.on { display: block; }
#sellzone { position: fixed; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(760px, 92vw); height: 190px; display: none; place-items: center; align-content: center; gap: 6px; border: 2px dashed rgba(233,180,76,.7); border-radius: 4px; background: rgba(110,26,32,.82); pointer-events: none; }
#sellzone span { font: 700 14px/1 'Barlow'; letter-spacing: .4em; }
#sellzone b { font: 400 34px/1 'Young Serif'; color: var(--gold); }
#sellzone.on { display: grid; }
#sellzone.hot { background: rgba(160,36,40,.92); border-color: var(--gold); }

/* ----------------------------------------------------------------- modale (Vallja, Amanete, esito) */
#modal { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 45%, rgba(14,18,34,.55), rgba(6,7,14,.88)); padding: 16px; }
#modal .box { width: min(980px, 100%); max-height: 100%; overflow: auto; padding: 18px; }
#modal .eyebrow, #boot .eyebrow { font: 600 11px/1 'Barlow'; letter-spacing: .34em; color: var(--brass); text-align: center; }
#modal h2 { margin: 8px 0 4px; font: 400 clamp(26px, 4vw, 38px)/1.05 'Young Serif'; text-align: center; }
#modal h2 em { color: var(--gold); font-style: normal; }
#modal .lead { text-align: center; color: var(--dim); margin: 0 0 14px; font-size: 14px; }
#modal .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.offer { padding: 12px; text-align: left; border: 1px solid var(--filo); border-radius: 3px; background: linear-gradient(180deg, #2c1b10, #1a0f08); min-height: 150px; display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--ease), border-color .2s; }
.offer:hover { transform: translateY(-3px); border-color: var(--gold); }
.offer .tier { font: 700 10px/1 'Barlow'; letter-spacing: .24em; }
.offer h4 { margin: 0; font: 400 18px/1.1 'Young Serif'; }
.offer p { margin: 0; font: 400 13px/1.35 'Barlow'; color: var(--dim); }
.offer.t1 { border-color: #9aa6b4; } .offer.t1 .tier { color: #c8d0da; }
.offer.t2 .tier { color: var(--gold); }
.offer.t3 { border-color: #c8a0ff; background: linear-gradient(180deg, #2c1b2c, #1a0f18); } .offer.t3 .tier { color: #d8b8ff; }
.dancer { position: relative; padding: 0; overflow: hidden; height: 190px; border: 1px solid var(--filo); border-radius: 3px; background: var(--bd); }
.dancer img { position: absolute; left: 50%; bottom: 26px; height: 130px; transform: translateX(-50%); }
.dancer .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px; background: rgba(14,9,5,.9); font: 400 14px/1 'Young Serif'; }
.dancer .it { position: absolute; right: 6px; top: 6px; }
.dancer.taken { opacity: .3; filter: grayscale(1); }
.dancer:not(.taken):hover { border-color: var(--gold); }
.mrow { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }

/* ----------------------------------------------------------------- avvio */
#boot { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #1b2140, #0b0e1c); transition: opacity .6s var(--ease); z-index: 20; }
#boot.gone { opacity: 0; pointer-events: none; }
#boot h1 { margin: 10px 0 18px; font: 400 clamp(40px, 8vw, 84px)/0.95 'Young Serif'; text-align: center; }
#boot h1 em { font-style: normal; color: var(--gold); }
#boot .bar { width: 220px; height: 3px; margin: 0 auto; background: rgba(201,164,92,.2); }
#boot .bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }
#boot p { text-align: center; color: var(--dim); font-size: 13px; letter-spacing: .1em; }
#nojs { position: fixed; inset: 0; display: grid; place-items: center; background: var(--night); }

/* ================================================================= telefono in verticale */
/* ================================================================= la lotta (A3) */
#vs { gap: 12px; padding: 5px 12px; }
#vs .vside { display: flex; align-items: center; gap: 8px; min-width: 0; }
#vs .med { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--brass); overflow: hidden; background: radial-gradient(circle at 50% 40%, #3a2a48, #160f1e); display: grid; place-items: center; }
#vs .med img { width: 118%; height: 118%; object-fit: cover; }
#vs .me .med { border-color: #6fd35e; } #vs .them .med { border-color: #e0473a; }
#vs .nm { font: 400 15px/1 'Young Serif'; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vs .nm small { font: 600 10px Barlow; color: var(--dim); letter-spacing: .12em; }
#vs .mid { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
#vs .clock { font: 700 18px/1 'Barlow'; color: var(--gold); font-variant-numeric: tabular-nums; }
#vs .ot { margin-top: 3px; padding: 2px 6px; border-radius: 2px; background: #8a1a14; color: #ffe0c8; font: 700 9px/1 Barlow; letter-spacing: .14em; white-space: nowrap; animation: otPulse .8s ease-in-out infinite alternate; }
@keyframes otPulse { to { background: #c8281e; } }
#vs .ot:not(.hot) { background: #6a4a14; animation: none; }
body.fighting #arrange, body.fighting #undo { display: none; }
.bpop { position: fixed; left: 0; top: 0; z-index: 6; pointer-events: none; visibility: hidden; padding: 4px 9px 5px; border-radius: 2px; background: linear-gradient(180deg, rgba(44,27,16,.95), rgba(23,13,7,.95)); border: 1px solid var(--filo); box-shadow: 0 6px 14px rgba(0,0,0,.5); text-align: center; white-space: nowrap; transform-origin: 50% 100%; will-change: transform, opacity; }
.bpop b { display: block; font: 400 14px/1.1 'Young Serif'; color: var(--ivory); letter-spacing: .02em; }
.bpop i { display: block; margin-top: 2px; font: italic 600 11px/1.15 Barlow; color: var(--dim); }
.bpop.mine { border-color: rgba(111,211,94,.6); } .bpop.mine b { color: #eaffdc; }
.bpop.theirs { border-color: rgba(224,71,58,.6); } .bpop.theirs b { color: #ffdcd4; }
.bpop.gold { border-color: var(--gold); } .bpop.gold b { color: #ffe08a; }
.bpop.secret { border-color: #b57bff; background: linear-gradient(180deg, rgba(48,26,72,.96), rgba(22,12,36,.96)); } .bpop.secret b { color: #f0dcff; }
.bpop.boss { border-color: #ff7a3a; } .bpop.boss b { color: #ffd4b4; }
.bpop.line { background: rgba(239,232,216,.95); border-color: transparent; padding: 3px 8px 4px; } .bpop.line i, .bpop.line b { color: #2a1a10; margin: 0; font-size: 12px; }
#banner { position: fixed; left: 50%; top: 44%; transform: translate(-50%,-50%); z-index: 7; pointer-events: none; text-align: center; padding: 14px 36px 16px; min-width: 220px; background: linear-gradient(180deg, rgba(44,27,16,.96), rgba(23,13,7,.96)); border: 1px solid var(--gold); border-radius: 3px; box-shadow: 0 0 0 4px rgba(0,0,0,.35), 0 18px 50px rgba(0,0,0,.6); }
#banner::before { content: ''; position: absolute; left: 8px; right: 8px; top: 5px; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 10px); opacity: .55; }
#banner .t { font: 400 46px/1 'Young Serif'; letter-spacing: .08em; color: #ffe08a; text-shadow: 0 0 18px rgba(255,200,100,.55); }
#banner .s { margin-top: 6px; font: 600 13px/1.2 Barlow; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
#banner.lost { border-color: #c0282e; } #banner.lost .t { color: #ff9a8a; text-shadow: 0 0 18px rgba(255,80,60,.45); }
#banner.draw .t { color: var(--ivory); text-shadow: none; }
#banner.cross { top: 30%; background: rgba(20,13,8,.82); border-color: var(--filo); }
#banner.cross .t { font-size: 30px; color: var(--ivory); letter-spacing: .3em; text-indent: .3em; text-shadow: none; }

@media (max-aspect-ratio: 1/1) {
  #top { left: 8px; right: 60px; transform: none; justify-content: flex-start; }
  .ribbon { padding: 5px 10px; gap: 8px; }
  .ribbon .num { font-size: 18px; }
  .pips i { width: 16px; height: 16px; } .pips i svg { width: 10px; height: 10px; }
  #ranks { left: 6px; right: 6px; top: calc(max(8px, env(safe-area-inset-top)) + 50px); width: auto; flex-direction: row; justify-content: space-between; gap: 2px; }
  .vil { grid-template-columns: 1fr; padding: 0; gap: 2px; background: none; border: 0; justify-items: center; }
  .vil .med { width: 38px; height: 38px; }
  .vil .body { width: 42px; }
  .vil .nm { display: none; }
  .vil .hp { margin-top: 2px; height: 5px; }
  .vil .hp + .meta { justify-content: center; }
  .vil .hp + .meta span:first-child { display: none; }
  .vil.me { box-shadow: none; }
  #traits { left: 6px; right: 6px; top: auto; bottom: calc(max(8px, env(safe-area-inset-bottom)) + 214px); width: auto; flex-direction: row; overflow-x: auto; max-height: none; gap: 4px; }
  .trait { flex: 0 0 auto; grid-template-columns: 24px auto auto; gap: 5px; padding: 3px 7px 3px 3px; }
  .trait .ic { width: 24px; height: 24px; } .trait .ic svg { width: 14px; height: 14px; }
  .trait .nm { font-size: 10px; } .trait .bp { display: none; }
  .trait .n { font-size: 14px; }
  #items { left: 6px; bottom: auto; top: calc(max(8px, env(safe-area-inset-top)) + 112px); width: calc(100vw - 120px); flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; min-height: 0; }
  .tok { width: 40px; height: 40px; flex: 0 0 auto; }
  #stall { left: 6px; right: 6px; transform: none; flex-direction: column; gap: 8px; padding: 8px; }
  #cards { order: 1; gap: 5px; }
  .card { flex: 1; width: auto; height: 116px; min-width: 0; }
  .card .art .tr i span { display: none; }
  .card .art .tr i { padding: 0 2px; }
  .card .foot { height: 24px; padding: 0 4px; }
  .card .nm { font-size: 10px; }
  .card .cost { font-size: 12px; }
  .side { width: auto; flex-direction: row; order: 2; }
  #left { display: contents; }
  #fama { display: none; }
  #right { display: contents; }
  #stall > .side, #stall .row { gap: 5px; }
  #stall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.1fr) repeat(2, minmax(0, 1fr)); grid-template-areas: "c c c c c" "x r p a g" "f f f f f"; }
  #cards { min-width: 0; } .card { min-width: 0; }
  #cards { grid-area: c; }
  #xp { grid-area: x; } #roll { grid-area: r; } #purse { grid-area: p; } #right .row { display: contents; }
  #arrange { grid-area: a; } #go { grid-area: g; }
  #lock, #undo { position: fixed; top: calc(max(8px, env(safe-area-inset-top)) + 110px); right: 56px; width: 44px; min-height: 44px; height: 44px; }
  #undo { right: 6px; padding: 0; }
  #undo b { font-size: 9px; letter-spacing: .05em; text-indent: 0; }
  .btn { min-height: 46px; padding: 4px 4px; }
  .btn b { font-size: 11px; letter-spacing: .1em; }
  .btn.go b { font-size: 16px; }
  #purse { padding: 4px; } #purse b { font-size: 22px; } #purse .coin { width: 18px; height: 18px; } #purse small { display: none; }
  #sheet { left: 6px; right: 6px; top: auto; bottom: calc(max(8px, env(safe-area-inset-bottom)) + 4px); width: auto; max-height: 62vh; z-index: 5; }
  #sellzone { width: calc(100vw - 12px); height: 196px; }
  #scoutbar { top: max(8px, env(safe-area-inset-top)); left: 6px; right: 56px; transform: none; justify-content: space-between; z-index: 3; }
  .btn b { font-size: clamp(9px, 2.9vw, 11px); letter-spacing: .06em; text-indent: .06em; }
  .btn.go b { font-size: clamp(12px, 4.1vw, 16px); letter-spacing: .02em; }
}
/* ================================================================= telefono in orizzontale (poca altezza) */
@media (min-aspect-ratio: 1/1) and (max-height: 560px) {
  #top { top: max(4px, env(safe-area-inset-top)); }
  .ribbon { padding: 3px 10px; gap: 8px; } .ribbon .num { font-size: 16px; } .ribbon .lbl { font-size: 9px; }
  .pips i { width: 15px; height: 15px; } .pips i svg { width: 9px; height: 9px; }
  #opt { top: 4px; right: 6px; width: 38px; height: 38px; }
  #traits { top: 44px; left: max(6px, env(safe-area-inset-left)); width: 52px; max-height: calc(100vh - 186px); gap: 3px; }
  .trait { grid-template-columns: 1fr; justify-items: center; padding: 3px 2px; gap: 1px; border-left-width: 2px; }
  .trait .ic { width: 26px; height: 26px; } .trait .ic svg { width: 15px; height: 15px; }
  .trait .nm, .trait .bp { display: none; } .trait .n { font-size: 13px; }
  #ranks { top: 46px; right: max(6px, env(safe-area-inset-right)); width: 46px; gap: 1px; }
  .vil { grid-template-columns: 1fr; padding: 1px; gap: 0; justify-items: center; }
  .vil .med { width: 27px; height: 27px; border-width: 1.5px; }
  .vil .body { width: 42px; } .vil .nm { display: none; } .vil .hp { height: 4px; margin-top: 1px; }
  .vil .hp + .meta { justify-content: center; font-size: 9px; } .vil .hp + .meta span:first-child { display: none; }
  #items { left: 64px; bottom: 136px; width: 92px; } .tok { width: 36px; height: 36px; } .tok svg { width: 22px; height: 22px; }
  #stall { padding: 6px; gap: 6px; bottom: max(4px, env(safe-area-inset-bottom)); }
  .side { width: 104px; gap: 4px; }
  #fama { display: none; }
  .btn { min-height: 34px; padding: 3px 6px; } .btn b { font-size: 10px; letter-spacing: .1em; } .btn .sub { font-size: 10px; }
  .btn.small { min-height: 30px; } .btn.small b { font-size: 9px; }
  #undo { position: fixed; top: 4px; right: 50px; min-height: 38px; height: 38px; }
  .btn.go { min-height: 38px; } .btn.go b { font-size: 15px; }
  .iconbtn { width: 34px; height: 34px; }
  #purse { padding: 2px; } #purse b { font-size: 18px; } #purse .coin { width: 15px; height: 15px; } #purse small { display: none; }
  #cards { gap: 5px; }
  .card { width: 84px; height: 108px; }
  .card .foot { height: 22px; padding: 0 4px; } .card .nm { font-size: 10px; } .card .cost { font-size: 11px; }
  .card .art .tr i span { display: none; }
  #sheet { top: 46px; right: 64px; width: 300px; max-height: calc(100vh - 60px); }
  #sellzone { height: 124px; }
}
/* la lotta sui telefoni */
@media (max-aspect-ratio: 1/1) {
  body.fighting #stage { display: none; }
  body.fighting .btn.go b { font-size: clamp(10px, 3.3vw, 13px); letter-spacing: .04em; text-indent: .04em; }
  body.fighting .btn.go .sub { display: none; }
  #vs { flex: 1 1 auto; justify-content: space-between; gap: 6px; padding: 4px 8px; }
  #vs .nm { font-size: 12px; max-width: 26vw; } #vs .med { width: 24px; height: 24px; }
  #banner .t { font-size: 36px; } #banner { padding: 10px 22px 12px; top: 40%; }
}
@media (min-aspect-ratio: 1/1) and (max-height: 560px) {
  #vs { padding: 3px 8px; gap: 8px; } #vs .med { width: 22px; height: 22px; } #vs .nm { font-size: 12px; } #vs .clock { font-size: 14px; }
  #banner .t { font-size: 32px; } #banner { padding: 8px 20px 10px; }
}

/* ================================================================= A4: la soglia */
#title { position: fixed; inset: 0; z-index: 12; display: grid; align-items: end; justify-items: center; padding: 20px 16px calc(max(18px, env(safe-area-inset-bottom)) + 8px);
  background: radial-gradient(ellipse 70% 55% at 50% 38%, rgba(6,8,18,0) 0%, rgba(6,8,18,.35) 55%, rgba(6,8,18,.92) 100%); pointer-events: auto; }
#title .t-in { width: min(720px, 100%); text-align: center; }
#title .eyebrow { font: 600 11px/1 'Barlow'; letter-spacing: .38em; color: var(--brass); }
#title h1 { margin: 8px 0 6px; font: 400 clamp(46px, 9vw, 96px)/0.95 'Young Serif'; text-shadow: 0 6px 30px rgba(0,0,0,.6); }
#title h1 em { font-style: normal; color: var(--gold); }
#title .rec { margin: 0 auto 16px; max-width: 520px; color: var(--dim); font: 500 14px/1.45 'Barlow'; letter-spacing: .02em; }
#title .t-col { display: grid; gap: 10px; width: min(380px, 100%); margin: 0 auto; }
#title .t-row { display: flex; gap: 10px; justify-content: center; margin-top: 2px; }
#title .t-row .btn { flex: 1; }
#title .btn.big { min-height: 62px; } #title .btn.big b { font-size: 16px; letter-spacing: .2em; }
#title .t-sec { margin: 6px 0 12px; } #title h3 { margin: 0 0 8px; font: 700 11px/1 'Barlow'; letter-spacing: .26em; color: var(--brass); text-transform: uppercase; }
#title .masc { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
#title .m { display: grid; justify-items: center; gap: 4px; padding: 6px 4px 8px; border: 1px solid var(--filo); border-radius: 3px; background: linear-gradient(180deg, #2c1b10, #170d07); color: var(--dim); font: 600 10px/1.15 'Barlow'; }
#title .m img { width: 100%; max-width: 74px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid var(--brass); background: radial-gradient(circle at 50% 40%, #3a2a48, #160f1e); }
#title .m.on { border-color: var(--gold); color: var(--ivory); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(233,180,76,.35); }
#title .diff { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#title .d { padding: 10px 10px 12px; text-align: left; border: 1px solid var(--filo); border-radius: 3px; background: linear-gradient(180deg, #2c1b10, #170d07); color: var(--dim); }
#title .d b { display: block; margin-bottom: 4px; font: 400 18px/1 'Young Serif'; color: var(--ivory); }
#title .d span { font: 500 12px/1.35 'Barlow'; }
#title .d.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(233,180,76,.3); }
body.titled #hud > *:not(#toast) { visibility: hidden; }
/* la Vallja (A4): la striscia sotto la danza, al posto della finestra piena */
#modal.valle { inset: auto 0 0 0; padding: 0 8px max(8px, env(safe-area-inset-bottom)); background: none; pointer-events: none; place-items: end center; }
#modal.valle .box { pointer-events: auto; width: min(1040px, 100%); padding: 8px 10px 10px; }
#modal.valle .vhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
#modal.valle .vhead b { font: 400 18px/1 'Young Serif'; color: var(--ivory); } #modal.valle .vhead b.me { color: var(--gold); animation: turnPulse 1s ease-in-out 4 alternate; }   /* quattro battiti e basta: un'animazione infinita ridipinge a ogni fotogramma */
@keyframes turnPulse { to { text-shadow: 0 0 14px rgba(255,200,90,.85); } }
#modal.valle .vhead small { color: var(--dim); font: 600 11px Barlow; letter-spacing: .06em; }
#modal.valle .grid { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
#modal.valle .dancer { height: 104px; }
#modal.valle .dancer img:first-child { height: 72px; bottom: 24px; }
#modal.valle .dancer .nm { padding: 4px 4px 3px; font-size: 11px; line-height: 1.05; } #modal.valle .dancer .nm small { display: block; font: 600 9px Barlow; color: var(--dim); }
#modal.valle .dancer .it { width: 26px; height: 26px; right: 3px; top: 3px; } #modal.valle .dancer .it svg { width: 16px; height: 16px; }
#modal.valle .dancer .by { position: absolute; left: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; background: #1c1424; opacity: 1; filter: none; }
#modal.valle .dancer.taken { opacity: .55; }
/* la barra della Kuçedra */
#bossbar { position: fixed; left: 50%; top: calc(max(8px, env(safe-area-inset-top)) + 58px); transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); z-index: 4; pointer-events: none; padding: 6px 10px 8px; border: 1px solid #2f6a52; border-radius: 3px; background: linear-gradient(180deg, rgba(14,24,20,.94), rgba(8,14,12,.94)); box-shadow: 0 8px 26px rgba(0,0,0,.5); }
#bossbar .nm { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; } #bossbar .nm b { font: 400 18px/1 'Young Serif'; color: #e8f4e8; } #bossbar .nm span { font: 600 11px Barlow; letter-spacing: .12em; color: #8fb8a0; }
#bossbar .nm em { margin-left: auto; font: 700 10px Barlow; letter-spacing: .18em; font-style: normal; color: #ffd27a; }
#bossbar .bar { position: relative; height: 12px; border: 1px solid #0a120e; background: #142420; border-top-color: #c9a45c; }
#bossbar .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg, #5ad08a, #2f8a5a); transition: width .25s linear; }
#bossbar.p2 .bar i { background: linear-gradient(180deg, #e8b04a, #b0782a); } #bossbar.p3 .bar i { background: linear-gradient(180deg, #ff6a3a, #b0301e); }
#bossbar .bar s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #e8d8b8; text-decoration: none; }
@media (max-aspect-ratio: 1/1) { #bossbar { top: calc(max(8px, env(safe-area-inset-top)) + 104px); } }
/* gli Amanete (A4): tre cofanetti del loro materiale che si aprono uno dopo l'altro */
.offer { position: relative; overflow: hidden; padding: 0 0 12px; perspective: 600px; }
.offer .lid { display: block; height: 74px; margin-bottom: 8px; position: relative; border-bottom: 2px solid rgba(0,0,0,.4);
  background: radial-gradient(ellipse 60% 70% at 50% 120%, rgba(255,255,255,.25), transparent 60%), linear-gradient(180deg, #5a4630, #2c1b10); }
.offer .lid::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, var(--m2) 45%, var(--m3)); box-shadow: 0 0 18px var(--m2); }
.offer .tier, .offer h4, .offer p { padding: 0 12px; }
.offer.t1 { --m2: #c8d0da; --m3: #6a7480; } .offer.t1 .lid { background: radial-gradient(ellipse 60% 70% at 50% 120%, rgba(255,255,255,.35), transparent 60%), repeating-linear-gradient(90deg, #8a96a4 0 2px, #6a7684 2px 6px), linear-gradient(180deg, #a8b2be, #4a5462); }
.offer.t2 { --m2: #ffd87a; --m3: #a8721e; border-color: var(--gold); } .offer.t2 .lid { background: radial-gradient(ellipse 60% 70% at 50% 120%, rgba(255,240,200,.45), transparent 60%), repeating-linear-gradient(90deg, #d8a43a 0 2px, #b8842a 2px 6px), linear-gradient(180deg, #f0c86a, #8a5a18); }
.offer.t3 { --m2: #f0dcff; --m3: #8a6ab0; } .offer.t3 .lid { background: radial-gradient(circle at 20% 30%, transparent 8px, rgba(240,220,255,.55) 9px 10px, transparent 11px) 0 0 / 26px 26px, radial-gradient(circle at 70% 70%, transparent 6px, rgba(240,220,255,.45) 7px 8px, transparent 9px) 0 0 / 26px 26px, linear-gradient(180deg, #8a6ab0, #2c1b3c); }
.offer .lid { transform-origin: 50% 100%; }
/* i volumi */
#sheet .vol { display: grid; gap: 8px; }
#sheet .vol label { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; font: 600 13px Barlow; color: var(--dim); }
#sheet .vol input[type=range] { accent-color: var(--gold); }
#sheet .vol .mute { grid-template-columns: auto 1fr; }
#sheet .qual { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
#sheet .qual .btn { min-width: 0; padding-left: 4px; padding-right: 4px; }
#sheet .qual .btn.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold); }
/* la ruota delle emote */
#emote { position: fixed; left: 12px; bottom: 150px; z-index: 3; }
#emote .wheel { position: absolute; left: 0; bottom: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; border: 1px solid var(--filo); border-radius: 3px; background: rgba(22,13,7,.96); box-shadow: 0 10px 30px rgba(0,0,0,.5); width: 200px; }
#emote .wheel button { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 1px solid var(--filo); border-radius: 3px; background: linear-gradient(180deg, #3a2416, #23150c); color: var(--ivory); }
#emote .wheel span { font-size: 22px; line-height: 1; } #emote .wheel small { font: 600 10px Barlow; letter-spacing: .06em; color: var(--dim); }
body.titled #emote, body.ended #emote { display: none; }
@media (max-aspect-ratio: 1/1) { #emote { left: auto; right: 8px; bottom: calc(max(8px, env(safe-area-inset-bottom)) + 258px); } #emote .wheel { left: auto; right: 0; } }
@media (min-aspect-ratio: 1/1) and (max-height: 560px) { #emote { left: 8px; bottom: 96px; } }
/* il cut-in */
#cutin { position: fixed; left: 0; right: 0; top: 30%; height: 30vh; min-height: 170px; z-index: 11; pointer-events: none; display: grid; place-items: center; }
#cutin .band { position: absolute; inset: 0; transform: skewY(-4deg); background: linear-gradient(90deg, rgba(40,22,8,.96), rgba(84,52,14,.96) 50%, rgba(40,22,8,.96)); border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); box-shadow: 0 0 60px rgba(233,180,76,.35); }
#cutin.secret .band { background: linear-gradient(90deg, rgba(28,14,44,.96), rgba(66,34,98,.96) 50%, rgba(28,14,44,.96)); border-color: #c58bff; box-shadow: 0 0 60px rgba(197,139,255,.35); }
#cutin .p { position: absolute; bottom: -4%; height: 118%; max-width: 40vw; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.7)); }
#cutin .p0 { left: 6%; } #cutin .p1 { right: 6%; }
#cutin.gold .p0 { left: 12%; height: 132%; max-width: 28vw; }
#cutin .txt { position: relative; text-align: center; max-width: 52vw; }
#cutin.gold .txt { margin-left: 26vw; text-align: left; max-width: 60vw; }
#cutin .eyebrow { font: 700 12px Barlow; letter-spacing: .34em; color: #ffe08a; }
#cutin.secret .eyebrow { color: #e8d0ff; }
#cutin b { display: block; margin: 6px 0; font: 400 clamp(26px, 4.4vw, 54px)/1 'Young Serif'; color: #fff4d8; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
#cutin i { display: block; font: italic 500 clamp(13px, 1.6vw, 18px) Barlow; color: rgba(255,244,216,.85); }
body.valling #stall, body.valling #items, body.valling #lock, body.valling #undo { display: none; }
/* la fine: resta solo il podio col suo pannello (e le impostazioni) */
body.ended #stall, body.ended #traits, body.ended #items, body.ended #ranks, body.ended #top, body.ended #undo, body.ended #lock, body.ended #sheet, body.ended #modal { display: none !important; }
#title .t-in.new { padding: 16px 18px 14px; border-radius: 4px; background: rgba(14,9,6,.86); border: 1px solid var(--filo); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
#title .t-in.new h1 { font-size: clamp(32px, 5vw, 52px); }

/* ================================================================= A4: la fine, accanto al podio */
#endpanel { position: fixed; right: 14px; top: 14px; bottom: 14px; width: min(420px, calc(100vw - 28px)); z-index: 9; overflow: auto; padding: 18px 18px 14px; }
#endpanel .eyebrow { font: 600 11px/1 'Barlow'; letter-spacing: .34em; color: var(--brass); }
#endpanel h2 { margin: 6px 0 4px; font: 400 36px/1.05 'Young Serif'; } #endpanel h2 em { font-style: normal; color: var(--gold); }
#endpanel .lead { margin: 0 0 12px; color: var(--dim); font-size: 14px; }
#endpanel .mvp, #book .mvp { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--filo); border-radius: 3px; background: rgba(0,0,0,.25); }
#endpanel .mvp img, #book .mvp img { width: 64px; height: 78px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
#endpanel .mvp b, #book .mvp b { font: 400 18px/1.1 'Young Serif'; } #endpanel .mvp span, #book .mvp span { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.en { font: 600 10px/1.2 'Barlow'; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
#endpanel .best { margin: 8px 0 0; padding: 7px 10px; border-left: 3px solid var(--gold); background: rgba(233,180,76,.08); font-size: 13px; }
#endpanel .best span { display: block; font: 600 10px Barlow; letter-spacing: .2em; color: var(--brass); text-transform: uppercase; }
#endpanel .best b { font: 400 16px 'Young Serif'; color: #ffe08a; } #endpanel .best i { color: var(--dim); font-style: normal; font-size: 12px; }
#endpanel section h3 { margin: 14px 0 6px; font: 700 11px/1 'Barlow'; letter-spacing: .24em; color: var(--brass); text-transform: uppercase; }
#endpanel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
#endpanel li { padding: 7px 10px; border: 1px solid rgba(201,164,92,.18); border-radius: 2px; background: #140b06; font: 500 13px/1.4 'Barlow'; }
#endpanel li.fell { border-left: 3px solid #c0282e; } #endpanel li.items { border-left: 3px solid var(--gold); } #endpanel li.interest { border-left: 3px solid #5aa25a; } #endpanel li.run { border-left: 3px solid #8a6ad0; }
#endpanel .order { margin: 12px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
#endpanel .order li { display: flex; align-items: center; gap: 6px; padding: 3px 6px; background: none; border: 0; font: 600 12px Barlow; color: var(--dim); }
#endpanel .order li.me { color: var(--ivory); } #endpanel .order .pl { width: 18px; font: 400 15px 'Young Serif'; color: var(--gold); }
#endpanel .order img { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--brass); background: #1c1424; object-fit: cover; }
#endpanel .mrow { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; } #endpanel .mrow .btn { flex: 1; }
/* A6: LUAJ PËRSËRI andava a capo (Young Serif 20px in un terzo di riga): l'azione principale prende una riga intera,
   ENCIKLOPEDIA e HISTORIKU stanno sotto, una accanto all'altra */
#endpanel .mrow .btn.go { flex: 1 1 100%; } #endpanel .mrow .btn.go b { white-space: nowrap; }

/* ================================================================= A4: il libro della fiera */
#book { position: fixed; inset: 0; z-index: 14; display: grid; place-items: center; padding: 14px; background: rgba(6,7,14,.78); }
#book .b-in { width: min(1100px, 100%); height: min(860px, 100%); display: grid; grid-template-rows: auto auto 1fr; border-radius: 4px; overflow: hidden;
  background: linear-gradient(180deg, #f1e8d4, #e6dbc2); color: #2a1a10; border: 1px solid #c9a45c; box-shadow: 0 0 0 6px #2c1b10, 0 0 0 7px var(--filo), 0 30px 80px rgba(0,0,0,.7); }
#book header { position: relative; padding: 14px 20px 8px; text-align: center; border-bottom: 1px solid rgba(90,58,30,.25); }
#book header .eyebrow { font: 600 11px Barlow; letter-spacing: .34em; color: #8a6a3a; } #book header h2 { margin: 2px 0 0; font: 400 32px/1 'Young Serif'; color: #2a1a10; }
#book header .x { position: absolute; right: 10px; top: 10px; } #book header .x svg { fill: #5a3a1e; }
#book nav { display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; border-bottom: 1px solid rgba(90,58,30,.25); scrollbar-width: none; }
#book nav button { flex: 0 0 auto; padding: 10px 12px 9px; border: 0; background: none; color: #6a4a2a; font: 700 12px Barlow; letter-spacing: .16em; text-transform: uppercase; border-bottom: 2px solid transparent; }
#book nav button.on { color: #2a1a10; border-bottom-color: #b0782a; }
#book .pages { overflow: auto; padding: 14px 18px 20px; }
#book .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
#book .grid.wide { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
#book .grid.small { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
#book article { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px; border: 1px solid rgba(90,58,30,.2); border-radius: 3px; background: rgba(255,250,238,.6); }
#book article h4 { margin: 0 0 2px; font: 400 17px/1.15 'Young Serif'; color: #2a1a10; }
#book article p { margin: 4px 0 0; font: 500 13px/1.4 'Barlow'; color: #3a2a1a; }
#book .figs img { width: 66px; height: 80px; object-fit: contain; border-radius: 3px; border-bottom: 3px solid var(--cc); background: radial-gradient(ellipse at 50% 80%, #3a2418, #1a0e07); }
#book .en { color: #8a6a3a; }
#book .tr { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
#book .tr i, #book .hist .tr i { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px 2px 3px; border-radius: 2px; font: 700 10px Barlow; letter-spacing: .08em; font-style: normal; color: #fff; background: color-mix(in srgb, var(--tc) 80%, #000); }
#book .tr i svg, #book .hist .tr i svg { width: 12px; height: 12px; fill: #fff; }
#book .line { font-style: italic; color: #6a4a2a !important; }
#book .ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--tc); } #book .ic svg { width: 24px; height: 24px; fill: #fff; }
#book .who { display: flex; gap: 3px; margin-top: 6px; } #book .who img { width: 28px; height: 34px; object-fit: contain; background: #2a1a10; border-radius: 2px; }
#book .sub { margin: 14px 0 8px; font: 700 12px Barlow; letter-spacing: .24em; color: #8a6a3a; text-transform: uppercase; }
#book .tok { width: 42px; height: 42px; }
#book .am { grid-template-columns: 1fr; border-left: 4px solid #b8bcc4; } #book .am.t2 { border-left-color: #e3a93a; } #book .am.t3 { border-left-color: #c8b0e8; background: linear-gradient(90deg, rgba(200,176,232,.18), rgba(255,250,238,.6)); }
#book .sec .pair { display: flex; align-items: center; gap: 4px; font: 400 18px 'Young Serif'; color: #8a6a3a; } #book .sec .pair img { width: 48px; height: 58px; object-fit: contain; background: #2a1a10; border-radius: 3px; }
#book .sec .q { width: 48px; height: 58px; display: grid; place-items: center; background: #3a2a1a; color: #c9a45c; border-radius: 3px; }
#book article.locked { opacity: .62; }
#book .note { color: #6a4a2a; font: 500 14px/1.45 Barlow; max-width: 680px; }
#book .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
#book .stats div { padding: 12px; text-align: center; border: 1px solid rgba(90,58,30,.2); background: rgba(255,250,238,.6); border-radius: 3px; }
#book .stats b { display: block; font: 400 34px/1 'Young Serif'; color: #8a4a12; } #book .stats span { font: 600 11px Barlow; letter-spacing: .14em; color: #6a4a2a; text-transform: uppercase; }
#book .mvp { background: rgba(42,26,16,.9); color: var(--ivory); }
#book .hist { grid-template-columns: 54px 1fr auto; align-items: center; margin-bottom: 8px; }
#book .hist .place { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 400 24px 'Young Serif'; color: #fff; background: #6a5a4a; }
#book .hist .place.p1 { background: #d49a2c; } #book .hist .place.p2 { background: #9aa0aa; } #book .hist .place.p3 { background: #a8683a; } #book .hist .place.p4 { background: #5a8a5a; }
#book .hist .meta { display: grid; gap: 2px; font: 500 13px Barlow; color: #3a2a1a; } #book .hist .meta b { font: 400 16px 'Young Serif'; }
#book .mini { display: grid; grid-template-columns: repeat(15, 14px); grid-template-rows: repeat(4, 24px); gap: 1px 0; padding: 4px; background: #2a1a10; border-radius: 3px; }
#book .mini i { position: relative; display: grid; place-items: center; background: rgba(214,190,150,.18); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
#book .mini img { width: 26px; height: 24px; object-fit: contain; } #book .mini s { position: absolute; bottom: -2px; font-size: 7px; color: #ffe08a; text-decoration: none; }
@media (max-aspect-ratio: 1/1) {
  #modal.valle .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } #modal.valle .dancer { height: 86px; } #modal.valle .dancer img:first-child { height: 56px; }
  #title .masc { grid-template-columns: repeat(3, 1fr); } #title .diff { grid-template-columns: 1fr; } #title .d { padding: 8px 10px; }
  #endpanel { top: auto; left: 8px; right: 8px; width: auto; max-height: 56vh; bottom: max(8px, env(safe-area-inset-bottom)); }
  #book { padding: 0; } #book .b-in { height: 100%; border-radius: 0; }
  #book .grid, #book .grid.wide, #book .grid.small { grid-template-columns: 1fr; }
  #book .hist { grid-template-columns: 46px 1fr; } #book .hist .mini { grid-column: 1 / -1; justify-self: center; }
}
@media (min-aspect-ratio: 1/1) and (max-height: 560px) {
  #title h1 { font-size: 40px; } #title .rec { display: none; } #title .masc img { max-width: 44px; } #title .d span { display: none; }
  #endpanel { top: 6px; bottom: 6px; width: 340px; padding: 12px; } #endpanel h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation-duration: 0s !important; } }
