/* ============================================================
   JuegosLiterarios — Diseño compartido
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #FAF7F1;
  --bg-glow: #F3EAD8;
  --surface: #FFFFFF;
  --ink: #1C1917;
  --ink-soft: #44403C;
  --muted: #78716C;
  --faint: #A8A29E;
  --line: #E8E2D6;
  --line-soft: #F0EBDF;
  --accent: #B45309;
  --accent-bright: #D97706;
  --accent-soft: #F7EDDA;
  --gold: #C9A227;
  --ok: #2F6F4F;
  --ok-soft: #E3F0E8;
  --bad: #B3382E;
  --bad-soft: #F7E4E1;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28,25,23,.05), 0 6px 18px rgba(28,25,23,.05);
  --shadow-lg: 0 2px 6px rgba(28,25,23,.06), 0 14px 34px rgba(28,25,23,.09);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 50% -180px, var(--bg-glow) 0%, rgba(243,234,216,0) 70%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: #F3DFB6; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 20px;
  background: rgba(250,247,241,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-weight: 700; font-size: 1.06rem;
}
.topbar .brand .logo {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #E8A33D, #B45309);
  color: #fff; font-size: 15px;
  box-shadow: 0 2px 6px rgba(180,83,9,.35);
}
.topbar nav { display: flex; align-items: center; gap: 8px; }
.topbar nav a {
  text-decoration: none; color: var(--ink-soft);
  font-size: .82rem; font-weight: 500; padding: 7px 12px;
  border-radius: 999px; transition: background .15s, color .15s;
}
.topbar nav a:hover { background: var(--accent-soft); color: var(--accent); }
.topbar nav a.active { background: var(--ink); color: #fff; }
/* ✎ Enlace "Todos los juegos": misma letra serif de la marca.
     Regula el tamaño aquí (font-size). */
.topbar nav a.volver {
  font-family: var(--serif);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
}

/* ---------- Layout ---------- */
.wrap { max-width: 880px; margin: 0 auto; padding: 34px 18px 70px; }
.wrap-narrow { max-width: 620px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .28em;
  font-size: .68rem; font-weight: 600; color: var(--muted);
}
h1.game-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  letter-spacing: -.015em; line-height: 1.12; margin: 8px 0 6px;
}
.game-sub { color: var(--muted); font-size: .94rem; max-width: 54ch; }
.center { text-align: center; }
.center .game-sub { margin-left: auto; margin-right: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; font-weight: 600; font-size: .9rem;
  padding: 12px 26px; transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 4px 14px rgba(28,25,23,.22); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(28,25,23,.26); background: #000; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(180,83,9,.3); }
.btn-accent:hover { background: var(--accent-bright); transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px;
}
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; margin-top: 24px;
}

/* ---------- Badges y stats ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid #EADFC6; border-radius: 999px; padding: 5px 12px;
}
.stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 18px; min-width: 92px;
  text-align: center; box-shadow: var(--shadow);
}
.stat b { display: block; font-family: var(--serif); font-size: 1.3rem; line-height: 1.15; }
.stat span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Formularios ---------- */
.field { margin-top: 16px; text-align: left; }
.field label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; font-size: .92rem; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180,83,9,.12);
}
.field textarea { resize: vertical; min-height: 110px; line-height: 1.6; }

/* ---------- Avisos ---------- */
.note { font-size: .78rem; color: var(--faint); margin-top: 14px; }
.alert {
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: .86rem; margin-top: 14px;
}
.alert-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #CBE2D4; }
.alert-bad { background: var(--bad-soft); color: var(--bad); border: 1px solid #EFD0CB; }

/* ---------- Animaciones ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.92); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.fade-up { animation: fadeUp .35s ease both; }
.pop { animation: pop .3s ease both; }
.shake { animation: shake .3s ease; }

/* ---------- Pie ---------- */
.foot {
  margin-top: 46px; text-align: center;
  font-size: .74rem; color: var(--faint);
}
.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--line); }

/* ---------- Pie con comunidad + contacto (se inyecta solo) ---------- */
.jl-foot {
  text-align: center; padding: 22px 16px 28px; margin-top: 26px;
  font-size: .8rem; color: var(--muted);
  border-top: 1px solid var(--line-soft);
}
.jl-foot .jl-comunidad {
  font-family: var(--serif); font-weight: 600; color: var(--ink-soft);
}
.jl-foot a { color: var(--accent); text-decoration: none; }
.jl-foot a:hover { text-decoration: underline; }
.jl-foot .jl-sep { margin: 0 10px; color: var(--faint); }
@media (max-width: 560px) {
  .jl-foot .jl-sep { display: none; }
  .jl-foot > * { display: block; margin: 4px 0; }
}

@media (max-width: 560px) {
  .wrap { padding: 26px 14px 56px; }
  .panel { padding: 18px; }
  .topbar .brand span.txt { display: none; }
}
