/* ==========================================================================
   Geolite v0.2 - "cuaderno de expedicion"
   Lenguaje visual propio: esquinas cortadas (nada de rectangulos redondeados), papel e instrumentos,
   odometros mecanicos, faders y palancas de consola. Tipografia: Jersey 15 / Pixelify Sans / Silkscreen (skins.css).
   ========================================================================== */

:root {
  --ink: #14232b; --ink-2: #2a4048; --ink-deep: #0c1a21;
  --paper: #f2e9d6; --paper-2: #e6d9bd; --paper-3: #d9c9a6;
  --red: #e0492b; --red-deep: #9b2a14; --brass: #c8963e; --brass-lt: #f1d79a; --teal: #2e8f8c; --green: #3f9b62;
  --serif: "Jersey 15", "Pixelify Sans", var(--cjk, system-ui), sans-serif;
  --sans: "Jersey 15", "Pixelify Sans", var(--cjk, system-ui), system-ui, sans-serif;
  --mono: "Silkscreen", "Geolite Cyrillic Caps", "Jersey 15", "Pixelify Sans", var(--cjk, system-ui), sans-serif;
  --disp: "opsz" 144, "SOFT" 60, "WONK" 1;
  --spring: cubic-bezier(.2, 1.15, .3, 1);
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink-deep); color: var(--ink); font-family: var(--sans); font-weight: 500; }
input, textarea, [contenteditable], [contenteditable="true"] { user-select: text; -webkit-user-select: text; -webkit-user-drag: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
kbd { font-family: var(--mono); font-size: .85em; }
/* alto contraste: ademas del filter (contrast+saturate) que aplica game.js sobre body, refuerza bordes y foco */
.hi-contrast button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hi-contrast .seg button.on { box-shadow: 0 0 0 2px #fff inset; }
.hi-contrast .mcard, .hi-contrast .camp { box-shadow: 0 0 0 1.5px rgba(255,255,255,.5); }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: rgba(242,233,214,.25); } ::-webkit-scrollbar-track { background: transparent; }

#app { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, rgba(60, 140, 150, .22), transparent 70%), linear-gradient(#12414f, #092632); }
#map, #hl, #fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hl, #fx { pointer-events: none; }
#map { cursor: grab; } #map.grabbing { cursor: grabbing; } #map.aiming { cursor: none; }
#grain { position: absolute; inset: 0; pointer-events: none; opacity: .07; background-image: var(--paper-grain); }
.vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 52%, rgba(2, 12, 18, .55) 100%), linear-gradient(to bottom, rgba(2, 12, 18, .35), transparent 20%, transparent 82%, rgba(2, 12, 18, .4)); }

/* ------------------------------------------------ esquinas cortadas + sombra */
.sh { filter: drop-shadow(0 10px 14px rgba(2, 10, 15, .38)) drop-shadow(0 1px 1px rgba(2, 10, 15, .55)); }
.cut { --c: 10px; --bw: 1.5px; --ci: calc(var(--c) - var(--bw) * .4142); position: relative; isolation: isolate; background: var(--edge, var(--ink));
  clip-path: polygon(var(--c) 0, calc(100% - var(--c)) 0, 100% var(--c), 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 var(--c)); }
.cut::before { content: ""; position: absolute; inset: var(--bw); z-index: -1; background-color: var(--fill); background-image: var(--fillimg, none);
  clip-path: polygon(var(--ci) 0, calc(100% - var(--ci)) 0, 100% var(--ci), 100% calc(100% - var(--ci)), calc(100% - var(--ci)) 100%, var(--ci) 100%, 0 calc(100% - var(--ci)), 0 var(--ci)); }
.cut.paper { --edge: var(--ink); --fill: var(--paper); --fillimg: var(--paper-grain); color: var(--ink); }
.cut.ink { --edge: rgba(242, 233, 214, .24); --fill: var(--ink); color: var(--paper); }
.tag { font-family: var(--mono); font-weight: 500; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--paper); background: var(--ink); padding: 3px 8px 2px; white-space: nowrap;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }

/* ------------------------------------------------ odometro mecanico */
.odo { display: inline-flex; align-items: flex-start; font-variant-numeric: tabular-nums lining-nums; line-height: 1; }
.odo .dg { display: inline-block; height: 1em; overflow: hidden; }
.odo .col { display: block; transform: translateY(calc(var(--d, 0) * -1em)); transition: transform var(--t, 1s) cubic-bezier(.16, .9, .2, 1) calc(var(--dl, 0ms) + var(--i, 0) * 55ms); }
.odo .col i { display: block; height: 1em; font-style: normal; text-align: center; }
.odo .sep { display: inline-block; height: 1em; }

/* ------------------------------------------------ HUD */
#hud { position: absolute; top: 14px; left: 14px; right: 14px; display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; gap: 14px; align-items: start; pointer-events: none; }
#hud > * { pointer-events: auto; }
.brand-sh { grid-column: 1; justify-self: start; } .plate-sh { grid-column: 2; } .ledger-sh { grid-column: 3; justify-self: end; }
.brand { display: flex; align-items: center; gap: 10px; padding: 9px 20px 9px 13px; --c: 9px; }
.brand-rose { width: 32px; height: 32px; color: var(--paper); --rose-hole: var(--ink); animation: spin-in 1.4s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes spin-in { from { transform: rotate(-160deg); opacity: 0; } }
.brand-txt { display: flex; align-items: baseline; gap: 7px; font-family: var(--serif); font-variation-settings: var(--disp); line-height: 1; }
.brand-txt b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.brand-txt i { font-family: var(--mono); font-style: normal; font-weight: 500; font-size: 14px; letter-spacing: .05em; background: var(--red); padding: 3px 6px 2px; transform: translateY(-3px) rotate(-3deg); }

/* placa de pregunta */
#plate { min-width: min(560px, calc(46 * var(--vw))); max-width: min(760px, calc(56 * var(--vw))); padding: 13px 28px 14px; text-align: center; --c: 14px; animation: drop-in .55s var(--spring) both; }
@keyframes drop-in { from { transform: translateY(-28px) rotate(-1.4deg); opacity: 0; } }
.plate-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-2); text-transform: uppercase; }
#askName { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 800; font-size: calc(clamp(28px, calc(3.5 * var(--vw)), 50px) * var(--ask-scale, 1)); line-height: 1.02; letter-spacing: -.015em; margin-top: 6px; text-wrap: balance; }
#askSub { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: calc(clamp(15px, calc(1.5 * var(--vw)), 20px) * var(--ask-scale, 1)); color: var(--ink-2); margin-top: 1px; }
#askSub:empty { display: none; }
#plate.clue #askName { font-size: calc(clamp(22px, calc(2.6 * var(--vw)), 36px) * var(--ask-scale, 1)); font-style: italic; font-weight: 700; }
#askName.ask-flag-wrap { margin-top: 8px; display: flex; justify-content: center; }
.ask-flag { max-width: min(220px, 60vw); max-height: 140px; width: auto; height: auto; border: 2px solid var(--ink); border-radius: 4px; box-shadow: 0 3px 0 var(--ink); background: #fff; object-fit: contain; transition: filter .3s; }
#askName.ask-person-wrap { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.ask-portrait { flex: none; width: 76px; height: 96px; object-fit: cover; object-position: 50% 20%; border: 2px solid var(--ink); border-radius: 4px; box-shadow: 0 3px 0 var(--ink); background: var(--paper, #f3ead3); image-rendering: auto; }   /* foto real: se reduce suavizada */
.clock { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.ruler { flex: 1; height: 12px; position: relative; border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(90deg, rgba(20,35,43,.55) 0 1px, transparent 1px 10%), repeating-linear-gradient(90deg, rgba(20,35,43,.3) 0 1px, transparent 1px 2%) bottom / 100% 5px no-repeat; }
.ruler i { position: absolute; left: 0; bottom: -2px; height: 8px; width: 100%; transform-origin: left; background: var(--ink); will-change: transform; }
#plate.hurry .ruler i { background: var(--red); }
#plate.hurry { animation: shiver .22s linear infinite; }
html.no-shake #plate.hurry { animation: none; }   /* Vibracion = no: la placa no tiembla con las prisas (sigue el aviso en rojo) */
@keyframes shiver { 25% { transform: translateX(-1px); } 75% { transform: translateX(1px); } }
#timeTxt { font-family: var(--mono); font-weight: 500; font-size: 20px; width: 50px; text-align: right; font-variant-numeric: tabular-nums; }
#plate.hurry #timeTxt { color: var(--red); }
#pips { display: flex; gap: 4px; margin-top: 9px; }
#pips i { flex: 1; max-width: 26px; height: 5px; background: rgba(20,35,43,.16); margin: 0 auto; }
#pips i.done { background: var(--ink); } #pips i.cur { background: var(--red); animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* libro de cuentas */
.ledger { min-width: 224px; padding: 13px 20px 13px; --c: 12px; }
.lg-label, .lg-row { font-family: var(--mono); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.lg-num { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 900; font-size: 46px; letter-spacing: -.02em; margin: 3px 0 9px; height: 1em; }
.gauge { position: relative; height: 10px; background: repeating-linear-gradient(90deg, rgba(20,35,43,.4) 0 1px, transparent 1px 10%); border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.gauge i { position: absolute; left: 0; bottom: -2px; height: 6px; width: 0; background: var(--brass); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.gauge i.done { background: var(--green); }
.gauge em { position: absolute; right: 0; top: -4px; bottom: -6px; width: 2px; background: var(--red); }
.gauge em::before { content: ""; position: absolute; top: -3px; left: -4px; border: 5px solid transparent; border-top-color: var(--red); }
.lg-row { display: flex; justify-content: space-between; gap: 12px; } .lg-row b { color: var(--ink); font-weight: 500; }
#streakChip { position: absolute; right: 10px; top: -1px; transform: rotate(4deg); font-family: var(--mono); font-weight: 500; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--paper); background: var(--red); padding: 5px 9px 4px; z-index: 2; }
#streakChip.pop { animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: rotate(4deg) scale(.3); } }

/* ------------------------------------------------ controles: dock y carril de zoom */
.dock-sh { position: absolute; left: 14px; bottom: 14px; z-index: 5; } .rail-sh { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 5; }
#dock { display: flex; align-items: center; gap: 4px; padding: 6px; --c: 10px; }
#rail { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; --c: 10px; }
#dock button, #rail button { width: 42px; height: 42px; display: grid; place-items: center; color: var(--paper); position: relative; transition: background .16s, transform .14s var(--spring), color .16s;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
#dock button:hover, #rail button:hover { background: rgba(242,233,214,.14); transform: translateY(-2px); }
#dock button:active, #rail button:active { transform: translateY(1px) scale(.94); background: rgba(242,233,214,.22); }
#dock svg:not(.ic), #rail svg:not(.ic) { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#setBtn[aria-expanded="true"] { color: var(--brass); background: rgba(200,150,62,.16); }
#fsBtn.on { color: var(--brass); }
.zscale { width: 4px; height: 70px; margin: 3px 0; position: relative; background: repeating-linear-gradient(to top, rgba(242,233,214,.34) 0 1px, transparent 1px 7px); border-left: 1px solid rgba(242,233,214,.3); }
.zscale i { position: absolute; left: -3px; width: 10px; height: 3px; bottom: var(--z, 0%); background: var(--brass); box-shadow: 0 0 8px rgba(200,150,62,.7); transition: bottom .2s; }

#tip { position: fixed; z-index: 30; pointer-events: none; font-family: var(--mono); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--paper);
  padding: 6px 9px 5px; border: 1px solid var(--ink); box-shadow: 3px 3px 0 rgba(0,0,0,.4); display: flex; gap: 8px; align-items: center; white-space: nowrap; animation: rise .16s ease both; }
#tip kbd { background: var(--ink); color: var(--paper); padding: 1px 6px; }

/* ------------------------------------------------ nota de campo */
.note-sh { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%) rotate(-.3deg); width: min(700px, max(340px, calc(calc(100 * var(--vw)) - 740px))); }
#note { padding: 10px 24px 11px; text-align: center; --c: 8px; }
#lvlText { font-family: var(--mono); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
#factText { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 19px; line-height: 1.25; margin-top: 2px; animation: rise .5s ease both; }
#factText:empty { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

@keyframes pop-up { from { opacity: 0; transform: translateY(14px); } }

/* ------------------------------------------------ panel de ajustes: pantalla completa */
.set-veil { position: absolute; inset: 0; z-index: 61; background: #060d09; animation: veil-in .25s ease both; }
@keyframes veil-in { from { opacity: 0; } }
.set-sh { position: absolute; inset: 0; z-index: 62; }   /* por encima de la pausa (#veil, z 60): el engranaje en pregunta abre Ajustes sobre ella */
#settings { position: absolute; inset: 0; display: flex; flex-direction: column; color: var(--paper); isolation: isolate;
  background: radial-gradient(ellipse 900px 500px at 50% -8%, rgba(255, 224, 138, .09), transparent 60%), radial-gradient(ellipse 1100px 700px at 50% 112%, rgba(31, 92, 64, .4), transparent 60%), linear-gradient(160deg, #17281e 0%, #0d1e15 55%, #060d09 100%);
  animation: set-in .4s var(--spring) both; }
#settings::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .05; background-image: var(--paper-grain); }
#settings::after { content: ""; position: absolute; z-index: -1; pointer-events: none; right: -6%; bottom: -14%; width: min(64vw, 900px); aspect-ratio: 1; opacity: .05;
  background: center / contain no-repeat url("../assets/icons/chips.webp"); filter: grayscale(1) brightness(2); transform: rotate(-8deg); }
@keyframes set-in { from { opacity: 0; transform: translateY(22px); } }
#settings:focus { outline: none; }   /* recibe el foco al abrirse (js/game.js openSettings): sin marco alrededor del panel entero */

.set-top { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: clamp(14px, 2.4vh, 22px) clamp(16px, 3vw, 40px); border-bottom: 2px solid rgba(255, 224, 138, .2); }
.set-back { justify-self: start; display: inline-flex; align-items: center; gap: 10px; background: #16241c; box-shadow: inset 0 0 0 2px rgba(255, 224, 138, .4), 0 5px 0 rgba(0, 0, 0, .45); border-radius: 999px; color: #ffe08a;
  font-family: var(--mono); font-weight: 500; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; padding: 10px 18px 9px; transition: transform .2s var(--spring), background .15s; }
.set-back:hover { background: #1c3a2c; transform: translateY(-2px); } .set-back .ic { width: 20px; height: 20px; }
.set-title { justify-self: center; display: flex; align-items: center; gap: 12px; min-width: 0; }
.set-h-ic { display: contents; } .set-h-ic .ic { width: 32px; height: 32px; display: block; filter: drop-shadow(0 2px 0 rgba(5, 12, 8, .6)); }
.set-title h1 { margin: 0; font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 900; font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -.01em; color: var(--brass-lt); text-shadow: 0 3px 0 rgba(5, 12, 8, .7); white-space: nowrap; }
.set-ver { justify-self: end; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: rgba(242, 233, 214, .4); white-space: nowrap; }

.set-body { flex: 1 1 auto; min-height: 0; display: flex; gap: clamp(20px, 3vw, 48px); padding: clamp(16px, 3vh, 32px) clamp(20px, 4vw, 64px); max-width: min(2000px, 96vw); width: 100%; margin: 0 auto; }
.set-nav { flex: none; width: clamp(250px, 18vw, 340px); display: flex; flex-direction: column; gap: 14px; }
.set-nav > i { display: none; }
.set-nav button { position: relative; display: flex; align-items: center; gap: 18px; text-align: left; padding: 20px 22px; border-radius: 18px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1.5px rgba(242, 233, 214, .12);
  transition: background .2s, box-shadow .2s, transform .2s var(--spring); }
.set-nav button:hover:not(.on) { background: rgba(255, 255, 255, .07); transform: translateX(3px); }
.set-nav button.on { background: linear-gradient(100deg, rgba(248, 180, 73, .22), rgba(248, 180, 73, .08)); box-shadow: inset 0 0 0 1.5px rgba(255, 224, 138, .55), 0 4px 14px rgba(0, 0, 0, .35); }
.set-nav button.on::before { content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 5px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--brass-lt), var(--brass)); box-shadow: 0 0 10px rgba(248, 180, 73, .7); }
.set-nav-ic { display: contents; } .set-nav-ic .ic { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .5)); }
.set-nav-t { display: grid; gap: 3px; min-width: 0; }
.set-nav-t b { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 900; font-size: 24px; color: var(--paper); line-height: 1.1; }
.set-nav button.on .set-nav-t b { color: #ffe9b0; }
.set-nav-t small { font-family: var(--mono); font-size: 14.5px; letter-spacing: .02em; color: rgba(242, 233, 214, .5); line-height: 1.3; }

#settings .langgrid { grid-template-columns: repeat(auto-fill, minmax(max(136px, calc((100% - 50px) / 6)), 1fr)); gap: 10px; }
#settings .langgrid button { padding: 16px 8px 14px; font-size: 17px; gap: 10px; }
#settings .lang-flag { width: 40px; }
.set-panes { flex: 1 1 auto; min-width: 0; display: flex; overflow-y: auto; overflow-x: hidden; padding: 2px 10px 2px 2px; scrollbar-width: thin; scrollbar-color: var(--brass) transparent; }
.set-pane { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-start; min-height: 100%; animation: set-pane-in .35s var(--spring) both; }
@keyframes set-pane-in { from { opacity: 0; transform: translateY(8px); } }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; align-items: start; align-content: start; }
.set-card { grid-column: span 1; padding: 28px 30px 30px; border-radius: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 45%), rgba(6, 16, 11, .55);
  box-shadow: inset 0 0 0 1.5px rgba(255, 224, 138, .16), inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 18px rgba(0, 0, 0, .25); }
.set-card.wide { grid-column: 1 / -1; }
.set-card h3 { font-family: var(--mono); font-weight: 500; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); margin: 0 0 18px; }
.set-card + .set-card { margin-top: 0; }
.set-card .row-sw, .set-card .fader { padding: 16px 0; border-bottom: 1px dashed rgba(242, 233, 214, .1); }
.set-card .row-sw:last-child, .set-card .fader:last-child { border-bottom: 0; }
.set-note { font-size: 17px; line-height: 1.45; color: rgba(242, 233, 214, .55); margin-top: 12px; }
.row-sw { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.row-sw.col { flex-direction: column; align-items: stretch; gap: 10px; }
.rs-t label { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 700; font-size: 22px; }
.rs-t small { display: block; font-size: 16px; color: rgba(242, 233, 214, .55); margin-top: 3px; line-height: 1.35; }
.fader { display: grid; grid-template-columns: 1fr auto auto; align-items: center; column-gap: 16px; }
.fader label { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 700; font-size: 22px; }
.fader output { font-family: var(--mono); font-size: 17px; color: var(--brass-lt); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.fader input { grid-column: 1 / -1; margin-top: 4px; }
.fader.off label, .fader.off output { opacity: .38; } .fader.off input { opacity: .45; }
/* v0.2.27: filas "< valor >" de Ajustes > Pantalla (tamano, monitor, interfaz). Mismo dibujo que el selector de canciones; el valor se corta con
   puntos suspensivos (nombres de monitor largos) en vez de saltar de linea, y las flechas quedan siempre en su sitio */
.stp { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 10px 0 0; margin-top: 10px; border-top: 1px dashed rgba(242, 233, 214, .1); }
.seg + .stp:not(.hidden) { margin-top: 12px; }
.stp + .stp { padding-top: 8px; margin-top: 8px; }
.set-card > .stp:first-child, .seg + .stp { border-top: 0; padding-top: 0; }
.stp-l { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 700; font-size: 20px; white-space: nowrap; }
.stp-h { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.stp-tag { font-style: normal; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 217, 138, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stp-tag:empty { display: none; }
.stp-c { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; gap: 4px; padding: 4px; background: rgba(0, 0, 0, .3); border-radius: 8px; box-shadow: inset 0 0 0 1.5px rgba(242, 233, 214, .12); }
.stp-v { min-width: 0; text-align: center; font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: .02em; color: var(--brass-lt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stp-b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: #1f5c40; transition: background .15s, transform .12s; }
.stp-b:hover:not(:disabled) { background: #f8b449; } .stp-b:active:not(:disabled) { transform: scale(.92); } .stp-b:disabled { opacity: .3; cursor: default; }
.stp-b:hover:not(:disabled) .np-tri.r { border-left-color: #16241c; } .stp-b:hover:not(:disabled) .np-tri.l { border-right-color: #16241c; }
.stp.off .stp-l, .stp.off .stp-v { opacity: .5; }
/* monitor: en la cabecera de Pantalla ("PANTALLA < 2 >"), solo con dos o mas; el nombre del monitor va en el globo del numero */
.scr-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.scr-hd h3 { margin: 0 !important; min-width: 0; }
.stp.mini { display: block; margin: 0; padding: 0; border: 0; flex: none; }
.stp.mini .stp-h { display: none; }
.stp.mini .stp-c { grid-template-columns: 24px minmax(2ch, auto) 24px; padding: 2px; gap: 6px; }
.stp.mini .stp-b { width: 24px; height: 24px; }
.stp.mini .stp-v { font-size: 22px; line-height: 1; }
@media (min-width: 901px) { .scr-hd { margin-bottom: 10px; } }
.ftrack { grid-column: 1 / -1; height: 6px; margin-top: -4px; background: repeating-linear-gradient(to right, rgba(242,233,214,.28) 0 1px, transparent 1px 10%); border-right: 1px solid rgba(242,233,214,.28); pointer-events: none; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 11px; border-radius: 999px; background: linear-gradient(to right, var(--brass) var(--p, 50%), rgba(0,0,0,.32) var(--p, 50%)); box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.3); }
input[type=range]::-moz-range-track { height: 11px; border-radius: 999px; background: linear-gradient(to right, var(--brass) var(--p, 50%), rgba(0,0,0,.32) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -8.5px; border: 0; border-radius: 50%; cursor: grab;
  background: radial-gradient(circle at 32% 28%, #fff3d2, #f1d79a 40%, #c8963e 75%, #7d5420); box-shadow: 0 0 0 2px var(--ink), 0 2px 0 rgba(0,0,0,.45); transition: transform .15s var(--spring); }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff3d2, #f1d79a 40%, #c8963e 75%, #7d5420); box-shadow: 0 0 0 2px var(--ink), 0 2px 0 rgba(0,0,0,.45); }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.1); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.18); cursor: grabbing; }
input[type=range]:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.sw { width: 56px; height: 32px; position: relative; border-radius: 999px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1.5px rgba(242,233,214,.3), inset 0 2px 4px rgba(0,0,0,.3); flex: none; }
.sw i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper-3); box-shadow: 0 1px 2px rgba(0,0,0,.4); transition: left .2s var(--spring), background .2s; }
.sw[aria-checked="true"] { background: rgba(200,150,62,.35); box-shadow: inset 0 0 0 1.5px var(--brass); }
.sw[aria-checked="true"] i { left: 27px; background: radial-gradient(circle at 32% 28%, #fff3d2, var(--brass-lt) 55%, var(--brass) 100%); box-shadow: 0 0 8px rgba(248,180,73,.85); }
.sw:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.seg { --n: 2; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 999px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1.5px rgba(242,233,214,.28); padding: 5px; }
.seg.s3 { --n: 3; } .seg.s4 { --n: 4; }
.seg button { position: relative; z-index: 1; min-width: 0; padding: 10px 4px; font-family: var(--mono); font-size: clamp(8.5px, 4cqw, 13px); letter-spacing: 0; text-transform: uppercase; color: rgba(242,233,214,.7); transition: color .25s;
  display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.15; min-height: 40px;
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; hyphens: auto; }
.seg.s4 button { font-size: clamp(9px, 3.6cqw, 15px); }
.seg { container-type: inline-size; }
.seg button.on { color: var(--ink); } .seg button:hover:not(.on) { color: var(--paper); }
.seg > i { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / var(--n)); border-radius: 999px; background: linear-gradient(180deg, var(--brass-lt), var(--brass)); box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 12px rgba(248,180,73,.35);
  transform: translateX(calc(var(--idx, 0) * 100%)); transition: transform .4s cubic-bezier(.3, 1.35, .4, 1); }
.set-keys { flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 14px clamp(16px, 3vw, 40px) clamp(14px, 2.2vh, 20px); border-top: 2px dashed rgba(255, 224, 138, .18); font-size: 15px; color: rgba(242,233,214,.6); }
.set-keys kbd { background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px rgba(242,233,214,.25); border-radius: 4px; padding: 2px 8px; margin-right: 5px; color: var(--brass-lt); } .set-keys em { font-style: normal; }

@media (max-width: 900px) {
  .set-top { grid-template-columns: auto 1fr auto; }
  .set-ver { display: none; }
  .set-body { flex-direction: column; }
  .set-nav { width: auto; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--brass) transparent; }
  .set-nav button { flex: none; padding: 13px 16px; }
  .set-nav-ic .ic { width: 34px; height: 34px; }
  .set-nav-t b { font-size: 19px; }
  .set-nav button.on::before { left: 14%; right: 14%; top: auto; bottom: -6px; width: auto; height: 4px; border-radius: 4px 4px 0 0; }
  .set-nav-t small { display: none; }
  .set-card { padding: 18px; }
}

/* ------------------------------------------------ botones */
.btn-ink { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 15px 22px 14px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); position: relative; overflow: hidden; transition: transform .12s var(--spring), background .2s; }
.btn-ink::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.16) 50%, transparent 70%); transform: translateX(-120%); }
.btn-ink:hover::before { transform: translateX(120%); transition: transform .7s; } .btn-ink:hover { background: var(--ink-2); }
.btn-ink:active { transform: translateY(2px) scale(.985); }
.btn-ink .ar { display: inline-block; transition: transform .25s var(--spring); } .btn-ink:hover .ar { transform: translateX(5px); }
.btn-ink kbd { opacity: .55; letter-spacing: 0; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 20px 12px; font-family: var(--mono); font-weight: 500; font-size: 15.5px; letter-spacing: .05em; text-transform: uppercase; color: inherit; box-shadow: 0 0 0 1.5px currentColor inset; transition: background .2s, transform .12s var(--spring);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.btn-line:hover { background: rgba(255,255,255,.1); } .btn-line:active { transform: translateY(2px); }
button:focus-visible, .camp:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* boton de salida: dial de brujula que sigue al cursor */
.go { --rot: 0deg; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; width: 100%; padding: 12px 22px 12px 14px; color: var(--paper); text-align: left; --edge: var(--brass); --fill: var(--ink-deep); --c: 14px; position: relative; overflow: hidden; transition: transform .14s var(--spring); }
.go::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(241,215,154,.22) 50%, transparent 65%); transform: translateX(-130%); }
.go:hover::after { transform: translateX(130%); transition: transform .9s ease; }
.go:hover { --edge: var(--brass-lt); transform: translateY(-2px); } .go:active { transform: translateY(2px) scale(.99); }

/* ------------------------------------------------ capas de pantalla */
#layer { position: absolute; inset: 0; display: grid; pointer-events: none; z-index: 4; }
#layer:has(#dlg.center) { background: radial-gradient(ellipse at center, rgba(4, 16, 22, .45), rgba(4, 16, 22, .82)); pointer-events: auto; }
#layer:has(#dlg.verdict) { background: rgba(8, 20, 26, .95); pointer-events: auto; }
#dlg { pointer-events: auto; opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .5s var(--spring); }
#dlg.in { opacity: 1; transform: none; }
#dlg.side { place-self: center end; margin-right: 24px; width: 352px; filter: drop-shadow(0 22px 34px rgba(2, 10, 15, .55)); }
#dlg.menu { place-self: stretch start; width: min(580px, calc(100 * var(--vw))); transform: translateX(-40px); } #dlg.menu.in { transform: none; }
#dlg.verdict { place-self: stretch; width: 100%; height: 100%; transform: none; overflow-y: auto; }

.sheet { position: relative; background-color: var(--paper); background-image: var(--paper-grain); color: var(--ink); padding: 0 26px 22px; text-align: center; }

/* ticket de resultado */
.ticket { --n: 56%; padding-bottom: 18px;
  -webkit-mask: radial-gradient(circle 10px at 0 var(--n), #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 10px at 100% var(--n), #0000 97%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 10px at 0 var(--n), #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 10px at 100% var(--n), #0000 97%, #000) right / 51% 100% no-repeat; }
.tk-band { margin: 0 -26px; padding: 9px 26px 8px; background: var(--ink); color: var(--paper); display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.tk-band .tag { background: var(--red); }
.tk-title { font-family: var(--serif); font-variation-settings: var(--disp); font-style: italic; font-weight: 800; font-size: 32px; color: var(--red); margin-top: 14px; line-height: 1; animation: rise .5s var(--spring) .1s both; }
.tk-km { display: flex; justify-content: center; align-items: baseline; gap: 8px; font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 900; font-size: 64px; line-height: 1; letter-spacing: -.03em; margin-top: 8px; }
.tk-km .odo { height: 1em; } .tk-km > span:last-child { font-family: var(--mono); font-weight: 500; font-size: 17px; letter-spacing: .08em; color: var(--ink-2); }
.tk-from { font-size: 16px; color: var(--ink-2); margin-top: 5px; min-height: 18px; }
.tk-answer { margin-top: 10px; font-family: var(--serif); font-size: 20px; font-weight: 700; line-height: 1.15; }
.tk-answer span { display: block; font-family: var(--mono); font-weight: 500; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }
.tk-perf { margin: 14px -26px 12px; border-top: 2px dashed rgba(20,35,43,.5); }
.tk-rows { margin: 0; display: grid; gap: 6px; }
.tk-rows > div { display: flex; align-items: baseline; gap: 6px; animation: slide-l .45s cubic-bezier(.2,.9,.2,1) calc(.55s + var(--i) * 90ms) both; }
@keyframes slide-l { from { opacity: 0; transform: translateX(-16px); } }
.tk-rows dt { font-family: var(--mono); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.tk-rows i { flex: 1; border-bottom: 2px dotted rgba(20,35,43,.4); transform: translateY(-3px); }
.tk-rows dd { margin: 0; font-family: var(--mono); font-weight: 500; font-size: 17px; font-variant-numeric: tabular-nums; }
.tk-rows .bonus dd, .tk-rows .bonus dt { color: var(--red); }
.tk-total { display: flex; align-items: flex-end; justify-content: space-between; margin: 10px 0 14px; padding-top: 8px; border-top: 2px solid var(--ink); }
.tk-total > span:first-child { font-family: var(--mono); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; padding-bottom: 6px; }
.tk-total .odo { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 900; font-size: 46px; letter-spacing: -.02em; }


/* ------------------------------------------------ menu principal */
.menu-in { display: flex; flex-direction: column; height: 100%; padding: 26px 30px 20px; overflow-y: auto; color: var(--paper);
  background: linear-gradient(90deg, rgba(10, 24, 31, .97) 0%, rgba(10, 24, 31, .95) 84%, rgba(10, 24, 31, 0) 100%); }
.menu-top { display: flex; justify-content: space-between; align-items: flex-start; }
.menu-rose { width: 72px; height: 72px; color: var(--paper); --rose-hole: var(--ink-deep); animation: spin-in 1.6s cubic-bezier(.2, .9, .2, 1) both; }
.menu-gear { width: 40px; height: 40px; display: grid; place-items: center; color: var(--paper); border: 1.5px solid rgba(242,233,214,.3); transition: transform .3s var(--spring), border-color .2s, color .2s;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); } .menu-gear:hover { border-color: var(--brass); color: var(--brass); transform: rotate(60deg); }
.menu-gear svg:not(.ic) { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.menu-in h1 { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 900; font-size: clamp(60px, calc(9 * var(--vw)), 96px); line-height: .9; letter-spacing: -.035em; display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; }
.menu-in h1 em { font-family: var(--mono); font-style: normal; font-weight: 500; font-size: 18px; letter-spacing: .16em; background: var(--red); padding: 5px 8px 4px; margin-top: 10px; transform: rotate(-4deg); }
.mode-d { font-size: 15.5px; color: rgba(242,233,214,.62); margin: 10px 2px 14px; line-height: 1.45; } .mode-d small { display: block; margin-top: 4px; color: var(--brass); font-size: 15.5px; }
.camps { display: grid; gap: 8px; margin-bottom: 16px; }
.camp { --c: 12px; --edge: rgba(242,233,214,.22); --fill: #121f27; display: grid; grid-template-columns: 108px 1fr; gap: 14px; align-items: center; text-align: left; padding: 10px 14px 10px 10px; transition: transform .22s var(--spring); animation: rise .45s ease both; }
.camp:hover { transform: translateX(4px); --edge: rgba(242,233,214,.5); }
.camp.sel { --edge: var(--brass); --fill: #2a261c; }
.camp-thumb { width: 105px; height: 70px; display: block; border: 1px solid rgba(242,233,214,.22); object-fit: cover; image-rendering: pixelated; }
.camp-body { display: grid; gap: 2px; min-width: 0; }
.camp-t { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 800; font-size: 21px; letter-spacing: -.01em; line-height: 1.1; }
.camp-d { font-size: 15.5px; color: rgba(242,233,214,.62); line-height: 1.3; }
.camp-m { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--brass); margin-top: 5px; }
.camp-p { display: flex; gap: 2px; flex: 1; } .camp-p i { flex: 1; height: 4px; background: rgba(242,233,214,.16); } .camp-p i.on { background: var(--brass); }
.picker { margin: 2px 0 16px; } .picker > span { display: block; font-family: var(--mono); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: rgba(242,233,214,.55); margin-bottom: 8px; }
.lrail { display: flex; flex-wrap: wrap; gap: 6px; }
.lv { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(242,233,214,.4); font-family: var(--mono); font-weight: 500; font-size: 15.5px; color: var(--paper); transition: transform .18s var(--spring), background .15s; }
.lv:hover:not(:disabled) { transform: scale(1.12); background: rgba(242,233,214,.14); } .lv.sel { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 0 0 0 3px rgba(242,233,214,.2); }
.lv:disabled { opacity: .3; border-style: dashed; cursor: not-allowed; }
.menu-in .go { margin-top: auto; position: sticky; bottom: 0; flex: none; }
.menu-foot { margin-top: 12px; font-family: var(--mono); font-size: 14px; letter-spacing: .08em; color: rgba(242,233,214,.38); text-align: center; }

/* ------------------------------------------------ intro de nivel */
#intro { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
#intro::before { content: ""; position: absolute; inset: -10%; background: var(--ink-deep); transform-origin: left; animation: wipe-in .55s cubic-bezier(.7, 0, .2, 1) both; transform: skewX(-8deg); }
#intro.out::before { animation: wipe-out .4s cubic-bezier(.7, 0, .2, 1) both; transform-origin: right; }   /* v0.3.35: acaba antes de que js/game.js oculte la intro (430 ms) */
#intro.out { background: none; }   /* el barrido descubre el mapa, no el velo oscuro (que desaparecia de golpe al ocultarse) */
@keyframes wipe-in { from { transform: skewX(-8deg) scaleX(0); } } @keyframes wipe-out { to { transform: skewX(-8deg) scaleX(0); } }
.intro-in { position: relative; display: flex; align-items: center; gap: clamp(18px, calc(4 * var(--vw)), 54px); color: var(--paper); padding: 0 24px; animation: rise .5s ease .35s both; }
#intro.out .intro-in { animation: fade-out .3s ease both; } @keyframes fade-out { to { opacity: 0; transform: translateY(-10px); } }
.intro-num { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 900; font-size: clamp(120px, calc(24 * var(--vw)), 280px); line-height: .8; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 3px var(--brass); }
.intro-body { display: grid; gap: 10px; justify-items: start; max-width: 620px; }
.intro-body h2 { font-family: var(--serif); font-variation-settings: var(--disp); font-weight: 800; font-size: clamp(30px, calc(5 * var(--vw)), 64px); line-height: 1; letter-spacing: -.02em; text-wrap: balance; }
.intro-body p { font-family: var(--mono); font-size: 15.5px; letter-spacing: .05em; text-transform: uppercase; color: rgba(242,233,214,.75); }
.intro-body .tag { background: var(--red); }

body.vd-on #hud, body.vd-on .dock-sh, body.vd-on .rail-sh, body.vd-on .note-sh { opacity: 0; pointer-events: none; transition: opacity .3s; }

/* ------------------------------------------------ pausa */
#veil { position: absolute; inset: 0; z-index: 5; }   /* la pausa: Naipe de gala (css/gala.css) */

/* ------------------------------------------------ pantallas medianas y moviles */
@media (max-width: 1100px) {
  .note-sh { bottom: 74px; width: min(700px, calc(calc(100 * var(--vw)) - 28px)); }
}
@media (max-width: 900px) {
  #hud { grid-template-columns: 1fr auto; gap: 10px; }
  .brand-sh { grid-column: 1; grid-row: 1; } .brand { padding: 6px 12px 6px 8px; } .brand-rose { width: 26px; height: 26px; } .brand-txt b { font-size: 20px; }
  .ledger-sh { grid-column: 2; grid-row: 1; } .ledger { min-width: 0; padding: 8px 14px 9px; } .lg-num { font-size: 28px; margin: 0; } .ledger .gauge, .ledger .lg-row, .lg-label { display: none; }
  .plate-sh { grid-column: 1 / -1; grid-row: 2; } #plate { min-width: 0; max-width: none; padding: 10px 18px 11px; } #askName { font-size: calc(clamp(24px, calc(7 * var(--vw)), 34px) * var(--ask-scale, 1)); }
  .rail-sh { left: auto; right: 10px; top: 44%; transform: translateY(-50%); }
  #dlg.side { place-self: end center; margin: 0 0 178px; width: min(400px, calc(calc(100 * var(--vw)) - 20px)); }
  .tk-title { font-size: 24px; margin-top: 8px; } .tk-km { font-size: 44px; } .tk-perf { margin: 8px -26px 8px; } .tk-rows { grid-template-columns: 1fr 1fr; gap: 6px 16px; } .tk-total { margin: 8px 0 10px; } .tk-total .odo { font-size: 34px; } .tk-answer { font-size: 18px; margin-top: 6px; }
  #dlg.menu { width: calc(100 * var(--vw)); } .menu-in { padding: 20px 18px 16px; background: rgba(10, 24, 31, .97); } .menu-rose { width: 52px; height: 52px; }
  .camp { grid-template-columns: 84px 1fr; } .camp-thumb { width: 84px; height: 56px; }
}
@media (max-width: 480px) {
  #dock button, #rail button { width: 38px; height: 38px; } #dock svg:not(.ic), #rail svg:not(.ic) { width: 20px; height: 20px; } #dock .ic, #rail .ic { width: 24px; height: 24px; }
}

/* ---- ajustes sin scroll en escritorio (1280x720 en adelante, 12 idiomas): tarjetas compactas, idiomas 6x2, General en 3 columnas e Imagen en 2 ---- */
@media (min-width: 901px) {
  #settings .set-top { padding-block: 12px; }
  #settings .set-body { padding-block: 12px; }
  #settings .set-keys { padding-block: 10px 12px; }
  .set-grid { gap: 14px; }
  .set-card { padding: 16px 20px 18px; border-radius: 16px; }
  .set-card h3 { margin-bottom: 10px; }
  .set-card .row-sw, .set-card .fader { padding: 6px 0; }
  .set-card > .row-sw:first-child, .set-card > .fader:first-child, .set-card > h3 + .row-sw, .set-card > h3 + .fader { padding-top: 0; }
  .set-card > .row-sw:last-child, .set-card > .fader:last-child { padding-bottom: 0; }
  .set-note { margin-top: 8px; }
  .seg { padding: 4px; } .seg > i { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); } .seg button { min-height: 34px; padding: 7px 4px; }
  /* la tarjeta del nombre va a todo el ancho (css/nombre.css): quedan Unidades + ayudas, en 2 columnas (con 3, la de ayudas se quedaba en 240 px y su texto en una columna de 22 px a 1280x720) */
  .set-pane[data-pane="general"] .set-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); align-items: stretch; }
  .set-pane[data-pane="general"] .set-card:has(.row-sw) { order: 3; }
  /* v0.2.27: en Pantalla (columna estrecha) la etiqueta va encima y el selector a todo el ancho, para que el valor quepa entero sin crecer la
     tarjeta a lo ancho; la nota de la tecla F sobra (ya esta en la leyenda de abajo) */
  .set-scr > .stp { grid-template-columns: minmax(0, 1fr); row-gap: 5px; }
  .set-scr > .stp .stp-l { font-size: 18px; }
  .set-scr:has(.stp:not(.hidden)) > .set-note { display: none; }
  #settings .langgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  #settings .langgrid button { padding: 10px 6px 9px; gap: 6px; }
  #settings .lang-flag { width: 32px; }
  .set-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .fader[data-range] { grid-template-columns: minmax(7em, auto) minmax(0, 1fr) auto; grid-template-areas: "l i o" ". t ."; column-gap: 14px; }
  .fader[data-range] label { grid-area: l; } .fader[data-range] input { grid-area: i; margin: 0; } .fader[data-range] output { grid-area: o; min-width: 52px; } .fader[data-range] .ftrack { grid-area: t; }
  .row-sw.col { gap: 8px; }
  .seg.s4 button { font-size: clamp(9px, 2.8cqw, 13px); }
}
/* 901-1199 px (p. ej. 1024x768): en 6 columnas los nombres largos (PORTUGUÊS, FRANÇAIS...) no caben en su boton; 3 columnas con la bandera al lado, misma altura */
@media (min-width: 901px) and (max-width: 1199px) {
  #settings .langgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; gap: 6px 8px; }
  #settings .langgrid button { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 7px 10px; text-align: left; }
  #settings .langgrid .lang-flag { width: 28px; flex: none; }
}
/* la entrada de cada pestana se desliza en horizontal: en vertical desbordaba 8 px y hacia parpadear la barra de scroll */
@keyframes set-pane-in { from { opacity: 0; transform: translateX(10px); } }
/* v0.2.35: los deslizadores de Ajustes > Mando, con la misma maqueta que los de sensibilidad del mapa */
@media (min-width: 901px) {
  .fader.pfader { grid-template-columns: minmax(7em, auto) minmax(0, 1fr) auto; grid-template-areas: "l i o" ". t ."; column-gap: 14px; }
  .fader.pfader label { grid-area: l; } .fader.pfader input { grid-area: i; margin: 0; } .fader.pfader output { grid-area: o; min-width: 52px; } .fader.pfader .ftrack { grid-area: t; }
}
