/* ============================================================
   Фабрика Миров — «Атлас Миров», дизайн-система v2.
   Идея: сайт как фолио картографического атласа; каждый блок —
   лист атласа: бумажное поле, чернильный текст, нефритовый акцент.
   Светлая тема (бриф): кость + зелёно-чёрная тушь + нефрит.
   Дисплей: Cormorant (кириллица), текст: Georgia.
   Без стёкол, теней на покое, градиентных заливок, рамок-линий,
   «мягких» радиусов: поверхности разделяются шагом тона.
   ============================================================ */

:root {
  /* поля и бумага */
  --bg: #f1ecdd;          /* поле атласа (кость) */
  --paper: #faf7ec;       /* бумага фолио */
  --card: #faf7ec;        /* совместимость: панель вывода */
  --wash: #e7e1cc;        /* шаг тона между поверхностями */
  --wash-2: #ded6bd;      /* второй шаг тона (ховер полос) */
  --deep: #223129;        /* зелёно-чёрное поле (футер, CTA) */
  --deep-2: #2d3b33;      /* шаг тона на тёмном поле */
  /* тушь */
  --ink: #202b24;
  --muted: #67705e;
  --ink-on-deep: #ece9da;
  --muted-on-deep: #a9ae9a;
  /* акцент — нефрит; латунь — точечно (печать, булавка) */
  --primary: #2c6a4e;
  --primary-2: #245640;   /* нажатие/ховер кнопки */
  --primary-ink: #f2f6ef;
  --accent: #d9cfae;      /* золотистая смывка старой карты */
  --brass: #a9814f;
  --seal: #8a3b2e;        /* сургуч */
  --ok: #2c6a4e;
  --crit: #8a3b2e;
  --line: #d9d2ba;        /* совместимость: тонкая линия внутри таблиц/форм */
  /* шрифты и размеры */
  --font-display: "Cormorant", Georgia, "Times New Roman", serif;
  --font-text: Georgia, "Times New Roman", serif;
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.02rem + 0.5vw, 1.4375rem);
  --fs-head: clamp(2.1rem, 1.4rem + 3vw, 3.9rem);
  --fs-display: clamp(2.7rem, 1.7rem + 5.2vw, 5.6rem);
  --radius: 0px;          /* один радиус на весь сайт — прямые углы */
  --wrap: 1160px;
  --margin: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font: var(--fs-body)/1.62 var(--font-text);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; padding-bottom: 40px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--margin); }
@media (max-width: 640px) { :root { --margin: 16px; } }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.02em; margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-head); margin: 0.55em 0 0.45em; max-width: 22ch; }
h2 { font-size: calc(var(--fs-head) * 0.66); margin: 1.6em 0 0.5em; max-width: 26ch; }
h3 { font-size: calc(var(--fs-head) * 0.44); margin: 1.2em 0 0.4em; }
h4 { font-size: 1.3rem; }
p { margin: 0.7em 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
b, strong { font-weight: 700; }
.lead { font-size: var(--fs-lead); color: var(--ink); max-width: 44rem; line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.crumbs { color: var(--muted); font-size: var(--fs-small); }
.crumbs a:not(:last-child)::after { content: " — "; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Выделение и фокус */
::selection { background: #2c6a4e26; color: var(--ink); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
main.wrap:focus { outline: none; }

/* Скроллбар */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cfc7ab; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #bdb392; }

/* ---------- Картографическая лента (полоса атласа) ---------- */
.stripe-band {
  display: flex; height: 10px; width: 100%; overflow: hidden;
}
.stripe-band i { flex: 1 1 28px; min-width: 0; }
.stripe-band i:nth-child(odd) { background: var(--deep); }
.stripe-band i:nth-child(even) { background: var(--bg); }

/* ---------- Шапка: плоская бумажная планка ---------- */
.site-header { background: var(--paper); position: sticky; top: 0; z-index: 40; }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 14px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.01em; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px; background: var(--deep); color: var(--ink-on-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 600; flex: 0 0 auto;
  transition: background 0.2s ease;
}
.logo:hover .logo-mark { background: var(--primary); }
.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-header nav a { color: var(--ink); font-size: 1rem; text-decoration-line: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: color 0.16s ease, text-decoration-color 0.16s ease; }
.site-header nav a:hover { color: var(--primary); text-decoration-color: var(--primary); text-decoration-thickness: 1px; }
/* Round 110: «Мне повезёт» — костяная игральная кость в навигации.
   Та же бумага, что у kbd-чипов: рамка с двойным низом, прямой угол. */
.nav-lucky {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 4px;
  padding: 6px 12px 7px; min-height: 34px;
  font: 600 0.92rem/1.1 var(--font-text); letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease, border-color 0.16s ease;
}
.nav-lucky:hover { background: var(--wash); color: var(--ink); }
.nav-lucky:active { transform: translateY(1px); border-bottom-width: 1px; margin-bottom: 1px; }
.nav-lucky:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-lucky svg { color: var(--primary); flex: 0 0 auto; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1.25); }
.nav-lucky:hover svg { transform: rotate(-24deg) translateY(-1px); }
.nav-lucky:active svg { transform: rotate(12deg) translateY(0); }
@media (max-width: 700px) {
  .header-in { padding: 10px 0; }
  .site-header nav { row-gap: 6px; }
  .stash-fab { order: 10; }
  .nav-lucky { padding: 5px 10px 6px; font-size: 0.88rem; }
}

/* ---------- Кнопки: плоские, прямые углы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: var(--primary-ink);
  border: 0; border-radius: var(--radius);
  padding: 13px 24px; font: 600 var(--fs-body)/1.2 var(--font-text);
  cursor: pointer; min-height: 48px; text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.btn:hover { background: var(--primary-2); text-decoration: none; transform: translateY(-1px); box-shadow: 0 2px 0 rgba(34, 49, 41, 0.14); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn.ghost:focus-visible { outline-color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); padding-left: 18px; padding-right: 18px; }
.btn.ghost:hover { background: var(--wash); color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--deep); color: var(--ink-on-deep); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn-sm { padding: 9px 16px; min-height: 40px; font-size: 0.95rem; }

/* ---------- Панели: бумага, шаг тона ---------- */
.card { background: var(--paper); border: 0; border-radius: var(--radius); padding: 22px; margin: 14px 0; }
.card h3:first-child, .card h2:first-child { margin-top: 0; }

/* ---------- Формы ---------- */
.controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.controls label { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--ink); }
select, input[type="text"], input:not([type]) {
  font: inherit; padding: 10px 12px; border-radius: var(--radius); border: 0;
  background: var(--wash); color: var(--ink); min-height: 42px;
}
select:focus, input[type="text"]:focus, input:not([type]):focus { outline: 3px solid var(--primary); outline-offset: 1px; }
input[type="range"] { accent-color: var(--primary); }
input[type="text"]::placeholder, input:not([type])::placeholder { color: var(--muted); }

/* ---------- Слипы-результаты (чипы) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--paper); border: 0; border-radius: var(--radius);
  padding: 9px 14px; font-size: 1.05rem; cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.chip:hover { background: var(--wash-2); }
.chip:active { transform: scale(0.97); }
.chip.big { font-size: 1.25rem; padding: 12px 18px; font-family: var(--font-display); font-weight: 600; }
.chip.dim { background: var(--wash); }
/* мета-чипы (без chip-act) — информация, не кнопка */
.chip:not(.chip-act) { cursor: default; }
.chip:not(.chip-act):hover { background: var(--paper); }
.chip:not(.chip-act):active { transform: none; }
/* чип-вывод: клик — копирует, ★ — в копилку */
.chip-act { position: relative; padding-right: 32px; }
.chip-act:hover { transform: translateY(-1px); }
.chip-act .chip-t { pointer-events: none; }
.chip-act .li-pin { top: 4px; right: 3px; width: 24px; height: 24px; font-size: 0.78rem; }
.chip-act:hover .li-pin { opacity: 0.6; }
.chip-act:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ---------- Индекс мастерских (главная): полосы оглавления ---------- */
.toc-bars { display: flex; flex-direction: column; gap: 6px; margin: 18px 0 8px; }
.toc-bar {
  display: grid; grid-template-columns: minmax(210px, 34%) 1fr auto; gap: 4px 22px;
  align-items: baseline;
  background: var(--paper); border-radius: var(--radius);
  padding: 16px 20px; color: var(--ink);
  transition: background 0.16s ease, transform 0.16s ease;
}
.toc-bar:hover { background: var(--wash-2); text-decoration: none; transform: translateX(4px); }
.toc-bar .toc-go { transition: transform 0.18s ease; }
.toc-bar:hover .toc-go { transform: translateX(6px); }
.toc-bar strong { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; letter-spacing: -0.01em; }
.toc-bar .toc-note { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.toc-bar .toc-go { color: var(--primary); font-size: 1.2rem; justify-self: end; align-self: center; }
@media (max-width: 720px) {
  .toc-bar { grid-template-columns: 1fr auto; }
  .toc-bar .toc-note { grid-column: 1 / -1; }
}

/* ---------- Сетка карточек (хабы имён, гайды): бумажные плитки ---------- */
.tool-grid, .guide-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin: 16px 0; }
.tool-card, .guide-card {
  display: block; background: var(--paper); border: 0; border-radius: var(--radius);
  padding: 18px; color: var(--ink);
  transition: background 0.16s ease, transform 0.16s ease;
}
.tool-card:hover, .guide-card:hover { background: var(--wash-2); text-decoration: none; transform: translateY(-2px); }
.tool-card strong, .guide-card h2 { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.tool-card span, .guide-card p { color: var(--muted); font-size: 0.95rem; margin: 0; line-height: 1.5; }
.guide-card h2 { font-size: 1.3rem; }
.tool-ico { display: none; }

/* ---------- Хиро главной: разворот фолио ---------- */
.hero-spread { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 54%); gap: 0; align-items: stretch; padding: 34px 0 0; }
.folio-card { background: var(--paper); padding: 0; display: flex; flex-direction: column; }
.folio-card-in { padding: 32px 34px 28px; display: flex; flex-direction: column; flex: 1; }
.folio-card h1 { font-size: clamp(2.05rem, 1.15rem + 2.3vw, 2.85rem); margin: 0.5em 0 0.4em; max-width: 22ch; line-height: 1.04; }
.folio-card .lead { max-width: 34ch; }
.hero-cta { display: flex; gap: 12px; margin: 26px 0 10px; flex-wrap: wrap; }
.hero-plate { position: relative; background: var(--wash); overflow: hidden; min-height: 420px; display: flex; align-items: stretch; }
.hero-plate canvas { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; animation: fm-drift 46s ease-in-out infinite; }
@keyframes fm-drift {
  0%, 100% { transform: scale(1.03) translate(0, 0); }
  50% { transform: scale(1.09) translate(-1.6%, 1%); }
}
.plate-caption {
  position: absolute; left: 0; bottom: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 12px 18px; background: var(--deep); color: var(--ink-on-deep);
  font-family: var(--font-display); font-style: italic; font-size: 1.05rem;
}
.plate-caption span:last-child { font-style: normal; font-size: var(--fs-small); color: var(--muted-on-deep); white-space: nowrap; }
@media (max-width: 880px) {
  .hero-spread { grid-template-columns: 1fr; }
  .hero-plate { order: -1; min-height: 300px; }
  .folio-card-in { padding: 24px 20px 24px; }
  .folio-card h1 { font-size: clamp(1.8rem, 1.35rem + 2.4vw, 2.6rem); max-width: 22ch; }
}

/* ---------- Ряд фактов атласа ---------- */
.stats-band {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 30px;
  margin: 0; padding: 26px var(--margin) 22px; max-width: var(--wrap);
  background: var(--wash); border-radius: var(--radius);
  width: 100%;
}
.stats-band > div { display: flex; flex-direction: column; gap: 2px; }
.stats-band b { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.9rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats-band span { color: var(--muted); font-size: 0.95rem; }
.stats-row { display: flex; justify-content: center; padding: 0 0 26px; }

/* ---------- Полносекционные поля ---------- */
.band { width: 100vw; margin-left: calc(50% - 50vw); padding: 74px 0; }
.band-paper { background: var(--paper); }
.band-wash { background: var(--wash); }
.band-deep { background: var(--deep); color: var(--ink-on-deep); }
.band-deep h2, .band-deep h3 { color: var(--ink-on-deep); }
.band-deep a { color: #b7d3c2; }
.band-deep a:hover { color: var(--ink-on-deep); }
.band-deep .muted { color: var(--muted-on-deep); }
.band > .wrap { padding-left: var(--margin); padding-right: var(--margin); }
.band:first-child { padding-top: 44px; }

/* ---------- Слипы вывода (витрина результатов) ---------- */
.folio-no {
  display: block; font-family: var(--font-display); font-size: 0.78rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 12px;
}
.folio-no::after { content: ""; display: block; width: 56px; border-top: 3px dotted var(--wash-2); margin-top: 10px; }
.folio-no-deep { color: var(--muted-on-deep); margin-bottom: 14px; }
.folio-no-deep::after { border-color: var(--deep-2); }
.slip-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; margin-top: 30px; }
.slip {
  background: var(--paper); border-radius: var(--radius);
  padding: 14px 14px 18px; font-size: 0.95rem; line-height: 1.5;
  min-height: 210px; position: relative; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.slip:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(32, 43, 36, 0.45); }
.slip:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.slip-pin {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  border: 0; background: transparent; color: var(--ink); opacity: 0.28;
  font-size: 0.85rem; line-height: 1; cursor: pointer; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.slip-pin:hover { opacity: 1; background: var(--wash-2); transform: scale(1.12); }
.slip:hover .slip-pin { opacity: 0.6; }
.slip-pin:focus-visible { opacity: 1; outline: 2px solid var(--primary); outline-offset: 1px; }
@media (hover: none) { .slip-pin { opacity: 0.45; } }
.slip-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
/* Round 109: клавиатурные подсказки листа находок (там, где есть клавиатура) */
.btn[hidden] { display: none; }
.hotkey-hints {
  display: inline-flex; gap: 14px; align-items: center; flex-wrap: wrap;
  margin-left: auto; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.01em;
}
.hotkey-hints .hk { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.hotkey-hints kbd {
  display: inline-block; min-width: 1.5em; padding: 2px 6px 3px;
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 4px;
  background: var(--paper); color: var(--ink); text-align: center;
  font: 700 0.68rem/1.1 var(--font-text); letter-spacing: 0.05em;
}
@media (max-width: 1080px) { .hotkey-hints { margin-left: 0; } }
/* прячем подсказки только на настоящих тач-устройствах без точного указателя */
@media (hover: none) and (pointer: coarse) { .hotkey-hints { display: none; } }
.slip:nth-child(2) { transform: rotate(1.2deg); min-height: 240px; }
.slip:nth-child(5) { transform: rotate(-1.1deg); min-height: 190px; }
.slip:nth-child(2):hover { transform: rotate(1.2deg) translateY(-3px); }
.slip:nth-child(5):hover { transform: rotate(-1.1deg) translateY(-3px); }
.slip b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; letter-spacing: -0.01em; }
.slip hr { border: 0; border-top: 3px dotted var(--wash-2); margin: 8px 0; }
.slip p { margin: 3px 0; color: var(--muted); font-size: 0.92rem; }
.slip p b, .slip p strong { font-size: inherit; }
@media (max-width: 880px) {
  .slip-row { grid-template-columns: repeat(3, 1fr); }
  .slip:nth-child(n+4) { display: none; }
}
@media (max-width: 640px) {
  /* на телефоне слипы складываются в столбик — «лист находок», читается без жима */
  .slip-row { grid-template-columns: 1fr; align-items: stretch; }
}

/* ---------- Мир дня (паспорт по зерну-дате) ---------- */
.day-world {
  margin-top: 36px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px 30px 20px;
  position: relative;
  box-shadow: 0 26px 52px -38px rgba(32, 43, 36, 0.55);
}
.day-world::before {
  content: ""; position: absolute; inset: 10px;
  border: 1.5px dashed var(--wash-2); border-radius: calc(var(--radius) - 7px);
  pointer-events: none;
}
.day-rise { animation: rise-in 0.35s ease both; }
.day-head { position: relative; }
.day-date {
  display: inline-block; font-family: var(--font-display); font-size: 0.74rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 6px; border-bottom: 3px dotted var(--wash-2);
}
.day-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 1.45rem + 1.6vw, 2.8rem);
  line-height: 1.04; letter-spacing: -0.015em; margin: 10px 0 6px;
  text-decoration: underline dotted transparent;
  text-decoration-thickness: 3px; text-underline-offset: 10px;
  transition: text-decoration-color 0.25s ease;
}
.day-world:hover .day-name { text-decoration-color: var(--wash-2); }
.day-claim { color: var(--muted); font-size: 1.02rem; line-height: 1.55; max-width: 66ch; margin: 0; }
.day-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 24px;
  margin-top: 20px; padding-top: 18px; border-top: 3px dotted var(--wash-2);
  position: relative;
}
.day-fact b {
  display: block; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted); margin-bottom: 4px;
}
.day-fact span { font-size: 0.97rem; line-height: 1.45; }
.day-fact-wide { grid-column: span 2; }
/* Три находки этого мира: мини-слипы под паспортом */
.day-finds {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 18px; padding-top: 16px; border-top: 3px dotted var(--wash-2);
}
.day-find {
  position: relative; text-align: left; cursor: pointer;
  font: inherit; color: inherit; line-height: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 26%),
    var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px 11px;
  box-shadow: 0 1px 0 rgba(32, 43, 36, 0.06), 0 10px 18px -14px rgba(32, 43, 36, 0.4);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}
.day-find::before {
  content: ""; position: absolute; top: -7px; left: 50%; translate: -50% 0; rotate: -1.5deg;
  width: 58px; height: 14px;
  background: rgba(217, 207, 174, 0.5);
  border-inline: 1px dashed rgba(169, 129, 79, 0.35);
}
.day-find b {
  display: block; font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--muted); margin-bottom: 4px;
}
.day-find-text { display: block; font-size: 0.95rem; line-height: 1.4; }
.day-find-note { display: block; margin-top: 3px; font-size: 0.78rem; color: var(--muted); }
.day-find:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 0 rgba(32, 43, 36, 0.1), 0 16px 24px -14px rgba(32, 43, 36, 0.45);
}
.day-find:hover::before { background: rgba(217, 207, 174, 0.75); }
.day-find:active { transform: translateY(0); box-shadow: 0 1px 0 rgba(32, 43, 36, 0.08); }
.day-find:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.day-foot { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; position: relative; }
.day-flag {
  display: flex; width: 76px; height: 46px; border-radius: 7px; overflow: hidden;
  box-shadow: 0 2px 0 rgba(32, 43, 36, 0.18), 0 10px 18px -12px rgba(32, 43, 36, 0.5);
  flex: 0 0 auto;
}
.day-flag i { flex: 1; transition: transform 0.25s ease; transform-origin: bottom; }
.day-world:hover .day-flag i { transform: scaleY(1.08); }
.day-world:hover .day-flag i:nth-child(2) { transition-delay: 0.05s; }
.day-world:hover .day-flag i:nth-child(3) { transition-delay: 0.1s; }
.day-hint { flex: 1 1 220px; }
.day-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.day-actions .slip-pin { position: static; opacity: 0.4; width: 32px; height: 32px; font-size: 1rem; }
.day-actions .slip-pin:hover { opacity: 1; transform: scale(1.1); }
@media (max-width: 880px) {
  .day-world { padding: 22px 18px 16px; }
  .day-grid { grid-template-columns: repeat(2, 1fr); }
  .day-fact-wide { grid-column: span 2; }
  .day-finds { grid-template-columns: 1fr; }
  .day-actions { margin-left: auto; gap: 8px; }
  .day-actions .btn { padding-left: 12px; padding-right: 12px; min-height: 42px; font-size: 0.92rem; }
  .day-hint { flex-basis: 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .day-rise { animation: none; }
  .day-flag i, .day-world:hover .day-flag i { transition: none; transform: none; }
  .day-find, .day-find:hover, .day-find:active { transition: none; transform: none; }
}

/* ---------- Аккордеон-полосы (FAQ, оглавление) ---------- */
details {
  border: 0; border-radius: var(--radius);
  background: var(--wash); padding: 0; margin: 0 0 6px;
  transition: background 0.2s ease;
}
details:hover { background: var(--wash-2); }
details[open] { background: var(--paper); }
details summary {
  cursor: pointer; font-weight: 600; list-style: none; position: relative;
  padding: 16px 46px 16px 18px; min-height: 24px; font-size: 1.05rem;
  font-family: var(--font-text);
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "+"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; background: transparent; color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.2rem; line-height: 1;
  transition: transform 0.2s ease;
}
details[open] summary::before { content: "–"; }
details summary:hover::before { transform: translateY(-50%) scale(1.15); }
details[open] summary { color: var(--primary); }
details > *:not(summary) { padding: 0 18px 16px; margin: 0; }
details p { color: var(--ink); padding-bottom: 16px !important; }
details p { color: var(--muted); }
details[open] > p { color: var(--ink); }

/* ---------- Секции текста ---------- */
.seo-text { margin-top: 34px; padding-top: 6px; }
.seo-text > h2, .howto h2 { position: static; padding-left: 0; display: block; }
.seo-text > h2::before, .seo-text h2::after, .howto h2::after { content: none; }
.howto { margin-top: 26px; }
.howto ul, .howto ol { padding-left: 22px; }
.howto li, .seo-text li { margin: 7px 0; }
.howto p, .seo-text p { max-width: 46rem; }
.seo-text ul, .seo-text ol { padding-left: 22px; }

/* CTA: ответная карточка на тёмном поле */
.cta-box { background: var(--paper); border: 0; border-radius: var(--radius); padding: 30px; margin: 30px 0 10px; max-width: 560px; }
.cta-box h3 { margin-top: 0; }
.cta-box .btn { width: 100%; }
.cta-box .ghost { width: 100%; margin-top: 8px; }

/* ---------- Имена: сетка и списки ---------- */
.name-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
@media (max-width: 860px) { .name-grid { grid-template-columns: 1fr; } }
.name-list ul { columns: 2; list-style-position: inside; padding-left: 0; margin: 8px 0; }
.name-list li { padding: 3px 0; color: var(--ink); break-inside: avoid; }
.name-list ul { max-height: 460px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: #cfc7ab transparent; }
.name-list ul.latin-on li { font-style: italic; letter-spacing: 0.02em; }
.name-list ul.sorted-on li { animation: rise-in 0.25s ease both; }
.name-count::after { content: " вариантов в списке"; }
.name-count { white-space: nowrap; color: var(--muted); }
.name-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 12px; background: var(--wash);
}
.name-search {
  flex: 1 1 140px; min-width: 130px; max-width: 240px;
  padding: 9px 12px; min-height: 40px;
  border: 0; border-radius: var(--radius);
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 0.95rem;
}
.mode-chip { cursor: pointer; user-select: none; }
.mode-chip[aria-pressed="true"] { background: var(--deep); color: var(--ink-on-deep); }

/* ---------- Карта ---------- */
.map-toolbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.map-card { padding: 18px; }
.map-card canvas { width: 100%; height: auto; display: block; }
.map-wrap { position: relative; }
.map-wrap canvas { cursor: crosshair; }
#poi-box { position: absolute; left: 12px; bottom: 12px; right: 12px; max-width: 440px; z-index: 5; }
.poi-card {
  background: var(--paper); border: 0; border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 18px 40px -18px rgba(32, 43, 36, 0.5); /* плавающий объект */
}
.poi-head { display: flex; align-items: flex-start; gap: 10px; }
.poi-head h4 { margin: 0; font-size: 1.3rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.poi-pin {
  flex: 0 0 auto; width: 12px; height: 12px; margin-top: 7px;
  border-radius: 50%; background: var(--seal);
}
.poi-pin.dim { opacity: 0.6; }
.poi-close {
  margin-left: auto; border: 0; background: transparent; font: inherit; font-size: 1.3rem; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 2px 6px;
}
.poi-close:hover { color: var(--ink); }
.poi-badge {
  display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  border: 0; border-radius: var(--radius); padding: 2px 7px;
  background: var(--wash); color: var(--muted);
}
.poi-badge-primary { background: var(--primary); color: var(--primary-ink); }
.poi-facts p { margin: 4px 0; font-size: 0.92rem; color: var(--muted); }
.poi-facts b { color: var(--ink); }
.poi-actions { margin-top: 8px; }
.poi-actions .btn { min-height: 38px; padding: 7px 14px; font-size: 0.92rem; }

/* ---------- Кубики ---------- */
.dice-result { text-align: center; padding: 26px 0 18px; }
.dice-total { font-family: var(--font-display); font-size: 5.4rem; font-weight: 600; line-height: 1; color: var(--ink); }
.dice-total.crit { color: var(--ok); }
.dice-total.fail { color: var(--crit); }

/* ---------- Летопись ---------- */
.chronicle { border-left: 3px solid var(--wash-2); padding-left: 28px; margin: 6px 0 14px; }
.chronicle-era { position: relative; padding: 0 0 18px; }
.chronicle-era:last-child { padding-bottom: 2px; }
.chronicle-era::before {
  content: ""; position: absolute; left: -36px; top: 5px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--primary);
}
.chronicle-era-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.chronicle-era-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.chronicle-years { color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.chronicle-events { list-style: none; margin: 8px 0 0; padding: 0; }
.chronicle-events li { padding: 7px 10px; transition: background 0.15s; }
.chronicle-events li:hover { background: var(--wash); }
.chronicle-actions { margin-top: 4px; }
@media (max-width: 640px) {
  .chronicle { position: relative; border-left: 0; padding-left: 26px; }
  .chronicle::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 3px; background: var(--wash-2); }
  .chronicle-era::before { left: -24px; top: 7px; width: 11px; height: 11px; }
  .chronicle-era { padding-bottom: 14px; }
  .chronicle-era-title { font-size: 1.15rem; }
  .chronicle-years { font-size: 0.85rem; }
  .chronicle-events li { font-size: 0.95rem; padding: 6px 8px; }
}

/* ---------- Гильдии: сургучная печать ---------- */
.guild-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 2px; }
.guild-seal {
  --seal: #8a3b2e;
  position: relative; flex: 0 0 auto;
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  color: #f6efdd;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 246, 224, 0.28), transparent 44%),
    radial-gradient(circle at 68% 76%, rgba(0, 0, 0, 0.22), transparent 48%),
    var(--seal);
}
.guild-seal::after { content: ""; position: absolute; inset: 6%; border-radius: 50%; border: 1px dashed rgba(246, 239, 221, 0.4); }
.guild-motto {
  margin: 12px 0; padding-left: 14px;
  font-family: var(--font-display); font-style: italic; font-size: 1.2rem;
  color: var(--ink); border-left: 3px solid var(--brass);
}
.guild-actions { margin-top: 10px; }

/* ---------- Флаг: полотнище на флагштоке ---------- */
.flag-layout { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
@media (max-width: 700px) { .flag-layout { grid-template-columns: 1fr; } }
.flag-side { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.flag-side .btn { justify-content: center; }
.flag-side p { margin: 0; }
.flag-stage { position: relative; padding-left: 14px; }
.flag-stage::before {
  content: ""; position: absolute; left: 0; top: -6%; bottom: -6%;
  width: 5px; background: var(--deep);
}
.flag-stage::after {
  content: ""; position: absolute; left: -3.5px; top: calc(-6% - 10px);
  width: 12px; height: 12px; border-radius: 50%; background: var(--brass);
}
.flag-cloth {
  position: relative; width: 100%; max-width: 430px; aspect-ratio: 3 / 2;
  overflow: hidden; transform-origin: left center;
  animation: flag-wave 5.5s ease-in-out infinite;
  background: var(--wash);
}
.flag-cloth svg { display: block; width: 100%; height: 100%; }
@keyframes flag-wave {
  0%, 100% { transform: perspective(600px) rotateY(0deg) skewY(0deg); }
  30% { transform: perspective(600px) rotateY(1.6deg) skewY(0.35deg); }
  65% { transform: perspective(600px) rotateY(-1.2deg) skewY(-0.3deg); }
}
@media (prefers-reduced-motion: reduce) { .flag-cloth { animation: none; } }
.flag-facts p { margin: 5px 0; }

/* ---------- Герб: латунная рамка ---------- */
.heraldry-badge {
  padding: 8px; border-radius: var(--radius);
  background: var(--wash);
}
.heraldry-badge svg { display: block; width: 100%; height: auto; }

/* ---------- Государство ---------- */
.country-head { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
@media (max-width: 700px) { .country-head { grid-template-columns: 1fr; } }
.country-emblem { display: flex; flex-direction: column; gap: 14px; }
.country-emblem .heraldry-badge { width: 92px; margin: 0 auto; }
.country-info h3 { margin: 0; font-size: 1.9rem; }
.country-info p { margin: 6px 0; }

/* ---------- Карточки вывода: империи, деревни, реки… ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.slip.rise-in { animation: rise-in 0.32s ease both; }
@media (prefers-reduced-motion: reduce) { .slip.rise-in { animation: none; } }
.empire-card { animation: rise-in 0.35s ease both; }
.empire-name { margin: 4px 0 6px; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--ink); letter-spacing: -0.015em; }
.empire-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; margin: 12px 0 4px; }
.empire-grid p { margin: 5px 0; }
@media (max-width: 640px) { .empire-grid { grid-template-columns: 1fr; } }
.village-card .muted.small { margin: 2px 0 0; font-style: italic; }
.village-saying, .river-saying, .mountain-saying, .forest-saying, .swamp-saying, .ship-saying {
  grid-column: 1 / -1; border-left: 3px solid var(--brass); padding-left: 12px;
  font-family: var(--font-display); font-style: italic; font-size: 1.12rem; color: var(--ink);
}

/* ---------- Семья и династия ---------- */
.family-card { padding: 20px; }
.family-list { margin: 10px 0 0; display: grid; gap: 6px; list-style: none; padding: 0; }
.family-list li { padding: 7px 10px; background: var(--wash); }
.family-list li:last-child { border-bottom: 0; }
.family-list b { color: var(--primary); margin-right: 4px; }
.dynasty-card { background: var(--paper); }
.dynasty-gen { display: grid; gap: 10px; margin: 10px 0; }
.dynasty-card .family-list li { padding: 7px 10px; }
.dynasty-card .guild-actions { margin-top: 14px; }
.twins-card { background: var(--paper); }
.twins-card .controls input[type="text"] { flex: 1 1 auto; min-width: 0; }
.twins-card .chips:empty { display: none; }

/* ---------- Боксы контента: примеры, сцены, справочник ---------- */
.examples-box, .scene-box, .reference-box, .inside-box {
  background: var(--wash); border: 0; border-radius: var(--radius);
  padding: 18px 22px; margin-top: 22px;
}
.examples-box li, .scene-box li, .reference-box li, .inside-box li { margin: 5px 0; }
.scene-box p { margin: 0.5em 0; }

/* строка примера: клик — копирует, ★ — в копилку (как слипы главной) */
.examples-box li {
  position: relative; cursor: pointer; border-radius: 8px;
  padding: 7px 34px 7px 10px; margin: 2px -10px;
  transition: background 0.15s ease;
}
.examples-box li:hover { background: var(--paper); }
.examples-box li:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.li-pin {
  position: absolute; top: 6px; right: 4px; width: 26px; height: 26px;
  border: 0; background: transparent; color: var(--ink); opacity: 0.22;
  font-size: 0.85rem; line-height: 1; cursor: pointer; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.li-pin:hover { opacity: 1; background: var(--wash-2); transform: scale(1.12); }
.examples-box li:hover .li-pin { opacity: 0.6; }
.li-pin:focus-visible { opacity: 1; outline: 2px solid var(--primary); outline-offset: 1px; }
@media (hover: none) { .li-pin { opacity: 0.45; } }

/* ---------- Идеи: слипы-строки ---------- */
.idea-list { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: idea; }
.idea-list li {
  counter-increment: idea; position: relative;
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start;
  background: var(--paper); border: 0; border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 8px; cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}
.idea-list li::before {
  content: counter(idea);
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  color: var(--primary); padding-top: 1px; font-variant-numeric: tabular-nums;
}
.idea-list li:hover { background: var(--wash-2); transform: translateX(4px); }
.idea-list li span { font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; }
.idea-copy {
  font: inherit; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); background: transparent;
  border: 0; border-radius: var(--radius);
  padding: 6px 10px; cursor: pointer; white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.idea-copy:hover { color: var(--ink); background: var(--wash); }
@media (max-width: 640px) {
  .idea-list li { grid-template-columns: 34px 1fr; }
  .idea-copy { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Копилка ---------- */
.stash-fab {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 0.95rem/1.2 var(--font-text);
  background: var(--wash); color: var(--ink);
  border: 0; border-radius: var(--radius);
  padding: 9px 15px; cursor: pointer; min-height: 40px;
  transition: background 0.15s, color 0.15s;
}
.stash-fab:hover { background: var(--wash-2); }
.stash-fab.has-items { background: var(--primary); color: var(--primary-ink); }
.stash-fab .stash-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: rgba(32, 43, 36, 0.14); border-radius: 999px;
  font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
.stash-fab:not(.has-items) .stash-count { background: rgba(32, 43, 36, 0.1); }
.stash-fab.stash-bump { animation: stash-bump 0.34s ease; }
@keyframes stash-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.09); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .stash-fab.stash-bump { animation: none; }
}
.stash-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(400px, 92vw);
  background: var(--paper);
  box-shadow: -24px 0 60px -24px rgba(32, 43, 36, 0.55);
  padding: 18px 20px; transform: translateX(105%);
  transition: transform 0.24s ease; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #cfc7ab transparent;
}
.stash-drawer.open { transform: translateX(0); }
.stash-head { display: flex; align-items: center; justify-content: space-between; }
.stash-head b { font-family: var(--font-display); font-size: 1.4rem; }
#stash-list { list-style: none; margin: 10px 0; padding: 0; }
#stash-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start;
  background: var(--wash); padding: 9px 11px; margin-bottom: 7px; font-size: 0.92rem;
}
#stash-list li span { overflow-wrap: anywhere; }
.stash-del { border: 0; background: transparent; font: inherit; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.stash-del:hover { color: var(--crit); }
.stash-empty { margin: 14px 0; }
.stash-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.stash-actions .btn { min-height: 42px; padding: 8px 16px; font-size: 0.95rem; }
.stash-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(32, 43, 36, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.stash-overlay.show { opacity: 1; pointer-events: auto; }
.stash-count-in { color: var(--muted); }

/* ---------- Round 116: «Черновик» в копилке ---------- */
.stash-draft {
  margin-top: 14px; padding: 12px 12px 10px;
  border: 1px solid var(--wash-2); border-top: 3px double var(--brass);
  background: var(--paper-2, #faf6e9); border-radius: 6px;
}
.stash-draft-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stash-draft-cap {
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
}
.stash-draft-count { white-space: nowrap; }
.stash-draft textarea {
  display: block; width: 100%; min-height: 84px; margin-top: 8px; padding: 9px 10px;
  border: 1px dashed #cfc7ab; border-radius: 4px; background: #fffdf5;
  font: inherit; font-size: 0.92rem; line-height: 1.5; color: var(--ink);
  resize: vertical; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.stash-draft textarea::placeholder { color: var(--muted); opacity: 0.85; }
.stash-draft textarea:focus {
  outline: none; border-color: var(--brass); border-style: solid;
  box-shadow: 0 0 0 3px rgba(176, 141, 64, 0.16);
}
.stash-draft-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 7px;
}
.stash-draft-clear {
  border: 0; background: transparent; font: inherit; font-size: 0.85rem;
  color: var(--muted); cursor: pointer; padding: 3px 8px; border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
.stash-draft-clear:hover { color: var(--crit); background: rgba(32, 43, 36, 0.05); }
.stash-draft-clear:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.stash-draft-clear.armed { color: #fff; background: var(--crit); }

/* ---------- Round 117: «Спринт писателя» — таймер фокуса ----------
   Карточка-циферблат: латунная кайма слева (как сургучная полоса
   на листе атласа), кольцо прогресса, чипы длительности, кнопки. */
.stash-sprint {
  margin-top: 14px; padding: 12px 12px 10px;
  border: 1px solid var(--wash-2); border-left: 3px solid var(--brass);
  background: var(--paper-2, #faf6e9); border-radius: 6px;
}
.stash-sprint-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stash-sprint-cap {
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
}
.stash-sprint-week { white-space: nowrap; }
.stash-sprint-body { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.sprint-dial {
  position: relative; width: 84px; height: 84px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
}
.sprint-dial svg { position: absolute; inset: 0; }
.sprint-ring-bg { fill: none; stroke: var(--wash-2); stroke-width: 4; }
.sprint-ring-fg {
  fill: none; stroke: var(--brass); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 213.6; stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.45s linear, stroke 0.2s ease;
}
.sprint-ring-fg.paused { stroke: var(--muted); }
.sprint-ring-fg.done { stroke: var(--primary); }
.sprint-dial b {
  position: relative; font: 600 1.06rem/1 var(--font-text);
  font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: 0.02em;
}
.stash-sprint-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.sprint-state { font-size: 0.92rem; color: var(--ink); }
.sprint-chips { display: flex; gap: 6px; }
.sprint-chip {
  border: 1px solid var(--wash-2); background: var(--paper); color: var(--muted);
  font: 0.78rem/1 var(--font-text); padding: 6px 10px; cursor: pointer; border-radius: 99px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.sprint-chip:hover { color: var(--ink); border-color: var(--brass); }
.sprint-chip.active { background: var(--brass); border-color: var(--brass); color: #fff; }
.sprint-chip:disabled { opacity: 0.45; cursor: default; }
.sprint-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.sprint-btns { display: flex; gap: 8px; }
.sprint-btn {
  border: 0; background: var(--deep); color: var(--ink-on-deep);
  font: 600 0.88rem/1 var(--font-text); padding: 9px 16px; cursor: pointer; min-height: 36px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sprint-btn:hover { background: var(--primary); }
.sprint-btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--wash-2); }
.sprint-btn.ghost:hover { color: var(--ink); border-color: var(--muted); background: transparent; }
.sprint-btn:disabled { opacity: 0.45; cursor: default; background: transparent; color: var(--muted); border: 1px solid var(--wash-2); }
.sprint-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.sprint-note { margin: 8px 0 0; min-height: 1em; }

/* ---------- Тост ---------- */
.fm-toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 120;
  transform: translate(-50%, 14px);
  background: var(--deep); color: var(--ink-on-deep);
  border-radius: var(--radius); padding: 12px 20px;
  font: 0.95rem/1.4 var(--font-text);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-width: min(92vw, 480px);
}
.fm-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Служебные ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--primary); color: var(--primary-ink);
  padding: 11px 18px; font: inherit; font-size: 0.95rem;
  border: 0; cursor: pointer; appearance: none;
}
.skip-link:focus { left: 0; }
.tool-root { margin-top: 6px; }
.lazy-widget { margin: 26px 0; }
.lazy-stage { background: var(--wash); padding: 16px; }
.lazy-stage canvas { max-width: 100%; display: block; }
.lazy-load { background: var(--deep); color: var(--ink-on-deep); border: 0; border-radius: var(--radius); padding: 13px 22px; font: 600 var(--fs-body)/1.2 var(--font-text); cursor: pointer; min-height: 48px; }
.lazy-load:hover { background: var(--primary); }
.lw-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.lw-controls label { display: flex; gap: 8px; align-items: center; font-size: 0.95rem; }
.lw-controls input[type="text"], .lw-controls select { min-height: 38px; padding: 6px 10px; background: var(--paper); }
.lw-gen-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin: 8px 0 2px; }
.lw-map-info, .lw-ocean-val { color: var(--muted); font-size: 0.92rem; }
.lw-person { background: var(--paper); padding: 12px 14px; margin-top: 8px; }
.lw-person-deed { color: var(--muted); font-size: 0.95rem; margin: 4px 0 0; }
.lw-tree { display: grid; gap: 8px; }
.lw-copy, .lw-reroll { background: var(--deep); color: var(--ink-on-deep); border: 0; padding: 8px 14px; min-height: 38px; font: 600 0.9rem/1.2 var(--font-text); cursor: pointer; }
.lw-copy:hover, .lw-reroll:hover { background: var(--primary); }

/* Таблицы сравнения — настоящие таблицы, линии допустимы */
.table-scroll { overflow-x: auto; margin: 12px 0; background: var(--paper); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; min-width: 420px; }
.compare-table caption { text-align: left; padding: 10px 14px 0; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.compare-table th, .compare-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table th { font-family: var(--font-display); font-size: 1.05rem; }

/* Прочие карточки-генераторы */
.dragon-card, .profession-card, .surname-card { background: var(--paper); }
.dragon-head { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin: 4px 0 8px; }

/* Прогресс чтения гайдов */
.read-progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--primary); z-index: 90; pointer-events: none; }

/* Кнопка «Наверх» */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  width: 48px; height: 48px; border: 0;
  background: var(--deep); color: var(--ink-on-deep);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s, background 0.15s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary); }

/* ---------- Появление по скроллу (JS добавляет .rv-pre/.rv-in) ---------- */
.rv-pre { opacity: 0; transform: translateY(22px); }
.rv-in {
  opacity: 1; transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--rv-delay, 0ms);
}

/* ---------- Cookie-слип ---------- */
.cookie-slip {
  position: fixed; left: 18px; bottom: 18px; z-index: 110;
  width: min(400px, calc(100vw - 36px));
  background: var(--paper);
  box-shadow: 0 24px 60px -24px rgba(32, 43, 36, 0.6);
}
.cookie-slip .stripe-band { height: 8px; }
.cookie-slip-in { padding: 16px 18px 18px; }
.cookie-slip h2 { font-size: 1.35rem; margin: 0 0 6px; }
.cookie-slip p { margin: 0 0 12px; font-size: 0.92rem; color: var(--muted); line-height: 1.5; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-actions .btn { min-height: 42px; padding: 9px 16px; font-size: 0.92rem; flex: 1 1 auto; }

/* ---------- Футер: оборот фолио ---------- */
.site-footer { margin-top: 54px; background: var(--deep); color: var(--ink-on-deep); }
.footer-in { display: grid; gap: 26px; grid-template-columns: 2fr 1fr 1fr; padding: 46px 20px 30px; max-width: var(--wrap); margin: 0 auto; }
.footer-in .f-title { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; margin-bottom: 10px; letter-spacing: -0.01em; }
.footer-in .f-title a { color: var(--ink-on-deep); }
.footer-in > div > .f-title:not(:has(a)) { font-size: 1.05rem; font-family: var(--font-text); color: var(--muted-on-deep); margin-top: 4px; }
.footer-in a { display: block; color: var(--muted-on-deep); font-size: 0.97rem; padding: 2px 0; }
.footer-in a:hover { color: var(--ink-on-deep); text-decoration: none; }
.footer-in p { color: var(--muted-on-deep); font-size: 0.97rem; max-width: 34rem; }
.f-bottom { max-width: var(--wrap); margin: 0 auto; padding: 14px 20px 30px; color: var(--muted-on-deep); font-size: 0.9rem; }
.f-bottom a { color: var(--muted-on-deep); text-decoration: underline; text-underline-offset: 3px; }
.f-bottom a:hover { color: var(--ink-on-deep); }
@media (max-width: 760px) { .footer-in { grid-template-columns: 1fr; } }

/* Гайд-статья */
.guide-article { max-width: 46rem; }
.guide-tool { background: var(--wash); padding: 18px; margin: 20px 0; }

/* ============================================================
   Round 111: поиск по сайту, якоря разделов, кнопка «Наверх».
   Та же система: бумага, прямые углы, двойной низ у чипов,
   нефритовый акцент, без теней и стёкол.
   ============================================================ */

/* ---------- Кнопка «Поиск» в шапке (родня nav-lucky) ---------- */
.nav-search {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 4px;
  padding: 6px 12px 7px; min-height: 34px;
  font: 600 0.92rem/1.1 var(--font-text); letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease, border-color 0.16s ease;
}
.nav-search:hover { background: var(--wash); color: var(--ink); }
.nav-search:active { transform: translateY(1px); border-bottom-width: 1px; margin-bottom: 1px; }
.nav-search:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-search svg { color: var(--primary); flex: 0 0 auto; transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1.2); }
.nav-search:hover svg { transform: scale(1.12) rotate(8deg); }
.nav-kbd {
  font: 600 0.68rem/1 var(--font-text); color: var(--muted);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 3px;
  padding: 2px 5px 3px; margin-left: 2px; letter-spacing: 0.06em;
  background: var(--bg);
}
@media (max-width: 900px) { .nav-kbd { display: none; } }

/* ---------- Оверлей поиска: лист атласа поверх поля ---------- */
.sr-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(34, 49, 41, 0.46);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 9vh 16px 16px; overflow-y: auto;
}
.sr-overlay[hidden] { display: none; }
.sr-panel {
  width: min(680px, 100%);
  background: var(--paper);
  border: 1px solid var(--wash-2);
  border-bottom: 3px solid var(--deep);
  animation: sr-in 0.16s ease-out;
}
@keyframes sr-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.sr-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--wash); color: var(--muted); }
.sr-input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: 400 1.08rem/1.3 var(--font-text); color: var(--ink); padding: 2px 0;
}
.sr-input::placeholder { color: var(--muted); opacity: 0.75; }
.sr-kbd {
  font: 600 0.7rem/1 var(--font-text); color: var(--muted);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 3px;
  padding: 3px 6px 4px; background: var(--bg); letter-spacing: 0.05em; white-space: nowrap;
}
.sr-body { max-height: 56vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cfc7ab transparent; }
.sr-results { list-style: none; margin: 0; padding: 0; }
.sr-cap {
  padding: 9px 16px 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--brass); font-weight: 700;
}
.sr-item {
  display: block; padding: 10px 16px 11px; border-top: 1px solid var(--wash);
  cursor: pointer;
}
.sr-item:first-child, .sr-cap + .sr-item { border-top: 0; }
.sr-item:hover { background: var(--wash); }
.sr-item.active { background: var(--wash); box-shadow: inset 3px 0 0 var(--primary); }
.sr-sec {
  display: inline-block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--primary); border: 1px solid var(--line); padding: 2px 6px 3px; margin-right: 10px;
  vertical-align: 2px; background: var(--bg);
}
.sr-title { font-family: var(--font-text); font-size: 1rem; color: var(--ink); }
.sr-item.active .sr-title { font-weight: 700; }
.sr-desc {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 0.85rem; color: var(--muted); margin-top: 3px;
}
.sr-empty { padding: 22px 16px; color: var(--muted); border-top: 1px solid var(--wash); }
.sr-foot {
  display: flex; gap: 18px; flex-wrap: wrap; padding: 9px 16px 11px;
  border-top: 1px solid var(--wash); font-size: 0.8rem; color: var(--muted);
  background: var(--bg);
}
.sr-foot .sr-kbd { margin-right: 4px; }
body.sr-lock { overflow: hidden; }
@media (max-width: 640px) { .sr-overlay { padding-top: 4vh; } .sr-body { max-height: 62vh; } }

/* ---------- Якоря-ссылки у заголовков гайдов ---------- */
/* Round 116: sticky-шапка 64px — не даём ей накрывать заголовок при
 * переходе по глубокой ссылке #razdel */
.guide-article h2, .guide-article h3 { position: relative; scroll-margin-top: 84px; }
.h-anchor {
  margin-left: 10px; text-decoration: none; color: var(--brass);
  font-size: 0.62em; vertical-align: 0.35em; opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.guide-article h2:hover .h-anchor, .guide-article h3:hover .h-anchor,
.h-anchor:focus-visible { opacity: 1; }
.h-anchor:hover { color: var(--primary); text-decoration: none; }
.h-anchor.copied { color: var(--primary); opacity: 1; }
/* Round 116: подзаголовки h3 — тише и ниже, чтобы не спорили с h2 */
.h-anchor-h3 { font-size: 0.58em; vertical-align: 0.28em; margin-left: 8px; opacity: 0; }
.guide-article h3:hover .h-anchor-h3 { opacity: 0.85; }
.h-anchor-h3:hover, .h-anchor-h3.copied { opacity: 1; }

/* ---------- «Наверх»: прогресс чтения кольцом ---------- */
.totop {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 44px; height: 44px; padding: 0;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 4px;
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.16s ease;
}
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--wash); }
.totop:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.totop:active { transform: translateY(1px); }
.totop svg { display: block; }
.totop-track { color: var(--wash-2); }
.totop-ring { color: var(--primary); transition: stroke-dashoffset 0.1s linear; }

/* ---------- Полоса прочтения статьи (R118) ---------- */
.readbar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 55;
  height: 3px; pointer-events: none;
  opacity: 0; transition: opacity 0.35s ease;
}
.readbar.is-on { opacity: 1; }
.readbar-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, var(--brass), var(--primary));
  border-radius: 0 2px 2px 0;
}
.readbar-tip {
  position: absolute; top: 50%; left: 0; width: 7px; height: 7px;
  transform: translate(-3px, -50%);
  background: var(--primary); border: 1.5px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--wash-2), 0 1px 4px rgba(44, 106, 78, 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .readbar, .readbar-fill, .readbar-tip { transition: none; }
}
@media print {
  .readbar, .readbar-fill, .readbar-tip { display: none !important; }
}

/* ---------- Мобильная кнопка «Содержание» + нижний лист (R118) ---------- */
.toc-fab {
  position: fixed; left: 12px; bottom: 12px; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; min-height: 44px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  cursor: pointer;
  box-shadow: 0 10px 28px -14px rgba(32, 43, 36, 0.55);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease, background 0.16s ease;
}
.toc-fab svg { color: var(--primary); }
.toc-fab.is-past { opacity: 1; visibility: visible; transform: none; }
.toc-fab:hover { background: var(--wash); }
.toc-fab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.toc-fab:active { transform: translateY(1px); }
.toc-sheet-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(32, 43, 36, 0.34);
}
.toc-sheet {
  position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 71;
  background: var(--paper);
  border: 1px solid var(--wash-2); border-bottom-width: 3px; border-radius: 10px;
  box-shadow: 0 24px 60px -24px rgba(32, 43, 36, 0.6);
  animation: toc-sheet-up 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes toc-sheet-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.toc-sheet-head {
  padding: 12px 16px 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--wash);
}
.toc-sheet .toc-list { max-height: 46vh; }
@media (min-width: 1200px) {
  .toc-fab, .toc-sheet, .toc-sheet-backdrop { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .toc-fab, .toc-sheet { animation: none; transition: none; }
}
@media print {
  .toc-fab, .toc-sheet, .toc-sheet-backdrop { display: none !important; }
}
@media (max-width: 640px) { .totop { right: 12px; bottom: 12px; } }

/* ============================================================
   Round 112: содержание гайда (скроллспай), «Поделиться»,
   пометка-вспышка на заголовке при переходе по оглавлению.
   ============================================================ */

/* ---------- TOC-карточка гайда ---------- */
.toc-card {
  margin: 26px 0 8px;
  background: var(--paper);
  border: 1px solid var(--wash-2);
  border-bottom-width: 3px;
}
.toc-head {
  padding: 10px 16px 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--wash);
}
.toc-list {
  list-style: none; margin: 0; padding: 8px 0;
  counter-reset: toc;
  max-height: 52vh; overflow-y: auto;
  position: relative;
  scrollbar-width: thin; scrollbar-color: #cfc7ab transparent;
}
/* R118: латунный маятник-маркер, скользящий по рельсу к активному пункту */
.toc-marker {
  position: absolute; left: -2px; top: 0; width: 7px; height: 7px;
  border-radius: 50%; background: var(--primary);
  box-shadow: 0 0 0 2px var(--paper);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .toc-marker { transition: none; } }
.toc-list a {
  display: block; padding: 7px 16px 8px;
  color: var(--ink); font-size: 0.95rem; line-height: 1.35;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.toc-list a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  color: var(--brass); font-size: 0.72rem; letter-spacing: 0.06em;
  margin-right: 10px;
}
.toc-list a:hover { background: var(--wash); text-decoration: none; }
.toc-list a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.toc-list a.active { border-left-color: var(--primary); background: var(--wash); }
.toc-list a.active::before { color: var(--primary); }
@media (min-width: 1200px) {
  .guide-article { position: relative; }
  .toc-card {
    position: absolute; top: 0; bottom: 0;
    left: calc(100% + 44px); width: 300px;
    margin: 0; background: none; border: 0;
  }
  .toc-sticky {
    position: sticky; top: 96px;
    background: var(--paper);
    border: 1px solid var(--wash-2);
    border-bottom-width: 3px;
  }
  .toc-list { max-height: calc(100vh - 220px); }
}

/* ---------- «Поделиться» ---------- */
.share-row { display: flex; justify-content: flex-end; margin: -4px 0 14px; }
.share-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--paper); color: var(--muted);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 4px;
  padding: 5px 11px 6px; min-height: 32px;
  font: 600 0.85rem/1.1 var(--font-text); letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease, border-color 0.16s ease;
}
.share-chip:hover { background: var(--wash); color: var(--ink); }
.share-chip:active { transform: translateY(1px); border-bottom-width: 1px; margin-bottom: 1px; }
.share-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.share-chip svg { color: var(--primary); flex: 0 0 auto; }
.share-chip.ok { color: var(--primary); border-color: var(--primary); }
.share-chip.ok svg { transform: translateY(-1px); }

/* ---------- Пометка-вспышка на заголовке ---------- */
.guide-article h2.h-flash { animation: h-flash 1.25s ease-out; }
@keyframes h-flash {
  0% { background: var(--accent); box-shadow: inset 3px 0 0 var(--brass); }
  100% { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}

/* ---------- Round 113: «Отметки о прочтении» (.readcheck) ---------- */
/* Лист атласа: бумага, прямые углы, двойной низ; галочки — тушь → нефрит. */
.readcheck {
  background: var(--paper);
  border: 1px solid var(--wash-2);
  border-bottom-width: 3px;
  padding: 20px 22px 16px;
  margin: 28px 0;
}
.rc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rc-title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; letter-spacing: 0.01em; }
.rc-count { font-variant-numeric: tabular-nums; font-size: var(--fs-small); color: var(--brass); font-weight: 700; }
.rc-mark {
  margin-left: auto; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); border: 1px solid var(--primary); padding: 2px 9px;
  animation: rc-stamp 0.45s ease-out;
}
@keyframes rc-stamp {
  0% { opacity: 0; transform: rotate(-6deg) scale(1.25); }
  100% { opacity: 1; transform: rotate(0deg) scale(1); }
}
.rc-line { height: 3px; background: var(--wash); margin: 12px 0 8px; }
.rc-line i { display: block; height: 100%; width: 0; background: var(--brass); transition: width 0.35s ease, background 0.35s ease; }
.readcheck.done .rc-line i { background: var(--primary); }
.rc-list { display: flex; flex-direction: column; }
.rc-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 7px 6px;
  border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background 0.15s ease;
}
.rc-row:last-child { border-bottom: 0; }
.rc-row:hover { background: var(--wash); }
.rc-row span { font-size: 0.97rem; line-height: 1.45; }
.rc-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 17px; height: 17px;
  margin: 3px 0 0; border: 1.5px solid var(--ink); background: var(--paper);
  cursor: pointer; flex: 0 0 auto; position: relative; border-radius: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.rc-row input[type="checkbox"]:hover { border-color: var(--primary); }
.rc-row input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.rc-row input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid var(--primary-ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.rc-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rc-foot { margin-top: 10px; display: flex; justify-content: flex-end; }
.rc-reset {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: var(--fs-small);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 2px 4px;
}
.rc-reset:hover { color: var(--crit); }
.rc-reset:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Round 113: «Вы недавно смотрели» (.recent-strip) ---------- */
/* Смывочная лента перед футером; чипсы — родня kbd-чипов. */
.recent-strip {
  background: var(--wash);
  border-top: 1px solid var(--wash-2);
  padding: 18px 0 20px;
}
.recent-strip + .site-footer { margin-top: 0; }
.recent-head {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.recent-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 148px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--wash-2) transparent;
}
.recent-chips::-webkit-scrollbar { width: 6px; }
.recent-chips::-webkit-scrollbar-thumb { background: var(--wash-2); }
.recent-chips::-webkit-scrollbar-track { background: transparent; }
.recent-chip {
  display: inline-block; background: var(--paper); color: var(--ink);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 4px;
  padding: 6px 12px; font-size: var(--fs-small); line-height: 1.4; text-decoration: none;
  max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.recent-chip:hover {
  text-decoration: none; border-color: var(--brass); color: var(--primary);
  transform: translateY(-1px);
}
.recent-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Round 114: «Испытание дня» (.daily-band) ---------- */
/* Лист атласа на смывочной полосе: бумага, прямые углы, двойной низ.
   Нумерация латунью, теги-капс, отметка «Готово» — нефрит. */
.daily-band { padding: 34px 0 40px; }
.daily-card {
  background: var(--paper);
  border: 1px solid var(--wash-2);
  border-bottom: 3px solid var(--deep);
  padding: 22px 24px 18px;
}
.daily-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.daily-h {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 700; line-height: 1.15;
  margin: 0; letter-spacing: -0.01em;
}
.daily-date {
  background: var(--bg); border: 1px solid var(--wash-2); border-bottom-width: 2px;
  border-radius: 3px; padding: 5px 8px 4px;
  font-size: 0.75rem; font-weight: 600; line-height: 1; color: var(--muted);
}
.daily-mark {
  border: 2px solid var(--primary); color: var(--primary);
  padding: 2px 8px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; line-height: 1.4;
  animation: fm-dc-stamp 0.45s ease-out both;
}
@keyframes fm-dc-stamp {
  0% { opacity: 0; transform: rotate(-7deg) scale(1.25); }
  60% { opacity: 1; transform: rotate(2deg) scale(0.96); }
  100% { opacity: 1; transform: none; }
}
.daily-lead { margin: 10px 0 0; max-width: 48rem; font-size: var(--fs-small); color: var(--muted); line-height: 1.55; }
.daily-skel { margin: 14px 0 0; font-size: var(--fs-small); color: var(--muted); }
.daily-list {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; gap: 12px;
}
@media (min-width: 900px) { .daily-list { grid-template-columns: repeat(3, 1fr); } }
.daily-list:not([hidden]) { animation: fm-dc-in 0.35s ease-out both; }
@keyframes fm-dc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.daily-item {
  display: flex; flex-direction: column; align-items: stretch;
  background: var(--bg); border: 1px solid var(--wash-2);
  padding: 14px 14px 12px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.daily-item.done { border-color: var(--primary); background: var(--paper); }
.daily-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.daily-num {
  font-size: 0.8rem; font-weight: 700; line-height: 1;
  letter-spacing: 0.1em; color: var(--brass); font-variant-numeric: tabular-nums;
}
.daily-tag {
  border: 1px solid var(--line); padding: 1px 6px;
  font-size: 0.64rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; line-height: 1.5; color: var(--primary);
}
.daily-link {
  display: block; margin-top: 9px;
  font-size: 1.02rem; font-weight: 700; line-height: 1.3; color: var(--ink);
  text-decoration: none;
}
.daily-link:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.daily-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.daily-desc {
  margin-top: 6px; font-size: var(--fs-small); line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.daily-check {
  margin-top: 12px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; cursor: pointer;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 4px;
  padding: 6px 10px; font: inherit; font-size: var(--fs-small); font-weight: 600; line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.daily-check:hover { background: var(--wash); }
.daily-check:active { transform: translateY(1px); }
.daily-check:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.daily-item.done .daily-check { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.daily-item.done .daily-check:hover { background: var(--primary-2); border-color: var(--primary-2); }
.daily-foot { margin: 12px 0 0; font-size: var(--fs-small); color: var(--muted); }
.daily-foot:empty { display: none; }

/* ---------- Round 114: «Дневник исследователя» (.diary-strip) ---------- */
/* Полоса перед «Вы недавно смотрели»: ранг, счётчик, нефритовая линия. */
.diary-strip { background: var(--wash); border-top: 1px solid var(--wash-2); padding: 14px 0 16px; }
.diary-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.diary-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); line-height: 1.4;
}
.diary-rank {
  font-family: var(--font-display); font-size: 1.06rem; font-weight: 700;
  line-height: 1.3; color: var(--ink);
}
.diary-count { font-size: var(--fs-small); color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.4; }
.diary-line { margin-top: 8px; height: 3px; background: var(--wash-2); }
.diary-line i {
  display: block; height: 100%; background: var(--primary);
  transition: width 0.5s ease;
}

/* ---------- Round 114: полировка — выделение, скроллбар, нажатие ---------- */
::selection { background: rgba(44, 106, 78, 0.2); color: var(--ink); }
html { scrollbar-width: thin; scrollbar-color: var(--wash-2) transparent; }
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: var(--wash-2); border: 2px solid var(--bg); border-radius: 6px; }
html::-webkit-scrollbar-thumb:hover { background: var(--brass); }
.recent-chip:active, .daily-check:active, .chip:active, .btn:active,
.toc-list a:active, .share-chip:active { transform: translateY(1px); }
@media (max-width: 640px) {
  /* лента «Вы недавно смотрели» на телефоне — горизонтальная строка со свайпом */
  .recent-chips {
    flex-wrap: nowrap; max-height: none; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .recent-chip { flex: 0 0 auto; scroll-snap-align: start; }
}

/* ---------- Round 115: подсказки на 404 (.nf-sugg) ---------- */
/* Лист атласа под lead: заголовок-капс, чипы-родня recent, kbd-подсказка. */
.nf-sugg {
  margin: 18px 0 0; padding: 16px 18px 14px;
  background: var(--paper); border: 1px solid var(--wash-2); border-bottom: 3px solid var(--deep);
  max-width: 620px;
}
.nf-head {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); margin-bottom: 10px;
}
.nf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-chip {
  display: inline-block; background: var(--bg); color: var(--ink);
  border: 1px solid var(--wash-2); border-bottom-width: 2px; border-radius: 4px;
  padding: 6px 12px; font-size: var(--fs-small); line-height: 1.4; text-decoration: none;
  max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nf-chip:hover { text-decoration: none; border-color: var(--brass); color: var(--primary); transform: translateY(-1px); }
.nf-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nf-hint { margin: 10px 0 0; font-size: var(--fs-small); color: var(--muted); }
.nf-kbd {
  display: inline-block; background: var(--bg); border: 1px solid var(--wash-2); border-bottom-width: 2px;
  border-radius: 3px; padding: 1px 6px; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.05em; color: var(--ink); vertical-align: 1px;
}

/* ---------- Round 115: полировка — уголки фолио, линейка дневника, ховеры ---------- */
/* Латунные уголки на листе «Испытания дня» — рамка старой карты */
.daily-card { position: relative; }
.daily-card::before, .daily-card::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
}
.daily-card::before { top: 7px; left: 7px; border-top: 2px solid var(--brass); border-left: 2px solid var(--brass); }
.daily-card::after { bottom: 7px; right: 7px; border-bottom: 2px solid var(--brass); border-right: 2px solid var(--brass); }
/* Линейка в дневнике: деления под нефритовой заливкой */
.diary-line {
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent 11px, var(--wash-2) 11px, var(--wash-2) 12px);
}
/* Ховер карточки испытания — лёгкий подъём и латунный край */
.daily-item:hover { border-color: var(--brass); transform: translateY(-1px); }
/* Фокус в тёмном футере — светлое кольцо, видно на deep-поле */
.site-footer a:focus-visible, .f-cookie-link:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- Печать ---------- */
@media print {
  .site-header, .site-footer, .tool-root, .hero-cta, .btn, .skip-link, .controls, .stripe-band,
  .to-top, .read-progress, .name-toolbar, [data-random-tool],
  .stash-fab, .stash-drawer, .stash-overlay, .fm-toast, .idea-copy, .cookie-slip,
  .totop, .sr-overlay, .nav-search, .nav-lucky, .h-anchor,
  .toc-card, .share-row, .recent-strip, .rc-reset,
  .daily-band, .daily-skel, .daily-check, .diary-strip,
  .stash-draft, .stash-sprint, .nf-sugg, .duel-arena, .wl-arena { display: none !important; }
  body { background: #fff; font-size: 12pt; color: #000; }
  .card, .examples-box, .scene-box, .reference-box, .inside-box, .cta-box { background: #fff; }
  main { max-width: 100%; padding-bottom: 0; }
  .name-list ul { max-height: none; overflow: visible; columns: 3; }
  .idea-list li { break-inside: avoid; }
  .band { width: auto; margin-left: 0; }
  .guide-article h2, .seo-text h2 { page-break-after: avoid; break-after: avoid; }
  .card, .compare-table, .toc-bar, details { break-inside: avoid; page-break-inside: avoid; }
  .readcheck { border-color: #999; border-bottom-width: 1px; }
  .readcheck .rc-mark { display: none; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tool-card, .guide-card, details, details summary::before, .chip, .toc-bar, .idea-list li,
  .stash-drawer, .fm-toast, .to-top, .empire-card, .btn, .rv-in { transition: none !important; animation: none !important; }
  .rv-pre { opacity: 1; transform: none; }
  .hero-plate canvas { animation: none !important; }
  .nav-lucky, .nav-lucky svg, .nav-search, .nav-search svg { transition: none !important; animation: none !important; }
  .sr-panel { animation: none !important; }
  .totop { transition: opacity 0.2s ease, visibility 0.2s ease; transform: none; }
  .totop-ring { transition: none !important; }
  .guide-article h2.h-flash { animation: none !important; }
  .toc-list a, .share-chip { transition: none !important; }
  .rc-line i, .rc-row, .rc-row input[type="checkbox"], .rc-mark, .recent-chip { transition: none !important; animation: none !important; }
  .daily-mark, .daily-list:not([hidden]), .daily-item, .daily-check, .diary-line i { transition: none !important; animation: none !important; }
  .daily-item:hover, .nf-chip:hover { transform: none; }
  .stash-draft textarea, .stash-draft-clear { transition: none !important; }
  .stash-sprint, .sprint-chip, .sprint-btn { transition: none !important; }
  .sprint-ring-fg { transition: none !important; }
  .daily-card::before, .daily-card::after { display: none; }
}

/* ---------- Round 119: Дуэль имён — арена, карты, таблица ---------- */
.duel-arena { margin-top: 24px; }
.duel-culture-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.duel-culture { font-size: 0.92rem; color: var(--muted); font-style: italic; }
.duel-streak {
  font-size: 0.8rem; font-weight: 600; padding: 3px 11px;
  background: var(--accent); color: var(--ink); border: 1px solid var(--brass);
}
.duel-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.duel-card {
  font: inherit; text-align: center; cursor: pointer;
  background: var(--paper); border: 1px solid var(--wash-2);
  padding: 20px 22px 16px; min-height: 108px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.duel-card:hover { border-color: var(--brass); transform: translateY(-2px); box-shadow: 0 3px 0 rgba(34, 49, 41, 0.1); }
.duel-card:active { transform: translateY(0); box-shadow: none; }
.duel-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.duel-card.is-lose { opacity: 0.55; }
.duel-card.is-win { border-color: var(--primary); background: linear-gradient(0deg, rgba(44, 106, 78, 0.07), rgba(44, 106, 78, 0.07)), var(--paper); }
.duel-name { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; line-height: 1.15; color: var(--ink); }
.duel-elo { font-size: 0.8rem; color: var(--muted); }
.duel-vs {
  align-self: center; font-family: var(--font-display); font-style: italic;
  font-size: 1.05rem; color: var(--brass); padding: 0 4px;
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
}
.duel-vs::before, .duel-vs::after { content: ""; display: block; width: 14px; height: 1px; background: var(--brass); opacity: 0.6; }
.duel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.duel-session { margin-left: auto; }
.duel-board { margin-top: 20px; border-top: 1px dashed var(--wash-2); padding-top: 16px; }
.duel-board h3 {
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 700;
  letter-spacing: 0.02em; margin: 0 0 10px;
}
.duel-board h3::before { content: "✦"; color: var(--brass); margin-right: 8px; font-size: 0.8em; }
.duel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.duel-board-row {
  display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 10px; align-items: baseline;
  background: var(--paper); border: 1px solid var(--wash-2);
  padding: 8px 12px;
}
.duel-rank { font-weight: 700; color: var(--brass); font-variant-numeric: tabular-nums; }
.duel-board-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.duel-board-culture { color: var(--muted); font-size: 0.85rem; }
.duel-board-score { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.duel-board-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.duel-note { margin-top: 14px; max-width: 46rem; }
.duel-reset.is-armed { color: var(--seal); border-color: var(--seal); }
@media (max-width: 640px) {
  .duel-row { grid-template-columns: 1fr; gap: 8px; }
  .duel-vs { padding: 2px 0; }
  .duel-session { margin-left: 0; }
  .duel-board-row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .duel-board-culture { display: none; }
}

/* Round 119: ссылки в статье — латунное подчёркивание вместо сплошного */
.seo-text a, .guide-article p a, .guide-article li a, .duel-note a {
  text-decoration: underline;
  text-decoration-color: rgba(169, 129, 79, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.seo-text a:hover, .guide-article p a:hover, .guide-article li a:hover, .duel-note a:hover {
  text-decoration-color: var(--brass);
  text-decoration-thickness: 2px;
}

/* Round 119: reduced-motion — движения дуэли сняты */
@media (prefers-reduced-motion: reduce) {
  .duel-card, .btn { transition: none !important; }
  .duel-card:hover { transform: none; }
  .btn:hover { transform: none; }
}

/* ---------- Round 120: Календарь мира ---------- */
.world-cal {
  margin-top: 26px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 24px 30px 18px;
  position: relative;
  box-shadow: 0 22px 46px -38px rgba(32, 43, 36, 0.5);
}
.world-cal::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(169, 129, 79, 0.22);
  pointer-events: none;
}
.cal-head { text-align: center; margin-bottom: 16px; }
.cal-date { font-size: 0.88rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.cal-name { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; margin: 4px 0 2px; }
.cal-sub { margin: 0; }
.cal-months {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.cal-month {
  font: inherit; text-align: left; cursor: pointer; width: 100%;
  background: var(--bg); border: 1px solid var(--wash-2);
  padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; min-height: 44px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.cal-month:hover { border-color: var(--brass); background: var(--paper); transform: translateY(-1px); }
.cal-month:active { transform: translateY(0); }
.cal-month:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cal-month b { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; color: var(--ink); line-height: 1.15; }
.cal-mo { color: var(--brass); font-variant-numeric: tabular-nums; font-size: 0.86em; margin-right: 2px; }
.cal-note { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
.cal-extra {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--wash-2);
}
.cal-extra b { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }
.cal-extra ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; }
.cal-extra li { font-size: 0.9rem; line-height: 1.45; }
.cal-extra li b { text-transform: none; letter-spacing: 0; font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.cal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 14px;
}
@media (max-width: 760px) {
  .cal-months { grid-template-columns: repeat(2, 1fr); }
  .cal-extra { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .cal-months { grid-template-columns: 1fr; }
  .world-cal { padding: 20px 18px 14px; }
}
/* Round 120: печать и reduced-motion — календарь печатаем, движение снимаем */
@media print {
  .world-cal::before { content: none; }
  .cal-foot { display: none !important; }
  .cal-month:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-month, .cal-month:hover { transition: none !important; transform: none !important; }
}

/* ==================================================================
   Round 121: «Колесо сюжетных ходов» — барабан (conic-gradient),
   латунный обод, сургучный указатель, сектор-табы, карточка хода.
   ================================================================== */
.wl-arena {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(260px, 1fr);
  gap: 30px;
  align-items: start;
  margin-top: 22px;
}
.wl-side { display: grid; gap: 12px; justify-items: center; }
.wl-tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.wl-tab {
  font: inherit; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); cursor: pointer;
  background: var(--paper); border: 1px solid var(--wash-2); border-bottom-width: 2px;
  padding: 5px 10px; min-height: 34px;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}
.wl-tab:hover { color: var(--ink); background: var(--wash); }
.wl-tab.is-on { color: var(--ink-on-deep); background: var(--deep); border-color: var(--deep); }
.wl-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wl-stage {
  position: relative;
  width: min(330px, 76vw);
  aspect-ratio: 1 / 1;
  margin-top: 4px;
}
.wl-rotor {
  position: absolute; inset: 0; border-radius: 50%;
  border: 4px solid var(--brass);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--wash-2), inset 0 0 0 1px rgba(169, 129, 79, 0.35), 0 10px 22px -14px rgba(34, 49, 41, 0.45);
  overflow: hidden;
  will-change: transform;
}
.wl-arm { position: absolute; inset: 0; pointer-events: none; }
.wl-arm > span {
  position: absolute; top: 5%; left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.wl-pointer {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 17px solid var(--seal);
  filter: drop-shadow(0 2px 1px rgba(34, 49, 41, 0.28));
}
.wl-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 31%; aspect-ratio: 1 / 1; border-radius: 50%; z-index: 2;
  display: grid; place-content: center; gap: 1px; text-align: center;
  font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-on-deep); background: var(--deep);
  border: 3px solid var(--brass); box-shadow: 0 4px 12px -6px rgba(34, 49, 41, 0.55);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.wl-hub span { font-size: 1.05rem; color: var(--brass); line-height: 1; }
.wl-hub:hover { background: var(--deep-2); transform: translate(-50%, -50%) scale(1.045); }
.wl-hub:active { transform: translate(-50%, -50%) scale(0.96); }
.wl-hub:disabled { cursor: default; opacity: 0.85; }
.wl-hub:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.wl-hint { margin: 0; text-align: center; }
.wl-panel { display: grid; gap: 14px; align-content: start; }
.wl-result {
  background: var(--paper);
  border: 1px solid var(--wash-2); border-left: 4px solid var(--brass);
  padding: 16px 18px 14px;
  box-shadow: 0 6px 16px -12px rgba(34, 49, 41, 0.4);
}
.wl-kicker {
  display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brass); margin-bottom: 5px;
}
.wl-result-label { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.wl-flavor { margin: 7px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.wl-result-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.wl-history h3 { margin: 0 0 7px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.wl-history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.wl-history-list li {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 0.9rem; line-height: 1.4;
  border-bottom: 1px dashed var(--wash-2); padding-bottom: 5px;
}
.wl-history-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.wl-history-theme { flex: none; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--brass); }
.wl-note { margin: 2px 0 0; max-width: 52ch; }
@media (max-width: 860px) {
  .wl-arena { grid-template-columns: 1fr; gap: 22px; }
  .wl-note { max-width: none; }
}
@media (max-width: 420px) {
  .wl-stage { width: min(270px, 88vw); }
  .wl-arm > span { font-size: 0.56rem; }
}
