/* ==========================================================================
   Overworld 2026 — tema "Cartoon Casual"
   Tokens tomados del handoff de diseño (design_handoff_overworld_game).
   Proyecto de fans, no oficial.
   ========================================================================== */

:root {
  /* Fondo / superficies */
  --sky-1: #4fc3f7;
  --sky-2: #b3e5fc;
  --sky-3: #e1f5fe;
  --card: #ffffff;

  /* Texto */
  --text: #1c3a52;
  --text-2: #5e7f96;
  --text-3: #41627c;
  --text-muted: #8aa8bd;

  /* Acentos */
  --orange: #ff8a3d;
  --orange-dark: #d96a20;
  --orange-deep: #e65100;
  --blue: #4fc3f7;
  --blue-dark: #2f9fd6;
  --blue-ink: #0277bd;
  --yellow: #ffd54f;
  --yellow-dark: #d9b23a;
  --yellow-ink: #6b4c00;

  /* Estados */
  --ok-bg: #e8f5e9;
  --ok-border: #81c784;
  --ok-border-2: #66bb6a;
  --ok-text: #2e7d32;
  --drop-bg: #fff8e1;
  --drop-bg-2: #fff3e0;
  --drop-border: #ffb74d;
  --drop-text: #b26a00;
  --notif: #ff5252;

  /* Mapa */
  --grass: #7cb946;
  --grid: rgba(255, 255, 255, .28);

  /* Sombras "de juguete" (duras, sin blur) */
  --sh-sm: 0 3px 0 rgba(0, 0, 0, .12);
  --sh-md: 0 4px 0 rgba(0, 0, 0, .10);
  --sh-lg: 0 5px 0 rgba(0, 0, 0, .10);
  --sh-xl: 0 6px 0 rgba(0, 0, 0, .10);
  --ink-shadow: 0 2px 0 rgba(0, 0, 0, .15);
  --ink-shadow-lg: 0 3px 0 rgba(0, 0, 0, .15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior-y: none;
}

body {
  font-family: 'Baloo 2', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  color: var(--text);
  background: var(--sky-1);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 60%, var(--sky-3) 100%);
}

/* Texto sobre el cielo */
.on-sky { color: #fff; text-shadow: var(--ink-shadow); }
.screen-title { font-weight: 800; font-size: 23px; color: #fff; text-shadow: var(--ink-shadow-lg); }

button, input { font-family: inherit; }

/* ---------------------------- HUD superior ---------------------------- */
.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 14px;
  flex: none;
  z-index: 10;
  /* Sobre el mapa real el texto blanco se perdía: este velo azul lo respalda.
     En las demás pantallas cae sobre el mismo azul del fondo, así que no se nota. */
  background: linear-gradient(180deg, var(--sky-1) 0%, rgba(79, 195, 247, .85) 55%, rgba(79, 195, 247, 0) 100%);
}
.hud-avatar { position: relative; width: 46px; height: 46px; flex: none; }
.hud-ring {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  /* el ángulo del progreso XP se inyecta inline */
  background: conic-gradient(var(--orange) var(--xp-deg, 0deg), rgba(255, 255, 255, .55) 0);
}
.hud-face {
  width: 37px; height: 37px; border-radius: 50%;
  background: #fff; display: grid; place-items: center; font-size: 18px;
}
.hud-level {
  position: absolute; right: -5px; bottom: -5px;
  background: var(--orange); color: #fff;
  font-weight: 800; font-size: 11px;
  border-radius: 999px; padding: 1px 7px;
  box-shadow: 0 2px 0 var(--orange-dark);
}
.hud-mid { flex: 1; min-width: 0; }
.hud-name { font-weight: 800; font-size: 14px; color: #fff; text-shadow: var(--ink-shadow); }
.hud-xp {
  height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .55);
  margin-top: 4px; overflow: hidden; border: 2px solid #fff;
}
.hud-xp-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  transition: width .35s ease-out;
}
.hud-coins {
  display: flex; align-items: center; gap: 5px;
  background: #fff; border-radius: 999px; padding: 6px 12px;
  font-weight: 800; font-size: 14px; box-shadow: var(--sh-sm);
}
.hud-feed {
  position: relative; width: 38px; height: 38px; flex: none;
  border-radius: 50%; background: #fff;
  display: grid; place-items: center; font-size: 17px;
  cursor: pointer; border: none; box-shadow: var(--sh-sm);
}
.hud-feed-dot {
  position: absolute; top: -2px; right: -2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--notif); border: 2px solid #fff;
}

/* ---------------------------- Toast ---------------------------- */
.toast {
  position: absolute; top: 92px; left: 50%; transform: translateX(-50%);
  z-index: 60; background: #fff; border: 3px solid var(--yellow);
  color: var(--orange-deep); font-weight: 800; font-size: 13px;
  padding: 8px 16px; border-radius: 999px;
  animation: owToast .25s ease-out; white-space: nowrap;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .12);
}

/* ---------------------------- Pantalla ---------------------------- */
.screen { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 6px 16px 128px;
  display: flex; flex-direction: column; gap: 14px;
}

/* ---------------------------- Piezas base ---------------------------- */
.card { background: var(--card); border-radius: 24px; padding: 14px; box-shadow: var(--sh-xl); }
.card-sm { background: var(--card); border-radius: 20px; padding: 12px; box-shadow: var(--sh-lg); }

/* Botones: siempre píldora con sombra dura inferior; hit target >= 44px */
.btn {
  border: none; cursor: pointer; font-weight: 800;
  border-radius: 999px; padding: 10px 16px; font-size: 13px;
  transition: transform .06s ease, box-shadow .06s ease;
}
.btn:active { transform: translateY(3px); box-shadow: none !important; }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 4px 0 var(--orange-dark); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-dark); }
.btn-yellow { background: var(--yellow); color: var(--yellow-ink); box-shadow: 0 4px 0 var(--yellow-dark); }
.btn-white { background: #fff; color: var(--blue-ink); box-shadow: var(--sh-md); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 12px; font-size: 14px; border-radius: 16px; }

.chip {
  flex: none; border: none; cursor: pointer;
  font-weight: 800; font-size: 12px; padding: 7px 14px;
  border-radius: 999px; white-space: nowrap; box-shadow: var(--sh-sm);
  background: #fff; color: var(--text-2);
}
.chip.on { background: var(--orange); color: #fff; box-shadow: 0 3px 0 var(--orange-dark); }

.overline { font-weight: 800; font-size: 11px; letter-spacing: 1px; color: var(--orange-deep); }
.meta { font-size: 11px; color: var(--text-muted); }
.sub { font-size: 12px; color: var(--text-2); }

/* Placeholder de imagen (en producción: foto real) */
.ph {
  background: repeating-linear-gradient(45deg, var(--sky-3) 0 8px, #f2fafe 8px 16px);
  display: grid; place-items: center;
  color: var(--text-2); font-size: 11px; font-family: monospace;
}

/* ---------------------------- Base (home) ---------------------------- */
.hero { font-weight: 800; font-size: 27px; color: #fff; text-shadow: var(--ink-shadow-lg); margin-top: 2px; }
.hero span { color: var(--yellow); }

.radar-card { display: flex; gap: 14px; align-items: center; }
.radar {
  position: relative; width: 86px; height: 86px; flex: none; border-radius: 50%;
  background: radial-gradient(circle, var(--sky-3) 0%, var(--sky-2) 80%);
  border: 4px solid var(--blue); overflow: hidden;
}
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(79, 195, 247, .7), transparent 70deg);
  animation: owSweep 3s linear infinite;
}
.radar-inner { position: absolute; inset: 26px; border-radius: 50%; border: 2px solid rgba(79, 195, 247, .5); }
.radar-blip {
  position: absolute; left: 56px; top: 22px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--orange); animation: owBlink 1.2s infinite;
}
.radar-kicker { color: var(--orange); font-weight: 800; font-size: 12px; letter-spacing: .5px; animation: owBlink 2s infinite; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; }
.section-title { font-weight: 800; font-size: 16px; color: #fff; text-shadow: var(--ink-shadow); }
.section-note { font-size: 11px; color: #eaf7ff; }

.drop-row { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 20px; padding: 10px; box-shadow: var(--sh-lg); }
.drop-thumb {
  width: 46px; height: 46px; flex: none; border-radius: 16px;
  background: repeating-linear-gradient(45deg, var(--drop-bg-2) 0 7px, #ffe8cc 7px 14px);
  border: 3px solid var(--yellow); display: grid; place-items: center; font-size: 19px;
}
.drop-give { color: var(--orange-deep); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick {
  background: #fff; border: none; border-radius: 18px; padding: 12px;
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  box-shadow: var(--sh-md); font-weight: 800; font-size: 13px; color: var(--text);
}
.quick:active { transform: translateY(2px); box-shadow: none; }

.legal {
  font-size: 10px; line-height: 1.5; color: var(--text-3);
  background: rgba(255, 255, 255, .6); border-radius: 14px; padding: 10px 12px;
}
.legal a { color: var(--blue-ink); }

/* ---------------------------- Feed ---------------------------- */
.feed-back {
  width: 36px; height: 36px; flex: none; border: none; border-radius: 50%;
  background: #fff; display: grid; place-items: center; font-size: 16px;
  cursor: pointer; box-shadow: var(--sh-sm);
}
.chips-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.feed-card { background: #fff; border-radius: 22px; padding: 12px; box-shadow: var(--sh-lg); display: flex; flex-direction: column; gap: 8px; }
.feed-top { display: flex; align-items: center; gap: 8px; }
.feed-tag { font-weight: 800; font-size: 10px; padding: 3px 9px; border-radius: 999px; letter-spacing: .5px; }
.feed-img { height: 92px; border-radius: 14px; }
.feed-title { font-weight: 800; font-size: 13.5px; line-height: 1.3; }

/* ---------------------------- Mapa ---------------------------- */
/* El mapa real (MapLibre) va detrás; los overlays flotan encima pero dejan
   pasar los gestos (pan/zoom) salvo en los propios controles. */
#map { position: absolute; inset: 0; z-index: 1; background: linear-gradient(var(--sky-1), #a5dcf7); }
#map[hidden] { display: none; }
.map-wrap { flex: 1; position: relative; overflow: hidden; z-index: 2; pointer-events: none; }
.map-wrap > * { pointer-events: auto; }

.map-msg {
  position: absolute; top: 62px; left: 50%; transform: translateX(-50%); z-index: 6;
  background: #fff; border-radius: 999px; padding: 8px 16px;
  font-size: 12px; font-weight: 800; color: var(--text-2); box-shadow: var(--sh-sm);
}

/* Pines cartoon como marcadores de MapLibre.
   .pin-marker es la raíz que MapLibre ancla al mapa vía transform:
   NO debe llevar animaciones con transform o el pin se despega del mapa.
   El rebote (owBob) vive en el hijo .pin; la sombra queda fuera, en el suelo. */
.pin-marker {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; border: none; background: none; padding: 0;
}
.pin {
  display: flex; flex-direction: column; align-items: center;
  animation: owBob 2.6s ease-in-out infinite;
}
.pin-dot {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 21px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .18);
  background: #fff; border: 4px solid var(--blue);
}
.pin-marker.drop .pin-dot { background: var(--drop-bg); border-color: var(--drop-border); }
.pin-marker.done .pin-dot { background: var(--ok-bg); border-color: var(--ok-border-2); }
.pin-stem { width: 4px; height: 14px; background: var(--blue); }
.pin-marker.drop .pin-stem { background: var(--drop-border); }
.pin-marker.done .pin-stem { background: var(--ok-border-2); }
.pin-shadow { display: block; width: 28px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, .25); margin: -2px auto 0; filter: blur(2px); }

/* Burbuja de grupo: cuántas zonas hay amontonadas ahí. Mismo lenguaje que los pines:
   círculo blanco, borde grueso y sombra dura. Sin transform propio (lo usa MapLibre). */
.cluster {
  display: grid; place-items: center; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 4px solid var(--orange);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .18);
}
.cluster.lg { width: 54px; height: 54px; }
.cluster.xl { width: 64px; height: 64px; border-color: var(--orange-deep); }
.cluster-n { font-weight: 800; font-size: 15px; color: var(--orange-deep); }
.cluster.lg .cluster-n { font-size: 17px; }
.cluster.xl .cluster-n { font-size: 19px; }

/* Sin `position` propio: MapLibre le pone position:absolute para anclarlo.
   Los hijos (.player-dot/.player-pulse) ya se posicionan solos. */
.player-marker { width: 0; height: 0; }
.player-pulse {
  position: absolute; left: -34px; top: -34px; width: 68px; height: 68px;
  border-radius: 50%; border: 3px solid rgba(255, 138, 61, .7);
  animation: owPulse 2s ease-out infinite;
}
.player-dot {
  position: absolute; left: -13px; top: -13px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--orange); border: 4px solid #fff;
  box-shadow: 0 0 16px rgba(255, 138, 61, .8);
}

.map-seg { position: absolute; top: 10px; left: 16px; right: 16px; display: flex; gap: 8px; z-index: 5; }
.seg {
  flex: 1; text-align: center; border: none; font-weight: 800; font-size: 13px;
  padding: 10px 8px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .15); background: #fff; color: var(--text-2);
}
.seg.on { background: var(--orange); color: #fff; }

.drop-banner {
  position: absolute; top: 56px; left: 16px; right: 16px; z-index: 5;
  background: #fff; border: 3px solid var(--yellow); border-radius: 18px;
  padding: 9px 12px; display: flex; gap: 9px; align-items: center; cursor: pointer;
  animation: owFloat 2.4s ease-in-out infinite; box-shadow: 0 5px 0 rgba(0, 0, 0, .12);
  font-size: 12px; color: var(--yellow-ink); text-align: left;
}
.fab {
  position: absolute; right: 16px; bottom: 100px; z-index: 5;
  background: var(--orange); color: #fff; border: none;
  font-weight: 800; font-size: 13px; padding: 12px 16px;
  border-radius: 999px; cursor: pointer; box-shadow: 0 5px 0 var(--orange-dark);
}
/* Centrar en mi ubicación */
.loc-btn {
  position: absolute; right: 16px; bottom: 156px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: #fff; font-size: 18px; cursor: pointer; box-shadow: var(--sh-md);
}
/* Atribución de OpenFreeMap/OSM: obligatoria, pero fuera del camino del FAB */
.maplibregl-ctrl-bottom-right { bottom: 78px; right: auto; left: 0; z-index: 3; }
.maplibregl-ctrl-attrib { font-family: inherit; font-size: 10px; border-radius: 0 999px 999px 0; }

.sheet {
  position: absolute; left: 10px; right: 10px; bottom: 92px; z-index: 8;
  background: #fff; border-radius: 24px; padding: 16px; box-shadow: 0 8px 0 rgba(0, 0, 0, .15);
}
.sheet-head { display: flex; gap: 12px; align-items: center; }
.sheet-ic {
  width: 54px; height: 54px; border-radius: 18px; background: var(--sky-3);
  border: 3px solid var(--blue); display: grid; place-items: center; font-size: 25px;
}
.x-btn { border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: 18px; padding: 4px; }

/* Fila de "camino a pie" dentro del sheet de zona */
.route-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin-top: 12px; padding: 10px 12px; border-radius: 14px;
  background: var(--sky-3); border: 2px solid var(--sky-2);
  font-family: inherit; font-size: 12.5px; color: var(--text-3);
  text-align: left; cursor: pointer;
}
.route-row.muted { background: #f6fafc; border-color: #e7f1f6; color: var(--text-muted); cursor: default; }
.route-ic { font-size: 16px; }
.route-fit { margin-left: auto; font-weight: 800; color: var(--orange-deep); white-space: nowrap; }
.state-ok {
  margin-top: 12px; text-align: center; background: var(--ok-bg);
  border: 3px solid var(--ok-border); color: var(--ok-text);
  font-weight: 800; font-size: 13px; padding: 10px; border-radius: 16px;
}

.capture-overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(225, 245, 254, .92); display: grid; place-items: center;
}
.capture-box { position: relative; width: 200px; height: 200px; display: grid; place-items: center; }
.capture-ring { position: absolute; inset: 60px; border-radius: 50%; border: 4px solid var(--orange); animation: owRing 1.2s ease-out infinite; }
.capture-ring.b { border-color: var(--blue); animation-delay: .4s; }
.capture-ic { font-size: 52px; animation: owBob 1s ease-in-out infinite; }
.capture-label { position: absolute; bottom: -8px; width: 100%; text-align: center; color: var(--orange-deep); font-weight: 800; font-size: 14px; letter-spacing: 2px; }

.modal-back { position: absolute; inset: 0; z-index: 30; background: rgba(28, 58, 82, .45); display: flex; align-items: flex-end; }
.modal-sheet {
  width: 100%; background: #fff; border-radius: 28px 28px 0 0;
  padding: 18px 16px calc(env(safe-area-inset-bottom) + 24px);
  display: flex; flex-direction: column; gap: 12px;
}
.cam-ph { height: 110px; border-radius: 18px; border: 3px dashed var(--blue); font-size: 12px; }
.field {
  background: #f2fafe; border: 3px solid var(--sky-2); border-radius: 14px;
  padding: 11px 12px; color: var(--text); font-size: 13px; outline: none; width: 100%;
}
.field::placeholder { color: var(--text-muted); }
.gps-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ok-text); font-weight: 800; }

/* ---------------------------- Misiones ---------------------------- */
.days { display: flex; gap: 6px; }
.day {
  flex: 1; text-align: center; border: none; font-weight: 800; font-size: 12px;
  padding: 11px 0; border-radius: 14px; cursor: pointer;
  box-shadow: var(--sh-sm); background: #fff; color: var(--text-2);
}
.day.on { background: var(--orange); color: #fff; }
.bar { height: 10px; border-radius: 999px; background: var(--sky-3); margin-top: 8px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--yellow), var(--orange)); transition: width .35s ease-out; }
.raid { background: #fff; border: 4px solid var(--yellow); border-radius: 22px; padding: 14px; box-shadow: 0 6px 0 rgba(0, 0, 0, .12); }
.raid-head { display: flex; align-items: center; gap: 8px; }
.countdown { font-weight: 800; font-size: 19px; color: var(--orange-deep); font-variant-numeric: tabular-nums; }
.mission { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 20px; padding: 12px; box-shadow: var(--sh-md); }
.mission.done { opacity: .55; }
.mission-time { width: 44px; flex: none; text-align: center; font-weight: 800; font-size: 14px; color: var(--blue); }
.mission-btn {
  flex: none; border: none; font-size: 12px; font-weight: 800;
  padding: 9px 11px; border-radius: 999px; cursor: pointer;
  box-shadow: var(--sh-md); background: var(--drop-bg-2); color: var(--orange-deep);
}
.mission-btn.on { background: var(--ok-bg); color: var(--ok-text); }

/* ---------------------------- Tienda ---------------------------- */
.shop-head { display: flex; align-items: center; justify-content: space-between; }
.cart-btn {
  position: relative; cursor: pointer; border: none; background: #fff;
  border-radius: 999px; padding: 10px 14px; font-weight: 800; font-size: 13px;
  box-shadow: var(--sh-md); color: var(--text);
}
.cart-count {
  position: absolute; top: -6px; right: -6px; background: var(--notif); color: #fff;
  font-size: 11px; font-weight: 800; border-radius: 999px;
  min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px;
}
.shop-note { font-size: 12px; color: #eaf7ff; font-weight: 600; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prod { background: #fff; border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--sh-lg); }
.prod-img { height: 78px; border-radius: 16px; font-size: 32px; }
.prod-name { font-weight: 800; font-size: 12.5px; line-height: 1.3; }
.prod-price { font-weight: 800; font-size: 16px; }
.prod-bonus { font-size: 10.5px; color: var(--ok-text); font-weight: 800; }
.cart-line { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.cart-total { display: flex; justify-content: space-between; border-top: 2px solid var(--sky-3); margin-top: 8px; padding-top: 8px; font-weight: 800; font-size: 14px; }

/* ---------------------------- Más / Perfil ---------------------------- */
.medals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.medal { background: #fff; border-radius: 22px; padding: 12px; text-align: center; box-shadow: var(--sh-lg); }
.medal-ic { font-size: 30px; }
.medal-name { font-weight: 800; font-size: 12.5px; margin-top: 4px; }
.medal-bar { height: 8px; border-radius: 999px; background: var(--sky-3); margin-top: 8px; overflow: hidden; }
.viewer {
  position: relative; height: 150px; margin-top: 10px; border-radius: 18px; overflow: hidden;
  background: repeating-linear-gradient(45deg, #26425a 0 10px, #1c3448 10px 20px);
  display: grid; place-items: center;
}
.viewer-txt { font-family: monospace; font-size: 12px; color: #9ec4dd; }
.corner { position: absolute; width: 22px; height: 22px; }
.corner.tl { left: 10px; top: 10px; border-left: 4px solid var(--yellow); border-top: 4px solid var(--yellow); border-radius: 4px 0 0 0; }
.corner.tr { right: 10px; top: 10px; border-right: 4px solid var(--yellow); border-top: 4px solid var(--yellow); border-radius: 0 4px 0 0; }
.corner.bl { left: 10px; bottom: 10px; border-left: 4px solid var(--yellow); border-bottom: 4px solid var(--yellow); border-radius: 0 0 0 4px; }
.corner.br { right: 10px; bottom: 10px; border-right: 4px solid var(--yellow); border-bottom: 4px solid var(--yellow); border-radius: 0 0 4px 0; }
.viewer-badge {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  background: var(--yellow); color: var(--yellow-ink); font-size: 10px;
  font-weight: 800; padding: 3px 10px; border-radius: 999px; letter-spacing: 1px;
}
.links-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.link-tile {
  background: #fff; border: none; border-radius: 16px; padding: 12px 6px;
  text-align: center; cursor: pointer; box-shadow: var(--sh-md); color: var(--text);
}
.link-tile:active { transform: translateY(2px); box-shadow: none; }
.link-ic { font-size: 18px; }
.link-lb { font-weight: 800; font-size: 11px; margin-top: 3px; }

/* ---------------------------- Tab bar ---------------------------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: 6px;
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 10px);
  background: #fff; border-radius: 26px 26px 0 0;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .14);
}
.tab {
  flex: 1; text-align: center; cursor: pointer; border: none; background: none;
  padding: 7px 0 5px; border-radius: 16px; color: var(--text-muted);
}
.tab.on { background: var(--drop-bg-2); color: var(--orange); }
.tab-ic { font-size: 19px; }
.tab-lb { font-size: 10px; font-weight: 800; margin-top: 1px; }

/* ---------------------------- Animaciones ---------------------------- */
@keyframes owPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes owBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes owSweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes owRing { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(3); opacity: 0; } }
@keyframes owToast { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes owBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes owFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
