:root {
  --bg: #071612;
  --bg-2: #0c2420;
  --card: #12332c;
  --ink: #f5f0e6;
  --muted: #b7c4bc;
  --teal: #1aa68a;
  --teal-d: #0f766e;
  --gold: #e4b84a;
  --red: #e11d48;
  --blue: #3b82f6;
  --ok: #34d399;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: "Nunito", system-ui, sans-serif;
  --display: "Titan One", "Nunito", sans-serif;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #1a4a3c 0%, transparent 50%),
    radial-gradient(900px 500px at 110% 10%, #3b2a10 0%, transparent 45%),
    var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--gold); }
img { max-width: 100%; height: auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
code { background: #0b1f1b; padding: 0.1em 0.4em; border-radius: 6px; word-break: break-all; }
.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 800;
}
h1, h2, h3 { font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.page { width: min(1100px, calc(100% - 1.5rem)); margin: 0 auto; padding: 1.2rem 0 4rem; overflow-x: auto; }
.center-page { display: grid; place-items: center; min-height: 70vh; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%), var(--card);
  border: 1px solid rgba(228, 184, 74, 0.15);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  min-height: 44px;
  background: #25443d;
  color: var(--ink);
  text-decoration: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, #5eead4, #0f766e);
  color: #06211c;
  box-shadow: 0 8px 0 #0a4f48;
}
.btn.primary:hover { transform: translateY(1px); box-shadow: 0 7px 0 #0a4f48; }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,0.18); }
.btn.lg { padding: 0.95rem 1.6rem; font-size: 1.05rem; }
.btn.sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; min-height: 36px; }
.btn.full { width: 100%; }
.btn.danger, .danger { color: #fecaca; }
.btn.speak { background: #1e3a5f; margin-bottom: 0.8rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

.topbar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: rgba(7, 22, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(228,184,74,0.12);
  position: sticky; top: 0; z-index: 30;
  flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-size: clamp(1.05rem, 3vw, 1.35rem);
  letter-spacing: 0.02em;
}
.brand span span { color: var(--gold); }
.topnav { display: flex; gap: 0.85rem; margin-left: auto; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 0.35rem; }
.userchip { display: flex; align-items: center; gap: 0.5rem; }
.nick { font-weight: 800; color: var(--gold); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle {
  display: none; margin-left: auto;
  background: #12332c; color: var(--ink); border: 0;
  width: 44px; height: 44px; border-radius: 12px; font-size: 1.3rem; cursor: pointer;
}

/* ——— Landing gamificada ——— */
.land-body { background: #04110e; }
.hero-land {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(250, 204, 21, 0.18), transparent 32%),
    radial-gradient(circle at 10% 80%, rgba(45, 212, 191, 0.16), transparent 36%),
    linear-gradient(180deg, #06251f 0%, #0b3b32 42%, #071612 100%);
}
.land-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.45;
  animation: drift 12s ease-in-out infinite;
}
.b1 { width: 280px; height: 280px; background: #f59e0b; top: -60px; right: 8%; }
.b2 { width: 240px; height: 240px; background: #22d3ee; bottom: 10%; left: -40px; animation-delay: -4s; }
.b3 { width: 180px; height: 180px; background: #ef4444; top: 40%; right: -30px; animation-delay: -7s; }
.spark { position: absolute; font-size: 1.6rem; animation: bob 3.4s ease-in-out infinite; }
.s1 { top: 18%; left: 8%; }
.s2 { top: 28%; right: 12%; animation-delay: -1s; }
.s3 { bottom: 22%; left: 14%; animation-delay: -1.6s; }
.s4 { bottom: 30%; right: 18%; animation-delay: -0.5s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -18px) scale(1.08); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.land-top, .land-hero, .land-missions { position: relative; z-index: 1; }
.land-top {
  display: flex; justify-content: space-between; align-items: center; gap: 0.8rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto; padding: 1rem 0;
  flex-wrap: wrap;
}
.land-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.land-hero {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 0 2rem;
}
.land-copy h1 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  margin: 0.35rem 0 0.9rem;
  letter-spacing: 0.01em;
}
.land-copy h1 em {
  font-style: normal;
  font-family: "Bangers", var(--display);
  color: #facc15;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 0 #b45309, 0 0 28px rgba(250, 204, 21, 0.35);
}
.pulse-tag {
  display: inline-block;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(250, 204, 21, 0); }
}
.lead { font-size: clamp(1rem, 2.3vw, 1.2rem); max-width: 38rem; }
.play-btn { font-size: 1.12rem; animation: glow 2s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(45, 212, 191, 0)); }
  50% { filter: drop-shadow(0 0 12px rgba(45, 212, 191, 0.55)); }
}
.land-stats {
  list-style: none; padding: 0; margin: 1.4rem 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem;
}
.land-stats li {
  background: rgba(7, 22, 18, 0.55);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 0.7rem 0.4rem; text-align: center;
}
.land-stats b { display: block; color: #facc15; font-size: 1.25rem; }
.land-stats span { font-size: 0.75rem; color: var(--muted); font-weight: 800; }

.land-stage { display: grid; place-items: center; }
.hero-frame {
  position: relative; width: min(100%, 420px);
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.45));
  animation: bob 5s ease-in-out infinite;
}
.float-badge {
  position: absolute; font-weight: 800; font-size: 0.82rem;
  background: #facc15; color: #1c1917;
  padding: 0.35rem 0.65rem; border-radius: 999px;
  box-shadow: 0 6px 0 #a16207;
  animation: bob 2.8s ease-in-out infinite;
}
.fb1 { top: 8%; left: -6%; }
.fb2 { top: 42%; right: -10%; animation-delay: -1s; background: #fb7185; box-shadow: 0 6px 0 #9f1239; color: #fff; }
.fb3 { bottom: 14%; left: 4%; animation-delay: -0.4s; background: #22d3ee; box-shadow: 0 6px 0 #0e7490; }

.land-missions {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 2.5rem;
  padding: 0.5rem 0 2rem;
}
.land-missions h2 {
  font-family: var(--display); text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.2rem;
}
.land-sub { margin: 0 auto 1.3rem; max-width: 32rem; }
.prio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.mission {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(18,51,44,0.92));
  border-radius: 22px; padding: 1.25rem 1.15rem 1.2rem;
  border: 1px solid rgba(250, 204, 21, 0.22);
  transform: translateY(0);
  transition: transform 0.2s ease;
}
.mission:hover { transform: translateY(-6px); }
.m-num {
  font-family: var(--display); font-size: 2.4rem; line-height: 1;
  color: rgba(250, 204, 21, 0.28); float: right;
}
.mission span { color: var(--gold); font-weight: 800; font-size: 0.8rem; }
.mission.m1 { border-top: 6px solid #22d3ee; }
.mission.m2 { border-top: 6px solid #facc15; }
.mission.m3 { border-top: 6px solid #fb7185; }

.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-art {
  display: grid; place-content: center; padding: 2rem;
  background:
    linear-gradient(180deg, rgba(6,37,31,0.55), rgba(7,22,18,0.88)),
    url("/svg/mapa-florida.svg") center/cover;
}
.auth-art h2 { font-family: var(--display); }
.auth-card { margin: auto; width: min(440px, 92vw); }
label { display: block; font-weight: 700; margin: 0.7rem 0; }
input, select, textarea {
  width: 100%; margin-top: 0.3rem; padding: 0.75rem 0.8rem;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.12);
  background: #0b1f1b; color: var(--ink); font-family: inherit; font-size: 16px;
}
.alert { padding: 0.7rem 1rem; border-radius: 12px; }
.alert.bad { background: #4c0519; }
.alert.ok { background: #064e3b; }
.hint { font-size: 0.8rem; color: var(--muted); }

.hero-strip {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  background: linear-gradient(90deg, #134e4a, #1e3a5f 70%, #78350f);
  border-radius: 24px; padding: 1.4rem 1.6rem; margin-bottom: 1.4rem;
}
.xp-card { background: rgba(0,0,0,0.25); border-radius: 16px; padding: 0.8rem 1.1rem; text-align: center; min-width: 120px; }
.xp-card strong { display: block; font-size: 2rem; color: var(--gold); }
.avatar-pill { font-size: 0.7rem; background: rgba(0,0,0,0.3); padding: 0.15rem 0.5rem; border-radius: 999px; }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.level-card { background: var(--card); border-radius: var(--radius); padding: 1.1rem; border: 1px solid rgba(255,255,255,0.08); }
.level-card.locked { opacity: 0.55; filter: grayscale(0.4); }
.level-card.done { border-color: var(--ok); }
.level-card .lv { color: var(--gold); font-weight: 800; }
.lock, .ok { float: right; font-size: 0.8rem; }
.ok { color: var(--ok); }
.score-bar { height: 10px; background: #0b1f1b; border-radius: 99px; overflow: hidden; margin: 0.8rem 0 0.4rem; }
.score-bar > div { height: 100%; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin-top: 1.4rem; }
.boosters { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.boost { background: #0b1f1b; border-radius: 12px; padding: 0.6rem 0.8rem; display: grid; }
.achievements { list-style: none; padding: 0; margin: 0; }
.achievements li { display: flex; gap: 0.6rem; padding: 0.45rem 0; }
.achievements .off { opacity: 0.35; }
.mini-rank, .rank-list { list-style: none; padding: 0; }
.rank-list li, .mini-rank li { display: flex; gap: 0.8rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.rank-list .pos { width: 2rem; height: 2rem; flex: 0 0 2rem; border-radius: 50%; background: var(--teal-d); display: grid; place-items: center; font-weight: 800; }
.rank-list li em, .rank-list li b { margin-left: auto; }
.rank-list .me { background: rgba(228,184,74,0.08); border-radius: 12px; padding: 0.6rem; }
.cta-cert { text-align: center; margin-top: 1.5rem; }
.mail-form { max-width: 420px; margin: 1rem auto; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { border-bottom: 1px solid rgba(255,255,255,0.08); padding: 0.5rem; text-align: left; vertical-align: top; }
.survey fieldset { border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; margin: 1rem 0; }
.opt { font-weight: 600; display: flex; gap: 0.5rem; align-items: flex-start; }

.game-top { margin-bottom: 1rem; }
.boost-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.boost-chip {
  border: 1px solid rgba(228,184,74,0.35); background: #1a3028; border-radius: 999px;
  padding: 0.45rem 0.85rem; cursor: pointer; font-weight: 800; min-height: 40px;
}
.boost-chip.on { background: var(--gold); color: #1c1917; }
.boost-chip:disabled { opacity: 0.4; cursor: not-allowed; }
.concept-card { text-align: center; max-width: 720px; margin: 0 auto; }
.icon-xl { font-size: 3.2rem; }
.def { font-size: 1.15rem; }
.local { background: #0b1f1b; border-radius: 12px; padding: 0.8rem; color: #d6eadf; }
.concept-progress { text-align: center; font-weight: 800; color: var(--gold); margin-bottom: 0.5rem; }
.hud {
  display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap;
  background: #0b1f1b; padding: 0.6rem 1rem; border-radius: 18px; margin-bottom: 1rem; font-weight: 800;
}
.opts { display: grid; gap: 0.65rem; margin-top: 1rem; }
.opts button {
  text-align: left; padding: 0.95rem 1rem; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12);
  background: #0b1f1b; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; min-height: 48px;
}
.opts button:hover { border-color: var(--gold); }
.opts button.good { background: #065f46; }
.opts button.bad { background: #7f1d1d; }
.feedback { margin-top: 1rem; padding: 0.8rem; border-radius: 12px; background: #1e3a5f; }
.result-card { text-align: center; font-size: 1.15rem; }
.result-card .big { font-family: var(--display); font-size: clamp(2.4rem, 8vw, 3.5rem); color: var(--gold); margin: 0.4rem 0; }
.float-fx {
  position: fixed; pointer-events: none; font-weight: 800; font-size: 1.4rem; animation: up 0.9s ease-out forwards; z-index: 50;
}
@keyframes up { to { transform: translateY(-80px); opacity: 0; } }

.map-wrap { position: relative; border-radius: 16px; overflow: hidden; border: 3px solid var(--gold); }
.map-wrap img { display: block; width: 100%; }
.hotspot {
  position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 8px rgba(228,184,74,0.25); cursor: pointer; border: 2px solid #1c1917;
}
.hotspot.done { background: var(--ok); box-shadow: 0 0 0 6px rgba(52,211,153,0.25); }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: grid; place-items: center; padding: 1rem; z-index: 40;
}
.modal .card { max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; }

body.is-admin { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.admin-side {
  background: #081a16; min-height: 100vh; padding: 1.1rem; border-right: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.admin-side nav { display: grid; gap: 0.35rem; margin: 1.2rem 0; }
.admin-side nav a { color: var(--ink); text-decoration: none; padding: 0.45rem 0.5rem; border-radius: 8px; }
.admin-side nav a:hover { background: #12332c; }
.admin-side .brand small { display: block; font-family: var(--font); font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.admin-main { padding: 1.4rem clamp(0.8rem, 3vw, 1.6rem) 3rem; min-width: 0; overflow-x: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.7rem; margin: 1rem 0; }
.stat { background: var(--card); border-radius: 14px; padding: 0.8rem; }
.stat strong { display: block; font-size: 1.6rem; color: var(--gold); }
.filters { display: flex; gap: 0.6rem; margin: 1rem 0; flex-wrap: wrap; }
.grid-form { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.inline, .inline-edit { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.inline-edit input, .inline-edit select { width: auto; max-width: 100%; }
.tab-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 0.6rem; align-items: center; margin: 0.4rem 0; }
.tab-bar { height: 10px; background: #0b1f1b; border-radius: 99px; overflow: hidden; }
.tab-bar > div { height: 100%; background: var(--teal); }
.log-mini { list-style: none; padding: 0; font-size: 0.88rem; }
.site-foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 1.5rem 1rem; }

@media (max-width: 980px) {
  .land-hero { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .prio-cards { grid-template-columns: 1fr; }
  .float-badge { font-size: 0.72rem; }
  .fb1 { left: 0; }
  .fb2 { right: 0; }
}
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { min-height: 160px; padding: 1.2rem; }
  body.is-admin { grid-template-columns: 1fr; }
  .admin-side { position: relative; height: auto; min-height: 0; }
  .hero-strip { flex-direction: column; align-items: stretch; text-align: left; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topnav {
    display: none; width: 100%; order: 5; flex-direction: column;
    background: #0b1f1b; border-radius: 12px; padding: 0.4rem;
  }
  .topbar.nav-open .topnav { display: flex; }
  .land-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab-row { grid-template-columns: 1fr; }
  .spark { display: none; }
}
@media (max-width: 560px) {
  .cta-row .btn { width: 100%; }
  .land-actions { width: 100%; }
  .land-actions .btn { flex: 1; }
  .userchip { width: 100%; justify-content: space-between; }
  .hotspot { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .result-card { font-size: 1rem; }
  .inline-edit input, .inline-edit select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
