/* Книги: список и вертикальная читалка */
.books-page { padding-bottom: 40px; }
/* Главная: первой идёт книга-игра, обложка справа, размытый арт фоном, как большой блок сериала */
.bhero { --r: 28px; position: relative; overflow: hidden; margin-top: 8px; padding: 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; background: #000; color: #fff; text-decoration: none; isolation: isolate; }
.bhero-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; object-position: 50% 30%; filter: blur(32px) brightness(0.5) saturate(0.85); z-index: -1; }
.bhero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.bhero-t { margin: 0; font-size: 44px; line-height: 1.04; letter-spacing: -0.035em; font-weight: 750; }
.bhero-b { margin: 0 0 6px; font-size: 16px; color: rgba(255, 255, 255, 0.78); }
.bhero-cover { --r: 16px; width: 168px; aspect-ratio: 9 / 16; object-fit: cover; transition: transform 0.5s var(--ease); }
.bhero:hover .bhero-cover { transform: translateY(-4px) rotate(-1.5deg); }
.home-part { margin: 56px 0 14px; }
@media (max-width: 700px) {
  .bhero { padding: 20px; gap: 14px; }
  .bhero-t { font-size: 30px; }
  .bhero-b { font-size: 14px; }
  .bhero-cover { width: 104px; }
  .home-part { margin-top: 40px; }
}
.books-title { margin: 8px 0 4px; }
.books-sub { margin: 0 0 18px; font-size: 15px; }
/* Только сетка обложек: на телефоне три в ряд, как полка */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 16px; }
@media (max-width: 700px) { .books-grid { grid-template-columns: repeat(3, 1fr); gap: 16px 10px; } }
.book-card { display: grid; gap: 2px; align-content: start; color: inherit; text-decoration: none; }
.book-cover { --r: 14px; position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: #0b0b0d; margin-bottom: 6px; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.book-name { font-size: 15px; font-weight: 600; line-height: 1.25; }
/* В полке главной книга того же размера, что карточка сериала */
.rail .book-card { flex: none; width: 176px; scroll-snap-align: start; }
@media (max-width: 700px) { .rail .book-card { width: 144px; } }
.book-card:hover .book-cover img { transform: scale(1.04); }
.book-badge { position: absolute; left: 8px; top: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); }
.book-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }

body.reading { overflow: hidden; }
/* Шрифты читалки: текст Alegreya (литературный, с живым рисунком), имена капителью, заголовки глав — шрифт книги из book.json "font" */
/* Цвета как в «Спи, Мишка»: тёплый свет свечи для акцентов и чуть кремовый текст */
.reader { --rd-serif: Alegreya, Georgia, "Times New Roman", serif; --rd-display: "Cormorant SC", var(--rd-serif); --rd-accent: #ffcf7a; --rd-ink: #ece7da; position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: #000; color: #fff; overflow: hidden; -webkit-tap-highlight-color: transparent; user-select: none; }
.rd-blur { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(40px) brightness(0.35); }
.rd-stage { position: relative; height: 100dvh; width: min(100vw, calc(100dvh * 9 / 16)); overflow: hidden; background: #000; cursor: pointer; }
.rd-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s ease; transform: scale(1.02); }
.rd-bg.on { opacity: 1; }
/* Текст лежит прямо на сцене, поэтому низ картинки плавно уходит в темноту */
.rd-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 14, 18, 0.55) 0%, rgba(11, 14, 18, 0.06) 22%, rgba(11, 14, 18, 0.18) 50%, rgba(11, 14, 18, 0.88) 76%, #0b0e12 100%); }
/* Вопрос с вариантами выше обычной реплики, поэтому сцена под ним темнее, как экраны выбора в «Спи, Мишка» */
.rd-stage:has(.rd-box.choice:not([hidden])) .rd-shade { background: linear-gradient(180deg, rgba(11, 14, 18, 0.55) 0%, rgba(11, 14, 18, 0.1) 20%, rgba(11, 14, 18, 0.7) 48%, rgba(11, 14, 18, 0.94) 66%, #0b0e12 100%); transition: background 0.6s; }
.rd-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
/* Герой стоит над нижней панелью текста, ноги и пояс уходят под неё, как в визуальных новеллах */
.rd-cast { position: absolute; inset: 0; pointer-events: none; }
.rd-sprite { position: absolute; left: 50%; bottom: 0; height: 80%; max-width: none; opacity: 0; transform: translate(-50%, 24px); transition: opacity 0.35s ease, transform 0.45s var(--ease), filter 0.35s ease; }
.rd-sprite.on { opacity: 1; transform: translate(-50%, 0); }
/* Как в «Спи, Мишка»: низ героя растворяется в темноте, и текст поверх него читается */
.rd-sprite { -webkit-mask-image: linear-gradient(180deg, #000 48%, rgba(0, 0, 0, 0.35) 66%, transparent 80%); mask-image: linear-gradient(180deg, #000 48%, rgba(0, 0, 0, 0.35) 66%, transparent 80%); }
.rd-sprite.thought { filter: brightness(0.75) saturate(0.8); }
.rd-spots { transition: opacity 0.3s; }
.rd-stage.has-sprite .rd-spots { opacity: 0; pointer-events: none; }
.rd-stage.has-sprite .rd-spot { pointer-events: none; }

.rd-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 10px 6px; }
.rd-title { flex: 1; min-width: 0; display: grid; text-align: center; font-size: 13px; line-height: 1.3; }
.rd-title b { font-size: 15px; }
.rd-title span { opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.35); color: #fff; cursor: pointer; backdrop-filter: blur(8px); }
.rd-btn:disabled { opacity: 0.3; cursor: default; }
.rd-rate { font: inherit; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rd-btn.rd-auto { width: 54px; border-radius: 20px; font: 700 13px var(--rd-serif); letter-spacing: 0.01em; transition: background 0.2s ease, color 0.2s ease; }
.rd-btn.rd-auto.on { background: #ffcf7a; color: #1d1a16; }
/* Как в «Спи, Мишка»: без плашки, текст прямо на сцене с мягкой тенью; реплика проявляется, а не выезжает снизу */
.rd-box { position: absolute; left: 22px; right: 22px; bottom: calc(84px + env(safe-area-inset-bottom)); color: var(--rd-ink); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85); animation: rd-in 0.45s ease; }
@keyframes rd-in { from { opacity: 0; } }
@keyframes rd-up { from { transform: translateY(8px); opacity: 0; } }
/* Имя героя одним светлым цветом, без плашки; у рассказчика подписи нет */
.rd-who { display: block; margin-bottom: 6px; color: #eef2f6; font-family: "Alegreya SC", var(--rd-serif); font-size: 18px; font-weight: 700; letter-spacing: 0.05em; text-shadow: 0 0 12px rgba(255, 255, 255, 0.45), 0 2px 10px #000; }
.rd-who:empty, .rd-box.narrator .rd-who { display: none; }
.rd-text { font-family: var(--rd-serif); font-size: 20px; font-weight: 400; line-height: 1.5; min-height: 3em; white-space: pre-line; text-wrap: pretty; }
.rd-box.speech .rd-text { font-weight: 500; }
/* Мысли не курсивом, а тише по цвету */
.rd-box.thought .rd-text { color: #c9d2dc; }
/* Подсказка «Нажмите» со следом, как в «Спи, Мишка»: появляется, когда реплика дочитана */
.rd-tap { position: absolute; left: 50%; bottom: calc(44px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 7px; transform: translateX(-50%); color: rgba(255, 255, 255, 0.55); font-family: "Alegreya SC", var(--rd-serif); font-size: 16px; letter-spacing: 0.04em; opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.rd-tap svg { width: 20px; height: 15px; animation: rd-breathe 2.2s ease-in-out infinite; }
@keyframes rd-breathe { 50% { transform: scale(1.18); opacity: 0.5; } }
.rd-box.ready:not(.choice):not(.play) ~ .rd-tap, .rd-box.answered.ready ~ .rd-tap, .rd-card:not([hidden]) ~ .rd-tap { opacity: 1; }
/* Прогресс главы по центру внизу: ряд карточек, как в папке Spifire */
.rd-trail { position: absolute; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; transform: translateX(-50%); pointer-events: none; }
.rd-trail i { display: block; width: 8px; height: 11px; color: rgba(255, 255, 255, 0.18); transition: color 0.5s, filter 0.5s, transform 0.4s var(--ease); }
.rd-trail i svg { display: block; width: 100%; height: 100%; }
.rd-trail i.on { color: var(--rd-accent); filter: drop-shadow(0 0 4px rgba(255, 181, 71, 0.9)); }
.rd-trail i.cur { transform: translateY(-4px) scale(1.25); }
.rd-choices { display: grid; gap: 10px; margin-top: 16px; }
.rd-choices:empty { display: none; }
.rd-opt { padding: 13px 18px; border: 1px solid rgba(255, 207, 122, 0.32); border-radius: 8px; background: rgba(11, 14, 18, 0.62); color: var(--rd-accent); font-family: var(--rd-serif); font-size: 18px; font-weight: 500; text-align: left; text-shadow: none; cursor: pointer; animation: rd-up 0.4s ease both; }
.rd-opt:nth-child(2) { animation-delay: 0.06s; }
.rd-opt:nth-child(3) { animation-delay: 0.12s; }
.rd-opt:hover, .rd-opt:focus-visible { border-color: var(--rd-accent); background: rgba(11, 14, 18, 0.8); }

.rd-card { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; padding: 32px; text-align: center; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.2) 70%); }
.rd-card[hidden] { display: none; }
.rd-card.in > * { animation: rd-card 0.9s var(--ease) both; }
.rd-card.in > :nth-child(2) { animation-delay: 0.25s; }
.rd-card.in > :nth-child(3) { animation-delay: 0.5s; }
@keyframes rd-card { from { opacity: 0; transform: translateY(10px); letter-spacing: 0.06em; } }
.rd-card-t { font-family: var(--rd-display); font-size: 34px; line-height: 1.15; letter-spacing: 0.02em; color: var(--rd-accent); text-shadow: 0 0 40px rgba(255, 181, 71, 0.4), 0 2px 24px rgba(0, 0, 0, 0.7); }
.rd-card-n { max-width: 300px; margin: 0 auto; font-family: var(--rd-serif); font-size: 18px; font-style: italic; line-height: 1.45; opacity: 0.85; }
.rd-end { display: grid; gap: 10px; margin-top: 14px; }

/* Игровой слой: точки на картинке, вылетающие карточки, счётчик */

/* Точки привязаны к картинке 9:16, а не к экрану: на узком телефоне картинка обрезается по бокам, как object-fit: cover */
.rd-stage { container-type: size; }
.rd-spots, .rd-plane { position: absolute; left: 50%; top: 50%; width: max(100cqw, 100cqh * 9 / 16); height: max(100cqh, 100cqw * 16 / 9); transform: translate(-50%, -50%); pointer-events: none; }
.rd-spot { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; }
.rd-spot i { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22), 0 0 18px 4px rgba(255, 220, 160, 0.55); animation: rd-pulse 1.8s ease-in-out infinite; }
.rd-spot.hid i { opacity: 0; animation: none; }
.rd-spot.hid:hover i { opacity: 0.35; }
.rd-spot.got i { width: 10px; height: 10px; background: rgba(255, 255, 255, 0.55); box-shadow: none; animation: none; opacity: 1; }
@keyframes rd-pulse { 50% { transform: scale(1.25); box-shadow: 0 0 0 9px rgba(255, 255, 255, 0.08), 0 0 26px 8px rgba(255, 220, 160, 0.45); } }

/* Верхняя панель и счётчик выше заставок глав, иначе их кнопки не нажимаются */
.rd-top, .rd-hud { z-index: 1; }
.rd-hud { position: absolute; top: calc(70px + env(safe-area-inset-top)); right: 14px; display: flex; gap: 12px; padding: 4px 0; border: 0; background: none; color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.rd-hud span { display: flex; align-items: center; gap: 4px; }
.rd-hud .ico { width: 14px; height: 14px; opacity: 0.8; }
.rd-hud.bump { animation: rd-bump 0.5s var(--ease); }
@keyframes rd-bump { 40% { transform: scale(1.12); } }

.rd-toggle { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 14px 0 2px; border: 0; border-top: 1px solid rgba(29, 26, 22, 0.12); background: none; color: inherit; font: inherit; font-size: 13px; line-height: 1.4; text-align: left; cursor: pointer; }
.rd-toggle span { flex: 1; color: #6b6257; }
.rd-toggle b { font-size: 15px; font-weight: 600; color: #1d1a16; }
.rd-toggle i { flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; background: #cfc6b8; transition: background 0.2s; }
.rd-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); }
.rd-toggle[aria-pressed="true"] i { background: #2f7a46; }
.rd-toggle[aria-pressed="true"] i::after { transform: translateX(18px); }




.rd-opt.right { border-color: rgba(120, 220, 150, 0.8); background: rgba(120, 220, 150, 0.16); }
.rd-opt.wrong { border-color: rgba(255, 120, 110, 0.8); background: rgba(255, 120, 110, 0.14); }
.rd-opt:disabled { cursor: default; }
.rd-box.answered .rd-more { opacity: 1; }

.rd-pop { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; padding: 12px 12px calc(14px + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, 0.45); cursor: default; }
.rd-pop[hidden] { display: none; }
.rd-pop-in { width: 100%; max-height: 78%; overflow: auto; padding: 18px 20px 20px; border-radius: 24px; background: #f6f1e7; color: #1d1a16; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.rd-pop.in .rd-pop-in { animation: rd-fly 0.45s var(--ease); }
@keyframes rd-fly { from { transform: translateY(40px) scale(0.96); opacity: 0; } }
.rd-pop-t { margin: 0 0 4px; font-family: var(--rd-serif); font-weight: 700; font-size: 24px; line-height: 1.2; }
.rd-pop-k { margin-bottom: 10px; font-size: 13px; font-weight: 600; color: #8a6a3a; }
.rd-list + .rd-pop-t { margin-top: 6px; }
.rd-pop-b { font-size: 16px; line-height: 1.55; }
.rd-pop-n { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 600; color: #2f7a46; }
.rd-pop-n .ico { width: 15px; height: 15px; }
.rd-list { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.rd-list .locked { color: #a39a8c; }
.rd-how { margin: 4px 0 16px; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 15px; line-height: 1.4; }
.rd-how li { display: flex; gap: 10px; }
.rd-how .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; color: #8a6a3a; }

.rd-cta { height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: #fff; color: #111; font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; }
.rd-pop .rd-cta { width: 100%; background: #1d1a16; color: #fff; }
.rd-cta.ghost { background: rgba(255, 255, 255, 0.12); color: #fff; }
.rd-stats { display: flex; justify-content: center; gap: 22px; margin: 6px 0 2px; }
.rd-stats div { display: grid; gap: 2px; }
.rd-stats b { font-size: 30px; line-height: 1; }
.rd-stats small { font-size: 15px; opacity: 0.6; }
.rd-stats span { font-size: 12.5px; opacity: 0.75; }

.rd-gain { position: absolute; left: 50%; top: calc(110px + env(safe-area-inset-top)); padding: 7px 14px; border-radius: 999px; background: rgba(255, 214, 140, 0.92); color: #1d1a16; font-size: 13px; font-weight: 700; opacity: 0; transform: translate(-50%, -6px); pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease); }
.rd-gain.in { opacity: 1; transform: translate(-50%, 0); }

.rd-stage.fx-shake { animation: rd-shake 0.45s; }
@keyframes rd-shake { 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 0); } }
.rd-stage.fx-flash .rd-flash { animation: rd-flash 0.7s ease-out; }
@keyframes rd-flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
.rd-stage.fx-dark .rd-bg.on { animation: rd-dark 1.6s ease; }
@keyframes rd-dark { 0% { filter: brightness(0.15); } 100% { filter: brightness(1); } }

/* Механики из «Спи, Мишка»: темнота со свечой, задержка дыхания, не глядеть */
.rd-hint { margin-top: 8px; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, 0.68); }
.rd-hint:empty { display: none; }
/* Миссия сверху: заголовок светом свечи и подсказка под ним */
.rd-mission { position: absolute; z-index: 1; top: calc(78px + env(safe-area-inset-top)); left: 22px; right: 22px; text-align: center; pointer-events: none; }
.rd-mission[hidden] { display: none; }
.rd-mission h2 { margin: 0; font-family: var(--rd-display); font-size: 34px; font-weight: 400; line-height: 1.05; color: var(--rd-accent); text-shadow: 0 0 24px rgba(255, 181, 71, 0.45), 0 2px 10px #000; animation: rd-up 0.6s ease both; }
.rd-mission h2:empty { display: none; }
.rd-mission p { margin: 8px auto 0; max-width: 300px; font-size: 15px; line-height: 1.45; color: #dfe4ea; text-shadow: 0 2px 10px #000; }
.rd-mission p:empty { display: none; }
/* Чек-лист находок, как список вещей в миссии «Помогите бабушке» */
.rd-task { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 14px 0 0; padding: 0; list-style: none; }
.rd-task:empty { display: none; }
.rd-task li { font-family: "Alegreya SC", var(--rd-serif); font-size: 18px; font-weight: 700; color: #fff; }
.rd-task li::before { content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.35em; border: 2px solid currentColor; border-radius: 2px; vertical-align: 0.05em; }
.rd-task li.on { color: var(--rd-accent); text-decoration: line-through; text-decoration-thickness: 2px; }
.rd-task li.on::before { background: var(--rd-accent); }
.rd-stage.playing { touch-action: none; -webkit-touch-callout: none; }
.rd-stage.play-explore, .rd-stage.play-dontlook { cursor: none; }
.rd-stage.play-breath { cursor: default; }
.rd-play { position: absolute; inset: 0; pointer-events: none; }
.rd-dark { position: absolute; inset: 0; background: radial-gradient(circle var(--lr, 120px) at var(--lx, 50%) var(--ly, 45%), rgba(255, 176, 84, 0.08) 0%, rgba(8, 5, 2, 0.08) 45%, rgba(3, 2, 1, 0.95) 100%); }
.rd-plane { pointer-events: none; }
.rd-find { position: absolute; width: 0; height: 0; }
.rd-find::before { content: ""; position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #ffe2a8; box-shadow: 0 0 14px 5px rgba(255, 200, 120, 0.6); opacity: 0; transition: opacity 0.4s; }
.rd-find.near::before { opacity: 0.6; }
.rd-find.hint::before { opacity: 0.3; animation: rd-pulse 1.8s ease-in-out infinite; }
.rd-find.got::before { opacity: 0; animation: none; }
.rd-find span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(0.9); white-space: nowrap; font-size: 14px; font-style: normal; font-weight: 650; color: #fff; opacity: 0; text-shadow: 0 1px 8px #000, 0 0 2px #000; transition: opacity 0.4s, transform 0.4s var(--ease); }
.rd-find.got span { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.rd-dwell { position: absolute; left: 0; top: 0; margin: 0; translate: -50% -50%; opacity: 0; transition: opacity 0.2s; overflow: visible; }
.rd-dwell circle { fill: none; stroke: rgba(255, 226, 168, 0.85); stroke-width: 2; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }

.rd-hush { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, 0.15) calc(48% - var(--hold, 0) * 34%), rgba(0, 0, 0, 0.94)); }
.rd-ring { position: absolute; left: 50%; top: 42%; width: 120px; height: 120px; margin: -60px 0 0 -60px; transition: transform 0.3s var(--ease); }
.rd-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rd-ring circle { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 3; }
.rd-ring .v { stroke: #fff; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; }
.rd-ring.on { animation: rd-beat 0.9s ease-in-out infinite; }
@keyframes rd-beat { 15% { transform: scale(1.07); } 30% { transform: scale(1); } }

.rd-glare { position: absolute; inset: 0; background: rgba(120, 0, 0, calc(var(--look, 0) * 0.45)); mix-blend-mode: multiply; }
.rd-stare { position: absolute; height: 0; display: flex; justify-content: space-between; transform: translateX(-50%); }
.rd-stare i { width: 34%; height: 16px; margin-top: -8px; border-radius: 50%; background: radial-gradient(#fff6cf, #ff8a24 55%, #9a1200); box-shadow: 0 0 calc(8px + var(--open, 0) * 26px) calc(1px + var(--open, 0) * 8px) rgba(255, 90, 20, 0.85); transform: scaleY(var(--open, 0.06)); }

/* Глаза в тёмных местах сцены: загораются, моргают и гаснут */
.rd-eye { position: absolute; width: 22px; height: 6px; margin: -3px 0 0 -11px; opacity: 0; animation: rd-eye 9s ease-in-out infinite; }
.rd-eye::before, .rd-eye::after { content: ""; position: absolute; top: 0; width: 7px; height: 5px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 7px 2px rgba(255, 140, 40, 0.75); }
.rd-eye::before { left: 0; }
.rd-eye::after { right: 0; }
@keyframes rd-eye { 0%, 68%, 100% { opacity: 0; transform: scaleY(1); } 73%, 92% { opacity: 0.9; transform: scaleY(1); } 80% { transform: scaleY(0.1); } 82% { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  .rd-bg, .rd-sprite { animation: none; transition: none; }
  .rd-box, .rd-opt, .rd-card.in > *, .rd-pop.in .rd-pop-in, .rd-spot i, .rd-hud.bump, .rd-ring.on, .rd-tap svg, .rd-mission h2 { animation: none; }
}

/* ───── Романы: реплики облаками (book.json "style": "romance") ───── */
.rd-bubble { display: contents; }
.rd-hist { display: none; }
.reader.romance { --rd-serif: Onest, system-ui, -apple-system, sans-serif; }
.romance .rd-shade, .romance .rd-stage:has(.rd-box.choice:not([hidden])) .rd-shade { background: linear-gradient(180deg, rgba(10, 12, 20, 0.35) 0%, rgba(10, 12, 20, 0) 22%, rgba(10, 12, 20, 0) 55%, rgba(10, 12, 20, 0.5) 100%); }
.romance .rd-box { left: 12px; right: 12px; bottom: calc(66px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; color: #1b2a44; text-shadow: none; }
.romance .rd-hist { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; width: 100%; }
.romance .rd-hist:empty { display: none; }
.romance .rd-bubble, .romance .rd-old { position: relative; display: block; max-width: 80%; padding: 12px 18px; isolation: isolate; }
.romance .rd-bubble::before, .romance .rd-old::before, .romance .rd-opt::before {
  content: ""; position: absolute; inset: -6px -8px; z-index: -1; pointer-events: none; border-radius: 28px;
  background: radial-gradient(ellipse 75% 70% at 45% 40%, var(--c1) 0 55%, var(--c2) 100%);
  filter: url(#rd-cloud) drop-shadow(0 8px 14px rgba(30, 60, 110, 0.28));
}
.romance .rd-bubble, .romance .rd-old, .romance .rd-opt { --c1: #fff; --c2: #d6e6fb; }
.romance .rd-box.me .rd-bubble, .romance .rd-old.me { --c2: #f6dce4; align-self: flex-end; }
.romance .rd-who { display: block; margin: 0 0 1px; font-family: var(--rd-serif); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-shadow: none; color: #263d70; }
.romance .rd-text { min-height: 0; font-family: var(--rd-serif); font-size: 15px; font-weight: 500; line-height: 1.4; color: #1b2a44; text-shadow: 0 0 6px rgba(255, 255, 255, 0.9); }
.romance .rd-box.speech .rd-bubble .rd-text { font-weight: 500; }
/* Мысль: туманно-голубое облако, курсив, без имени */
.romance .rd-box.thought .rd-bubble, .romance .rd-old.thought { --c1: rgba(240, 247, 255, 0.9); --c2: rgba(176, 205, 245, 0.75); align-self: flex-start; }
.romance .rd-box.thought .rd-bubble::before, .romance .rd-old.thought::before { filter: url(#rd-cloud-soft) drop-shadow(0 8px 14px rgba(30, 60, 110, 0.25)); }
.romance .rd-box.thought .rd-bubble .rd-text, .romance .rd-old.thought .rd-text { color: #2a3a5c; font-style: italic; }
.romance .rd-box.thought .rd-who { display: none; }
/* Рассказчик: тёмная плашка по центру */
.romance .rd-box.narrator .rd-bubble, .romance .rd-old.narrator { align-self: center; max-width: 92%; padding: 9px 14px; border-radius: 12px; background: rgba(14, 17, 28, 0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-align: center; }
.romance .rd-box.narrator .rd-bubble::before, .romance .rd-old.narrator::before { display: none; }
.romance .rd-box.narrator .rd-bubble .rd-text, .romance .rd-old.narrator .rd-text { color: #f2f0ea; font-weight: 400; text-shadow: none; }
/* Прошлые реплики сцены */
.romance .rd-old { transform: scale(0.94); transform-origin: left bottom; animation: none; }
.romance .rd-hist .rd-old .rd-text { color: #3d4a63; text-shadow: none; }
.romance .rd-hist .rd-old.thought .rd-text { color: #3d4a63; }
.romance .rd-tap { font-family: var(--rd-serif); font-size: 13px; letter-spacing: 0; }
.romance .rd-old.me { transform-origin: right bottom; }
/* Выбор: вопрос мелко справа, ответы Ани облаками справа */
.romance .rd-box.ask { align-items: flex-end; }
.romance .rd-box.ask .rd-bubble { align-self: flex-end; padding: 0 4px; }
.romance .rd-box.ask .rd-bubble::before { display: none; }
.romance .rd-box.ask .rd-bubble .rd-text { color: #fff; font-size: 12px; font-weight: 600; text-shadow: 0 1px 6px #000; }
.romance .rd-choices { width: 100%; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; margin-top: 0; }
.romance .rd-opt { position: relative; isolation: isolate; max-width: 84%; padding: 11px 18px; border: 0; background: none; color: #1b2a44; font-family: var(--rd-serif); font-size: 15px; font-weight: 600; text-align: right; text-shadow: 0 0 6px rgba(255, 255, 255, 0.9); --c2: #f6dce4; }
.romance .rd-opt:hover, .romance .rd-opt:focus-visible { border: 0; background: none; transform: translateY(-1px); }
.romance .rd-opt.prem { --c1: #fff8ea; --c2: #ffd59a; }
.rd-gem { margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: #1d2030; color: #ffcf7a; font-size: 11px; font-weight: 700; text-shadow: none; }
.romance .rd-gain { background: rgba(255, 214, 140, 0.95); }

/* Романы: слова проявляются мягко, облако не меняет размер */
.romance .rd-text .w { opacity: 0; filter: blur(4px); transition: opacity 0.5s ease, filter 0.5s ease; }
.romance .rd-text .w.on { opacity: 1; filter: none; }
.romance .rd-bubble { animation: rd-cloud-in 0.45s ease both; }
@keyframes rd-cloud-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .romance .rd-text .w { transition: none; } .romance .rd-bubble { animation: none; } }

/* Романы: мысли плотные и чёткие, как реплики, только голубые */
.romance .rd-box.thought .rd-bubble, .romance .rd-old.thought { --c1: #f4f9ff; --c2: #c9dcf7; }
.romance .rd-box.thought .rd-bubble::before, .romance .rd-old.thought::before { filter: url(#rd-cloud) drop-shadow(0 8px 14px rgba(30, 60, 110, 0.28)); }
.romance .rd-box.thought .rd-bubble .rd-text { color: #1f2d4d; font-weight: 500; }
/* Заставка серии шрифтом романа */
.romance .rd-card-t { font-family: var(--rd-serif); font-weight: 700; font-size: 30px; letter-spacing: -0.01em; color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7); }
.romance .rd-card-n { font-family: var(--rd-serif); font-style: normal; font-weight: 500; font-size: 17px; color: #ffd9a8; opacity: 1; }

/* Оценки тейлов */
.book-rate { position: absolute; right: 8px; top: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: rgba(255, 255, 255, 0.75); font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); }
.book-rate b { color: #ffcf7a; font-weight: 700; }
.book-rates { font-size: 12px; }
.book-rates b { color: #e0a227; font-weight: 700; }
body.reading .sheet-wrap { z-index: 400; }
.rd-rate-box { display: grid; gap: 10px; width: min(340px, 100%); margin: 18px auto 4px; text-align: center; }
.rd-rate-head { font-family: var(--rd-serif); font-size: 15px; color: rgba(255, 255, 255, 0.8); }
.rd-rate-head b { font-size: 26px; color: #ffcf7a; margin-right: 2px; }
.rd-rate-q { font-family: var(--rd-serif); font-size: 15px; font-weight: 600; color: #fff; }
.rd-stars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.rd-star { height: 34px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 9px; background: rgba(255, 255, 255, 0.08); color: #fff; font: 600 14px var(--rd-serif); cursor: pointer; }
.rd-star.on { border-color: #ffcf7a; background: #ffcf7a; color: #1d1a16; }
.rd-review { width: 100%; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 12px; background: rgba(0, 0, 0, 0.35); color: #fff; font: 400 14px var(--rd-serif); resize: vertical; }
.rd-review::placeholder { color: rgba(255, 255, 255, 0.5); }
.rd-cta[disabled] { opacity: 0.45; cursor: default; }
.rd-link { border: 0; background: none; color: #ffcf7a; font: 600 14px var(--rd-serif); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rd-reviews { display: grid; gap: 12px; max-height: 60vh; overflow: auto; text-align: left; }
.rd-rev { padding-bottom: 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); font-size: 14px; line-height: 1.4; }
.rd-rev-h { display: flex; justify-content: space-between; margin-bottom: 3px; font-size: 13px; }
.rd-rev-h span { color: #b4781f; font-weight: 700; }

.rd-card.poster { background: none; }

/* Заставка серии: постер целиком между верхней панелью и полосой прогресса, фон размыт */
.rd-card.poster { display: flex; align-items: center; justify-content: center; padding: calc(64px + env(safe-area-inset-top)) 18px calc(78px + env(safe-area-inset-bottom)); }
.rd-poster { max-width: 100%; max-height: 100%; border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); animation: rd-card 0.9s var(--ease) both; }
.rd-stage.poster-on .rd-bg { filter: blur(22px) brightness(0.45); transform: scale(1.1); }

/* ───── Страница тейла ───── */
.tale-page { padding-bottom: 60px; }
.tale-hero { position: relative; display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: end; margin: 8px 0 28px; padding: 28px; border-radius: 24px; overflow: hidden; color: #fff; isolation: isolate; background: #0b0d14; }
.tale-back { position: absolute; inset: -40px; z-index: -1; background-size: cover; background-position: center; filter: blur(40px) brightness(0.45) saturate(1.2); transform: scale(1.1); }
.tale-poster { --r: 16px; width: 240px; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.tale-title { margin: 0 0 8px; font-size: 40px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.tale-meta { color: rgba(255, 255, 255, 0.72); font-size: 15px; }
.tale-rate { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 18px; }
.tale-rate b { font-size: 30px; color: #ffcf7a; }
.tale-rate span { color: rgba(255, 255, 255, 0.7); font-size: 16px; }
.tale-rate small { margin-left: 10px; color: rgba(255, 255, 255, 0.6); font-size: 14px; }
.tale-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.tale-acts .btn-sec { background: rgba(255, 255, 255, 0.14); color: #fff; }
.tale-format { margin-top: 14px; color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.tale-sec { margin: 0 0 32px; }
.tale-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; font-size: 22px; font-weight: 700; }
.tale-h span { color: var(--tx-2); font-size: 14px; font-weight: 500; }
.tale-about { max-width: 760px; margin: 0; font-size: 16px; line-height: 1.55; color: var(--tx); }
.tale-eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 14px; }
.tale-ep { display: grid; gap: 3px; align-content: start; color: inherit; text-decoration: none; }
.tale-ep-img { --r: 12px; position: relative; aspect-ratio: 2 / 3; overflow: hidden; margin-bottom: 6px; background: #0b0d14; }
.tale-ep-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
a.tale-ep:hover .tale-ep-img img { transform: scale(1.04); }
.tale-ep.soon .tale-ep-img img { filter: grayscale(0.6) brightness(0.55); }
.tale-ep-soon, .tale-ep-now { position: absolute; left: 8px; top: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); }
.tale-ep-now { background: var(--accent); }
.tale-ep-n { color: var(--tx-2); font-size: 12px; font-weight: 600; }
.tale-ep-t { font-size: 15px; font-weight: 700; line-height: 1.25; }
.tale-ep-d { color: var(--tx-2); font-size: 13px; line-height: 1.4; }
.tale-rv-top { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; margin-bottom: 24px; }
.tale-rv-big b { display: block; font-size: 56px; line-height: 1; font-weight: 800; }
.tale-rv-big span { color: var(--tx-2); font-size: 14px; }
.tale-rv-form { display: grid; gap: 10px; max-width: 520px; }
.tale-rv-q { font-weight: 600; }
.tale-stars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.tale-star { height: 40px; border: 1px solid var(--hair); border-radius: 10px; background: var(--s1); color: var(--tx); font: 600 15px var(--font); cursor: pointer; }
.tale-star.on { border-color: #e0a227; background: #ffcf7a; color: #1d1a16; }
.tale-rv-text { width: 100%; resize: vertical; }
.tale-rv-form .btn[disabled] { opacity: 0.45; }
.tale-rv-list { display: grid; gap: 14px; max-width: 760px; }
.tale-rv { padding: 14px 16px; border-radius: 14px; background: var(--s1); }
.tale-rv-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tale-rv-s { margin-left: auto; color: #b4781f; font-weight: 700; font-size: 14px; }
.tale-rv p { margin: 0; line-height: 1.5; }
@media (max-width: 700px) {
  .tale-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 22px 16px; gap: 18px; }
  .tale-poster { width: 190px; }
  .tale-title { font-size: 30px; }
  .tale-rate, .tale-acts { justify-content: center; }
  .tale-eps { grid-template-columns: repeat(2, 1fr); }
  .tale-rv-top { grid-template-columns: 1fr; gap: 14px; }
  .tale-star { height: 34px; font-size: 13px; }
}
.tale-rv-big b small { font-size: 20px; font-weight: 600; color: var(--tx-2); }
.tale-acts .btn-pri { background: #fff; color: #111; }

/* Оценка тейликами */
.tl-rate { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.tl-card { width: 30px; height: 42px; padding: 0; border: 0; background: none; color: var(--s3, #d9dbe0); cursor: pointer; transition: transform 0.2s var(--ease), color 0.2s, filter 0.2s; }
.tl-card svg { display: block; width: 100%; height: 100%; }
.tl-card:hover { transform: translateY(-4px) rotate(-4deg); }
.tl-card.on, .tl-rate.previewing .tl-card.pv { color: #f2b13a; filter: drop-shadow(0 3px 6px rgba(242, 177, 58, 0.45)); }
.tl-rate.previewing .tl-card.on:not(.pv) { color: var(--s3, #d9dbe0); filter: none; }
.tl-card.on:nth-child(odd) { transform: rotate(-3deg); }
.tl-card.on:nth-child(even) { transform: rotate(3deg); }
.tl-val { margin-left: 10px; color: var(--tx-2); font-size: 14px; white-space: nowrap; }
.tl-val b { color: var(--tx); font-size: 22px; }
.tl-rate.dark { justify-content: center; }
.tl-rate.dark .tl-card { width: 24px; height: 34px; color: rgba(255, 255, 255, 0.22); }
.tl-rate.dark .tl-card.on, .tl-rate.dark.previewing .tl-card.pv { color: #ffcf7a; filter: drop-shadow(0 0 6px rgba(255, 181, 71, 0.8)); }
.tl-rate.dark.previewing .tl-card.on:not(.pv) { color: rgba(255, 255, 255, 0.22); filter: none; }
.tl-rate.dark .tl-val { color: rgba(255, 255, 255, 0.7); }
.tl-rate.dark .tl-val b { color: #ffcf7a; }
.rd-gem { display: inline-flex; align-items: center; gap: 4px; }
.rd-gem svg { width: 9px; height: 13px; color: #ffcf7a; }
@media (max-width: 700px) { .tl-card { width: 24px; height: 34px; } .tl-rate { gap: 4px; } .tl-val { margin-left: 6px; } }

/* Рассказчик: тёмное сумеречное облако с теми же рваными краями, светлый текст (и у прошлых реплик) */
.romance .rd-box.narrator .rd-bubble, .romance .rd-old.narrator { --c1: rgba(16, 20, 36, 0.86); --c2: rgba(38, 48, 82, 0.62); align-self: center; max-width: 88%; padding: 12px 20px; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; text-align: center; }
.romance .rd-box.narrator .rd-bubble::before, .romance .rd-old.narrator::before { display: block; filter: url(#rd-cloud) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35)); }
.romance .rd-box.narrator .rd-bubble .rd-text, .romance .rd-hist .rd-old.narrator .rd-text { color: #f4f1ea; font-weight: 500; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.romance .rd-hist .rd-old.narrator .rd-text { color: rgba(244, 241, 234, 0.85); }

/* Всё, что говорит и думает Аня, — справа, одним видом облака. Мысль отличается курсивом и подписью «мысли» */
.romance .rd-box.thought .rd-bubble, .romance .rd-old.thought { --c1: #fff; --c2: #f6dce4; align-self: flex-end; }
.romance .rd-box.thought .rd-bubble::before, .romance .rd-old.thought::before { filter: url(#rd-cloud) drop-shadow(0 8px 14px rgba(30, 60, 110, 0.28)); }
.romance .rd-box.thought .rd-who, .romance .rd-old.thought .rd-who { display: block; font-style: italic; opacity: 0.85; }
.romance .rd-box.thought .rd-bubble .rd-text { color: #1b2a44; font-style: italic; font-weight: 500; }
.romance .rd-old.thought { transform-origin: right bottom; }
.romance .rd-old.thought .rd-text { font-style: italic; }

/* Рассказчик без подложки, как в «Спи, Мишке»: светлый текст прямо на сцене с мягкой тенью */
.romance .rd-box.narrator .rd-bubble, .romance .rd-old.narrator { max-width: 92%; padding: 2px 6px; background: none; }
.romance .rd-box.narrator .rd-bubble::before, .romance .rd-old.narrator::before { display: none; }
.romance .rd-box.narrator .rd-bubble .rd-text, .romance .rd-hist .rd-old.narrator .rd-text { color: #fbf8f2; font-size: 16px; font-weight: 500; line-height: 1.45; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 14px rgba(0, 0, 0, 0.85), 0 0 28px rgba(0, 0, 0, 0.6); }
.romance .rd-hist .rd-old.narrator .rd-text { color: rgba(251, 248, 242, 0.72); }
.romance .rd-old.narrator { transform: none; }
.romance .rd-shade { background: linear-gradient(180deg, rgba(10, 12, 20, 0.35) 0%, rgba(10, 12, 20, 0) 22%, rgba(10, 12, 20, 0) 45%, rgba(10, 12, 20, 0.72) 100%); }

/*
 * Темы реплик привязаны к data-book конкретной истории.
 * «Нефрит»: скруглённые сообщения с живописью шань-шуй,
 * рисовая бумага и маленькая cinnabar-печать.
 * Картина масштабируется через cover и обрезается по контуру блока.
 * Рассказчик не переопределяется; прошлые реплики не закрывают героев.
 */
.reader.romance[data-book="nefrit"] .rd-hist {
  display: none;
}
.reader.romance[data-book="nefrit"] .rd-bubble,
.reader.romance[data-book="nefrit"] .rd-old,
.reader.romance[data-book="nefrit"] .rd-opt {
  --c1: #fffdf5;
  --c2: #cfdfd4;
}
.reader.romance[data-book="nefrit"] .rd-box.me .rd-bubble,
.reader.romance[data-book="nefrit"] .rd-old.me,
.reader.romance[data-book="nefrit"] .rd-box.thought .rd-bubble,
.reader.romance[data-book="nefrit"] .rd-old.thought {
  --c1: #fffaf0;
  --c2: #ded5bc;
}
.reader.romance[data-book="nefrit"] .rd-bubble::before,
.reader.romance[data-book="nefrit"] .rd-old::before,
.reader.romance[data-book="nefrit"] .rd-opt::before {
  inset: -7px -9px;
  border: 1px solid rgba(91, 117, 91, 0.32);
  border-bottom-color: rgba(139, 113, 60, 0.4);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 253, 245, 0.3), rgba(255, 253, 245, 0.3)),
    url("books/nefrit/img/ui_shanshui.png") center / cover no-repeat,
    radial-gradient(ellipse 80% 78% at 45% 32%, var(--c1) 0 58%, var(--c2) 100%);
  clip-path: none;
  filter: drop-shadow(0 8px 12px rgba(17, 45, 37, 0.24));
}
.reader.romance[data-book="nefrit"] .rd-box.speech .rd-bubble::after,
.reader.romance[data-book="nefrit"] .rd-box.me .rd-bubble::after,
.reader.romance[data-book="nefrit"] .rd-box.thought .rd-bubble::after {
  content: "玉";
  position: absolute;
  top: -7px;
  right: -1px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(153, 58, 45, 0.62);
  color: rgba(153, 58, 45, 0.72);
  font: 11px/1 serif;
  transform: rotate(-4deg);
  pointer-events: none;
}
.reader.romance[data-book="nefrit"] .rd-box.narrator .rd-bubble::before,
.reader.romance[data-book="nefrit"] .rd-old.narrator::before {
  display: none;
}
.reader.romance[data-book="nefrit"] .rd-who,
.reader.romance[data-book="nefrit"] .rd-box.thought .rd-who {
  color: #263d38;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 1;
}
.reader.romance[data-book="nefrit"] .rd-box.speech .rd-bubble .rd-text,
.reader.romance[data-book="nefrit"] .rd-box.me .rd-bubble .rd-text,
.reader.romance[data-book="nefrit"] .rd-box.thought .rd-bubble .rd-text,
.reader.romance[data-book="nefrit"] .rd-old:not(.narrator) .rd-text {
  color: #18332d;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
}
.reader.romance[data-book="nefrit"] .rd-box.ask {
  gap: 10px;
}
.reader.romance[data-book="nefrit"] .rd-choices {
  gap: 10px;
}
.reader.romance[data-book="nefrit"] .rd-opt {
  max-width: 88%;
  padding: 10px 17px;
  color: #18332d;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
}
.reader.romance[data-book="nefrit"] .rd-opt:hover,
.reader.romance[data-book="nefrit"] .rd-opt:focus-visible {
  color: #102a23;
  background: none;
}
.reader.romance[data-book="nefrit"] .rd-opt:hover::before,
.reader.romance[data-book="nefrit"] .rd-opt:focus-visible::before {
  border-color: rgba(91, 117, 91, 0.55);
  background:
    linear-gradient(rgba(255, 253, 245, 0.22), rgba(255, 253, 245, 0.22)),
    url("books/nefrit/img/ui_shanshui.png") center / cover no-repeat,
    radial-gradient(ellipse 80% 78% at 45% 32%, #fff 0 58%, #bed5c6 100%);
}

/* Действия с историей: вертикальная панель как в коротких видео */
.rd-social { position: fixed; z-index: 8; left: calc(50% + min(50vw, 28.125dvh) + 22px); bottom: 104px; display: flex; flex-direction: column; align-items: center; gap: 20px; width: 96px; color: #fff; }
.rd-social-btn { width: 96px; min-height: 64px; display: flex; flex-direction: column; align-items: center; gap: 5px; color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,.6); cursor: pointer; }
.rd-social-ico { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; background: rgba(18,18,20,.68); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .16s ease, background .2s ease, color .2s ease; }
.rd-social-ico .ico { width: 25px; height: 25px; }
.rd-social-btn b { max-width: 96px; overflow: hidden; font-size: 12px; font-weight: 650; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.rd-social-btn small { color: rgba(255,255,255,.66); font-size: 10px; line-height: 1.15; }
.rd-share-short { display: none; }
.rd-social-btn:hover .rd-social-ico { background: rgba(55,55,58,.9); transform: translateY(-2px); }
.rd-social-btn:active .rd-social-ico { transform: scale(.9); }
.rd-social-btn:focus-visible { outline: 2px solid #fff; outline-offset: 5px; border-radius: 12px; }
.rd-social-btn:disabled { cursor: wait; opacity: .65; }
.rd-social-views { cursor: default; }
.rd-social-views:hover .rd-social-ico { transform: none; }
.rd-social-btn.on[data-book-like] .rd-social-ico { border-color: rgba(244,0,9,.6); background: #f40009; color: #fff; }
.rd-social-btn.on[data-book-save] .rd-social-ico { border-color: rgba(255,207,122,.65); background: #ffcf7a; color: #1d1a16; }
@media (max-width: 1100px) {
  .rd-social { left: auto; right: 12px; bottom: 150px; gap: 13px; width: 70px; }
  .rd-social-btn { width: 70px; min-height: 56px; }
  .rd-social-ico { width: 48px; height: 48px; }
  .rd-social-btn small { display: none; }
}
@media (max-width: 899px) {
  .rd-social { right: 7px; bottom: calc(146px + env(safe-area-inset-bottom)); gap: 11px; width: 58px; }
  .rd-social-btn { width: 58px; min-height: 51px; gap: 3px; }
  .rd-social-ico { width: 44px; height: 44px; background: rgba(0,0,0,.35); }
  .rd-social-ico .ico { width: 23px; height: 23px; }
  .rd-social-btn b { max-width: 58px; font-size: 10.5px; }
  .rd-share-full { display: none; }
  .rd-share-short { display: block; }
  .rd-box { right: 58px; }
  .rd-box.choice, .rd-box.ask { right: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .rd-social-ico { transition: none; }
}
