/* ============================================================
   NestlingTale Design System — dark, warm, magical bedtime aesthetic
   (tokens mirrored from the app: fairytale-app/src/styles/tokens.css)
   ============================================================ */

:root {
  --indigo-50: #1a2150;
  --indigo-100: #1f2760;
  --indigo-200: #2c3470;
  --indigo-300: #4d54b8;
  --indigo-400: #6b74e0;
  --indigo-500: #6b74e0;
  --indigo-600: #4d54b8;
  --indigo-700: #3a4098;
  --indigo-800: #232a63;
  --indigo-900: #171e44;

  --purple-50: #1d2350;
  --purple-500: #a9a4ff;
  --purple-600: #8b86f5;
  --purple-700: #6b74e0;

  --emerald-50: rgba(127, 216, 166, 0.14);
  --emerald-100: rgba(127, 216, 166, 0.2);
  --emerald-200: rgba(127, 216, 166, 0.3);
  --emerald-500: #7fd8a6;
  --emerald-600: #6cc894;
  --emerald-700: #57b481;

  --red-50: rgba(255, 122, 133, 0.14);
  --red-100: rgba(255, 122, 133, 0.2);
  --red-500: #ff7a85;
  --red-600: #f06572;
  --red-700: #e05260;

  --amber-50: rgba(255, 180, 84, 0.14);
  --amber-100: rgba(255, 180, 84, 0.22);
  --amber-500: #ffb454;
  --amber-600: #ffab4d;

  --cyan-50: rgba(132, 182, 255, 0.14);
  --cyan-600: #84b6ff;

  /* Grays, remapped dark: 50 = soft surface, 900 = headline text */
  --gray-50: #111735;
  --gray-100: #141a3d;
  --gray-200: #232a63;
  --gray-300: #2c3470;
  --gray-400: #7d85b3;
  --gray-500: #adb4d9;
  --gray-600: #c9cee8;
  --gray-700: #e3e6f5;
  --gray-800: #090d20;
  --gray-900: #f6f2e9;

  --primary: #ffab4d;
  --primary-hover: #ffca7a;
  --primary-soft: rgba(255, 180, 84, 0.16);
  --secondary: #8b86f5;
  --accent: #7fd8a6;

  --grad-primary: linear-gradient(135deg, #ffca7a 0%, #ffab4d 52%, #ff8f45 100%);
  --grad-soft: linear-gradient(155deg, #35307e 0%, #1b1f56 46%, #0d1130 100%);
  --grad-app: linear-gradient(165deg, #1a2053 0%, #0b1026 58%, #090d20 100%);

  --text: #f6f2e9;
  --text-muted: #adb4d9;
  --text-light: #7d85b3;
  --text-on-brand: #2a1a05;
  --bg-card: #171e44;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --bg: #0b1026;
  --bg-soft: #111735;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --radius-full: 999px;

  --shadow-xs: 0 2px 6px rgba(3, 6, 20, 0.3);
  --shadow-sm: 0 4px 14px rgba(3, 6, 20, 0.4);
  --shadow: 0 8px 22px rgba(3, 6, 20, 0.45);
  --shadow-md: 0 12px 30px rgba(3, 6, 20, 0.5);
  --shadow-lg: 0 22px 54px rgba(3, 6, 20, 0.6);
  --shadow-brand: 0 10px 34px rgba(255, 165, 70, 0.32);

  --font: 'Nunito Variable', 'Nunito', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --header-h: 68px;
  --container: 1120px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1000px 600px at 20% -10%, rgba(77, 84, 184, 0.25), transparent 60%),
    radial-gradient(900px 700px at 90% 110%, rgba(255, 180, 84, 0.1), transparent 55%),
    #070a1a;
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

ul,
ol {
  list-style: none;
}

::selection {
  background: rgba(255, 180, 84, 0.35);
}

:focus-visible {
  outline: 3px solid rgba(255, 180, 84, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section-sm {
  padding: 48px 0;
}

.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ---------- Headings & eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--indigo-50);
  border: 1px solid var(--indigo-100);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: 40px;
  margin: 16px 0 12px;
  letter-spacing: -0.03em;
}

.section-head p {
  font-size: 18px;
  color: var(--text-muted);
}

.section-head .credits-rule {
  font-size: 16px;
  color: var(--gray-600);
  margin-top: 8px;
}
.section-head .credits-rule strong {
  color: var(--indigo-600);
  font-weight: 800;
}

.grad-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
  position: relative;
  text-align: center;
}

.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--grad-primary);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  color: var(--text-on-brand);
}

.btn-secondary {
  background: var(--indigo-600);
  color: #fff;
}
.btn-secondary:hover:not(:disabled) { background: var(--indigo-700); color: #fff; }

.btn-outline {
  border-color: var(--border-strong);
  color: var(--gray-700);
  background: var(--bg-card);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--indigo-50);
}

.btn-ghost {
  color: var(--gray-600);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--gray-900);
  background: var(--gray-100);
  border-color: var(--gray-200);
}

.btn-accent {
  background: var(--accent);
  color: #0d2b1e;
}
.btn-accent:hover:not(:disabled) {
  background: var(--emerald-600);
  color: #0d2b1e;
}

.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  white-space: nowrap;
}
.chip .flag { width: auto; height: 15px; vertical-align: -2px; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.card-pad { padding: 24px; }
.card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--indigo-200);
}

/* ---------- Stat icon ---------- */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stat-icon.indigo { background: var(--indigo-50); color: var(--indigo-600); }
.stat-icon.purple { background: var(--purple-50); color: var(--purple-600); }
.stat-icon.emerald { background: var(--emerald-50); color: var(--emerald-600); }
.stat-icon.amber { background: var(--amber-50); color: var(--amber-600); }
.stat-icon.red { background: var(--red-50); color: var(--red-600); }
.stat-icon.cyan { background: var(--cyan-50); color: var(--cyan-600); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.92);
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
body.lightbox-open {
  overflow: hidden;
}

/* ---------- Accordion ---------- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion-item[open] { box-shadow: var(--shadow-sm); border-color: var(--indigo-200); }
.accordion-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--gray-900);
  cursor: pointer;
  list-style: none;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary .chev {
  transition: transform 0.2s ease;
  color: var(--gray-400);
  flex-shrink: 0;
}
.accordion-item[open] summary .chev { transform: rotate(180deg); color: var(--primary); }
.accordion-body { padding: 0 20px 20px; color: var(--text-muted); font-size: 15px; }

/* ---------- Avatar ---------- */
.avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: var(--grad-primary);
  letter-spacing: 0;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2.5px solid #fff; margin-left: -10px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- Landing hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(60% 50% at 18% 0%, rgba(99, 102, 241, 0.16) 0%, transparent 60%),
    radial-gradient(55% 45% at 85% 10%, rgba(124, 58, 237, 0.14) 0%, transparent 60%),
    linear-gradient(180deg, #0b1026 0%, var(--gray-50) 100%);
  padding: calc(var(--header-h) + 56px) 0 96px;
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 100%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 100%);
  pointer-events: none;
}

/* ---------- Video placeholder ---------- */
.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-50), var(--gray-800));
  display: grid;
  place-items: center;
  color: #fff;
}
.media-grad-1 { background: linear-gradient(135deg, #35307e, #1b1f56); }
.media-grad-2 { background: linear-gradient(135deg, #2b3f8f, #4d54b8); }
.media-grad-3 { background: linear-gradient(135deg, #2f7d5f, #35307e); }
.media-grad-4 { background: linear-gradient(135deg, #ffab4d, #c4566a); }
.media-grad-5 { background: linear-gradient(135deg, #6b74e0, #a9a4ff); }
.media-grad-6 { background: linear-gradient(135deg, #171e44, #2c3470); }

/* ---------- Trust row ---------- */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  opacity: 0.55;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gray-500);
}
.trust-row span { font-size: 18px; }
.trust-row svg { flex-shrink: 0; }
.trust-row img {
  width: auto;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  filter: grayscale(1);
}
.trust-row .trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
}

/* ============================================================
   Landing page
   ============================================================ */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-title {
  font-size: 58px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 22px 0 18px;
}
.hero-sub {
  font-size: 19px;
  color: var(--gray-600);
  max-width: 480px;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.cta-box .hero-cta{
  justify-content: center;
}
.hero-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}
.hero-stars-row {
  display: flex;
  color: var(--amber-500);
  gap: 2px;
}
.hero-stars span {
  font-size: 13px;
  color: var(--text-muted);
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 10px 14px;
  z-index: 2;
}
.fc-1 { top: 17%; left: -5%; }
.fc-2 { top: 46%; right: -8%; }
.fc-3 { bottom: -12%; left: 4%; }
.fc-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.fc-icon.emerald { background: var(--emerald-50); color: var(--emerald-600); }
.fc-icon.purple { background: var(--purple-50); color: var(--purple-600); }
.fc-icon.indigo { background: var(--indigo-50); color: var(--indigo-600); }
.fc-title { font-size: 12.5px; font-weight: 700; color: var(--gray-900); }
.fc-sub { font-size: 11.5px; color: var(--text-muted); }

@media (max-width: 992px) {
  .hero-sub{
    margin: 0 auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-copy{
    text-align: center;
  }
  .eyebrow{
    font-size: 10px;
  }
}

@media (max-width: 420px) {
  .fc-1{
    display: none;
  }
  .fc-2{
    top:30%
  }
  .fc-3 {
    bottom: -25%;
  }

}
.how-card {
  position: relative;
  padding: 10px;
  text-align: left;
}
.how-num {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 44px;
  font-weight: 900;
  color: var(--gray-200);
  letter-spacing: -0.03em;
}
.how-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  margin-bottom: 18px;
}
.how-title {
  font-size: 19px;
  margin-bottom: 8px;
  padding-right: 40px;
}
.how-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.demo-section {
  background: var(--bg-soft);
}
.demo-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.demo-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}
.demo-tag.before { background: var(--red-50); color: var(--red-600); }
.demo-tag.after { background: var(--emerald-50); color: var(--emerald-600); }
.demo-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.demo-window.clean {
  border-color: var(--emerald-200);
  background: linear-gradient(180deg, #141a3d, var(--emerald-50));
}
.demo-line {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: 12px;
}
.demo-line:last-child { margin-bottom: 0; }
.filler {
  background: var(--red-100);
  color: var(--red-700);
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: var(--red-500);
}
.demo-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-brand);
}
.demo-stats {
  margin-top: 14px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: var(--radius-full);
}
.stat-pill.bad { background: var(--gray-100); color: var(--gray-600); }
.stat-pill.good { background: var(--emerald-100); color: var(--emerald-700); }
.demo-langs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 40px;
  font-weight: 600;
  color: var(--gray-700);
}
.demo-langs .chip {
  padding: 6px 13px;
}
.demo-langs .ri-discord-fill {
  font-size: 32px;
}
.demo-video {
  max-width: 760px;
  margin: 56px auto 0;
  text-align: center;
}
.demo-video-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}
.demo-video-player {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}
.demo-video-el {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-lg) - 6px);
  background: var(--gray-800);
  object-fit: contain;
}
.demo-video-langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.demo-video-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.demo-video-lang .flag {
  width: auto;
  height: 14px;
  flex-shrink: 0;
  border-radius: 2px;
}
.demo-video-lang:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.demo-video-lang.active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
}
.demo-video-lang-tag {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.feat-card {
  padding: 26px;
}
.feat-title {
  font-size: 17px;
  margin: 16px 0 8px;
}
.feat-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.is-hidden {
  display: none !important;
}

.pricing-section {
  background: var(--bg-soft);
}
.pricing-grid {
  align-items: stretch;
}
.pricing-grid.single-plan {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}
.pricing-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 560px;
  margin: 36px auto 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.6;
}
.pricing-note svg { color: var(--emerald-500); flex-shrink: 0; }

.billing-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.billing-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 2px;
}
.billing-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}
.billing-save {
  display: inline;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--emerald-100);
  color: var(--emerald-600);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.billing-period.active .billing-save {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.billing-period:hover { color: var(--gray-900); }
.billing-period.active {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.billing-country-form { margin: 0; }
.billing-country {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  max-width: 220px;
}

.price-card {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}
.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.price-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-brand);
  background: linear-gradient(180deg, #232a63 0%, var(--indigo-50) 180%);
}
.popular-tag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: var(--shadow-brand);
}
.price-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
}
.price-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 5px;
  min-height: 38px;
}
.price-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 18px;
  white-space: nowrap;
}
.price-num {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  white-space: nowrap;
}
.price-currency {
  font-size: 20px;
  font-weight: 600;
  vertical-align: baseline;
  margin: 0 1px;
}
.popular .price-num {
  color: var(--primary);
}
.price-period {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}
.price-was {
  margin-left: 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  white-space: nowrap;
}
.price-card-free .price-num {
  font-size: 28px;
}
.billing-meta {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.price-credits {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.price-feats {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.price-feats li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 500;
}
.feat-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--emerald-100);
  color: var(--emerald-600);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.faq-section {
  background: var(--bg-soft);
}

.cta-section {
  padding: 88px 0;
}
.cta-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--indigo-900), var(--purple-700));
  padding: 72px 32px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-box h2 {
  font-size: 40px;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.cta-box p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
}

/* ---------- Header ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 850;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 16, 38, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.app-header.transparent {
  background: transparent;
  border-bottom-color: transparent;
}
.app-header.scrolled {
  background: rgba(11, 16, 38, 0.93);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.desktop-nav {
  display: flex;
  gap: 28px;
  margin-left: 32px;
}
.desktop-nav a {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--gray-600);
}
.desktop-nav a:hover {
  color: var(--gray-900);
}

.text-invert {
  color: #fff !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.lang-switch {
  position: relative;
  display: inline-block;
}
.lang-switch > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-200);
  background: var(--bg-card);
  user-select: none;
  transition: all 0.15s ease;
}
.lang-switch > summary::-webkit-details-marker {
  display: none;
}
.lang-switch > summary:hover {
  border-color: var(--gray-300);
  color: var(--gray-900);
}
.lang-switch > summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.lang-caret {
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
}
.lang-switch[open] > summary .lang-caret {
  transform: rotate(180deg);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}
.lang-menu li {
  margin: 0;
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.15s ease;
}
.lang-menu a:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}
.lang-menu a.active {
  color: var(--primary);
  background: var(--indigo-50);
}
.lang-switch .lang-menu a {
  border-bottom: none;
}

.app-header.transparent .lang-switch > summary {
  background: rgba(255, 255, 255, 0.12);
}
.app-header.transparent .lang-switch > summary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lang-switch-mobile {
  margin: 4px 0 8px;
}
.lang-switch-mobile > summary {
  font-size: 14px;
  padding: 10px 14px;
}
.lang-switch-mobile .lang-menu {
  position: static;
  box-shadow: none;
  margin-top: 8px;
}

.getapp-icon {
  display: none;
  width: 18px;
  height: 18px;
}

.hamburger {
  display: none;
  color: var(--gray-900);
}

.mobile-menu {
  display: none;
}
.mobile-menu.open {
  display: block;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 16px 0 24px;
  z-index: 849;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-50);
}
.mobile-sep {
  height: 1px;
  background: var(--gray-100);
  margin: 8px 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad-primary);
  color: #fff1d1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-brand);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--gray-800);
  color: var(--gray-400);
  padding: 64px 0 28px;
  margin-top: 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand .brand-logo {
  color: #fff;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 14px;
  max-width: 320px;
  line-height: 1.7;
  color: var(--gray-500);
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-socials a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-400);
  transition: all 0.15s ease;
}
.footer-socials a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.footer-col-title {
  font-weight: 700;
  color: #fff;
  font-size: 14px;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  padding: 7px 0;
  font-size: 14px;
  color: var(--gray-500);
  transition: color 0.15s ease;
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--gray-500);
  flex-wrap: wrap;
}
.heart {
  color: var(--red-500);
}

/* ============================================================
   Pages (blog / article / feedback / static)
   ============================================================ */

/* Fixed header clearance for non-landing pages */
body:not(.landing-page) {
  padding-top: var(--header-h);
}
body:not(.landing-page) .section {
  padding: 48px 0 96px;
}

/* ---------- Shared headings ---------- */
.section-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--indigo-100);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}
.section-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0 0 12px;
}
.section-title .hl,
.hl {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.section-intro {
  font-size: 17.5px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 720px;
  margin: 0 0 40px;
}
.section-intro a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.section-intro a:hover {
  color: var(--primary-hover);
}

/* ---------- Rich content (raw HTML) ---------- */
.rich-content {
  color: var(--gray-700);
  font-size: 16.5px;
  line-height: 1.75;
  word-wrap: break-word;
}
.rich-content > * + * {
  margin-top: 16px;
}
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.rich-content h2 {
  font-size: 26px;
  margin: 40px 0 8px;
}
.rich-content h3 {
  font-size: 21px;
  margin: 32px 0 6px;
}
.rich-content h4 {
  font-size: 17.5px;
  margin: 24px 0 4px;
}
.rich-content p {
  margin: 0 0 16px;
}
.rich-content ul,
.rich-content ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.rich-content ul {
  list-style: disc;
}
.rich-content ol {
  list-style: decimal;
}
.rich-content li {
  margin-bottom: 6px;
}
.rich-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rich-content a:hover {
  color: var(--primary-hover);
}
.rich-content img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 24px auto;
  cursor: zoom-in;
}
.rich-content blockquote {
  border-left: 3px solid var(--indigo-300);
  background: var(--gray-50);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  font-style: italic;
  margin: 24px 0;
}
.rich-content blockquote > :last-child {
  margin-bottom: 0;
}
.rich-content pre {
  background: var(--gray-800);
  color: var(--gray-600);
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 24px 0;
}
.rich-content code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
  font-size: 0.9em;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 6px;
}
.rich-content pre code {
  background: none;
  padding: 0;
}
.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.rich-content th,
.rich-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.rich-content th {
  background: var(--gray-50);
  font-weight: 600;
}
.rich-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ---------- Blog list ---------- */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
  margin-top: 8px;
}
.blog-main {
  min-width: 0;
}
.blog-list {
  display: grid;
  gap: 24px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.blog-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.blog-card-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-card-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}
.blog-card-title:hover {
  color: var(--primary);
}
.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.65;
}
.blog-card-link {
  align-self: flex-start;
  margin-top: 4px;
}
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.blog-card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--indigo-100);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.blog-card-tag:hover {
  background: var(--indigo-100);
  border-color: var(--indigo-200);
}
.blog-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}
.blog-pagination-item {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--gray-600);
  font-weight: 600;
  font-size: 14.5px;
  padding: 0 8px;
  transition: all 0.15s ease;
}
.blog-pagination-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.blog-pagination-item.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-brand);
}
.blog-rss {
  margin-top: 24px;
  text-align: center;
}
.blog-rss-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-500);
}
.blog-rss-link:hover {
  color: var(--primary);
}
.blog-rss-link i {
  color: var(--primary);
  font-size: 15px;
}
.blog-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.blog-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 14px;
}
.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-cat-chip,
.blog-tag-chip {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
}
.blog-cat-chip:hover,
.blog-tag-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.blog-cat-chip.active,
.blog-tag-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- Blog article ---------- */
.blog-article-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.blog-article-breadcrumbs a {
  color: var(--gray-500);
  font-weight: 500;
}
.blog-article-breadcrumbs a:hover {
  color: var(--primary);
}
.blog-article-breadcrumbs-sep {
  color: var(--gray-300);
}
.blog-article-title {
  max-width: 800px;
  font-size: 42px;
  margin-bottom: 16px;
}
.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.blog-article-date {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.blog-article-updated {
  color: var(--text-muted);
}
.blog-article-updated::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: 10px;
  vertical-align: middle;
}
.blog-article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--text-muted);
}
.blog-article-tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}
.blog-article-tag:hover {
  background: var(--indigo-100);
}
.blog-article-lead {
  max-width: 780px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-left: 3px solid var(--indigo-300);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.blog-article-lead > :last-child {
  margin-bottom: 0;
}
.blog-article-body {
  max-width: 780px;
}
.blog-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.blog-share-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 2px;
}
.blog-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s;
}
.blog-share a:hover {
  color: #fff;
  transform: translateY(-2px);
}
.blog-share .share-x:hover { background-color: #000; border-color: #000; }
.blog-share .share-facebook:hover { background-color: #1877f2; border-color: #1877f2; }
.blog-share .share-linkedin:hover { background-color: #0a66c2; border-color: #0a66c2; }
.blog-share .share-telegram:hover { background-color: #229ed9; border-color: #229ed9; }
.blog-share .share-whatsapp:hover { background-color: #25d366; border-color: #25d366; }
.blog-share .share-vk:hover { background-color: #0077ff; border-color: #0077ff; }
.blog-article-back {
  margin-top: 40px;
}

/* ---------- Feedback pages ---------- */
.feedback-section {
  text-align: center;
}
.feedback-section .container {
  max-width: 720px;
}
.feedback-section .section-intro {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.feedback-form {
  margin-top: 8px;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 20px;
}
.feedback-form-field {
  display: grid;
  gap: 8px;
}
.feedback-form-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}
.feedback-form-field input,
.feedback-form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.feedback-form-field input:focus,
.feedback-form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.feedback-form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
}
.feedback-form-check input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.feedback-form-check a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.feedback-form-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.feedback-form-noscript {
  font-size: 14px;
  color: var(--amber-600);
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  padding: 10px 16px;
  border-radius: var(--radius);
}

/* ---------- Shop page ---------- */
.shop-section {
  text-align: center;
}
.shop-section .container {
  max-width: 560px;
}
.shop-form {
  margin-top: 8px;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 20px;
}
.shop-form-field {
  display: grid;
  gap: 8px;
}
.shop-form-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}
.shop-form-field input,
.shop-form-field select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.shop-form-field input:focus,
.shop-form-field select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.shop-form-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.shop-form-note {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}
.shop-coupon-row {
  display: flex;
  gap: 10px;
}
.shop-coupon-row input {
  flex: 1;
}
.shop-coupon-result {
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  margin-top: 4px;
}
.shop-coupon-ok {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-200);
}
.shop-coupon-error {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
}
.shop-price-box {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.shop-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  padding: 4px 0;
}
.shop-price-original {
  color: var(--text-muted);
}
.shop-price-discount {
  color: var(--emerald-600);
  font-weight: 600;
}
.shop-price-final {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
}
.shop-price-final.shop-total-first {
  border-top: 0;
  margin-top: 0;
  padding-top: 4px;
}
.shop-alert {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  text-align: left;
}
.shop-alert-error {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
}
.shop-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--emerald-50);
  color: var(--emerald-600);
  font-size: 36px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.shop-success-text {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
#shop-success p .btn {
  margin: 8px 4px 0;
}
.shop-fail-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--red-50);
  color: var(--red-600);
  font-size: 36px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 2px solid var(--red-200);
}

/* ---------- Static page ---------- */
.static-page-title {
  text-align: center;
  margin-bottom: 32px;
}
.static-page-lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 640px;
}
.static-page-section {
  margin-top: 56px;
}
.static-page-section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 8px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.static-page-section-description {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.65;
  margin-bottom: 16px;
}

/* ---------- 404 page ---------- */
.error-section {
  text-align: center;
}
.error-section .container {
  max-width: 640px;
}
.error-section .section-intro {
  margin-left: auto;
  margin-right: auto;
}
.error-code {
  font-size: 108px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 8px;
}
.error-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---------- Animations ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float-y { animation: float-y 5s ease-in-out infinite; }
.fade-up { animation: fade-up 0.5s ease both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: calc(var(--header-h) + 40px); }
  .section-head h2 { font-size: 34px; }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    max-width: 520px;
  }
  .float-card.fc-2 { right: -2%; }
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .demo-arrow {
    transform: rotate(90deg);
    margin: 0 auto;
  }
  .blog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .blog-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }
  .header-actions .lang-switch {
    display: none;
  }
  .hamburger {
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .header-actions {
    gap: 10px;
  }
  .header-actions .getapp-label {
    display: none;
  }
  .header-actions .getapp-icon {
    display: block;
  }
  .header-actions .btn-sm {
    padding: 8px 10px;
  }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  body:not(.landing-page) .section { padding: 40px 0 72px; }
  .trust-row { gap: 24px; }
  .trust-row span { font-size: 15px; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .section-title { font-size: 32px; }
  .section-intro { font-size: 16.5px; }
  .blog-article-title { font-size: 34px; }
  .blog-article-lead { font-size: 18px; }
  .feedback-form { padding: 24px; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 42px; }
  .hero-sub { font-size: 17px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid.single-plan { grid-template-columns: 1fr; }
  .blog-card { padding: 22px; gap: 8px; }
  .blog-card-title { font-size: 19px; }
  .blog-article-title { font-size: 28px; }
  .blog-article-meta { gap: 12px; }
  .feedback-form-actions .btn { width: 100%; }
  .static-page-section { margin-top: 40px; }
  .error-code { font-size: 72px; }
  .error-actions .btn { width: 100%; }
}

/* ---- Compare plans table (pricing page) ---- */
.compare-section { padding-top: 24px; }
.compare-wrap { border-radius: var(--radius-xl); overflow: hidden; }
.compare-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.compare-table th,
.compare-table td {
  padding: 15px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.compare-table th:first-child { text-align: left; width: 240px; }
.compare-table thead th {
  background: var(--gray-50);
  font-weight: 700;
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody td { color: var(--gray-700); }
.compare-plan { font-weight: 800; font-size: 15px; color: var(--gray-900); }
.compare-feat,
td.compare-feat {
  font-weight: 600;
  color: var(--gray-800);
  text-align: left;
  white-space: nowrap;
}
.compare-cell .cmp-check { color: var(--emerald-500); display: inline-grid; place-items: center; }
.cmp-no { color: var(--gray-300); font-weight: 700; }
.cmp-val { font-weight: 600; color: var(--gray-800); white-space: nowrap; }

/* ---- On-demand credits (pricing page) ---- */
.credits-card { margin-top: 28px; padding: 20px 24px; }
.credits-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.credits-title { font-size: 19px; font-weight: 800; color: var(--gray-900); margin: 0; }
.credits-chips { display: flex; gap: 6px; }
.credit-chip {
  min-width: 46px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--gray-50);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.credit-chip:hover { border-color: var(--indigo-300); color: var(--indigo-600); }
.credit-chip.active {
  background: var(--indigo-600);
  border-color: var(--indigo-600);
  color: #fff;
}
.credits-eyebrow {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-600);
  white-space: nowrap;
}
.credits-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 16px;
}
.credits-value { display: flex; align-items: baseline; gap: 6px; justify-content: flex-end; }
.credits-num { font-size: 28px; font-weight: 800; line-height: 1; color: var(--gray-900); }
.credits-label { font-size: 12px; color: var(--gray-500); font-weight: 600; }
.credits-control { padding: 4px 2px; }
.credit-range { width: 100%; height: 5px; border-radius: 999px; background: var(--indigo-100); appearance: none; }
.credit-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--indigo-600);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(77, 84, 184, 0.45);
  cursor: pointer;
}
.credit-range::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--indigo-600);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(77, 84, 184, 0.45);
  cursor: pointer;
}
.credits-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--gray-500);
  font-weight: 600;
}
.credits-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  white-space: nowrap;
}
.credits-per { font-size: 13px; color: var(--gray-600); }
.credits-per span { font-weight: 800; color: var(--gray-900); }
.credits-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.credits-note { font-size: 13px; color: var(--gray-500); margin: 0; }

@media (max-width: 720px) {
  .credits-eyebrow { margin-left: 0; width: 100%; }
  .credits-row { grid-template-columns: 1fr; gap: 10px; }
  .credits-value { justify-content: flex-start; }
  .credits-actions { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------- Cookie consent ---------- */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(11, 16, 38, 0.93);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(3, 6, 20, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: none;
}
.cookie-consent.show {
  display: block;
  transform: translateY(0);
}
.cookie-consent-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.cookie-consent-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-700);
}
.cookie-consent-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}
.cookie-consent-accept {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cookie-consent-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cookie-consent-accept {
    align-self: flex-end;
  }
}
/* ============================================================
   NestlingTale — library, tale cards, app page
   ============================================================ */

/* ---------- Category filter chips ---------- */
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 36px;
}
.cat-chip {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--surface, rgba(255, 255, 255, 0.06));
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.18s ease;
}
.cat-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.cat-chip.active {
  background: var(--primary-soft);
  border-color: rgba(255, 180, 84, 0.45);
  color: var(--primary);
}
/* Chips that navigate to the catalog page (home page preview) */
a.cat-chip {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}
a.cat-chip:hover {
  transform: translateY(-1px);
}

/* "Browse all tales" call to action under the home page preview grid */
.library-more {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

/* ---------- Library search (mirrors the app catalog) ---------- */
.tale-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 480px;
  height: 50px;
  margin: 0 auto 22px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  background: var(--surface, rgba(255, 255, 255, 0.06));
  border: 1.5px solid var(--border);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.tale-search:focus-within {
  border-color: rgba(255, 180, 84, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 171, 77, 0.12);
}
.tale-search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}
.tale-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
}
.tale-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 600;
}
.tale-search-input::-webkit-search-cancel-button {
  display: none;
}
.tale-search-clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.tale-search-clear:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.18);
}
.tale-empty p {
  margin: 0;
}
.tale-reset {
  margin-top: 16px;
}
.tale-search-clear[hidden],
.tale-empty[hidden],
.tale-grid[hidden] {
  display: none !important;
}


/* ---------- Tale cards ---------- */
.tale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.tale-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease, ease), box-shadow 0.22s ease, border-color 0.22s ease;
}
.tale-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.tale-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--grad-soft);
  overflow: hidden;
}
.tale-cover svg,
.tale-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.tale-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
}

.tale-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}
.badge-new {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 180, 84, 0.92);
  color: #2a1a05;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tale-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 20px;
  flex: 1;
}
.tale-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.tale-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.tale-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tale-meta .chip {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 4px 10px;
}
.tale-meta .chip i {
  color: var(--text-light);
}

.tale-cta {
  margin-top: 6px;
}
.tale-cta .btn {
  width: 100%;
}

/* ---------- How it works (reuses .how-card) ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}
@media (max-width: 960px) {
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .how-grid { grid-template-columns: 1fr; }
}
.how-num {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--primary-soft);
  border: 1.5px solid rgba(255, 180, 84, 0.4);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 14px;
}

/* ---------- App page ---------- */
.app-hero {
  position: relative;
  padding: 72px 0 40px;
  background: var(--grad-app);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.app-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .app-hero-grid { grid-template-columns: 1fr; }
}
.app-hero-title {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
  margin: 14px 0 16px;
}
.gold-text {
  background: linear-gradient(120deg, #ffe6ae 0%, #f7d486 45%, #ffbe63 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.app-hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 28px;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: all 0.18s ease;
  min-height: 56px;
}
.store-badge:hover {
  border-color: rgba(255, 180, 84, 0.5);
  transform: translateY(-2px);
}
.store-badge.soon {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}
.store-badge svg { flex-shrink: 0; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge-text small {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.store-badge-text strong { font-size: 15.5px; font-weight: 800; }
.store-soon-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-full);
  padding: 3px 9px;
}

/* Phone mock with covers */
.phone-mock {
  width: min(300px, 80%);
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  border-radius: 40px;
  border: 1px solid var(--border-strong);
  background: var(--grad-app);
  box-shadow: var(--shadow-lg), 0 0 0 10px rgba(255, 255, 255, 0.03);
  padding: 14px 12px;
  position: relative;
  overflow: hidden;
}
.phone-notch {
  width: 96px;
  height: 22px;
  border-radius: var(--radius-full);
  background: #05070f;
  margin: 0 auto 14px;
}
.phone-screen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(100% - 36px);
}
.phone-cover {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--grad-soft);
}
.phone-cover svg { width: 100%; height: 100%; }
.phone-line {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}
.phone-line.w60 { width: 60%; }
.phone-line.w80 { width: 80%; }
.phone-btn {
  margin-top: auto;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  color: var(--text-on-brand);
  font-weight: 800;
  font-size: 13px;
  text-align: center;
  padding: 12px;
  box-shadow: var(--shadow-brand);
}

/* App feature grid reuses .feat-card */

/* Voice-badge accent used on story detail rows */
.voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 700;
}
.voice-pill i { color: var(--primary); }

/* Empty/error state for the library */
.tale-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

/* ---------- Hero: bedtime story stage ---------- */
.hero-visual {
  position: relative;
  margin: 0 auto;
  width: 100%;
}
.tale-stage {
  position: relative;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  aspect-ratio: 800 / 700;
}
.tale-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(11, 16, 38, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  z-index: 2;
}
.tale-tag i { color: var(--primary); font-size: 15px; }

.tale-player {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 9%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(11, 16, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.player-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--grad-soft);
}
.player-cover svg {
  display: block;
  width: 100%;
  height: 100%;
}
.player-body {
  flex: 1;
  min-width: 0;
}
.player-title {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 3px 0 7px;
}
.player-meta i {
  color: var(--primary);
  font-size: 14px;
}
.player-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
}
.player-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}
.player-wave span {
  width: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}
.player-wave span.on {
  background: var(--primary);
}
.player-play {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad-primary);
  color: var(--text-on-brand);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-brand);
}

/* ---------- Hero onboarding scene (ported from app OnboardingScene.vue) ---------- */
.onboarding-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.onboarding-scene svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.onboarding-scene__bg {
  z-index: 0;
}
.onboarding-scene__stars {
  z-index: 1;
}
.onboarding-scene__fg {
  z-index: 2;
}
.onboarding-scene-melody {
  animation: onboarding-scene-melody 2s ease-in-out alternate-reverse infinite;
}
@keyframes onboarding-scene-melody {
  from {
    transform: translateY(-5px);
  }
  to {
    transform: translateY(5px);
  }
}
.onboarding-scene-star-glow {
  animation: onboarding-scene-star-glow 1s ease-in-out alternate-reverse infinite;
}
@keyframes onboarding-scene-star-glow {
  from {
    opacity: 0.9;
  }
  to {
    opacity: 1;
  }
}
.onboarding-scene__stars-holder {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tale-stage .onboarding-scene__stars {
  animation: onboarding-scene-star-stars 1800s linear infinite;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  transform-origin: center;
}
@keyframes onboarding-scene-star-stars {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ---------- CTA box illustration (book + moon) ---------- */
.cta-art {
  position: absolute;
  right: 26px;
  bottom: 14px;
  width: 170px;
  pointer-events: none;
  opacity: 0.9;
  transform: rotate(4deg);
}
.cta-art svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 560px) {
  .tale-player {
    left: 4%;
    right: 4%;
    bottom: 1%;
    padding: 10px;
    gap: 10px;
  }
  .player-cover {
    width: 44px;
    height: 44px;
  }
  .player-play {
    width: 38px;
    height: 38px;
  }
  .player-play svg {
    width: 16px;
    height: 16px;
  }
  .player-meta {
    font-size: 11.5px;
  }
  .tale-tag {
    top: 12px;
    left: 12px;
    font-size: 11.5px;
    padding: 6px 12px;
  }
  .cta-art {
    width: 120px;
    right: 10px;
    bottom: 8px;
    opacity: 0.55;
  }
}

/* ---------- Tale detail page ---------- */
.tale-detail {
  padding-top: calc(var(--header-h) + 32px);
}
.tale-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
}
.tale-back:hover { color: var(--primary); }

.tale-head {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  margin-top: 22px;
}
.tale-head-cover {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--grad-soft);
}
.tale-head-cover svg,
.tale-head-cover img {
  display: block;
  width: 100%;
  height: auto;
}
.tale-head-cover .tale-badges {
  position: absolute;
  top: 14px;
  right: 14px;
}
.tale-head-title {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 12px 0 14px;
}
.tale-head-desc {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 10px;
}
.tale-cast {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tale-listen {
  margin-top: 26px;
}
.tale-listen-hint {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-light);
  max-width: 480px;
  line-height: 1.55;
}
.tale-text {
  max-width: 720px;
  margin: 52px auto 0;
  font-size: 20px;
  line-height: 1.7;
  color: var(--gray-600);
}
@media (max-width: 560px) {

  .tale-text {
    font-size: 18px;
  }
}
.tale-para {
  margin-bottom: 18px;
}
.tale-speaker {
  color: var(--primary);
  font-weight: 800;
  margin-right: 6px;
}
.tale-end-cta {
  text-align: center;
  margin-top: 46px;
}

/* Card cover/title are now links to the tale page */
.tale-cover { display: block; }
.tale-title a { color: inherit; }
.tale-title a:hover { color: var(--primary); }

@media (max-width: 900px) {
  .tale-head {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .tale-head-cover {
    max-width: 420px;
  }
}
