/* Творческая страница архимандрита Сильвестра. Оформление в стиле arh-silvestr.ru:
   тёмный фон, золото, Playfair Display + Inter. Встроенных стилей нет (их запрещает CSP). */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;
  --gold: #C9A347;
  --gold-light: #E8C86E;
  --gold-dark: #9B7A2F;
  --dark: #0D0B16;
  --dark2: #130F22;
  --card: #1A1530;
  --card2: #1F1940;
  --cream: #F8F0E3;
  --text: #E8DCC8;
  --muted: #A8977E;
  --red: #8B1A1A;
  --danger: #E58B8B;
  --ok: #8fcf8a;
  --white: #FFFFFF;
  --line: rgba(201, 163, 71, .16);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --nav-h: 68px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-family: var(--sans); background: var(--dark); color: var(--text); line-height: 1.6; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-top: var(--nav-h); }
img { max-width: 100%; height: auto; }
a { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: var(--gold); color: var(--dark); padding: 8px 14px; border-radius: 6px; }
.skip:focus-visible { left: 8px; } /* только при работе с клавиатуры, не после клика мышью */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tc { text-align: center; }
.mt { margin-top: 20px; }
.mt-lg { margin-top: 48px; }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }
svg.i { width: 16px; height: 16px; fill: currentColor; flex: none; }
/* Линейные значки вместо эмодзи (icon() в lib/view.php) */
svg.ic { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.22em; }
svg.ic-fill { fill: currentColor; stroke: none; }

/* ---------- Навигация ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 0 24px; background: rgba(13, 11, 22, .96); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(201, 163, 71, .18); }
.nav-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--nav-h); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 1; min-width: 0; }
.nav-logo img { flex: none; }
.nav-logo > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nav-logo-main { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--gold); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-logo-sub { font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; }
.nav-links a, .nav-drop-btn { color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 500; letter-spacing: .02em; transition: color .2s; white-space: nowrap; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav-links a:hover, .nav-drop-btn:hover, .nav-links a[aria-current], .nav-drop.is-active > .nav-drop-btn { color: var(--gold); }
.nav-links .nav-cta { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); padding: 8px 16px; border-radius: 6px; font-weight: 700; transition: opacity .2s, transform .2s; }
.nav-links .nav-cta:hover, .nav-links .nav-cta[aria-current] { color: var(--dark); opacity: .9; transform: translateY(-1px); }
.nav-drop { position: relative; }
.caret { font-size: 9px; }
.nav-drop-menu { display: none; position: absolute; top: calc(100% + 14px); left: -14px; list-style: none; min-width: 190px; background: var(--card); border: 1px solid rgba(201, 163, 71, .3); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); }
.nav-drop-menu::before { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.nav-drop:hover .nav-drop-menu, .nav-drop.open .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }
.nav-drop-menu a { display: block; padding: 8px 12px; border-radius: 7px; }
.nav-drop-menu a:hover { background: rgba(201, 163, 71, .12); }
.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* Кнопка «Написать отцу Сильвестру» в шапке */
.nav-write { display: inline-flex; align-items: center; gap: 7px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 100px; border: 1px solid transparent; transition: color .2s, border-color .2s, background .2s; white-space: nowrap; }
.nav-write svg.i { width: 17px; height: 17px; color: var(--gold); }
.nav-write:hover, .nav-write[aria-current] { color: var(--gold-light); border-color: rgba(201, 163, 71, .35); background: rgba(201, 163, 71, .08); }
.mob-menu a.mob-write { margin-top: 12px; text-align: center; border: 1px solid rgba(201, 163, 71, .4) !important; border-radius: 8px; color: var(--gold-light); padding: 12px; }
.mob-menu a.mob-write svg.ic { margin-right: 6px; }

/* Страница «Написать» */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.contact-notes { list-style: none; display: grid; gap: 10px; margin: 6px 0 26px; }
.contact-notes li { position: relative; padding-left: 22px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.contact-notes li::before { content: '✦'; position: absolute; left: 0; top: 0; color: var(--gold); font-size: 12px; }
.contact-photo { width: 100%; max-width: 380px; aspect-ratio: 4 / 3; object-fit: cover; object-position: 29% 28%; border-radius: 16px; border: 1px solid rgba(201, 163, 71, .25); }
.contact-card { background: var(--card); border: 1px solid rgba(201, 163, 71, .24); border-radius: 18px; padding: 30px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6); }
.contact-form fieldset { border: 0; display: grid; gap: 14px; margin-bottom: 8px; }
.contact-form legend { font-family: var(--serif); font-size: 19px; color: var(--gold); margin-bottom: 12px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* Подпись, звёздочка и «необязательно» — в одну строку, поле — под ними (а не сеткой по строке на каждый кусок) */
.contact-form label:not(.check):not(.hp) { display: block; }
.contact-form label:not(.check) > input, .contact-form label:not(.check) > textarea { display: block; margin-top: 6px; }
.contact-form .opt { margin-left: 4px; }
.contact-form .field-error { margin-top: 4px; }
.contact-form textarea, .contact-form input[type=tel] { width: 100%; padding: 12px 14px; font: 15px/1.5 var(--sans); color: var(--cream); background: var(--dark2); border: 1px solid rgba(201, 163, 71, .22); border-radius: 10px; resize: vertical; }
.contact-form textarea:focus, .contact-form input[type=tel]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 163, 71, .15); }
.contact-form [aria-invalid="true"] { border-color: var(--danger) !important; }
.contact-form .btn-primary { justify-self: start; margin-top: 6px; }
.req { color: var(--gold-light); }
.opt { font-weight: 400; color: var(--muted); font-size: 12px; }
.field-error { display: block; color: var(--danger); font-size: 12.5px; font-weight: 500; }
.contact-sent { text-align: center; padding: 20px 6px; }
.contact-sent-icon svg.ic { width: 30px; height: 30px; }
.contact-sent-icon { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); margin-bottom: 14px; }
.contact-sent h2 { font-family: var(--serif); font-size: 26px; color: var(--white); margin-bottom: 10px; }
.contact-sent p { color: var(--muted); margin-bottom: 18px; }
.contact-sent .hero-btns { justify-content: center; }

/* Переключатель языков: <details> — открывается и без JavaScript */
.lang-switch { position: relative; }
.lang-switch > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .03em; padding: 6px 11px; border: 1px solid rgba(201, 163, 71, .35); border-radius: 100px; transition: background .2s, border-color .2s; white-space: nowrap; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover, .lang-switch[open] > summary { background: rgba(201, 163, 71, .12); border-color: rgba(201, 163, 71, .55); }
.lang-switch > summary svg.i { width: 15px; height: 15px; }
.lang-switch[open] .caret { transform: rotate(180deg); }
.lang-switch ul { position: absolute; top: calc(100% + 8px); right: 0; list-style: none; min-width: 150px; background: var(--card); border: 1px solid rgba(201, 163, 71, .3); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); z-index: 1001; }
.lang-switch a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 14px; }
.lang-switch a b { min-width: 30px; font-size: 11px; color: var(--gold); letter-spacing: .04em; }
.lang-switch a:hover { background: rgba(201, 163, 71, .12); }
.lang-switch a[aria-current] { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); }
.lang-switch a[aria-current] b { color: var(--dark); }
.mob-langs { display: flex; gap: 6px; margin-top: 14px; }
.mob-langs a { flex: 1; text-align: center; border: 1px solid rgba(201, 163, 71, .3) !important; border-radius: 8px; padding: 9px 4px !important; font-size: 14px !important; }
.mob-langs a[aria-current] { background: rgba(201, 163, 71, .16); color: var(--gold) !important; }
.orig-note { display: inline-block; margin-bottom: 12px; font-size: 12px; letter-spacing: .04em; color: var(--gold-light); border: 1px dashed rgba(201, 163, 71, .4); border-radius: 100px; padding: 3px 12px; }

/* Китайский: шрифты с иероглифами (Playfair и Inter их не содержат), без курсива и разрядки */
html[lang="zh-Hans"] { --serif: 'Playfair Display', 'Noto Serif SC', 'Songti SC', 'SimSun', 'STSong', serif; --sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Hiragino Sans GB', sans-serif; }
html[lang="zh-Hans"] body { font-family: var(--sans); }
html[lang="zh-Hans"] .hero-desc, html[lang="zh-Hans"] .poem-snippet, html[lang="zh-Hans"] .f-quote blockquote, html[lang="zh-Hans"] .prose blockquote { font-style: normal; }
html[lang="zh-Hans"] .sec-label, html[lang="zh-Hans"] .f-nav h4, html[lang="zh-Hans"] .hero-badge, html[lang="zh-Hans"] .chips-label, html[lang="zh-Hans"] .hero-stat-label { letter-spacing: .02em; }
/* Русский оригинал внутри китайской страницы — обычным шрифтом сайта */
html[lang="zh-Hans"] [lang="ru"] { font-family: 'Playfair Display', Georgia, serif; }
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; background: none; border: none; width: 42px; height: 42px; margin-right: -8px; flex: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--gold); border-radius: 2px; transition: transform .3s, opacity .3s; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mob-menu { position: fixed; top: var(--nav-h); left: 0; right: 0; max-height: calc(100vh - var(--nav-h)); overflow-y: auto; background: rgba(13, 11, 22, .98); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(201, 163, 71, .15); padding: 12px 24px 24px; z-index: 999; display: flex; flex-direction: column; }
.mob-menu a { color: var(--text); text-decoration: none; font-size: 16px; padding: 11px 0; border-bottom: 1px solid rgba(201, 163, 71, .08); }
.mob-menu a[aria-current] { color: var(--gold); }
.mob-menu a.mob-cta { margin-top: 14px; text-align: center; padding: 13px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); font-weight: 700; border-radius: 8px; border: none; }

/* ---------- Кнопки ---------- */
.btn-primary, .btn-secondary, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .25s, box-shadow .25s, background .2s, border-color .2s; cursor: pointer; font-family: inherit; line-height: 1.3; }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); font-weight: 700; border: none; box-shadow: 0 4px 20px rgba(201, 163, 71, .3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(201, 163, 71, .4); }
.btn-secondary { background: transparent; color: var(--gold); border: 1px solid rgba(201, 163, 71, .4); }
.btn-secondary:hover { background: rgba(201, 163, 71, .1); border-color: var(--gold); transform: translateY(-2px); }
.btn-secondary.small { padding: 8px 14px; font-size: 13px; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(229, 139, 139, .35); }
.btn-danger:hover { background: rgba(139, 26, 26, .25); }
.link-btn { background: none; border: 0; color: var(--gold-light); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---------- Главный экран ---------- */
.hero { min-height: min(calc(100vh - var(--nav-h)), 860px); display: flex; align-items: center; position: relative; overflow: hidden; padding: 48px 24px 60px; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 15% 55%, rgba(139, 26, 26, .28) 0%, transparent 52%), radial-gradient(ellipse at 80% 20%, rgba(201, 163, 71, .1) 0%, transparent 48%), linear-gradient(135deg, #0D0B16 0%, #1A0A2E 55%, #0D0B16 100%); }
.hero-bg::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C9A347' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E"); }
.hero-inner { position: relative; max-width: 1280px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(201, 163, 71, .1); border: 1px solid rgba(201, 163, 71, .3); border-radius: 100px; padding: 6px 16px; font-size: 12px; color: var(--gold); letter-spacing: .05em; text-transform: uppercase; font-weight: 500; margin-bottom: 22px; }
.hero-title { font-family: var(--serif); font-size: clamp(36px, 5vw, 64px); font-weight: 800; line-height: 1.08; color: var(--white); margin-bottom: 22px; }
.hero-title .accent { color: var(--gold); display: block; font-size: .62em; font-weight: 600; margin-top: 6px; }
.hero-desc { font-size: 16.5px; color: var(--text); line-height: 1.8; margin-bottom: 34px; max-width: 560px; font-family: var(--serif); font-style: italic; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stat-num { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--gold); line-height: 1; }
.hero-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-top: 4px; }
/* Цифры на главной — под заголовком «Книги, стихи, песни и видео» */
.sec-head .hero-stats { margin: 22px 0 20px; }
.hero-visual { display: flex; justify-content: center; }
.hero-photo-caption { padding: 14px 8px 0; text-align: center; font-family: var(--serif); font-size: 13px; color: var(--muted); line-height: 1.45; }
.hero-photo-caption strong { display: block; color: var(--gold); font-size: 15px; margin-bottom: 2px; }

/* «Живое фото» с AR-эффектом */
.ar-portrait { position: relative; width: 100%; max-width: 420px; perspective: 900px; }
.ar-glow { position: absolute; inset: -18px; pointer-events: none; border-radius: 30px; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 40%), rgba(232, 200, 110, .35), rgba(139, 26, 26, .12) 55%, transparent 75%); filter: blur(26px); animation: halo 6s ease-in-out infinite; }
@keyframes halo { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.03); } }
.ar-card { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border: 0; padding: 0; background: var(--card); border-radius: 20px; cursor: pointer; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out, box-shadow .3s; box-shadow: 0 24px 64px rgba(0, 0, 0, .55), 0 0 0 1px rgba(201, 163, 71, .2); }
.ar-card:hover { box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(201, 163, 71, .5); }
.ar-layer { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; display: block; }
/* Кадр по лицу: на снимке silvestr2.jpg лицо левее середины (≈41% ширины), поэтому 29%, а не 50% */
.ar-photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--photo-x, 29%) 28%; transform: translateZ(0) scale(1.08) translate(var(--px, 0), var(--py, 0)); transition: transform .25s ease-out; display: block; }
.ar-shine { background: linear-gradient(115deg, transparent 30%, rgba(255, 240, 200, .18) 48%, transparent 62%); background-size: 250% 100%; background-position: var(--sx, 100%) 0; mix-blend-mode: screen; pointer-events: none; }
.ar-frame { border: 1.5px solid rgba(201, 163, 71, .55); box-shadow: inset 0 0 0 8px rgba(13, 11, 22, .35), inset 0 0 60px rgba(13, 11, 22, .55); pointer-events: none; transform: translateZ(30px); }
.ar-play { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%) translateZ(50px); display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 100px; background: rgba(13, 11, 22, .78); backdrop-filter: blur(6px); border: 1px solid rgba(201, 163, 71, .5); color: var(--gold-light); font: 600 14px var(--sans); white-space: nowrap; }
.ar-play svg { width: 18px; height: 18px; fill: currentColor; }
.ar-play::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid var(--gold); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .ar-glow, .ar-play::before { animation: none; } .ar-card, .ar-photo img { transition: none; } }

/* ---------- Секции ---------- */
.sec-band { padding: 80px 24px; }
.sec-band.dark2 { background: var(--dark2); }
.page { padding: 48px 24px 80px; }
.sec { max-width: 1280px; margin: 0 auto; }
.sec.narrow, .narrow { max-width: 820px; margin-left: auto; margin-right: auto; }
.sec-head { margin-bottom: 36px; }
.sec-label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.sec-title { font-family: var(--serif); font-size: clamp(28px, 4vw, 46px); font-weight: 700; color: var(--white); line-height: 1.2; }
.sec-desc { font-size: 16px; color: var(--muted); max-width: 640px; line-height: 1.7; }
.divider { width: 56px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); margin: 18px 0; }
.tc .divider { margin-left: auto; margin-right: auto; }
.lead { font-size: 17px; line-height: 1.8; color: var(--text); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.rounded-img { width: 100%; border-radius: 16px; border: 1px solid rgba(201, 163, 71, .25); object-fit: cover; max-height: 460px; }
.empty { color: var(--muted); padding: 36px; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }
.flash { max-width: 820px; margin: 20px auto 0; padding: 12px 18px; border-radius: 10px; background: rgba(63, 122, 58, .2); border: 1px solid rgba(143, 207, 138, .35); color: var(--ok); }
.flash-error { background: rgba(139, 26, 26, .2); border-color: rgba(229, 139, 139, .35); color: var(--danger); }
.notice { padding: 12px 16px; border-radius: 10px; background: rgba(201, 163, 71, .08); border: 1px solid rgba(201, 163, 71, .25); margin: 16px 0; font-size: 14px; }

.prose { font-size: 16px; line-height: 1.85; color: var(--text); }
.prose h2 { font-family: var(--serif); font-size: 26px; color: var(--gold); margin: 36px 0 14px; line-height: 1.25; }
.prose h3 { font-family: var(--serif); font-size: 20px; color: var(--cream); margin: 26px 0 10px; }
.prose p, .prose ul, .prose blockquote { margin-bottom: 16px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--gold); }
.prose blockquote { border-left: 3px solid var(--gold); padding: 8px 18px; background: rgba(201, 163, 71, .06); border-radius: 0 8px 8px 0; font-family: var(--serif); font-style: italic; }
.prose > :first-child { margin-top: 0; }

/* Карточки разделов */
/* Карточки «Творчества»: по четыре в ряд (всего 7–8 — с «Яндекс Музыкой»), на телефоне — по одной */
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card { background: var(--card); border: 1px solid rgba(201, 163, 71, .1); border-radius: 14px; padding: 26px; text-decoration: none; color: var(--text); transition: transform .3s, border-color .3s, box-shadow .3s; position: relative; overflow: hidden; }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), transparent); opacity: 0; transition: opacity .3s; }
.feature-card:hover { border-color: rgba(201, 163, 71, .3); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0, 0, 0, .3); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 50%; color: var(--gold-light); border: 1px solid rgba(201, 163, 71, .4); background: radial-gradient(circle at 32% 28%, rgba(232, 200, 110, .22), rgba(201, 163, 71, .06) 60%, transparent); box-shadow: inset 0 0 0 4px rgba(13, 11, 22, .35), 0 0 22px rgba(201, 163, 71, .12); transition: color .3s, border-color .3s, box-shadow .3s; }
.feature-icon svg.ic { width: 28px; height: 28px; stroke-width: 1.4; }
.feature-card:hover .feature-icon { color: #fff3cf; border-color: var(--gold); box-shadow: inset 0 0 0 4px rgba(13, 11, 22, .35), 0 0 30px rgba(201, 163, 71, .3); }
.feature-card h3 { font-family: var(--serif); font-size: 21px; color: var(--gold); margin-bottom: 8px; }
.feature-card p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.tag { display: inline-flex; align-items: center; font-size: 11px; color: var(--gold-light); border: 1px solid rgba(201, 163, 71, .22); padding: 2px 10px; border-radius: 100px; background: rgba(201, 163, 71, .06); text-decoration: none; white-space: nowrap; }
.tag svg.ic { width: 13px; height: 13px; margin-right: 5px; }
a.tag:hover { border-color: var(--gold); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.card-stats { display: inline-flex; gap: 12px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-stats span { display: inline-flex; align-items: center; gap: 4px; }
.card-stats svg.i { width: 13px; height: 13px; }

/* Стихи */
.poem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.poem-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid rgba(201, 163, 71, .1); border-radius: 14px; padding: 24px; text-decoration: none; color: var(--text); transition: transform .3s, border-color .3s, box-shadow .3s; }
.poem-card:hover { border-color: rgba(201, 163, 71, .3); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.poem-card h2, .poem-card h3 { font-family: var(--serif); font-size: 19px; color: var(--white); margin-bottom: 10px; line-height: 1.3; }
.poem-snippet { font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--muted); line-height: 1.7; flex: 1; margin-bottom: 14px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--gold-dark); border-top: 1px solid var(--line); padding-top: 12px; }
.item-head { margin: 18px 0 26px; }
.item-title { font-family: var(--serif); font-size: clamp(28px, 4.5vw, 44px); color: var(--white); line-height: 1.2; }
.item-sub { color: var(--muted); margin-top: 8px; }
.h-small { font-family: var(--serif); font-size: 22px; color: var(--gold); margin: 32px 0 14px; }
.poem-text { white-space: pre-line; font-family: var(--serif); font-size: clamp(17px, 2vw, 19px); line-height: 1.85; color: var(--cream); padding: 30px 34px; background: linear-gradient(135deg, rgba(201, 163, 71, .05), rgba(139, 26, 26, .04)); border: 1px solid var(--line); border-radius: 16px; position: relative; }
.poem-text::before { content: '❦'; position: absolute; top: -14px; left: 26px; color: var(--gold); background: var(--dark); padding: 0 8px; font-size: 20px; }
.poem-year { margin-top: 14px; color: var(--muted); font-style: italic; }
.poem-author { margin-top: 6px; font-family: var(--serif); color: var(--gold); text-align: right; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--gold); }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 30px 0; }
.prev-next a { display: block; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--cream); font-family: var(--serif); }
.prev-next a span { display: block; font: 500 12px var(--sans); color: var(--muted); margin-bottom: 2px; }
.prev-next a:hover { border-color: rgba(201, 163, 71, .4); }
.prev-next .next { text-align: right; grid-column: 2; }

/* Фильтры */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters input[type=search], .filters select { padding: 11px 14px; font: 14px var(--sans); color: var(--cream); background: var(--card); border: 1px solid rgba(201, 163, 71, .22); border-radius: 10px; min-width: 0; }
.filters input[type=search] { flex: 1 1 260px; }
.filters select { flex: 0 1 auto; max-width: 100%; }
.filters select option { background: var(--card); }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--gold); }
.filters .btn-primary { padding: 11px 20px; }
.filters .filters-label { padding-top: 0; }            /* «Поиск» — как подписи «Жанр» и «Авторы…» */
.filters[role=search]:not(.panel-search), .search-panel { padding: 16px; margin-bottom: 24px; border: 1px solid rgba(201,163,71,.55); border-radius: 14px; background: rgba(201,163,71,.08); }
.search-panel .panel-search { margin-bottom: 0; }
.search-panel [data-search-artists] > .chips-row { margin-top: 14px; }
.search-panel .play-opts { margin-top: 14px; }
.filters[role=search] .filters-label { flex: 1 0 100%; color: var(--gold-light); font-size: 16px; font-weight: 700; }
.filters[role=search] input[type=search] { flex: 1 1 100%; min-height: 52px; font-size: 16px; color: var(--cream); background: var(--card) url('../img/search.svg') no-repeat 15px center / 22px 22px; padding: 12px 14px 12px 48px; }
.filters[role=search] input[type=search]::placeholder { color: #c7bda9; opacity: 1; }
/* Выпадающие списки в стиле сайта (enhanceSelect в assets/js/site.js); обычный select скрыт, но остаётся в форме */
.dd { position: relative; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.dd-native { position: absolute; inset: 0; width: 100%; opacity: 0; pointer-events: none; }
.dd-btn { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; font: 14px var(--sans); color: var(--cream); text-align: left; background: var(--card); border: 1px solid rgba(201, 163, 71, .22); border-radius: 10px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.dd-btn:hover { border-color: rgba(201, 163, 71, .5); }
.dd-btn:focus-visible, .dd.open .dd-btn { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 163, 71, .15); }
.dd-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-caret { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.dd.open .dd-caret { transform: rotate(180deg); }
.dd-panel { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-width: min(360px, 90vw); padding: 6px; background: var(--card); border: 1px solid rgba(201, 163, 71, .3); border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5); animation: ddIn .16s ease-out; }
.dd-panel[hidden] { display: none; }
.dd-head { display: none; }
.dd-list { list-style: none; margin: 0; padding: 0; max-height: min(440px, 60vh); overflow-y: auto; overscroll-behavior: contain; outline: none; scrollbar-width: thin; scrollbar-color: rgba(201, 163, 71, .45) transparent; }
.dd-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.dd-list li:hover, .dd-list li:focus { outline: none; background: rgba(201, 163, 71, .12); color: var(--gold-light); }
.dd-list li[aria-selected="true"] { color: var(--gold); font-weight: 600; }
.dd-text { flex: 1; }
.dd-n { padding: 2px 8px; border-radius: 100px; font-size: 12px; font-weight: 400; color: var(--muted); background: rgba(201, 163, 71, .1); }
.dd-check { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.dd-list li[aria-selected="true"] .dd-check { visibility: visible; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes ddUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ddFade { from { opacity: 0; } to { opacity: 1; } }
body.dd-sheet-open { overflow: hidden; }
/* Телефон: список выезжает снизу поверх затемнения */
@media (max-width: 600px) {
  .filters .dd { flex: 1 1 auto; }
  .dd-btn { font-size: 16px; }
  .dd-panel { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; justify-content: flex-end; width: auto; min-width: 0; max-width: none; padding: 0; background: rgba(5, 4, 10, .62); border: 0; border-radius: 0; box-shadow: none; animation: ddFade .2s ease-out; }
  .dd-head { display: block; position: relative; padding: 20px 22px 10px; font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); background: var(--card); border-top: 1px solid rgba(201, 163, 71, .35); border-radius: 18px 18px 0 0; animation: ddUp .22s ease-out; }
  .dd-head::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(201, 163, 71, .35); }
  .dd-list { max-height: 65vh; padding: 0 12px calc(14px + env(safe-area-inset-bottom)); background: var(--card); animation: ddUp .22s ease-out; }
  .dd-list li { min-height: 50px; padding: 13px 12px; font-size: 16px; border-radius: 10px; }
  .dd-list li + li { box-shadow: 0 -1px 0 rgba(201, 163, 71, .08); }
}
@media (prefers-reduced-motion: reduce) { .dd-panel, .dd-head, .dd-list { animation: none; } }
.found { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips :is(a, button) { display: inline-flex; gap: 6px; align-items: center; padding: 7px 14px; border-radius: 100px; border: 1px solid rgba(201, 163, 71, .25); color: var(--text); text-decoration: none; font-size: 13.5px; transition: background .2s, border-color .2s; }
.chips :is(a, button) span { color: var(--muted); font-size: 12px; }
.chips :is(a, button) svg.ic { width: 16px; height: 16px; color: var(--gold); }
svg.ic-color { fill: none; stroke: none; } /* цвета заданы в самих значках жанров */
.chips :is(a, button) svg.ic-color { width: 18px; height: 18px; }
.chips :is(a[aria-current], button[aria-pressed=true]) svg.ic-color { filter: drop-shadow(0 0 1px rgba(13, 11, 22, .5)); }
.chips :is(a[aria-current], button[aria-pressed=true]) svg.ic { color: inherit; }
.chips :is(a, button):hover { border-color: var(--gold); }
.chips :is(a[aria-current], button[aria-pressed=true]) { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); border-color: transparent; font-weight: 600; }
.chips :is(a[aria-current], button[aria-pressed=true]) span { color: rgba(13, 11, 22, .7); }
.chip-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 18px; }
.chip-filters:empty { display: none; }
.chips-row { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.chips-label { flex: none; width: 110px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); padding-top: 8px; }
.chips-row .chips { margin-bottom: 0; }
.chips button { background: transparent; cursor: pointer; font-family: inherit; }
.chips button[hidden], .chips-row[hidden], .found-actions[hidden] { display: none; }
/* «Авторы музыки и исполнители» — выпадающий список вместо кнопок (artist_select в lib/view.php) */
.artist-form { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.artist-form .dd { flex: 0 1 340px; }
.artist-form select { padding: 10px 12px; font: 14px var(--sans); color: var(--cream); background: var(--card); border: 1px solid rgba(201, 163, 71, .22); border-radius: 10px; }
.js .no-js { display: none; }
.chips-row-artist { align-items: center; }
.artist-form select, .artist-form .dd-btn, .favorites-artist select, .favorites-artist .dd-btn { color: #fff; }
.artist-form .dd-val, .favorites-artist .dd-val { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .chips-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .chips-label { width: auto; padding-top: 0; }
  .chips-row-artist { align-items: stretch; }
  .artist-form .dd { flex: 1 1 auto; }
  /* На телефоне кнопки переносятся на новую строку — всё видно без прокрутки вбок */
  .chips { gap: 6px; }
  .chips :is(a, button) { padding: 7px 12px; }
}
.play-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-left: auto; }
.shuffle-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.shuffle-btn[hidden] { display: none; }
.shuffle-btn .ic { width: 18px; height: 18px; }
.autoplay { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.autoplay { min-height: 44px; white-space: normal; text-align: center; justify-content: center; }
.autoplay[aria-pressed="true"] { border-color: var(--gold); color: var(--dark); background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.autoplay[aria-pressed="false"] { color: var(--muted); background: transparent; }
.autoplay:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.autoplay[hidden] { display: none; }
/* «Показать ещё» под списками */
.more-wrap { display: flex; justify-content: center; margin-top: 30px; }
.more-btn { min-width: 240px; }
.more-left { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 1px 9px; }
.more-btn.loading { pointer-events: none; opacity: .75; }
.more-btn.loading::after { content: ''; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .more-btn.loading::after { animation-duration: 2s; } }

/* Песни */
.songs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.song-card { background: var(--card); border: 1px solid rgba(201, 163, 71, .1); border-radius: 12px; padding: 20px; transition: border-color .3s, transform .3s, box-shadow .3s; position: relative; display: flex; flex-direction: column; gap: 6px; }
.song-card:hover { border-color: rgba(201, 163, 71, .28); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0, 0, 0, .3); }
.song-card.playing { border-color: var(--gold); background: var(--card2); }
.catalog-playing { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--gold); border-radius: 12px; background: var(--card2); overflow-wrap: anywhere; }
[data-catalog-card] > .song-card { margin-bottom: 18px; }
.song-card.single { margin: 18px 0; }
.song-card .tag { align-self: flex-start; }
.song-num { position: absolute; top: 14px; right: 16px; font-family: var(--serif); font-size: 26px; font-weight: 700; color: rgba(201, 163, 71, .2); line-height: 1; }
a.song-num { text-decoration: none; color: rgba(201, 163, 71, .55); transition: color .2s; }
a.song-num:hover, a.song-num:focus-visible { color: var(--gold); }
/* Каталожный номер стихотворения */
.poem-num { display: block; margin-bottom: 4px; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--gold); }
.poem-songs { margin: 28px 0 8px; }
.poem-songs ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.poem-songs a { color: var(--gold-light); }
.song-title-text { font-family: var(--serif); font-size: 17px; font-weight: 600; padding-right: 44px; }
.song-title-text a { color: var(--white); text-decoration: none; }
.song-title-text a:hover { color: var(--gold-light); }
.song-author { font-size: 12px; color: var(--muted); }
.audio-player { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.play-btn { width: 42px; height: 42px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .2s, box-shadow .2s; box-shadow: 0 2px 10px rgba(201, 163, 71, .3); }
.play-btn:hover { transform: scale(1.08); }
.play-btn svg { width: 15px; height: 15px; fill: var(--dark); }
.p-controls { flex: 1; min-width: 0; }
.p-bar-wrap { height: 6px; background: rgba(255, 255, 255, .1); border-radius: 3px; cursor: pointer; margin-bottom: 5px; position: relative; touch-action: manipulation; }
.p-bar-wrap::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px; }
.p-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 3px; width: 0; }
.p-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.song-card .card-stats { margin-top: auto; padding-top: 6px; }
/* Нижняя панель карточки: просмотры слева, «нравится» и «поделиться» справа */
.card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.card-actions .card-stats { margin: 0 auto 0 0; padding: 0; }
.card-like { display: flex; }
.card-actions .react-btn, .share-compact .share-btn { padding: 5px 12px; font-size: 13px; gap: 6px; }
.share-compact .share-btn { padding: 6px 9px; }
.card-actions .react-btn.on svg { fill: var(--dark); }
.song-card:has(.share-menu:not([hidden])) { z-index: 5; } /* открытое меню поверх соседних карточек */
.docs { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.doc-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(201, 163, 71, .09); color: var(--gold); border: 1px solid rgba(201, 163, 71, .28); padding: 10px 18px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.doc-btn:hover { background: rgba(201, 163, 71, .15); }

/* Видео */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
/* Без overflow: hidden, иначе меню «Поделиться» обрезается краем карточки; углы скругляет само превью */
.video-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid rgba(201, 163, 71, .1); border-radius: 14px; transition: border-color .3s, transform .3s; }
.video-card:has(.share-menu:not([hidden])) { z-index: 5; }
.video-card .video-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.video-card .video-meta .tag { align-self: flex-start; }
.video-card:hover { border-color: rgba(201, 163, 71, .3); transform: translateY(-3px); }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2a1530, #130F22); overflow: hidden; border-radius: 13px 13px 0 0; }
.video-thumb img, .video-thumb-frame { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.video-thumb-frame { pointer-events: none; background: #000; } /* кадр из ролика без обложки: нажатие — по ссылке карточки */
.video-card:hover .video-thumb img, .video-card:hover .video-thumb-frame { transform: scale(1.04); }
.video-thumb-ph { position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(201, 163, 71, .2), transparent 60%), url("../img/logo.svg") center / 64px no-repeat; opacity: .6; }
.video-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(13, 11, 22, .7); border: 1px solid rgba(232, 200, 110, .6); display: flex; align-items: center; justify-content: center; transition: background .2s, transform .2s; }
.video-play svg { width: 24px; height: 24px; fill: var(--gold-light); margin-left: 3px; }
.video-thumb:hover .video-play { background: var(--gold); transform: translate(-50%, -50%) scale(1.08); }
.video-thumb:hover .video-play svg { fill: var(--dark); }
.video-site { position: absolute; top: 10px; left: 10px; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgba(13, 11, 22, .75); color: var(--text); }
.video-meta { padding: 16px 18px 18px; display: grid; gap: 6px; }
.video-meta .tag { justify-self: start; }
.video-meta h3 { font-family: var(--serif); font-size: 17px; line-height: 1.35; }
.video-meta h3 a { color: var(--white); text-decoration: none; }
.video-meta h3 a:hover { color: var(--gold-light); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.interview-list { display: grid; gap: 36px; }
.interview { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: start; }
.interview h2 { font-family: var(--serif); font-size: 24px; margin-bottom: 10px; line-height: 1.3; }
.interview h2 a { color: var(--white); text-decoration: none; }
.interview p { color: var(--muted); margin-bottom: 10px; }

/* Яндекс Музыка */
.ym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.ym-grid.single { grid-template-columns: minmax(0, 720px); }
.ym-widget { border-radius: 14px; overflow: hidden; border: 1px solid rgba(201, 163, 71, .2); background: var(--card); margin: 18px 0; }
.ym-grid .ym-widget { margin: 0; }
.ym-widget iframe { display: block; width: 100%; height: 244px; border: 0; }
.ym-album iframe, .ym-playlist iframe { height: 450px; }
.ym-grid .ym-album, .ym-grid .ym-playlist { grid-column: 1 / -1; }

/* Книги */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 26px; }
.book-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--text); }
.book-cover { display: block; aspect-ratio: 3 / 4; border-radius: 6px 12px 12px 6px; overflow: hidden; background: linear-gradient(135deg, var(--card2), #2a1530); border: 1px solid rgba(201, 163, 71, .25); box-shadow: -6px 0 0 rgba(201, 163, 71, .18) inset, 0 14px 30px rgba(0, 0, 0, .45); transition: transform .3s; position: relative; }
.book-card:hover .book-cover { transform: translateY(-4px) rotate(-1deg); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 22px; text-align: center; font-family: var(--serif); font-size: 18px; color: var(--gold-light); line-height: 1.35; border: 1px solid rgba(201, 163, 71, .3); margin: 12px; border-radius: 4px; }
.book-info { display: grid; gap: 3px; }
.book-info h2 { font-family: var(--serif); font-size: 17px; color: var(--white); line-height: 1.3; }
.book-detail { display: grid; grid-template-columns: 300px 1fr; gap: 44px; margin-top: 22px; align-items: start; }
.book-cover.big { max-width: 300px; }

/* Биография */
.bio-grid { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: start; }
.bio-aside { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; gap: 20px; }
.silv-frame { border: 1px solid rgba(201, 163, 71, .25); border-radius: 16px; overflow: hidden; background: var(--card); padding: 12px 12px 0; }
.silv-photo { width: 100%; height: auto; display: block; border-radius: 8px 8px 0 0; }
.silv-caption { padding: 14px 8px 18px; text-align: center; }
.silv-name { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.silv-role { font-size: 12px; color: var(--muted); line-height: 1.4; }
.silv-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.facts { background: rgba(201, 163, 71, .05); border: 1px solid rgba(201, 163, 71, .14); border-radius: 14px; padding: 6px 20px; }
.facts > div { padding: 12px 0; border-bottom: 1px solid rgba(201, 163, 71, .08); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { color: var(--cream); font-size: 14.5px; }
.bio-main h2 { font-family: var(--serif); font-size: 26px; color: var(--gold); margin: 34px 0 18px; }
.timeline { list-style: none; position: relative; margin-bottom: 20px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--gold), rgba(201, 163, 71, .1)); }
.tl-item { position: relative; padding: 0 0 22px 40px; }
.tl-dot { position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--dark); border: 2px solid var(--gold); }
.tl-dot::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--gold); }
.tl-date { font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.tl-desc { color: var(--text); font-size: 15px; }

/* Обитель */
/* Карусель фотографий (photo_carousel в lib/view.php, листание — assets/js/site.js) */
.carousel { position: relative; margin-top: 6px; }
.car-track { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border: 1px solid rgba(201, 163, 71, .28); border-radius: 18px; background: var(--card); box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.car-slide { position: relative; flex: 0 0 100%; margin: 0; aspect-ratio: 16 / 9; max-height: min(620px, 72vh); scroll-snap-align: start; }
.car-slide a, .car-slide img { display: block; width: 100%; height: 100%; }
.car-slide img { object-fit: cover; }
.car-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 44px 22px 16px; font-size: 13px; line-height: 1.5; color: #f3ead4; background: linear-gradient(transparent, rgba(8, 6, 14, .85)); pointer-events: none; }
.car-slide figcaption a { color: var(--gold-light); pointer-events: auto; }
.car-btn { position: absolute; top: 50%; z-index: 2; display: none; align-items: center; justify-content: center; width: 46px; height: 46px; margin-top: -40px; border-radius: 50%; border: 1px solid rgba(201, 163, 71, .5); background: rgba(13, 11, 22, .62); color: var(--gold-light); cursor: pointer; backdrop-filter: blur(4px); transition: background .2s, border-color .2s; }
.carousel.ready .car-btn { display: flex; }
.car-btn:hover, .car-btn:focus-visible { background: rgba(13, 11, 22, .88); border-color: var(--gold); outline: none; }
.car-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.car-prev { left: 14px; }
.car-next { right: 14px; }
.car-dots { display: flex; justify-content: center; gap: 2px; margin-top: 10px; }
.car-dots button { position: relative; width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.car-dots button::before { content: ''; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 5px; background: rgba(201, 163, 71, .3); transition: width .2s, margin .2s, background .2s; }
.car-dots button[aria-current="true"]::before { width: 24px; margin-left: -12px; background: var(--gold); }
@media (max-width: 600px) {
  .car-slide { aspect-ratio: 4 / 3; }
  .car-track { border-radius: 14px; }
  .car-btn { width: 40px; height: 40px; margin-top: -34px; }
  .car-prev { left: 8px; }
  .car-next { right: 8px; }
  .car-slide figcaption { padding: 32px 14px 12px; font-size: 12px; }
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.info-card h3 { font-family: var(--serif); font-size: 20px; color: var(--gold); margin-bottom: 12px; }

/* Конкурс */
.promo { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; background: linear-gradient(135deg, rgba(201, 163, 71, .12), rgba(139, 26, 26, .1)); border: 1px solid rgba(201, 163, 71, .3); border-radius: 20px; padding: 40px; position: relative; overflow: hidden; }
.promo::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(232, 200, 110, .18), transparent 70%); pointer-events: none; }
.promo:not(:has(.promo-img)) { grid-template-columns: 1fr; text-align: center; }
.promo:not(:has(.promo-img)) .hero-btns { justify-content: center; }
.promo-img { width: 100%; border-radius: 14px; border: 1px solid rgba(201, 163, 71, .3); object-fit: cover; max-height: 360px; }
.promo h1, .promo h2 { font-family: var(--serif); font-size: clamp(26px, 3.5vw, 38px); color: var(--white); line-height: 1.2; margin-bottom: 14px; }
.promo p { color: var(--text); font-size: 16px; line-height: 1.7; margin-bottom: 24px; }

/* Панель действий: просмотры, реакции, поделиться */
.item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 26px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.item-actions .stat { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-right: auto; font-variant-numeric: tabular-nums; }
.react-form { display: flex; gap: 8px; }
.react-btn, .share-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 100px; border: 1px solid rgba(201, 163, 71, .3); background: transparent; color: var(--text); cursor: pointer; font: 600 14px var(--sans); transition: background .2s, border-color .2s, color .2s, transform .15s; font-variant-numeric: tabular-nums; }
.react-btn:hover, .share-btn:hover { border-color: var(--gold); color: var(--gold-light); }
/* «Поделиться» страницей — в шапке, меню раскрывается вниз */
.nav-right .share-btn { color: var(--gold); border-color: rgba(201, 163, 71, .35); padding: 6px 9px; }
.nav-right .share-menu { top: calc(100% + 10px); bottom: auto; right: 0; left: auto; }
.react-btn:active { transform: scale(.95); }
.react-btn.on { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); border-color: transparent; }
.react-btn svg.i { width: 17px; height: 17px; }
.react-btn:not(.on) svg.i { fill: none; stroke: currentColor; stroke-width: 2; }
.react-btn.on svg.i { fill: var(--dark); }
.react-btn:disabled { opacity: .7; cursor: progress; }
.share { position: relative; }
.share-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; display: grid; min-width: 210px; background: var(--card); border: 1px solid rgba(201, 163, 71, .3); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
.share-menu a, .share-menu button { display: block; text-align: left; padding: 9px 12px; border-radius: 7px; color: var(--text); text-decoration: none; background: none; border: 0; font: 14px var(--sans); cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: rgba(201, 163, 71, .12); color: var(--gold-light); }

/* Формы (страница «Написать») */
.form { display: grid; gap: 14px; margin-top: 10px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; line-height: 1.5; }
.form label.check input { margin-top: 3px; accent-color: var(--gold); width: 16px; height: 16px; flex: none; }
.form input[type=text], .form input[type=email] { width: 100%; padding: 12px 14px; font: 15px/1.5 var(--sans); color: var(--cream); background: var(--dark2); border: 1px solid rgba(201, 163, 71, .22); border-radius: 10px; }
.form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 163, 71, .15); }
.form-errors { background: rgba(139, 26, 26, .2); border: 1px solid rgba(229, 139, 139, .35); color: var(--danger); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }

/* ---------- Подвал ---------- */
.footer { position: relative; overflow: hidden; padding: 0 24px 26px; margin-top: 40px;
  background: radial-gradient(ellipse at 15% 0%, rgba(139, 26, 26, .2), transparent 55%), radial-gradient(ellipse at 85% 10%, rgba(201, 163, 71, .1), transparent 50%), linear-gradient(180deg, #0D0B16 0%, #130F22 100%); }
/* Едва заметный узор из крестиков, как в первом экране */
.footer::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C9A347' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E"); }
.footer > * { position: relative; }
.f-ornament { display: flex; align-items: center; gap: 18px; max-width: 1280px; margin: 0 auto; transform: translateY(-1px); }
.f-ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 163, 71, .55)); }
.f-ornament span:last-child { background: linear-gradient(90deg, rgba(201, 163, 71, .55), transparent); }
.f-ornament svg { width: 22px; height: 22px; fill: var(--gold); flex: none; filter: drop-shadow(0 0 8px rgba(232, 200, 110, .5)); margin-top: 1px; }
.f-quote { text-align: center; margin: 26px auto 46px; }
.f-quote blockquote { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3vw, 30px); color: var(--cream); line-height: 1.3; }
.f-quote figcaption { margin-top: 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); }

.footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.5fr; gap: 40px; align-items: start; }
.f-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; margin-bottom: 16px; }
.f-logo img { filter: drop-shadow(0 4px 14px rgba(201, 163, 71, .25)); }
.f-logo strong { display: block; font-family: var(--serif); font-size: 19px; color: var(--gold); line-height: 1.2; }
.f-logo small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.f-brand p { font-size: 13.5px; color: var(--muted); line-height: 1.7; max-width: 360px; }
.f-social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.f-social a { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gold-light); border: 1px solid rgba(201, 163, 71, .3); background: rgba(201, 163, 71, .06); transition: background .2s, color .2s, transform .2s, border-color .2s; }
.f-social a:hover { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); border-color: transparent; transform: translateY(-2px); }
.f-social svg { width: 19px; height: 19px; fill: currentColor; }

.f-nav h4, .f-card h4 { font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.f-nav ul { list-style: none; display: grid; gap: 10px; }
.f-nav a { position: relative; font-size: 14px; color: var(--text); text-decoration: none; transition: color .2s, padding-left .2s; }
.f-nav a::before { content: ''; position: absolute; left: 0; top: 50%; width: 0; height: 1px; background: var(--gold); transition: width .2s; }
.f-nav a:hover { color: var(--gold-light); padding-left: 14px; }
.f-nav a:hover::before { width: 9px; }

.f-card { background: rgba(26, 21, 48, .7); border: 1px solid rgba(201, 163, 71, .18); border-radius: 16px; padding: 22px; backdrop-filter: blur(4px); }
.f-card h4 { font-family: var(--serif); font-size: 17px; text-transform: none; letter-spacing: 0; color: var(--cream); margin-bottom: 12px; line-height: 1.3; }
.f-card p { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.f-card p a { color: var(--text); text-decoration: none; }
.f-card p a:hover { color: var(--gold-light); }
.f-addr { display: flex; gap: 8px; align-items: flex-start; }
.f-addr svg { width: 16px; height: 16px; fill: var(--gold); flex: none; margin-top: 2px; }
.f-card-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 16px; }
.f-card-links a { font-size: 13px; color: var(--gold-light); text-decoration: none; }
.f-card-links a:hover { text-decoration: underline; }
.f-contest { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 10px; text-decoration: none; background: linear-gradient(135deg, rgba(201, 163, 71, .2), rgba(139, 26, 26, .18)); border: 1px solid rgba(201, 163, 71, .35); transition: transform .2s, border-color .2s; }
.f-contest:hover { transform: translateY(-2px); border-color: var(--gold); }
.f-contest span { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.f-contest strong { font-family: var(--serif); font-size: 18px; color: var(--gold-light); }

.footer-bottom { max-width: 1280px; margin: 44px auto 0; padding-top: 20px; border-top: 1px solid rgba(201, 163, 71, .12); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold-light); }
.f-top { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid rgba(201, 163, 71, .3); border-radius: 100px; color: var(--gold) !important; }
.f-top:hover { background: rgba(201, 163, 71, .1); }

/* ---------- Всплывающее окно и уведомление ---------- */
/* Художественное чтение (readings.php): фото чтеца, имя, кто он, аудиозапись и текст стихотворения */
.rd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rd-photo { flex: none; display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border-radius: 14px; border: 1px solid rgba(201, 163, 71, .4); background: radial-gradient(circle at 35% 30%, rgba(232, 200, 110, .2), rgba(201, 163, 71, .05) 65%); color: rgba(201, 163, 71, .65); }
.rd-photo img { width: 100%; height: 100%; object-fit: cover; }
.rd-photo svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.reading-card .song-title-text { margin: 0; }
.rd-role { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.rd-poem { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; font-family: var(--serif); font-size: 16px; color: var(--cream); }
.rd-poem svg.ic { color: var(--gold); }
.rd-poem a { color: var(--gold-light); }
.rd-soon { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 12px 14px; border: 1px dashed rgba(201, 163, 71, .35); border-radius: 10px; font-size: 13.5px; color: var(--muted); }
.rd-soon svg.ic { color: var(--gold); }
.rd-text { margin: 2px 0 12px; }
.rd-text summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid rgba(201, 163, 71, .35); border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--gold); cursor: pointer; list-style: none; }
.rd-text summary::-webkit-details-marker { display: none; }
.rd-text summary::after { content: ''; width: 7px; height: 7px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.rd-text[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.rd-text summary:hover { background: rgba(201, 163, 71, .1); border-color: var(--gold); }
.rd-text .poem-text { margin-top: 14px; max-height: 420px; overflow-y: auto; padding: 16px 18px; font-size: 16px; line-height: 1.75; }
.rd-text .poem-text::before { display: none; } /* украшение ❦ — для текста на фоне страницы */
.reading-card .poem-text::before { background: var(--card); }
.rd-placeholder { opacity: .78; }
.rd-video { margin: 0 0 12px; border-radius: 12px; }
.reading-card .video-frame { margin: 0 0 14px; }
.notice-soon { margin: 0 0 22px; padding: 14px 18px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: rgba(201, 163, 71, .07); color: var(--text); }
.reading-card.single .rd-photo { width: 120px; height: 120px; }
/* Мини-плеер (assets/js/site.js): песня продолжает играть при переходах по сайту */
.mini-player { position: fixed; left: 50%; bottom: 14px; z-index: 900; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; background: rgba(26, 22, 44, .95); backdrop-filter: blur(10px); border: 1px solid rgba(201, 163, 71, .35); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.mini-player[hidden] { display: none; }
.mp-play { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); cursor: pointer; }
.mp-play svg { width: 20px; height: 20px; fill: currentColor; }
.mp-info { flex: 1; min-width: 0; display: grid; gap: 8px; }
.mp-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 14px var(--sans); color: var(--cream); text-decoration: none; }
.mp-title:hover { color: var(--gold-light); }
.mp-bar { position: relative; height: 6px; border-radius: 3px; background: rgba(201, 163, 71, .2); cursor: pointer; }
.mp-bar::before { content: ''; position: absolute; inset: -9px 0; } /* по полоске легко попасть пальцем */
.mp-bar:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.mp-fill { width: 0; height: 100%; border-radius: 3px; background: var(--gold); }
.mp-time { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-close { flex: none; width: 40px; height: 40px; border: 1px solid rgba(201, 163, 71, .3); border-radius: 50%; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.mp-close:hover { color: var(--gold-light); border-color: var(--gold); }
.mp-next, .mp-prev, .mp-queue { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(201, 163, 71, .3); border-radius: 50%; background: none; color: var(--gold-light); cursor: pointer; }
.mp-next[hidden] { display: none; }
.mp-next svg, .mp-prev svg, .mp-queue svg { width: 16px; height: 16px; fill: currentColor; }
.mp-next:hover, .mp-prev:hover, .mp-queue:hover { border-color: var(--gold); }
body.has-mini { padding-bottom: 84px; }
body.has-mini .toast { bottom: 100px; }
.soft-loading #main { opacity: .55; transition: opacity .2s; }
@media (max-width: 600px) {
  .mini-player { bottom: max(8px, env(safe-area-inset-bottom)); gap: 10px; padding: 8px 8px 8px 8px; }
  .mp-time { display: none; }
}
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(30, 25, 50, .97); border: 1px solid rgba(201, 163, 71, .3); color: var(--text); font-size: 14px; padding: 10px 20px; border-radius: 8px; z-index: 4000; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 4, 10, .85); backdrop-filter: blur(4px); }
.modal-box { position: relative; width: 100%; max-width: 960px; max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border: 1px solid rgba(201, 163, 71, .3); border-radius: 16px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.modal-title { font-family: var(--serif); font-size: 22px; color: var(--white); margin: 0 40px 14px 0; }
.modal-close { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--text); font-size: 24px; cursor: pointer; }
.modal-close:hover { background: rgba(201, 163, 71, .2); }
.modal-body .video-frame { border-radius: 10px; }
.modal-img { display: block; max-width: 100%; max-height: calc(100vh - 140px); margin: 0 auto; border-radius: 8px; }
body.modal-open { overflow: hidden; }

/* ---------- Адаптивность ---------- */
@media (max-width: 1180px) {
  .nav-links { gap: 16px; }
  .nav-logo-sub { display: none; }
  .nav-logo-main { white-space: normal; font-size: 16px; line-height: 1.05; } /* название в две строки, чтобы поместилось меню */
}
@media (max-width: 1360px) and (min-width: 1081px) {
  .nav-write span { display: none; } /* на средних экранах — только значок конверта, чтобы меню поместилось */
  .nav-links { gap: 14px; }
  .nav-links a, .nav-drop-btn { font-size: 13px; letter-spacing: 0; }
  .nav-right { gap: 10px; }
  .nav-inner { gap: 14px; }
}
@media (max-width: 1080px) {
  .nav-links, .nav-inner > nav { display: none; } /* пустой <nav> не должен занимать промежуток в шапке */
  .hamburger { display: flex; }
  .cards4 { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .cards4 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .bio-grid { grid-template-columns: 1fr; gap: 32px; }
  .bio-aside { position: static; grid-template-columns: minmax(0, 360px) 1fr; align-items: start; }
  .interview { grid-template-columns: 1fr; gap: 16px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .f-brand, .f-card { grid-column: 1 / -1; }
  .f-card { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: center; }
  .f-card h4, .f-card p, .f-card-links { grid-column: 1; }
  .f-contest { grid-column: 2; grid-row: 1 / span 4; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .nav { padding: 0 16px; }
  .nav-right { gap: 8px; }
  .nav-write span { display: none; }
  .nav-write { padding: 6px 8px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-photo { display: none; }
  .contact-card { padding: 22px 16px; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .lang-switch > summary { padding: 6px 9px; }
  .lang-switch > summary svg.i { display: none; }
  .hero { padding: 32px 16px 48px; min-height: auto; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; }
  .ar-portrait { max-width: 320px; }
  .hero-stats { gap: 22px; }
  .sec-band { padding: 56px 16px; }
  .page { padding: 28px 16px 60px; }
  .split, .promo, .book-detail { grid-template-columns: 1fr; gap: 24px; }
  .promo { padding: 26px 20px; }
  .bio-aside { grid-template-columns: 1fr; }
  .poem-text { padding: 24px 18px; }
  .prev-next { grid-template-columns: 1fr; }
  .prev-next .next { grid-column: 1; }
  .item-actions .stat { width: 100%; }
  .share-menu { right: auto; left: 0; }
  .songs-grid, .poem-grid, .video-grid { grid-template-columns: 1fr; }
  .footer { padding: 0 16px 22px; }
  .f-quote { margin: 22px auto 34px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .f-card { display: block; }
  .footer-bottom { flex-direction: column; text-align: center; margin-top: 34px; }
  .play-opts { margin-left: 0; }
  .filters select, .filters .dd, .filters .btn-primary { flex: 1 1 auto; }
  /* Поля не мельче 16px: иначе iPhone увеличивает страницу при вводе */
  .filters input[type=search], .filters select, .form input[type=text], .form input[type=email], .contact-form textarea, .contact-form input { font-size: 16px; }
  /* Шапка: логотип, язык и меню */
  .nav-inner { gap: 12px; }
  .nav-logo-main { font-size: 16px; }
  .nav-logo img { width: 34px; height: 34px; }
  .lang-switch > summary { min-height: 36px; }
  .nav-write { min-width: 38px; min-height: 38px; justify-content: center; }
  /* Кнопки в карточках — под палец */
  .card-actions .react-btn, .share-compact .share-btn, .react-btn, .share-btn { min-height: 40px; }
  .share-compact .share-btn { min-width: 40px; justify-content: center; }
  .more-btn { width: 100%; min-width: 0; padding: 14px 20px; }
  .item-head { margin: 12px 0 20px; }
  .back-link { padding: 8px 0; }
  .tag { padding: 4px 11px; font-size: 12px; }
  .song-card, .poem-card { padding: 18px; }
  .video-meta { padding: 14px 16px 16px; }
  .modal { padding: 10px; }
  .modal-box { padding: 16px; }
  .ym-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  /* Название в две строки: рядом кнопки «Поделиться», язык и меню */
  .nav-logo-main { white-space: normal; line-height: 1.05; }
  .nav-right .share-btn { padding: 6px 8px; }
  .nav-write { display: none; } /* «Написать» — крупной кнопкой в меню */
  .ar-portrait { max-width: 270px; }
  .hero { padding-top: 24px; }
  .hero-inner { gap: 28px; }
  .hero-stats { gap: 18px 26px; margin-top: 32px; }
  .sec-band { padding: 48px 16px; }
  .sec-head { margin-bottom: 26px; }
  .feature-card { padding: 20px; display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; }
  .feature-card .feature-icon { grid-row: 1 / span 2; width: 50px; height: 50px; margin: 0; }
  .feature-icon svg.ic { width: 24px; height: 24px; }
  .feature-card h3 { margin: 0; font-size: 19px; }
  .cards4 { grid-template-columns: 1fr; gap: 12px; }
  .cards4 > :last-child:nth-child(odd) { grid-column: auto; }
  .hero-btns { flex-direction: column; }
  .hero-btns > a { justify-content: center; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 380px) {
  /* Самые узкие телефоны: имя в логотипе в две строки, а не с многоточием */
  .nav-logo-main { white-space: normal; font-size: 15px; line-height: 1.05; }
}

/* Кнопка «Добавить ярлык на рабочий стол» (подвал, меню на телефоне) и инструкция в окне */
.f-install { margin-top: 18px; }
.mob-menu .mob-install { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; padding: 12px; border: 1px solid rgba(201, 163, 71, .3); border-radius: 8px; background: none; color: var(--gold); font: 600 15px var(--sans); cursor: pointer; }
.mob-install[hidden], .f-install[hidden] { display: none; }
.install-help ol { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 10px; line-height: 1.6; color: var(--text); }
.install-help .btn-primary { width: 100%; }

/* ---------- Отступы и ритм текста (общая правка) ---------- */
.bio-main > .lead { margin-bottom: 30px; }                 /* вступление биографии не прилипает к первому заголовку */
.bio-main > .lead + .prose > h2:first-child { margin-top: 0; }
.prose h2 { margin: 40px 0 14px; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.chip-filters { gap: 18px; margin-bottom: 22px; }          /* ряды фильтров (жанр, исполнители) — с воздухом между ними */
.sec-head .sec-desc { margin-top: 2px; }
.found, .found-actions { margin: 4px 0 20px; }
.found-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.found-actions .found { margin: 0; }
.filter-reset { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.tc .sec-title + p { margin-top: 14px; }                   /* «Страница не найдена» */
.tc .sec-title + p + .btn-primary, .tc p + .btn-primary { margin-top: 22px; }
.silv-btns { margin-top: 36px; }
.song-card .tag + .song-title-text { margin-top: 12px; }
@media (max-width: 768px) {
  .chip-filters { gap: 20px; }
  .chips-row { gap: 10px; }
  .filters .filters-label { flex: 1 0 100%; margin-bottom: -4px; } /* «Поиск» — отдельной строкой над полем */
  .filters .play-opts { flex: 1 0 100%; padding: 4px 0; } /* «Случайный порядок» и «Играть подряд» — отдельной строкой под поиском */
  .silv-btns > a { flex: 1 1 100%; }                      /* кнопки внизу биографии — одна под другой */
  .prose h2 { margin-top: 34px; }
}

/* Заявка на книгу: удобное заполнение на телефоне, включая длинные названия. */
.book-request-page .contact-grid > *,
.book-request-page .contact-form fieldset,
.book-request-page .contact-form .form-row > * { min-width: 0; min-inline-size: 0; }
.book-request-page .contact-intro,
.book-request-page .contact-card { overflow-wrap: anywhere; }
.book-request-page .contact-form .dd { margin-top: 6px; }
.book-request-page .dd-val { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.book-request-extra { border-top: 1px solid rgba(201, 163, 71, .15); padding-top: 6px; }
.book-request-extra summary { min-height: 44px; padding: 10px 0; color: var(--muted); font-size: 14px; cursor: pointer; }
.book-request-extra[open] summary { margin-bottom: 4px; }
@media (max-width: 1024px) {
  .book-request-page .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 640px; }
  .book-request-page .contact-photo { display: none; }
}
@media (max-width: 768px) {
  .book-request-page { padding: 22px 12px 36px; }
  .book-request-page .sec-title { font-size: clamp(25px, 7vw, 32px); line-height: 1.2; }
  .book-request-page .sec-head { margin-bottom: 16px; }
  .book-request-page .contact-notes { margin-bottom: 0; }
  .book-request-page .contact-card { padding: 20px 16px; border-radius: 14px; }
  .book-request-page .contact-form { margin-top: 0; gap: 16px; }
  .book-request-page .contact-form fieldset { gap: 16px; }
  .book-request-page .contact-form .form-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .book-request-page .contact-form label { font-size: 14px; line-height: 1.5; }
  .book-request-page .contact-form input:not([type=checkbox]),
  .book-request-page .contact-form textarea,
  .book-request-page .dd-btn { font-size: 16px; min-height: 48px; }
  .book-request-page .contact-form textarea { min-height: 100px; }
  .book-request-page .contact-form .check { min-height: 44px; padding: 6px 0; gap: 12px; }
  .book-request-page .contact-form .check input { width: 24px; height: 24px; margin-top: 0; }
  .book-request-page .contact-form .btn-primary { width: 100%; min-height: 50px; justify-content: center; margin-top: 0; white-space: normal; }
  .book-request-page .contact-sent { padding: 12px 0; }
  .book-request-page .contact-sent .hero-btns { flex-direction: column; align-items: stretch; }
}

.hero-stats { flex-wrap: wrap; }
.book-offer { display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: start; gap: 18px; padding: 16px; border: 1px solid rgba(201, 163, 71, .25); border-radius: 12px; }
.book-offer[hidden], .contact-form [data-book-request-submit][hidden] { display: none; }
.book-offer img { width: 100%; max-height: 160px; object-fit: contain; border-radius: 6px; }
.book-offer h2 { font: 600 20px/1.35 var(--serif); color: var(--gold-light); margin-bottom: 10px; }
.book-offer-price { margin-bottom: 6px; }
@media (max-width: 480px) {
  .book-offer { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .book-offer h2 { font-size: 18px; }
  .hero-stats > div { min-width: 0; max-width: 180px; }
}

/* Любимые песни: сердечко отделено от публичных лайков. */
.favorite-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; padding: 10px; border: 1px solid rgba(201, 163, 71, .3); border-radius: 50%; color: var(--gold-light); background: transparent; cursor: pointer; }
.favorite-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.favorite-btn[aria-pressed="true"] svg { fill: currentColor; }
.favorite-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.favorite-btn[hidden], [data-favorites-list][hidden], [data-favorites-controls][hidden], [data-favorites-empty][hidden], [data-favorites-list] .song-card[hidden] { display: none; }
.favorites-link { margin: 0 0 20px; }
.favorites-link-heart { width: 18px; height: 18px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
.favorites-link-count { min-width: 26px; padding: 2px 7px; border-radius: 20px; background: rgba(201,163,71,.18); text-align: center; font-variant-numeric: tabular-nums; }
.favorites-controls { margin: 0; flex-wrap: wrap; }
.favorites-artist { flex: 1 1 100%; display: grid; gap: 6px; }
.favorites-artist[hidden] { display: none; }
.card-actions { flex-wrap: wrap; }
@media (max-width: 480px) { .mini-player .favorite-btn { width: 40px; height: 40px; padding: 9px; } }

.favorite-with-caption { width: auto; gap: 7px; border-radius: 100px; font: 600 13px var(--sans); }
.favorite-caption { white-space: nowrap; }

/* Режимы: одинаковые кнопки в одном ряду, включая узкий экран телефона. */
.play-mode-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(460px, 100%); min-width: 0; }
.play-mode-buttons .btn-secondary { width: 100%; min-width: 0; min-height: 52px; height: 100%; margin: 0; padding: 8px 10px; font-size: 13px; line-height: 1.35; white-space: normal; justify-content: center; text-align: center; }
.play-mode-buttons .ic { flex: none; }
.play-mode-buttons [data-shuffle][aria-pressed="true"] { border-color: var(--gold); color: var(--dark); background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
@media (max-width: 768px) { .play-mode-buttons { width: 100%; } }

.play-mode-buttons .btn-secondary:hover { transform: none; }

[data-live-results][aria-busy="true"] { opacity: .65; transition: opacity .15s; }

.reader-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 24px 0 18px; }
.reader-controls button { min-height: 44px; }
.reader-controls button:disabled { opacity: .4; cursor: default; }
.reader-controls button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-light); }
.reader-viewport { overflow: auto; max-width: 100%; background: var(--card); border: 1px solid rgba(201,163,71,.25); border-radius: 14px; }
.reader-page { display: block; width: 100%; max-width: 1400px; height: auto; margin: 0 auto; background: white; }
@media (max-width: 600px) {
  .book-reader-page { padding-inline: 4px; }
  .book-reader:not(.reader-fullscreen) > :not(.reader-viewport) { margin-inline: 12px; }
  .book-reader:not(.reader-fullscreen) .reader-viewport { border-radius: 4px; }
}
.reader-enlarged .reader-page { width: calc(100% * var(--reader-scale)); max-width: none; }
@media (max-width: 600px) { .reader-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; } .reader-controls [data-reader-count] { grid-column: 1 / -1; grid-row: 1; text-align: center; } .reader-controls button { white-space: normal; padding: 10px; } }

.reader-viewport { touch-action: pan-y; }
.reader-enlarged .reader-viewport { max-height: 85vh; max-height: 85dvh; touch-action: pan-x pan-y; }
.reader-finished { text-align: center; padding: 24px 12px; }
.reader-preview-info { margin-top: 14px; text-align: center; color: var(--muted); font-size: 14px; }
.reader-preview-info strong { display: block; color: var(--gold-light); margin-bottom: 4px; }
.reader-preview:not(.reader-fullscreen) [data-reader-count],
.reader-fullscreen .reader-preview-info { display: none; }
.reader-book-total { display: none; }
.reader-fullscreen .reader-book-total { display: block; grid-column: 1 / -1; grid-row: 4; text-align: center; color: var(--muted); font-size: 12px; }
.reader-finished p { margin-bottom: 16px; }
.reader-fullscreen-open { overflow: hidden; }
/* Полный экран занимает сама страница; навигация остаётся компактной. */
.book-reader.reader-fullscreen { position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column; width: 100%; max-width: none; height: 100vh; height: 100dvh; margin: 0; padding: 0; overflow: hidden; background: var(--dark); box-sizing: border-box; }
.reader-fullscreen > .back-link, .reader-fullscreen > .item-title, .reader-fullscreen > p.muted { display: none; }
.reader-fullscreen .reader-viewport { order: 1; flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; }
.reader-fullscreen .reader-page { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; margin: 0; }
.reader-fullscreen .reader-controls { order: 2; display: flex; flex: none; flex-wrap: nowrap; gap: 8px; margin: 0; padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 1px solid rgba(201,163,71,.25); background: var(--dark); }
.reader-fullscreen .reader-controls button { flex: none; width: 44px; min-height: 44px; height: 44px; padding: 0; font-size: 0; }
.reader-fullscreen [data-reader-count] { order: 1; flex: 1; min-width: 0; text-align: center; font-size: 14px; }
.reader-fullscreen [data-reader-prev] { order: 0; }
.reader-fullscreen [data-reader-next] { order: 2; }
.reader-fullscreen .reader-controls [data-reader-large]:not([hidden]) { order: 3; width: auto; padding-inline: 8px; font-size: 13px; }
.reader-controls [data-reader-large][hidden] { display: none; }
.reader-fullscreen [data-reader-prev]::before { content: '‹'; font-size: 30px; }
.reader-fullscreen [data-reader-next]::before { content: '›'; font-size: 30px; }
.reader-fullscreen .reader-controls [data-reader-fullscreen] { position: absolute; z-index: 3; top: max(8px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); background: var(--dark); border-color: var(--gold); box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.reader-fullscreen [data-reader-fullscreen]::before { content: '×'; font-size: 28px; }
.reader-fullscreen .reader-finished { order: 3; flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; padding: 8px; }
.reader-fullscreen .reader-finished p { margin: 0; font-size: 14px; }
.reader-fullscreen .reader-finished .btn-primary { padding: 8px 12px; font-size: 14px; }
.reader-fullscreen [data-reader-error] { order: 4; flex: none; padding: 8px; }
.reader-fullscreen.reader-enlarged .reader-viewport { display: block; max-height: none; }
.reader-fullscreen.reader-enlarged .reader-page { width: calc(100% * var(--reader-scale)); height: calc(100% * var(--reader-scale)); }

.genre-icon-image { object-fit: contain; flex-shrink: 0; }

.contest-preview { grid-template-columns: minmax(0, 1fr); background: radial-gradient(ellipse at bottom left, #35152f, var(--dark2) 75%); }
.contest-preview .promo-text { max-width: 760px; margin-inline: auto; text-align: center; }
.contest-preview .hero-badge { white-space: normal; }
.contest-preview .promo-text p + p { margin-top: 16px; }
.contest-preview-notice { margin-top: 28px; padding: 16px 18px; border-left: 2px solid var(--gold); border-radius: 0 10px 10px 0; background: var(--card); color: var(--gold-light); }
.contest-preview .promo-text ul { padding-inline-start: 22px; text-align: start; }
.contest-preview-notice ul, .contest-preview-features li ul { padding-inline-start: 22px; }

.contest-preview-features { list-style: none; display: grid; gap: 20px; margin-top: 28px; }
.contest-preview-features li { display: flex; align-items: flex-start; gap: 14px; }
.contest-feature-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border: 1px solid var(--gold-dark); border-radius: 50%; color: var(--gold-light); }
.contest-preview-features h3 { font: 600 16px/1.4 var(--sans); color: var(--cream); margin-bottom: 4px; }
.contest-preview-features p { color: var(--muted); }
.contest-contacts { margin-top: 28px; padding: clamp(16px, 4vw, 28px); border: 1px solid rgba(201, 163, 71, .3); border-radius: 16px; background: var(--card); }
.contest-contacts summary { position: relative; display: block; padding-inline: 24px; text-align: center; cursor: pointer; font: 600 clamp(22px, 4vw, 28px)/1.25 var(--serif); color: var(--gold-light); }
.contest-contacts summary::-webkit-details-marker { display: none; }
.contest-question-mark { position: absolute; inset-inline-start: 2px; top: 50%; transform: translateY(-50%); color: #ff6b6b; }
.contest-contacts[open] summary { margin-bottom: 16px; }
.contest-contact-links { display: flex; flex-wrap: wrap; gap: 10px; }
.contest-contact-links + .contest-contact-links { margin-top: 10px; }
.contest-contact-links a { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.contest-contact-links .ic { flex-shrink: 0; }
.contest-messenger { display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; color: #fff; }
.contest-messenger--vk { background: #0077ff; }
.contest-messenger--telegram { background: #229ed9; }
.contest-messenger--max { background: linear-gradient(135deg, #00aaff, #6b35ee); }
.contest-messenger--whatsapp { background: #168b43; }
.contest-messenger svg.ic { width: 26px; height: 26px; }
.contest-messenger--vk svg.ic, .contest-messenger--telegram svg.ic { fill: currentColor; stroke-width: 1; }
a.contest-messenger:hover { color: #fff; filter: brightness(1.15); }
.contest-messenger:disabled { cursor: default; }

.mp-queue-list { list-style: none; display: grid; gap: 6px; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; }
.mp-queue-list button { width: 100%; min-height: 44px; padding: 8px 12px; text-align: start; border: 1px solid rgba(201, 163, 71, .3); border-radius: 8px; background: var(--card2); color: var(--text); font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.mp-queue-list button[aria-current="true"] { border-color: var(--gold); color: var(--gold-light); font-weight: 600; }
.mp-queue-list [data-queue-previous] { color: var(--muted); }
@media (max-width: 600px) {
  .mini-player { flex-wrap: wrap; justify-content: space-between; gap: 6px; }
  .mp-info { order: -1; flex-basis: 100%; margin-bottom: 6px; }
  body.has-mini { padding-bottom: 120px; }
  body.has-mini .toast { bottom: 130px; }
}
.reader-text { display:none; white-space:pre-wrap; overflow-wrap:anywhere; text-align:left; padding:24px; font:400 var(--reader-text-size,24px)/var(--reader-text-spacing,1.8) Georgia,serif; color:#241e18; background:#f3eddf; min-height:100%; }
.reader-text-mode .reader-text { display:block; }
.reader-text-mode .reader-page { display:none; }
.reader-text-mode .reader-viewport { display:block; overflow:hidden; touch-action:pan-y; background:#f3eddf; }
.reader-text-mode:not(.reader-fullscreen) .reader-viewport { height: min(720px, 68vh); height: min(720px, 68svh); }
.reader-text-mode .reader-text { font-size:var(--reader-text-size,16px); line-height:var(--reader-text-spacing,1.5); }
.reader-text .reader-poem-title { font-weight:700; color:#392b18; }
.reader-text .reader-poem-number { font-weight:700; color:#71521e; }
.reader-text-mode [data-reader-large] { display:none; }
.reader-controls [data-reader-text-settings] { display:flex; align-items:center; gap:8px; }
.reader-controls [data-reader-text-settings][hidden] { display:none; }
.reader-text { box-sizing:border-box; width:100%; margin:0; }
.reader-fullscreen.reader-text-mode .reader-text { padding: max(64px, calc(env(safe-area-inset-top) + 56px)) 24px 32px; }
.reader-controls [data-reader-text-settings] { min-width:0; flex-direction:column; align-items:stretch; gap:6px; font-size:13px; color:var(--gold-light); }
.reader-controls [data-reader-text-settings] select { width:100%; min-width:0; min-height:44px; padding:8px 12px; border:1px solid rgba(201,163,71,.4); border-radius:10px; background:var(--card); color:var(--text); font:inherit; font-size:16px; color-scheme:dark; }
.reader-fullscreen .reader-controls { display:grid; grid-template-columns:44px minmax(0,1fr) minmax(0,1fr) 44px; gap:8px; }
.reader-fullscreen .reader-controls [data-reader-text-toggle] { grid-column:2 / 4; grid-row:1; width:100%; height:auto; min-height:44px; font-size:14px; padding:8px; }
.reader-fullscreen .reader-controls [data-reader-prev] { grid-column:1; grid-row:1; }
.reader-fullscreen .reader-controls [data-reader-next] { grid-column:4; grid-row:1; }
.reader-fullscreen .reader-controls [data-reader-count] { grid-column:1 / -1; grid-row:3; font-size:12px; }
.reader-fullscreen .reader-controls [data-reader-text-settings] { grid-row:2; }
.reader-fullscreen .reader-controls [data-reader-text-settings]:nth-of-type(1) { grid-column:1 / 3; }
.reader-fullscreen .reader-controls [data-reader-text-settings]:nth-of-type(2) { grid-column:3 / 5; }
.reader-fullscreen .reader-controls [data-reader-large]:not([hidden]) { grid-column:1 / -1; grid-row:2; }
.reader-fullscreen.reader-text-mode .reader-controls [data-reader-large] { display:none; }

.songs-intro { color: var(--muted); line-height: 1.7; }
