/* ============================================================
   ChefCore · design system v2 (was «Тёплая бумага»)
   ============================================================ */

:root {
  --paper:        #ffffff;
  --paper-2:      #f7f7f8;
  --ink:          #0a0a0a;
  --ink-soft:     #6b6b6b;
  --ink-mute:     #9a9a9a;
  --ink-faint:    #b8b8b8;
  --accent:       #f05a28;
  --accent-soft:  #d94e20;
  --line:         rgba(10, 10, 10, 0.08);
  --line-2:       rgba(10, 10, 10, 0.05);
  --card:         #ffffff;
  --shadow-1:     0 1px 2px rgba(10, 10, 10, .04), 0 8px 24px -12px rgba(10, 10, 10, .12);
  --shadow-2:     0 2px 8px rgba(10, 10, 10, .06), 0 16px 40px -16px rgba(10, 10, 10, .16);
  --radius:       10px;
  --radius-lg:    16px;
  --container:    1280px;
  --header-h:     72px;
  --t-fast:       .15s ease;
  --t:            .25s ease;
  --serif:        'Inter Tight', Inter, system-ui, -apple-system, sans-serif;
  --sans:         'Inter Tight', Inter, system-ui, -apple-system, sans-serif;
  --brand:        #f05a28;
  --brand-soft:   rgba(240, 90, 40, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

/* ===== layout ===== */
/* Sticky-шапка перекрывала цель якорных переходов (#catalog и т.п.). */
html { scroll-padding-top: 112px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
}

main { flex: 1; padding: 0 0 48px; }

/* ===== header (ChefCore) ===== */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 0;
  height: var(--header-h);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-mark {
  width: 30px;
  height: 30px;
  display: block;
  flex-shrink: 0;
}
.brand .sub { display: none; }
.nav-short { display: none; }
.nav-long { display: inline; }
.nav {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: nowrap;
}
.nav-sections {
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.nav a,
.nav .nav-drop-trigger {
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-bottom: none;
  border-radius: 8px;
  color: #4a4a4a;
  transition: color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.nav a:hover,
.nav .nav-drop-trigger:hover,
.nav-drop.is-open .nav-drop-trigger {
  color: var(--ink);
  background: var(--paper-2);
}
.nav a.active,
.nav a[aria-current="page"] {
  color: var(--ink);
  border-color: transparent;
}
.nav-actions { margin-left: auto; flex-shrink: 0; gap: 4px; }
.nav-actions .icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--ink);
}
.nav-actions .icon-btn:hover { background: var(--paper-2); }
.nav-actions .icon-btn svg { width: 20px; height: 20px; }

/* dropdowns */
.nav-drop { position: relative; }
.nav-drop-trigger .chev {
  width: 14px; height: 14px; opacity: 0.5;
  transition: transform var(--t-fast);
}
.nav-drop.is-open .nav-drop-trigger .chev { transform: rotate(180deg); opacity: 0.9; }
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--t-fast), transform var(--t-fast);
  z-index: 60;
}
.nav-drop.is-open .nav-drop-menu {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.nav-drop-menu a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 11px 12px !important;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink) !important;
  background: transparent !important;
}
.nav-drop-menu a:hover { background: var(--paper-2) !important; }
.nav-drop-menu .mi {
  width: 26px; height: 26px;
  display: grid; place-items: center; flex-shrink: 0;
}
.nav-drop-menu .mi img,
.nav-drop-menu .mi svg { width: 22px; height: 22px; display: block; }

/* —— Mobile header: row1 = logo + auth, row2 = full-width sections scroll —— */
@media (max-width: 960px) {
  .site-header {
    height: auto;
    min-height: 0;
  }
  .site-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 52px auto;
    align-items: center;
    height: auto;
    gap: 0;
    padding: 0 14px;
    flex-wrap: nowrap; /* grid handles layout */
  }
  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    font-size: 16px;
    gap: 7px;
  }
  .brand-mark { width: 26px; height: 26px; }
  .nav-actions {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
    justify-self: end;
  }
  .nav-sections {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    gap: 2px;
    /* fixed second row — no jump when sticky/scroll */
    min-height: 44px;
    height: 44px;
    align-items: center;
    border-top: 1px solid var(--line);
    margin: 0 -14px;
    width: calc(100% + 28px);
    max-width: none;
    padding: 0 14px;
    box-sizing: border-box;
  }
  .nav-sections::-webkit-scrollbar { display: none; }
  .nav-sections > a,
  .nav-sections > .nav-drop {
    flex: 0 0 auto;
  }
  .nav-sections a,
  .nav-sections .nav-drop-trigger {
    font-size: 13px;
    padding: 8px 10px;
    flex-shrink: 0;
  }
  /* На мобиле выпадашка — шторка снизу: не зависит от позиции триггера в
     горизонтальном скролле и не закрывается от случайного касания. */
  .nav-drop-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    min-width: 0;
    max-width: none;
    z-index: 80;
    border-radius: 18px 18px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    transform: translateY(12px);
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.22);
  }
  .nav-drop-menu a { padding: 14px 12px !important; }
  .nav-drop-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(20, 15, 8, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-fast);
  }
  .nav-drop-backdrop.is-visible { opacity: 1; pointer-events: auto; }
  .nav a[data-auth="signup"] { display: none; }
  .nav-short { display: inline; }
  .nav-long { display: none; }
}
@media (max-width: 400px) {
  .brand .brand-text {
    max-width: 10ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ===== Гронда ===== */
.gronda-detail { max-width: 720px; margin: 40px auto 0; }
.gronda-breadcrumbs { font-size: 13px; color: var(--ink-mute); margin-bottom: 18px; }
.gronda-title { font-family: var(--serif); font-size: 38px; line-height: 1.15; margin-bottom: 10px; }
.gronda-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.gronda-meta-cat {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: 500;
  color: var(--ink);
}
.gronda-meta-cat:hover { color: var(--accent); border-color: var(--accent); }
.gronda-meta-video { color: var(--accent); font-weight: 600; }

/* Один медиа-блок: вертикальные ролики letterbox'ятся на тёмном фоне */
.gronda-media {
  background: #17120c;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.gronda-media video,
.gronda-media img {
  display: block;
  max-height: 480px;
  max-width: 100%;
  object-fit: contain;
}
@media (max-width: 640px) {
  .gronda-media video, .gronda-media img { max-height: 62vh; }
}

/* Структурированная техкарта */
.gronda-card { margin-top: 28px; }
.gronda-h {
  font-family: var(--serif);
  font-size: 22px;
  margin: 30px 0 14px;
}
.gronda-p { font-size: 16.5px; line-height: 1.7; margin: 12px 0; }
.gronda-ing { list-style: none; padding: 0; margin: 8px 0 4px; }
.gronda-ing li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  font-size: 15.5px;
  line-height: 1.45;
}
.gronda-ing .ing-name { flex-shrink: 1; }
.gronda-ing .ing-dots {
  flex: 1;
  min-width: 24px;
  border-bottom: 1px dotted var(--line);
  transform: translateY(-4px);
}
.gronda-ing .ing-amount {
  white-space: nowrap;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.gronda-steps {
  list-style: none;
  counter-reset: gstep;
  padding: 0;
  margin: 8px 0;
}
.gronda-steps li {
  counter-increment: gstep;
  position: relative;
  padding: 0 0 18px 46px;
  font-size: 16.5px;
  line-height: 1.65;
}
.gronda-steps li::before {
  content: counter(gstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gronda-en { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 18px; }
.gronda-en summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-mute);
}
.gronda-en summary:hover { color: var(--accent); }
.gronda-en .gronda-text { margin-top: 14px; font-size: 15px; color: var(--ink-mute); }

.gronda-text {
  margin-top: 24px;
  font-size: 16.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.gronda-text-preview {
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.gronda-pager {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
  font-size: 14px;
  color: var(--ink-mute);
}
.gronda-pager a { font-weight: 500; color: var(--accent); }

/* ===== заглушки будущих разделов ===== */
.stub-section {
  max-width: 560px;
  margin: 96px auto 0;
  text-align: center;
}
.stub-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.stub-section h1 {
  font-family: var(--serif);
  font-size: 40px;
  margin-bottom: 16px;
}
.stub-lead {
  color: var(--ink-mute);
  line-height: 1.6;
  margin-bottom: 28px;
}
.me {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.me-link { display: inline-flex; align-items: center; gap: 10px; }
.me-link:hover .me { background: var(--accent-soft); }

/* avatar dropdown */
.me-menu { position: relative; }
.me-trigger {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
}
.me-trigger:hover .me { background: var(--accent-soft); }
.me-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 6px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 100;
}
.me-popover.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.me-popover-email {
  padding: 12px 14px 10px;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 4px;
  word-break: break-all;
}
.me-popover-item {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.me-popover-item:hover { background: var(--paper-2); color: var(--accent); }
.me-popover-form { margin: 0; }
.me-popover-logout { color: #b03a2e; }
.me-popover-logout:hover { background: #fdecea; color: #b03a2e; }

/* PWA install prompt — floating bottom-right */
.pwa-install {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font: 500 13px var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(184, 85, 60, .35);
  transition: transform .15s ease, background .15s ease;
}
.pwa-install:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}
/* На узких экранах кнопка перекрывала контент — прячем (юзер ставит через
   «поделиться» в Safari, beforeinstallprompt всё равно не стреляет в iOS). */
@media (max-width: 720px) {
  .pwa-install { display: none !important; }
}

/* cookie banner */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
  /* Desktop: компактный toast в правом нижнем углу, не перекрывает центральные CTA.
     Mobile: тонкий sticky-bottom бар. z-index ниже paywall-bar (60), чтобы
     paywall оставался поверх. */
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  left: auto;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 45;
  animation: cookie-banner-in .3s ease;
}
@keyframes cookie-banner-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-banner-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.cookie-banner .btn { padding: 8px 14px; font-size: 12px; }
@media (max-width: 560px) {
  .cookie-banner {
    left: 12px; right: 12px; max-width: none;
    padding: 10px 12px;
    flex-direction: row; align-items: center; gap: 10px;
  }
  .cookie-banner-text { font-size: 11.5px; line-height: 1.35; }
  .cookie-banner .btn { padding: 7px 12px; font-size: 11.5px; white-space: nowrap; }
}
/* На страницах с paywall-bar — приподнимаем cookie над ним. */
body.reader-page .cookie-banner { bottom: calc(220px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 880px) {
  body.reader-page .cookie-banner { bottom: calc(260px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== headings ===== */
.h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.h1 em { font-style: italic; color: var(--accent); }
.lead {
  font-family: var(--serif);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 0 56px;
}

.section-title {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin: 56px 0 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.section-title .count {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ===== hero — ChefCore cinematic full-bleed ===== */
.hero {
  position: relative;
  isolation: isolate;
  height: min(56.25vw, 88vh, 920px);
  min-height: 480px;
  padding: 0;
  margin: 0 0 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  /* break out of .container */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  left: 0;
  transform: none;
  width: 100%;
  background-color: #0a0a0a;
  background-image:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.82) 0%,
      rgba(0, 0, 0, 0.68) 26%,
      rgba(0, 0, 0, 0.32) 48%,
      rgba(0, 0, 0, 0.08) 68%,
      rgba(0, 0, 0, 0) 100%
    ),
    url("/static/img/hero-banner.ee2ac98ebb24.jpg");
  background-position: center, center center;
  background-size: cover, cover;
  background-repeat: no-repeat;
}
.hero-text {
  position: relative;
  z-index: 1;
  max-width: 440px;
  padding: 48px 0;
  margin-left: max(24px, calc((100vw - var(--container)) / 2 + 48px));
  margin-right: 24px;
  text-align: left;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.hero-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  color: #fff;
}
.hero-title em { font-style: normal; color: #fff; }
.hero-bio {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 28px;
  max-width: 34ch;
}
.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-links .btn-primary,
.hero .btn-primary {
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
}
.hero-links .btn-primary:hover,
.hero .btn-primary:hover {
  background: #f3f3f3;
  color: var(--ink);
}
.hero-links .btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.hero-note {
  font-family: var(--sans);
  font-style: normal;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin: 14px 0 0;
}
.hero-note a {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.3);
  text-underline-offset: 3px;
}
.hero-note a:hover { color: #fff; }
.hero-eyebrow-sep { margin: 0 8px; opacity: 0.5; }
.hero-trial {
  font-family: var(--sans);
  font-style: normal;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin: 10px 0 0;
}
.hero-photo-strip { display: none; }

@media (max-width: 820px) {
  .hero {
    height: auto;
    min-height: 560px;
    padding: 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    align-items: flex-end;
  }
  .hero-bg {
    background-image:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.5) 45%,
        rgba(0, 0, 0, 0.88) 100%
      ),
      url("/static/img/hero-banner.ee2ac98ebb24.jpg");
    background-position: center, center 40%;
  }
  .hero-text {
    max-width: 100%;
    margin-left: 20px;
    margin-right: 20px;
    padding: 40px 0 48px;
  }
  .hero-title { font-size: clamp(30px, 7.5vw, 44px); color: #fff; }
  .hero-links a[data-auth="login"] { display: none; }
  /* Кнопка подписки — на всю ширину */
  .hero-links { flex-direction: column; align-items: flex-start; }
  .hero-links .btn-primary { width: 100%; text-align: center; justify-content: center; }

  /* Фото-полоса скрыта на мобилке */
  .hero-photo-strip { display: none; }
}

/* ===== features v2 (4 columns, line-icons, terracotta accent)
   Перебиваем базовую .features-карточку явной специфичностью .features.features-v2 */
.features.features-v2 {
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 36px 0 8px;
  margin: 0 0 48px;
  border-top: 1px solid var(--line);
}
@media (max-width: 820px) {
  .features.features-v2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
    border-top: none;     /* убираем полосу */
    padding-top: 20px;
    margin-top: 0;
  }
}
@media (max-width: 460px) {
  .features.features-v2 { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
}
.features-v2 .feature {
  flex-direction: column;
  gap: 8px;
  background: transparent;
}
.features-v2 .feature-icon {
  width: 28px; height: 28px;
  background: transparent;
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 6px;
}
.features-v2 .feature-icon svg { width: 100%; height: 100%; display: block; }
.features-v2 .feature-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.features-v2 .feature-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.feature-badge {
  display: inline-flex; align-items: center;
  font-family: var(--sans);
  font-weight: 600; font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-deep, #8d3e16);
  background: rgba(184, 92, 43, 0.08);
  border: 1px solid rgba(184, 92, 43, 0.22);
  padding: 4px 8px;
  border-radius: 999px;
  line-height: 1;
}

/* ===== features (3-column value props) ===== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 8px 0 56px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; gap: 18px; padding: 22px 18px; }
}
.feature { display: flex; flex-direction: column; gap: 8px; }
.feature-icon { font-size: 24px; line-height: 1; }
.feature-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  color: var(--ink);
}
.feature-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ===== subscription banner ===== */
.sub-banner {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #fbe9d2 0%, #f5dcc1 100%);
  border: 1px solid #e8c89e;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 40px;
}
.sub-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 240px;
}
.sub-banner-text strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
}
.sub-banner-text span {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ===== continue reading — slim top bar ===== */
.continue-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px 14px 10px 10px;
  margin: 8px 0 32px;
  text-decoration: none;
  transition: box-shadow var(--t), transform var(--t-fast), border-color var(--t-fast);
}
.continue-bar:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(184, 85, 60, 0.15);
  transform: translateY(-1px);
}
.continue-bar-cover {
  width: 44px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--paper-2);
  box-shadow: 0 1px 3px rgba(43,31,20,.15);
}
.continue-bar-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.continue-bar-text { flex: 1; min-width: 0; }
.continue-bar-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.continue-bar-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.25;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-bar-title span { color: var(--ink-mute); font-weight: 400; }
.continue-bar-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(184, 85, 60, 0.08);
  transition: background var(--t-fast), color var(--t-fast);
}
.continue-bar:hover .continue-bar-cta {
  background: var(--accent);
  color: #fff;
}
@media (max-width: 480px) {
  .continue-bar-cta span { display: none; }
  .continue-bar-cta { padding: 8px 10px; }
  .continue-bar-title { font-size: 15px; }
}

/* ===== legacy continue (kept for compat if used elsewhere) ===== */
.continue {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 48px;
  transition: box-shadow var(--t), transform var(--t);
}
.continue:hover { box-shadow: var(--shadow-1); }
@media (max-width: 480px) {
  .continue { grid-template-columns: 72px 1fr; gap: 16px; padding: 14px; }
}
.continue-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.continue-cover img { width: 100%; height: 100%; object-fit: cover; }
.continue-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.continue-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 500;
}
.continue-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  margin: 4px 0 0;
  line-height: 1.2;
  color: var(--ink);
}
.continue-author { font-size: 13px; color: var(--ink-mute); }
.continue-btn { align-self: flex-start; margin-top: 12px; padding: 10px 16px; font-size: 13px; }
@media (max-width: 480px) {
  .continue-title { font-size: 16px; }
  .continue-btn { padding: 8px 14px; font-size: 12px; }
}

/* ===== category nav (under header) ===== */
.catalog-section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 32px 0 0;
  line-height: 1.15;
}
.catalog-section-title--gap {
  margin-top: 40px;
}
.cats {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
}
.cats a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.cats a.active {
  color: var(--accent);
  border-color: var(--accent);
}
.cats a:hover { color: var(--accent); }
.cats-sep {
  color: var(--ink-soft);
  opacity: 0.5;
  padding-bottom: 6px;
  user-select: none;
}
/* На мобиле — одна горизонтальная скроллируемая полоса вместо 3 строк */
@media (max-width: 640px) {
  .cats-wrap {
    position: relative;
    margin: 0 -18px;
  }
  /* Заголовок живёт внутри вытянутой на всю ширину обёртки — возвращаем ему поля,
     иначе текст упирался в края экрана и выглядел обрезанным. */
  .cats-wrap > .catalog-section-title,
  .cats-wrap > h2,
  .cats-wrap > h3 {
    padding-left: 18px;
    padding-right: 18px;
  }
  .cats-wrap::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 36px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(245, 241, 234, 0) 0%, var(--paper) 100%);
  }
  .cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0 20px;
    padding: 16px 36px 6px 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cats::-webkit-scrollbar { display: none; }
}

/* ===== a11y focus ring (брендовый, не дефолтный синий хром) ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) { outline: none; }

/* ===== paywall block (sticky bar / overlay card) ===== */
/* Bar — sticky внизу ридера. Card — большой overlay в конце превью. */
.paywall {
  color: #fff;
  background: linear-gradient(180deg, #2b2b2b 0%, #1a1a1a 100%);
  border-top: 3px solid var(--accent);
}
.paywall-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  box-shadow: 0 -8px 32px rgba(0,0,0,.28);
  padding: 22px 24px;
}
.paywall-card {
  position: relative;
  max-width: 720px;
  margin: 48px auto;
  padding: 40px 36px;
  border-radius: 18px;
  border-top: none;
  box-shadow: 0 24px 60px rgba(0,0,0,.24);
}
.paywall-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--accent);
  border-radius: 18px 18px 0 0;
}
.paywall-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.paywall-card .paywall-inner {
  grid-template-columns: 1fr;
  gap: 24px;
  text-align: center;
}
.paywall-copy { min-width: 0; }
.paywall-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.paywall-head {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.paywall-card .paywall-head { font-size: 32px; }
.paywall-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}
.paywall-sub strong { color: #fff; font-weight: 600; }

.paywall-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}
.paywall-card .paywall-cta { min-width: 0; max-width: 360px; margin: 0 auto; width: 100%; }
.pb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-align: center;
  white-space: nowrap;
}
.pb-btn-label { font-size: 15px; line-height: 1.1; }
.pb-btn-price { font-size: 12px; opacity: 0.86; margin-top: 2px; font-weight: 500; }
.pb-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(196, 99, 56, 0.42);
}
.pb-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(196, 99, 56, 0.55);
  background: #d97149;
}
.pb-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.pb-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}
.paywall-micro {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: 2px;
}

@media (max-width: 880px) {
  .paywall-bar { padding: 14px 16px; }
  .paywall-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .paywall-head { font-size: 18px; }
  .paywall-card .paywall-head { font-size: 24px; }
  .paywall-cta { min-width: 0; }
  .paywall-card {
    margin: 24px 16px;
    padding: 28px 22px;
    max-width: none;
    width: auto;
  }
  /* На mobile в sticky-bar — только eyebrow + headline + CTA.
     Подробный sub-text не помещается, забирает 40% viewport. */
  .paywall-bar .paywall-sub { display: none; }
  .paywall-bar .paywall-eyebrow { margin-bottom: 4px; }
  .paywall-bar .paywall-head { margin-bottom: 8px; line-height: 1.2; }
}

/* Нейтральная сноска в конце preview — как в ЛитРес/Bookmate. */
.preview-end-note {
  margin: 32px auto 120px;
  max-width: 560px;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft, #6b6358);
  border-top: 1px solid rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.preview-end-label { opacity: 0.85; }
.preview-end-link {
  color: var(--accent, #c46338);
  font-weight: 600;
  text-decoration: none;
}
.preview-end-link:hover { text-decoration: underline; }
/* Recipe preview cut — индикация что дальше скрыто. */
.recipe-preview-cut {
  margin-top: 24px;
  padding: 20px 24px;
  background: rgba(196, 99, 56, 0.08);
  border: 1px dashed rgba(196, 99, 56, 0.32);
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
  font-style: italic;
}

/* End-of-preview fade — мягкий градиент над последней страницей перед карточкой. */
.paywall-end-fade {
  height: 80px;
  margin-top: -80px;
  background: linear-gradient(180deg, rgba(245, 241, 234, 0) 0%, rgba(245, 241, 234, 0.95) 100%);
  position: relative;
  z-index: 1;
  pointer-events: none;
}

/* Чтобы контент ридера не упирался под бар. */
body.reader-page .reader-stage { padding-bottom: 200px; }
@media (max-width: 880px) {
  body.reader-page .reader-stage { padding-bottom: 240px; }
}

/* ===== welcome banner (after signup, on catalog) ===== */
.welcome-banner {
  position: relative;
  margin: 18px 0 8px;
  padding: 18px 44px 18px 22px;
  background: linear-gradient(180deg, #fdf6e3 0%, #fbf2dc 100%);
  border: 1px solid rgba(196, 99, 56, 0.18);
  border-radius: 12px;
  color: var(--ink);
}
.welcome-banner h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.welcome-banner p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.welcome-banner .accent { color: var(--accent); font-weight: 600; }
.welcome-banner-close {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: transparent; border: 0;
  color: var(--ink-soft); font-size: 22px; line-height: 1;
  cursor: pointer; text-decoration: none;
}
.welcome-banner-close:hover { background: rgba(139, 126, 106, 0.15); }

/* ===== recipe search ===== */
.recipe-search {
  position: relative;
  margin: 18px 0 0;
}
.recipe-search input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 40px 12px 16px;
  font: inherit; font-size: 15px;
  background: #fff;
  border: 1px solid rgba(139, 126, 106, 0.3);
  border-radius: 10px;
  color: var(--ink);
}
.recipe-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 99, 56, 0.12);
}
.recipe-search-clear {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(139, 126, 106, 0.18);
  color: var(--ink); font-size: 18px; line-height: 1;
  text-decoration: none;
}
.recipe-search-clear:hover { background: rgba(139, 126, 106, 0.32); }

/* ===== category chips (secondary nav) ===== */
.cats-chips-wrap { margin-top: -4px; }
.cats-chips {
  gap: 8px 8px;
  padding: 8px 0 4px;
}
.cats-chips .chip {
  padding: 6px 12px;
  background: rgba(139, 126, 106, 0.10);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink);
}
.cats-chips .chip:hover {
  background: rgba(139, 126, 106, 0.18);
  color: var(--ink);
}
.cats-chips .chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cats-chips .chip.active:hover { color: #fff; }

/* ===== book grid ===== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 36px 24px;
}
@media (max-width: 640px) {
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
}
.book-card { display: block; }

/* ───── Row-section: горизонтальные полосы на главной ───── */
.row-section {
  margin: 0 0 32px;
}
.row-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity var(--t-fast);
}
.row-header:hover { opacity: 0.85; }
.row-header:hover .row-all { color: var(--accent); transform: translateX(4px); }
.row-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.row-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}
.row-all {
  margin-left: auto;
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
  transition: color var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
}
.row-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 180px;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 16px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.row-strip > .book-card,
.row-strip > .mc-card {
  scroll-snap-align: start;
}
.row-strip--mc {
  grid-auto-columns: 240px;
}
/* Homepage MC cards — единый размер превью (на каталоге стили свои inline) */
.row-strip--mc .mc-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: box-shadow var(--t), transform var(--t);
}
.row-strip--mc .mc-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  color: inherit;
}
.row-strip--mc .mc-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #111;
  overflow: hidden;
  flex-shrink: 0;
}
.row-strip--mc .mc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.row-strip--mc .mc-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  opacity: 0.35;
}
.row-strip--mc .mc-thumb-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.35));
  pointer-events: none;
}
.row-strip--mc .mc-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.row-strip--mc .mc-play svg { margin-left: 2px; width: 13px; height: 13px; }
.row-strip--mc .mc-thumb-pills {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.row-strip--mc .mc-pill {
  display: inline-flex;
  padding: 2px 7px;
  background: rgba(0,0,0,0.65);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}
.row-strip--mc .mc-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
}
.row-strip--mc .mc-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.row-strip--mc .mc-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-strip--mc .mc-desc { display: none; }
@media (max-width: 640px) {
  .row-strip--mc { grid-auto-columns: 180px; }
}
.row-strip::-webkit-scrollbar { height: 6px; }
.row-strip::-webkit-scrollbar-track { background: transparent; }
.row-strip::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}
.row-strip::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }
@media (max-width: 640px) {
  .row-strip { grid-auto-columns: 150px; gap: 16px; }
  .row-title { font-size: 22px; }
  .row-section { margin-bottom: 40px; }
}
.book-card .cover-wrap {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--paper-2);
  box-shadow: var(--shadow-1);
  border: 1px solid var(--line-2);
  transition: transform var(--t), box-shadow var(--t);
}

/* skeleton shimmer while cover image is loading */
.book-card .cover-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    var(--paper-2) 0%,
    rgba(255, 255, 255, 0.5) 40%,
    var(--paper-2) 80%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  z-index: 0;
  opacity: 1;
  transition: opacity .25s ease;
}
.book-card .cover-wrap.loaded::before { opacity: 0; pointer-events: none; }
.book-card .cover-wrap .cover-img,
.book-card .cover-wrap .placeholder {
  position: relative;
  z-index: 1;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.book-card:hover .cover-wrap {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}
.book-card .cover-wrap .cover-img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
  transition: opacity .35s ease, transform .5s cubic-bezier(.2, .8, .2, 1), filter .35s ease;
  z-index: 1;
  transform-origin: center center;
}
.book-card .cover-wrap > img:not(.cover-img) {
  width: 100%; height: 100%; object-fit: cover;
}

/* preview stack: 3 pages overlaid on the cover, fade in on hover */
.preview-stack {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
}
.preview-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #fff;
  opacity: 0;
  transition: opacity .35s ease;
}
.preview-dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 4;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.preview-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background .25s ease, transform .25s ease;
}
.preview-dots span.active {
  background: #fff;
  transform: scale(1.4);
}

/* show previews only on hover (and only on hover-capable devices) */
@media (hover: hover) {
  /* Книги с preview-страницами: при hover показываем превью, скрываем cover */
  .book-card[data-previews]:hover .cover-img { opacity: 0; }
  .book-card[data-previews]:hover .preview-img.active { opacity: 1; }
  .book-card[data-previews]:hover .preview-dots { opacity: 1; }
  /* Рецепты (нет preview): hover-zoom + лёгкое затемнение для глубины */
  .book-card:not([data-previews]):hover .cover-img {
    transform: scale(1.06);
    filter: brightness(1.08) saturate(1.12) contrast(1.02);
  }
  .book-card:not([data-previews]):hover .cover-wrap {
    box-shadow: 0 12px 32px -8px rgba(43, 31, 20, 0.28), 0 4px 10px rgba(43, 31, 20, 0.12);
  }
}
.book-card .cover-wrap .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
  background: linear-gradient(135deg, #1a2332 0%, #0d1419 100%);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.3;
}
.book-card .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  margin: 14px 0 0;
}
.book-card .author {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* favorite heart */
.fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: background var(--t-fast), transform var(--t-fast);
  z-index: 5;
}
.fav-btn:hover { background: #fff; transform: scale(1.06); }
.fav-btn.on { color: var(--accent); }

/* favorite heart pop animation (Twitter-style) */
.fav-btn.popping { animation: fav-pop .5s cubic-bezier(.4,0,.2,1); }
.fav-btn.popping::before,
.fav-btn.popping::after {
  content: "";
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
}
.fav-btn.popping::before {
  background: radial-gradient(circle, var(--accent) 8%, transparent 0) 0 0,
              radial-gradient(circle, var(--accent) 8%, transparent 0) 100% 0,
              radial-gradient(circle, var(--accent) 8%, transparent 0) 0 100%,
              radial-gradient(circle, var(--accent) 8%, transparent 0) 100% 100%,
              radial-gradient(circle, var(--accent) 8%, transparent 0) 50% 0,
              radial-gradient(circle, var(--accent) 8%, transparent 0) 50% 100%,
              radial-gradient(circle, var(--accent) 8%, transparent 0) 0 50%,
              radial-gradient(circle, var(--accent) 8%, transparent 0) 100% 50%;
  background-size: 8px 8px;
  background-repeat: no-repeat;
  animation: fav-particles .55s ease-out forwards;
}
@keyframes fav-pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.85); }
  60%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
@keyframes fav-particles {
  0%   { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* progress on book card */
.card-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(0,0,0,0.18);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  overflow: hidden;
  z-index: 5;
}
.card-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .3s ease;
}
.card-progress-pill {
  position: absolute;
  bottom: 8px; left: 8px;
  background: rgba(255,255,255,0.92);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  z-index: 5;
}

/* ===== buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-soft); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 14px;
}
.btn-ghost:hover { color: var(--accent); }
.btn-block { display: flex; width: 100%; }

/* ===== forms ===== */
.form { max-width: 380px; margin: 60px auto; }
.form h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.form .lead { margin-bottom: 32px; font-size: 15px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.field textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 85, 60, 0.12);
}
.errorlist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  color: #b03a2e;
  font-size: 13px;
}
.helptext { font-size: 12px; color: var(--ink-mute); margin-top: 6px; }
.form-foot {
  margin-top: 26px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
}
.form-foot a { color: var(--accent); }

/* ===== messages ===== */
.messages { margin: 0 0 24px; }
.messages .msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 14px;
  margin-bottom: 8px;
}
.messages .msg.error { border-color: #b03a2e; color: #b03a2e; }
.messages .msg.success { border-color: var(--accent); color: var(--accent); }

/* ===== back link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.back-link:hover { color: var(--accent); }

/* ===== book detail ===== */
.book-detail {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 56px;
  margin-top: 32px;
}
@media (max-width: 720px) {
  .book-detail { grid-template-columns: 1fr; gap: 32px; }
  .book-detail .cover-col { max-width: 240px; }
}
.book-detail .cover-col img,
.book-detail .cover-col .placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line-2);
}
.book-detail h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.book-detail .meta {
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}
.book-detail .meta span + span::before {
  content: " · ";
  margin: 0 4px;
  color: var(--ink-faint);
}
.book-detail .desc {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 640px;
}
.book-detail .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* expert note from the chef */
.editor-note {
  background: linear-gradient(135deg, #fbe9d2 0%, #f5dcc1 100%);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 28px;
  max-width: 640px;
}
.editor-note-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.editor-note-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}
.editor-note-body {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

/* generic info block (about author, etc.) */
.info-block {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin: 0 0 28px;
  max-width: 640px;
}
.info-block h3 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 14px;
}
.info-block-body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.bookmark-list {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.bookmark-list h3 {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin: 0 0 18px;
}
.bookmark-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.bookmark-item .page-no {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  color: var(--accent);
  min-width: 56px;
}
.bookmark-item .note {
  flex: 1;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
}
.bookmark-item .note.empty { color: var(--ink-faint); font-style: italic; }
.bookmark-item .del {
  background: transparent;
  border: 0;
  color: var(--ink-faint);
  font-size: 13px;
  padding: 2px 6px;
}
.bookmark-item .del:hover { color: #b03a2e; }
.bookmarks-empty {
  font-style: italic;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 15px;
}

/* ===== footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 calc(40px + env(safe-area-inset-bottom));
  margin-top: 80px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
  font-family: var(--serif);
  font-style: italic;
}
.site-footer a { color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.site-footer a:hover { color: var(--accent); border-color: var(--accent); }

/* ===== empty state ===== */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-mute);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
}

/* hidden attribute works on any element */
[hidden] { display: none !important; }

/* ===== reader ===== */
.reader {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  --reader-bg: var(--paper);
  --reader-fg: var(--ink);
  --reader-page-shadow: 0 2px 6px rgba(43, 31, 20, .12), 0 18px 40px -14px rgba(43, 31, 20, .22);
}
.reader.theme-dark {
  background: #1a1814;
  --reader-bg: #1a1814;
  --reader-fg: #e0d8c8;
  --reader-page-shadow: 0 2px 6px rgba(0,0,0,.4), 0 18px 40px -14px rgba(0,0,0,.6);
}
.reader.theme-dark .reader-header {
  background: rgba(26, 24, 20, 0.95);
  border-bottom-color: rgba(255,255,255,0.08);
  color: var(--reader-fg);
}
.reader.theme-dark .reader-header .title { color: var(--reader-fg); }
.reader.theme-dark .icon-btn { color: var(--reader-fg); }
.reader.theme-dark .icon-btn:hover { background: rgba(255,255,255,0.08); }
.reader.theme-dark .reader-page-canvas { filter: brightness(0.85) contrast(0.96); }
.reader.theme-dark .reader-page { background: #efe6d2; }
.reader.theme-dark .pages { color: rgba(255,255,255,0.6); }

/* mode/spread visibility */
.reader.mode-scroll .paged-only { display: none; }
.reader.mode-paged .scroll-only { display: none; }
.reader-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 241, 234, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  transition: transform var(--t);
}
.reader-header.hidden { transform: translateY(-100%); }
.reader-progress {
  position: sticky;
  top: 0;
  z-index: 29;
  height: 2px;
  background: transparent;
  pointer-events: none;
  margin-top: -2px;
}
.reader-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width .25s ease;
}
.reader-header .title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .reader-header .title { font-size: 13px; }
  .reader-header {
    padding: 10px 8px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-left: calc(8px + env(safe-area-inset-left, 0px));
    padding-right: calc(8px + env(safe-area-inset-right, 0px));
    gap: 6px;
  }
  .reader-header .controls { gap: 2px; }
  .reader-header .controls .pages { padding: 0 6px; font-size: 13px; }
  /* Apple HIG / Material — минимум 44×44 для тача. Икона остаётся 18px,
     растёт только hit-area. */
  .reader .icon-btn { width: 44px; height: 44px; }
  /* На мобиле прячем вторичные контролы — оставляем essentials:
     back, lang, prev/next, page-counter, search, bookmarks.
     Layout/theme/fullscreen/zoom — в landscape или на десктопе. */
  .reader-header .layout-toggle,
  .reader-header #theme-btn,
  .reader-header #fullscreen-btn,
  .reader-header .zoom-group { display: none; }
  /* Прячем title — на 390px он отнимает место у контролов; останется в title-bar браузера */
  .reader-header .title { display: none; }
  /* Резерв снизу — чтобы последняя страница не упиралась в home-indicator. */
  .reader-stage { padding-bottom: env(safe-area-inset-bottom, 0px); }
}
.reader-header .controls { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.reader-header .controls .pages {
  font-size: 13px; color: var(--ink-mute); padding: 0 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn[disabled] { color: var(--ink-faint); cursor: default; }
.icon-btn[disabled]:hover { background: transparent; }

.reader-stage {
  flex: 1;
  position: relative;
  overflow: auto;
  min-height: 0;
  scroll-behavior: smooth;
}

/* paged mode: pages container centered in viewport */
.reader.mode-paged .reader-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  perspective: 1500px;
}
.reader.mode-paged .reader-pages {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  transition: transform .26s cubic-bezier(.2,.7,.2,1), opacity .2s ease;
  transform-origin: center center;
}

/* Native (prerendered) reader — <img> page stack, vertical feed, no PDF.js.
 * Дефолтный aspect-ratio — A4 portrait, чтобы lazy-страницы занимали высоту
 * до загрузки и scrollIntoView/scrollTop приземлялись правильно.
 * JS уточнит реальный aspect после загрузки первой страницы. */
.reader-page-img {
  display: block;
  max-width: min(100%, 1200px);
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.41;
  margin: 0 auto 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}
/* .page-slot — обёртка img'а, создаваемая reader_prerendered.js. Базовая
 * геометрия здесь (нужна всегда, даже когда ru-page.css не подгружен).
 * Без этого slot получает 100% ширины, а img внутри max-width:1200px
 * центрируется через margin:auto — overlay/положение разъезжаются. */
.page-slot {
  position: relative;
  display: block;
  /* --page-zoom задаёт reader_prerendered.js (кнопки зума в EN-режиме). */
  max-width: min(100%, calc(1200px * var(--page-zoom, 1)));
  margin: 0 auto 14px;
}
.page-slot .reader-page-img {
  margin: 0;
}
/* Vertical scroll feed для prerendered ридера. */
.reader .reader-pages:has(.reader-page-img) {
  display: block;
  max-width: 100%;
}
.reader.mode-paged .reader-pages.flip-out-forward {
  transform: translateX(-32px) scale(0.97);
  opacity: 0;
}
.reader.mode-paged .reader-pages.flip-out-back {
  transform: translateX(32px) scale(0.97);
  opacity: 0;
}
.reader.mode-paged .reader-pages.flip-in-forward {
  animation: flipInFromRight .28s cubic-bezier(.2,.7,.2,1);
}
.reader.mode-paged .reader-pages.flip-in-back {
  animation: flipInFromLeft .28s cubic-bezier(.2,.7,.2,1);
}
@keyframes flipInFromRight {
  from { transform: translateX(40px) scale(0.97); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes flipInFromLeft {
  from { transform: translateX(-40px) scale(0.97); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .reader.mode-paged .reader-pages,
  .reader.mode-paged .reader-pages.flip-in-forward,
  .reader.mode-paged .reader-pages.flip-in-back {
    transition: none;
    animation: none;
  }
}

/* scroll mode: pages stacked vertically with gaps */
.reader.mode-scroll .reader-stage { padding: 12px 0 60px; }
.reader.mode-scroll .reader-pages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .reader.mode-paged .reader-stage { padding: 8px; }
  .reader.mode-scroll .reader-stage { padding: 8px 0 60px; }
  .reader.mode-scroll .reader-pages { gap: 24px; }
  .reader-page-img {
    box-shadow: 0 2px 14px rgba(0,0,0,0.14);
    border: 1px solid rgba(0,0,0,0.06);
  }
  .reader.theme-dark .reader-page-img {
    box-shadow: 0 2px 14px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.06);
  }
}

.reader-page {
  background: #fff;
  box-shadow: var(--reader-page-shadow);
  border-radius: var(--radius);
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}
.reader-page-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}
.reader-page-skeleton {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 14px;
  background: linear-gradient(135deg, #f5f1ea 0%, #ece6db 100%);
}
.reader.theme-dark .reader-page-skeleton {
  background: #2a2620;
  color: rgba(255,255,255,0.4);
}

/* tap zones — invisible left/right for page flipping (paged mode only) */
.reader-tap-zone {
  position: absolute;
  top: 0; bottom: 0;
  width: 35%;
  background: transparent;
  cursor: pointer;
  z-index: 5;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}
.reader-tap-zone.left { left: 0; }
.reader-tap-zone.right { right: 0; }
@media (hover: hover) {
  .reader-tap-zone:hover {
    background: linear-gradient(to right, rgba(43,31,20,.06), transparent);
  }
  .reader-tap-zone.right:hover {
    background: linear-gradient(to left, rgba(43,31,20,.06), transparent);
  }
}

/* search bar */
.reader-search {
  position: sticky;
  top: 0;
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--reader-bg);
  border-bottom: 1px solid var(--line);
}
.reader.theme-dark .reader-search { border-bottom-color: rgba(255,255,255,0.08); }
.reader-search[hidden] { display: none; }
.reader-search input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 14px;
  color: inherit;
  font-family: var(--sans);
  min-width: 0;
}
.reader.theme-dark .reader-search input { border-color: rgba(255,255,255,0.15); color: var(--reader-fg); }
.reader-search input:focus { outline: none; border-color: var(--accent); }
.reader-search .search-status {
  font-size: 12px;
  color: var(--ink-mute);
  min-width: 70px;
  white-space: nowrap;
}
.reader.theme-dark .reader-search .search-status { color: rgba(255,255,255,0.6); }
.reader-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-mute);
  z-index: 10;
  pointer-events: none;
}
.reader.theme-dark .reader-loading { color: rgba(255,255,255,0.55); }
.reader-loading[hidden] { display: none; }

.chef-loader {
  position: relative;
  width: 110px;
  height: 130px;
}
.chef-hat {
  position: absolute;
  bottom: 0;
  left: 5px;
  width: 100px;
  height: 110px;
  color: var(--accent);
  animation: hat-bob 2.4s cubic-bezier(.45,0,.55,1) infinite;
  filter: drop-shadow(0 2px 4px rgba(184, 85, 60, .25));
}
.reader.theme-dark .chef-hat { color: #e8a890; }

@keyframes hat-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-3px) rotate(1deg); }
}

.steam {
  position: absolute;
  bottom: 88px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  filter: blur(3px);
  animation: steam-rise 2.4s cubic-bezier(.45,.05,.55,.95) infinite;
}
.steam-1 { left: 28px; animation-delay: 0s; }
.steam-2 { left: 50px; animation-delay: 0.7s; width: 12px; height: 12px; }
.steam-3 { left: 72px; animation-delay: 1.4s; }

@keyframes steam-rise {
  0%   { opacity: 0; transform: translateY(0) scale(0.6); }
  20%  { opacity: 0.55; }
  60%  { opacity: 0.35; transform: translateY(-50px) scale(1.4); }
  100% { opacity: 0; transform: translateY(-90px) scale(2); }
}

.loader-bar {
  width: 160px;
  height: 3px;
  border-radius: 999px;
  background: rgba(184, 85, 60, 0.16);
  overflow: hidden;
  position: relative;
}
.reader.theme-dark .loader-bar { background: rgba(232, 168, 144, 0.18); }
.loader-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
  transition: width .3s ease;
  position: relative;
}
.reader.theme-dark .loader-bar > span { background: #e8a890; }
/* Indeterminate shimmer when no real progress data yet */
.loader-bar.indeterminate > span {
  width: 35% !important;
  animation: loader-slide 1.2s ease-in-out infinite;
}
@keyframes loader-slide {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(220%); }
  100% { transform: translateX(220%); }
}

.loader-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-align: center;
  min-height: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .chef-hat, .steam { animation: none; opacity: 0.7; }
}

/* drawer (bookmarks panel) */
.drawer-bg {
  position: fixed; inset: 0;
  background: rgba(43, 31, 20, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
  z-index: 60;
}
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(420px, 92vw);
  height: 100dvh;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 40px rgba(43, 31, 20, .14);
  transform: translateX(100%);
  transition: transform var(--t);
  z-index: 70;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer-head {
  padding: 22px 24px;
  padding-top: calc(22px + env(safe-area-inset-top, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer-head h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  margin: 0;
}
.drawer-body {
  padding: 20px 24px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
  overflow: auto;
  flex: 1;
}
.bookmark-add {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 24px;
}
.bookmark-add textarea {
  width: 100%;
  min-height: 70px;
  border: 0;
  padding: 0;
  background: transparent;
  resize: vertical;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.4;
}
.bookmark-add textarea:focus { outline: none; }
.bookmark-add .row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* simple "no access" page */
.lock {
  text-align: center;
  padding: 80px 20px;
  max-width: 480px;
  margin: 0 auto;
}
.lock h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 32px;
  margin: 0 0 14px;
}
.lock p {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 32px;
}

/* hide elements when needed */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* prevent text selection in reader (deterrent) */
.reader-page, .reader-page * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ========== Legal pages (oferta / privacy / refund / contacts / subscription) ========== */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 0 64px;
  font-family: var(--serif);
  color: var(--ink, #1a1a1a);
  line-height: 1.65;
}
.legal-head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line, #e6e0d4); }
.legal-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute, #8a8175);
  margin-bottom: 10px;
}
.legal-title { font-size: 30px; font-weight: 600; line-height: 1.25; margin: 0 0 10px; }
.legal-meta { font-family: var(--sans, "Inter", sans-serif); font-size: 13px; color: var(--ink-mute, #8a8175); }
.legal-body h2 { font-size: 20px; font-weight: 600; margin: 28px 0 12px; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 14px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--accent, #b85c2b); text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { text-decoration: none; }
.legal-note {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--paper-muted, #f0ead9);
  border-radius: 6px;
  font-size: 15px;
}
.legal-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.legal-contacts { margin: 0 0 14px; }
.legal-contacts dt { font-family: var(--sans, "Inter", sans-serif); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute, #8a8175); margin-top: 12px; }
.legal-contacts dd { margin: 4px 0 0; padding: 0; font-size: 17px; }

/* Footer extensions */
.footer-eyebrow {
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute, #8a8175);
}
.footer-links, .footer-contacts {
  margin-bottom: 8px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.9;
}
.footer-links a, .footer-contacts a { color: inherit; }
.footer-links .dot, .footer-contacts .dot { margin: 0 6px; color: var(--ink-mute, #8a8175); }
.footer-legal {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute, #8a8175);
}

/* Signup consent */
.field-consent { margin: 14px 0 18px; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.consent input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }
.consent a { color: var(--accent, #b85c2b); text-decoration: underline; }

/* ============================================================
   FAQ — accordion (details): закрыт по умолчанию, клик → ответ
   ============================================================ */
.faq {
  max-width: 820px;
  margin: 48px auto 40px;
  padding: 0 24px;
}
.faq-head { text-align: center; margin-bottom: 24px; }
.faq-eyebrow {
  font: 600 11px/1 var(--sans);
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.faq-title {
  font: 700 clamp(26px, 3.2vw, 36px)/1.15 var(--sans);
  letter-spacing: -0.02em; margin: 0; color: var(--ink);
}
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--line); }
/* ответы скрыты, пока details закрыт (native) */
.faq-item:not([open]) .faq-body { display: none; }
.faq-item > summary {
  list-style: none; cursor: pointer;
  padding: 16px 40px 16px 4px; position: relative;
  font: 600 16px/1.35 var(--sans);
  color: var(--ink); transition: color .15s ease;
  user-select: none;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: ""; position: absolute; top: 50%; right: 8px;
  width: 10px; height: 10px;
  border-right: 2px solid var(--ink-mute); border-bottom: 2px solid var(--ink-mute);
  transform: translateY(-65%) rotate(45deg);
  transition: transform .2s ease, border-color .15s ease;
}
.faq-item[open] > summary {
  color: var(--accent);
}
.faq-item[open] > summary::after {
  transform: translateY(-30%) rotate(-135deg);
  border-color: var(--accent);
}
.faq-item > summary:hover { color: var(--accent); }
.faq-item .faq-body {
  padding: 0 4px 16px;
  font: 400 15px/1.55 var(--sans);
  color: var(--ink-soft); max-width: 720px;
}
@media (max-width: 600px) {
  .faq { margin: 32px auto 28px; }
  .faq-item > summary { font-size: 15px; padding: 14px 36px 14px 0; }
  .faq-item .faq-body { font-size: 14px; }
}

/* ===== Поиск ===== */
.search-page { max-width: 760px; margin: 32px auto 64px; }
.search-page-title {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 18px;
}
.search-page-form {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 8px 10px 8px 14px;
}
.search-page-form:focus-within { border-color: var(--accent); }
.search-page-icon { width: 20px; height: 20px; color: var(--ink-mute); flex-shrink: 0; }
.search-page-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 16px; /* < 16px заставляет iOS зумить при фокусе */
  background: transparent;
  color: var(--ink);
}
.search-page-hint { margin-top: 18px; color: var(--ink-mute); font-size: 15px; line-height: 1.5; }
.search-section { margin-top: 30px; }
.search-section-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li + li { border-top: 1px solid var(--line); }
.search-results a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 4px;
  color: var(--ink);
}
.search-results a:hover { background: var(--paper-2); }
.search-result-title { font-weight: 500; }
.search-result-sub { color: var(--ink-mute); font-size: 13px; }
@media (max-width: 640px) {
  .search-page { margin-top: 22px; }
  .search-page-title { font-size: 27px; }
  .search-page-form { flex-wrap: wrap; }
  .search-page-form .btn { width: 100%; }
}

/* Бейдж «есть перевод» на обложке книги — по фирменному референсу:
   красный круг с белым RU в правом нижнем углу. */
.ru-badge {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d81f0f;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.26);
}
@media (max-width: 640px) {
  .ru-badge { width: 29px; height: 29px; font-size: 11.5px; right: 7px; bottom: 7px; }
}

/* Метка «раздел в тестовом режиме» в навигации */
.nav-beta {
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink-mute);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

/* ===== Таблицы техкарт калькулятора ===== */
.calc-table-wrap { overflow-x: auto; margin: 14px 0 18px; -webkit-overflow-scrolling: touch; }
.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 460px;
}
.calc-table th,
.calc-table td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}
.calc-table th {
  background: var(--paper-2);
  font-weight: 600;
  white-space: nowrap;
}
.calc-table tbody tr:nth-child(even) td { background: rgba(0, 0, 0, 0.015); }
.calc-md h2 { font-size: 20px; margin: 22px 0 8px; }
.calc-md h3 { font-size: 16px; margin: 18px 0 6px; }
.calc-md h4, .calc-md h5 { font-size: 14.5px; margin: 14px 0 6px; }
.calc-md p { margin: 0 0 10px; line-height: 1.6; }
.calc-md ul { margin: 0 0 12px; padding-left: 20px; }
.calc-md li { margin-bottom: 4px; line-height: 1.55; }

/* ===== Лента событий ===== */
.feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 10px;
}
.feed-title { font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.feed-sub { color: var(--ink-mute); font-size: 14px; margin-top: 6px; }

.feed-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  flex-shrink: 0;
}
.feed-toggle-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--ink-mute);
  cursor: pointer;
}
.feed-toggle-btn svg { width: 18px; height: 18px; }
.feed-toggle-btn:hover { background: var(--paper-2); color: var(--ink); }
.feed-toggle-btn.is-active { background: var(--paper-2); color: var(--ink); }

.feed-list { display: grid; gap: 18px; margin-top: 18px; }
.feed-view-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feed-view-list { grid-template-columns: 1fr; }

.feed-card {
  position: relative;
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
  color: var(--ink);
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.feed-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.feed-card-media { position: relative; background: var(--paper-2); overflow: hidden; }
.feed-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-card-ph {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
}
.feed-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.feed-card-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.feed-card-title { font-size: 17px; line-height: 1.3; font-weight: 600; }
.feed-card-summary {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-card-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: auto;
}
.feed-card-author svg { width: 15px; height: 15px; flex-shrink: 0; }
.feed-card-arrow { display: none; }

/* Сетка: фото сверху, описание не показываем — карточки одной высоты */
.feed-view-grid .feed-card { grid-template-rows: auto 1fr; }
.feed-view-grid .feed-card-media { aspect-ratio: 4 / 3; }
.feed-view-grid .feed-card-summary { display: none; }

/* Список: фото слева, описание и стрелка справа */
.feed-view-list .feed-card {
  grid-template-columns: 260px 1fr auto;
  align-items: center;
}
.feed-view-list .feed-card-media { height: 100%; min-height: 180px; }
.feed-view-list .feed-card-body { padding: 20px 24px; gap: 9px; }
.feed-view-list .feed-card-title { font-size: 20px; }
.feed-view-list .feed-card-author { margin-top: 4px; }
.feed-view-list .feed-card-arrow {
  display: block;
  padding: 0 26px 0 10px;
  font-size: 20px;
  color: var(--ink-mute);
}

@media (max-width: 900px) {
  .feed-view-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-view-list .feed-card { grid-template-columns: 190px 1fr; }
  .feed-view-list .feed-card-arrow { display: none; }
}
@media (max-width: 640px) {
  /* На телефоне — всегда одна колонка, независимо от выбранного вида */
  .feed-head { align-items: center; }
  .feed-title { font-size: 26px; }
  .feed-toggle { display: none; }
  .feed-view-grid,
  .feed-view-list { grid-template-columns: 1fr; }
  .feed-view-list .feed-card,
  .feed-view-grid .feed-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .feed-view-list .feed-card-media,
  .feed-view-grid .feed-card-media { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  .feed-view-list .feed-card-title { font-size: 17px; }
  .feed-view-list .feed-card-body { padding: 15px 16px 17px; }
  .feed-view-list .feed-card-summary { display: none; }
}

/* Лента на главной */
.feed-home { margin-top: 26px; }
.feed-home .feed-title { font-size: 30px; }
.feed-head-actions { display: flex; align-items: center; gap: 14px; }
.feed-all { font-size: 14px; color: var(--ink-mute); white-space: nowrap; }
.feed-all:hover { color: var(--ink); }
.feed-home-more { display: flex; justify-content: center; margin-top: 26px; }
@media (max-width: 640px) {
  .feed-home .feed-title { font-size: 24px; }
  .feed-all { font-size: 13px; }
}



/* ===== Сезонность ===== */
.season-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 16px;
}
.season-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.season-title { font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.season-sub { margin-top: 8px; color: var(--ink-mute); font-size: 14.5px; }
.season-matrix-link { flex-shrink: 0; }

/* Ряд месяцев */
.season-months {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.season-months::-webkit-scrollbar { display: none; }
.season-month {
  position: relative;
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}
.season-month:hover { background: var(--paper-2); color: var(--ink); }
.season-month.active { background: var(--ink); color: #fff; }
.season-month.active:hover { background: var(--ink); color: #fff; }
.season-month.is-now::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.season-month.active.is-now::after { background: #fff; }
.season-month-short { display: none; }

/* Категории месяца */
.season-grid {
  /* Колонки, а не grid: блоки разной высоты иначе оставляют пустоты */
  columns: 3;
  column-gap: 18px;
  margin-top: 18px;
}
.season-block { break-inside: avoid; margin-bottom: 18px; }
@media (max-width: 1100px) { .season-grid { columns: 2; } }
.season-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 18px 20px 14px;
}
.season-block-title {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.season-items { list-style: none; padding: 0; margin: 0; }
.season-items li { padding: 8px 0; border-top: 1px solid var(--line); }
.season-items li:first-child { border-top: 0; padding-top: 0; }
.season-item-title { font-size: 15px; font-weight: 500; }
.season-item-note {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-mute);
}
.season-items--inline li { border-top: 0; padding: 5px 0; }

.season-yearround {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  padding: 14px 18px;
}
.season-yearround summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
}
.season-yearround[open] summary { margin-bottom: 10px; }
.season-source {
  margin: 26px 0 40px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-mute);
  max-width: 640px;
}

/* Легенда и матрица */
.season-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 4px 0 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.season-legend span { display: inline-flex; align-items: center; gap: 8px; }
.season-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: inline-block;
}
.season-swatch--ru { background: #c6e0b4; }
.season-swatch--neighbor { background: #fce4d6; }

.season-matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.season-matrix { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.season-matrix th,
.season-matrix td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: center; }
.season-matrix thead th { position: sticky; top: 0; background: #fff; z-index: 2; font-weight: 600; }
.season-matrix thead th a { color: var(--ink); }
.season-matrix .season-matrix-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left;
  font-weight: 500;
  min-width: 210px;
  box-shadow: 1px 0 0 var(--line);
}
.season-matrix thead .season-matrix-name { z-index: 3; }
.season-matrix .season-matrix-cat th {
  background: var(--paper-2);
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-mute);
  position: sticky;
  left: 0;
}
.season-matrix .season-matrix-note { text-align: left; color: var(--ink-mute); font-size: 12.5px; min-width: 180px; }
.season-cell { width: 42px; }
.season-cell--ru { background: #c6e0b4; }
.season-cell--neighbor { background: #fce4d6; }
.season-matrix th.is-now { color: var(--accent); }
.season-cell.is-now { box-shadow: inset 0 0 0 1px rgba(240, 90, 40, 0.35); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .season-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .season-title { font-size: 26px; }
  .season-month { padding: 8px 11px; font-size: 13px; }
  .season-month-full { display: none; }
  .season-month-short { display: inline; }
  .season-grid { columns: 1; }
  .season-block { margin-bottom: 14px; }
  .season-matrix-name { min-width: 150px; }
}

/* ===== Посолы ===== */
.cure-head { margin: 26px 0 18px; }
.cure-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}
.cure-method {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 18px 20px;
}
.cure-method h2 { font-size: 17px; margin-bottom: 8px; }
.cure-method p { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }

.cure-section { margin-bottom: 44px; scroll-margin-top: 112px; }
.cure-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.cure-section-head h2 { font-family: var(--serif); font-size: 25px; }
.cure-counter { font-size: 13px; color: var(--ink-mute); white-space: nowrap; }
.cure-hint { font-size: 14px; line-height: 1.55; color: var(--ink-mute); margin-bottom: 14px; max-width: 640px; }

.cure-filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.cure-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 14px;
  max-width: 520px;
}
.cure-search svg { width: 18px; height: 18px; color: var(--ink-mute); flex-shrink: 0; }
.cure-search input {
  border: 0;
  outline: none;
  font: inherit;
  font-size: 16px;
  background: transparent;
  width: 100%;
}
.cure-filter-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cure-filter-row .chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.cure-filter-row .chip:hover { border-color: var(--ink-mute); color: var(--ink); }
.cure-filter-row .chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.cure-list { display: flex; flex-direction: column; gap: 8px; }
.cure-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
}
.cure-card[hidden] { display: none; }
.cure-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.cure-card > summary::-webkit-details-marker { display: none; }
.cure-card[open] > summary { border-bottom: 1px solid var(--line); }
.cure-card-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cure-card-title { font-weight: 500; font-size: 15.5px; }
.cure-card-agent { font-size: 13px; color: var(--ink-mute); }
.cure-card-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cure-card-time { font-weight: 600; font-size: 15px; white-space: nowrap; }
.cure-badge {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.cure-badge--wet { background: #dceaf6; color: #2c5470; }
.cure-badge--dry { background: #f2e6d6; color: #7a5730; }

.cure-card-body { padding: 14px 18px 16px; }
.cure-card-body dl { display: grid; gap: 10px; margin: 0; }
.cure-card-body dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }
.cure-card-body dt { font-size: 13px; color: var(--ink-mute); }
.cure-card-body dd { margin: 0; font-size: 14.5px; }
.cure-card-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--paper-2);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.cure-empty { color: var(--ink-mute); font-size: 14px; padding: 18px 2px; }

.cure-calc {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}
.cure-calc label { display: flex; flex-direction: column; gap: 6px; }
.cure-calc label span { font-size: 13px; color: var(--ink-mute); }
.cure-calc input {
  width: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
}
.cure-calc-unit { color: var(--ink-mute); font-size: 14px; padding-bottom: 11px; }

.cure-recipes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.cure-recipe {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 16px 18px 12px;
  scroll-margin-top: 120px;
}
.cure-recipe:target { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 90, 40, 0.12); }
.cure-recipe h3 { font-size: 16px; margin-bottom: 4px; }
.cure-recipe-base { font-size: 12.5px; color: var(--ink-mute); margin-bottom: 10px; }
.cure-recipe-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cure-recipe-table th {
  text-align: left;
  font-weight: 400;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.cure-recipe-table td { padding: 7px 0; border-top: 1px solid var(--line); text-align: right; }
.cure-recipe-table tr:first-child th,
.cure-recipe-table tr:first-child td { border-top: 0; }
.cure-recipe-pct { color: var(--ink-mute); width: 74px; }
.cure-recipe-gram { font-weight: 600; width: 88px; }

.cure-timing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.cure-timing-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 16px 18px;
}
.cure-timing-card h3 { font-size: 14px; margin-bottom: 10px; line-height: 1.35; }
.cure-timing-card table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cure-timing-card th {
  text-align: left;
  font-weight: 400;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.cure-timing-card td { text-align: right; padding: 7px 0; border-top: 1px solid var(--line); font-weight: 500; }
.cure-timing-card tr:first-child th,
.cure-timing-card tr:first-child td { border-top: 0; }

.cure-rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 820px; }
.cure-rules li {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 14px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .cure-methods { grid-template-columns: 1fr; }
  .cure-card > summary { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cure-card-meta { gap: 10px; }
  .cure-card-body dl > div { grid-template-columns: 1fr; gap: 2px; }
  .cure-section-head h2 { font-size: 21px; }
  .cure-recipes { grid-template-columns: 1fr; }
}

/* ===== Текстуры ===== */
.chip-count { opacity: 0.55; font-size: 12px; margin-left: 3px; }
.cure-back { margin: 22px 0 10px; font-size: 14px; }

.tex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.tex-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 18px 20px;
  color: var(--ink);
  transition: box-shadow var(--t-fast), transform var(--t-fast);
}
.tex-card[hidden] { display: none; }
.tex-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.tex-card-title { font-size: 17px; font-weight: 600; line-height: 1.25; }
.tex-card-alt { font-size: 12.5px; color: var(--ink-mute); margin-top: -4px; }
.tex-card-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tex-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.tex-tag {
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink-soft);
}
.tex-card-dose { font-size: 12.5px; color: var(--ink-mute); }

.tex-detail-head { margin: 6px 0 20px; }
.tex-detail-alt { color: var(--ink-mute); font-size: 15px; margin: 6px 0 10px; }
.tex-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
  margin-bottom: 40px;
}
.tex-block { margin-bottom: 26px; }
.tex-block h2 { font-size: 17px; margin-bottom: 10px; }
.tex-text { font-size: 15px; line-height: 1.62; color: var(--ink-soft); }
.tex-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.tex-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.55;
}
.tex-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.tex-block--warn .tex-list li::before { background: #d08a3c; }
.tex-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.tex-steps li { font-size: 14.5px; line-height: 1.55; }
.tex-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tex-chips span {
  font-size: 13px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.tex-detail-side { display: grid; gap: 18px; position: sticky; top: 112px; }
.tex-calc,
.tex-specs {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 18px 20px;
}
.tex-calc h2,
.tex-specs h2 { font-size: 16px; margin-bottom: 10px; }
.tex-calc-hint { font-size: 13px; color: var(--ink-mute); line-height: 1.5; margin-bottom: 12px; }
.tex-calc-modes { display: grid; gap: 7px; margin-bottom: 14px; }
.tex-calc-mode { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.tex-calc-mode input { margin-top: 3px; accent-color: var(--accent); }
.tex-calc-input { display: flex; flex-direction: column; gap: 6px; }
.tex-calc-input span { font-size: 13px; color: var(--ink-mute); }
.tex-calc-input input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
}
.tex-calc-result {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 600;
}
.tex-spec + .tex-spec { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tex-spec h3 { font-size: 13px; color: var(--ink-mute); margin-bottom: 6px; font-weight: 500; }
.tex-spec ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.tex-spec li { font-size: 14px; line-height: 1.5; }

@media (max-width: 900px) {
  .tex-detail { grid-template-columns: 1fr; }
  .tex-detail-side { position: static; }
}
@media (max-width: 640px) {
  .tex-grid { grid-template-columns: 1fr; }
}

/* FAQ на главной свёрнут — раскрывается кликом по заголовку */
.faq-fold > summary { cursor: pointer; list-style: none; position: relative; }
.faq-fold > summary::-webkit-details-marker { display: none; }
.faq-fold-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-mute);
}
.faq-fold-hint::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform var(--t-fast);
}
.faq-fold[open] .faq-fold-hint::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-fold[open] .faq-fold-hint { color: var(--ink); }
.faq-fold[open] .faq-list { margin-top: 18px; }

/* Обложка-заглушка для ленты: карточки без фото больше не пустые */
.feed-card-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px;
  background: linear-gradient(150deg, #f6efe4 0%, #ecdfcd 55%, #e3d2ba 100%);
  color: #6b5637;
}
.feed-card-media--routine .feed-card-cover { background: linear-gradient(150deg, #eef1f6 0%, #dfe5ef 55%, #ccd6e6 100%); color: #445273; }
.feed-card-media--sousvide .feed-card-cover { background: linear-gradient(150deg, #eaf4f2 0%, #d7ebe7 55%, #c2e0da 100%); color: #2f6259; }
.feed-card-media--book .feed-card-cover { background: linear-gradient(150deg, #f7ece9 0%, #f0d9d2 55%, #e6c3b8 100%); color: #7a4638; }
.feed-card-media--masterclass .feed-card-cover { background: linear-gradient(150deg, #f2eef7 0%, #e4dcf0 55%, #d3c7e6 100%); color: #533f74; }
.feed-card-cover-mark { width: 30px; height: 30px; opacity: 0.85; margin-bottom: auto; }
.feed-card-cover-mark svg { width: 100%; height: 100%; display: block; }
.feed-card-cover-title {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.24;
  color: inherit;
}
.feed-card-cover-kind {
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.72;
}
/* Фото ложится поверх обложки-подложки */
.feed-card-media img { position: relative; z-index: 1; }
.feed-view-list .feed-card-cover-title { font-size: 22px; }
@media (max-width: 640px) {
  .feed-card-cover { padding: 15px; }
  .feed-card-cover-title { font-size: 18px; }
}
