@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/fraunces-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/fraunces-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/fraunces-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nunitosans-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/nunitosans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/nunitosans-cyrillic-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/nunitosans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nunitosans-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/nunitosans-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/nunitosans-cyrillic-800.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/nunitosans-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Ты справишься — design tokens
   Palette: warm sage-grey background, dusty periwinkle accent,
   honey-amber warmth (the "nerve counter" glow), muted coral
   for rare emphasis. Feels like a well-thumbed pocket guide,
   not a clinical dashboard.
   ============================================================ */

:root {
  --bg: #F1F0EA;
  --surface: #FBFAF6;
  --surface-raised: #FFFFFF;
  --ink: #33313D;
  --ink-soft: #6B6876;
  --line: #E3E0D6;

  --accent: #6E7FA3;
  --accent-ink: #3E4A63;
  --accent-soft: #E4E8F0;
  --support-button-bg: #3E4A63;

  --warm: #E3A857;
  --warm-ink: #7A5416;
  --warm-button-ink: #33313D;
  --warm-soft: #FBF0DD;

  --coral: #A24F4A;
  --coral-soft: #F8E7E5;

  --sage: #93A889;
  --sage-soft: #E9EFE6;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-card: 0 1px 2px rgba(51,49,61,0.04), 0 6px 16px rgba(51,49,61,0.06);
  --shadow-pop: 0 8px 28px rgba(51,49,61,0.14);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-w: 480px;
}

[data-theme="dark"] {
  --bg: #20222B;
  --surface: #2A2C37;
  --surface-raised: #31333F;
  --ink: #EDEAE0;
  --ink-soft: #A9A6B4;
  --line: #3C3E4A;

  --accent: #8FA3C9;
  --accent-ink: #DCE4F2;
  --accent-soft: #333B4E;
  --support-button-bg: #3E4A63;

  --warm: #E9B96C;
  --warm-ink: #FCEBCB;
  --warm-button-ink: #33313D;
  --warm-soft: #3B3320;

  --coral: #E29C95;
  --coral-soft: #3B2827;

  --sage: #A9C09E;
  --sage-soft: #263226;

  --shadow-card: 0 1px 2px rgba(0,0,0,0.2), 0 6px 20px rgba(0,0,0,0.28);
  --shadow-pop: 0 10px 30px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: var(--max-w);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 84px;
}

#screen.screen-enter {
  animation: screen-enter 260ms cubic-bezier(0.23, 1, 0.32, 1);
}

h1[tabindex="-1"]:focus { outline: none; }
h1[tabindex="-1"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@keyframes screen-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- Icons (inline SVG, sized via parent font-size like the emoji they replace) ---------- */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex: none;
}
.nerve-counter__label .icon { width: 1.3em; height: 1.3em; vertical-align: -0.28em; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 6px;
}

.topbar__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.icon-btn {
  border: none;
  background: var(--surface);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

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

/* ---------- Offline banner ---------- */
.offline-banner {
  display: none;
  margin: 0 20px;
  padding: 8px 14px;
  background: var(--warm-soft);
  color: var(--warm-ink);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.offline-banner.show { display: block; }

/* ---------- Nerve counter — signature element ---------- */
.nerve-counter {
  margin: 14px 20px 6px;
  padding: 18px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 16px;
}

.nerve-counter__glow {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.nerve-counter__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--warm), var(--warm) 45%, transparent 70%);
  animation: breathe 3.6s ease-in-out infinite;
  opacity: 0.9;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.86); opacity: 0.65; }
  50% { transform: scale(1.04); opacity: 1; }
}

.nerve-counter__num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--warm-ink);
}

.nerve-counter__num.pop {
  animation: counter-pop 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes counter-pop {
  from { transform: scale(0.8); opacity: 0.6; }
  to { transform: scale(1); opacity: 1; }
}

.nerve-counter__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nerve-counter__label {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

.nerve-counter__sub {
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---------- Section label ---------- */
.section-label {
  margin: 18px 20px 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Category grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 4px 20px 12px;
}

.category-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 96px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  opacity: 0;
  animation: card-enter 220ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: min(calc(var(--i, 0) * 50ms), 300ms);
}

.category-card:active { transform: scale(0.97); }

@keyframes card-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.category-grid.no-stagger .category-card {
  animation: none;
  opacity: 1;
}

.category-card__icon { font-size: 26px; }

.category-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
}

.category-card__count {
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- List screens (category / favorites) ---------- */
.screen-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 4px;
}

.back-btn {
  border: none;
  background: var(--surface);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.screen-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 20px 12px;
}

.scenario-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 12px;
}

.scenario-card__body { flex: 1; min-width: 0; }

.scenario-card__title {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 3px;
}

.scenario-card__short {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.3;
}

.scenario-card__chev {
  font-size: 16px;
  color: var(--ink-soft);
}

.category-intro {
  margin: 4px 20px 6px;
  padding: 14px 16px;
  background: var(--sage-soft);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- Feedback banner (end of list) ---------- */
.feedback-banner {
  margin: 6px 20px 20px;
  padding: 16px;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-ink);
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  width: calc(100% - 40px);
}

/* ---------- Scenario detail ---------- */
.scenario-detail { padding: 0 20px 10px; }

.scenario-detail__title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  margin: 6px 0 12px;
  line-height: 1.2;
}

.block {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.block__eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.block--looks .block__eyebrow { color: var(--ink-soft); }
.block--function .block__eyebrow { color: var(--accent-ink); }
.block--function { background: var(--accent-soft); }

.block p { margin: 0; font-size: 14.5px; line-height: 1.55; }

/* Strategies — первый блок сценария (кризис: сначала действия): крупнее */
.block--strategies { padding: 18px 16px; }
.block--strategies .strategy-group__label { font-size: 13px; }
.block--strategies .strategy__title { font-size: 16px; margin-bottom: 5px; }
.block--strategies .strategy__text { font-size: 15px; line-height: 1.6; }
.strategy-group__emoji { font-size: 19px; line-height: 1; }

.strategy-group { margin-bottom: 2px; }
.strategy-group:last-child { margin-bottom: 0; }
.strategy-group__label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 14px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.strategy-group:first-child .strategy-group__label { margin-top: 0; }
.strategy-group .strategy { border-top: 1px solid var(--line); padding: 12px 0; }
.strategy-group .strategy:first-child { border-top: none; padding-top: 2px; }

.strategy__title {
  font-weight: 800;
  font-size: 14.5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.strategy__title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}

.strategy__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-line;
}

.phrase-block {
  background: var(--warm-soft);
  color: var(--warm-ink);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.5;
  font-style: italic;
  position: relative;
}

.phrase-block::before {
  content: "“";
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 0;
  color: var(--warm);
  position: absolute;
  top: 22px;
  left: 10px;
  opacity: 0.6;
}
.phrase-block__inner { position: relative; padding-left: 22px; }

/* ---------- Action row ---------- */
.action-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn {
  flex: 1;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  min-height: 44px;
  min-width: 44px;
  font-weight: 800;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn--primary { background: var(--warm); color: var(--warm-button-ink); position: relative; }
.btn--ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
.btn { transition: transform 160ms ease-out; }
.btn:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); transition: transform 200ms ease-out; }
}

/* ---------- "Помогло" celebration ---------- */
.btn--primary.celebrate {
  animation: btn-bounce 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes btn-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.helped-heart {
  position: absolute;
  top: -6px;
  left: 50%;
  font-size: 16px;
  pointer-events: none;
  animation: heart-pop 480ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes heart-pop {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.9); }
  40% { opacity: 1; transform: translate(-50%, -10px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -24px) scale(1); }
}

.fav-toggle {
  border: none;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
}
.fav-toggle.active { background: var(--coral-soft); color: var(--coral); }

/* ---------- Empty state ---------- */
.empty-state {
  margin: 40px 24px;
  text-align: center;
  color: var(--ink-soft);
}
.empty-state__emoji { font-size: 40px; margin-bottom: 10px; display: block; }
.empty-state__title { font-family: var(--font-display); font-size: 17px; color: var(--ink); margin: 0 0 6px; }
.empty-state__sub { font-size: 13.5px; line-height: 1.5; }
.empty-state .btn { margin-top: 18px; }

/* ---------- About screen ---------- */
.about-body { padding: 6px 20px 20px; font-size: 14.5px; line-height: 1.6; }
.about-body p { margin: 0 0 14px; }
.about-h2 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin: 22px 0 10px;
}

/* ---------- About (стиль лендинга) ---------- */
.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 4px 6px;
}
.about-hero__logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  margin-bottom: 14px;
}
.about-hero__logo img { width: 100%; height: 100%; object-fit: contain; }
.about-hero__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
}
.about-hero__sub {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 320px;
}
.about-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 6px;
}
.about-metric {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.about-metric__num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-ink);
  line-height: 1;
  margin-bottom: 4px;
}
.about-metric__label { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); line-height: 1.3; }
.about-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  margin: 12px 0;
}
.about-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.about-card p { margin: 0 0 8px; font-size: 14px; }
.about-card p:last-child { margin-bottom: 0; }
.about-card--accent { border-top: 3px solid var(--accent); }
.about-card--warm { border-top: 3px solid var(--warm); }

.support-btn {
  display: block;
  text-align: center;
  background: var(--support-button-bg);
  color: #fff;
  padding: 15px;
  min-height: 48px;
  border-radius: var(--radius-md);
  font-weight: 800;
  margin: 14px 0;
}
.legal-note { font-size: 12px; color: var(--ink-soft); }

.red-flags { margin: 0 0 14px; padding-left: 20px; }
.red-flags li { margin-bottom: 8px; line-height: 1.5; }

/* ---------- Safety (правила безопасности) ---------- */
.safety-list { margin: 0 0 14px; padding-left: 20px; }
.safety-list li { margin-bottom: 12px; line-height: 1.55; }
.safety-list li::marker { color: var(--coral); }

/* ---------- SOS ---------- */
.sos-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 20px 4px;
  padding: 14px;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: var(--coral-soft);
  color: var(--coral);
  font-weight: 800;
  font-size: 15px;
  text-align: center;
}
.sos-button:active { transform: scale(0.97); }

/* ---------- Search + recent (home) ---------- */
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 20px 4px;
  padding: 0 16px;
  min-height: 48px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.search-field .icon { width: 20px; height: 20px; color: var(--ink-soft); flex: none; }
.search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  min-height: 44px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search-field input::placeholder { color: var(--ink-soft); }
.search-field:focus-within { box-shadow: var(--shadow-card), 0 0 0 2px var(--accent-soft); }

/* Карусель «Недавние»: горизонтальный scroll-snap, сплошные карточки ~132px */
.recent-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 20px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.recent-carousel::-webkit-scrollbar { height: 4px; }
.recent-carousel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.recent-card {
  flex: 0 0 132px;
  scroll-snap-align: start;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.recent-card__icon { font-size: 20px; line-height: 1.2; }
.recent-card__title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
}
.recent-card__cat { font-size: 12px; color: var(--ink-soft); }

/* ---------- «Потом» (отложенные сценарии): карточка + кнопка «убрать» ---------- */
.later-card { position: relative; }
.later-card__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 44px;
}
.later-card .recent-card__title { padding-right: 26px; } /* не уходит под ✕ */
.later-card__remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.later-card__remove:hover { color: var(--coral); }
.later-card__remove:active { transform: scale(0.94); }

.hidden { display: none !important; }

.sos-body { padding: 6px 20px 20px; }
.sos-subtitle { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin: 0 0 18px; }

.sos-step {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}
.sos-step__num {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sos-step__title { font-weight: 800; margin-bottom: 4px; }
.sos-step__text { margin: 0; font-size: 14.5px; line-height: 1.55; }

.sos-footer { margin-top: 20px; text-align: center; }
.sos-footer p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 10px; }
.sos-footer .btn { display: inline-block; }

/* ---------- Feedback form ---------- */
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  resize: vertical;
}
.form-field textarea { min-height: 90px; }
/* Honeypot: скрытое поле для ботов — невидимо людям (offscreen, не display:none) */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  background: var(--surface-raised);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 10;
}

.nav-item {
  flex: 1;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  min-height: 48px;
  min-width: 44px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.nav-item.active { color: var(--accent-ink); background: var(--accent-soft); }
.nav-item__icon { font-size: 19px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 92px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  max-width: calc(var(--max-w) - 40px);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .nerve-counter__ring { animation: none; }
  .nerve-counter__num.pop { animation: none; }
  .category-card { animation: fade-only 150ms forwards; animation-delay: 0ms; }
  #screen.screen-enter { animation: fade-only 150ms; }
  .btn--primary.celebrate { animation: none; }
  .helped-heart { animation: none; opacity: 0; }
  .btn:hover, .category-card:active { transform: none; }
}

@keyframes fade-only {
  from { opacity: 0; }
  to { opacity: 1; }
}
