#tooltip {
  position: fixed; display: none; z-index: 1000; max-width: 320px; pointer-events: none;
  background: linear-gradient(135deg,#2a1f14,#3d2b1f); color: #f0e2c4;
  padding: 12px 14px; border: 1px solid var(--gold); border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5); font-family: var(--font-ui); line-height: 1.45;
}
#tooltip .tt-img { width: 100%; height: 120px; object-fit: cover; border-radius: 4px; margin-bottom: 8px; display: none; }
#tooltip .tt-fb { width: 100%; height: 80px; border-radius: 4px; margin-bottom: 8px; display: none;
  align-items: center; justify-content: center; font-size: 16px; color: rgba(255,255,255,.85); gap: 8px; }
#tooltip .tt-fb .icon { font-size: 28px; }
#tooltip .tt-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--gold-light); }
#tooltip .tt-dates { font-size: 12px; color: #b8a88a; font-style: italic; margin: 2px 0 6px; }
#tooltip .tt-desc { font-size: 13px; }

/* Controles */
#controls { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center; z-index: 100; padding: 8px 14px;
  background: var(--chrome-bg); border: 1px solid rgba(184,134,11,.3); border-radius: 40px;
  backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,.4); }
#controls button { width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: rgba(184,134,11,.15); border: 1px solid rgba(184,134,11,.3); color: var(--gold-light);
  font-size: 16px; display: flex; align-items: center; justify-content: center; }
#controls button:hover { background: rgba(184,134,11,.3); }
#controls .divider { width: 1px; height: 24px; background: rgba(184,134,11,.3); }
#zoom-display { color: #b8a88a; font-size: 12px; min-width: 42px; text-align: center; }

/* Header + búsqueda */
#topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 90; display: flex;
  align-items: center; justify-content: space-between; padding: 12px 18px; pointer-events: none;
  background: linear-gradient(180deg, rgba(26,20,16,.95), rgba(26,20,16,0)); }
#topbar > * { pointer-events: auto; }
.brand strong { font-family: var(--font-display); color: var(--gold-light); font-size: 18px; letter-spacing: 1px; }
.brand span { display: block; font-size: 12px; color: #8b7d6b; font-style: italic; }
#search-input { background: rgba(240,226,196,.08); border: 1px solid rgba(184,134,11,.3); color: #f0e2c4;
  padding: 7px 13px; border-radius: 20px; font-family: var(--font-ui); font-size: 13px; width: 220px; outline: none; }
#search-input:focus { border-color: var(--gold-light); width: 280px; transition: width .2s; }

/* Leyenda */
#legend-toggle { position: fixed; top: 64px; right: 18px; z-index: 100; padding: 6px 14px; cursor: pointer;
  background: var(--chrome-bg); border: 1px solid rgba(184,134,11,.3); color: var(--gold-light); border-radius: 20px; font-size: 13px; }
#legend-toggle:hover { background: rgba(184,134,11,.2); }
#legend-panel { position: fixed; top: 104px; right: 18px; z-index: 100; width: 230px; max-height: 62vh; overflow-y: auto;
  background: rgba(26,20,16,.96); border: 1px solid rgba(184,134,11,.3); border-radius: 8px; padding: 12px; }
.legend-region { font-family: var(--font-display); font-size: 10px; font-weight: 700; color: var(--gold-light);
  letter-spacing: 1.5px; text-transform: uppercase; margin: 10px 0 4px; border-bottom: 1px solid rgba(184,134,11,.2); padding-bottom: 3px; }
.legend-region:first-child { margin-top: 0; }
.legend-item { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; font-size: 12px; color: #b8a88a; }
.legend-item:hover { color: #f0e2c4; }
.legend-item .sw { width: 16px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Minimapa */
#minimap { position: fixed; bottom: 78px; right: 18px; width: 240px; height: 84px; z-index: 100;
  background: var(--chrome-bg); border: 1px solid rgba(184,134,11,.3); border-radius: 6px; overflow: hidden; cursor: pointer; }
#minimap-vp { position: absolute; border: 1.5px solid var(--gold-light); background: rgba(184,134,11,.1); pointer-events: none; }

/* Splash */
#splash { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  background: radial-gradient(ellipse at center, #2a1f14, #1a1410 60%, #0d0a07);
  transition: opacity .8s, visibility .8s; }
#splash.hidden { opacity: 0; visibility: hidden; }
#splash h1 { font-family: var(--font-display); font-size: 40px; font-weight: 900; letter-spacing: 2px; color: var(--gold-light); }
.splash-sub { font-style: italic; color: #8b7d6b; margin-top: 6px; }
.splash-line { width: 120px; height: 1px; margin: 26px 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.splash-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
#splash button { padding: 12px 30px; border-radius: 30px; cursor: pointer; font-family: var(--font-display);
  font-size: 15px; letter-spacing: 1px; color: var(--gold-light);
  background: linear-gradient(135deg, rgba(184,134,11,.25), rgba(184,134,11,.12)); border: 1px solid var(--gold); }
#splash button:hover { box-shadow: 0 0 26px rgba(184,134,11,.25); transform: translateY(-1px); }
#splash button.ghost { background: transparent; }
.splash-keys { margin-top: 26px; font-size: 12px; color: #5c4a3a; }
.splash-keys kbd { padding: 2px 6px; border: 1px solid rgba(240,226,196,.15); border-radius: 3px; background: rgba(240,226,196,.06); }
