/* ═══════════════════════════════════════════════════════
   UNCLE MAPS España · estilos
   ═══════════════════════════════════════════════════════ */
@font-face { font-family: 'Fredoka'; src: url(../fonts/fredoka-latin.woff2) format('woff2'); font-weight: 300 700; font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; src: url(../fonts/fredoka-latin-ext.woff2) format('woff2'); font-weight: 300 700; font-display: block;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; src: url(../fonts/nunito-latin.woff2) format('woff2'); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; src: url(../fonts/nunito-latin-ext.woff2) format('woff2'); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg-0: #050f26;
  --bg-1: #0a2150;
  --bg-2: #14408a;
  --ink: #0b1e3f;
  --text: #eef4ff;
  --muted: #9fb6dd;
  --gold: #ffd23f;
  --gold-2: #ff9f1c;
  --coral: #ff5d73;
  --mint: #2ee59d;
  --sky: #4cc9f0;
  --violet: #9b5de5;

  --pending: #f6f8fc;
  --pending-stroke: #8ea3c2;
  --correct: #22c55e;
  --correct-stroke: #0d7a38;
  --wrong: #ef4444;
  --wrong-stroke: #9b1c1c;
  --off: #46577a;
  --off-stroke: #33445f;

  --glass: rgba(13, 32, 72, 0.72);
  --glass-2: rgba(22, 50, 104, 0.6);
  --glass-b: rgba(255, 255, 255, 0.13);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

  --c-EU: #4f8bff; --c-AS: #ff8a3d; --c-AF: #f4c542; --c-NA: #ff5d73;
  --c-CA: #2ec4b6; --c-SA: #3ddc84; --c-OC: #b07cff;

  --f-display: 'Fredoka', 'Segoe UI', system-ui, sans-serif;
  --f-ui: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-ui);
  color: var(--text);
  background: var(--bg-0);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: not-allowed; }
input { font: inherit; user-select: text; }
img { -webkit-user-drag: none; }
kbd {
  font-family: var(--f-ui); font-size: .62em; font-weight: 800; letter-spacing: .02em;
  padding: .15em .5em; border-radius: 6px; background: rgba(11, 30, 63, .18); border: 1px solid rgba(11, 30, 63, .25);
  vertical-align: middle;
}

#app { position: fixed; inset: 0; overflow: hidden; }

/* ── Cielo ───────────────────────────────────────────── */
.sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 700px at 75% 40%, rgba(76, 201, 240, .18), transparent 60%),
    radial-gradient(900px 600px at 10% 90%, rgba(155, 93, 229, .22), transparent 60%),
    radial-gradient(800px 500px at 15% 10%, rgba(255, 159, 28, .10), transparent 60%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-0) 70%);
}
.stars { position: absolute; top: 0; left: 0; width: 1px; height: 1px; border-radius: 50%; }
.stars.s1 { animation: twinkle 4s ease-in-out infinite alternate; }
.stars.s2 { animation: twinkle 6s ease-in-out infinite alternate-reverse, drift 120s linear infinite; }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-200px); } }

/* ── Pantallas ───────────────────────────────────────── */
.screen { position: absolute; inset: 0; display: none; }
.screen.active { display: block; }

/* ── Botones ─────────────────────────────────────────── */
.btn {
  --b1: #2b5cb8; --b2: #1c3f86; --bs: #0f2554; --bt: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.6em; border-radius: 18px;
  font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; letter-spacing: .03em; color: var(--bt);
  background: linear-gradient(180deg, var(--b1), var(--b2));
  box-shadow: 0 6px 0 var(--bs), 0 14px 26px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .35);
  transition: transform .12s ease, box-shadow .12s ease, filter .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-3px); filter: brightness(1.08); box-shadow: 0 9px 0 var(--bs), 0 20px 30px rgba(0, 0, 0, .38), inset 0 2px 0 rgba(255, 255, 255, .35); }
.btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 var(--bs), 0 6px 12px rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .2); }
.btn:disabled { filter: grayscale(.8) brightness(.7); }
.btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 4px; }
.btn-play { --b1: #ffe066; --b2: #ffb703; --bs: #c26a00; --bt: var(--ink); }
.btn-coral { --b1: #ff8095; --b2: #ef3e5c; --bs: #a0172f; }
.btn-glass { --b1: rgba(60, 110, 200, .55); --b2: rgba(30, 64, 140, .55); --bs: rgba(8, 22, 55, .9); backdrop-filter: blur(8px); }
.btn-xl { font-size: 1.7rem; padding: .7em 1.8em; border-radius: 22px; }
.btn-lg { font-size: 1.35rem; padding: .7em 1.8em; }
.btn-ico { font-size: .9em; }

.btn-round {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.2rem; font-weight: 800; background: var(--glass-2); border: 1px solid var(--glass-b);
  box-shadow: 0 4px 0 rgba(4, 12, 32, .8); transition: transform .12s, background .2s;
}
.btn-round:hover { background: rgba(60, 110, 200, .6); transform: translateY(-2px); }
.btn-round:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(4, 12, 32, .8); }

.btn-chip {
  padding: .45em .9em; border-radius: 999px; font-weight: 800; font-size: .85rem;
  background: var(--glass-2); border: 1px solid var(--glass-b); transition: background .2s, transform .12s;
}
.btn-chip:hover { background: rgba(60, 110, 200, .6); }
.btn-chip:active { transform: scale(.94); }

.link-btn { color: var(--muted); font-weight: 700; font-size: .9rem; padding: .4em .8em; border-radius: 10px; }
.link-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* ── Interruptores ───────────────────────────────────── */
.switch { display: inline-flex; align-items: center; gap: .55em; cursor: pointer; font-weight: 700; font-size: .92rem; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i {
  position: relative; width: 46px; height: 26px; border-radius: 99px; flex: none;
  background: #33466b; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4); transition: background .25s;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .35); transition: transform .3s cubic-bezier(.5, 1.8, .5, .8);
}
.switch input:checked + i { background: linear-gradient(90deg, var(--mint), #1fbf7f); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:indeterminate + i { background: linear-gradient(90deg, #ffb703, #ff9f1c); }
.switch input:indeterminate + i::after { transform: translateX(10px); }
.switch input:focus-visible + i { outline: 2px solid var(--sky); outline-offset: 2px; }
.switch.sm i { width: 40px; height: 23px; }
.switch.sm i::after { width: 17px; height: 17px; }
.switch.sm input:checked + i::after { transform: translateX(17px); }
.switch.sm input:indeterminate + i::after { transform: translateX(8.5px); }

/* ═════════════ PORTADA ═════════════ */
#screen-title.active { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(380px, 1.05fr); align-items: center; padding: 0 5vw; }
.title-left { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem; }
.logo { display: flex; align-items: center; gap: 1.2rem; }
.logo-mascot { width: clamp(110px, 11vw, 170px); height: clamp(137px, 13.8vw, 212px); cursor: pointer; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .45)); transform-origin: 50% 90%; }
.logo-text { margin: 0; display: flex; flex-direction: column; line-height: .86; font-family: var(--f-display); font-weight: 700; }
.logo-text > span { display: block; white-space: nowrap; }
.logo-text .ch {
  display: inline-block; transform-origin: 50% 80%;
  -webkit-text-stroke: .07em var(--ink); paint-order: stroke fill;
  text-shadow: 0 .07em 0 var(--ink), 0 .13em 0 rgba(0, 0, 0, .35), 0 .25em .35em rgba(0, 0, 0, .35);
}
.logo-w1 { font-size: clamp(3.4rem, 7.4vw, 7.2rem); }
.logo-w1 .ch { color: #fff; }
.logo-w2 { font-size: clamp(4rem, 8.8vw, 8.6rem); }
.logo-w2 .ch {
  background: linear-gradient(180deg, #fff27a 10%, #ffb703 60%, #ff7b00); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 .07em 0 var(--ink)) drop-shadow(0 .14em .18em rgba(0, 0, 0, .4));
}
.tagline { margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.5rem); font-weight: 700; color: #cfe0ff; }
.tagline b { color: var(--gold); }
.menu { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-top: .4rem; }
.menu .btn-glass { font-size: 1.15rem; min-width: 230px; justify-content: flex-start; }
.title-summary { margin: 0; color: var(--muted); font-weight: 700; font-size: .98rem; }
.title-summary b { color: #fff; }
.btn-quit { position: absolute; top: 18px; right: 22px; z-index: 5; color: var(--muted); font-weight: 800; padding: .5em 1em; border-radius: 12px; }
.btn-quit:hover { color: #fff; background: rgba(255, 93, 115, .25); }

.title-right { position: relative; display: grid; place-items: center; height: 100%; }
.globe-wrap { position: relative; width: min(44vw, 74vh); aspect-ratio: 1; }
.globe-wrap canvas { position: relative; width: 100%; height: 100%; display: block; border-radius: 50%; cursor: grab; z-index: 2; }
.globe-wrap canvas:active { cursor: grabbing; }
.globe-glow {
  position: absolute; inset: -12%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(76, 201, 240, .45) 0%, rgba(76, 201, 240, .14) 45%, transparent 68%);
  animation: glow 4s ease-in-out infinite alternate;
}
@keyframes glow { from { transform: scale(.95); opacity: .75; } to { transform: scale(1.05); opacity: 1; } }
.orbit-tilt { position: absolute; inset: -9%; transform: rotate(-22deg); z-index: 3; pointer-events: none; }
.orbit { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .22); animation: spin 11s linear infinite; }
.orbit .plane { position: absolute; top: -22px; left: 50%; width: 46px; height: 46px; transform: translateX(-50%); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
@keyframes spin { to { transform: rotate(360deg); } }
.float-pin { position: absolute; z-index: 4; width: 44px; height: 44px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .4)); animation: bob 3s ease-in-out infinite; pointer-events: none; }
.float-pin svg { width: 100%; height: 100%; stroke: var(--ink); stroke-width: 1.4; }
.fp1 { top: 12%; left: 16%; fill: var(--coral); }
.fp2 { top: 58%; right: 6%; fill: var(--gold); animation-delay: -1s; width: 54px; height: 54px; }
.fp3 { bottom: 8%; left: 30%; fill: var(--mint); animation-delay: -2s; width: 36px; height: 36px; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-16px) rotate(6deg); } }

/* ═════════════ OPCIONES ═════════════ */
#screen-setup.active { display: grid; grid-template-rows: auto auto 1fr auto; }
.setup-header {
  display: flex; align-items: center; gap: 1rem; padding: 14px 24px;
  background: linear-gradient(180deg, rgba(5, 15, 38, .85), rgba(5, 15, 38, .3)); border-bottom: 1px solid var(--glass-b);
}
.mini-mascot { width: 42px; height: 52px; flex: none; }
.mini-mascot.big { width: 74px; height: 92px; }
.setup-title h2 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.7rem; letter-spacing: .01em; }
.setup-title p { margin: 0; color: var(--muted); font-weight: 600; font-size: .95rem; }
.player-field { margin-left: auto; display: flex; align-items: center; gap: .7rem; background: var(--glass); border: 1px solid var(--glass-b); border-radius: 16px; padding: 6px 8px 6px 16px; }
.player-field span { font-weight: 800; color: var(--muted); font-size: .9rem; }
.player-field input { width: 200px; border: 0; outline: 0; border-radius: 11px; padding: .55em .8em; background: rgba(255, 255, 255, .92); color: var(--ink); font-weight: 800; }

.setup-body { display: grid; grid-template-columns: 400px 1fr; gap: 18px; padding: 16px 24px 0; min-height: 0; }
.cont-panel { display: flex; flex-direction: column; min-height: 0; background: var(--glass); border: 1px solid var(--glass-b); border-radius: 22px; overflow: hidden; }
.cont-tools { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--glass-b); }
.cont-tools .btn-chip { flex: none; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: .4em; background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-b); border-radius: 12px; padding: 0 .7em; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: #fff; padding: .55em 0; font-weight: 700; }
.search input::placeholder { color: var(--muted); }
.cont-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.cont-list::-webkit-scrollbar, .review-list::-webkit-scrollbar { width: 10px; }
.cont-list::-webkit-scrollbar-thumb, .review-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

.cont-card { border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-b); overflow: hidden; transition: border-color .3s, background .3s; flex: none; }
.cont-card.some { border-color: color-mix(in srgb, var(--cc) 60%, transparent); background: color-mix(in srgb, var(--cc) 10%, transparent); }
.cont-card.hidden { display: none; }
.cc-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.cc-emoji { width: 42px; height: 42px; flex: none; display: grid; place-items: center; font-size: 1.45rem; border-radius: 12px; background: var(--cc); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2), 0 4px 10px rgba(0, 0, 0, .25); }
.cc-info { flex: 1; min-width: 0; }
.cc-info b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; }
.cc-info small { color: var(--muted); font-weight: 700; }
.cc-count { color: #fff; }
.cc-bar { height: 5px; margin-top: 5px; border-radius: 9px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.cc-bar i { display: block; height: 100%; width: 0; background: var(--cc); border-radius: 9px; transition: width .5s cubic-bezier(.3, 1.4, .5, 1); }
.cc-expand { width: 32px; height: 32px; border-radius: 10px; font-size: 1rem; transition: transform .3s, background .2s; }
.cc-expand:hover { background: rgba(255, 255, 255, .1); }
.cont-card.open .cc-expand { transform: rotate(180deg); }
.cc-body { height: 0; overflow: hidden; }
.cc-inner { padding: 2px 12px 12px; }
.cc-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.cc-actions button { font-size: .8rem; font-weight: 800; padding: .3em .8em; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.cc-actions button:hover { background: rgba(255, 255, 255, .16); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px;
  font-size: .84rem; font-weight: 700; color: #b8c7e3; background: rgba(255, 255, 255, .05); border: 1.5px solid rgba(255, 255, 255, .1);
  transition: background .25s, color .25s, border-color .25s, opacity .25s; opacity: .6;
}
.chip img { width: 24px; height: 18px; border-radius: 4px; object-fit: cover; filter: grayscale(1); transition: filter .25s; }
.chip:hover { opacity: .9; }
.chip.on { opacity: 1; color: #fff; background: color-mix(in srgb, var(--cc) 30%, transparent); border-color: var(--cc); }
.chip.on img { filter: none; }
.chip.hidden { display: none; }

.setup-main { display: grid; grid-template-rows: 1fr auto; gap: 14px; min-height: 0; }
.preview-map { position: relative; min-height: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--glass-b); background: radial-gradient(circle at 50% 40%, #0d2c5c, #061531); box-shadow: inset 0 0 60px rgba(0, 0, 0, .5); }
.map-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 2; pointer-events: none; padding: .45em 1em; border-radius: 99px; background: rgba(5, 15, 38, .75); color: var(--muted); font-weight: 700; font-size: .85rem; white-space: nowrap; }

.options-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; padding: 14px 18px; background: var(--glass); border: 1px solid var(--glass-b); border-radius: 20px; }
.opt-group { display: flex; flex-direction: column; gap: 6px; }
.opt-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.seg button { padding: .45em .95em; border-radius: 10px; font-weight: 800; font-size: .9rem; color: var(--muted); transition: background .25s, color .25s; }
.seg button:hover { color: #fff; }
.seg button.on { background: linear-gradient(180deg, #ffe066, #ffb703); color: var(--ink); box-shadow: 0 3px 0 #c26a00; }
.opt-switches { display: flex; flex-wrap: wrap; gap: 10px 22px; }

.setup-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 24px 18px;
}
.sel-summary { font-weight: 700; font-size: 1.05rem; }
.sel-summary b { font-family: var(--f-display); font-size: 1.6rem; color: var(--gold); }
.sel-summary b.warn { font-size: 1.2rem; color: var(--coral); }
.sel-summary .sep { margin: 0 .5em; opacity: .4; }
.sel-conts { color: var(--muted); font-size: .9rem; margin-top: 2px; }

/* ═════════════ JUEGO ═════════════ */
.game-map { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #0d2c5c 0%, #061531 70%); }

.hud { position: absolute; top: 0; left: 0; right: 0; z-index: 35; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px 16px; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-left, .hud-right { display: flex; align-items: center; gap: 10px; }
.hud-right { justify-content: flex-end; }
.hud-logo { display: flex; align-items: center; gap: 6px; padding: 4px 14px 4px 6px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(10px); }
.hud-logo svg { width: 30px; height: 37px; }
.hud-logo span { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.hud-logo b { color: var(--gold); margin-left: .2em; }
.hud-center { min-width: 300px; padding: 8px 18px 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(10px); text-align: center; }
.prog-text { font-weight: 800; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.prog-text b { color: #fff; font-family: var(--f-display); font-size: 1.15rem; }
.progress { position: relative; display: flex; height: 10px; border-radius: 10px; background: var(--pending); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3); }
.progress i { height: 100%; width: 0; transition: width .6s cubic-bezier(.3, 1.3, .5, 1); }
.p-ok { background: linear-gradient(180deg, #4ade80, var(--correct)); }
.p-ko { background: linear-gradient(180deg, #f87171, var(--wrong)); }
.streak { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-b); font-family: var(--f-display); font-size: 1.3rem; transition: background .3s, box-shadow .3s; }
.streak.zero { opacity: .55; }
.streak.zero .flame { filter: grayscale(1); }
.streak.hot { background: linear-gradient(180deg, #ff9f1c, #ff5d00); box-shadow: 0 0 24px rgba(255, 120, 0, .7); }
.streak.hot .flame { animation: flicker .35s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scale(1) rotate(-6deg); } to { transform: scale(1.2) rotate(6deg); } }
.score { display: flex; flex-direction: column; align-items: flex-end; padding: 4px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(10px); min-width: 110px; }
.score span { font-size: .66rem; font-weight: 900; letter-spacing: .12em; color: var(--muted); }
.score b { font-family: var(--f-display); font-size: 1.6rem; line-height: 1; color: var(--gold); }
.btn-pill { display: flex; align-items: center; gap: .45em; padding: .55em 1em; border-radius: 99px; font-weight: 800; font-size: .88rem; background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(10px); transition: background .25s; }
.btn-pill:hover { background: rgba(60, 110, 200, .6); }
.btn-pill .dot { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, var(--off) 50%, var(--pending) 50%); border: 2px solid #fff; }
.btn-pill b { padding: .05em .5em; border-radius: 8px; background: #33466b; font-size: .8rem; }
.btn-pill.on b { background: var(--mint); color: var(--ink); }

.layer { position: absolute; left: 0; right: 0; pointer-events: none; display: flex; justify-content: center; }
.layer > * { pointer-events: auto; }
.layer-top { top: 92px; z-index: 18; }
.layer-bottom { bottom: 30px; z-index: 25; }
.layer-center { top: 0; bottom: 0; align-items: center; }
.layer-card { z-index: 31; perspective: 1200px; }
.layer-burst { top: 18%; z-index: 40; }
.layer-count { z-index: 45; }

.locate-banner {
  display: none; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 50, 110, .92), rgba(10, 30, 72, .92)); border: 2px solid rgba(255, 255, 255, .2);
  box-shadow: var(--shadow), 0 0 0 6px rgba(255, 210, 63, .12); backdrop-filter: blur(12px);
}
.locate-banner.on { display: flex; }
.lb-flag { width: 72px; height: 54px; object-fit: cover; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .7); box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.lb-text { display: flex; flex-direction: column; min-width: 200px; }
.lb-text small { color: var(--muted); font-weight: 800; font-size: .92rem; }
.lb-text small b { color: #fff; }
.lb-text > b { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; line-height: 1.05; color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.pins { display: flex; gap: 2px; }
.pins svg { width: 30px; height: 30px; fill: var(--coral); stroke: var(--ink); stroke-width: 1.3; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.pins svg.lost { fill: #5b6b89; }
.btn-mini { padding: .5em .9em; border-radius: 12px; font-weight: 800; font-size: .85rem; background: rgba(255, 255, 255, .1); border: 1px solid var(--glass-b); }
.btn-mini:hover:not(:disabled) { background: rgba(255, 255, 255, .2); }
.btn-mini:disabled { opacity: .35; }
.locate-banner.cap-only .pins, .locate-banner.cap-only .btn-mini { display: none; }
.locate-banner.win { border-color: var(--correct); box-shadow: var(--shadow), 0 0 0 6px rgba(34, 197, 94, .35), 0 0 40px rgba(34, 197, 94, .5); }
.locate-banner.win .lb-text > b { color: #6ff0a4; }
.locate-banner.lose { border-color: var(--wrong); box-shadow: var(--shadow), 0 0 0 6px rgba(239, 68, 68, .3), 0 0 40px rgba(239, 68, 68, .4); }
.locate-banner.lose .lb-text > b { color: #ff9a9a; }

.qcard-backdrop { position: absolute; inset: 0; z-index: 30; display: none; background: radial-gradient(circle at 50% 50%, rgba(5, 15, 38, .25), rgba(5, 15, 38, .75)); backdrop-filter: blur(5px) saturate(1.2); }
.qcard-backdrop.on { display: block; }
.qcard {
  display: none; position: relative; width: min(500px, 92vw); padding: 26px 30px 18px; text-align: center; border-radius: 30px;
  background: linear-gradient(180deg, rgba(28, 64, 132, .97), rgba(12, 34, 80, .97));
  border: 2px solid rgba(255, 255, 255, .22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 8px rgba(255, 255, 255, .05), inset 0 2px 0 rgba(255, 255, 255, .2);
}
.qcard.on { display: block; }
.qflag-wrap { display: flex; justify-content: center; margin-top: -78px; margin-bottom: 10px; perspective: 600px; }
.qflag { width: 150px; height: 112px; object-fit: cover; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .5); background: #fff; }
.qcont { display: inline-block; padding: .25em .9em; border-radius: 99px; font-weight: 800; font-size: .85rem; background: var(--cc, #4f8bff); color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.qname { margin: .25em 0 0; font-family: var(--f-display); font-weight: 700; font-size: 2.8rem; line-height: 1.05; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.qname.long { font-size: 2.1rem; }
.qask { margin: .35em 0 .6em; font-size: 1.15rem; font-weight: 700; color: #cfe0ff; }
.qask b { color: var(--gold); }
.hearts { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.hearts svg { width: 34px; height: 34px; fill: #ff4d6d; stroke: var(--ink); stroke-width: 1.3; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.hearts svg.lost { fill: #5b6b89; }
.qform { display: flex; gap: 10px; }
.qform.off { display: none; }
.qform input {
  flex: 1; min-width: 0; padding: .7em 1em; border-radius: 16px; border: 3px solid transparent; outline: 0;
  font-family: var(--f-display); font-size: 1.35rem; font-weight: 600; color: var(--ink); background: #fff;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .08), 0 6px 0 rgba(0, 0, 0, .25); transition: border-color .2s, background .3s;
}
.qform input:focus { border-color: var(--sky); }
.qform input.ok { border-color: var(--correct); background: #dcfce7; }
.qform input.ko { animation: inputBad .6s; }
@keyframes inputBad { 0%, 50% { border-color: var(--wrong); background: #fee2e2; } }
.btn-go { padding: 0 1.2em; font-size: 1.3rem; border-radius: 16px; }
.qhint { display: none; margin-top: 12px; padding: .55em 1em; border-radius: 14px; background: rgba(255, 210, 63, .14); border: 1px dashed rgba(255, 210, 63, .6); color: #ffe9a8; font-weight: 700; }
.qhint.on { display: block; }
.qhint b { color: var(--gold); font-size: 1.15em; }
.qhint .pattern { display: block; margin-top: 4px; font-family: var(--f-display); font-size: 1.3rem; letter-spacing: .08em; color: #fff; }
.qfeedback { min-height: 1.6em; margin-top: 10px; font-weight: 800; font-size: 1.1rem; }
.qfeedback.good { color: #6ff0a4; }
.qfeedback.bad { color: #ffb0b0; }
.qfeedback small { display: block; font-size: .8rem; color: var(--muted); font-weight: 700; }
.qreveal { display: none; flex-direction: column; align-items: center; gap: 8px; padding: 14px; margin-top: 4px; border-radius: 20px; background: rgba(239, 68, 68, .14); border: 2px solid rgba(239, 68, 68, .5); transform-origin: 50% 0; }
.qreveal.on { display: flex; }
.qreveal > span { font-weight: 700; color: #ffd0d0; }
.qreveal strong { font-family: var(--f-display); font-weight: 700; font-size: 2.5rem; line-height: 1.05; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.qreveal strong span { display: inline-block; }
.qreveal .btn { font-size: 1rem; margin-top: 6px; }
#dont-know { margin-top: 6px; }
#dont-know.off { visibility: hidden; }

.btn-next { display: none; font-size: 1.35rem; padding: .7em 1.7em; }
.btn-next.on { display: inline-flex; }

.zoom-ctrl { position: absolute; right: 16px; bottom: 24px; z-index: 20; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.zoom-ctrl button { width: 48px; height: 46px; font-size: 1.5rem; font-weight: 800; transition: background .2s; }
.zoom-ctrl button + button { border-top: 1px solid var(--glass-b); }
.zoom-ctrl button:hover { background: rgba(255, 255, 255, .12); }
.legend { position: absolute; left: 16px; bottom: 24px; z-index: 20; display: flex; gap: 14px; padding: 10px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-b); backdrop-filter: blur(10px); font-weight: 700; font-size: .85rem; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid rgba(0, 0, 0, .35); }
.lg-ok { background: var(--correct); } .lg-ko { background: var(--wrong); } .lg-pend { background: var(--pending); } .lg-off { background: var(--off); }

.burst {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(2.6rem, 5vw, 4.2rem); letter-spacing: .02em; opacity: 0;
  -webkit-text-stroke: .08em var(--ink); paint-order: stroke fill; text-shadow: 0 .08em 0 var(--ink), 0 .2em .4em rgba(0, 0, 0, .4);
  pointer-events: none !important; white-space: nowrap;
}
.burst.good { color: #6ff0a4; }
.burst.bad { color: #ff8a8a; }
.burst.streak { color: #ffb347; }
.countdown {
  display: none; font-family: var(--f-display); font-weight: 700; font-size: 11rem; color: #fff; pointer-events: none !important;
  -webkit-text-stroke: .06em var(--ink); paint-order: stroke fill; text-shadow: 0 .06em 0 var(--ink), 0 0 60px rgba(76, 201, 240, .8);
}
.countdown.on { display: block; }
.countdown.go { color: var(--gold); font-size: 8rem; text-shadow: 0 .06em 0 var(--ink), 0 0 60px rgba(255, 183, 3, .9); }

.float-pts {
  position: fixed; left: 0; top: 0; z-index: 85; pointer-events: none;
  font-family: var(--f-display); font-weight: 700; font-size: 2.2rem; color: var(--gold);
  -webkit-text-stroke: .08em var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink);
}

/* ── Mapa de España (SVG) ────────────────────────────── */
.smap { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.smap:active { cursor: grabbing; }
.smap path { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.smap .neigh-c, .smap .gib { fill: #263a5c; stroke: #172640; stroke-width: .8px; }
.smap .inset-bg { stroke: rgba(160, 210, 255, .55); stroke-width: 1.6px; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.smap .inset-label { font-family: var(--f-display); font-weight: 600; font-size: 13px; fill: rgba(220, 235, 255, .75); letter-spacing: .04em; pointer-events: none; }
.smap .land { fill: #34507d; stroke: #2a4268; stroke-width: .5px; pointer-events: none; }
.smap .mesh-prov { fill: none; stroke: rgba(11, 30, 63, .45); stroke-width: .7px; pointer-events: none; }
.smap .mesh-ccaa { fill: none; stroke: rgba(11, 30, 63, .9); stroke-width: 1.8px; pointer-events: none; }
.smap[data-cat="rios"] .mesh-prov, .smap[data-cat="relieve"] .mesh-prov { stroke: rgba(170, 200, 245, .12); }
.smap[data-cat="rios"] .mesh-ccaa, .smap[data-cat="relieve"] .mesh-ccaa { stroke: rgba(170, 200, 245, .3); stroke-width: 1.1px; }

/* comunidades y provincias */
.smap .item.area { stroke-width: .7px; transition: fill .5s ease, stroke .3s ease; }
.smap-game .item.area { fill: var(--pending); stroke: var(--pending-stroke); }
.smap-game.filter-on .item.area.out { fill: var(--off); stroke: var(--off-stroke); }
.smap-game.locating .item { cursor: pointer; }
.smap-game.locating .item.area.hov { fill: #ffe9a3; stroke: #f59e0b; stroke-width: 2.2px; }
.smap-game.locating.filter-on .item.out.hov { cursor: not-allowed; }
.smap-game.locating.filter-on .item.area.out.hov { fill: #56698f; stroke: var(--off-stroke); stroke-width: .7px; }
.smap-game .item.area.s-correct, .smap-game.locating .item.area.s-correct.hov { fill: var(--correct); stroke: var(--correct-stroke); }
.smap-game .item.area.s-wrong, .smap-game.locating .item.area.s-wrong.hov { fill: var(--wrong); stroke: var(--wrong-stroke); }

/* ríos */
.smap .item.line .hit { fill: none; stroke: transparent; stroke-width: 16px; stroke-linecap: round; }
.smap .item.line .vis { fill: none; stroke-width: 2.4px; stroke-linecap: round; pointer-events: none; transition: stroke .4s, stroke-width .3s; }
.smap .item.line.main .vis { stroke-width: 3.4px; }
.smap-game .item.line .vis { stroke: var(--pending); filter: drop-shadow(0 0 1.5px rgba(11, 30, 63, .9)); }
.smap-game.filter-on .item.line.out .vis { stroke: #7083a8; stroke-width: 1.6px; opacity: .5; }
.smap-game.locating .item.line.hov .vis { stroke: #ffd23f; stroke-width: 5.5px; }
.smap-game .item.line.s-correct .vis { stroke: var(--correct); stroke-width: 5px; }
.smap-game .item.line.s-wrong .vis { stroke: var(--wrong); stroke-width: 5px; }

/* cordilleras: franja con borde y línea de cumbres */
.smap .item.ribbon path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: none; }
.smap .item.ribbon .edge { stroke: rgba(11, 30, 63, .85); }
.smap .item.ribbon .body { stroke: #c8915a; transition: stroke .4s; }
.smap .item.ribbon .ridge { stroke: rgba(255, 255, 255, .8); stroke-width: 1.4px; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; pointer-events: none; }
.smap-game .item.ribbon .body { stroke: var(--pending); }
.smap-game .item.ribbon .ridge { stroke: #8ea3c2; }
.smap-game.filter-on .item.ribbon.out { opacity: .45; }
.smap-game.filter-on .item.ribbon.out .body { stroke: var(--off); }
.smap-game.locating .item.ribbon.hov .body { stroke: #ffe9a3; }
.smap-game .item.ribbon.s-correct .body { stroke: var(--correct); }
.smap-game .item.ribbon.s-wrong .body { stroke: var(--wrong); }
.smap-game .item.ribbon.s-correct .ridge, .smap-game .item.ribbon.s-wrong .ridge { stroke: rgba(255, 255, 255, .8); }

/* zonas (Meseta y depresiones) */
.smap .item.zone { stroke-width: 1.6px; stroke-dasharray: 7 5; transition: fill .4s; }
.smap-game .item.zone { fill: rgba(246, 248, 252, .3); stroke: rgba(246, 248, 252, .85); }
.smap-game.filter-on .item.zone.out { fill: rgba(70, 87, 122, .25); stroke: rgba(120, 140, 180, .4); }
.smap-game.locating .item.zone.hov { fill: rgba(255, 233, 163, .5); stroke: #f59e0b; }
.smap-game .item.zone.s-correct { fill: rgba(34, 197, 94, .55); stroke: var(--correct); }
.smap-game .item.zone.s-wrong { fill: rgba(239, 68, 68, .5); stroke: var(--wrong); }

/* animaciones de los elementos */
.smap .item.area.flash, .smap .item.zone.flash { animation: flashBad 1.1s ease-out; }
@keyframes flashBad { 0%, 35% { fill: #ff8f3d; stroke: #b84a00; stroke-width: 2.4px; } }
.smap .item.line.flash .vis { animation: flashLine 1.1s ease-out; }
@keyframes flashLine { 0%, 35% { stroke: #ff8f3d; stroke-width: 6px; } }
.smap .item.ribbon.flash .body { animation: flashRib 1.1s ease-out; }
@keyframes flashRib { 0%, 35% { stroke: #ff8f3d; } }
.smap .item.area.flash-soft, .smap .item.zone.flash-soft { animation: flashSoft .7s ease-out; }
@keyframes flashSoft { 0%, 30% { fill: #7d8fb3; } }
.smap .item.area.pop, .smap .item.ribbon.pop { transform-box: fill-box; transform-origin: center; animation: popC .9s cubic-bezier(.3, 1.8, .5, 1); }
.smap .item.area.pop { stroke: #fff; stroke-width: 2.5px; }
@keyframes popC { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }
.smap .item.line.pop .vis { animation: popLine .9s ease-out; }
@keyframes popLine { 35% { stroke-width: 10px; } }
.smap .item.area.reveal, .smap .item.zone.reveal { stroke: #fff; animation: revealC 1.1s ease-in-out infinite; }
@keyframes revealC { 0%, 100% { stroke-width: 2px; filter: none; } 50% { stroke-width: 5px; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)); } }
.smap .item.line.reveal .vis { animation: revealL 1.1s ease-in-out infinite; }
@keyframes revealL { 50% { stroke-width: 9px; filter: drop-shadow(0 0 6px #fff); } }
.smap .item.ribbon.reveal .edge { stroke: #fff; animation: revealR 1.1s ease-in-out infinite; }
@keyframes revealR { 50% { opacity: .35; } }

/* opciones: colores por grupo */
.smap-setup .item { cursor: pointer; }
.smap-setup .item.area { fill: #34445f; stroke: #1f2c44; }
.smap-setup .item.area.in { fill: var(--ic); stroke: rgba(11, 30, 63, .7); }
.smap-setup .item.area.hov { stroke: #fff; stroke-width: 2px; filter: brightness(1.2); }
.smap-setup .item.line .vis { stroke: #5b6d92; }
.smap-setup .item.line.in .vis { stroke: var(--ic); }
.smap-setup .item.line.hov .vis { stroke: #fff; stroke-width: 5px; }
.smap-setup .item.ribbon .body { stroke: #56698f; }
.smap-setup .item.ribbon.in .body { stroke: var(--ic); }
.smap-setup .item.ribbon.hov .body { stroke: #fff; }
.smap-setup .item.zone { fill: rgba(86, 105, 143, .25); stroke: #56698f; }
.smap-setup .item.zone.in { fill: color-mix(in srgb, var(--ic) 35%, transparent); stroke: var(--ic); }
.smap-setup .item.zone.hov { stroke: #fff; stroke-width: 2.5px; }

/* marcadores (Ceuta, Melilla y picos) */
.marker { cursor: pointer; }
.marker .m-hit { fill: rgba(0, 0, 0, .001); }
.marker .m-ring { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.3px; stroke-dasharray: 3 2; }
.marker .m-dot { fill: var(--pending); stroke: var(--ink); stroke-width: 1.6px; stroke-linejoin: round; transition: fill .4s; }
.marker.peak .m-dot { stroke-width: 2px; }
.marker.peak .m-snow { fill: #d6e0f0; stroke: var(--ink); stroke-width: 1px; stroke-linejoin: round; }
.marker.m-hide { display: none; }
.marker.hov .m-dot { fill: #ffe9a3; stroke: #f59e0b; }
.marker.hov .m-ring { stroke: #ffd23f; stroke-dasharray: none; stroke-width: 2px; }
.smap-game.filter-on .marker.out .m-dot { fill: var(--off); }
.smap-game.filter-on .marker.out .m-ring { stroke: rgba(255, 255, 255, .2); }
.smap-game .marker.s-correct .m-dot { fill: var(--correct); }
.smap-game .marker.s-wrong .m-dot { fill: var(--wrong); }
.smap-game .marker.reveal .m-ring { stroke: #fff; stroke-dasharray: none; animation: mPulse 1s ease-in-out infinite; }
.smap-game .marker.peak.reveal .m-dot { stroke: #fff; animation: mPulse 1s ease-in-out infinite; }
@keyframes mPulse { 50% { stroke-width: 4px; } }
.marker.flash .m-dot { animation: flashBad 1.1s ease-out; }
.smap-setup .marker .m-dot { fill: #34445f; }
.smap-setup .marker.in .m-dot { fill: var(--ic); }

/* efectos */
.fx { pointer-events: none; }
.lbl text, .cap-text {
  font-family: var(--f-display); font-weight: 700; font-size: 17px; fill: #fff;
  paint-order: stroke; stroke: var(--ink); stroke-width: 5px; stroke-linejoin: round;
}
.lbl-wrong text { fill: #ffb4a0; }
.ripple { fill: none; stroke-width: 3px; }
.cap-halo { fill: rgba(255, 210, 63, .25); stroke: rgba(255, 210, 63, .8); stroke-width: 1.5px; }
.cap-star { fill: var(--gold); stroke: var(--ink); stroke-width: 1.6px; stroke-linejoin: round; }
.cap-text { font-size: 18px; }

/* ── Avisos y tooltip ────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 110px; z-index: 90; translate: -50% 0; opacity: 0; pointer-events: none;
  display: block; padding: .7em 1.3em; border-radius: 16px; white-space: nowrap;
  background: rgba(8, 22, 55, .94); border: 1px solid var(--glass-b); box-shadow: var(--shadow); font-weight: 700;
}
.toast img { width: 28px; height: 21px; border-radius: 4px; object-fit: cover; vertical-align: middle; margin: -3px 4px 0 0; }
.tooltip {
  position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; opacity: 0; transition: opacity .15s;
  display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center;
  padding: 8px 14px 8px 8px; border-radius: 14px; background: rgba(8, 22, 55, .95); border: 1px solid var(--glass-b); box-shadow: var(--shadow);
}
.tooltip.on { opacity: 1; }
.tooltip img { grid-row: span 2; width: 40px; height: 30px; border-radius: 6px; object-fit: cover; }
.tooltip b { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.tooltip small { color: var(--muted); font-weight: 700; }
.tooltip:not(:has(img)) { grid-template-columns: 1fr; padding-left: 14px; }

/* ═════════════ VENTANAS ═════════════ */
.modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; background: rgba(3, 10, 28, .7); backdrop-filter: blur(6px); }
.modal.on { display: grid; }
.modal-card {
  position: relative; width: min(620px, 94vw); max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  padding: 28px 30px 24px; border-radius: 30px; text-align: center;
  background: linear-gradient(180deg, rgba(28, 64, 132, .98), rgba(10, 28, 68, .98)); border: 2px solid rgba(255, 255, 255, .2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .2);
}
.modal-card h2 { margin: 0; font-family: var(--f-display); font-weight: 700; }
.res-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.res-actions .btn { font-size: 1rem; padding: .7em 1.2em; }

.res-stars { display: flex; align-items: flex-end; gap: 6px; margin-top: -6px; }
.rstar { width: 66px; height: 66px; fill: #34466b; stroke: var(--ink); stroke-width: 1.2; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .3)); }
.rstar.big { width: 92px; height: 92px; margin-bottom: 14px; }
.rstar.on { fill: var(--gold); filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .3)) drop-shadow(0 0 16px rgba(255, 210, 63, .8)); }
.res-title { font-size: 2.2rem; margin-top: 6px !important; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.res-sub { margin: 4px 0 0; color: var(--muted); font-weight: 700; }
.res-score { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.res-score b { font-family: var(--f-display); font-size: 3.6rem; color: var(--gold); line-height: 1; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.res-score span { font-weight: 800; color: var(--muted); }
.res-record { min-height: 1.3em; font-weight: 800; color: #6ff0a4; }
.res-stats { display: flex; gap: 10px; width: 100%; margin-top: 12px; }
.stat { flex: 1; padding: 10px 6px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid var(--glass-b); }
.stat b { display: block; font-family: var(--f-display); font-size: 1.5rem; }
.stat span { font-size: .78rem; font-weight: 800; color: var(--muted); }
.res-review { width: 100%; margin-top: 14px; text-align: left; min-height: 0; display: flex; flex-direction: column; }
.res-review h3 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; }
.review-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 190px; overflow-y: auto; padding-right: 4px; }
.rv { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.rv img { width: 38px; height: 28px; border-radius: 5px; object-fit: cover; flex: none; }
.rv div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rv b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv small { color: var(--gold); font-weight: 700; font-size: .82rem; }
.rv-tags { display: flex; flex-direction: column; gap: 2px; }
.tag { font-style: normal; font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; padding: .1em .5em; border-radius: 6px; background: rgba(239, 68, 68, .3); color: #ffc4c4; }
.tag.loc { background: rgba(255, 159, 28, .3); color: #ffd9a8; }

.records-card h2 { font-size: 2rem; margin-bottom: 12px; }
.records-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.records-list li { display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 8px 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); text-align: left; }
.records-list li.empty { display: block; text-align: center; color: var(--muted); font-weight: 700; padding: 18px; }
.records-list .rk { grid-row: span 2; font-family: var(--f-display); font-size: 1.4rem; text-align: center; }
.records-list b { font-size: 1.05rem; }
.records-list small { grid-column: 2; color: var(--muted); font-weight: 700; }
.records-list strong { grid-column: 3; grid-row: 1 / span 2; font-family: var(--f-display); font-size: 1.6rem; color: var(--gold); }

.confirm-card { width: min(440px, 92vw); }
.confirm-card h2 { font-size: 1.7rem; margin-top: 6px; }
.confirm-card p { color: var(--muted); font-weight: 700; margin: 6px 0 0; }

@media (max-width: 1150px) {
  .setup-body { grid-template-columns: 330px 1fr; }
  .hud-logo span, .legend { display: none; }
  .hud-center { min-width: 220px; }
}

/* ═════════════ ESPAÑA: portada, pestañas y siluetas ═════════════ */
.logo-es { display: block; margin-top: .3em; font-size: clamp(1.3rem, 2.4vw, 2.3rem); }
.logo-es i {
  display: inline-block; font-style: normal; letter-spacing: .3em; padding: .16em .5em .16em .8em; border-radius: .38em; color: #fff;
  background: linear-gradient(180deg, #c60b1e 0 26%, #ffc400 26% 74%, #c60b1e 74%);
  -webkit-text-stroke: .07em var(--ink); paint-order: stroke fill;
  box-shadow: 0 .12em 0 var(--ink), 0 .3em .5em rgba(0, 0, 0, .35); transform: rotate(-3deg);
}
.spain-wrap { width: min(46vw, 78vh); }
.title-map { position: absolute; inset: 2%; z-index: 2; }
.tmap { width: 100%; height: 100%; display: block; overflow: visible; }
.tmap g { filter: drop-shadow(0 4px 0 rgba(11, 30, 63, .7)) drop-shadow(0 16px 22px rgba(0, 0, 0, .35)); }
.tm-prov { stroke: var(--ink); stroke-width: .9px; stroke-linejoin: round; cursor: pointer; }
.tm-mesh { fill: none; stroke: var(--ink); stroke-width: 2px; stroke-linejoin: round; pointer-events: none; }
.tm-inset { fill: rgba(23, 80, 143, .35); stroke: rgba(160, 210, 255, .5); stroke-width: 1.5px; stroke-dasharray: 6 4; }

.hud-logo em {
  font-style: normal; font-size: .62em; margin-left: .4em; padding: .1em .4em; border-radius: 6px; color: var(--ink); vertical-align: middle;
  background: linear-gradient(180deg, #c60b1e 0 28%, #ffc400 28% 72%, #c60b1e 72%);
}

.cat-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 14px 24px 0; }
.cat-tab {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 18px; text-align: left;
  background: var(--glass); border: 2px solid var(--glass-b); transition: background .25s, border-color .25s, transform .2s, box-shadow .25s;
}
.cat-tab:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .3); }
.cat-tab .ct-emoji { flex: none; width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.9rem; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.cat-tab b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; }
.cat-tab small { color: var(--muted); font-weight: 700; }
.cat-tab.on { color: var(--ink); background: linear-gradient(180deg, #ffe066, #ffb703); border-color: #fff3b0; box-shadow: 0 5px 0 #c26a00, 0 12px 26px rgba(0, 0, 0, .35); }
.cat-tab.on small { color: rgba(11, 30, 63, .75); }
.cat-tab.on .ct-emoji { background: rgba(255, 255, 255, .45); }
.opt-group.off { display: none; }

.cc-shape { width: 42px; height: 42px; flex: none; object-fit: contain; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--cc) 22%, rgba(255, 255, 255, .06)); }
.chip img, .tooltip img, .toast img, .rv img { object-fit: contain; border-radius: 0; }
.qflag { object-fit: contain; padding: 8px; background: radial-gradient(circle at 50% 40%, #fff, #e3ecfb); }
.lb-flag { object-fit: contain; padding: 4px; background: radial-gradient(circle at 50% 40%, #fff, #e3ecfb); }
.lb-info { display: none; overflow: hidden; max-width: 440px; margin-top: 2px; font-size: .88rem; font-weight: 700; color: #cfe0ff; }
.lb-info.on { display: block; }
.lb-info b { color: var(--gold); }
.lbl-name text { font-size: 20px; fill: var(--gold); }

@media (max-width: 1200px) {
  .cat-tab { padding: 8px 10px; gap: 8px; }
  .cat-tab .ct-emoji { width: 42px; height: 42px; font-size: 1.5rem; }
  .cat-tab b { font-size: 1.05rem; }
}
.preview-map .map-hint { top: 10px; bottom: auto; left: auto; right: 12px; transform: none; }
