/* ============================================================
   «Подшивка» — единая таблица стилей.
   Простая светлая тема: белый фон, чёрный текст, один акцент.
   ============================================================ */

:root {
    --ink: #1a1a1a;
    --muted: #6b6b6b;
    --line: #e3e0da;
    --paper: #ffffff;
    --soft: #f6f4f0;
    --accent: #c2452d;
    --accent-dark: #a03722;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(26, 26, 26, .06), 0 8px 24px rgba(26, 26, 26, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--paper);
    background-image: linear-gradient(180deg, rgba(255,255,255,.78) 0%, #fff 72%, #fff 100%), url('../jy6iE-Rj-3w2TTtS4yfoqDM-qipao4393eOG3tPA_kbT9uddMWIQy-xpWet8s_SvGuWJN1c5EzlqUT9x3g-lOBIW.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--ink);
    font-family: Manrope, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.wrap { width: min(1120px, calc(100% - 40px)); margin: auto; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.eyebrow {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.empty-note { color: var(--muted); padding: 30px 0; }
.empty-note.is-loading { opacity: .75; }
.hidden { display: none !important; }

/* ---------- Спокойная motion-система ---------- */
:root {
    --motion-fast: 180ms;
    --motion-base: 280ms;
    --motion-slow: 360ms;
    --motion-ease: cubic-bezier(.22, .8, .25, 1);
}

@keyframes podshivka-reveal {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes podshivka-section-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.posts-grid > *,
.media-grid > *,
.cats-grid > *,
.home-nav-card,
.home-mosaic-cell {
    animation: podshivka-reveal var(--motion-slow) var(--motion-ease) both;
    animation-delay: calc(var(--motion-index, 0) * 45ms);
}

/* ---------- Шапка ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav-wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar .home-nav { margin-left: auto; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 800; letter-spacing: .08em; font-size: 13px; }
.brand > span:last-child { min-width: 0; }
.brand small { display: block; color: var(--muted); font-size: 7px; letter-spacing: .14em; margin-top: 4px; font-weight: 600; }
.brand-mark {
    position: relative; display: block; width: 38px; height: 32px; flex: 0 0 38px;
}
.brand-mark i, .wp-mark i { position: absolute; display: block; width: 27px; height: 20px; border: 2px solid var(--ink); background: var(--paper); box-shadow: inset 0 -4px 0 var(--accent); }
.brand-mark i:nth-child(1), .wp-mark i:nth-child(1) { left: 0; top: 8px; transform: rotate(-8deg) skewY(-4deg); }
.brand-mark i:nth-child(2), .wp-mark i:nth-child(2) { left: 5px; top: 5px; transform: rotate(3deg) skewY(-4deg); }
.brand-mark i:nth-child(3), .wp-mark i:nth-child(3) { left: 9px; top: 1px; transform: rotate(-2deg) skewY(-4deg); }
.brand-mark::after, .wp-mark::after { content: ""; position: absolute; z-index: 2; left: 14px; top: 8px; width: 14px; height: 2px; background: var(--ink); box-shadow: 0 5px 0 var(--ink), 0 10px 0 var(--ink); }
.brand-mark.has-logo, .wp-mark.has-logo { width: auto; min-width: 32px; height: 32px; flex: 0 0 auto; }
.brand-mark.has-logo::after, .wp-mark.has-logo::after { content: none; }
.brand-mark.has-logo img, .wp-mark.has-logo img { display: block; height: 32px; width: auto; max-width: 148px; object-fit: contain; }

.topbar nav { display: none; }
.topbar #home-nav.home-nav { display: flex !important; visibility: visible; opacity: 1; flex: 0 0 auto; position: relative; z-index: 2; }
.nav-cats { display: none; }

.sidebar-toggle {
    margin-left: auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    padding: 11px 10px;
}
.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform var(--motion-base) var(--motion-ease), opacity var(--motion-fast) ease;
}
.sidebar-open .sidebar-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-open .sidebar-toggle span:nth-child(2) { opacity: 0; }
.sidebar-open .sidebar-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 80;
    width: min(360px, 92vw);
    height: 100%;
    transform: translateX(104%);
    transition: transform var(--motion-slow) var(--motion-ease);
    background: rgba(255,255,255,.97);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 40px rgba(26,26,26,.08);
    overflow: auto;
}
.sidebar-open .site-sidebar { transform: none; }
.sidebar-panel { padding: 28px 24px 40px; }
.sidebar-label {
    margin: 22px 0 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.sidebar-panel > .sidebar-label:first-child { margin-top: 8px; }
.sidebar-links { display: grid; gap: 4px; }
.sidebar-links a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}
.sidebar-links a:hover,
.sidebar-links a.is-active { background: var(--soft); color: var(--accent); }
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(26,26,26,.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-base) var(--motion-ease);
}
.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
.sidebar-open { overflow: hidden; }

/* Ссылка в админку скрыта: вход выполняется удержанием клавиши «A». */
.admin-link { display: none !important; }

/* ---------- Кнопки и ссылки ---------- */

.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) ease;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

.text-link { color: var(--accent); font-weight: 700; font-size: 14px; }
.text-link:hover { text-decoration: underline; }

/* ---------- Секции ---------- */

.section { padding: 56px 0; }
.section + .section { padding-top: 0; }

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}
.section-head h2, .page-title-xl {
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.1;
    letter-spacing: -.02em;
    font-weight: 800;
}

.page-intro { padding: 64px 0 36px; max-width: 720px; }
.page-intro h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.05; letter-spacing: -.02em; font-weight: 800; margin-bottom: 14px; }
.page-intro .lead { color: var(--muted); font-size: 17px; }

.issue-layout { display: grid; grid-template-columns: 42% 1fr; gap: clamp(24px, 5vw, 48px); align-items: start; }

.home-hero { padding: 72px 0 48px; max-width: 780px; }
.home-hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.04; letter-spacing: -.025em; font-weight: 800; margin-bottom: 18px; }
.home-hero h1 em { font-family: Georgia, serif; font-style: italic; color: var(--accent); }
.home-hero .lead { color: var(--muted); font-size: 17px; max-width: 560px; }

/* ---------- Круглая навигация в шапке ---------- */

.home-nav { display: flex; align-items: center; gap: 9px; min-height: 42px; }
.home-nav-card {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    transition: transform var(--motion-base) var(--motion-ease), color var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-base) ease;
}
.home-nav-card:hover,
.home-nav-card:focus-visible {
    transform: translateY(-4px) rotate(-6deg) scale(1.08);
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(194, 69, 45, .25);
}
.home-nav-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.home-nav-icon { font-size: 20px; line-height: 1; font-weight: 800; }
.home-nav-title, .home-nav-text, .home-nav-meta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.home-nav-card::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    opacity: 0;
    transform: scale(.72);
    transition: opacity var(--motion-base) ease, transform var(--motion-base) var(--motion-ease);
}
.home-nav-card:hover::after, .home-nav-card:focus-visible::after { opacity: .35; transform: scale(1); }

/* ---------- Живая сетка главной ---------- */

.home-mosaic-page {
    min-height: 100vh;
}

.home-mosaic-stage {
    width: min(1440px, calc(100% - 24px));
    margin: 16px auto 8px;
}
.home-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(168px, 22vh);
    grid-auto-flow: dense;
    gap: 8px;
}
.home-mosaic:empty { color: var(--muted); padding: 80px 20px; text-align: center; }
.home-mosaic-cell {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 168px;
    border-radius: 14px;
    background: transparent;
    isolation: isolate;
}
.home-mosaic-cell.is-span-2 { grid-column: span 2; }
.home-mosaic-cell.is-span-4 { grid-column: span 4; }
.home-mosaic-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.1s ease, transform 6s ease;
}
.home-mosaic-layer.is-shown {
    opacity: 1;
    transform: scale(1);
}
.home-mosaic-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 48px 16px 14px;
    background: linear-gradient(180deg, transparent, rgba(8,8,10,.78));
    color: #fff;
}
.home-mosaic-caption b {
    display: block;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.home-mosaic-caption small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.home-mosaic-cell:hover .home-mosaic-layer.is-shown { transform: scale(1.05); }
.home-mosaic-cell { transition: transform var(--motion-base) var(--motion-ease), box-shadow var(--motion-base) ease; }
.home-mosaic-cell:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(26,26,26,.12); }
.home-mosaic-cell:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.home-mosaic-art,
.home-mosaic-letter {
    position: relative;
    z-index: 1;
    color: rgba(32, 24, 16, .82);
    text-align: center;
    pointer-events: none;
}
.home-mosaic-art {
    width: 100%;
    height: 100%;
}
.home-mosaic-art .mc-top,
.home-mosaic-art .mc-main,
.home-mosaic-art .mc-sub {
    color: inherit;
}
.home-mosaic-letter {
    font-size: clamp(42px, 8vw, 72px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
    opacity: .55;
}

@media (max-width: 1100px) {
    .home-nav { gap: 6px; }
}
@media (max-width: 900px) {
    .home-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(150px, 24vh); }
    .home-mosaic-cell.is-span-2 { grid-column: span 2; }
    .home-mosaic-cell.is-span-4 { grid-column: span 2; }
}
@media (max-width: 700px) {
    .home-nav { gap: 4px; }
    .home-nav-card { width: 36px; height: 36px; flex-basis: 36px; }
    .home-nav-icon { font-size: 17px; }
}
@media (max-width: 600px) {
    .home-mosaic-stage { width: calc(100% - 16px); margin-top: 10px; }
    .home-mosaic { grid-template-columns: 1fr 1fr; gap: 6px; grid-auto-rows: 42vw; }
    .home-mosaic-cell {
        min-height: 0;
        border-radius: 10px;
    }
    .home-mosaic-cell.is-span-2,
    .home-mosaic-cell.is-span-4 { grid-column: span 2; }
    .home-mosaic-caption { padding: 28px 10px 10px; }
    .home-mosaic-caption b { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-mosaic-layer { transition: none; transform: none; }
}

/* Share popover */
.share-menu {
    position: fixed;
    z-index: 10001;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 14px 34px rgba(26,26,26,.16);
    transform-origin: 18px 0;
    animation: share-menu-in var(--motion-base) var(--motion-ease) both;
}
.share-menu.is-closing { animation: share-menu-out var(--motion-fast) var(--motion-ease) both; pointer-events: none; }
.share-menu-item {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: 700 12px/1.25 inherit;
    text-align: left;
    cursor: pointer;
}
.share-menu-item:hover, .share-menu-item:focus-visible { background: var(--soft); color: var(--accent); outline: none; }
@keyframes share-menu-in { from { opacity: 0; transform: translateY(-5px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes share-menu-out { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-4px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
    .posts-grid > *, .media-grid > *, .cats-grid > *, .home-nav-card, .home-mosaic-cell, .share-menu { animation: none; }
    .home-mosaic-cell { transition: none; }
}

/* ---------- Чипы-фильтры ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: background var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) var(--motion-ease);
}
.chip small { opacity: .55; margin-left: 4px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Карточка записи ---------- */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--motion-base) var(--motion-ease), transform var(--motion-base) var(--motion-ease);
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.post-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
}
.thumb-letter {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font: 700 44px Georgia, serif;
    color: rgba(26, 26, 26, .35);
}
.star-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--accent);
    font-size: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}

.post-body { padding: 18px 20px 20px; }
.post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.post-cat {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
}
.post-cat:hover { text-decoration: underline; }
.post-date { color: var(--muted); }

.post-title { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; margin-bottom: 8px; }
.post-title a:hover { color: var(--accent); }
.post-excerpt { color: var(--muted); font-size: 14px; }

/* ---------- Карточки рубрик ---------- */

.cats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card {
    display: block;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .15s, box-shadow .2s;
}
.cat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.cat-card b { font-size: 18px; letter-spacing: -.01em; }
.cat-card p { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.cat-card span { color: var(--accent); font-size: 13px; font-weight: 700; }

/* ---------- Одиночная запись ---------- */

.back-link { display: inline-block; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 24px; }
.back-link:hover { color: var(--accent); }

/* ---------- Навигация между объектами (профили, материалы) ---------- */

.item-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 20px;
}
.item-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 46%;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    transition: border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.item-nav-btn:hover:not(.is-disabled) { border-color: var(--accent); color: var(--accent); box-shadow: 0 6px 18px rgba(194, 69, 45, .16); transform: translateY(-1px); }
.item-nav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.item-nav-btn.is-disabled { opacity: .38; pointer-events: none; }
.item-nav-btn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-nav-arrow { flex: 0 0 auto; font-size: 16px; line-height: 1; }
.item-nav-counter { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; }

/* Свайп-переходы левой кнопкой мыши */
[data-swipe] { cursor: grab; }
body.swipe-active, body.swipe-active * { cursor: grabbing !important; user-select: none !important; }
.is-swiping { will-change: transform; }

@media (max-width: 640px) {
    .item-nav-btn b { display: none; }
    .item-nav-btn { padding: 11px 14px; }
}

.single-head { max-width: 760px; margin-bottom: 28px; }
.single-head h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -.02em; font-weight: 800; margin-bottom: 14px; }
.single-lead { color: var(--muted); font-size: 18px; }

.single-cover {
    aspect-ratio: 21 / 9;
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    margin-bottom: 32px;
}

.single-content { max-width: 720px; }
.single-content p { margin-bottom: 18px; font-size: 17px; line-height: 1.75; }

.post-interactions { max-width: 720px; margin: 30px 0; }
.social-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.social-action {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
    border: 1px solid var(--line); border-radius: 999px; background: #fff;
    color: var(--muted); cursor: pointer; font: 600 13px/1.2 inherit;
}
.social-action:hover, .social-action:focus-visible { border-color: var(--ink); color: var(--ink); outline: none; }
.social-action.is-active { color: var(--accent); border-color: var(--accent); background: #fff5f2; }
.comments { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.comments h2 { font-size: 18px; margin-bottom: 14px; }
.comments-list { display: grid; gap: 12px; margin-bottom: 18px; }
.comment { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.comment b { font-size: 13px; }
.comment time { margin-left: 8px; color: var(--muted); font-size: 12px; }
.comment p, .comments-empty { margin-top: 3px; color: var(--muted); font-size: 14px; }
.comment-form { display: grid; gap: 10px; }
.comment-form label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.comment-form input, .comment-form textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
.comment-form textarea { resize: vertical; }
.comment-form .btn { justify-self: start; }

/* ---------- Мультимедиа ---------- */

.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.media-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    transition: box-shadow .2s, transform .2s;
}
.media-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.media-card.is-target { outline: 2px solid var(--accent); outline-offset: 3px; }

.media-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background-color: var(--soft);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.media-card.is-featured .media-cover { outline: 2px solid var(--accent); outline-offset: -2px; }

.mc-top, .mc-main, .mc-sub {
    position: absolute;
    left: 0; right: 0;
    text-align: center;
    color: rgba(26, 26, 26, .55);
    font-family: Georgia, serif;
}
.mc-top { top: 14%; font-size: 11px; letter-spacing: .3em; }
.mc-main { top: 42%; transform: translateY(-50%); font-size: 22px; font-weight: 700; line-height: 1.15; padding: 0 12px; }
.mc-sub { bottom: 12%; font-size: 12px; letter-spacing: .2em; }

.media-info { padding: 16px 18px 18px; }
.media-info h3 { font-size: 17px; margin-bottom: 6px; }
.media-info p { color: var(--muted); font-size: 13px; margin-bottom: 10px; }

.media-cover-play { width: 100%; border: 0; cursor: pointer; font: inherit; color: inherit; }
.media-cover-download { cursor: download; }
.media-play-badge {
    position: absolute;
    inset: auto 14px 14px auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(26, 26, 26, .78);
    color: #fff;
    font-size: 16px;
}
.media-player {
    display: block;
    width: 100%;
    margin: 4px 0 12px;
    border-radius: 8px;
    background: #111;
}
audio.media-player { height: 40px; background: transparent; }

/* ---------- Подвал ---------- */

footer {
    border-top: 1px solid rgba(227, 224, 218, .35);
    margin-top: 20px;
    padding: 10px 0 8px;
    background: rgba(255, 255, 255, .24);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.archive-page { background-image: linear-gradient(180deg, rgba(255,255,255,.76) 0%, #fff 62%, #fff 100%), url('../jy6iE-Rj-3w2TTtS4yfoqDM-qipao4393eOG3tPA_kbT9uddMWIQy-xpWet8s_SvGuWJN1c5EzlqUT9x3g-lOBIW.jpg'); }
.newspaper-hero { padding-top: 40px; }
.newspaper-summary h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -.025em; margin-bottom: 18px; }
.newspaper-summary h1 em { font-family: Georgia, serif; font-style: italic; color: var(--accent); }
.newspaper-summary .lead { color: var(--muted); max-width: 560px; font-size: 18px; margin-bottom: 26px; }
.issue-paper { border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; text-align: center; box-shadow: var(--shadow); }
.paper-1863 { background: #f8f4ea; color: #2c2416; } .paper-1917 { background: #f3e9e2; color: #4a2318; } .paper-1990 { background: #e9eef0; color: #1e333b; }
.issue-paper span { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; } .issue-paper h1 { font: 700 42px Georgia,serif; margin: 12px 0 6px; } .issue-paper h2 { font: 600 22px Georgia,serif; } .issue-paper hr { border: 0; border-top: 2px solid currentColor; margin: 14px 0; } .issue-paper p { font-size: 13px; } .paper-columns { margin-top: 18px; padding-top: 16px; border-top: 1px solid currentColor; font: 15px/1.7 Georgia,serif; text-align: left; column-count: 2; column-gap: 22px; }
.issue-paper.has-uploaded-cover { padding: 0; overflow: hidden; background: #fff; } .issue-paper.has-uploaded-cover img { display: block; width: 100%; max-height: 620px; object-fit: contain; }
.article-scan img { display: block; width: 100%; max-height: 420px; object-fit: contain; margin-bottom: 14px; border-radius: 6px; } .article-scan a { display: block; }
.newspaper-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; max-width: 450px; font-size: 14px; } .newspaper-meta dt { color: var(--muted); } .reference-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 900px; } .reference-copy p { font-size: 17px; line-height: 1.75; }
.archive-issues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; } .archive-issues article, .archive-card, .person-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.82); } .archive-issues b, .archive-issues span, .archive-card span { display: block; } .archive-issues b { font: 700 30px Georgia,serif; } .archive-issues span, .archive-card span { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; } .archive-issues p, .archive-card p, .person-card p { color: var(--muted); font-size: 14px; margin-top: 8px; } .person-card b { font-size: 18px; }
@media (max-width: 800px) { .reference-copy, .archive-issues { grid-template-columns: 1fr; } }
.archive-page .newspaper-page { background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.72) 28%, #fff 58%, #fff 100%); }

.footer-brand { margin-bottom: 6px; }
.footer-logo { display: block; height: 22px; width: auto; max-width: 140px; object-fit: contain; margin-bottom: 4px; }
.footer-brand b { font-size: 13px; letter-spacing: .08em; }
.footer-brand p { color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 2px; max-width: 360px; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 5px 12px; padding-top: 6px; border-top: 1px solid rgba(227, 224, 218, .3); }
.footer-nav a { color: var(--muted); font-size: 12px; font-weight: 600; }
.footer-nav a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 10px; margin-top: 5px; }

/* ---------- Формы (контакты) ---------- */

.form-group { margin-bottom: 14px; }
input[type="text"], input[type="email"], textarea, select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.contact-layout { display: grid; grid-template-columns: 1fr; align-items: start; }
.contact-layout #contact-form { width: 100%; max-width: 560px; }

.form-note { margin: 10px 0; font-size: 14px; }
.form-note.is-success { color: #1c7c46; }
.form-note.is-error { color: var(--accent); }

/* ---------- Адаптивность ---------- */

@media (max-width: 800px) { .issue-layout { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
    .posts-grid, .media-grid, .cats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .wrap { width: min(100% - 24px, 1120px); }
    .nav-wrap { height: auto; padding: 12px 0; }
    .brand { gap: 0; }
    .brand > span:last-child { display: none; }
    .topbar .home-nav { gap: 3px; }
    .topbar .sidebar-toggle { width: 36px; height: 36px; padding: 8px; }
    .admin-link { margin-left: auto; }
    .posts-grid, .media-grid, .cats-grid { grid-template-columns: 1fr; }
    .section-head { flex-direction: column; align-items: start; }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .wrap { width: min(100% - 48px, 1120px); }
    .posts-grid, .media-grid, .cats-grid { gap: 18px; }
}

/* ---------- Toast-уведомления ---------- */

@keyframes toastFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(10px); }
}
