/* =====================================================================
   Music Teacher Lab — Shared Design System (v2)
   ---------------------------------------------------------------------
   Drop-in stylesheet that re-skins the EXISTING markup of /index.html,
   /pricing/index.html and /auth/index.html with the new v2 design.

   Strategy:
   - Targets the SAME class names your current files already use
     (.shell, .topbar, .hero, .filter-chip, .game-card, .plan-card,
      .auth-card, etc.) so you don't touch any HTML or JS.
   - Defines design tokens centrally; if you want to tweak the brand
     color, change it once here and everything updates.

   Where to put this file:
     public/shared/system.css

   Then in each page, replace the inline <style>…</style> block with:
     <link rel="stylesheet" href="/shared/system.css?v=20260515">
   ===================================================================== */

/* -------- Tokens -------- */
:root {
  /* Surfaces */
  --paper-1: #fbf6ec;
  --paper-2: #f4ecd9;
  --surface: #ffffff;
  --surface-2: #fbf8f1;
  --line: #e7dcc4;
  --line-soft: #f1ead8;

  /* Ink */
  --ink: #0d1631;
  --ink-2: #2c3556;
  --muted: #6a7395;
  --muted-2: #94a0c0;

  /* Brand navy */
  --navy-900: #07102e;
  --navy-800: #0e1a44;
  --navy-700: #16275f;
  --navy-600: #1f3b85;

  /* Accent mango */
  --mango-700: #d65a14;
  --mango-600: #ff6a14;
  --mango-500: #ff8a2b;
  --mango-400: #ffae4a;
  --mango-300: #ffd07a;

  /* Categorías pedagógicas */
  --rhythm: #ff4f6b;
  --rhythm-bg: #ffe2e7;
  --rhythm-ink: #8a1d33;
  --melody: #0a9fa5;
  --melody-bg: #d5f1f1;
  --melody-ink: #06545a;
  --memory: #7a5cff;
  --memory-bg: #e6dfff;
  --memory-ink: #3f2a99;

  --success: #1f9d57;
  --success-bg: #d8f3e1;

  /* Legacy aliases (so old vars in your files still work if any) */
  --bg-1: var(--paper-1);
  --bg-2: var(--paper-2);
  --ink-color: var(--ink);
  --brand-1: var(--navy-800);
  --brand-2: var(--navy-900);
  --accent-1: var(--mango-600);
  --accent-2: var(--mango-400);
  --hero-1: var(--navy-700);
  --hero-2: var(--melody);
  --hero-3: var(--success);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(13, 22, 49, 0.06);
  --shadow-sm: 0 4px 12px rgba(13, 22, 49, 0.06), 0 1px 2px rgba(13, 22, 49, 0.04);
  --shadow-md: 0 14px 32px rgba(13, 22, 49, 0.10), 0 2px 4px rgba(13, 22, 49, 0.04);
  --shadow-lg: 0 28px 60px rgba(13, 22, 49, 0.14), 0 4px 8px rgba(13, 22, 49, 0.05);
  --shadow-cta: 0 10px 22px rgba(255, 106, 20, 0.40), 0 2px 4px rgba(255, 106, 20, 0.20);
  --shadow-cta-hover: 0 16px 30px rgba(255, 106, 20, 0.50), 0 2px 4px rgba(255, 106, 20, 0.20);

  /* Aliases for old shadow tokens */
  --card-shadow: var(--shadow-sm);
  --card-hover-shadow: var(--shadow-md);
  --btn-shadow: var(--shadow-cta);

  /* Type */
  --f-display: 'Baloo 2', system-ui, sans-serif;
  --f-body:    'Plus Jakarta Sans', 'Nunito', system-ui, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* -------- Reset -------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; }

body {
  font-family: var(--f-body);
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(80% 60% at 10% 0%, rgba(255, 138, 43, 0.07) 0%, transparent 60%),
    radial-gradient(70% 60% at 100% 100%, rgba(10, 159, 165, 0.08) 0%, transparent 60%),
    linear-gradient(160deg, var(--paper-1), var(--paper-2));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================================
   Shell (used by all three pages)
   ===================================================================== */
.shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  background: var(--surface);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 40px 80px rgba(13, 22, 49, 0.10);
}

/* =====================================================================
   Topbar
   ===================================================================== */
.topbar {
  position: relative;
  padding: 1rem 1.4rem;
  background: linear-gradient(110deg, var(--navy-900), var(--navy-700));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
}
.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7em;
  height: 1.7em;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--mango-600), var(--mango-400));
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(255, 106, 20, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: none; /* kill the wiggle from old version */
}
.brand-icon svg { width: 60%; height: 60%; }
.brand-name { font-weight: 700; opacity: 0.92; }
.brand-lab {
  font-weight: 900;
  background: linear-gradient(95deg, var(--mango-500), var(--mango-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-tools { display: flex; align-items: center; gap: 0.55rem; margin-left: auto; }

/* Language pill */
.lang-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px;
}
.lang-toggle button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.3rem 0.74rem;
  cursor: pointer;
  transition: all 0.16s var(--ease-out);
}
.lang-toggle button.active { background: #fff; color: var(--navy-800); }

/* Promo pill (top right CTA) */
.promo {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(95deg, var(--mango-600), var(--mango-400));
  color: #fff;
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.56rem 1rem;
  white-space: nowrap;
  box-shadow: var(--shadow-cta);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  text-decoration: none;
}
.promo:hover { transform: translateY(-2px); box-shadow: var(--shadow-cta-hover); }

/* =====================================================================
   HERO (home)
   ===================================================================== */
.hero {
  position: relative;
  padding: 2rem 2.2rem 1.8rem;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 100% 0%, rgba(255, 138, 43, 0.32) 0%, transparent 60%),
    radial-gradient(60% 60% at 0% 100%, rgba(10, 159, 165, 0.22) 0%, transparent 60%),
    linear-gradient(140deg, var(--navy-900) 0%, var(--navy-700) 70%);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "featured" "copy";
  gap: 0.9rem;
  align-items: start;
  animation: none;
}

.hero-copy {
  grid-area: copy;
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 920px;
}

.hero h1 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  max-width: 20ch;
  margin-bottom: 0.65rem;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  position: relative;
  background: linear-gradient(95deg, var(--mango-500), var(--mango-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h1 em::after { display: none; }   /* remove old underline */

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  font-weight: 500;
  max-width: 52ch;
  margin-bottom: 1.05rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  margin-bottom: 1.1rem;
}
.hero-cta-hint {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.01em;
  align-self: center;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--f-body);
  font-weight: 800;
  padding: 0.78rem 1.25rem;
  line-height: 1;
  font-size: 0.98rem;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s, color 0.2s;
  white-space: nowrap;
  cursor: pointer;
  border: 0;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(95deg, var(--mango-600), var(--mango-400));
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-cta-hover); }

.btn-secondary {
  color: var(--navy-800);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--navy-600); color: var(--navy-700); }

.btn-link {
  border: 0;
  background: transparent;
  color: var(--navy-600);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(31, 59, 133, 0.3);
}
.btn-link:hover { text-decoration-color: currentColor; }

/* Metrics */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  max-width: 760px;
}
.metric {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  padding: 0.6rem 0.8rem;
  min-width: 0;
}
.metric strong {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  color: #fff;
}
.metric span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

/* Featured slider */
.hero-featured {
  grid-area: featured;
  position: relative;
  z-index: 1;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.hero-slider-viewport {
  overflow: hidden;
  border-radius: 16px;
  flex: 1;
  min-width: 0;
}
.hero-slider-track {
  display: flex;
  transition: transform 0.55s var(--ease-out);
  will-change: transform;
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: var(--navy-900);
  display: block;
}
.hero-slide-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--navy-900);
  border: 0;
  box-shadow: none;
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.hero-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-slide-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: clamp(0.9rem, 2.4vw, 1.6rem) clamp(1rem, 2.6vw, 1.7rem);
  background:
    linear-gradient(to top,
      rgba(7, 16, 46, 0.94) 0%,
      rgba(7, 16, 46, 0.78) 28%,
      rgba(7, 16, 46, 0.35) 55%,
      rgba(7, 16, 46, 0) 78%);
  min-width: 0;
}
.hero-slide-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}
.hero-slide h3 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  max-width: 22ch;
}
.hero-slide p {
  margin: 0;
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
  max-width: 52ch;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.hero-slide .card-link {
  margin-top: 0.4rem;
  width: fit-content;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-weight: 800;
  font-size: 0.86rem;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.hero-slide .card-link::after { content: '→'; transition: transform 0.2s; }
.hero-slide:hover .card-link { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(0, 0, 0, 0.34); }
.hero-slide:hover .card-link::after { transform: translateX(3px); }

.hero-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.1rem;
}
.hero-dot {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}
.hero-dot.active { background: #fff; width: 44px; transform: none; }

/* =====================================================================
   DISCOVER
   ===================================================================== */
.discover {
  padding: 1.6rem 1.8rem 2rem;
  background: var(--paper-1);
  border-top: 1px solid var(--line-soft);
}

.discover-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.discover-head h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  line-height: 1;
  margin-bottom: 0.2rem;
  letter-spacing: -0.005em;
}
.discover-head p { color: var(--muted); font-weight: 500; font-size: 0.96rem; }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.search {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  padding: 0 0.85rem;
  min-width: min(320px, 88vw);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: var(--navy-600); box-shadow: 0 0 0 4px rgba(31, 59, 133, 0.12); }
.search input {
  flex: 1;
  border: 0;
  outline: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  background: transparent;
}
.search input::placeholder { color: var(--muted-2); }

/* Filter chips */
.filter-chip {
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--f-body);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0 1.05rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}
.filter-chip:hover { background: var(--surface); border-color: var(--navy-600); color: var(--navy-700); transform: translateY(-1px); }
.filter-chip.active {
  color: #fff;
  background: var(--navy-800);
  border-color: var(--navy-800);
  box-shadow: 0 6px 14px rgba(14, 26, 68, 0.28);
  text-shadow: none;
  transform: translateY(-1px);
}

/* =====================================================================
   CATALOG GRID
   ===================================================================== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: rise 0.55s var(--ease-out) forwards;
  position: relative;
}
.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.10s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.20s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.30s; }
.game-card:nth-child(7) { animation-delay: 0.35s; }
.game-card:nth-child(8) { animation-delay: 0.40s; }
.game-card:nth-child(9) { animation-delay: 0.45s; }
.game-card:nth-child(10) { animation-delay: 0.50s; }
.game-card:nth-child(11) { animation-delay: 0.55s; }
.game-card:nth-child(12) { animation-delay: 0.60s; }

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line);
}

.thumb {
  height: 168px;
  position: relative;
  overflow: hidden;
  background: var(--navy-800);
}
.thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.game-card:hover .thumb img { transform: scale(1.06); }

/* Card body */
.card-body {
  padding: 0.95rem 1.05rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

/* Badges — neutral default */
.badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink-2);
  background: var(--line-soft);
}
.badge.soft { color: var(--ink-2); background: var(--line-soft); }
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.6;
}

/* Color the FIRST badge (category) by the parent card's data-category */
.game-card[data-category="rhythm"] .badges .badge:first-child {
  color: var(--rhythm-ink); background: var(--rhythm-bg);
}
.game-card[data-category="melody"] .badges .badge:first-child {
  color: var(--melody-ink); background: var(--melody-bg);
}
.game-card[data-category="memory"] .badges .badge:first-child {
  color: var(--memory-ink); background: var(--memory-bg);
}
/* On hero slides, badges sit on dark — use a translucent style */
.hero-slide .badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.card-body h3 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.005em;
}
.card-body p {
  color: var(--muted);
  line-height: 1.42;
  font-weight: 500;
  font-size: 0.92rem;
  flex: 1;
}

.card-link {
  margin-top: 0.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(95deg, var(--mango-600), var(--mango-400));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 0.6rem 1.05rem;
  width: fit-content;
  box-shadow: var(--shadow-cta);
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}
.game-card:hover .card-link {
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta-hover);
}

/* =====================================================================
   No results / empty
   ===================================================================== */
.no-results {
  margin-top: 1rem;
  border: 1.5px dashed var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  border-radius: 14px;
  padding: 1rem;
}

/* =====================================================================
   Footer
   ===================================================================== */
footer {
  background: var(--navy-900);
  border-top: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 1.1rem;
}
footer a { color: #fff !important; opacity: 0.85; transition: opacity 0.2s, color 0.2s; }
footer a:hover { opacity: 1; color: var(--mango-300) !important; }

/* =====================================================================
   PRICING page (uses .shell, .content, .plan-card, etc.)
   ===================================================================== */
.content {
  padding: 3rem 2rem 2.5rem;
  text-align: center;
  background: var(--paper-1);
}

.content h1 {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 0.8rem;
}

.content p.lead {
  font-size: 1.08rem;
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 2rem;
  max-width: 60ch;
  margin-inline: auto;
  line-height: 1.5;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-top: 2rem;
  text-align: left;
}
@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.plan-card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s;
  display: flex;
  flex-direction: column;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.plan-card.premium {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(140deg, var(--mango-600), var(--mango-300)) border-box;
  box-shadow: 0 22px 50px rgba(255, 106, 20, 0.18), 0 4px 8px rgba(255, 106, 20, 0.08);
}
.plan-card.premium .badge {
  position: absolute;
  top: -14px;
  right: 22px;
  background: linear-gradient(95deg, var(--mango-600), var(--mango-400));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.34rem 0.85rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-cta);
  text-shadow: none;
}
.plan-card.premium .badge::before { display: none; }

.plan-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.plan-price {
  font-family: var(--f-display);
  font-size: 3.6rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin-bottom: 0.1rem;
}
.plan-price span {
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 700;
  margin-left: 4px;
  letter-spacing: 0;
}

.plan-desc {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.94rem;
  line-height: 1.4;
}

/* override the page's .btn block style */
.content .btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.95rem;
  font-weight: 800;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  border: none;
  cursor: pointer;
}
.content .btn-primary {
  background: linear-gradient(95deg, var(--mango-600), var(--mango-400));
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.content .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-cta-hover); }
.content .btn-secondary {
  background: var(--surface);
  color: var(--navy-800);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.content .btn-secondary:hover { background: var(--surface); border-color: var(--navy-600); color: var(--navy-700); transform: translateY(-2px); }

/* Features list — note-style checkmarks */
.features {
  list-style: none;
  margin-top: 1.4rem;
  padding-top: 1.4rem;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 0.65rem;
}
.features li {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink-2);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.4;
}
.features li::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--success);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5 L6.5 11.5 L12.5 4.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5 L6.5 11.5 L12.5 4.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  color: var(--success);  /* IE/old fallback */
}
.features li strong { color: var(--ink); }

/* Account actions card */
.account-actions {
  margin-top: 2.2rem;
  padding: 1.6rem 1.6rem 1.8rem;
  border-radius: 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  text-align: left;
}
.account-actions h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
  letter-spacing: -0.005em;
}
.account-actions p {
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
}
.account-actions .btn-primary {
  background: var(--navy-800);
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 16, 46, 0.25);
}
.account-actions .btn-primary:hover { background: var(--navy-700); box-shadow: 0 12px 24px rgba(7, 16, 46, 0.32); }

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (max-width: 600px) { .action-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   AUTH page (uses .auth-shell, .auth-card, .tab, .auth-form, etc.)
   ===================================================================== */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: min(460px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 60px rgba(13, 22, 49, 0.14);
  padding: 28px 26px;
}

.auth-head h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.auth-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 500;
  font-size: 0.95rem;
}

.auth-tabs {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 10px 12px;
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
}
.tab.active {
  color: var(--navy-800);
  background: var(--surface);
  box-shadow: 0 6px 14px rgba(13, 22, 49, 0.12);
}

.auth-status {
  min-height: 22px;
  margin-top: 12px;
  font-size: 0.92rem;
  font-weight: 700;
}
.auth-status.ok { color: #0e7a44; }
.auth-status.error { color: #b91c3c; }

.auth-form {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}
.auth-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--ink-2);
}
.auth-form input {
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.auth-form input::placeholder { color: var(--muted-2); font-weight: 600; }
.auth-form input:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgba(31, 59, 133, 0.15);
}

/* .btn-primary inside auth context */
.auth-form .btn-primary {
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 13px;
  background: linear-gradient(95deg, var(--mango-600), var(--mango-400));
  color: #fff;
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.auth-form .btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-cta-hover); }
.auth-form .btn-primary:disabled,
.btn-google:disabled { opacity: 0.66; cursor: default; transform: none; }

.hidden { display: none !important; }

.divider {
  margin: 16px 0 12px;
  text-align: center;
  font-weight: 800;
  color: var(--muted-2);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 11px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s;
}
.btn-google:hover { border-color: var(--navy-600); transform: translateY(-1px); }
.btn-google span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #4285f4, #ea4335);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.btn-guest {
  margin-top: 12px;
  width: 100%;
  border: 1.5px dashed var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s;
}
.btn-guest:hover { background: rgba(13, 22, 49, 0.03); color: var(--ink); border-color: var(--ink-2); }

/* =====================================================================
   Animations
   ===================================================================== */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Disable the legacy keyframes from the old files (no-op if not referenced) */
@keyframes wiggle { 0%, 100% { transform: none; } }
@keyframes bob { 0%, 100% { transform: none; } }
@keyframes gradientBg { 0%, 100% { background-position: 0 0; } }
@keyframes floatEmoji { 0%, 100% { transform: none; } }

/* =====================================================================
   Responsive
   ===================================================================== */

/* Desktop: hero 2-column (copy left, slider right) */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1.1fr;
    grid-template-areas: "copy featured";
    align-items: center;
  }
  .hero-copy { max-width: none; }
}

@media (max-width: 1060px) {
  .hero { padding: 1.05rem 0.95rem 0.9rem; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { min-width: 260px; }
}

@media (max-width: 760px) {
  body { padding: 0.6rem; }
  .topbar { padding: 0.78rem 0.85rem; }
  .hero, .discover { padding: 0.95rem; }
  .hero h1 { max-width: none; font-size: clamp(1.75rem, 10vw, 2.45rem); }
  .hero-slide-copy { padding: 1rem 1.1rem 1rem; }
  .hero-slide h3 { font-size: clamp(1.3rem, 5.5vw, 1.7rem); }
  .hero-slide p { display: none; }   /* keep slide cleaner on mobile */
  .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .discover-head { align-items: flex-start; }
  .tools { width: 100%; justify-content: flex-start; }
  .search { width: 100%; min-width: 0; }
  .catalog-grid { grid-template-columns: 1fr; }
  .content { padding: 2.2rem 1.4rem; }
  .auth-card { padding: 22px; }
}

@media (max-width: 520px) {
  .hero-metrics { grid-template-columns: 1fr; }
}
