/* ═══════════════════════════════════════════════════════════════
   BASE: reinicio, temas, tipografía, animaciones y utilidades
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--f-text); line-height: 1.45; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--a, var(--link)); }
a:hover { color: var(--a-hover, var(--link-hover)); }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 800; line-height: 1.12; }
p { margin: 0; }
[hidden] { display: none !important; }

/* Foco visible para teclado */
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

/* ── Temas: cada página pone una clase en <body> ───────────── */
/* /go: claro celeste con puntitos */
.theme-go {
  --bg: var(--sky-bg); --text: var(--ink); --muted: var(--ink-3); --surface: #fff; --line: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(rgba(125, 207, 243, .38) 1.4px, transparent 1.7px);
  background-size: 18px 18px;
  color: var(--text);
}
/* /comiccon: noche azul con puntitos */
.theme-cc {
  --bg: var(--cc-bg); --text: #fff; --muted: var(--cc-muted); --surface: var(--cc-card); --line: var(--cc-line);
  --a: var(--sky-2); --a-hover: #fff;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1.4px, transparent 1.7px);
  background-size: 18px 18px;
  color: var(--text);
}
/* Staff: gris claro, alto contraste */
.theme-staff {
  --bg: var(--st-bg); --text: var(--ink); --muted: var(--st-muted); --surface: #fff; --line: var(--st-line);
  background: var(--bg);
  color: var(--text);
}

/* Contenedor de página móvil */
.page { max-width: var(--page-max); margin: 0 auto; overflow-x: clip; position: relative; padding-bottom: 40px; }
/* La experiencia pública de Comic Con es un lienzo de borde a borde. Los
   gutters pertenecen a cada sección; el shell no debe añadir bandas laterales
   en móviles anchos, tablets ni escritorios. */
.theme-cc:not(.staff-m) > .page { width: 100%; max-width: none; margin-inline: 0; }
.page.has-tabbar {
  /* Reserva la barra fija, el safe area del dispositivo y aire suficiente
     para que el último control siempre pueda desplazarse por encima de ella. */
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 48px);
  scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 48px);
}
.page.has-tabbar :is(a, button, input, select, textarea, [tabindex]) {
  scroll-margin-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
}
.section { margin: 34px var(--gutter) 0; }
.section--tight { margin-top: 18px; }

/* Encabezado de sección: «KICKER · 日本語» + título */
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--kicker, var(--link)); }
.theme-cc .kicker { --kicker: var(--cc-yellow); }
.kicker .jp, .jp { font-family: var(--f-jp); font-weight: 700; letter-spacing: .06em; text-transform: none; }
.h1 { font-size: 30px; }
.h2 { font-size: 26px; margin-top: 6px; }
.h3 { font-size: 20px; }
.lead { font-size: 15px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.num { font-family: var(--f-display); font-weight: 800; }
.mascot { object-fit: contain; }

/* Encabezado con mascota a la derecha */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.title-row > img { flex: none; margin-bottom: -6px; }

/* ── Animaciones ─────────────────────────────────────────── */
@keyframes aiFloat { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes aiFly { 0%, 100% { transform: translate(0, 0) rotate(-2deg); } 50% { transform: translate(6px, -12px) rotate(2deg); } }
@keyframes aiBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes aiShadow { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.72); opacity: .45; } }
@keyframes aiDrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }
@keyframes aiDash { to { stroke-dashoffset: -60; } }
@keyframes aiTwinkle { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes aiMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes aiShine { 0% { transform: translateX(-140%) skewX(-18deg); } 55%, 100% { transform: translateX(560%) skewX(-18deg); } }
@keyframes aiRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes aiFade { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes aiPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .75); } 70% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
@keyframes aiPulseY { 0% { box-shadow: 0 0 0 0 rgba(249, 217, 74, .8); } 70% { box-shadow: 0 0 0 10px rgba(249, 217, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(249, 217, 74, 0); } }
@keyframes aiSpin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes aiSpinner { to { transform: rotate(360deg); } }
@keyframes aiBoom { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.05) rotate(-1.5deg); } }
@keyframes aiStamp { 0% { transform: scale(1.9) rotate(-30deg); opacity: 0; } 60% { transform: scale(.92) rotate(-8deg); opacity: 1; } 100% { transform: scale(1) rotate(-12deg); opacity: 1; } }
@keyframes aiToast { 0% { opacity: 0; transform: translate(-50%, -14px); } 10%, 88% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes aiFill { from { width: 0; } }
@keyframes aiGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes aiScan { 0%, 100% { top: 14%; } 50% { top: 82%; } }
@keyframes aiWords { 0%, 12% { transform: translateY(0); } 16.66%, 28.66% { transform: translateY(-28px); } 33.33%, 45.33% { transform: translateY(-56px); } 50%, 62% { transform: translateY(-84px); } 66.66%, 78.66% { transform: translateY(-112px); } 83.33%, 95.33% { transform: translateY(-140px); } 100% { transform: translateY(-168px); } }
@keyframes aiTrack { 0% { width: 8%; } 60%, 100% { width: 72%; } }
@keyframes aiShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.anim-float { animation: aiFloat 4.5s ease-in-out infinite; }
.anim-bob { animation: aiBob 3.4s ease-in-out infinite; }
.anim-rise { animation: aiRise .35s var(--ease-out) both; }

/* Sin animaciones si el celular pide «reducir movimiento» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* En pantallas táctiles los controles compactos conservan al menos 44px. */
@media (pointer: coarse) {
  .comiccon-mode .btn--sm,
  .comiccon-mode .btn--xs,
  .comiccon-mode .link-btn,
  .comiccon-mode .back-link,
  .comiccon-mode .segmented button,
  .comiccon-mode .filters button,
  .comiccon-mode .cc-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
