/* ===== ПЕРЕМЕННЫЕ ТЕМ ===== */
:root[data-theme="dark"] {
    --bg: #0c0b0a;
    --bg-soft: #121110;
    --bg-card: #161514;
    --text: #ece7e1;
    --text-muted: #8c857d;
    --border: #232120;
    --border-hover: #3a3532;
    --accent: #b3453f;
    --accent-soft: rgba(179, 69, 63, 0.12);
}

:root[data-theme="light"] {
    --bg: #f6f2ea;
    --bg-soft: #fdfaf5;
    --bg-card: #ffffff;
    --text: #1a1614;
    --text-muted: #6b625b;
    --border: #e3ddd3;
    --border-hover: #c9c0b3;
    --accent: #8f2f2a;
    --accent-soft: rgba(143, 47, 42, 0.08);
}

/* ===== БАЗА ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.35s ease, color 0.35s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.01em;
    font-weight: 600;
}

img, svg, iframe { max-width: 100%; }
button { font-family: inherit; }

img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.logo-mark,
.logo-mark svg { pointer-events: none; }

.video-poster-img { pointer-events: none; }

input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* ===== ВЕРХНИЕ КНОПКИ ===== */
.top-controls {
    position: fixed;
    top: calc(26px + env(safe-area-inset-top, 0px));
    right: calc(26px + env(safe-area-inset-right, 0px));
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.lang-toggle,
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.lang-toggle:hover,
.theme-toggle:hover {
    border-color: var(--border-hover);
    color: var(--accent);
    transform: scale(1.06);
}

.lang-toggle:focus-visible,
.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.lang-toggle {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.lang-current { display: block; line-height: 1; }

.theme-toggle svg {
    width: 18px;
    height: 18px;
    position: absolute;
    transition: opacity 0.35s ease, transform 0.45s ease;
}
:root[data-theme="dark"] .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
:root[data-theme="dark"] .icon-sun  { opacity: 0; transform: rotate(-45deg) scale(0.7); }
:root[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(45deg) scale(0.7); }
:root[data-theme="light"] .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }

/* ===== ЯКОРЬ ВВЕРХ/ВНИЗ ===== */
.scroll-anchor {
    position: fixed;
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
    right: calc(26px + env(safe-area-inset-right, 0px));
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease,
                border-color 0.3s ease, color 0.3s ease, visibility 0.3s ease,
                box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.scroll-anchor.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-anchor:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.scroll-anchor:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.scroll-anchor svg { width: 20px; height: 20px; transition: transform 0.4s ease; }
.scroll-anchor.point-down svg { transform: rotate(180deg); }

/* ===== ШАПКА ===== */
.hero {
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 24px 70px;
}
.hero-content { max-width: 620px; animation: fadeUp 0.9s ease both; }
.logo-mark { width: 92px; height: 92px; margin: 0 auto 40px; color: var(--text); opacity: 0.9; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.eyebrow {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.24em; color: var(--accent); margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1.05;
    margin-bottom: 26px; font-style: italic; font-weight: 600;
    text-wrap: balance; overflow-wrap: anywhere;
}
.tagline {
    color: var(--text-muted); font-size: 1rem; max-width: 460px;
    margin: 0 auto; line-height: 1.8; text-wrap: balance;
}
.hero-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding: 10px 22px;
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px dashed var(--border-hover);
    border-radius: 50px;
    transition: border-color 0.3s ease, color 0.3s ease, border-style 0.3s ease,
                background 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
}
.hero-guide-link:hover {
    border-color: var(--accent);
    border-style: solid;
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
}
.hero-guide-link:active { transform: translateY(0) scale(0.97); }
.hero-guide-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero-guide-link svg { width: 16px; height: 16px; flex-shrink: 0; pointer-events: none; }

/* ===== ЦИТАТА ДНЯ ===== */
.quote-section { max-width: 720px; margin: 0 auto 90px; padding: 0 24px; }
.quote-card {
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--bg-card); padding: 44px 40px; text-align: center;
    transition: border-color 0.35s ease, background 0.35s ease,
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease;
}
.quote-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}
.quote-label {
    display: block; font-size: 0.68rem; letter-spacing: 0.24em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
}
.quote-card blockquote {
    font-family: 'Playfair Display', Georgia, serif; font-style: italic;
    font-weight: 500; font-size: clamp(1.05rem, 3.6vw, 1.35rem);
    line-height: 1.6; color: var(--text); margin: 0 0 20px; text-wrap: balance;
}
.quote-card cite {
    display: block; font-style: normal; font-size: 0.82rem;
    letter-spacing: 0.06em; color: var(--text-muted);
}
.quote-actions {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; margin-top: 24px; padding-top: 20px;
    border-top: 1px solid var(--border);
}
.quote-action {
    display: inline-flex; align-items: center; gap: 7px;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); font-family: inherit; font-size: 0.78rem;
    letter-spacing: 0.04em; padding: 7px 14px; border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease,
                transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
}
.quote-action:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.quote-action:active { transform: scale(0.96); }
.quote-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quote-action svg { width: 13px; height: 13px; flex-shrink: 0; pointer-events: none; }

.quote-card.quote-swap blockquote,
.quote-card.quote-swap cite {
    animation: quoteSwap 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes quoteSwap {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== ССЫЛКИ ===== */
.links {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px; padding: 0 24px 100px; max-width: 880px; margin: 0 auto;
}
.link-card {
    display: flex; align-items: center; gap: 14px; padding: 20px 24px;
    border-radius: 6px; text-decoration: none; color: var(--text);
    font-weight: 500; font-size: 0.95rem; background: var(--bg-card);
    border: 1px solid var(--border);
    transition: border-color 0.3s ease, background 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.link-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-soft);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.link-icon { font-size: 1rem; color: var(--accent); width: 20px; text-align: center; flex-shrink: 0; }
.link-name { flex: 1; }
.link-arrow {
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 0.9rem; flex-shrink: 0;
}
.link-card:hover .link-arrow { transform: translateX(3px); color: var(--accent); }

/* ===== ЗАГОЛОВКИ ===== */
.section-head {
    display: flex; align-items: baseline; gap: 24px; margin-bottom: 36px;
}
.section-head h2 {
    font-size: clamp(1.35rem, 4vw, 1.95rem); font-style: italic;
    white-space: nowrap; font-weight: 600; text-wrap: balance;
}
.section-line {
    flex: 1; height: 1px; background: var(--border); transform: translateY(-6px);
}

/* ===== НОВИНКИ ===== */
.news { padding: 40px 24px 80px; max-width: 780px; margin: 0 auto; }
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-item {
    padding: 26px 28px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 6px;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: newsIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: border-color 0.3s ease, background 0.3s ease,
                transform 0.3s ease, box-shadow 0.3s ease;
}
.news-item:nth-child(1) { animation-delay: 0.05s; }
.news-item:nth-child(2) { animation-delay: 0.12s; }
.news-item:nth-child(3) { animation-delay: 0.19s; }
.news-item:nth-child(4) { animation-delay: 0.26s; }
@keyframes newsIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.news-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-soft);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.news-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.news-tag {
    display: inline-block; padding: 3px 10px; border-radius: 3px;
    font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.12em; background: var(--accent-soft); color: var(--accent);
}
.news-date { color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.02em; }
.news-item h3 { font-size: 1.12rem; margin-bottom: 8px; font-weight: 600; text-wrap: balance; }
.news-item p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 16px; }
.news-link {
    color: var(--accent); text-decoration: none; font-weight: 500;
    font-size: 0.88rem; transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.news-link:hover { opacity: 0.7; }

/* ===== ВИДЕО ===== */
.top-videos { padding: 40px 24px 90px; max-width: 1280px; margin: 0 auto; }
.video-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}
.video-card {
    border-radius: 6px; overflow: hidden; background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex; flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    animation: videoCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: border-color 0.35s ease,
                transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease;
}
.video-card:nth-child(1) { animation-delay: 0.05s; }
.video-card:nth-child(2) { animation-delay: 0.12s; }
.video-card:nth-child(3) { animation-delay: 0.19s; }
.video-card:nth-child(4) { animation-delay: 0.26s; }
.video-card:nth-child(5) { animation-delay: 0.33s; }
@keyframes videoCardIn {
    to { opacity: 1; transform: translateY(0); }
}
.video-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.video-footer {
    display: flex;
    align-items: stretch;
    border-top: 1px solid var(--border);
}

.video-link {
    display: block;
    flex: 1;
    text-align: center; padding: 14px;
    color: var(--text-muted); text-decoration: none; font-weight: 500;
    font-size: 0.85rem; letter-spacing: 0.02em;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.video-link:hover { color: var(--accent); background: var(--bg-soft); }

.video-frame {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    background: var(--bg-soft); overflow: hidden;
}
.video-frame iframe {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: 0; display: block; transition: opacity 0.4s ease;
}
.video-frame.is-loading::after {
    content: ""; position: absolute; inset: 0;
    background: var(--bg-soft); opacity: 0.6;
    pointer-events: none; transition: opacity 0.4s ease; z-index: 1;
}
.video-frame.is-failed.is-loading::after { opacity: 0; }
.video-frame.is-failed iframe { opacity: 0; pointer-events: none; }
.video-fallback {
    position: absolute; inset: 0; display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; text-align: center; padding: 20px;
    background: var(--bg-card); opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease; z-index: 2;
}
.video-frame.is-failed .video-fallback { opacity: 1; visibility: visible; }
.blood-print {
    width: 78px; height: 78px; margin-bottom: 8px;
    animation: printIn 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    filter: drop-shadow(0 4px 12px rgba(90, 24, 21, 0.4));
}
.blood-print svg { width: 100%; height: 100%; display: block; }
@keyframes printIn {
    0%   { transform: scale(1.35); opacity: 0; }
    60%  { transform: scale(0.96); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.fallback-title {
    font-family: 'Playfair Display', Georgia, serif; font-style: italic;
    font-weight: 600; font-size: 1.05rem; color: var(--text); margin: 0;
}
.fallback-text {
    font-size: 0.82rem; line-height: 1.55; color: var(--text-muted);
    max-width: 260px; margin: 0;
}
.retry-btn {
    margin-top: 6px; background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); font-family: inherit; font-size: 0.78rem;
    letter-spacing: 0.08em; text-transform: uppercase;
    padding: 7px 16px; border-radius: 4px; cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.retry-btn:hover { border-color: var(--accent); color: var(--accent); }
.retry-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.video-poster {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: 0; padding: 0; background: #000; cursor: pointer;
    display: block; overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.4s ease;
}
.video-poster-img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: brightness(0.75) saturate(0.9);
}
.video-poster:hover .video-poster-img { transform: scale(1.04); filter: brightness(0.9) saturate(1); }
.video-poster:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.video-play {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 62px; height: 62px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff; display: flex; align-items: center; justify-content: center;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    pointer-events: none;
}
.video-play svg { width: 26px; height: 26px; margin-left: 3px; }
.video-poster:hover .video-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: var(--accent); border-color: var(--accent); color: #fff;
}
.video-frame.is-loading .video-poster { opacity: 0.25; pointer-events: none; }
.video-frame.is-loading .video-play { display: none; }

/* ===== ПОДВАЛ ===== */
footer {
    text-align: center; padding: 70px 24px 60px;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    color: var(--text-muted); border-top: 1px solid var(--border);
    font-size: 0.88rem;
}
.footer-name {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-weight: 600; font-size: 1.25rem; color: var(--text); margin-bottom: 18px;
}
footer a {
    color: var(--text); text-decoration: none; font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}
footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.copyright {
    margin-top: 18px; font-size: 0.72rem; letter-spacing: 0.1em;
    text-transform: uppercase; opacity: 0.45;
}
.footer-links {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-top: 8px; font-size: 0.85rem; flex-wrap: wrap;
}
.footer-link {
    background: none; border: none; color: var(--text-muted);
    font-family: inherit; font-size: 0.85rem; cursor: pointer;
    padding: 0; border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}
.footer-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.footer-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.footer-sep { color: var(--border-hover); }
.footer-age { color: var(--text-muted); font-size: 0.85rem; }

/* ===== МОДАЛЬНОЕ ОКНО ПРАВОВОЙ ===== */
.legal-modal {
    border: none; border-radius: 0; background: transparent;
    color: var(--text); padding: 0; max-width: 640px; width: 92vw;
    max-height: 88vh; max-height: 88dvh; overflow: visible;
    box-shadow: none; margin: auto; position: fixed; inset: 0;
}
.legal-modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: backdropIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes backdropIn {
    from { opacity: 0; backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); }
    to   { opacity: 1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
.modal-content {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; max-height: 88vh; max-height: 88dvh;
    overflow-y: auto; overscroll-behavior: contain; position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    animation: modalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes modalIn {
    0%   { opacity: 0; transform: translateY(20px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalOut {
    0%   { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(8px) scale(0.985); }
}
@keyframes backdropOut {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
.legal-modal.is-closing::backdrop { animation: backdropOut 0.25s ease forwards; }
.modal-content.is-closing { animation: modalOut 0.28s cubic-bezier(0.32, 0, 0.67, 0) forwards; }

.modal-close {
    position: absolute; top: 20px; right: 20px; z-index: 10;
    background: var(--bg-soft); border: 1px solid var(--border);
    border-radius: 50%; width: 38px; height: 38px;
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal-close svg { width: 16px; height: 16px; pointer-events: none; }
.modal-close:hover { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); background: var(--bg-card); }
.modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-header {
    padding: 56px 44px 36px; text-align: center;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-card) 100%);
    position: relative; overflow: hidden;
    border-radius: 16px 16px 0 0;
}
.modal-header::before {
    content: ''; position: absolute; top: -60px; left: 50%;
    transform: translateX(-50%); width: 240px; height: 240px;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    pointer-events: none;
}
.modal-badge {
    display: inline-block; padding: 6px 18px; border-radius: 50px;
    border: 1px solid var(--accent); color: var(--accent);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em;
    margin-bottom: 22px; position: relative; z-index: 1;
}
.modal-header h2 {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-weight: 600; font-size: clamp(1.3rem, 5vw, 1.9rem);
    margin-bottom: 10px; color: var(--text); position: relative;
    z-index: 1; text-wrap: balance;
}
.modal-subtitle {
    color: var(--text-muted); font-size: 0.85rem;
    letter-spacing: 0.04em; position: relative; z-index: 1;
}
.modal-text { padding: 40px 44px 48px; }
.modal-block {
    display: flex; gap: 20px; padding-bottom: 28px;
    margin-bottom: 28px; border-bottom: 1px solid var(--border);
    opacity: 0; animation: blockIn 0.5s ease both;
}
.modal-block:nth-child(1) { animation-delay: 0.15s; }
.modal-block:nth-child(2) { animation-delay: 0.22s; }
.modal-block:nth-child(3) { animation-delay: 0.29s; }
.modal-block:nth-child(4) { animation-delay: 0.36s; }
.modal-block:nth-child(5) { animation-delay: 0.43s; }
.modal-block:nth-child(6) { animation-delay: 0.50s; }
.modal-block:nth-child(7) { animation-delay: 0.57s; }
.modal-block:nth-child(8) { animation-delay: 0.64s; }
.modal-block:nth-child(9) { animation-delay: 0.71s; }
.modal-block:nth-child(10) { animation-delay: 0.78s; }
@keyframes blockIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.modal-block-last { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.modal-num {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-weight: 600; font-size: 1.1rem; color: var(--accent);
    opacity: 0.6; flex-shrink: 0; width: 32px; padding-top: 2px;
}
.modal-block-content { flex: 1; min-width: 0; }
.modal-block-content h3 {
    font-family: 'Playfair Display', serif; font-style: italic;
    font-weight: 600; font-size: 1.1rem; color: var(--text);
    margin-bottom: 8px; text-wrap: balance;
}
.modal-block-content p {
    color: var(--text-muted); font-size: 0.9rem;
    line-height: 1.75; margin: 0;
}
.modal-block-content p + p { margin-top: 10px; }
.modal-block-content strong { color: var(--text); font-weight: 600; }
.modal-block-content a {
    color: var(--accent); text-decoration: none; font-weight: 500;
    border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.modal-block-content a:hover { border-bottom-color: var(--accent); }
.modal-list { list-style: none; padding: 0; margin: 10px 0 12px; }
.modal-list li {
    position: relative; padding-left: 18px; color: var(--text-muted);
    font-size: 0.9rem; line-height: 1.7;
}
.modal-list li::before {
    content: ""; position: absolute; left: 0; top: 0.7em;
    width: 6px; height: 1px; background: var(--accent); opacity: 0.7;
}
.modal-meta {
    margin-top: 12px !important; font-size: 0.78rem !important;
    letter-spacing: 0.06em; color: var(--text-muted); opacity: 0.65;
}

/* ===== ПОЛОСА ПРОГРЕССА ===== */
.progress-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: 2px;
    background: var(--accent); transform: scaleX(0);
    transform-origin: 0 50%; z-index: 1100; pointer-events: none;
    transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== ТОСТ ===== */
.toast {
    position: fixed; left: 50%;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 20px);
    background: var(--bg-card);
    border: 1px solid var(--border-hover); color: var(--text);
    font-size: 0.85rem; font-weight: 500; padding: 12px 22px;
    border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0.4s ease;
    z-index: 1300; max-width: calc(100vw - 40px); text-align: center;
    pointer-events: none;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }

/* ===== REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }

/* ===== NOSCRIPT ===== */
.noscript-banner {
    background: var(--accent); color: #fff; text-align: center;
    padding: 12px 20px; font-size: 0.88rem; font-weight: 500; line-height: 1.5;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== ФОКУС ===== */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
a, button, .link-card, .video-link, .news-link {
    -webkit-tap-highlight-color: transparent;
}

/* ===== БУРГЕР-МЕНЮ ===== */
body.menu-open { overflow: hidden; }

.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    display: flex; align-items: center; justify-content: flex-start;
    padding: 18px 26px;
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    padding-left: calc(26px + env(safe-area-inset-left, 0px));
    pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.burger {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg-card);
    color: var(--text); cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 5px; padding: 0;
    transition: border-color 0.3s ease, color 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.burger:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.06); }
.burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.burger span {
    display: block; width: 18px; height: 2px;
    background: currentColor; border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.25s ease;
}
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1150; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.menu-open .menu-overlay { opacity: 1; visibility: visible; }

.side-menu {
    position: fixed; top: 0; left: 0;
    width: min(440px, 92vw);
    height: 100vh; height: 100dvh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    z-index: 1200; transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
    touch-action: pan-y;
}
body.menu-open .side-menu { transform: translateX(0); }

.menu-header {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}

.menu-back {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg-soft);
    color: var(--text-muted); cursor: pointer;
    display: none; align-items: center; justify-content: center;
    padding: 0; flex-shrink: 0;
    transition: color 0.2s, border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.menu-back.visible { display: flex; }
.menu-back:hover { color: var(--accent); border-color: var(--accent); }
.menu-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-back svg { width: 14px; height: 14px; pointer-events: none; }

.menu-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic; font-weight: 600; font-size: 1.15rem; flex: 1;
}

.menu-close {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg-soft);
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; flex-shrink: 0;
    transition: color 0.2s, border-color 0.2s, transform 0.25s;
    -webkit-tap-highlight-color: transparent;
}
.menu-close:hover { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); }
.menu-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-close svg { width: 14px; height: 14px; pointer-events: none; }

.menu-body {
    flex: 1; overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 0 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.menu-body::-webkit-scrollbar { width: 6px; }
.menu-body::-webkit-scrollbar-track { background: transparent; }
.menu-body::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

.menu-group {
    border-bottom: 1px solid var(--border);
    position: relative; transition: background 0.25s ease;
}
.menu-group:last-child { border-bottom: none; }

.menu-group.open { background: var(--accent-soft); }
.menu-group.open::before {
    content: ''; position: absolute;
    left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent);
}

.menu-group-head {
    width: 100%; display: flex; align-items: center; gap: 14px;
    padding: 18px 24px; background: none; border: none;
    color: var(--text); font-family: inherit; font-size: 0.95rem;
    font-weight: 500; cursor: pointer; text-align: left;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.menu-group-head:hover { background: var(--bg-soft); }
.menu-group-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.menu-group-icon {
    width: 26px; height: 26px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); position: relative; overflow: hidden;
}
.menu-group-icon svg { width: 100%; height: 100%; display: block; pointer-events: none; }

.menu-group-head:hover .menu-group-icon::after {
    content: ''; position: absolute;
    top: -50%; left: -120%; width: 60%; height: 200%;
    background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.7) 50%, transparent 100%);
    animation: shine 0.75s ease; pointer-events: none;
}
@keyframes shine {
    from { left: -120%; }
    to   { left: 130%; }
}

.menu-group-label { flex: 1; }

.menu-group-chevron {
    width: 14px; height: 14px; color: var(--text-muted);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
    flex-shrink: 0;
}
.menu-group.open .menu-group-chevron { transform: rotate(90deg); }

.menu-group-panel {
    max-height: 0; overflow: hidden;
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease;
    background: var(--bg-soft);
    opacity: 0.4;
}
.menu-group.open .menu-group-panel {
    max-height: 100000px;
    opacity: 1;
}

.menu-group-panel > * { opacity: 0; transform: translateY(8px); }
.menu-group.open .menu-group-panel > * { animation: cascadeIn 0.4s ease forwards; }
.menu-group.open .menu-group-panel > *:nth-child(1) { animation-delay: 0.05s; }
.menu-group.open .menu-group-panel > *:nth-child(2) { animation-delay: 0.10s; }

.menu-group.open .track-list li,
.menu-group.open .anime-list li {
    opacity: 0;
    animation: cascadeIn 0.4s ease forwards;
}
.menu-group.open .track-list li:nth-child(1),
.menu-group.open .anime-list li:nth-child(1) { animation-delay: 0.15s; }
.menu-group.open .track-list li:nth-child(2),
.menu-group.open .anime-list li:nth-child(2) { animation-delay: 0.20s; }
.menu-group.open .track-list li:nth-child(3),
.menu-group.open .anime-list li:nth-child(3) { animation-delay: 0.25s; }
.menu-group.open .track-list li:nth-child(4),
.menu-group.open .anime-list li:nth-child(4) { animation-delay: 0.30s; }

@keyframes cascadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.menu-thanks {
    padding: 14px 24px 10px 60px;
    margin: 12px 24px 8px 24px;
    font-size: 0.78rem; font-style: italic;
    color: var(--text-muted); line-height: 1.55;
    border-left: 2px solid var(--accent);
}

/* ===== ПОИСК В МЕНЮ ===== */
.menu-search {
    position: relative;
    margin: 4px 16px 10px;
    display: flex;
    align-items: center;
}
.menu-search svg {
    position: absolute;
    left: 12px;
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}
.menu-search-input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.menu-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}
.menu-search-input:focus {
    border-color: var(--accent);
    background: var(--bg-soft);
}
.menu-empty {
    padding: 20px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* ===== ТРЕКИ ===== */
.track-list {
    list-style: none; padding: 4px 16px 16px;
    display: flex; flex-direction: column; gap: 8px;
}
.track-list li {
    opacity: 0;
    transform: translateX(-12px);
    animation: trackIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.track-list li:nth-child(1) { animation-delay: 0.03s; }
.track-list li:nth-child(2) { animation-delay: 0.06s; }
.track-list li:nth-child(3) { animation-delay: 0.09s; }
.track-list li:nth-child(4) { animation-delay: 0.12s; }
.track-list li:nth-child(5) { animation-delay: 0.15s; }
.track-list li:nth-child(6) { animation-delay: 0.18s; }
.track-list li:nth-child(7) { animation-delay: 0.21s; }
.track-list li:nth-child(8) { animation-delay: 0.24s; }
@keyframes trackIn {
    to { opacity: 1; transform: translateX(0); }
}
.track-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px 10px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--border); border-radius: 8px;
    text-decoration: none; color: var(--text);
    transition: background 0.3s ease, border-color 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
    position: relative;
}
.track-card:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.track-cover-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #0a0908;
    border: 1px solid var(--border);
    isolation: isolate;
    box-shadow: inset 0 0 0 1px rgba(179, 69, 63, 0.05);
}

.cover-placeholder {
    position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.cover-placeholder svg { width: 100%; height: 100%; display: block; }

.track-cover.loading ~ .cover-placeholder svg {
    animation: placeholderBreath 2.8s ease-in-out infinite;
    transform-origin: center;
}
@keyframes placeholderBreath {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.04); }
}

.track-cover {
    position: relative; z-index: 2;
    width: 100%; height: 100%; border: none; border-radius: 0;
    object-fit: cover; display: block; background: transparent;
    opacity: 0; transform: scale(1.08);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-user-drag: none; pointer-events: none;
}
.track-cover:not(.loading) { opacity: 1; transform: scale(1); }
.track-cover:not(.loading) ~ .cover-placeholder { opacity: 0; transform: scale(0.85); }
.track-card:hover .cover-placeholder { filter: brightness(1.15); }

.track-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track-name {
    font-size: 0.9rem; font-weight: 500; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer; transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.track-artist {
    font-size: 0.78rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer; transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.track-name:hover, .track-artist:hover { color: var(--accent); }
.track-name:active, .track-artist:active { opacity: 0.7; }

.track-copy {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 4px;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.track-copy:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.08);
}
.track-copy:active { transform: scale(0.95); }
.track-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.track-copy svg { width: 14px; height: 14px; display: block; pointer-events: none; }
.track-copy.copied {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.track-fav {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 4px;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.track-fav:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.08);
}
.track-fav:active { transform: scale(0.95); }
.track-fav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.track-fav.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.track-fav.active svg { fill: var(--accent); }
.track-fav svg { width: 14px; height: 14px; display: block; pointer-events: none; }

.track-play {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
    border: 1px solid var(--border); background: var(--bg-soft);
    color: var(--text); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; position: relative;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.track-play:hover { border-color: var(--accent); color: var(--accent); transform: scale(1.08); }
.track-play.playing { background: var(--accent); border-color: var(--accent); color: #fff; }
.track-play svg { width: 12px; height: 12px; display: block; position: absolute; pointer-events: none; }

.track-play .icon-play {
    opacity: 1;
    transform: translate(calc(-50% + 1px), -50%);
    top: 50%; left: 50%;
}
.track-play .icon-pause {
    opacity: 0;
    transform: translate(-50%, -50%);
    top: 50%; left: 50%;
}
.track-play.playing .icon-play  { opacity: 0; }
.track-play.playing .icon-pause { opacity: 1; }
.track-play.loading { pointer-events: none; opacity: 0.6; }

/* ===== ПРОГРЕСС-БАР В КАРТОЧКЕ ТРЕКА ===== */
.track-progress-wrap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 10px;
    cursor: pointer;
    z-index: 3;
    background: transparent;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-radius: 0 0 8px 8px;
}
.track-progress-wrap::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--border);
    border-radius: 0 0 8px 8px;
    transition: height 0.2s ease;
}
.track-progress-wrap:hover::before {
    height: 4px;
}
.track-progress-fill {
    position: absolute;
    left: 0; bottom: 0; height: 2px;
    width: 0%;
    background: var(--accent);
    border-radius: 0 0 8px 8px;
    pointer-events: none;
    transition: height 0.2s ease;
}
.track-progress-wrap:hover .track-progress-fill {
    height: 4px;
}

/* ===== АНИМЕ ===== */
.anime-list {
    list-style: none; padding: 4px 16px 16px;
    display: flex; flex-direction: column; gap: 8px;
}
.anime-list li {
    opacity: 0;
    transform: translateX(-12px);
    animation: animeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.anime-list li:nth-child(1) { animation-delay: 0.03s; }
.anime-list li:nth-child(2) { animation-delay: 0.06s; }
.anime-list li:nth-child(3) { animation-delay: 0.09s; }
.anime-list li:nth-child(4) { animation-delay: 0.12s; }
.anime-list li:nth-child(5) { animation-delay: 0.15s; }
.anime-list li:nth-child(6) { animation-delay: 0.18s; }
@keyframes animeIn {
    to { opacity: 1; transform: translateX(0); }
}
.anime-card-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 4px;
}
.anime-card-wrap .anime-card {
    flex: 1;
    min-width: 0;
}
.anime-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px 10px 10px;
    background: var(--bg-soft);
    border: 1px solid var(--border); border-radius: 8px;
    text-decoration: none; color: var(--text);
    transition: background 0.3s ease, border-color 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.anime-card:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.anime-cover-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #0a0908;
    border: 1px solid var(--border);
    isolation: isolate;
    box-shadow: inset 0 0 0 1px rgba(179, 69, 63, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.anime-icon {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    pointer-events: none;
}
.anime-card:hover .anime-cover-wrap {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(179, 69, 63, 0.25), 0 0 12px rgba(179, 69, 63, 0.15);
}
.anime-card:hover .anime-icon { transform: scale(1.06); }
.anime-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.anime-name {
    font-size: 0.9rem; font-weight: 500; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.anime-sub {
    font-size: 0.78rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.anime-fav {
    width: 38px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.anime-fav:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}
.anime-fav:active { transform: scale(0.95); }
.anime-fav.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}
.anime-fav.active svg { fill: var(--accent); }
.anime-fav svg { width: 16px; height: 16px; display: block; pointer-events: none; }

/* ===== ИЗБРАННОЕ В МЕНЮ ===== */
.menu-group[data-group="favorites"] .menu-group-icon-bookmark svg {
    width: 20px;
    height: 20px;
}
.menu-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 6px;
}

.fav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 16px 16px;
}
.fav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
    color: var(--text);
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    animation: favItemIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: background 0.3s ease, border-color 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.fav-item:nth-child(1) { animation-delay: 0.04s; }
.fav-item:nth-child(2) { animation-delay: 0.08s; }
.fav-item:nth-child(3) { animation-delay: 0.12s; }
.fav-item:nth-child(4) { animation-delay: 0.16s; }
@keyframes favItemIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.fav-item:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    transform: translateY(-2px) translateX(2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.fav-item-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fav-item-icon svg { width: 16px; height: 16px; display: block; pointer-events: none; }
.fav-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fav-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fav-item-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.fav-item-remove {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease, border-color 0.2s ease,
                transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
}
.fav-item-remove:hover { color: var(--accent); border-color: var(--accent); }
.fav-item-remove:active { transform: scale(0.9); }
.fav-item-remove svg { width: 11px; height: 11px; pointer-events: none; }
.fav-empty {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.82rem;
    padding: 30px 24px;
    line-height: 1.5;
}

.fav-highlight {
    animation: favHighlight 1.8s ease;
}
@keyframes favHighlight {
    0%   { background: var(--accent-soft); box-shadow: 0 0 0 0 var(--accent); }
    30%  { background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
    100% { background: transparent; box-shadow: 0 0 0 0 transparent; }
}

/* ===== СЕКЦИЯ "ОТПУСТИ" ===== */
.vent-section {
    padding: 60px 24px 100px;
    max-width: 720px;
    margin: 0 auto;
}

.vent-card {
    position: relative;
    padding: 40px 36px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.vent-card::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
}

.vent-header {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.vent-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--text);
    margin-bottom: 10px;
    text-wrap: balance;
}

.vent-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
    text-wrap: balance;
}

.vent-textarea {
    width: 100%;
    min-height: 160px;
    padding: 18px 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Inter', -apple-system, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.65;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease,
                opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
                filter 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 1;
    -webkit-user-select: text;
    user-select: text;
    -webkit-tap-highlight-color: transparent;
}

.vent-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.55;
    font-style: italic;
}

.vent-textarea:focus {
    border-color: var(--accent);
    background: var(--bg-card);
}

.vent-textarea.is-dissolving {
    opacity: 0;
    filter: blur(10px);
    border-color: transparent;
    background: transparent;
    pointer-events: none;
}

.vent-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.vent-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.vent-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.vent-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.vent-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.vent-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    pointer-events: none;
}

.vent-response {
    margin-top: 28px;
    min-height: 52px;
    text-align: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: clamp(1rem, 3vw, 1.2rem);
    line-height: 1.6;
    color: var(--accent);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 1;
    padding: 0 12px;
}

.vent-response.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CTA (ПРЕДЛОЖИТЬ + ПОДДЕРЖАТЬ) ===== */
.cta-section {
    text-align: center;
    padding: 0 24px 110px;
}

.cta-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
}

@media (min-width: 641px) {
    .cta-row {
        flex-direction: row;
        flex-wrap: nowrap;
    }
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease,
                transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.cta-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}
.cta-btn:active { transform: translateY(0) scale(0.97); }
.cta-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cta-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    pointer-events: none;
}

.cta-btn-accent {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.cta-btn-accent:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== МИНИ-ПЛЕЕР ТРЕКОВ ===== */
.mini-player {
    position: fixed;
    top: calc(14px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1400;
    width: min(560px, calc(100vw - 100px));
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: miniPlayerIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow: hidden;
}
.mini-player[hidden] { display: none !important; }
@keyframes miniPlayerIn {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.mini-player-cover {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0a0908;
    padding: 0;
    cursor: default;
}
.mini-player-cover svg { width: 100%; height: 100%; display: block; pointer-events: none; }

.mini-player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mini-player-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-player-artist {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}
.mini-player-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.25s ease, border-color 0.25s ease,
                background 0.25s ease,
                transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.mini-player-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--bg-soft);
}
.mini-player-btn:active { transform: scale(0.94); }
.mini-player-btn svg {
    width: 15px;
    height: 15px;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ИКОНКИ PLAY/PAUSE в мини-плеере треков — по центру */
.mini-player-btn-main .icon-play {
    opacity: 1;
    transform: translate(calc(-50% + 1px), -50%);
}
.mini-player-btn-main .icon-pause {
    opacity: 0;
    transform: translate(-50%, -50%);
}
.mini-player-btn-main.playing .icon-play  { opacity: 0; }
.mini-player-btn-main.playing .icon-pause { opacity: 1; }

.mini-player-btn-main {
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.mini-player-btn-main:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    filter: brightness(1.1);
}

.mini-player-btn.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}
.mini-player-btn.active svg { fill: var(--accent); }

#miniPlayerClose {
    position: relative;
    z-index: 10;
    pointer-events: auto;
    touch-action: manipulation;
}
#miniPlayerClose svg { pointer-events: none; }

/* ПРОГРЕСС-БАР МИНИ-ПЛЕЕРА ТРЕКОВ (кликабельный) */
.mini-player-progress-wrap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 12px;
    cursor: pointer;
    z-index: 6;
    background: transparent;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border-radius: 0 0 12px 12px;
}
.mini-player-progress-wrap::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: var(--border);
    border-radius: 0 0 12px 12px;
    transition: height 0.2s ease;
}
.mini-player-progress-wrap:hover::before {
    height: 6px;
}
.mini-player-progress-fill {
    position: absolute;
    left: 0; bottom: 0; height: 3px;
    width: 0%;
    background: var(--accent);
    border-radius: 0 0 12px 12px;
    pointer-events: none;
    transition: height 0.2s ease;
}
.mini-player-progress-wrap:hover .mini-player-progress-fill {
    height: 6px;
}

/* ===== БОЛЬШОЙ ПЛЕЕР АНИМЕ ===== */
.anime-player-modal {
    border: none;
    border-radius: 0;
    background: var(--bg-card);
    color: var(--text);
    padding: 0;
    max-width: 100vw;
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
    box-shadow: none;
    position: fixed;
    inset: 0;
}
.anime-player-modal::backdrop {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: backdropIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.anime-player-modal[open] .anime-player-wrapper {
    animation: animePlayerIn 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes animePlayerIn {
    from { opacity: 0; transform: scale(0.96) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.anime-player-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    position: relative;
    overflow: hidden;
}

.anime-player-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s, border-color 0.2s, transform 0.25s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.anime-player-close svg { width: 16px; height: 16px; display: block; pointer-events: none; }
.anime-player-close:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: rotate(90deg);
}
.anime-player-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.anime-player-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #000;
}

.anime-player-parts {
    display: flex;
    gap: 6px;
    padding: 10px 16px 0;
    background: var(--bg-soft);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.anime-player-parts:empty { display: none; }

.anime-part-btn {
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.anime-part-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.anime-part-btn:active { transform: scale(0.96); }
.anime-part-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.anime-player-video {
    flex: 1;
    min-height: 0;
    background: #000;
    position: relative;
}
.anime-player-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.anime-player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.anime-player-controls button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    position: relative;
    transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.anime-player-controls button:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.anime-player-controls button:active {
    transform: scale(0.94);
}
.anime-player-controls button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.anime-player-controls button svg {
    width: 16px;
    height: 16px;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ИКОНКИ PLAY/PAUSE в большом плеере аниме — по центру */
.anime-player-controls #animePlayPause .icon-play {
    opacity: 1;
    transform: translate(calc(-50% + 1px), -50%);
}
.anime-player-controls #animePlayPause .icon-pause {
    opacity: 0;
    transform: translate(-50%, -50%);
}
.anime-player-controls #animePlayPause.playing .icon-play  { opacity: 0; }
.anime-player-controls #animePlayPause.playing .icon-pause { opacity: 1; }

#animeMiniToggle {
    position: relative;
    z-index: 11;
    pointer-events: auto;
}
#animeSeekBar {
    flex: 1;
    min-width: 0;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
#animeSeekBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}
#animeSeekBar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
}
.anime-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 90px;
    text-align: right;
}

.anime-player-playlist {
    height: 30vh;
    max-height: 30vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--border);
    padding: 12px 16px 16px;
    background: var(--bg-soft);
    flex-shrink: 0;
}
.anime-player-playlist::-webkit-scrollbar { width: 6px; }
.anime-player-playlist::-webkit-scrollbar-track { background: transparent; }
.anime-player-playlist::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
.anime-player-playlist h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--text);
}
.anime-player-playlist ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.anime-player-playlist li {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    gap: 12px;
    align-items: baseline;
    transition: background 0.2s, border-color 0.2s;
    border-left: 3px solid transparent;
    -webkit-tap-highlight-color: transparent;
}
.anime-player-playlist li:hover { background: var(--bg-card); }
.anime-player-playlist li.active {
    background: var(--accent-soft);
    border-left-color: var(--accent);
}
.chapter-time {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 48px;
}
.chapter-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.chapter-title {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}
.chapter-music {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== ПЛАВАЮЩИЙ МИНИ-ПЛЕЕР АНИМЕ ===== */
.anime-mini-float {
    position: fixed;
    top: 90px;
    right: 16px;
    width: 280px;
    height: 200px;
    z-index: 1500;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 12px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    animation: animeMiniIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease;
}
.anime-mini-float[hidden] { display: none !important; }

@keyframes animeMiniIn {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.anime-mini-float.dragging {
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.85);
    opacity: 0.95;
    animation: none;
    transition: box-shadow 0.2s ease;
}

.anime-mini-header {
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 0 10px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
}
.anime-mini-header:active { cursor: grabbing; }

.anime-mini-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 4px;
    pointer-events: none;
}

.anime-mini-header-btns { display: flex; gap: 2px; flex-shrink: 0; }

.anime-mini-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s, background 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.anime-mini-btn:hover { color: var(--accent); background: var(--accent-soft); }
.anime-mini-btn:active { transform: scale(0.9); }
.anime-mini-btn svg {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
}

.anime-mini-body {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #000;
    overflow: hidden;
}
.anime-mini-body .yt-mini-host,
.anime-mini-body iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

.anime-mini-chapter {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 8px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    font-size: 0.66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 2;
}

.anime-mini-controls {
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding: 0 6px;
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
}
.anime-mini-controls:active { cursor: grabbing; }
.anime-mini-controls button { cursor: pointer; }

.anime-mini-ctrl {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    transition: transform 0.15s ease, color 0.2s, border-color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.anime-mini-ctrl:hover { color: var(--accent); border-color: var(--accent); }
.anime-mini-ctrl:active { transform: scale(0.9); }
.anime-mini-ctrl svg {
    width: 14px;
    height: 14px;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ИКОНКИ PLAY/PAUSE в мини-плеере аниме — по центру */
.anime-mini-ctrl-main .icon-play {
    opacity: 1;
    transform: translate(calc(-50% + 1px), -50%);
}
.anime-mini-ctrl-main .icon-pause {
    opacity: 0;
    transform: translate(-50%, -50%);
}
.anime-mini-ctrl-main.playing .icon-play  { opacity: 0; }
.anime-mini-ctrl-main.playing .icon-pause { opacity: 1; }

.anime-mini-ctrl-main {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.anime-mini-ctrl-main:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ПРОГРЕСС-БАР МИНИ-ПЛЕЕРА АНИМЕ (кликабельный) */
.anime-mini-progress-wrap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 8px;
    cursor: pointer;
    z-index: 5;
    background: transparent;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.anime-mini-progress-wrap::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: rgba(255,255,255,0.15);
}
.anime-mini-progress-fill {
    position: absolute;
    left: 0; bottom: 0; height: 2px;
    width: 0%;
    background: var(--accent);
    pointer-events: none;
    transition: width 0.15s linear;
}

/* ===== ШЛЕЙФ ===== */
.anime-mini-trail {
    position: fixed;
    z-index: 1499;
    pointer-events: none;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.5s ease;
    border: 1px solid transparent;
    mix-blend-mode: screen;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .top-videos { max-width: 100%; }
    .video-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .hero {
        padding: calc(110px + env(safe-area-inset-top, 0px)) 20px 50px;
        min-height: auto;
    }
    .hero h1 { font-size: clamp(2.2rem, 9vw, 2.6rem); }
    .logo-mark { width: 76px; height: 76px; margin-bottom: 32px; }
    .tagline { font-size: 0.96rem; }

    .quote-section { margin-bottom: 60px; }
    .quote-card { padding: 32px 22px; }
    .section-head { margin-bottom: 26px; gap: 16px; }

    .links { padding: 0 20px 70px; grid-template-columns: 1fr; }
    .news, .top-videos { padding: 30px 20px 60px; }
    .news-item { padding: 22px; }

    .top-controls {
        top: calc(14px + env(safe-area-inset-top, 0px));
        right: calc(14px + env(safe-area-inset-right, 0px));
        gap: 6px;
    }
    .lang-toggle, .theme-toggle { width: 40px; height: 40px; }
    .lang-toggle { font-size: 0.68rem; }

    .scroll-anchor {
        width: 42px; height: 42px;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        right: calc(18px + env(safe-area-inset-right, 0px));
    }

    footer { padding: 50px 20px calc(46px + env(safe-area-inset-bottom, 0px)); }

    .topbar { padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
    .menu-thanks { padding-left: 12px; margin-left: 52px; }
    .menu-group-head { padding: 16px 20px; }
    .track-cover-wrap { width: 42px; height: 42px; }
    .anime-cover-wrap { width: 42px; height: 42px; }
    .track-name, .anime-name { font-size: 0.85rem; }
    .track-artist, .anime-sub { font-size: 0.72rem; }
    .track-play { width: 30px; height: 30px; }
    .track-copy {
        width: 30px;
        height: 30px;
        margin-left: 3px;
    }
    .track-copy svg { width: 12px; height: 12px; }
    .track-fav {
        width: 30px;
        height: 30px;
        margin-left: 3px;
    }
    .track-fav svg { width: 12px; height: 12px; }
    .anime-fav {
        width: 34px;
    }
    .anime-fav svg {
        width: 14px;
        height: 14px;
    }

    .menu-search {
        margin: 4px 12px 8px;
    }
    .fav-list {
        padding: 4px 12px 12px;
    }

    .vent-section { padding: 40px 20px 70px; }
    .vent-card { padding: 28px 22px 24px; }
    .vent-textarea {
        min-height: 140px;
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    .vent-btn {
        padding: 12px 26px;
        font-size: 0.88rem;
    }
    .vent-response {
        font-size: 0.95rem;
        margin-top: 24px;
    }

    .mini-player {
        width: calc(100vw - 90px);
        padding: 8px 10px;
        gap: 8px;
    }
    .mini-player-cover { width: 36px; height: 36px; }
    .mini-player-btn { width: 30px; height: 30px; }
    .mini-player-btn-main { width: 34px; height: 34px; }
    .mini-player-title { font-size: 0.82rem; }
    .mini-player-artist { font-size: 0.7rem; }

    .anime-player-playlist { height: 35vh; max-height: 35vh; }
    .anime-time { min-width: 72px; font-size: 0.72rem; }
    .anime-player-controls { padding: 8px 10px; gap: 8px; }
    .anime-player-controls button { width: 34px; height: 34px; }
}

@media (max-width: 640px) {
    .cta-section {
        padding: 0 20px 80px;
    }
    .cta-btn {
        width: 100%;
        padding: 14px 22px;
        font-size: 0.86rem;
    }
}

@media (max-width: 520px) {
    .video-grid { grid-template-columns: 1fr; gap: 16px; }
    .hero h1 { font-size: clamp(2rem, 10vw, 2.4rem); }
    .eyebrow { font-size: 0.66rem; letter-spacing: 0.18em; }
    .link-card { padding: 18px 20px; font-size: 0.92rem; }
    .news-item h3 { font-size: 1.05rem; }
    .footer-links { gap: 8px; }

    .legal-modal { width: 94vw; margin: auto; }
    .modal-header { padding: 40px 20px 24px; }
    .modal-header h2 { font-size: 1.3rem; }
    .modal-text { padding: 24px 20px 32px; }
    .modal-block { gap: 12px; padding-bottom: 20px; margin-bottom: 20px; }
    .modal-num { width: 24px; font-size: 0.95rem; }
    .modal-block-content h3 { font-size: 1rem; }
    .modal-block-content p { font-size: 0.86rem; }
    .modal-list li { font-size: 0.86rem; }
    .modal-close { top: 12px; right: 12px; width: 34px; height: 34px; }

    .quote-actions { gap: 6px; }
    .quote-action {
        flex: 1 1 calc(50% - 6px); justify-content: center;
        font-size: 0.74rem; padding: 8px 10px;
    }
    .quote-action svg { width: 12px; height: 12px; }

    .video-play { width: 54px; height: 54px; }
    .video-play svg { width: 22px; height: 22px; }

    .toast { font-size: 0.82rem; padding: 11px 18px; }

    .mini-player {
        width: calc(100vw - 70px);
        gap: 6px;
        padding: 8px 8px;
    }
    .mini-player-cover { width: 34px; height: 34px; }
    .mini-player-btn { width: 28px; height: 28px; }
    .mini-player-btn svg { width: 13px; height: 13px; }
    .mini-player-btn-main { width: 34px; height: 34px; }
    .mini-player-btn-main svg { width: 15px; height: 15px; }
    .mini-player-title { font-size: 0.76rem; }
    .mini-player-artist { font-size: 0.66rem; }
    .mini-player-info { gap: 0; }

    .anime-mini-float {
        width: 260px;
        height: 180px;
        right: 10px;
        top: 70px;
        border-radius: 10px;
    }
    .anime-mini-title { font-size: 0.72rem; }
    .anime-mini-header { height: 30px; padding: 0 5px 0 10px; }
    .anime-mini-controls { height: 40px; gap: 8px; padding: 0 6px; }
    .anime-mini-ctrl { width: 32px; height: 32px; }
    .anime-mini-ctrl-main { width: 38px; height: 38px; }
    .anime-mini-ctrl svg { width: 15px; height: 15px; }
    .anime-mini-btn { width: 28px; height: 28px; }
    .anime-mini-btn svg { width: 15px; height: 15px; }
    .anime-mini-chapter { font-size: 0.66rem; padding: 2px 8px; }

    .anime-mini-float.expanded {
        width: 338px;
        height: 234px;
        border-radius: 12px;
    }
    .anime-mini-float.expanded .anime-mini-header { height: 36px; padding: 0 6px 0 12px; }
    .anime-mini-float.expanded .anime-mini-title { font-size: 0.86rem; }
    .anime-mini-float.expanded .anime-mini-controls { height: 48px; gap: 10px; padding: 0 8px; }
    .anime-mini-float.expanded .anime-mini-ctrl { width: 38px; height: 38px; }
    .anime-mini-float.expanded .anime-mini-ctrl-main { width: 46px; height: 46px; }
    .anime-mini-float.expanded .anime-mini-ctrl svg { width: 18px; height: 18px; }
    .anime-mini-float.expanded .anime-mini-btn { width: 32px; height: 32px; }
    .anime-mini-float.expanded .anime-mini-btn svg { width: 17px; height: 17px; }
    .anime-mini-float.expanded .anime-mini-chapter { font-size: 0.72rem; padding: 3px 10px; }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 1.9rem; }
    .logo-mark { width: 66px; height: 66px; margin-bottom: 24px; }
    .quote-card { padding: 26px 18px; }
    .news-item { padding: 18px; }
    .fallback-text { font-size: 0.78rem; }
    .top-controls { gap: 5px; }
    .lang-toggle, .theme-toggle { width: 36px; height: 36px; }
    .lang-toggle { font-size: 0.64rem; }
    .vent-card { padding: 22px 18px 20px; }
    .vent-title { font-size: 1.4rem; }
    .vent-subtitle { font-size: 0.84rem; }

    .anime-mini-float {
        width: 240px;
        height: 168px;
    }
    .anime-mini-float.expanded {
        width: 312px;
        height: 218px;
    }
}

/* ===== ПЕЧАТЬ ===== */
@media print {
    body::before {
        content: "Saitenly — personal creative project. Copying the design and layout is discouraged.";
        display: block; text-align: center;
        padding: 12px; font-size: 12px; color: #8c857d;
    }
    .top-controls, .scroll-anchor, .progress-bar, .toast,
    .topbar, .side-menu, .menu-overlay, .mini-player,
    .anime-mini-float, .anime-player-modal { display: none !important; }
}

/* ===== ДОСТУПНОСТЬ ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .blood-print { animation: none; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .progress-bar { transition: none; }
    .toast { transition: opacity 0.15s ease; }
    .modal-content.is-closing { animation: none; opacity: 0; }
    .legal-modal.is-closing::backdrop { animation: none; opacity: 0; }
    .menu-group-panel > *,
    .menu-group.open .track-list li,
    .menu-group.open .anime-list li { opacity: 1; transform: none; }
    .track-cover.loading ~ .cover-placeholder svg { animation: none; }
    .track-cover:not(.loading) ~ .cover-placeholder { transition: none; }
    .news-item, .video-card, .track-list li, .anime-list li, .fav-item {
        opacity: 1;
        transform: none;
        animation: none;
    }
}