/* ==========================================================================
   JUEGOS MEDIO DE MIEDO — Linear × Apple Arcade Portal Edition
   Superficies obsidian glass, hairlines especulares 1px, spotlight interactivo,
   tipografía afinada y portadas ilustradas 16:10 como protagonistas absolutas.
   ========================================================================== */
:root {
  --bg-deep: #050712;
  --bg-mid: #0B1024;
  --surface: rgba(13, 17, 36, 0.74);
  --surface-strong: rgba(17, 22, 46, 0.9);
  --surface-raised: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.085);
  --border-soft: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --specular: rgba(255, 255, 255, 0.18);
  --ink: #050814;

  --cyan: #6FFFE9;
  --neon: #39FF14;
  --gold: #FFD166;
  --coral: #FF4D6D;
  --purple: #A855F7;
  --cream: #F8FAFC;
  --text-secondary: #B8C6E3;
  --muted: #7F90B5;

  --font-display: 'Baloo 2', 'Fredoka', ui-rounded, 'SF Pro Rounded', sans-serif;
  --font-ui: 'Plus Jakarta Sans', 'Fredoka', system-ui, -apple-system, sans-serif;
  --font-body: 'Fredoka', 'Plus Jakarta Sans', ui-rounded, sans-serif;
  --font-px: 'Press Start 2P', ui-monospace, monospace;

  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  position: relative;
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--cream);
  font-family: var(--font-ui);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.modal-open,
body.modal-open {
  overflow: hidden;
}

::selection {
  background: rgba(111, 255, 233, 0.24);
  color: #FFF;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ==================== ATMÓSFERA CÓSMICA + GRAIN SUTIL ==================== */
#skyCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.ambient-mesh {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 42% at 18% -6%, rgba(124, 58, 237, 0.22), transparent 68%),
    radial-gradient(ellipse 52% 36% at 86% 2%, rgba(56, 189, 248, 0.12), transparent 66%),
    radial-gradient(ellipse 58% 36% at 50% 106%, rgba(255, 179, 71, 0.09), transparent 72%);
}

.ambient-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 160px 160px;
}

.portal-wrap {
  position: relative;
  z-index: 2;
  max-width: 1300px;
  margin: 0 auto;
  padding: 16px 22px 72px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Íconos y personajes SVG custom */
.cmm-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==================== TOP BAR OBSIDIAN GLASS ==================== */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  background: rgba(10, 14, 30, 0.74);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 8px 12px;
  box-shadow:
    inset 0 1px 0 var(--specular),
    0 18px 42px -14px rgba(2, 4, 14, 0.76);
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.topbar:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.topbar.is-scrolled {
  background: rgba(8, 11, 25, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 22px 48px -14px rgba(2, 4, 14, 0.88);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex-shrink: 1;
}

.brand-emblem-wrap {
  position: relative;
  display: inline-flex;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 209, 102, 0.62), rgba(111, 255, 233, 0.3) 55%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 6px 20px -4px rgba(255, 209, 102, 0.32);
  transition: transform 0.34s var(--ease-bounce), box-shadow 0.3s ease;
  flex-shrink: 0;
  animation: emblemFloat 4.8s ease-in-out infinite;
}

.brand-emblem {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: block;
}

.brand-sparkle {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 13px;
  height: 13px;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 209, 102, 0.85));
  animation: brandSparkleTwinkle 3.2s ease-in-out infinite;
  transition: transform 0.34s var(--ease-bounce);
}

.brand-lockup:hover .brand-emblem-wrap,
.brand-lockup:focus-visible .brand-emblem-wrap {
  animation: none;
  transform: rotate(-9deg) scale(1.1);
  box-shadow: 0 10px 26px -2px rgba(255, 209, 102, 0.52);
}

.brand-lockup:hover .brand-sparkle,
.brand-lockup:focus-visible .brand-sparkle {
  animation: none;
  opacity: 1;
  transform: scale(1.32) rotate(45deg);
}

@keyframes emblemFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    box-shadow: 0 6px 20px -4px rgba(255, 209, 102, 0.3);
  }
  50% {
    transform: translateY(-1.5px) rotate(-2.5deg);
    box-shadow: 0 9px 24px -3px rgba(255, 209, 102, 0.48);
  }
}

@keyframes brandSparkleTwinkle {
  0%, 100% { transform: scale(0.88) rotate(0deg); opacity: 0.78; }
  50% { transform: scale(1.16) rotate(22deg); opacity: 1; }
}

.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.04rem, 1.45vw, 1.3rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--gold);
  text-shadow: 0 1px 16px rgba(255, 209, 102, 0.22);
  white-space: nowrap;
}

.brand-name span {
  color: var(--cream);
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(57, 255, 20, 0.09);
  color: #9CFF8A;
  border: 1px solid rgba(57, 255, 20, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  flex-shrink: 0;
}

.demo-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}

.brand-tagline {
  font-family: var(--font-ui);
  font-size: 0.69rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.005em;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== SEGMENTED FILTER DOCK (SLIDING PILL) ==================== */
.filter-dock {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(4, 6, 16, 0.62);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.dock-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.07) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 14px -4px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition:
    transform 0.34s var(--ease-spring),
    width 0.34s var(--ease-spring),
    height 0.34s var(--ease-spring),
    opacity 0.2s ease;
}

.dock-indicator.ready {
  opacity: 1;
}

.dock-tab {
  position: relative;
  z-index: 1;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: -0.005em;
  padding: 6px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: color 0.18s ease;
  user-select: none;
}

.dock-tab:hover {
  color: #FFF;
}

.dock-tab.active {
  color: #FFF;
}

/* ==================== ACCIONES DE BARRA SUPERIOR ==================== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.pill-btn {
  position: relative;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: -0.005em;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 11px;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  color: var(--cream);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  transition:
    transform 0.18s var(--ease-spring),
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.22s ease,
    color 0.18s ease;
  user-select: none;
  white-space: nowrap;
}

.pill-btn:hover {
  transform: translateY(-1px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.pill-btn:active {
  transform: translateY(0.5px) scale(0.985);
}

.btn-icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
}

.btn-passport {
  background: rgba(255, 209, 102, 0.08);
  border-color: rgba(255, 209, 102, 0.24);
  color: #FFE8A3;
  font-weight: 700;
}

.btn-passport:hover {
  background: rgba(255, 209, 102, 0.15);
  border-color: rgba(255, 209, 102, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 20px -6px rgba(255, 209, 102, 0.35);
}

.btn-passport.has-progress {
  background: rgba(255, 209, 102, 0.14);
  border-color: rgba(255, 209, 102, 0.42);
}

.btn-plan:hover {
  border-color: rgba(168, 85, 247, 0.48);
  background: rgba(168, 85, 247, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 20px -6px rgba(168, 85, 247, 0.36);
}

.btn-yt:hover {
  border-color: rgba(255, 77, 109, 0.45);
  background: rgba(255, 77, 109, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 20px -6px rgba(255, 77, 109, 0.32);
}

/* Primary luminous CTA (Sorpresa / Modal CTA) */
.btn-primary {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  padding: 8px 14px;
  color: #04110A;
  background: linear-gradient(180deg, #98FF83 0%, #37F21A 100%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 8px 22px -6px rgba(57, 255, 20, 0.54);
  overflow: hidden;
  transition:
    transform 0.28s var(--ease-bounce),
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.24s ease;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(110deg, transparent 22%, rgba(255, 255, 255, 0.45) 48%, transparent 74%);
  transform: translateX(-130%);
  pointer-events: none;
}

.btn-primary svg {
  transition: transform 0.36s var(--ease-bounce);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.035);
  background: linear-gradient(180deg, #B2FFA2 0%, #4AFF2E 100%);
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 12px 30px -5px rgba(57, 255, 20, 0.7);
}

.btn-primary:hover::after {
  animation: ctaSheen 0.72s var(--ease-spring) forwards;
}

.btn-primary:hover svg {
  transform: scale(1.08);
}

#btnSurprise:hover svg {
  transform: rotate(-18deg) scale(1.16);
}

.btn-primary.is-rolling svg {
  animation: diceSpin 0.42s linear infinite;
}

@keyframes ctaSheen {
  from { transform: translateX(-130%); }
  to { transform: translateX(130%); }
}

@keyframes diceSpin {
  0% { transform: rotate(0deg) scale(1.08); }
  50% { transform: rotate(180deg) scale(1.18); }
  100% { transform: rotate(360deg) scale(1.08); }
}

.btn-gold-accent {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.86rem;
  color: #161002;
  background: linear-gradient(180deg, #FFE596 0%, #F7B731 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 8px 22px -6px rgba(255, 209, 102, 0.42);
}

.btn-gold-accent:hover {
  background: linear-gradient(180deg, #FFECB0 0%, #FFC247 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 12px 26px -6px rgba(255, 209, 102, 0.56);
}

.btn-full {
  width: 100%;
  padding-top: 9px;
  padding-bottom: 9px;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.76rem;
  border-radius: 9px;
}

/* ==================== ELENCO INTERACTIVO (COMMAND STRIP) ==================== */
.cast-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-radius: 17px;
  background: rgba(12, 16, 34, 0.66);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.cast-pills {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cast-chip {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.77rem;
  padding: 3px 12px 3px 4px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition:
    transform 0.28s var(--ease-bounce),
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.24s ease;
}

.cast-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 14, 30, 0.94);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cast-accent, #6FFFE9) 24%, rgba(12, 16, 36, 0.96)), rgba(7, 10, 24, 0.96));
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-color: color-mix(in srgb, var(--cast-accent, #6FFFE9) 38%, rgba(255, 255, 255, 0.16));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.3s var(--ease-bounce), border-color 0.2s ease, box-shadow 0.24s ease;
}

.cast-avatar svg {
  width: 26px;
  height: 26px;
}

.cast-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  background: color-mix(in srgb, var(--cast-accent, #6FFFE9) 14%, rgba(255, 255, 255, 0.05));
  border-color: var(--cast-accent, rgba(111, 255, 233, 0.55));
  color: #FFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px var(--cast-glow, rgba(111, 255, 233, 0.45));
}

.cast-chip:hover .cast-avatar {
  transform: scale(1.14) rotate(-6deg);
  border-color: var(--cast-accent, var(--cyan));
  box-shadow: 0 0 14px -2px var(--cast-glow, rgba(111, 255, 233, 0.55));
}

.cast-chip:active {
  transform: translateY(0) scale(0.96);
}

.cast-chip.speaking {
  background: rgba(255, 209, 102, 0.15);
  background: color-mix(in srgb, var(--cast-accent, #FFD166) 20%, rgba(12, 16, 36, 0.88));
  color: #FFF;
  border-color: var(--cast-accent, var(--gold));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 22px -4px var(--cast-glow, rgba(255, 209, 102, 0.52));
  transform: translateY(-1px);
}

.cast-chip.speaking .cast-avatar {
  border-color: var(--cast-accent, var(--gold));
  box-shadow: 0 0 16px -1px var(--cast-glow, rgba(255, 209, 102, 0.65));
}

.cast-chip.is-popping .cast-avatar {
  animation: castWiggle 0.56s var(--ease-bounce);
}

@keyframes castWiggle {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.24) rotate(-13deg); }
  55% { transform: scale(1.14) rotate(10deg); }
  80% { transform: scale(1.06) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.cast-divider {
  width: 1px;
  height: 24px;
  background: var(--border-soft);
  flex-shrink: 0;
}

.cast-quote {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 10px 3px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: #DCE7FA;
  transition: background-color 0.24s ease, border-color 0.24s ease;
}

.cast-quote.has-speaker {
  background: rgba(255, 255, 255, 0.045);
  background: color-mix(in srgb, var(--speaker-accent, #FFD166) 10%, rgba(12, 16, 36, 0.7));
  border-color: rgba(255, 255, 255, 0.12);
  border-color: color-mix(in srgb, var(--speaker-accent, #FFD166) 36%, rgba(255, 255, 255, 0.08));
}

.quote-speaker-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quote-speaker-badge.is-portrait {
  background: rgba(10, 14, 30, 0.94);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--speaker-accent, #FFD166) 28%, rgba(12, 16, 36, 0.96)), rgba(7, 10, 24, 0.96));
  border: 1.5px solid var(--speaker-accent, var(--gold));
  box-shadow: 0 0 14px -2px var(--speaker-glow, rgba(255, 209, 102, 0.58));
  overflow: hidden;
  animation: speakerPop 0.36s var(--ease-bounce);
}

.quote-speaker-badge.is-portrait svg {
  width: 24px;
  height: 24px;
}

@keyframes speakerPop {
  0% { opacity: 0; transform: scale(0.55) rotate(-14deg); }
  70% { opacity: 1; transform: scale(1.12) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.ticker-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 0.16s ease, transform 0.18s var(--ease-spring);
}

.ticker-text.is-updating {
  opacity: 0;
  transform: translateY(3px);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.8);
  flex-shrink: 0;
  animation: pulseDot 2.2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.22); }
}

/* ==================== MISIÓN DEL DÍA (SLIM OBSIDIAN QUEST STRIP) ==================== */
.daily-mission-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 14px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.08) 0%, rgba(12, 16, 36, 0.72) 48%, rgba(57, 255, 20, 0.06) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 209, 102, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 28px -14px rgba(2, 4, 14, 0.7);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.daily-mission-bar.is-done {
  background: linear-gradient(90deg, rgba(57, 255, 20, 0.12) 0%, rgba(12, 16, 36, 0.78) 55%, rgba(111, 255, 233, 0.09) 100%);
  border-color: rgba(57, 255, 20, 0.42);
}

.daily-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.daily-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.14);
  border: 1px solid rgba(255, 209, 102, 0.36);
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.daily-mission-bar.is-done .daily-kicker {
  background: rgba(57, 255, 20, 0.16);
  border-color: rgba(57, 255, 20, 0.48);
  color: #9CFF8A;
}

.daily-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: #EEF4FF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daily-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.daily-streak {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 77, 109, 0.14);
  border: 1px solid rgba(255, 77, 109, 0.38);
  color: #FFC2CE;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.daily-streak[hidden] {
  display: none;
}

/* ==================== MURO APPLE ARCADE 3×2 (PORTADAS 16:10) ==================== */
.friv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.friv-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 920px;
  width: 100%;
  margin-inline: auto;
}

.game-tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: #FFF;
  background: #0B1024;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 18px 40px -16px rgba(2, 4, 14, 0.86);
  transition:
    transform 0.34s var(--ease-spring),
    box-shadow 0.34s var(--ease-spring),
    border-color 0.28s ease;
  isolation: isolate;
  animation: tileReveal 0.44s var(--ease-spring) backwards;
  animation-delay: calc(var(--tile-i, 0) * 45ms);
}

@keyframes tileReveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Pointer-tracking spotlight overlay (Linear / Vercel signature) */
.tile-spotlight {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    var(--tile-glow, rgba(111, 255, 233, 0.26)),
    transparent 62%
  );
  mix-blend-mode: screen;
  transition: opacity 0.32s ease;
}

.game-tile:hover .tile-spotlight {
  opacity: 0.48;
}

/* Specular hairline ring (solo en motores con mask-composite para evitar overlays opacos) */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  .game-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: radial-gradient(
      280px circle at var(--mx, 50%) var(--my, 50%),
      var(--tile-accent, var(--cyan)),
      rgba(255, 255, 255, 0.12) 55%,
      transparent 85%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
    z-index: 6;
  }

  .game-tile:hover::before,
  .game-tile:focus-visible::before {
    opacity: 1;
  }
}

.game-tile:hover,
.game-tile:focus-visible {
  transform: translateY(-6px) scale(1.008);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 28px 56px -18px rgba(2, 4, 14, 0.92),
    0 0 42px -10px var(--tile-glow, rgba(111, 255, 233, 0.48));
  z-index: 5;
}

.game-tile:active {
  transform: translateY(-2px) scale(0.992);
}

.game-tile.roulette-hit {
  transform: translateY(-6px) scale(1.03) !important;
  border-color: var(--neon) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 24px 52px -12px rgba(0, 0, 0, 0.9),
    0 0 42px -4px rgba(57, 255, 20, 0.72) !important;
  z-index: 10;
}

/* Portada ilustrada full-bleed */
.tile-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s var(--ease-spring), filter 0.35s ease;
  z-index: 1;
}

.game-tile:hover .tile-art {
  transform: scale(1.055);
  filter: brightness(1.05) saturate(1.06);
}

/* Viñeta cinematográfica suave que deja el arte protagonista */
.tile-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 18, 0.34) 0%, rgba(5, 7, 18, 0) 28%),
    linear-gradient(180deg, rgba(5, 7, 18, 0) 44%, rgba(5, 7, 18, 0.68) 76%, rgba(5, 7, 18, 0.94) 100%);
  z-index: 2;
  pointer-events: none;
}

.tile-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 5;
  pointer-events: none;
}

.tile-genre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 9, 22, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #F1F5FF;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  white-space: nowrap;
}

.tile-genre-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tile-accent, var(--cyan));
  box-shadow: 0 0 8px var(--tile-accent, var(--cyan));
  flex-shrink: 0;
}

.tile-genre.is-retro {
  font-family: var(--font-px);
  font-size: 0.46rem;
  letter-spacing: 0.03em;
  padding: 5px 9px;
}

.tile-prog {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 9, 22, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #E2ECFF;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tile-prog > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-prog.lit {
  background: rgba(16, 46, 26, 0.84);
  color: #9CFF8A;
  border-color: rgba(57, 255, 20, 0.45);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 16px -4px rgba(57, 255, 20, 0.45);
}

.tile-footer {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 13px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.tile-copy {
  min-width: 0;
}

.tile-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.12rem, 1.7vw, 1.38rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: #FFF;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.78);
}

.tile-sub {
  margin: 3px 0 0;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 500;
  color: rgba(226, 236, 255, 0.84);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Apple Arcade Kids glass-to-luminous play button */
.play-fab {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(14, 19, 40, 0.7);
  background: color-mix(in srgb, var(--tile-accent, #6FFFE9) 22%, rgba(10, 14, 30, 0.72));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFF;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-color: color-mix(in srgb, var(--tile-accent, #6FFFE9) 56%, rgba(255, 255, 255, 0.34));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 6px 18px rgba(0, 0, 0, 0.48),
    0 0 18px -5px var(--tile-glow, rgba(111, 255, 233, 0.48));
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.34s var(--ease-bounce),
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.26s ease;
}

.play-fab svg {
  transform: translateX(1px);
  transition: transform 0.3s var(--ease-bounce);
}

.game-tile:hover .play-fab,
.game-tile:focus-visible .play-fab {
  transform: scale(1.16) rotate(-4deg);
  background: var(--tile-accent, var(--neon));
  color: #050814;
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 24px -4px rgba(0, 0, 0, 0.55),
    0 0 28px -1px var(--tile-glow, rgba(111, 255, 233, 0.75));
}

.game-tile:hover .play-fab svg,
.game-tile:focus-visible .play-fab svg {
  transform: translateX(1.5px) scale(1.06);
}

/* ==================== SECCIÓN ESPECIAL NAVIDAD (EDITORIAL SHOWCASE) ==================== */
.season-showcase {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: rgba(11, 15, 32, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 var(--specular),
    0 24px 56px -18px rgba(2, 4, 14, 0.82);
}

.season-banner {
  position: relative;
  min-height: 176px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}

.season-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 36%;
  filter: brightness(0.56) saturate(1.12);
  transform: scale(1.02);
  transition: transform 0.8s var(--ease-spring);
  z-index: 0;
}

.season-showcase:hover .season-banner-bg {
  transform: scale(1.05);
}

.season-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    95deg,
    rgba(6, 8, 22, 0.94) 0%,
    rgba(13, 12, 34, 0.72) 52%,
    rgba(6, 8, 22, 0.84) 100%
  );
  z-index: 1;
}

.season-copy,
.season-meter-card {
  position: relative;
  z-index: 2;
}

.season-copy {
  max-width: 600px;
}

.season-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  color: #FFE499;
  border: 1px solid rgba(255, 209, 102, 0.34);
  margin-bottom: 9px;
}

.season-copy h2 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.36rem, 2.4vw, 1.82rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #FFF;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.season-copy p {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  color: #CBD7F2;
  line-height: 1.5;
}

.season-meter-card {
  background: rgba(7, 10, 24, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 262px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 32px rgba(0, 0, 0, 0.45);
}

.meter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
}

.meter-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9CFF8A;
}

.meter-value {
  color: #FFE499;
}

.meter-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.meter-fill {
  position: relative;
  width: 50%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #39FF14 0%, #6FFFE9 55%, #FFD166 100%);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.55);
  overflow: hidden;
  transition: width 0.55s var(--ease-spring), opacity 0.25s ease;
}

.meter-fill.is-empty {
  width: 0%;
  opacity: 0;
  box-shadow: none;
}

.meter-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: meterShimmer 3.2s infinite ease-in-out;
}

@keyframes meterShimmer {
  0% { transform: translateX(-120%); }
  45%, 100% { transform: translateX(160%); }
}

.upcoming-body {
  padding: 16px 20px 20px;
}

.upcoming-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.upcoming-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.upcoming-hint {
  font-family: var(--font-ui);
  font-size: 0.73rem;
  color: var(--muted);
}

.friv-mini-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

/* Collectible dark-glass Christmas cartridges */
.mini-cart {
  position: relative;
  min-height: 138px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 8px;
  cursor: pointer;
  color: #FFF;
  font-family: var(--font-ui);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-align: center;
  background:
    radial-gradient(120% 85% at 50% 0%, var(--cart-tint, rgba(168, 85, 247, 0.34)), rgba(10, 14, 30, 0.92) 78%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 22px -12px rgba(2, 4, 14, 0.8);
  overflow: hidden;
  transition:
    transform 0.26s var(--ease-spring),
    border-color 0.22s ease,
    box-shadow 0.26s ease;
}

.mini-cart::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    180px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.14),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: none;
}

.mini-cart:hover::after {
  opacity: 1;
}

.mini-cart:hover,
.mini-cart:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 209, 102, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 34px -14px rgba(0, 0, 0, 0.85),
    0 0 26px -10px rgba(255, 209, 102, 0.38);
  z-index: 4;
}

.mini-soon {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(5, 8, 20, 0.65);
  border: 1px solid rgba(255, 209, 102, 0.28);
  color: #FFE499;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mini-emblem-wrap {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
  transition: transform 0.34s var(--ease-bounce);
}

.mini-cart:hover .mini-emblem-wrap {
  transform: scale(1.14) translateY(-3px) rotate(-4deg);
}

.mini-emblem-wrap svg {
  width: 100%;
  height: 100%;
}

.mini-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.1;
  color: #F4F7FF;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* ==================== CARACOLCITO SECRETO SVG (PEEK ABAJO DERECHA) ==================== */
#secretSnail {
  position: fixed;
  bottom: 14px;
  right: 0;
  left: auto;
  transform: translate3d(9px, 0, 0);
  will-change: transform;
  z-index: 35;
  background: rgba(11, 16, 34, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-right: none;
  border-radius: 999px 0 0 999px;
  padding: 5px 8px 5px 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    -4px 8px 22px rgba(0, 0, 0, 0.55);
  transition:
    transform 0.34s var(--ease-bounce),
    border-color 0.22s ease,
    box-shadow 0.24s ease,
    background-color 0.22s ease;
  animation: snailPeek 5.2s ease-in-out infinite;
}

#secretSnail svg {
  width: 26px;
  height: 26px;
  transform: scaleX(-1);
  transition: transform 0.3s var(--ease-bounce);
}

#secretSnail:hover,
#secretSnail:focus-visible {
  animation: none;
  transform: translate3d(0, 0, 0);
  border-color: rgba(255, 209, 102, 0.72);
  background: rgba(18, 25, 52, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    -6px 10px 26px rgba(0, 0, 0, 0.62),
    0 0 22px -4px rgba(255, 209, 102, 0.45);
}

#secretSnail:hover svg,
#secretSnail:focus-visible svg {
  transform: scaleX(-1) scale(1.16) rotate(6deg);
}

#secretSnail.found {
  border-color: rgba(57, 255, 20, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    -4px 8px 22px rgba(0, 0, 0, 0.55),
    0 0 20px -2px rgba(57, 255, 20, 0.45);
}

#secretSnail.just-found svg {
  animation: snailCelebrate 0.6s var(--ease-bounce);
}

@keyframes snailPeek {
  0%, 100% { transform: translate3d(9px, 0, 0); }
  45% { transform: translate3d(3px, -1px, 0); }
  55% { transform: translate3d(3px, 0, 0); }
}

@keyframes snailCelebrate {
  0% { transform: scaleX(-1) scale(1) rotate(0deg); }
  35% { transform: scaleX(-1) scale(1.3) rotate(-12deg); }
  70% { transform: scaleX(-1) scale(1.15) rotate(10deg); }
  100% { transform: scaleX(-1) scale(1) rotate(0deg); }
}

/* ==================== CAPA DE CHISPAS MÁGICAS (100% SVG) ==================== */
.sparkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 65;
  overflow: hidden;
}

.sparkle-pop {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform, opacity;
  animation: sparkleBurst 640ms var(--ease-spring) forwards;
}

@keyframes sparkleBurst {
  0% {
    opacity: 0;
    transform: translate3d(var(--sx, 0px), var(--sy, 0px), 0) scale(0.35) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translate3d(calc(var(--sx, 0px) + var(--dx, 0px) * 0.38), calc(var(--sy, 0px) + var(--dy, 0px) * 0.38), 0) scale(var(--sc, 1.1)) rotate(calc(var(--rot, 60deg) * 0.45));
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--sx, 0px) + var(--dx, 0px)), calc(var(--sy, 0px) + var(--dy, 0px)), 0) scale(0.2) rotate(var(--rot, 60deg));
  }
}

/* ==================== FOOTER ==================== */
.portal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
}

.footer-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.portal-footer a {
  color: #E8F0FF;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 209, 102, 0.35);
  transition: color 0.16s ease, border-color 0.16s ease;
}

.portal-footer a:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* ==================== MODALES LINEAR × APPLE ARCADE ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 14, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-panel {
  width: min(95vw, 620px);
  max-height: 88dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  background: linear-gradient(180deg, rgba(20, 25, 52, 0.96) 0%, rgba(10, 14, 30, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 32px 72px -16px rgba(0, 0, 0, 0.86),
    0 0 48px -18px rgba(168, 85, 247, 0.32);
  transform: translateY(10px) scale(0.975);
  transition: transform 0.28s var(--ease-spring);
}

.modal-panel::-webkit-scrollbar {
  width: 6px;
}

.modal-panel::-webkit-scrollbar-track {
  background: transparent;
}

.modal-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.modal-panel-sm {
  width: min(95vw, 520px);
}

.modal-backdrop.active .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0;
  font-size: 1.38rem;
  color: #FFF;
}

.modal-title-flex {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-strong);
  color: #FFF;
}

.modal-close-btn:active {
  transform: scale(0.94);
}

.modal-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #CBD7F2;
}

.modal-footnote {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.modal-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* Pasaporte Hero & List */
.passport-hero {
  background: rgba(5, 8, 20, 0.56);
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.passport-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.passport-stat-pill {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.32);
  color: #9CFF8A;
  font-size: 0.76rem;
  font-weight: 700;
}

.passport-track {
  height: 6px;
}

.passport-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.passport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 9px 11px;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.passport-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

.passport-row-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.passport-thumb {
  width: 54px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
  background: #070A19;
}

.passport-snail-avatar {
  width: 54px;
  height: 36px;
  border-radius: 9px;
  background: rgba(7, 10, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.passport-row-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.15;
  color: #FFF;
}

.passport-row-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.passport-row.is-lit .passport-row-sub {
  color: var(--cyan);
}

.passport-badge-state {
  padding: 5px 10px;
  border-radius: 9px;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-soft);
  color: var(--muted);
}

.passport-badge-state.found {
  background: rgba(57, 255, 20, 0.12);
  border-color: rgba(57, 255, 20, 0.36);
  color: #9CFF8A;
}

/* Modal Cartucho Navidad */
.idea-emblem-header {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(5, 8, 20, 0.65);
  border: 1px solid rgba(255, 209, 102, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.idea-emblem-header svg {
  width: 100%;
  height: 100%;
}

.idea-genre-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(111, 255, 233, 0.09);
  border: 1px solid rgba(111, 255, 233, 0.25);
  font-weight: 600;
  color: var(--cyan);
  font-size: 0.76rem;
}

.idea-box {
  background: rgba(5, 8, 20, 0.58);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 15px;
  margin: 12px 0 14px;
  color: #E6EEFF;
  font-size: 0.9rem;
  line-height: 1.52;
}

.idea-gag {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid rgba(57, 255, 20, 0.28);
  color: #A8FF99;
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modal Plan 100% */
.roadmap-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.roadmap-col {
  background: rgba(5, 8, 20, 0.55);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 15px;
}

.roadmap-col.done-col {
  border-color: rgba(57, 255, 20, 0.26);
}

.roadmap-col.next-col {
  border-color: rgba(255, 209, 102, 0.3);
}

.roadmap-col h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: #FFE499;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.roadmap-col.done-col h3 {
  color: #9CFF8A;
}

.roadmap-col ul {
  margin: 0;
  padding-left: 17px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.82rem;
  line-height: 1.44;
  color: #D7E3FC;
}

/* ==================== SELECTOR DE EDAD (3–9 AÑOS) & LOCK PARA PADRES ==================== */
.btn-age.is-active {
  background: rgba(111, 255, 233, 0.12);
  border-color: rgba(111, 255, 233, 0.42);
  color: var(--cyan);
}

.modal-panel-age {
  width: min(94vw, 660px);
}

.age-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.age-voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(111, 255, 233, 0.13);
  border: 1px solid rgba(111, 255, 233, 0.4);
  color: var(--cyan);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.16s var(--ease-spring), background-color 0.16s ease;
}

.age-voice-btn:hover {
  transform: translateY(-1px);
  background: rgba(111, 255, 233, 0.22);
}

.age-blocked-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  margin-bottom: 12px;
  border-radius: 13px;
  background: rgba(255, 77, 109, 0.14);
  border: 1px solid rgba(255, 77, 109, 0.44);
  color: #FFD2DC;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.35;
}

.age-blocked-banner[hidden] {
  display: none;
}

.age-lead {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: #CFE0FF;
}

.age-lead strong {
  color: var(--gold);
}

.age-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.age-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 12px 14px;
  border-radius: 18px;
  background: rgba(8, 12, 28, 0.72);
  border: 1.5px solid var(--border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
  cursor: pointer;
  transition:
    transform 0.22s var(--ease-bounce),
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.22s ease;
}

.age-card:hover {
  transform: translateY(-4px);
  border-color: var(--age-accent, var(--cyan));
  background: rgba(14, 20, 44, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 16px 32px -12px var(--age-glow, rgba(111, 255, 233, 0.45));
}

.age-card.selected {
  background: rgba(18, 25, 54, 0.96);
  background: linear-gradient(180deg, color-mix(in srgb, var(--age-accent, #6FFFE9) 18%, rgba(18, 25, 54, 0.95)), rgba(10, 14, 32, 0.98));
  border-color: var(--age-accent, var(--cyan));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px var(--age-accent, var(--cyan)),
    0 16px 36px -10px var(--age-glow, rgba(111, 255, 233, 0.52));
  transform: translateY(-2px);
}

.age-card-avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(5, 8, 20, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  transition: transform 0.26s var(--ease-bounce);
}

.age-card:hover .age-card-avatar,
.age-card.selected .age-card-avatar {
  transform: scale(1.08) rotate(-4deg);
  border-color: var(--age-accent, var(--cyan));
}

.age-card-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.24rem;
  line-height: 1.05;
  color: var(--age-accent, #FFF);
}

.age-card-role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: #FFF;
}

.age-card-desc {
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.age-lock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(5, 8, 20, 0.62);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.age-lock-row:hover {
  border-color: rgba(255, 209, 102, 0.34);
  background: rgba(10, 14, 32, 0.78);
}

.age-lock-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.age-lock-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #F4F7FF;
}

.age-lock-sub {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.32;
}

.age-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.age-switch input {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}

.age-switch-track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.age-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #F8FAFC;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s var(--ease-spring);
}

.age-switch input:checked + .age-switch-track {
  background: linear-gradient(180deg, #FFE48A 0%, #F59E0B 100%);
  border-color: rgba(255, 255, 255, 0.45);
}

.age-switch input:checked + .age-switch-track::after {
  transform: translateX(18px);
  background: #050814;
}

.age-switch input:focus-visible + .age-switch-track {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.age-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.age-all-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.age-all-btn:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.06);
}

/* Etiquetas de recomendación y bloqueo en tarjetas del muro */
.tile-top-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.tile-age-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tile-age-tag.is-ideal {
  background: rgba(16, 46, 26, 0.84);
  border: 1px solid rgba(57, 255, 20, 0.5);
  color: #9CFF8A;
}

.tile-age-tag.is-stretch {
  background: rgba(46, 24, 14, 0.84);
  border: 1px solid rgba(255, 209, 102, 0.45);
  color: #FFE499;
}

.game-tile.is-age-locked .tile-art {
  filter: grayscale(0.55) brightness(0.45) blur(1.5px);
}

.game-tile.is-age-locked:hover .tile-art {
  transform: scale(1.02);
}

.tile-lock-veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.tile-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 12, 28, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 209, 102, 0.5);
  color: #FFE499;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.84rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.72);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1359px) {
  #secretSnail {
    position: absolute;
    bottom: 12px;
    right: 0;
  }
}

@media (max-width: 1440px) {
  .nav-txt-yt {
    display: none;
  }
  .btn-yt {
    width: 34px;
    padding: 0;
  }
}

@media (max-width: 1260px) {
  .brand-tagline {
    display: none;
  }
}

@media (max-width: 1220px) {
  .friv-mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1099px) {
  .topbar {
    position: relative;
    top: auto;
    flex-wrap: wrap;
    gap: 10px;
  }
  .filter-dock {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .dock-tab {
    flex: 1 1 0;
    justify-content: center;
  }
}

@media (max-width: 1040px) {
  .friv-grid,
  .friv-grid[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
  .cast-bar {
    flex-wrap: wrap;
  }
  .cast-divider {
    display: none;
  }
}

@media (max-width: 680px) {
  .portal-wrap {
    padding: 10px 12px 68px;
    gap: 12px;
  }
  .topbar {
    position: relative;
    top: auto;
    padding: 10px 12px;
    border-radius: 18px;
    justify-content: space-between;
  }
  .filter-dock {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .dock-tab {
    flex: 1 1 0;
    justify-content: center;
    padding: 7px 6px;
    font-size: 0.75rem;
  }
  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
  }
  .nav-actions .pill-btn {
    padding: 7px 9px;
    font-size: 0.75rem;
    flex-shrink: 0;
  }
  .nav-actions .btn-icon-only,
  .nav-actions .btn-yt {
    width: 34px;
    padding: 0;
  }
  .nav-txt-yt {
    display: none;
  }
  .daily-left {
    flex-wrap: wrap;
    gap: 6px;
  }
  .cast-bar {
    padding: 8px 10px;
    gap: 8px;
  }
  .daily-mission-bar {
    flex-wrap: wrap;
    padding: 9px 11px;
    gap: 8px;
  }
  .daily-text {
    white-space: normal;
    font-size: 0.86rem;
  }
  .daily-right {
    width: 100%;
    justify-content: space-between;
  }
  .cast-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .cast-pills::-webkit-scrollbar {
    display: none;
  }
  .cast-chip {
    flex-shrink: 0;
  }
  .friv-grid,
  .friv-grid[data-count="2"] {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .season-banner {
    padding: 18px 16px;
  }
  .season-meter-card {
    width: 100%;
    min-width: 0;
  }
  .upcoming-body {
    padding: 14px;
  }
  .friv-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .roadmap-cols,
  .age-cards {
    grid-template-columns: 1fr;
  }
  .portal-footer {
    justify-content: center;
    text-align: center;
  }
  .modal-panel {
    padding: 18px;
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .nav-actions .btn-plan {
    display: none;
  }
  .nav-actions .btn-primary {
    margin-left: auto;
  }
}

/* ==================== PREFERS REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .meter-fill::after,
  .sparkle-layer {
    display: none;
  }
  .brand-emblem-wrap,
  .brand-sparkle,
  #secretSnail {
    animation: none;
  }
  #secretSnail {
    transform: translate3d(0, 0, 0);
  }
}
