/* Город звона
   Палитра — от Звенигородского чина: белый камень, киноварь, охра, голубец.
   Шрифты: Ruslan Display (заголовки, буквицы, цифирь), PT Serif (текст). Оба — OFL. */

@font-face { font-family: 'Ruslan Display'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/ruslan-display-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Ruslan Display'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/ruslan-display-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-serif-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-400-italic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/pt-serif-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-700-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/pt-serif-cyrillic-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/pt-serif-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --sky: #E3E7E6;          /* ноябрьское небо */
  --stone: #F4F2EC;        /* белый камень */
  --stone-2: #E9E5DB;
  --ink: #2A231E;          /* железно-галловые чернила */
  --ink-2: #5C544D;
  --line: rgba(42, 35, 30, .15);
  --line-2: rgba(42, 35, 30, .32);
  --kinovar: #A63A24;      /* киноварь красных строк */
  --kinovar-ink: #FBF5EE;
  --A: #8A5D16;            /* охра — роль А */
  --A-soft: #EFE3C8;
  --B: #3D6787;            /* голубец — роль Б */
  --B-soft: #D9E4EC;
  --focus: #3D6787;
  --f-display: 'Ruslan Display', 'PT Serif', Georgia, serif;
  --f-body: 'PT Serif', Georgia, 'Times New Roman', serif;
  --measure: 36rem;
  --tabs-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sky: #151A1F;
    --stone: #1F262D;
    --stone-2: #28313A;
    --ink: #ECE5D8;
    --ink-2: #ABA399;
    --line: rgba(236, 229, 216, .14);
    --line-2: rgba(236, 229, 216, .3);
    --kinovar: #DE6E54;
    --kinovar-ink: #1A110E;
    --A: #D9A653;
    --A-soft: rgba(217, 166, 83, .13);
    --B: #8FB5D3;
    --B-soft: rgba(143, 181, 211, .13);
    --focus: #8FB5D3;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 17px/1.62 var(--f-body);
  font-kerning: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
/* едва заметная фактура белого камня */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.48 0 0 0 0 0.45 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.in-game { padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }

a { color: var(--kinovar); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.main:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--stone); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 22px; height: 22px; flex: none; }

.main { max-width: 40rem; margin: 0 auto; padding: 0 18px 40px; }
.wrap { max-width: var(--measure); margin: 0 auto; }

/* ───────── цифирь с титлом ───────── */
.cn { position: relative; display: inline-block; font-family: var(--f-display); line-height: 1; padding: 0 .06em; }
.cn::before {
  content: ''; position: absolute; left: -.12em; right: -.12em; top: -.34em; height: .3em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 7'%3E%3Cpath d='M1.5 6 3.4 2.2C8 1 16 1 20.6 2.2L22.5 6' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 7'%3E%3Cpath d='M1.5 6 3.4 2.2C8 1 16 1 20.6 2.2L22.5 6' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ───────── колокольный пояс с буквицами ───────── */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--sky) 88%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) { .top { background: var(--sky); } }
.top-in { max-width: 40rem; margin: 0 auto; padding: 6px 14px 6px; }
.belt {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 7px 4px 18px;
  border-top: 3px double var(--A);
  border-bottom: 3px double var(--A);
}
.belt.is-word { padding-bottom: 7px; }
.top-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 14px; color: var(--ink-2); padding: 5px 2px 1px; }
.top-line .score { margin-left: auto; color: var(--ink); font-weight: 700; }
.pres { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.dot.on { background: #4F8A55; box-shadow: 0 0 0 3px rgba(79, 138, 85, .2); }
.net.warn { color: var(--kinovar); }
.pass { font: inherit; font-size: 14px; color: var(--kinovar); background: none; border: 1px solid var(--kinovar); border-radius: 3px; padding: 2px 8px; cursor: pointer; }

.seal {
  position: relative; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.seal b { font-family: var(--f-display); font-weight: 400; font-size: 16px; line-height: 1; transform: translateY(1px); }
.seal.empty { border: 1.5px dashed var(--line-2); }
.seal.mine, .seal.won {
  background: var(--kinovar); color: var(--kinovar-ink);
  box-shadow: 0 0 0 2px var(--sky), 0 0 0 3px var(--kinovar);
}
.seal.mine .cn { position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--kinovar); }
.seal.theirs { border: 2px solid var(--B); background: var(--B-soft); }
.seal.theirs.r-A { border-color: var(--A); background: var(--A-soft); }
.seal.theirs::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; color: var(--B); opacity: .7; }
.seal.theirs.r-A::after { color: var(--A); }
.seal.big { width: 64px; height: 64px; }
.seal.big b { font-size: 34px; }
.seal.big.mine .cn { font-size: 18px; top: calc(100% + 17px); }
.seal.big.mine, .seal.big.won { box-shadow: 0 0 0 3px var(--stone), 0 0 0 4.5px var(--kinovar); }
.seal.big.theirs::after { width: 10px; height: 10px; }

/* ───────── нижние вкладки ───────── */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  background: var(--stone); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  flex: 1; max-width: 10rem; height: var(--tabs-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-2); text-decoration: none; font-size: 12.5px;
}
.tabs a[aria-current="page"] { color: var(--kinovar); }
.tabs a[aria-current="page"] span { font-weight: 700; }

/* ───────── типографика ───────── */
.title {
  font-family: var(--f-display); font-weight: 400; color: var(--kinovar);
  font-size: clamp(28px, 8.7vw, 54px); line-height: 1.05; letter-spacing: .01em; hyphens: manual; -webkit-hyphens: manual;
  margin: 18px 0 14px;
}
.title.small { font-size: clamp(22px, 6.2vw, 30px); margin: 22px 0 8px; }
.h1 { font-family: var(--f-display); font-weight: 400; font-size: 30px; hyphens: manual; -webkit-hyphens: manual; line-height: 1.1; margin: 26px 0 12px; }
.h2 { font-family: var(--f-display); font-weight: 400; font-size: 21px; line-height: 1.2; margin: 30px 0 10px; }
.lede { font-size: 18.5px; line-height: 1.55; margin: 0 0 18px; }
.fine { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
p { margin: 0 0 12px; }
.notice { background: var(--stone); border-left: 3px solid var(--kinovar); padding: 10px 14px; font-size: 16px; border-radius: 0 4px 4px 0; }
.err, .wrong { color: var(--kinovar); font-size: 15.5px; margin: 8px 0 0; }
.code-txt { font-family: var(--f-body); letter-spacing: .08em; }

/* ───────── кнопки и поля ───────── */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 18px;
  font: 700 16px/1.2 var(--f-body); color: var(--ink); text-decoration: none; text-align: center;
  background: transparent; border: 1.5px solid var(--ink); border-radius: 4px; cursor: pointer;
}
.btn:hover { background: var(--stone); }
.btn.primary { background: var(--kinovar); border-color: var(--kinovar); color: var(--kinovar-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { border-color: var(--kinovar); color: var(--kinovar); }
.btn[disabled] { opacity: .55; cursor: default; }
.linkish { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 15.5px; color: var(--kinovar); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }

input:not([type]), input[type="text"] {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: 18px/1.3 var(--f-body); color: var(--ink);
  background: var(--stone); border: 1.5px solid var(--line-2); border-radius: 4px;
}
input:not([type]):focus { border-color: var(--B); }
input[readonly] { font-size: 15px; color: var(--ink-2); }
.code-in { text-transform: uppercase; letter-spacing: .25em; font-size: 22px !important; }
.word-in { font-family: var(--f-display) !important; text-transform: uppercase; letter-spacing: .12em; font-size: 22px !important; }
.field { display: block; margin: 14px 0; font-weight: 700; font-size: 15.5px; }
.field input { margin-top: 6px; font-weight: 400; }
.opt-mark { font-weight: 400; color: var(--ink-2); font-style: italic; }
.check { display: flex; gap: 10px; align-items: center; margin: 14px 0; font-size: 16px; }
.check input { width: 20px; height: 20px; accent-color: var(--kinovar); }

fieldset { border: 0; padding: 0; margin: 18px 0 6px; }
legend { font-weight: 700; font-size: 15.5px; margin-bottom: 8px; padding: 0; }
.opts { display: grid; gap: 8px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt {
  position: relative; display: block; cursor: pointer;
  padding: 12px 14px 12px 40px;
  background: var(--stone); border: 1.5px solid var(--line); border-radius: 6px;
}
.opt input { position: absolute; left: 13px; top: 15px; width: 18px; height: 18px; margin: 0; accent-color: var(--kinovar); }
.opt.on { border-color: var(--kinovar); }
.opt.half.r-A.on { border-color: var(--A); background: var(--A-soft); }
.opt.half.r-B.on { border-color: var(--B); background: var(--B-soft); }
.opt-t { display: block; font-weight: 700; line-height: 1.3; }
.opt-n { display: block; font-size: 14.5px; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }

/* ───────── приветствие ───────── */
.welcome { padding-top: max(6vh, 24px); }
.hero-belt { padding: 12px 6px; }
.hero-belt .seal { width: 28px; height: 28px; }
.actions .btn { flex: 1 1 12rem; }

/* ───────── карта пути ───────── */
.whoami { font-size: 17px; }
.rc-A { color: var(--A); }
.rc-B { color: var(--B); }
.route { margin-top: 10px; }
.leg {
  display: flex; align-items: center; gap: 12px;
  font: italic 400 15.5px var(--f-body); color: var(--ink-2);
  margin: 26px 0 6px;
}
.leg::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.nodes { list-style: none; margin: 0; padding: 0; position: relative; }
.nodes::before { content: ''; position: absolute; left: 22px; top: 18px; bottom: 18px; border-left: 2px dotted var(--line-2); }
.node a {
  position: relative; display: grid; grid-template-columns: 46px 1fr auto; gap: 0 14px; align-items: start;
  padding: 10px 0; color: var(--ink); text-decoration: none;
}
.node-num {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--stone); border: 1.5px solid var(--line-2); color: var(--ink);
  font-size: 21px; padding-top: 3px;
}
.node-num .ico { width: 21px; height: 21px; }
.node.is-done .node-num { background: var(--kinovar); border-color: var(--kinovar); color: var(--kinovar-ink); }
.node.is-now .node-num { border: 2px solid var(--kinovar); color: var(--kinovar); box-shadow: 0 0 0 4px color-mix(in srgb, var(--kinovar) 18%, transparent); }
.node-body { display: flex; flex-direction: column; padding-top: 2px; min-width: 0; }
.node-title { font-weight: 700; font-size: 17.5px; line-height: 1.3; }
.node-place { font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.node-when { font-size: 14px; color: var(--ink-2); font-style: italic; }
.node-state { font-size: 13.5px; font-style: italic; color: var(--ink-2); padding-top: 4px; white-space: nowrap; }
.node.is-now .node-state { color: var(--kinovar); font-weight: 700; }

/* ───────── килевидный портал ───────── */
.arch { position: relative; margin: 14px auto 8px; max-width: 30rem; padding: 46px 32px 20px; text-align: center; color: var(--kinovar); }
.arch-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arch-svg path { fill: var(--stone); stroke: currentColor; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.arch-svg path.inner { fill: none; stroke-width: 1; opacity: .55; }
.arch-in { position: relative; }
.arch-num { font-size: 40px; margin: 6px 0 2px; line-height: 1.2; }
.arch-num .ico { width: 34px; height: 34px; }
.arch-kicker { font-style: italic; color: var(--ink-2); font-size: 15px; margin: 0; }
.arch-title { hyphens: manual; -webkit-hyphens: manual; font-family: var(--f-display); font-weight: 400; font-size: clamp(27px, 7.5vw, 34px); line-height: 1.1; color: var(--ink); margin: 4px 0 6px; }
.arch-place { color: var(--ink-2); font-size: 15.5px; margin: 0; line-height: 1.35; }

.how { margin: 14px 0 16px; background: var(--stone); border: 1px solid var(--line); border-radius: 6px; padding: 0 14px; }
.how summary { cursor: pointer; padding: 11px 0; font-weight: 700; font-size: 15.5px; color: var(--kinovar); }
.how p { font-size: 16px; }
.how-when { font-style: italic; }

.intro { font-size: 18px; line-height: 1.6; margin: 18px 0 20px; }
.intro::after { content: ''; display: block; clear: both; }
.drop { float: left; font-family: var(--f-display); color: var(--kinovar); font-size: 3.9em; line-height: .8; margin: .08em .1em 0 0; }
.mode-intro { font-style: italic; border-left: 3px solid var(--A); padding-left: 14px; }
.rules { padding-left: 1.3em; }
.rules li { margin-bottom: 8px; }

/* ───────── свиток ───────── */
.scroll {
  margin: 22px 0; padding: 16px 18px 6px;
  background: var(--B-soft); border-left: 4px solid var(--B);
  border-radius: 2px 8px 8px 2px;
}
.scroll.r-A { background: var(--A-soft); border-left-color: var(--A); }
.scroll-h { font-family: var(--f-display); font-weight: 400; font-size: 20px; margin: 0 0 2px; color: var(--B); }
.scroll.r-A .scroll-h { color: var(--A); }
.scroll-note { font-size: 14.5px; font-style: italic; color: var(--ink-2); margin-bottom: 10px; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { position: relative; padding-left: 20px; margin-bottom: 10px; font-size: 16.5px; line-height: 1.55; }
.facts li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; transform: rotate(45deg); background: var(--B); }
.scroll.r-A .facts li::before { background: var(--A); }

/* ───────── задания ───────── */
.tasks { margin: 10px 0; }
.task {
  margin: 14px 0; padding: 14px 16px 12px;
  background: var(--stone); border: 1px solid var(--line); border-radius: 6px;
}
.task.is-done { background: transparent; border-style: dashed; }
.task-h { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.task-h .ico { width: 20px; height: 20px; color: var(--kinovar); }
.task-kind { font-style: italic; }
.task-pts { margin-left: auto; white-space: nowrap; }
.task-title { font-size: 19px; line-height: 1.3; margin: 6px 0 6px; }
.task-text { font-size: 16.5px; }
.clue { font-size: 16px; padding: 8px 12px; border-radius: 4px; background: var(--B-soft); border-left: 3px solid var(--B); }
.clue.r-A { background: var(--A-soft); border-left-color: var(--A); }
.clue-l { font-weight: 700; color: var(--B); }
.clue.r-A .clue-l { color: var(--A); }
.answer { margin: 12px 0 4px; }
.answer .q { display: block; font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.answer .row { display: flex; gap: 8px; }
.answer .row input { flex: 1; min-width: 0; }
.answer .row .btn { flex: none; }
.honor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 4px; }
.hints { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; }
.hint { font-size: 15.5px; font-style: italic; margin: 6px 0 0; padding-left: 12px; border-left: 2px solid var(--line-2); }
.status { font-weight: 700; font-size: 15px; margin: 10px 0 6px; }
.status.ok { color: var(--kinovar); }
.status.meh { color: var(--ink-2); }
.after { font-size: 16px; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ───────── награда и летопись ───────── */
.reward { text-align: center; margin: 34px 0 10px; padding-top: 22px; border-top: 3px double var(--A); }
.reward .seal { margin-bottom: 34px; }
.reward p { max-width: 26rem; margin: 0 auto; font-style: italic; }
.reward.stamp .seal { animation: stamp .7s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes stamp { 0% { transform: scale(1.8) rotate(-12deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }

.chron { margin: 26px 0 0; }
.chron-h { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1.2; color: var(--kinovar); margin: 0 0 12px; }
.chron p { font-size: 17px; }
.verse { margin: 26px 0 8px; padding: 4px 0 4px 18px; border-left: 2px solid var(--kinovar); }
.verse-t { font-family: var(--f-display); font-size: 17px; color: var(--kinovar); margin-bottom: 8px; }
.verse p { font-style: italic; font-size: 17.5px; line-height: 1.6; margin: 0; }
.verse-a { font-style: normal !important; font-size: 14.5px !important; color: var(--ink-2); margin-top: 8px !important; }
.scroll .verse { border-left-color: var(--B); margin: 12px 0 14px; }

.pager { display: flex; justify-content: space-between; gap: 10px; margin: 34px 0 10px; }
.pager .btn { flex: 1; }
.skipline { font-size: 14.5px; color: var(--ink-2); }

/* ───────── сверка ───────── */
.eqs { padding-left: 1.3em; }
.eq { margin-bottom: 16px; }
.eq-q { font-weight: 700; margin-bottom: 4px; }
.eq-a { font-size: 15.5px; color: var(--ink-2); font-style: italic; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg button { font: 700 15px var(--f-body); padding: 8px 16px; min-height: 40px; background: transparent; color: var(--ink); border: 0; cursor: pointer; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[data-ok="1"][aria-pressed="true"] { background: var(--kinovar); color: var(--kinovar-ink); }
.seg button[data-ok="0"][aria-pressed="true"] { background: var(--ink); color: var(--stone); }
.exam-sum { font-style: italic; color: var(--ink-2); }

/* ───────── эпилог ───────── */
.letters .seals { display: flex; flex-wrap: wrap; gap: 34px 18px; margin: 14px 0 40px; }
.answer.big .q { font-size: 17px; }
.won { text-align: center; margin: 26px 0; }
.won-word { font-family: var(--f-display); color: var(--kinovar); font-size: clamp(30px, 9.5vw, 48px); letter-spacing: .06em; margin: 0; }
.won-word span { display: inline-block; }
.won.ring .won-word span { animation: ring .9s calc(var(--i) * 110ms) cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes ring { 0% { transform: translateY(-.6em) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

.gramota { margin: 34px 0 10px; }
.g-frame {
  padding: 28px 24px 22px; text-align: center;
  background: var(--stone);
  border: 3px double var(--kinovar);
  outline: 1px solid var(--kinovar); outline-offset: 5px;
}
.g-h { font-family: var(--f-display); font-size: 36px; color: var(--kinovar); margin-bottom: 14px; }
.g-rank { font-family: var(--f-display); font-size: 19px; }
.g-seal { margin: 18px 0 4px; }

/* ───────── летопись дня, путевой лист ───────── */
.chron-item { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 22px; }
.chron-title { font-family: var(--f-display); font-weight: 400; font-size: 23px; margin: 8px 0 10px; display: flex; gap: 14px; align-items: baseline; }
.chron-title .cn { color: var(--kinovar); }
.chron-item.locked .chron-title { color: var(--ink-2); }
.daylog ol { list-style: none; padding: 0; }
.daylog li { padding: 4px 0; border-bottom: 1px dotted var(--line); font-size: 15.5px; }
.daylog time { display: inline-block; width: 3.4em; color: var(--kinovar); font-weight: 700; }
.plan { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; }
.plan dt { font-weight: 700; color: var(--kinovar); white-space: nowrap; font-size: 15.5px; }
.plan dd { margin: 0; font-size: 16px; }
.tips li, .links li { margin-bottom: 8px; }
.trains { background: var(--stone); border-left: 3px solid var(--kinovar); padding: 10px 14px; border-radius: 0 4px 4px 0; font-size: 16px; }
.food { list-style: none; padding: 0; margin: 0; }
.food li { padding: 10px 0; border-bottom: 1px dotted var(--line-2); }
.food li p { margin: 0; font-size: 16px; }
.food-n { font-weight: 700; }
.food-a { font-size: 14.5px !important; color: var(--ink-2); font-style: italic; margin-bottom: 2px !important; }
.how-food { border-top: 1px dotted var(--line-2); padding-top: 10px; }
.bigcode { font-size: 44px; letter-spacing: .2em; text-align: center; margin: 18px 0; color: var(--kinovar); font-weight: 700; }
.names .field { margin: 8px 0; }

/* ───────── сообщения и занавес ───────── */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + 12px + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 30rem; background: var(--ink); color: var(--stone); padding: 10px 16px; border-radius: 6px; font-size: 15.5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); animation: tin .25s ease-out; }
.toast.out { opacity: 0; transition: opacity .5s; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.curtain { position: fixed; inset: 0; z-index: 60; background: var(--kinovar); color: var(--kinovar-ink); display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.curtain[hidden] { display: none; }
.curtain-t { font-family: var(--f-display); font-size: 32px; }
.curtain .btn.primary { background: var(--kinovar-ink); color: var(--kinovar); border-color: var(--kinovar-ink); margin-top: 18px; }

@media (min-width: 640px) {
  .main { padding: 0 28px 60px; }
  .seal { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body { background: #fff; color: #000; padding: 0 !important; }
  body::before, .top, .tabs, .toasts, .skip, .curtain { display: none !important; }
  .main > * { display: none !important; }
  .main > .wrap { display: block !important; }
  .main > .wrap > * { display: none !important; }
  .main > .wrap > .gramota { display: block !important; }
  .gramota .actions { display: none !important; }
  .g-frame { border-color: #A63A24; }
}
