/* МузОбр — design overrides
   Source of truth: /opt/music/DESIGN.md
   Loaded AFTER inline <style> so it wins on equal specificity.

   LIGHT THEME — white background, dark text. Now Playing stays dark
   for immersive cinematic feel (Apple Music pattern). */

/* ============================================================
   0. Tokens — LIGHT THEME
   ============================================================ */
:root {
  /* ГОСУДАРСТВЕННЫЙ АРХИВ: бумага, чернила, киноварь, мундирный синий */
  --color-bg-primary:   #F2EDE3;          /* кремовая бумага */
  --color-bg-secondary: #E9E2D2;          /* картон */
  --color-bg-elevated:  #FBF8F1;          /* свежий лист */
  --color-text-primary:   #14120F;        /* чернила */
  --color-text-secondary: rgba(20, 18, 15, 0.66);
  --color-text-muted:     rgba(20, 18, 15, 0.45);

  --color-accent-primary:   #C8102E;       /* киноварь */
  --color-accent-secondary: #14120F;       /* чернила как второй акцент */
  --color-accent-tertiary:  #2E4B6B;       /* мундирный синий */
  --color-success: #3E5C46;
  --color-error:   #C8102E;
  --paper: #F2EDE3;
  --ink:   #14120F;
  --red:   #C8102E;
  --hall:  #12100D;                        /* тёмный читальный зал (Now Playing) */

  --font-display: 'Bricolage Grotesque', 'Space Grotesk', -apple-system, sans-serif;
  --font-body:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --sa-top:    env(safe-area-inset-top, 0px);
  --sa-bottom: env(safe-area-inset-bottom, 0px);
  --sa-left:   env(safe-area-inset-left, 0px);
  --sa-right:  env(safe-area-inset-right, 0px);

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
}

/* ============================================================
   1. Distinctive display typography
   ============================================================ */
h1, h2, h3, h4,
.hero-title, .row-title, .onboarding-title, .content-header h1,
.section-label, .hero h1, .hero h2, .cta-section h2 {
  font-family: var(--font-display) !important;
  letter-spacing: -0.03em;
  font-feature-settings: "ss01", "ss02";
}

/* Hero headlines breathe with optical sizing */
.hero h1, .hero-title, .cta-section h2 {
  font-weight: 800 !important;
  letter-spacing: -0.04em;
  line-height: 1 !important;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}

body, .hero-subtitle, p {
  font-family: var(--font-body) !important;
  font-feature-settings: "cv11", "ss01";  /* Inter alts */
}

/* Tabular numerals for counters/time everywhere */
.score, .progress-time, .track-time, .quiz-progress, [data-tabular],
.hero-meta, .row-link, .now-playing-time, .player-time, .subject-count {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   2. Mobile hygiene
   ============================================================ */
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

input, select, textarea { font-size: max(16px, 1rem); }

button, a[role="button"], .btn-primary, .btn-secondary,
.nav-cta, .auth-prompt-btn, .btn-play-big, .nav-btn {
  min-height: 44px;
  touch-action: manipulation;
}

/* ============================================================
   3. Safe-area for fixed bottom elements
   ============================================================ */
#feedbackFab, #pwaInstall, .player, .mini-player,
.bottom-sheet, .fixed-bottom, .mobile-bottom-nav,
.mobile-codifier-nav {
  bottom: max(24px, calc(24px + var(--sa-bottom)));
}
.player { bottom: var(--sa-bottom) !important; }
@media (max-width: 768px) {
  /* WHY 56px: мобильный таб-бар фиксирован снизу — правило выше с !important перебивало
     мобильные 56px из platform.html, и мини-плеер был погребён под таб-баром */
  .player { bottom: calc(56px + var(--sa-bottom)) !important; }
  .player-hidden { bottom: -64px !important; }
}

.landing-nav, .platform-header, .header, .top-bar { padding-top: var(--sa-top); }

.quiz-overlay, .modal, .bottom-sheet, .auth-overlay { overscroll-behavior: contain; }

/* ============================================================
   4. Hover-capability gate
   ============================================================ */
@media (hover: none) {
  .subject-card:hover,
  .onboarding-card:hover,
  .feature-card:hover,
  .track-card:hover,
  .btn-primary:hover,
  .btn-secondary:hover { transform: none !important; }
}

/* ============================================================
   5. NEW: cinematic hero (landing) — dark editorial, unified with platform
   ============================================================ */

/* Kill the legacy rave decorations (grid/waves/spectrum/particles) */
.hero-grid, .hero-waves, .hero-spectrum, .hero-particles { display: none !important; }

/* Landing nav — match platform header */
.landing-nav {
  padding: 16px 32px !important;
  background: rgba(5, 6, 8, 0.72) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}
.landing-nav .logo {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  letter-spacing: -0.02em;
  color: #FFFFFF !important;
}
.landing-nav .nav-cta {
  background: #FFFFFF !important;
  color: #12100D !important;
  padding: 10px 18px !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  box-shadow: none !important;
  transition: transform 160ms var(--ease-out), background 160ms ease !important;
}
.landing-nav .nav-cta:hover {
  transform: none !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: none !important;
}

body { background: #12100D !important; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #12100D !important;
  min-height: 100vh;
  padding-top: 120px !important;
  padding-bottom: 80px !important;
}

/* Конструктивистская диагональ: жёсткий красный клин из правого нижнего угла */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 68%, rgba(200, 16, 46, 0.16) 68% 68.4%, transparent 68.4% 71%, var(--red) 71% 100%),
    #12100D;
  z-index: 0;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 0 24px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  color: #FFFFFF !important;
  background: var(--red) !important;      /* архивный штамп */
  border: none !important;
  padding: 6px 14px !important;
  border-radius: 2px !important;
  margin-bottom: 28px !important;
  text-transform: uppercase !important;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: clamp(1rem, 1.4vw, 1.25rem) !important;
  max-width: 540px;
  margin: 32px auto 36px !important;
  line-height: 1.5;
}

/* Sound wave on landing — single accent colour, minimal */
.sound-wave-container { margin: 24px 0; }
.sound-wave {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 4px !important;
  height: 64px !important;
}
.sound-wave .bar {
  width: 4px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.85)) !important;
  border-radius: 2px;
  animation: heroBar 1.6s ease-in-out infinite;
}
.sound-wave .bar:nth-child(1)  { height: 30%; animation-delay: -0.1s; }
.sound-wave .bar:nth-child(2)  { height: 50%; animation-delay: -0.2s; }
.sound-wave .bar:nth-child(3)  { height: 70%; animation-delay: -0.3s; }
.sound-wave .bar:nth-child(4)  { height: 90%; animation-delay: -0.4s; }
.sound-wave .bar:nth-child(5)  { height: 100%; animation-delay: -0.5s; }
.sound-wave .bar:nth-child(6)  { height: 85%; animation-delay: -0.6s; }
.sound-wave .bar:nth-child(7)  { height: 70%; animation-delay: -0.7s; }
.sound-wave .bar:nth-child(8)  { height: 55%; animation-delay: -0.8s; }
.sound-wave .bar:nth-child(9)  { height: 75%; animation-delay: -0.9s; }
.sound-wave .bar:nth-child(10) { height: 95%; animation-delay: -1.0s; }
.sound-wave .bar:nth-child(11) { height: 80%; animation-delay: -1.1s; }
.sound-wave .bar:nth-child(12) { height: 60%; animation-delay: -1.2s; }
.sound-wave .bar:nth-child(13) { height: 40%; animation-delay: -1.3s; }
.sound-wave .bar:nth-child(14) { height: 65%; animation-delay: -1.4s; }
.sound-wave .bar:nth-child(15) { height: 85%; animation-delay: -1.5s; }
.sound-wave .bar:nth-child(n+16) { display: none; }
.sound-wave-reflection { display: none !important; }
@keyframes heroBar {
  0%, 100% { transform: scaleY(0.6); opacity: 0.6; }
  50%      { transform: scaleY(1.0); opacity: 1; }
}

.hero-cta {
  display: flex !important;
  gap: 12px !important;
  justify-content: center !important;
  flex-wrap: wrap;
}

/* Section-level styling — unified */
section.how-it-works,
section.subjects-section,
section.cta-section {
  background: #12100D !important;
  padding: 100px 24px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
}
section.how-it-works h2,
section.subjects-section h2,
section.cta-section h2 {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: clamp(1.875rem, 3.5vw, 3rem) !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: #FFFFFF !important;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-align: center;
  text-wrap: balance;
  margin-bottom: 16px;
}
.section-label {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.45) !important;
  display: block;
  text-align: center;
  margin-bottom: 16px;
}
.steps-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
  max-width: 1080px;
  margin: 56px auto 0 !important;
}
.step-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 20px !important;
  padding: 32px !important;
  text-align: left !important;
  position: relative;
  overflow: hidden;
}
.step-card::before { display: none !important; }
.step-number {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  color: rgba(255, 255, 255, 0.3) !important;
  letter-spacing: 0.1em !important;
  display: block;
  margin-bottom: 12px;
}
.step-icon {
  width: 44px !important;
  height: 44px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C8102E !important;
  margin-bottom: 18px;
  box-shadow: none !important;
}
.step-icon svg { width: 22px; height: 22px; }
.step-card h3 {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 1.125rem !important;
  color: #FFFFFF !important;
  letter-spacing: -0.02em;
  margin-bottom: 8px !important;
  line-height: 1.2;
}
.step-card p {
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.55) !important;
  line-height: 1.5;
}

.subjects-inner { max-width: 1080px; margin: 0 auto; }
.subjects-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 12px !important;
  margin-top: 48px !important;
}
.subject-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  transition: transform 200ms var(--ease-out), border-color 200ms ease !important;
}
.subject-card:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 16, 46, 0.25) !important;
  box-shadow: none !important;
}
.subject-card .subject-icon {
  width: 40px !important;
  height: 40px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #C8102E !important;
  border-radius: 10px !important;
  margin-bottom: 14px;
}
.subject-card h4 {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  color: #FFFFFF !important;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 6px;
}
.subject-count {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  color: rgba(255, 255, 255, 0.4) !important;
  letter-spacing: 0.05em;
}

.cta-section { text-align: center; }
.cta-inner { max-width: 720px; margin: 0 auto; }
.cta-section p {
  font-size: 16px !important;
  color: rgba(255, 255, 255, 0.55) !important;
  margin: 12px 0 32px !important;
}
.landing-footer {
  background: #12100D !important;
  border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
  padding: 40px 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.footer-text {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  color: rgba(255, 255, 255, 0.35) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .hero { padding-top: 100px !important; padding-bottom: 60px !important; }
  .steps-grid { grid-template-columns: 1fr !important; }
  .subjects-grid { grid-template-columns: 1fr 1fr !important; }
  section.how-it-works, section.subjects-section, section.cta-section { padding: 60px 20px !important; }
  .landing-footer { padding: 24px 20px !important; }
}

/* Cursor-parallax glow УБРАН: размытые пятна — AI-slop, архив живёт на плоской бумаге */
.hero::after { content: none !important; }

/* Landing hero — big */
.hero h1 {
  font-size: clamp(2.75rem, 11vw, 7.5rem) !important;
}

/* Platform internal hero — moderate (not full-page) */
.hero-section .hero-title {
  font-size: clamp(1.5rem, 4vw, 3rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  line-height: 1.05 !important;
  background: linear-gradient(135deg, #C8102E 0%, #C8102E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
  margin-bottom: 8px;
}

/* Platform hero section — keep it clear of the sticky header on mobile */
@media (max-width: 768px) {
  .hero-section {
    margin-top: 16px;
    padding: 24px 20px !important;
    border-radius: 16px;
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .hero-section .hero-icon { display: none; }
  .hero-section .hero-content { width: 100%; }
  .hero-section .hero-title { font-size: 1.5rem !important; }
  .hero-section .hero-actions { margin-top: 16px; }
  /* Push main content below sticky header */
  .content { padding-top: 8px; }
}
.hero-section .hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.125rem);
  color: var(--color-text-secondary) !important;
}
.hero-section .hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-primary);
}

.hero h1 .accent,
.hero h1 span.accent {
  background: linear-gradient(135deg, #C8102E 0%, #C8102E 60%, #2E4B6B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(200, 16, 46, 0.25));
}

.hero-badge {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* ============================================================
   6. NEW: era-coloured track cards (the big visual move)
   ============================================================ */
.track-card, .onboarding-card, .subject-card {
  position: relative;
  overflow: hidden;
}

/* Default neutral card (fallback) */
.track-card::before, .onboarding-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(200, 16, 46, 0.10), rgba(200, 16, 46, 0.05));
  z-index: 0;
  transition: opacity 240ms ease;
}

.track-card > *, .onboarding-card > * { position: relative; z-index: 1; }

/* АРХИВНЫЕ ДЕЛА: единый тёмный картон + корешок цвета эпохи слева.
   12 эпох = 12 корешков; никаких градиентов. */
.track-card[data-era], .row-card[data-era] {
  background: #201C17 !important;                       /* архивный картон */
  border-left: 6px solid var(--era-spine, #C8102E) !important;
}
.track-card[data-era="ancient"],   .row-card[data-era="ancient"]   { --era-spine: #A67C3B; } /* охра */
.track-card[data-era="medieval"],  .row-card[data-era="medieval"]  { --era-spine: #8C8377; } /* камень */
.track-card[data-era="imperial"],  .row-card[data-era="imperial"]  { --era-spine: #2E4B6B; } /* мундир */
.track-card[data-era="war19c"],    .row-card[data-era="war19c"]    { --era-spine: #6E2B2B; } /* багровый */
.track-card[data-era="reform19c"], .row-card[data-era="reform19c"] { --era-spine: #3E5C46; } /* зелёное сукно */
.track-card[data-era="revolt"],    .row-card[data-era="revolt"]    { --era-spine: #D24A2E; } /* пламя */
.track-card[data-era="soviet"],    .row-card[data-era="soviet"]    { --era-spine: #C8102E; } /* киноварь */
.track-card[data-era="wwii"],      .row-card[data-era="wwii"]      { --era-spine: #5B5B4F; } /* хаки */
.track-card[data-era="latesov"],   .row-card[data-era="latesov"]   { --era-spine: #A0522D; } /* кирпич */
.track-card[data-era="modern"],    .row-card[data-era="modern"]    { --era-spine: #46527A; } /* серо-синий */
.track-card[data-era="contemp"],   .row-card[data-era="contemp"]   { --era-spine: #2F6B62; } /* бирюза */
.track-card[data-era="culture"],   .row-card[data-era="culture"]   { --era-spine: #7A5A8C; } /* пурпур */

/* row-card: острые углы, плоская тень — коробка на полке */
.row-card {
  border-radius: 4px !important;
  border: 1px solid rgba(20, 18, 15, 0.18) !important;
  transition: transform 220ms var(--ease-out), border-color 220ms ease, box-shadow 220ms ease !important;
  overflow: hidden;
}
@media (hover: hover) {
  .row-card:hover {
    transform: translate(-2px, -2px);
    border-color: var(--ink);
    box-shadow: 4px 4px 0 0 var(--era-spine, var(--red)); /* конструктивистский сдвиг */
  }
}
.row-card:active { transform: scale(0.97); }

/* Inner cover on era cards: subtle dark wash so text/icon read */
.row-card[data-era]:not([data-cover-applied]) .row-card-cover {
  background: linear-gradient(160deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(255, 255, 255, 0.05) 100%) !important;
}
.row-card[data-era]:not([data-cover-applied]) .row-card-cover-icon {
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(8px);
}

/* When image cover is applied: just darken bottom for legibility, hide icon */
.row-card[data-cover-applied] .row-card-cover {
  /* background set inline by JS — image + gradient overlay */
  border-radius: 12px;
}
.row-card[data-cover-applied] .row-card-cover-icon { display: none; }

/* row-card title: 2 lines, breathable */
.row-card-title, .row-card-subtitle {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal !important;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Eras kill the default tinted pseudo + the inner subject-coloured cover */
.track-card[data-era]::before { display: none; }
.track-card[data-era]:not([data-cover-applied]) .track-cover {
  background: linear-gradient(160deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(255, 255, 255, 0.06) 100%) !important;
  border-radius: 12px !important;
}
.track-card[data-era]:not([data-cover-applied]) .track-cover-icon {
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(8px);
  border-radius: 12px;
}
.track-card[data-cover-applied] .track-cover { border-radius: 12px !important; }
.track-card[data-cover-applied] .track-cover-icon { display: none; }

/* Card structure polish — острые углы, плоский сдвиг */
.track-card {
  border-radius: 4px !important;
  padding: 16px !important;
  min-height: 180px !important;
  border: 1px solid rgba(20, 18, 15, 0.18) !important;
  transition: transform 240ms var(--ease-out),
              box-shadow 240ms ease,
              border-color 240ms ease !important;
}

@media (hover: hover) {
  .track-card:hover {
    transform: translate(-2px, -2px);
    border-color: var(--ink);
    box-shadow: 4px 4px 0 0 var(--era-spine, var(--red));
  }
}
.track-card:active { transform: scale(0.98); }

/* Track title: 2 lines, not cut off */
.track-card-title, .track-title, .card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal !important;
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Mono codifier badge inside card */
.track-card .track-codifier, .track-card [data-codifier] {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
}

/* Era-card icon — semi-transparent on coloured backdrop */
.track-card .track-icon,
.track-card .card-icon,
.track-card svg.icon {
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(8px);
  border-radius: 12px !important;
  color: var(--color-text-primary);
}

/* ============================================================
   7. NEW: "breathing" now-playing
   ============================================================ */
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
  50%      { box-shadow: 0 0 0 8px rgba(200, 16, 46, 0.18); }
}

@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(200, 16, 46, 0.4)); }
  50%      { filter: drop-shadow(0 0 24px rgba(200, 16, 46, 0.8)); }
}

.player.is-playing .now-playing-cover,
[data-playing="true"] {
  animation: breathe 2.4s ease-in-out infinite;
  border-radius: 12px;
}

.player.is-playing .play-button svg,
.player.is-playing .btn-play svg {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Track card currently playing — equaliser bars */
.track-card.is-playing {
  border-color: rgba(200, 16, 46, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(200, 16, 46, 0.5),
              0 0 40px rgba(200, 16, 46, 0.25) !important;
}

.track-card.is-playing::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 18px;
  background:
    linear-gradient(var(--color-accent-primary), var(--color-accent-primary)) 0   100% / 4px 40% no-repeat,
    linear-gradient(var(--color-accent-primary), var(--color-accent-primary)) 33% 100% / 4px 80% no-repeat,
    linear-gradient(var(--color-accent-primary), var(--color-accent-primary)) 66% 100% / 4px 60% no-repeat,
    linear-gradient(var(--color-accent-primary), var(--color-accent-primary)) 100% 100% / 4px 50% no-repeat;
  animation: eqBars 800ms ease-in-out infinite alternate;
}

@keyframes eqBars {
  from { background-size: 4px 40%, 4px 80%, 4px 60%, 4px 50%; }
  to   { background-size: 4px 90%, 4px 30%, 4px 100%, 4px 70%; }
}

/* ============================================================
   8. Player polish (mini-player chrome)
   ============================================================ */
.player {
  background: linear-gradient(180deg,
    rgba(11, 16, 32, 0.95) 0%,
    rgba(11, 16, 32, 0.98) 100%) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.progress-fill, .progress-bar-fill {
  background: linear-gradient(90deg,
    var(--color-accent-primary) 0%,
    #C8102E 60%,
    var(--color-accent-secondary) 100%) !important;
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.5);
}

.progress-thumb {
  background: var(--color-accent-primary) !important;
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.7);
}

.play-button, .btn-play, .player-play {
  min-width: 56px;
  min-height: 56px;
}

/* Equaliser next to track name in player */
.now-playing-title { font-weight: 600 !important; }

/* ============================================================
   9. Quiz peak-end (Duolingo-grade feedback)
   ============================================================ */
.quiz-option.correct {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: var(--color-success) !important;
  animation: peakBounce 480ms var(--ease-spring);
}
.quiz-option.incorrect {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: var(--color-error) !important;
  animation: errShake 300ms;
}

@keyframes peakBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes errShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

.quiz-final-score {
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 8rem);
  font-weight: 800;
  font-variation-settings: "opsz" 96;
  background: linear-gradient(135deg, #C8102E, #C8102E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
  letter-spacing: -0.04em;
}

/* ============================================================
   10. Landing CTA / subject grid polish
   ============================================================ */
/* Конструктивистская кнопка: плоская киноварь, острые углы, сдвиг-тень чернилами */
.btn-primary {
  background: var(--red) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border-radius: 2px !important;
  box-shadow: 4px 4px 0 0 var(--ink) !important;
  transition: transform 160ms var(--ease-out), box-shadow 160ms ease !important;
}
@media (hover: hover) {
  .btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 var(--ink) !important;
  }
}
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 0 var(--ink) !important; }

.subject-card {
  background: var(--color-bg-elevated) !important;
  border: 1px solid rgba(20, 18, 15, 0.2) !important;
  border-radius: 4px !important;
  transition: transform 240ms var(--ease-out), border-color 240ms ease, box-shadow 240ms ease !important;
}

@media (hover: hover) {
  .subject-card:hover {
    transform: translate(-2px, -2px);
    border-color: var(--ink);
    box-shadow: 4px 4px 0 0 var(--red);
  }
}

.subject-card .subject-icon {
  background: var(--red) !important;
  color: #FFFFFF !important;
  border-radius: 2px !important;
}

/* ============================================================
   11. Mobile-only adjustments
   ============================================================ */
@media (max-width: 480px) {
  .hero { padding-left: 16px; padding-right: 16px; padding-top: calc(96px + var(--sa-top)); }
  .hero h1 { font-size: clamp(2.5rem, 14vw, 4.5rem) !important; }
  .hero-subtitle { font-size: 1rem; }
  .hero-cta { flex-direction: column; gap: 12px; width: 100%; }
  .hero-cta a, .hero-cta button { width: 100%; justify-content: center; }
  .subjects-grid { grid-template-columns: 1fr !important; }
  .features-grid { grid-template-columns: 1fr !important; }
  .tracks-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

  /* Install button: don't crash with FAB */
  #pwaInstall {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    bottom: max(88px, calc(88px + var(--sa-bottom))) !important;
  }
}

/* ============================================================
   12. Onboarding card icon
   ============================================================ */
.onboarding-card-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(4px);
}
.onboarding-card-icon svg { width: 28px; height: 28px; fill: var(--color-text-primary); }

/* ============================================================
   13. Sidebar (platform) — sharper hierarchy
   ============================================================ */
.sidebar {
  background: linear-gradient(180deg,
    rgba(11, 16, 32, 0.98) 0%,
    rgba(15, 20, 40, 0.98) 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.sidebar .nav-item {
  border-radius: 8px;
  transition: background 160ms ease, color 160ms ease;
}
.sidebar .nav-item.active {
  background: rgba(200, 16, 46, 0.12) !important;
  color: var(--color-accent-primary) !important;
  box-shadow: inset 3px 0 0 var(--color-accent-primary);
}

/* ============================================================
   14. Feedback FAB — on-brand (was generic purple)
   ============================================================ */
#feedbackFab {
  background: linear-gradient(135deg, #2E4B6B, #C8102E) !important;
  box-shadow: 0 8px 24px rgba(46, 75, 107, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* ============================================================
   15. Reduced motion + focus
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   22. PRODUCT LAYER — «Сегодня» ribbon, progress, next preview
   ============================================================ */

/* ---------- Daily Ribbon (top of home) ---------- */
.daily-ribbon {
  margin: 4px 0 24px;
  padding: 24px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(200, 16, 46, 0.08), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(200, 16, 46, 0.06), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: ribbonEnter 480ms var(--ease-out);
}
@keyframes ribbonEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.daily-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.daily-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.daily-day-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  color: #FFFFFF;
  letter-spacing: -0.025em;
}
.daily-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
}

.daily-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  transition: color 200ms ease, background 200ms ease, border-color 200ms ease;
}
.daily-streak.is-active {
  color: #C8102E;
  background: rgba(200, 16, 46, 0.10);
  border-color: rgba(200, 16, 46, 0.25);
  animation: streakPulse 2.4s ease-in-out infinite;
}
@keyframes streakPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(200, 16, 46, 0.08); }
}

/* Goal progress bar */
.daily-goal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.daily-goal-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}
.daily-goal-text strong { color: #FFFFFF; }
.daily-goal[data-done="true"] .daily-goal-text strong { color: #10B981; }
.daily-goal-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.daily-goal-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), #FFFFFF);
  border-radius: 999px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.daily-goal[data-done="true"] .daily-goal-fill {
  background: linear-gradient(90deg, #10B981, #34D399);
}

/* 3 action cards */
.daily-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.daily-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), background 200ms ease, border-color 200ms ease;
  color: inherit;
  font-family: inherit;
}
.daily-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.daily-card:active { transform: scale(0.98); }

.daily-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFFFFF;
}
.daily-card-icon svg { width: 20px; height: 20px; }

.daily-card-chain .daily-card-icon {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.2), rgba(200, 16, 46, 0.06));
  color: #C8102E;
}
.daily-card-weak .daily-card-icon {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.2), rgba(200, 16, 46, 0.06));
  color: #C8102E;
}
.daily-card-random .daily-card-icon {
  background: linear-gradient(135deg, rgba(46, 75, 107, 0.2), rgba(46, 75, 107, 0.06));
  color: #A78BFA;
}

.daily-card-body { min-width: 0; }
.daily-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: #FFFFFF;
  letter-spacing: -0.015em;
}
.daily-card-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footer line — countdown + forecast */
.daily-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}
.daily-foot strong {
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  font-feature-settings: 'tnum';
  vertical-align: middle;
  margin: 0 4px;
}
.daily-countdown-days {
  background: linear-gradient(135deg, #C8102E, #C8102E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Mobile ribbon */
@media (max-width: 768px) {
  .daily-ribbon {
    padding: 18px 16px;
    border-radius: 16px;
    gap: 14px;
    margin: 8px 0 20px;
  }
  .daily-cards { grid-template-columns: 1fr; gap: 8px; }
  .daily-card { padding: 14px; }
  .daily-day-label { font-size: 1.5rem; }
  .daily-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- Progress View (thermometers + score) ---------- */
.progress-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.progress-header h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  color: #FFFFFF;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 4px;
}
.progress-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.progress-forecast-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  padding: 28px;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(200, 16, 46, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  align-items: center;
}
.progress-forecast-side { display: flex; flex-direction: column; gap: 6px; }
.progress-forecast-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.progress-forecast-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 9vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #C8102E, #C8102E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.progress-forecast-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 220px;
}
.progress-forecast-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.progress-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}
.progress-stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.progress-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.progress-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.thermometers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.thermometer {
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 200ms ease, border-color 200ms ease;
}
.thermometer:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.10); }

.thermometer-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}
.thermometer-code {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}
.thermometer-title {
  font-weight: 600;
  font-size: 14px;
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thermometer-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
  line-height: 1;
}

.thermometer-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.thermometer-fill {
  height: 100%;
  width: var(--fill, 0);
  background: linear-gradient(90deg, #C8102E 0%, #C8102E 100%);
  border-radius: 999px;
  animation: barFill 800ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(200, 16, 46, 0.3);
}
@keyframes barFill {
  from { width: 0; }
  to   { width: var(--fill, 0); }
}

.thermometer-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
}

/* Weak topics list */
.weak-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.weak-empty {
  padding: 28px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.weak-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease;
}
.weak-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
.weak-cover {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.04);
}
.weak-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.4);
}
.weak-title {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.weak-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}
.weak-play {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.5);
}
.weak-item:hover .weak-play { color: #FFFFFF; }

@media (max-width: 768px) {
  .progress-wrap { padding: 16px 16px 96px; gap: 18px; }
  .progress-forecast-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }
  .progress-forecast-stats { gap: 10px; }
  .progress-stat { padding-left: 12px; }
  .progress-stat-num { font-size: 1.25rem; }
  .thermometer-head { grid-template-columns: auto 1fr; }
  .thermometer-score { grid-column: 2; justify-self: end; }
}

/* ---------- Next-track preview in mini-player ---------- */
.next-preview {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px 6px 12px;
  background: rgba(5, 6, 8, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(72vw, 460px);
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), background 160ms ease;
  z-index: 10;
}
.next-preview:hover {
  transform: translateX(-50%) translateY(-2px);
  background: rgba(15, 17, 23, 0.96);
}
.next-preview-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}
.next-preview-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .next-preview {
    bottom: calc(100% - 8px);
    max-width: 76vw;
    padding: 5px 12px 5px 10px;
  }
  .next-preview-title { font-size: 11px; }
}

/* ============================================================
   16. PWA standalone — extra padding, hide install button
   ============================================================ */
@media (display-mode: standalone) {
  #pwaInstall { display: none !important; }
  body { padding-top: var(--sa-top); }
}

/* ============================================================
   22a. Kill the legacy «Что изучаешь?» onboarding — diagnostic replaces it
   ============================================================ */
.onboarding { display: none !important; }

/* ============================================================
   23. DIAGNOSTIC ONBOARDING OVERLAY
   ============================================================ */
.diag-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(200, 16, 46, 0.10), transparent 60%),
    rgba(5, 6, 8, 0.92);
  backdrop-filter: blur(40px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: diagFadeIn 320ms var(--ease-out);
}
.diag-overlay.is-closing { animation: diagFadeOut 320ms var(--ease-out) forwards; }
@keyframes diagFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes diagFadeOut { to { opacity: 0; transform: scale(0.98) } }

.diag-modal {
  width: 100%;
  max-width: 540px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.diag-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.diag-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #C8102E, #C8102E);
  border-radius: 999px;
  transition: width 320ms var(--ease-out);
}
.diag-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}
.diag-question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #FFFFFF;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.diag-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid rgba(200, 16, 46, 0.5);
  border-radius: 4px;
}
.diag-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diag-btn {
  padding: 16px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background 160ms ease, border-color 160ms ease;
}
.diag-btn:active { transform: scale(0.97); }
.diag-yes {
  background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(16,185,129,0.06));
  border-color: rgba(16,185,129,0.4);
  color: #34D399;
}
.diag-yes:hover { background: linear-gradient(135deg, rgba(16,185,129,0.28), rgba(16,185,129,0.10)); }
.diag-no {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
}
.diag-no:hover { background: rgba(255, 255, 255, 0.08); }
.diag-skip {
  align-self: center;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 6px 12px;
}
.diag-skip:hover { color: rgba(255, 255, 255, 0.7); }

/* ============================================================
   24. SKELETONS (loading state for ribbon + cards)
   ============================================================ */
.tracks-grid:empty::before,
.track-row:empty::before {
  content: '';
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  width: 100%;
  height: 200px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 0 160px,
    transparent 160px 172px,
    rgba(255,255,255,0.04) 172px 332px,
    transparent 332px 344px,
    rgba(255,255,255,0.04) 344px 504px
  );
  border-radius: 12px;
  animation: skShimmer 1.4s infinite;
  background-size: 200% 100%;
}

.weak-empty,
.tracks-grid:empty::after {
  /* common empty messaging — used by .weak-empty already */
}

.ribbon-skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sk-row, .sk-card {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: skShimmer 1.4s infinite;
  border-radius: 8px;
}
.sk-row { height: 18px; width: 60%; }
.sk-row:nth-child(2) { width: 40%; }
.sk-row-bar { height: 3px; width: 100%; }
.sk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sk-card { height: 68px; border-radius: 14px; }
@keyframes skShimmer {
  from { background-position: 200% 0 }
  to   { background-position: -200% 0 }
}
@media (max-width: 768px) {
  .sk-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   25. NEW DAILY CARD: MISTAKES (per redesign)
   ============================================================ */
.daily-card-mistakes .daily-card-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(16, 185, 129, 0.06));
  color: #34D399;
}

/* ============================================================
   25b. VOICE QUIZ OVERLAY (hands-free, after track ends)
   ============================================================ */
.voice-quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 6, 8, 0.96);
  backdrop-filter: blur(32px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: diagFadeIn 280ms var(--ease-out);
}
.vq-card {
  width: 100%;
  max-width: 500px;
  padding: 36px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: border-color 280ms ease, background 280ms ease;
}
.vq-card.is-correct {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(180deg, rgba(16,185,129,0.08), rgba(16,185,129,0.02));
}
.vq-card.is-wrong {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(180deg, rgba(239,68,68,0.08), rgba(239,68,68,0.02));
}
.vq-mic {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C8102E;
}
.vq-mic.is-speaking {
  animation: vqPulse 1.4s ease-in-out infinite;
}
@keyframes vqPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
  50%      { box-shadow: 0 0 0 16px rgba(200, 16, 46, 0.10); }
}
.vq-mic svg { width: 32px; height: 32px; }
.vq-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.vq-question {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  color: #FFFFFF;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.vq-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.04em;
}
.vq-actions { width: 100%; }
.vq-skip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 20px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.vq-skip:hover { background: rgba(255, 255, 255, 0.04); color: #FFFFFF; }

/* ============================================================
   25c. PUSH PROMPT TOAST
   ============================================================ */
.push-prompt {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(var(--sa-bottom) + 80px));
  transform: translateX(-50%);
  z-index: 9000;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(5, 6, 8, 0.96);
  backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  max-width: 420px;
  width: calc(100% - 32px);
  animation: pushToastIn 360ms var(--ease-spring);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
@keyframes pushToastIn {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.push-prompt-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.push-prompt-icon { font-size: 28px; line-height: 1; }
.push-prompt-text { display: flex; flex-direction: column; gap: 2px; }
.push-prompt-text strong { color: #FFFFFF; font-size: 14px; font-weight: 600; }
.push-prompt-text span { color: rgba(255, 255, 255, 0.55); font-size: 12px; }
.push-prompt-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}
.push-prompt-allow {
  background: #FFFFFF;
  color: #12100D;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
}
.push-prompt-allow:hover { background: rgba(255, 255, 255, 0.9); }
.push-prompt-dismiss {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
}
.push-prompt-dismiss:hover { background: rgba(255, 255, 255, 0.04); color: #FFFFFF; }

/* ============================================================
   26. CACHE/DOWNLOAD BUTTON ON CARDS
   ============================================================ */
.card-download {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease, background 200ms ease;
  z-index: 2;
}
.row-card:hover .card-download,
.track-card:hover .card-download { opacity: 1; }
.card-download.is-cached {
  opacity: 1;
  background: rgba(16, 185, 129, 0.4);
  border-color: rgba(16, 185, 129, 0.6);
  color: #FFFFFF;
}
.card-download svg { width: 14px; height: 14px; }

/* ============================================================
   17. NOW PLAYING — full-screen immersive view
   2026 design language: monochrome, restrained, one accent.
   No rainbow gradients. Apple Music / Tidal grade.
   ============================================================ */

.expanded-player {
  background: #12100D !important;             /* near-black, not slate */
  overflow: hidden !important;
}

/* Single subtle radial glow tinted by era; rest is true dark */
.expanded-player::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 30% 0%, var(--era-tint, rgba(200, 16, 46, 0.12)), transparent 70%),
    #12100D;
  z-index: 0;
  pointer-events: none;
}
/* Film grain — minimal, just to kill banding */
.expanded-player::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Эпоха → tint зала + solid обложки. Та же палитра, что корешки дел (см. секцию 6). */
.expanded-player[data-era="ancient"]   { --era-tint: rgba(166, 124, 59, 0.20); --era-solid: #A67C3B; }
.expanded-player[data-era="medieval"]  { --era-tint: rgba(140, 131, 119, 0.16); --era-solid: #6B6258; }
.expanded-player[data-era="imperial"]  { --era-tint: rgba(46, 75, 107, 0.22);  --era-solid: #2E4B6B; }
.expanded-player[data-era="war19c"]    { --era-tint: rgba(110, 43, 43, 0.22);  --era-solid: #6E2B2B; }
.expanded-player[data-era="reform19c"] { --era-tint: rgba(62, 92, 70, 0.20);   --era-solid: #3E5C46; }
.expanded-player[data-era="revolt"]    { --era-tint: rgba(210, 74, 46, 0.20);  --era-solid: #D24A2E; }
.expanded-player[data-era="soviet"]    { --era-tint: rgba(200, 16, 46, 0.22);  --era-solid: #C8102E; }
.expanded-player[data-era="wwii"]      { --era-tint: rgba(91, 91, 79, 0.20);   --era-solid: #5B5B4F; }
.expanded-player[data-era="latesov"]   { --era-tint: rgba(160, 82, 45, 0.20);  --era-solid: #A0522D; }
.expanded-player[data-era="modern"]    { --era-tint: rgba(70, 82, 122, 0.22);  --era-solid: #46527A; }
.expanded-player[data-era="contemp"]   { --era-tint: rgba(47, 107, 98, 0.20);  --era-solid: #2F6B62; }
.expanded-player[data-era="culture"]   { --era-tint: rgba(122, 90, 140, 0.20); --era-solid: #7A5A8C; }

/* Header — minimal, codifier badge style */
.expanded-player-header {
  position: relative;
  z-index: 2;
  padding: max(24px, var(--sa-top) + 16px) 32px 16px !important;
}
.expanded-player-header > span {
  font-family: var(--font-mono) !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  color: var(--color-text-secondary) !important;
}
.expanded-player-header > span::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
  margin-right: 8px;
  vertical-align: middle;
  animation: nowPlayingDot 1.6s ease-in-out infinite;
}
@keyframes nowPlayingDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.8); }
}

.expanded-player-close {
  width: 44px !important;
  height: 44px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #FFFFFF !important; /* иначе наследует чернильный и тонет в чёрном */
}

.expanded-player-body {
  position: relative;
  z-index: 2;
  padding: 0 32px !important;
  display: grid !important;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: start;
}

.expanded-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
}

.expanded-media { margin: 0 !important; }

.expanded-cover {
  width: 380px !important;
  height: 380px !important;
  border-radius: 16px !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  position: relative;
  overflow: hidden !important;
}

/* Era cover: solid era colour + soft top-left light, no rainbow */
.expanded-player[data-era] .expanded-cover {
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.10), transparent 50%),
    radial-gradient(circle at 75% 80%, rgba(0, 0, 0, 0.35), transparent 60%),
    var(--era-solid, #1F2937) !important;
}

/* Cyrillic glyph cover — restrained, single colour, no shadow noise */
.expanded-cover[data-glyph]::before {
  content: attr(data-glyph);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  font-size: 240px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.05em;
}

.expanded-cover svg { display: none; }   /* hide the placeholder note glyph */
.expanded-cover .expanded-cover-gradient {
  background: transparent !important;   /* let era gradient on parent show through */
}
.expanded-cover .expanded-cover-gradient svg { display: none !important; }

/* Track meta below cover — clean, white, no gradient text */
.expanded-track-info {
  text-align: left !important;
  margin: 0 !important;
}
.expanded-track-title {
  font-family: var(--font-display);
  font-weight: 700 !important;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem) !important;
  letter-spacing: -0.02em;
  line-height: 1.15 !important;
  color: #FFFFFF !important;
  margin-bottom: 6px !important;
  text-wrap: balance;
}
.expanded-track-artist {
  font-family: var(--font-body);
  font-size: 14px !important;
  font-weight: 500;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Codifier code badge above title */
.expanded-track-info[data-codifier]::before {
  content: attr(data-codifier);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Right column — video area sits above lyrics */
.expanded-right {
  height: calc(100vh - 280px);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Video area: always visible, 16:9, fills with real video/youtube if available */
.expanded-video-area {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  background: #0A0B0E;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.expanded-video-area > video,
.expanded-video-area > iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.expanded-video-area[data-empty="true"] {
  background:
    radial-gradient(circle at 50% 50%, var(--era-tint, rgba(200, 16, 46, 0.10)), transparent 70%),
    linear-gradient(180deg, #0A0B0E, #12100D);
}
.expanded-video-area[data-empty="true"]::before {
  content: '';
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  position: absolute;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='rgba(255,255,255,0.7)'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px;
}
.expanded-video-area[data-empty="true"]::after {
  content: 'Видео скоро';
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.expanded-lyrics {
  flex: 1 !important;
  padding: 40px 0 !important;
  scroll-behavior: smooth;
  mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%) !important;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%) !important;
}

.expanded-lyrics-inner {
  max-width: none !important;
  padding-bottom: 50vh;
  padding-top: 30vh;
}

/* THE lyric line — Apple Music style: monochrome, big, only opacity defines state */
.lyrics-line {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem) !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
  padding: 10px 0 !important;
  color: rgba(255, 255, 255, 0.35) !important;
  transition: color 240ms ease, opacity 240ms ease !important;
  font-variation-settings: "opsz" 48;
  text-wrap: balance;
  cursor: pointer;
}

.lyrics-line.is-active {
  color: #FFFFFF !important;
}

.lyrics-line.is-past {
  color: rgba(255, 255, 255, 0.18) !important;
}

.lyrics-line.section-label {
  font-family: var(--font-mono) !important;
  font-weight: 500 !important;
  font-size: 11px !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.45) !important;
  padding: 28px 0 4px !important;
  opacity: 1 !important;
  transform: none !important;
  cursor: default;
}

/* Empty state */
.expanded-lyrics-empty {
  font-family: var(--font-display);
  font-size: 1.5rem !important;
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
  padding: 80px 0 !important;
}
.expanded-lyrics-empty::before {
  content: '🎵';
  display: block;
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Bottom controls — premium feel */
.expanded-controls {
  position: relative;
  z-index: 2;
  padding: 24px 32px max(32px, calc(var(--sa-bottom) + 24px)) !important;
  background: linear-gradient(180deg, transparent 0%, rgba(14, 12, 10, 0.6) 30%, rgba(14, 12, 10, 0.9) 100%);
  backdrop-filter: blur(20px);
}

.expanded-progress {
  height: 4px !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border-radius: 999px !important;
  position: relative;
  cursor: pointer;
  transition: height 160ms ease;
}
.expanded-progress:hover { height: 6px !important; }
.expanded-progress-fill {
  background: var(--red) !important; /* красная игла архива */
  border-radius: 0 !important;
  position: relative;
}
.expanded-progress-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 14px;         /* игла-каретка вместо кружка */
  background: var(--red);
  border-radius: 0;
  opacity: 1;
  transition: opacity 160ms ease;
}
.expanded-progress:hover .expanded-progress-fill::after { opacity: 1; }

.expanded-control-buttons {
  gap: 24px !important;
}

.expanded-control-btn {
  width: 48px !important;
  height: 48px !important;
  /* WHY жёстко белый: токен text-primary — чернильный, на тёмном зале он невидим (баг «чёрные кнопки») */
  color: #FFFFFF !important;
  opacity: 0.85;
}
.expanded-control-btn:hover { opacity: 1; }
.expanded-control-btn svg { width: 28px !important; height: 28px !important; }

.expanded-control-btn.play-btn {
  width: 64px !important;
  height: 64px !important;
  background: #FFFFFF !important;
  color: #12100D !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transition: transform 160ms var(--ease-out) !important;
}
.expanded-control-btn.play-btn:hover { transform: scale(1.06); }
.expanded-control-btn.play-btn svg { width: 30px !important; height: 30px !important; }

.expanded-control-btn.exp-shuffle,
.expanded-control-btn.exp-repeat {
  width: 40px !important;
  height: 40px !important;
  opacity: 0.65;
}
.expanded-control-btn.exp-shuffle svg,
.expanded-control-btn.exp-repeat svg { width: 20px !important; height: 20px !important; }
.expanded-control-btn.exp-shuffle.is-active,
.expanded-control-btn.exp-repeat.is-active {
  color: var(--color-accent-primary) !important;
  opacity: 1;
}

/* Like (heart) — sits next to title, ghost outline */
.exp-like {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}
.exp-like:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.exp-like.is-liked {
  background: rgba(200, 16, 46, 0.12);
  border-color: rgba(200, 16, 46, 0.5);
  color: #C8102E;
}
.exp-like svg { width: 18px; height: 18px; }

.expanded-left {
  display: flex !important;
  align-items: center;
}
.expanded-track-info { flex: 1; min-width: 0; }

.expanded-time {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.05em;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.55) !important; /* тёмный зал — светлый тайминг */
}

/* ------------- Mobile layout (≤768px) -------------
   Single column. Height-constrained flex so lyrics scroll inside their
   own slot — cover/title/video never get pushed off-screen. */
@media (max-width: 768px) {
  .expanded-player-header {
    padding: max(18px, var(--sa-top) + 14px) 16px 10px !important;
    flex-shrink: 0;
  }
  .expanded-player-body {
    /* WHY minmax(0,1fr): 1fr = minmax(auto,1fr) и не сжимается ниже min-content
       ряда .expanded-left — колонка вырастала до 435-470px при 390px экрана:
       название в 2 буквы, «Поделиться» за краем, лирика клипалась */
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto 1fr !important;   /* title row + content row */
    gap: 8px !important;
    padding: 0 16px !important;
    overflow: hidden !important;
    min-height: 0;
  }
  .expanded-left { flex-wrap: wrap !important; min-width: 0; }
  .expanded-actions { flex-wrap: wrap !important; }

  /* Compact title row — cover small, title 2 lines */
  .expanded-left {
    position: static !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0;
  }
  .expanded-cover {
    width: 56px !important;
    height: 56px !important;
    flex-shrink: 0;
    border-radius: 10px !important;
  }
  .expanded-cover[data-glyph]::before { font-size: 36px !important; }

  .expanded-track-info { flex: 1; min-width: 0; }
  .expanded-track-info[data-codifier]::before {
    margin-bottom: 4px;
    font-size: 9px !important;
    padding: 2px 6px !important;
  }
  .expanded-track-title {
    font-size: 1rem !important;
    line-height: 1.2 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .expanded-track-artist {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.45) !important;
  }

  /* Right column: video at top, lyrics fill remaining + scroll independently */
  .expanded-right {
    display: flex !important;
    flex-direction: column;
    gap: 12px !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .expanded-video-area {
    max-height: 160px !important;
    flex-shrink: 0;
    border-radius: 10px !important;
  }
  .expanded-video-area[data-empty="true"] {
    max-height: 0 !important;        /* hide entirely when no video — gives lyrics more room */
    border: none !important;
    margin: 0 !important;
  }
  .expanded-lyrics {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 12px 0 !important;
  }
  .expanded-lyrics-inner {
    padding-top: 30% !important;
    padding-bottom: 40% !important;
    max-width: none !important;
  }
  .lyrics-line {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
    padding: 8px 0 !important;
  }
  .lyrics-line.section-label {
    font-size: 10px !important;
    padding: 16px 0 4px !important;
  }

  /* Controls — generous tap targets, time line on its own row */
  .expanded-controls {
    padding: 12px 16px max(16px, calc(var(--sa-bottom) + 14px)) !important;
    flex-shrink: 0;
  }
  .expanded-progress { height: 4px !important; margin-bottom: 8px !important; }
  .expanded-time { margin-top: 4px !important; font-size: 11px !important; }
  .expanded-control-buttons {
    gap: 14px !important;
    margin-top: 10px !important;
    justify-content: space-evenly !important;
  }
  .expanded-control-btn { width: 48px !important; height: 48px !important; }
  .expanded-control-btn.play-btn { width: 60px !important; height: 60px !important; }
  .expanded-control-btn svg { width: 22px !important; height: 22px !important; }
  .expanded-control-btn.play-btn svg { width: 26px !important; height: 26px !important; }

  /* End-of-lyrics CTA — compact on mobile */
  .lyrics-end-cta { padding: 20px !important; margin-top: 32px !important; }
  .lyrics-end-cta-title { font-size: 1.125rem !important; }
}

/* Hide chrome that competes with full-screen now-playing */
body:has(.expanded-player.open) #feedbackFab,
body:has(.expanded-player.open) #pwaInstall,
body:has(.expanded-player.open) .mobile-tab-bar { display: none !important; }

/* ============================================================
   18. Header — 2026 minimal, native feel
   ============================================================ */
.header {
  padding: 14px 24px !important;
  gap: 16px !important;
  background: rgba(5, 6, 8, 0.72) !important;
  backdrop-filter: blur(24px) saturate(140%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}

.header-nav { gap: 6px !important; }

.nav-btn {
  width: 36px !important;
  height: 36px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: rgba(255, 255, 255, 0.55) !important;
  transition: color 160ms ease, background 160ms ease !important;
}
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #FFFFFF !important;
}
.nav-btn:active { background: rgba(255, 255, 255, 0.10) !important; }
.nav-btn svg { width: 18px !important; height: 18px !important; stroke: currentColor; fill: currentColor; }

/* Search — Apple/Linear style */
.search-box { max-width: 480px !important; }
.search-input {
  padding: 10px 14px 10px 40px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-family: var(--font-body) !important;
  color: #FFFFFF !important;
  height: 38px;
}
.search-input::placeholder { color: rgba(255, 255, 255, 0.4) !important; }
.search-input:focus {
  background: rgba(255, 255, 255, 0.10) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
}
.search-icon {
  left: 12px !important;
  color: rgba(255, 255, 255, 0.5) !important;
}
.search-icon svg { width: 16px !important; height: 16px !important; }

/* Auth buttons — calmer */
.auth-prompt { gap: 8px !important; }
.auth-prompt-btn {
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  height: 36px;
}
.auth-prompt-btn.login {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}
.auth-prompt-btn.login:hover {
  border-color: rgba(255, 255, 255, 0.20) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
.auth-prompt-btn.register {
  background: #FFFFFF !important;
  color: #12100D !important;
  border: none !important;
}
.auth-prompt-btn.register:hover {
  transform: none !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, 0.92) !important;
}

/* ============================================================
   19. Hero section — kill the 2005 boxed banner
   ============================================================ */
.hero-section {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 28px 0 12px !important;
  margin-bottom: 16px !important;
  max-height: none !important;
  overflow: visible !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hero-section::before { display: none !important; }
.hero-section .hero-icon {
  width: 44px !important;
  height: 44px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.hero-section .hero-icon::before { display: none !important; }
.hero-section .hero-title {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: clamp(1.5rem, 2.4vw, 2rem) !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: #FFFFFF !important;
  letter-spacing: -0.02em !important;
  line-height: 1.1 !important;
  margin-bottom: 4px !important;
}
.hero-section .hero-subtitle {
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.55) !important;
  margin: 0 !important;
}
.hero-section .hero-label {
  font-family: var(--font-mono);
  font-size: 11px !important;
  letter-spacing: 0.10em !important;
  color: rgba(255, 255, 255, 0.45) !important;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.hero-section .hero-meta {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 12px !important;
  margin-top: 8px;
}
.hero-section .hero-actions { margin-top: 14px !important; }
.hero-section .btn-play-big {
  background: #FFFFFF !important;
  color: #12100D !important;
  border-radius: 9999px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

@media (max-width: 768px) {
  .hero-section {
    margin-top: 4px !important;
    padding: 16px 4px 8px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  .hero-section .hero-icon { display: none !important; }
  .hero-section .hero-title { font-size: 1.375rem !important; }
}

/* ============================================================
   20. Horizontal rows — Spotify-style scroll-snap
   ============================================================ */
.track-row,
.row-cards-container,
.codifier-section-tracks {
  overflow-x: auto !important;
  scroll-snap-type: x proximity !important;
  scroll-padding-inline: 16px !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  padding-bottom: 6px;
}
.track-row::-webkit-scrollbar,
.row-cards-container::-webkit-scrollbar,
.codifier-section-tracks::-webkit-scrollbar { display: none !important; }
.row-card, .track-card { scroll-snap-align: start; }

/* Section header — cleaner with side arrows on desktop */
.row-header {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  padding: 28px 24px 12px !important;
}
.row-header .row-title {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: clamp(1.125rem, 1.6vw, 1.5rem) !important;
  color: #FFFFFF !important;
  letter-spacing: -0.02em;
  margin: 0 !important;
}
.row-header .row-link {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-weight: 500;
}
.row-header .row-link:hover { color: #FFFFFF !important; }

@media (max-width: 768px) {
  .row-header { padding: 20px 16px 10px !important; }
  .track-row, .row-cards-container { padding-left: 16px !important; padding-right: 16px !important; }
}

/* ============================================================
   21. Swipe-able expanded player (transform updated by JS)
   ============================================================ */
.expanded-player.is-dragging {
  transition: none !important;
}
.expanded-player img,
.expanded-player video {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
.expanded-player.is-dragging::before,
.expanded-player.is-dragging::after { transition: opacity 100ms linear !important; }

/* Tiny chevron hint at the top — "swipe down to close" affordance */
.expanded-player-header::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}
.expanded-player-header {
  position: relative;
  padding-top: max(28px, var(--sa-top) + 22px) !important;
}

/* Quiz CTA at end of lyrics — added by JS */
.lyrics-end-cta {
  margin-top: 60px;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(135deg,
    rgba(200, 16, 46, 0.12),
    rgba(200, 16, 46, 0.08));
  border: 1px solid rgba(200, 16, 46, 0.2);
  text-align: center;
}
.lyrics-end-cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 6px;
  color: var(--color-text-primary);
}
.lyrics-end-cta-text {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}
.lyrics-end-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #C8102E, #C8102E);
  color: #FFFFFF;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.35);
  transition: transform 200ms var(--ease-out);
}
.lyrics-end-cta-btn:hover { transform: translateY(-2px); }

/* ============================================================
   27. LIGHT THEME — comprehensive override of the whole app
   Now Playing stays dark for cinematic feel (separate exception below).
   ============================================================ */

html, body { background: var(--paper) !important; }

/* Inline platform.html uses dark backgrounds — flip them all to paper */
.app, .sidebar, .main, .header, .content,
.platform-header, .top-bar { background: var(--paper) !important; }

/* Header glass */
.header,
.landing-nav {
  background: rgba(242, 237, 227, 0.88) !important;
  border-bottom: 1px solid rgba(20, 18, 15, 0.12) !important;
  color: var(--ink) !important;
}
.header *, .landing-nav * { color: inherit !important; }
.landing-nav .logo,
.platform .logo { color: #0A0A0A !important; }

/* Sidebar — картотечный шкаф */
.sidebar {
  background: #ECE5D4 !important;
  border-right: 1px solid rgba(20, 18, 15, 0.14) !important;
  color: var(--ink) !important;
}
.sidebar .nav-item {
  color: rgba(20, 18, 15, 0.72) !important;
}
.sidebar .nav-item:hover {
  background: rgba(20, 18, 15, 0.05) !important;
  color: var(--ink) !important;
}
.sidebar .nav-item.active {
  background: rgba(200, 16, 46, 0.10) !important;
  color: var(--red) !important;
  box-shadow: inset 3px 0 0 var(--red) !important;
}
.sidebar .section-label {
  color: rgba(0, 0, 0, 0.4) !important;
}

/* Nav buttons (back/forward) */
.nav-btn {
  color: rgba(0, 0, 0, 0.5) !important;
}
.nav-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0A0A0A !important;
}

/* Search box */
.search-input {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #0A0A0A !important;
  border: 1px solid transparent !important;
}
.search-input::placeholder { color: rgba(0, 0, 0, 0.35) !important; }
.search-input:focus {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}
.search-icon { color: rgba(0, 0, 0, 0.4) !important; }

/* Auth buttons */
.auth-prompt-btn.login {
  background: transparent !important;
  border: 1px solid rgba(0, 0, 0, 0.10) !important;
  color: #0A0A0A !important;
}
.auth-prompt-btn.login:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.20) !important;
}
.auth-prompt-btn.register {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
}
.auth-prompt-btn.register:hover { background: #1F1F1F !important; }

/* Hero section (platform internal) */
.hero-section {
  background: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.hero-section .hero-title {
  background: none !important;
  -webkit-text-fill-color: initial !important;
  color: #0A0A0A !important;
}
.hero-section .hero-subtitle {
  color: rgba(0, 0, 0, 0.55) !important;
}
.hero-section .hero-label {
  color: rgba(0, 0, 0, 0.45) !important;
}
.hero-section .hero-meta {
  color: rgba(0, 0, 0, 0.5) !important;
}
.hero-section .hero-icon {
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.hero-section .btn-play-big {
  background: #0A0A0A !important;
  color: #FFFFFF !important;
}

/* Row headers */
.row-header .row-title { color: #0A0A0A !important; }
.row-header .row-link {
  color: rgba(0, 0, 0, 0.5) !important;
}
.row-header .row-link:hover { color: #0A0A0A !important; }

/* DAILY RIBBON — light card */
.daily-ribbon {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(200, 16, 46, 0.10), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(200, 16, 46, 0.06), transparent 50%),
    #F7F1E4 !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.daily-day-label { color: #0A0A0A !important; }
.daily-date { color: rgba(0, 0, 0, 0.5) !important; }
.daily-streak {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.55) !important;
}
.daily-streak.is-active {
  background: rgba(200, 16, 46, 0.15) !important;
  border-color: rgba(200, 16, 46, 0.45) !important;
  color: #C8102E !important;
}
.daily-goal-text { color: rgba(0, 0, 0, 0.7) !important; }
.daily-goal-text strong { color: #0A0A0A !important; }
.daily-goal-bar { background: rgba(0, 0, 0, 0.06) !important; }
.daily-goal-fill {
  background: linear-gradient(90deg, rgba(0,0,0,0.6), #0A0A0A) !important;
}
.daily-goal[data-done="true"] .daily-goal-fill {
  background: linear-gradient(90deg, #059669, #10B981) !important;
}

.daily-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.daily-card:hover {
  background: #FFFFFF !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.daily-card-title { color: #0A0A0A !important; }
.daily-card-sub { color: rgba(0, 0, 0, 0.5) !important; }
.daily-card-icon { background: rgba(0, 0, 0, 0.05) !important; color: #0A0A0A !important; }
.daily-card-chain .daily-card-icon {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.30), rgba(200, 16, 46, 0.10)) !important;
  color: #C8102E !important;
}
.daily-card-weak .daily-card-icon {
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.22), rgba(200, 16, 46, 0.06)) !important;
  color: #BE185D !important;
}
.daily-card-mistakes .daily-card-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(16, 185, 129, 0.06)) !important;
  color: #047857 !important;
}

.daily-foot {
  color: rgba(0, 0, 0, 0.5) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.daily-foot strong { color: #0A0A0A !important; }

/* PROGRESS view */
.progress-header h1 { color: #0A0A0A !important; }
.progress-header p { color: rgba(0, 0, 0, 0.55) !important; }

.progress-forecast-card {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(200, 16, 46, 0.12), transparent 60%),
    #F7F1E4 !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.progress-forecast-label { color: rgba(0, 0, 0, 0.5) !important; }
.progress-forecast-sub { color: rgba(0, 0, 0, 0.55) !important; }
.progress-stat { border-left-color: rgba(0, 0, 0, 0.08) !important; }
.progress-stat-num { color: #0A0A0A !important; }
.progress-stat-label { color: rgba(0, 0, 0, 0.5) !important; }
.progress-section-title { color: #0A0A0A !important; }

.thermometer {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.thermometer:hover {
  background: #F7F1E4 !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}
.thermometer-code {
  background: rgba(0, 0, 0, 0.05) !important;
  color: rgba(0, 0, 0, 0.65) !important;
}
.thermometer-title { color: #0A0A0A !important; }
.thermometer-score { color: #0A0A0A !important; }
.thermometer-bar { background: rgba(0, 0, 0, 0.06) !important; }
.thermometer-meta { color: rgba(0, 0, 0, 0.45) !important; }

.weak-item:hover {
  background: rgba(0, 0, 0, 0.03) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
.weak-cover-empty { color: rgba(0, 0, 0, 0.4) !important; }
.weak-title { color: #0A0A0A !important; }
.weak-sub { color: rgba(0, 0, 0, 0.5) !important; }
.weak-play { color: rgba(0, 0, 0, 0.45) !important; }
.weak-item:hover .weak-play { color: #0A0A0A !important; }
.weak-empty {
  background: rgba(0, 0, 0, 0.02) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: rgba(0, 0, 0, 0.5) !important;
}

/* Mini-player (bottom bar) */
.player {
  background: rgba(255, 255, 255, 0.92) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  color: #0A0A0A !important;
}
.player * { color: inherit !important; }
.now-playing-title { color: #0A0A0A !important; }
.now-playing-artist { color: rgba(0, 0, 0, 0.5) !important; }

/* Progress bar in mini-player — keep yellow/pink gradient, light track */
.progress-bar, .progress-container .progress-bar {
  background: rgba(0, 0, 0, 0.08) !important;
}
.progress-fill, .progress-bar-fill {
  background: linear-gradient(90deg, #C8102E 0%, #C8102E 100%) !important;
}

/* Mobile tab bar */
.mobile-tab-bar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}
.mobile-tab-bar .tab-bar-item {
  color: rgba(0, 0, 0, 0.5) !important;
}
.mobile-tab-bar .tab-bar-item.active {
  color: #0A0A0A !important;
}

/* Next-track preview pill — light */
.next-preview {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}
.next-preview-label { color: rgba(0, 0, 0, 0.4) !important; }
.next-preview-title { color: rgba(0, 0, 0, 0.85) !important; }

/* Tracks rows / cards (light) — when no era gradient applied */
.row-card:not([data-cover-applied]):not([data-era]),
.track-card:not([data-cover-applied]):not([data-era]) {
  background: #F7F1E4 !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}
.row-card-title, .track-card-title, .track-title, .row-card-subtitle {
  text-shadow: none !important;
}

/* When card has data-era but no cover, keep dark coloured backdrop for thematic feel
   but darken text overlay so legibility holds */
.row-card[data-era] .row-card-title,
.track-card[data-era] .track-title {
  color: #FFFFFF !important;
}

/* Onboarding card icons */
.onboarding-card-icon { background: rgba(0, 0, 0, 0.04) !important; }

/* Feedback FAB — keep gradient */
/* .push-prompt — already dark, keep for contrast */

/* Diagnostic overlay — keep on light wash, dark text */
.diag-overlay {
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(200, 16, 46, 0.08), transparent 60%),
    rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(40px) saturate(140%) !important;
}
.diag-modal {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.10);
}
.diag-label { color: rgba(0, 0, 0, 0.5) !important; }
.diag-question { color: #0A0A0A !important; }
.diag-hint {
  background: rgba(0, 0, 0, 0.03) !important;
  color: rgba(0, 0, 0, 0.6) !important;
  border-left-color: #C8102E !important;
}
.diag-progress { background: rgba(0, 0, 0, 0.06) !important; }
.diag-no {
  background: rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.10) !important;
  color: #0A0A0A !important;
}
.diag-no:hover { background: rgba(0, 0, 0, 0.08) !important; }
.diag-skip { color: rgba(0, 0, 0, 0.4) !important; }
.diag-skip:hover { color: rgba(0, 0, 0, 0.7) !important; }

/* Auth overlay (login/signup) */
.auth-overlay {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #0A0A0A !important;
}
.auth-box {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.10);
}
.auth-overlay * { color: inherit !important; }

/* Landing — ГОСУДАРСТВЕННЫЙ АРХИВ: бумага, чернила, красный клин */
.hero {
  background: var(--paper) !important;
}
.hero::before {
  /* конструктивистский клин: чернильная линейка + киноварный угол.
     width/height 100%: инлайновый стиль зажимает ::before в 500×500 */
  width: 100% !important;
  height: 100% !important;
  inset: 0 !important;
  transform: none !important;
  border-radius: 0 !important;
  filter: none !important;
  animation: none !important;
  background:
    linear-gradient(115deg,
      transparent 0 71%,
      rgba(20, 18, 15, 0.85) 71% 71.3%,
      transparent 71.3% 74%,
      var(--red) 74% 100%),
    var(--paper) !important;
}
.hero::after { opacity: 0.02 !important; }
.hero h1, .hero-title { color: var(--ink) !important; }
/* Убить неоновый градиент-глоу на слове «кодификатор» — плоская киноварь */
.hero h1 .accent {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: var(--red) !important;
  color: var(--red) !important;
  text-shadow: none !important;
  filter: none !important;
  animation: none !important;
}
.hero-badge {
  background: var(--red) !important;      /* архивный штамп */
  border: none !important;
  border-radius: 2px !important;
  color: #FFFFFF !important;
  animation: none !important;             /* пульс-глоу — слоп, убит */
  box-shadow: none !important;
}
.hero-badge span { color: #FFFFFF !important; }
.hero-subtitle { color: var(--color-text-secondary) !important; }
.sound-wave .bar {
  background: var(--ink) !important;
  opacity: 0.75;
}

section.how-it-works,
section.subjects-section,
section.cta-section,
.landing-footer {
  background: var(--paper) !important;
  border-top: 1px solid rgba(20, 18, 15, 0.14) !important;
}
section.how-it-works h2,
section.subjects-section h2,
section.cta-section h2 {
  color: var(--ink) !important;
}
.section-label { color: var(--red) !important; }
.step-card {
  background: var(--color-bg-elevated) !important;
  border: 1px solid rgba(20, 18, 15, 0.18) !important;
  border-radius: 4px !important;
}
.step-number { color: var(--red) !important; font-family: var(--font-mono) !important; }
.step-icon {
  background: transparent !important;
  border: 1.5px solid var(--ink) !important;
  border-radius: 2px !important;
  color: var(--ink) !important;
}
.step-card h3 { color: var(--ink) !important; }
.step-card p { color: var(--color-text-secondary) !important; }

.subject-card {
  background: var(--color-bg-elevated) !important;
  border: 1px solid rgba(20, 18, 15, 0.18) !important;
}
.subject-card:hover {
  border-color: var(--ink) !important;
  background: var(--color-bg-elevated) !important;
}
.subject-card .subject-icon {
  background: var(--red) !important;
  color: #FFFFFF !important;
}
.subject-card h4 { color: var(--ink) !important; }
.subject-count { color: var(--red) !important; font-family: var(--font-mono) !important; }

.cta-section p { color: var(--color-text-secondary) !important; }
/* Киноварная кнопка со сдвиг-тенью — фирменный жест */
.btn-primary {
  background: var(--red) !important;
  color: #FFFFFF !important;
  border-radius: 2px !important;
  box-shadow: 4px 4px 0 0 var(--ink) !important;
}
.btn-primary:hover {
  background: var(--red) !important;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--ink) !important;
}
.btn-secondary {
  background: transparent !important;
  border: 1.5px solid var(--ink) !important;
  border-radius: 2px !important;
  color: var(--ink) !important;
}

.landing-footer {
  background: var(--ink) !important;
  border-color: transparent !important;
}
.landing-footer .logo { color: var(--paper) !important; }
.footer-text { color: rgba(242, 237, 227, 0.5) !important; }
.landing-nav .nav-cta {
  background: var(--red) !important;
  color: #FFFFFF !important;
  border-radius: 2px !important;
}
.landing-nav .nav-cta:hover { background: #A00D25 !important; }

/* PWA install button */
#pwaInstall {
  background: var(--ink) !important;
  color: var(--paper) !important;
  border-radius: 2px !important;
  box-shadow: 4px 4px 0 0 var(--red) !important;
}

/* ============================================================
   28. NOW PLAYING — KEEP DARK (cinematic, Apple Music pattern)
   Light app chrome + dark immersive player.
   ============================================================ */
/* All existing .expanded-player rules already target dark mode.
   No change needed — that file's section 17 still wins because it's more specific. */

/* But mobile track row inside lyrics needs explicit dark colors since global flip */
.expanded-player * { color: inherit; }

/* Codifier sidebar / overlay */
.codifier-section { background: #FFFFFF !important; border-color: rgba(0,0,0,0.06) !important; }
.codifier-section-header { color: #0A0A0A !important; }
.codifier-section-header .codifier-code { color: rgba(0,0,0,0.55) !important; }
.codifier-topic { color: rgba(0,0,0,0.7) !important; }
.codifier-topic:hover { background: rgba(0,0,0,0.04) !important; color: #0A0A0A !important; }
.codifier-topic.active { background: rgba(200, 16, 46, 0.10) !important; color: var(--red) !important; box-shadow: inset 3px 0 0 var(--red); }

/* Mobile codifier nav */
.mobile-codifier-toggle {
  background: #F7F1E4 !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  color: #0A0A0A !important;
}

/* Loading skeletons — light */
.sk-row, .sk-card,
.tracks-grid:empty::before, .track-row:empty::before {
  background: linear-gradient(90deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.04) 100%) !important;
  background-size: 200% 100% !important;
}

/* ============================================================
   29. KILL FEEDBACK FAB + MODAL EVERYWHERE
   ============================================================ */
.feedback-fab,
#feedbackFab,
.feedback-modal,
#feedbackModal,
.feedback-box { display: none !important; }

/* ============================================================
   30. STRIP AI-TEMPLATE VISUALS
   ============================================================ */

/* Kill the curtain transition (overused AI/template effect) */
.curtain { display: none !important; }

/* The hero-content's existing sound-wave reflection — too templated */
.sound-wave-reflection { display: none !important; }

/* Tracks-cover gradient: when no era, use a single tone instead of generic 135deg */
/* WHY :not на карточке: data-era/data-cover-applied живут на .track-card, не на cover;
   старый селектор .track-cover:not([data-era]) матчил ВСЕ обложки и !important убивал thumb */
.row-card:not([data-era]):not([data-cover-applied]) .row-card-cover,
.track-card:not([data-era]):not([data-cover-applied]) .track-cover {
  background: #1F1F22 !important;     /* neutral instead of subject-gradient */
}

/* Default "subject" generic icon backgrounds — single tone */
.now-playing-cover-icon,
.row-card-cover-icon,
.track-cover-icon {
  background: rgba(0, 0, 0, 0.4) !important;
}

/* ============================================================
   29. ГОСУДАРСТВЕННЫЙ АРХИВ — добивка слопа (2026-07)
   ============================================================ */
/* Розовое «отражение» волны — glow-декор, убит */
.sound-wave-reflection { display: none !important; }
/* Ripple-эффект кнопок — чужой материал-паттерн */
.ripple { display: none !important; }

/* ---------- 29a. Убрать лишнее ---------- */
/* Пустая видео-плашка «Видео скоро» в Now Playing — мёртвый вес, текст песни главнее */
.expanded-video-area[data-empty="true"] { display: none !important; }
/* PWA-кнопка на мобильных перекрывает CTA — установка остаётся на десктопе */
@media (max-width: 768px) { #pwaInstall { display: none !important; } }

/* ---------- 29b. Now Playing actions: тест + шеринг ---------- */
.expanded-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.np-action {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: transform 140ms var(--ease-out), background 140ms ease;
}
.np-action.np-quiz {
  background: var(--red);
  border: none;
  color: #FFFFFF;
}
.np-action.np-quiz:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.55); }
.np-action.np-share {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.85);
}
.np-action.np-share:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- 29c. Квиз — экзаменационный бланк ---------- */
.quiz-overlay { background: rgba(20, 18, 15, 0.55) !important; backdrop-filter: blur(6px); }
.quiz-container {
  background: var(--color-bg-elevated) !important;
  border: 1px solid rgba(20, 18, 15, 0.25) !important;
  border-top: 4px solid var(--red) !important;
  border-radius: 4px !important;
  box-shadow: 8px 8px 0 0 rgba(20, 18, 15, 0.85) !important;
  color: var(--ink) !important;
}
.quiz-header h3 { color: var(--ink) !important; font-family: var(--font-display) !important; }
.quiz-header p {
  color: var(--red) !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.quiz-progress-dot {
  width: 18px !important; height: 4px !important;
  border-radius: 0 !important;
  background: rgba(20, 18, 15, 0.18) !important;
}
.quiz-progress-dot.done { background: var(--ink) !important; }
.quiz-progress-dot.correct { background: var(--color-success) !important; }
.quiz-progress-dot.wrong { background: var(--red) !important; }
.quiz-question { color: var(--ink) !important; font-family: var(--font-display) !important; }
.quiz-option {
  background: var(--paper) !important;
  border: 1px solid rgba(20, 18, 15, 0.25) !important;
  border-radius: 2px !important;
  color: var(--ink) !important;
}
.quiz-option:hover { border-color: var(--ink) !important; box-shadow: 3px 3px 0 0 rgba(20, 18, 15, 0.2); }
.quiz-option.correct {
  background: rgba(62, 92, 70, 0.12) !important;
  border-color: var(--color-success) !important;
  box-shadow: inset 3px 0 0 var(--color-success);
}
.quiz-option.wrong {
  background: rgba(200, 16, 46, 0.08) !important;
  border-color: var(--red) !important;
  box-shadow: inset 3px 0 0 var(--red);
}
.quiz-explanation {
  background: var(--color-bg-secondary) !important;
  border-left: 3px solid var(--red) !important;
  border-radius: 0 !important;
  color: var(--color-text-secondary) !important;
}
.quiz-result h3 { color: var(--ink) !important; font-family: var(--font-display) !important; }
.quiz-result p { color: var(--color-text-secondary) !important; }
.quiz-result-btn {
  background: var(--red) !important;
  color: #FFFFFF !important;
  border-radius: 2px !important;
  box-shadow: 4px 4px 0 0 var(--ink) !important;
}

/* ---------- 29d. «Сегодня» — учётная карточка дня ---------- */
.daily-ribbon {
  background: var(--color-bg-elevated) !important;
  border: 1px solid rgba(20, 18, 15, 0.2) !important;
  border-left: 6px solid var(--red) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}
.daily-card {
  background: var(--paper) !important;
  border: 1px solid rgba(20, 18, 15, 0.16) !important;
  border-radius: 2px !important;
  transition: transform 160ms var(--ease-out), box-shadow 160ms ease !important;
}
.daily-card:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 0 rgba(20, 18, 15, 0.25) !important; }
.daily-card-icon { border-radius: 2px !important; }
.daily-countdown-days {
  font-family: var(--font-display) !important;
  color: var(--red) !important;
}
.daily-goal-fill { background: var(--red) !important; border-radius: 0 !important; }
.daily-goal-bar { border-radius: 0 !important; }

/* ---------- 29e. Прогресс — издательская статистика ---------- */
.progress-stat {
  background: var(--color-bg-elevated) !important;
  border: 1px solid rgba(20, 18, 15, 0.2) !important;
  border-radius: 4px !important;
}
.progress-stat-value {
  font-family: var(--font-display) !important;
  color: var(--red) !important;
  font-variation-settings: "opsz" 96;
}
.progress-stat-label {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--color-text-muted) !important;
}

/* ---------- 29f. Карта фонда (главная) + курс-кнопки ---------- */
.fond-map {
  background: var(--color-bg-elevated);
  border: 1px solid rgba(20, 18, 15, 0.2);
  border-left: 6px solid var(--ink);
  border-radius: 4px;
  padding: 20px 24px;
  margin: 8px 0 28px;
}
.fond-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.fond-head .section-label { margin: 0 !important; }
.fond-total {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.fond-total strong { color: var(--red); font-size: 14px; }
.fond-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(80px, 220px) 48px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid rgba(20, 18, 15, 0.08);
}
.fond-row:first-of-type { border-top: none; }
.fond-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #FFFFFF;
  background: var(--ink);
  text-align: center;
  padding: 2px 0;
  border-radius: 2px;
}
.fond-title {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fond-bar {
  height: 6px;
  background: rgba(20, 18, 15, 0.10);
  position: relative;
  display: block;
}
.fond-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--red);
  transition: width 400ms var(--ease-out);
}
.fond-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: right;
}
@media (max-width: 600px) {
  .fond-map { padding: 16px; }
  .fond-title { font-size: 12px; }
  .fond-row { grid-template-columns: 22px minmax(0, 1fr) 64px 42px; }
}

/* Кнопки hero платформы: курс — киноварь, перемешать — призрак */
.btn-play-big.btn-course {
  background: var(--red) !important;
  color: #FFFFFF !important;
  border-radius: 2px !important;
  box-shadow: 4px 4px 0 0 var(--ink) !important;
}
.btn-play-big.btn-course:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 0 var(--ink) !important; }
.btn-play-big.btn-shuffle-ghost {
  background: transparent !important;
  border: 1.5px solid var(--ink) !important;
  color: var(--ink) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}
.btn-play-big.btn-shuffle-ghost:hover { background: rgba(20, 18, 15, 0.06) !important; }

/* Скрытый мини-плеер: opacity:0 не отключает backdrop-filter — тёмная полоса внизу */
.player.player-hidden { visibility: hidden !important; }

/* ---------- 29g. Дело дня + темп-план + сон + шеринг ---------- */
.delo-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  padding: 12px 16px;
  margin: 8px 0 12px;
  box-shadow: 4px 4px 0 0 var(--red);
}
.delo-strip.is-done { box-shadow: 4px 4px 0 0 var(--color-success); }
.delo-stamp {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--red);
  color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.delo-strip.is-done .delo-stamp { background: var(--color-success); }
.delo-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.delo-play {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(242, 237, 227, 0.4);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 140ms ease;
}
.delo-play:hover { background: rgba(242, 237, 227, 0.12); }

.fond-pace {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 18, 15, 0.14);
  font-size: 13px;
  color: var(--color-text-secondary);
}
.fond-pace strong { color: var(--red); }
.fond-next {
  font-family: var(--font-mono);
  font-size: 11px;
  background: transparent;
  border: 1px solid rgba(20, 18, 15, 0.35);
  border-radius: 2px;
  color: var(--ink);
  padding: 3px 8px;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.fond-next:hover { border-color: var(--ink); box-shadow: 2px 2px 0 0 var(--red); }

#sleepBtn.is-armed {
  border-color: var(--red) !important;
  color: var(--red) !important;
}

.quiz-share-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 140ms ease, transform 140ms ease;
}
.quiz-share-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 0 var(--red); }

@media (max-width: 600px) {
  .delo-strip { flex-wrap: wrap; }
  .delo-title { flex-basis: 100%; order: 3; white-space: normal; }
}

/* ============================================================
   30. WOW-2026: нативные API, никакого слопа
   ============================================================ */

/* ---- 30a. View Transitions: обложка-дело морфится в Now Playing ---- */
.expanded-player.vt-instant { transition: none !important; }
::view-transition-group(np-cover) {
  animation-duration: 420ms;
  animation-timing-function: cubic-bezier(0.22, 0.9, 0.24, 1);
}
::view-transition-old(np-cover), ::view-transition-new(np-cover) {
  animation-duration: 420ms;
  height: 100%;
  object-fit: cover;
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; }

/* ---- 30b. Duotone: все обложки карточек — в два тона своей эпохи ---- */
/* WHY без grayscale-фильтра: filter применяется ПОСЛЕ композитинга детей,
   т.е. обесцвечивал и сам тонирующий ::after. mix-blend-mode:color сам по себе
   заменяет цвет картины на тон эпохи, сохраняя светотень — это и есть duotone. */
.row-card[data-cover-applied] .row-card-cover,
.track-card[data-cover-applied] .track-cover {
  position: relative;
  isolation: isolate;   /* blend не протекает на фон карточки */
}
.row-card[data-cover-applied] .row-card-cover::after,
.track-card[data-cover-applied] .track-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--era-spine, var(--red));
  mix-blend-mode: color;      /* сохраняет светотень картины, красит в тон эпохи */
  opacity: 0.9;
  pointer-events: none;
}
/* при наведении дело «оживает» — проявляется настоящий цвет картины */
@media (hover: hover) {
  .row-card[data-cover-applied]:hover .row-card-cover::after,
  .track-card[data-cover-applied]:hover .track-cover::after { opacity: 0; }
  .row-card-cover::after, .track-cover::after { transition: opacity 300ms ease; }
}

/* ---- 30c. Scroll-driven animations (нативный CSS, деградирует в статику) ---- */
@supports (animation-timeline: view()) {
  .fond-fill {
    transform-origin: left center;
    animation: fondReveal linear both;
    animation-timeline: view();
    animation-range: entry 10% entry 70%;
  }
  @keyframes fondReveal { from { transform: scaleX(0); } to { transform: scaleX(1); } }

  .row-card .row-card-cover, .track-card .track-cover {
    animation: caseRise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
  @keyframes caseRise {
    from { opacity: 0.35; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .step-card, .demo-track, .subject-card {
    animation: caseRise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
}

/* ---- 30d. Штамп-эффект: заголовки лендинга оттискиваются по очереди ---- */
@keyframes stampIn {
  0%   { opacity: 0; transform: scale(1.45) rotate(-1.5deg); }
  62%  { opacity: 1; transform: scale(0.975) rotate(0.25deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.hero .hero-badge     { animation: stampIn 380ms cubic-bezier(0.2, 0.9, 0.2, 1) 80ms both; }
.hero h1              { animation: stampIn 420ms cubic-bezier(0.2, 0.9, 0.2, 1) 200ms both; }
.hero .sound-wave-container { animation: stampIn 380ms cubic-bezier(0.2, 0.9, 0.2, 1) 340ms both; }
.hero .hero-subtitle  { animation: stampIn 360ms cubic-bezier(0.2, 0.9, 0.2, 1) 440ms both; }
.hero .hero-cta       { animation: stampIn 380ms cubic-bezier(0.2, 0.9, 0.2, 1) 540ms both; }

/* ---- 30e. Живая осциллограмма в Now Playing ---- */
#npWave {
  display: block;
  width: 100%;
  height: 26px;
  margin-bottom: 6px;
  opacity: 0.7;
  pointer-events: none;
}

/* ============================================================
   31. ПРУФ-МОМЕНТ — «проверь, ты уже это знаешь»
   WHY: главный ага-момент продукта — доказательство, что тема выучилась
   от прослушивания. Плашка не блокирует музыку (в отличие от старого
   принудительного квиза после каждого трека).
   ============================================================ */
.proof-strip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100px;                       /* над нижним плеером */
  z-index: 900;                        /* под expanded player (1000+) */
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(680px, calc(100vw - 32px));
  background: var(--paper, #F2EDE3);
  color: var(--ink, #14120F);
  border: 1.5px solid var(--ink, #14120F);
  border-radius: 3px;
  box-shadow: 4px 4px 0 0 var(--ink, #14120F);
  padding: 10px 12px;
  animation: proofIn 260ms cubic-bezier(0.22, 0.9, 0.24, 1) both;
}
@keyframes proofIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.proof-stamp {
  flex: none;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--red, #C8102E);
  color: #fff;
  padding: 3px 7px;
  border-radius: 2px;
}
.proof-text {
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.35;
}
.proof-go {
  flex: none;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink, #14120F);
  color: #F2EDE3;
  border: none;
  border-radius: 2px;
  padding: 8px 12px;
  cursor: pointer;
}
.proof-go:hover { background: var(--red, #C8102E); }
.proof-close {
  flex: none;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  /* WHY 44px: тап-таргет был 20px — недотапываем на мобиле */
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
}
.proof-close:hover { opacity: 1; }
@media (max-width: 600px) {
  .proof-strip { flex-wrap: wrap; bottom: 88px; }
  .proof-text { flex-basis: 100%; order: -1; }
}

/* ============================================================
   32. МОБИЛЬНАЯ УСТОЙЧИВОСТЬ — убрать «шатание сайта»
   WHY: .hero-actions без переноса растягивал .content шире вьюпорта,
   и вся страница гуляла вбок. Плюс web-поведения (двойной тап-зум,
   резиновый баунс), из-за которых продукт ощущается сайтом, а не app.
   ============================================================ */
.content { overflow-x: hidden; }        /* широкий элемент не раскачивает страницу */
.hero-actions { flex-wrap: wrap; }

html, body { overscroll-behavior: none; }   /* без rubber-band за границами */
body { touch-action: manipulation; }         /* пинч-зум работает, двойной тап — нет */

@media (max-width: 768px) {
  /* плеер на мобиле: таб-бар 56 + плеер 64 — плашка-пруф должна быть выше */
  .proof-strip { bottom: 132px; }
}

/* ============================================================
   33. AUTOPLAY-ПОДСКАЗКА НА ДИПЛИНКЕ
   WHY: браузер блокирует autoplay без жеста — трек стоял на паузе 0:00
   и выглядел сломанным. Пульс говорит: «музыка уже выбрана, нажми».
   ============================================================ */
@keyframes autoplayPulse {
  0%   { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(200, 16, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}
.autoplay-hint {
  animation: autoplayPulse 1.6s ease-out infinite;
  border-radius: 50%;
}
