/* Выговорись — визуальная система.
   Тёплая «бумажная» палитра, заголовки с засечками, спокойный ритм.
   Только системные шрифты: никаких запросов к сторонним серверам. */

:root {
  --bg: #f6f1e9;
  --paper: #fffdf9;
  --ink: #26222b;
  --ink-soft: #4a4450;
  --muted: #776f7a;
  --line: #e6ddd0;
  --line-strong: #d6c9b8;
  --accent: #b4502b;
  --accent-hover: #943f20;
  --accent-ink: #fff;
  --accent-soft: #f5e3d5;
  --plum: #5d4b6e;
  --plum-soft: #ece6f0;
  --sage: #4f6f5d;
  --sage-soft: #e3ece5;
  --danger: #a3312c;
  --danger-soft: #f8e1df;
  --focus: #d9895f;
  --shadow: 0 1px 2px rgba(60, 40, 20, .04), 0 8px 28px rgba(60, 40, 20, .06);
  --shadow-lift: 0 2px 4px rgba(60, 40, 20, .05), 0 16px 40px rgba(60, 40, 20, .10);
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "PT Serif", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}


/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--paper); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }

.kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }

/* ---------- Кнопки ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 15px; text-decoration: none; line-height: 1.2;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.button:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(180, 80, 43, .25); }
.button:active { transform: none; }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.button.ghost:hover { background: var(--paper); box-shadow: none; border-color: var(--ink-soft); }
.button.danger { background: var(--danger); color: #fff; }
.button.danger:hover { background: var(--danger); filter: brightness(1.08); box-shadow: none; }
.button.small { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.button.wide { width: 100%; }

.link { color: var(--accent); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; line-height: 1; }
.brand b { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-link { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-soft); }
.nav-link:hover, .nav-link[aria-current] { color: var(--ink); }
.nav-link[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Главная: вступление ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding: 64px 0 40px; }
.hero h1 { font-size: clamp(40px, 5.4vw, 66px); letter-spacing: -.025em; margin: 16px 0 20px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-lead { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.hero-notes { position: relative; height: 340px; }
.note {
  position: absolute; width: min(300px, 88%);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-lift);
  font-family: var(--serif); font-size: 18px; line-height: 1.5; color: var(--ink-soft);
}
.note small { display: block; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.note-a { top: 6px; right: 24px; transform: rotate(3deg); }
.note-a small { color: var(--plum); }
.note-b { top: 150px; right: 120px; transform: rotate(-4deg); }
.note-b small { color: var(--sage); }
.note-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.note-chips span { font-family: var(--sans); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.principles { list-style: none; margin: 0 0 8px; padding: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principles li { display: flex; gap: 14px; align-items: flex-start; }
.principles .icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--paper); border: 1px solid var(--line); }
.principles strong { display: block; font-size: 15px; }
.principles span { font-size: 14px; color: var(--muted); }

/* ---------- Главная: лента ---------- */
.library { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding: 48px 0 80px; align-items: start; }
.sidebar { position: sticky; top: 92px; }
.sidebar h2 { font-size: 15px; font-family: var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.search { position: relative; margin-bottom: 28px; }
.search input { width: 100%; height: 46px; padding: 0 46px 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); }
.search input::placeholder { color: var(--muted); }
.search button { position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.search svg { width: 17px; height: 17px; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.topic { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 15px; }
.topic:hover { background: var(--paper); color: var(--ink); }
.topic.active { background: var(--ink); color: var(--bg); }
.side-cta { margin-top: 28px; padding: 20px; border-radius: var(--radius); background: var(--accent-soft); }
.side-cta p { font-family: var(--serif); font-size: 17px; line-height: 1.45; margin-bottom: 14px; }

.feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.feed-head h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -.015em; }
.feed-head .muted { font-size: 14px; white-space: nowrap; }
.clear-filter { font-size: 14px; }
.feed { display: grid; gap: 16px; }

.story {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px 22px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.story:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.story-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--plum); }
.dot::before { content: "·"; margin-right: 10px; }
.story h3 { font-size: 23px; margin: 10px 0 10px; letter-spacing: -.01em; }
.story h3 a { text-decoration: none; }
.story h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* вся карточка — ссылка */
.story h3 a:focus-visible { outline: none; }
.story:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.story-preview { color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.story-foot { display: flex; align-items: center; gap: 16px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.story-foot .read { margin-left: auto; color: var(--accent); font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--sage-soft); color: var(--sage); font-size: 13px; font-weight: 600; }

.empty { text-align: center; padding: 56px 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
.empty h3 { font-size: 26px; margin-bottom: 10px; }
.empty p { color: var(--muted); max-width: 30em; margin: 0 auto 22px; }

/* ---------- Страницы-колонки ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 48px 0 88px; }
.back { display: flex; width: fit-content; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; margin-bottom: 28px; }
.back:hover { color: var(--ink); }
.page-title { font-size: clamp(34px, 4.6vw, 50px); letter-spacing: -.02em; margin: 12px 0 14px; }
.lead { font-size: 18px; color: var(--ink-soft); margin-bottom: 28px; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 22px; margin-bottom: 6px; }
.panel-sub { color: var(--muted); font-size: 15px; margin-bottom: 18px; }

/* ---------- История ---------- */
.article { padding: 40px 48px 44px; }
.article .story-meta { margin-bottom: 18px; }
.article h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.02em; margin-bottom: 26px; }
.bodytext { font-family: var(--serif); font-size: 19px; line-height: 1.75; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

.reacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.react {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg);
  text-align: left; font-weight: 600; transition: border-color .15s, background .15s, transform .15s;
}
.react:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.react .emoji { font-size: 22px; line-height: 1; }
.react .count { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.choices { display: grid; gap: 10px; }
.choice {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg);
  text-align: left; font-weight: 600;
}
.choice .bar { position: absolute; inset: 0 auto 0 0; background: var(--sage-soft); z-index: 0; transition: width .4s; }
.choice > span:not(.bar) { position: relative; z-index: 1; }
.choice .pct { font-variant-numeric: tabular-nums; color: var(--sage); font-weight: 700; white-space: nowrap; }
.choice:hover { border-color: var(--sage); }
.poll-note { font-size: 14px; color: var(--muted); margin-top: 12px; }

.report summary { cursor: pointer; color: var(--muted); font-size: 15px; font-weight: 600; list-style: none; display: inline-flex; gap: 8px; align-items: center; }
.report summary::-webkit-details-marker { display: none; }
.report summary:hover { color: var(--ink); }
.report[open] summary { margin-bottom: 14px; }
.report form { display: flex; gap: 10px; flex-wrap: wrap; }
.report select { flex: 1; min-width: 200px; }

.next { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding: 26px 28px; border-radius: var(--radius); background: var(--ink); color: var(--bg); }
.next p { font-family: var(--serif); font-size: 21px; }

/* ---------- Помощь ---------- */
.help { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius); background: var(--plum-soft); color: var(--ink-soft); font-size: 15px; margin-top: 24px; }
.help .icon { flex: none; font-size: 22px; line-height: 1.3; }
.help strong { color: var(--ink); }
.help a { color: var(--plum); font-weight: 700; white-space: nowrap; }

/* ---------- Форма ---------- */
.field { display: block; margin-bottom: 22px; }
.field > span:first-child { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.hint { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
input, textarea, select {
  display: block; width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--paper); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
input:hover, textarea:hover, select:hover { border-color: var(--muted); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { resize: vertical; min-height: 260px; font-family: var(--serif); font-size: 18px; line-height: 1.7; }
.title-input { font-family: var(--serif); font-size: 21px; font-weight: 700; }

.topic-picker { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0 0 22px; }
.topic-picker legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; padding: 0; }
.topic-picker label { position: relative; }
.topic-picker input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.topic-picker span { display: inline-block; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); font-weight: 600; font-size: 14px; transition: all .15s; }
.topic-picker input:hover + span { border-color: var(--ink-soft); }
.topic-picker input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.topic-picker input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.counter-row { display: flex; justify-content: space-between; gap: 12px; }
.counter { font-variant-numeric: tabular-nums; }
.counter.warn { color: var(--accent); font-weight: 700; }

.poll-box { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; margin: 6px 0 24px; background: var(--bg); }
.poll-box h3 { font-size: 19px; margin-bottom: 4px; }
.poll-box p { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.poll-box .field:last-child { margin-bottom: 0; }

.rules { font-size: 14px; color: var(--muted); margin: 4px 0 18px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tips { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.tips li { display: flex; gap: 12px; font-size: 15px; color: var(--ink-soft); }
.tips li::before { content: "✓"; color: var(--sage); font-weight: 700; }

/* ---------- Сообщения ---------- */
.message { text-align: center; max-width: 560px; }
.message .seal { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 22px; font-size: 32px; background: var(--accent-soft); color: var(--accent); }
.message .seal.ok { background: var(--sage-soft); color: var(--sage); }
.message p { font-size: 18px; color: var(--ink-soft); margin-bottom: 28px; }
.message .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.secret { text-align: left; margin: 0 0 28px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--paper); }
.secret strong { display: block; margin-bottom: 10px; }
.secret code { display: block; padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.secret small { display: block; color: var(--muted); margin-top: 10px; font-size: 13px; }
.copy-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.error-text { color: var(--danger); background: var(--danger-soft); padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 15px; }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0 40px; font-size: 14px; color: var(--muted); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; }
.footer .brand { font-size: 22px; color: var(--ink); }
.footer-tag { margin-top: 8px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--ink); }
.footer-note { grid-column: 1 / -1; max-width: 760px; font-size: 13px; }

/* ---------- Модерация ---------- */
.admin { padding: 40px 0 80px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.admin-head h1 { font-size: 34px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; padding: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; width: fit-content; max-width: 100%; }
.tabs a { padding: 8px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-soft); }
.tabs a:hover { background: var(--bg); }
.tabs a.active { background: var(--ink); color: var(--bg); }
.tabs .n { opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
.alerts { padding: 18px 20px; border-radius: var(--radius); background: var(--danger-soft); margin-bottom: 24px; }
.alerts strong { color: var(--danger); }
.alerts ul { margin: 8px 0 0; padding-left: 20px; }
.mod-list { display: grid; gap: 16px; }
.mod-card .bodytext { font-size: 16px; line-height: 1.65; max-height: 340px; overflow: auto; margin: 6px 0 16px; padding-right: 8px; }
.flag { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 700; margin-top: 10px; }
.mod-card h3 { font-size: 22px; margin: 10px 0 0; }
.mod-poll { font-size: 15px; color: var(--ink-soft); margin-bottom: 16px; }
.modactions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
.modactions form { margin: 0; }
.btn-approve { background: var(--sage); color: #fff; }
.btn-approve:hover { background: var(--sage); filter: brightness(1.1); box-shadow: none; }

/* ---------- Адаптивность ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 44px 0 28px; }
  .hero-notes { display: none; }
  .library { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
  .library > * { min-width: 0; }
  .sidebar { position: static; }
  .sidebar h2 { display: none; }
  .search { margin-bottom: 14px; }
  .topics { display: flex; gap: 8px; overflow-x: auto; margin: 0 -24px; padding: 2px 24px 8px; scrollbar-width: none; }
  .topics::-webkit-scrollbar { display: none; }
  .topic { white-space: nowrap; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 14px; font-size: 14px; }
  .side-cta { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 18px; }
  .topics { margin: 0 -18px; padding: 2px 18px 8px; }
  .nav { height: 60px; }
  .brand { font-size: 23px; }
  .nav-link { display: none; }
  .nav .button { min-height: 40px; padding: 8px 16px; font-size: 14px; }
  .hero h1 { font-size: 40px; }
  .hero-lead { font-size: 17px; }
  .hero-actions .button { width: 100%; }
  .principles { grid-template-columns: 1fr; gap: 14px; }
  .story { padding: 20px 20px 18px; }
  .story h3 { font-size: 20px; }
  .page { padding: 28px 0 64px; }
  .panel { padding: 20px; }
  .article { padding: 26px 22px 30px; }
  .bodytext { font-size: 18px; }
  .reacts { grid-template-columns: 1fr 1fr; }
  .react { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; }
  .react .count { margin-left: 0; }
  .next { flex-direction: column; align-items: stretch; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .feed-head { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.report-panel { margin-top: 16px; }
.page-narrow { max-width: 440px; }

/* ---------- Примеры от редакции ---------- */
.example-badge { margin-left: auto; padding: 2px 9px; border-radius: 999px; border: 1px dashed var(--line-strong); font-size: 12px; font-weight: 600; color: var(--muted); }
.example-note { margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--line-strong); font-size: 14px; color: var(--muted); }
.admin-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.admin-tools form { margin: 0; }
.help-strong { text-align: left; margin: 0 0 24px; border: 1px solid color-mix(in srgb, var(--plum) 35%, transparent); }
.help-strong p { font-size: 15px; color: var(--ink-soft); margin: 0; }
.danger-zone { width: 100%; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.danger-zone summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 15px; }
.danger-zone summary:hover { color: var(--danger); }
.danger-zone p { font-size: 15px; margin: 14px 0 16px; }

/* ---------- Мои истории ---------- */
.code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: clamp(28px, 6vw, 38px); font-weight: 700; letter-spacing: .06em; color: var(--ink); margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.code-inline { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; margin: 0 10px 0 6px; }
.code-input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 24px; letter-spacing: .08em; text-align: center; }
.secret-text { font-size: 15px !important; color: var(--sage) !important; margin: 12px 0 0 !important; }
.status-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: center; text-align: center; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--accent-hover); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg); margin-bottom: 16px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.check .muted { font-size: 14px; }
.my-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.my-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.my-title { font-family: var(--serif); font-weight: 700; font-size: 18px; text-decoration: none; }
.my-title:hover { color: var(--accent); }
.my-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.my-meta .link-button { margin-left: auto; font-size: 13px; color: var(--muted); }
.status-badge { padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.status-badge.ok { background: var(--sage-soft); color: var(--sage); }
.status-badge.wait { background: var(--accent-soft); color: var(--accent); }
.status-badge.bad { background: var(--danger-soft); color: var(--danger); }
.status-badge.muted { background: var(--line); color: var(--muted); }
.small-note { font-size: 14px; margin-top: 18px; }
#my-list-panel + form { margin-top: 16px; }
@media (max-width: 640px) {
  .nav-links { gap: 14px; }
  .nav .nav-my { display: inline; font-size: 14px; }
}

/* ---------- Возвращаться хочется: новые блоки ---------- */
.badge-next { background: var(--accent-soft); color: var(--accent); }
.side-title { margin-top: 28px !important; }
.topic .n { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 8px; }
.topic.active .n { color: inherit; opacity: .7; }
.side-cta .kicker { display: block; margin-bottom: 8px; }
.random-link { display: inline-block; margin-top: 18px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--ink-soft); }
.random-link:hover { color: var(--accent); }

.waiting { margin-bottom: 36px; padding: 22px 24px; border-radius: var(--radius); background: var(--plum-soft); }
.waiting-head h2 { font-size: 24px; margin-bottom: 4px; }
.waiting-head p { color: var(--ink-soft); font-size: 15px; margin-bottom: 16px; }
.waiting-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.waiting-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--paper); text-decoration: none; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.waiting-list a:hover { border-color: var(--plum); transform: translateX(2px); }
.waiting-list strong { font-family: var(--serif); font-size: 17px; flex: 1; min-width: 0; }
.waiting-list .tag { flex: none; }
.waiting-list .go { flex: none; font-weight: 700; font-size: 14px; color: var(--plum); }

.updates { margin-top: 30px; display: grid; gap: 22px; }
.update { padding: 20px 22px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.update .kicker { display: block; margin-bottom: 8px; }
.update .bodytext { font-size: 18px; }
.in-collections { margin-top: 22px; font-size: 15px; color: var(--muted); }
.in-collections a { color: var(--accent); font-weight: 700; }

.share { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.share p { font-size: 15px; color: var(--ink-soft); }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.related { margin-top: 40px; }
.related .feed-head h2 { font-size: 28px; }
.story-compact { padding: 20px 22px; }
.story-compact h3 { font-size: 20px; margin: 6px 0; }
.story-compact .story-preview { -webkit-line-clamp: 2; font-size: 15px; }

.prompt-card { padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); margin-bottom: 18px; }
.prompt-card p { font-size: 17px; margin: 6px 0 4px; }
.prompt-card strong { font-family: var(--serif); }
.prompt-card .muted { font-size: 14px; }
.draft-note { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--sage-soft); color: var(--sage); font-size: 15px; margin-bottom: 16px; }
.draft-hint { font-size: 13px; text-align: center; margin-top: 10px; }
.release { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-strong); font-size: 14px; }
.letting-go textarea, .letting-go input { transition: opacity 1.3s ease, filter 1.3s ease, transform 1.3s ease !important; opacity: 0; filter: blur(6px); transform: translateY(-14px); }
.letting-go { pointer-events: none; }
.released { text-align: center; padding: 44px 28px; }
.released h2 { font-size: 30px; margin-bottom: 10px; }
.released p { color: var(--ink-soft); margin-bottom: 22px; }
.released .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.released .seal { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; font-size: 30px; background: var(--sage-soft); }

.heard { margin: 0 0 24px; padding: 20px 22px; border-radius: var(--radius); background: var(--sage-soft); text-align: left; }
.heard h2 { font-size: 22px; margin-bottom: 10px; color: var(--sage); }
.heard p { margin: 0 !important; font-size: 15px !important; }
.heard-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.heard-list li { padding: 6px 12px; border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 600; }
.heard-chip { font-weight: 700; color: var(--sage); }
.continue { text-align: left; margin-bottom: 24px; }
.continue h2 { font-size: 22px; margin-bottom: 10px; }
.continue form { display: grid; gap: 12px; justify-items: start; }
textarea.short { min-height: 140px; font-size: 17px; }
.my-update { padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.my-update p { font-size: 15px !important; margin: 6px 0 0 !important; text-align: left; color: var(--ink-soft); }
.ok-text { color: var(--sage); background: var(--sage-soft); padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 15px; }

.mod-updates { margin-bottom: 28px; }
.mod-updates h2 { font-size: 22px; margin-bottom: 12px; }
.mod-updates .mod-card + .mod-card { margin-top: 12px; }
.mod-extra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; }
.mod-extra form { margin: 0; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); font-size: 13px; font-weight: 600; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.page-wide { max-width: 820px; }
.prose section { margin-top: 40px; }
.prose h2 { font-size: 27px; margin-bottom: 12px; }
.prose p, .prose li { font-size: 17px; color: var(--ink-soft); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; margin: 10px 0; display: grid; gap: 10px; }
.prose a { color: var(--accent); font-weight: 600; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-soft); background: var(--paper); }
.toc a:hover { border-color: var(--ink-soft); }
.prose .next { margin-top: 48px; }

@media (max-width: 960px) {
  .side-cta { display: block; margin-top: 14px; }
  .random-link { margin-top: 10px; }
}
@media (max-width: 640px) {
  .waiting { padding: 18px; margin: 0 -4px 28px; }
  .waiting-list a { flex-wrap: wrap; gap: 4px 10px; }
  .waiting-list strong { flex-basis: 100%; order: 2; }
  .waiting-list .go { order: 3; }
  .share { flex-direction: column; align-items: stretch; }
}
.footer .brand a { text-decoration: none; color: inherit; }
.footer .door { position: relative; color: var(--accent); cursor: default; user-select: none; -webkit-tap-highlight-color: transparent; }
.footer .door::after { content: ""; position: absolute; inset: -12px -14px -10px -4px; }
.mod-delete { margin-left: auto; display: flex; align-items: center; }
.mod-delete summary { cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--muted); padding: 8px 4px; }
.mod-delete summary::-webkit-details-marker { display: none; }
.mod-delete summary:hover, .mod-delete[open] summary { color: var(--danger); }
.mod-delete[open] { gap: 10px; }
.mod-delete form { margin: 0; }
.prose h3 { font-size: 20px; margin: 24px 0 8px; }
