/*
Theme Name: dds_kotaroyokomizo.com
Theme URI: https://kotaroyokomizo.com/
Author: Лаптев Тимофей Борисович
Description: Тема «Полевой дневник света» для сайта о фотографии: тёмная фотобумага, контактные листы, экспозиционная шкала, разбор кадра и отбор в серию.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kymlab
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/oswald-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/oswald-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/oswald-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/oswald-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/oswald-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/oswald-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/oswald-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/oswald-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-cyrillic-400-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/fira-sans-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-sans-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/fira-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/fira-sans-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/fira-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/caveat-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/caveat-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/caveat-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/caveat-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Переменные ---------- */
:root {
    --paper: #121212;
    --paper-deep: #0C0C0C;
    --film: #050505;
    --sheet: #1A1A19;
    --sage: #3A4038;
    --wine: #2A1A1A;
    --divider: #2E2E2E;
    --rule: #4A4A4A;
    --text: #E8E4DA;
    --muted: #9C9587;
    --amber: #E8A33D;
    --ice: #7FA6B8;
    --white: #F5F2EA;
    --head: "Oswald", "Arial Narrow", "Roboto Condensed", "Liberation Sans Narrow", sans-serif;
    --body: "Fira Sans", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* Элементы, управляемые атрибутом hidden */
.cookie-banner[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background-color: var(--paper);
    background-image: var(--grain);
    color: var(--text);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.62;
    overflow-x: hidden;
}
img, svg, video { max-width: 100%; }
img { height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--head);
    font-weight: 600;
    line-height: 1.15;
    color: var(--white);
    margin: 1.4em 0 .6em;
    letter-spacing: .01em;
}
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--amber); text-decoration-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
p, li, dd, dt, h1, h2, h3, h4, .card-title, .widget { overflow-wrap: break-word; hyphens: auto; }
h1, h2, h3, .brand-name, .tag-title, .entry-title, .card-title { hyphens: manual; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--amber); color: #111; padding: .6rem 1rem;
    font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: #111; }

.shell { width: 92%; margin-inline: auto; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    font-family: var(--head);
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    padding: .7rem 1.3rem;
    border: 1px solid var(--text);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: center;
    transition: background-color .12s, color .12s, border-color .12s, transform .12s;
}
.btn:hover { transform: translate(-2px, -2px); }
.btn:active { transform: none; }
.btn-amber { background: var(--amber); border-color: var(--amber); color: #111; }
.btn-amber:hover { background: var(--white); border-color: var(--white); color: #111; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-sm { font-size: .82rem; padding: .5rem .9rem; }

/* ---------- Заголовки-ярлыки ---------- */
.tag-title {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-family: var(--head);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: clamp(1.5rem, 3.4vw, 2.3rem);
    color: var(--white);
    margin: 0 0 1.6rem;
}
.tag-title::before {
    content: "";
    flex: 0 0 auto;
    width: 2.2rem;
    height: 3px;
    background: var(--amber);
}
.tag-title--page { font-size: clamp(1.8rem, 4.6vw, 3rem); margin-bottom: .8rem; }

/* ---------- Шапка ---------- */
.masthead { background-color: #0F0F0F; background-image: var(--grain); border-bottom: 1px solid var(--divider); }
.masthead-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    padding: .7rem 0;
    border-bottom: 1px solid var(--divider);
}
.nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem;
    background: transparent; color: var(--text);
    border: 1px solid var(--rule); border-radius: 0;
    padding: .45rem .8rem;
    font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem;
    cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: var(--amber); position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.primary-nav { display: none; width: 100%; }
.primary-nav.is-open { display: block; }
.primary-menu { list-style: none; margin: .6rem 0 0; padding: 0; }
.primary-menu li { border-top: 1px solid var(--divider); }
.primary-menu a {
    display: block; padding: .65rem 0;
    font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: .95rem;
    color: var(--text); text-decoration: none;
}
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--amber); }

.masthead-brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.6rem 0 1.8rem;
}
.brand-mark { flex: 0 0 auto; color: var(--white); text-decoration: none; display: block; }
.brand-aperture { width: 52px; height: 52px; display: block; transition: transform .6s ease; }
.brand-mark:hover .brand-aperture { transform: rotate(60deg); color: var(--amber); }
.brand-logo { display: block; max-width: 72px; max-height: 72px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    margin: 0;
    font-family: var(--head);
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(1.45rem, 4.8vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: .005em;
}
.brand-name a { color: var(--white); text-decoration: none; }
.brand-name a:hover { color: var(--white); }
.brand-desc {
    margin: .55rem 0 0;
    font-family: var(--head);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: clamp(.72rem, 1.5vw, .98rem);
    color: #C8A15F;
    max-width: 62rem;
}

/* ---------- Ленты главной ---------- */
.band { padding: 2.6rem 0; border-top: 1px solid var(--divider); background-image: var(--grain); }
.band:first-child { border-top: 0; }
.band-scale { background-color: var(--sage); }
.band-frame { background-color: var(--wine); }
.band-latest, .band-select, .band-glossary { background-color: var(--paper); }

/* Блок 1: шкала */
.scale-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.scale-main { min-width: 0; }
.scale-wrap { position: relative; padding-top: 2.2rem; }
.scale-hand {
    position: absolute;
    top: 0; left: calc(100% * 3.5 / 7 + .4rem);
    margin: 0;
    font-family: var(--hand);
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text);
    display: flex; align-items: flex-start; gap: .2rem;
    transform: translateX(-30%);
    white-space: nowrap;
}
.scale-hand svg { width: 40px; height: 24px; color: var(--amber); transform: scaleX(-1); margin-top: .3rem; }
.scale-bar {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid rgba(0, 0, 0, .35);
}
.scale-bar li {
    position: relative;
    height: 34px;
    background: var(--tone);
    transition: transform .15s;
}
.scale-bar li:hover { transform: translateY(-3px); box-shadow: 0 3px 0 var(--amber); }
.scale-bar li::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -8px;
    width: 1px; height: 14px;
    background: var(--amber);
}
.scale-num {
    position: absolute;
    top: calc(100% + 12px);
    left: 0; right: 0;
    text-align: center;
    font-family: var(--head);
    font-weight: 400;
    font-size: clamp(.95rem, 2vw, 1.3rem);
    color: var(--amber);
}
.swatches {
    list-style: none;
    margin: 4.2rem 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: clamp(1.2rem, 5vw, 3.2rem);
}
.swatches li { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.swatch {
    width: 46px; height: 46px;
    background: var(--tone);
    border: 1px solid rgba(0, 0, 0, .4);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, .25);
}
.swatch-label {
    margin-top: .55rem;
    font-family: var(--head);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    color: var(--white);
}
.swatch-note { font-size: .78rem; color: #C3BCAE; }
.scale-notes {
    min-width: 0;
    border-top: 1px solid rgba(232, 228, 218, .35);
    padding-top: 1rem;
    font-family: var(--hand);
    font-size: 1.32rem;
    line-height: 1.2;
    color: var(--text);
}
.scale-notes p { margin: 0; padding: .55rem 0 .55rem 1rem; border-left: 1px solid rgba(232, 228, 218, .5); }
.scale-notes p + p { margin-top: .5rem; }

/* Блок 2: разбор кадра */
.frame-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.frame-photo { margin: 0; min-width: 0; }
.frame-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 322 / 189;
    object-fit: cover;
    border: 1px solid #000;
}
.frame-photo figcaption {
    margin-top: .7rem;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ice);
}
.frame-scheme { display: flex; align-items: stretch; min-width: 0; }
.scheme-lines { display: none; color: #D7DEE2; }
.scheme-labels {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.1rem;
    border-left: 2px solid var(--ice);
    display: grid;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 auto;
}
.scheme-labels li { display: flex; flex-direction: column; justify-content: center; }
.scheme-key {
    font-family: var(--head);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 1.15rem;
    color: var(--white);
    line-height: 1.15;
}
.scheme-val { font-size: .86rem; color: #BFB6A8; line-height: 1.35; margin-top: .2rem; }

/* Карточки записей */
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.2rem 1.8rem; }
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}
.card-thumb {
    position: relative;
    background: var(--film);
    padding: 16px 10px 10px;
    border: 1px solid #000;
    transition: transform .15s, border-color .15s;
}
.card-thumb::before {
    content: "";
    position: absolute;
    left: 10px; right: 10px; top: 5px;
    height: 5px;
    background:
        linear-gradient(90deg, transparent 0 6%, rgba(232, 163, 61, .6) 6% 8%, transparent 8% 18%, rgba(232, 163, 61, .45) 18% 21%, transparent 21% 62%, rgba(232, 163, 61, .5) 62% 65%, transparent 65% 88%, rgba(232, 163, 61, .45) 88% 91%, transparent 91%);
}
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: grayscale(.15) contrast(1.03);
    transition: filter .2s;
}
.card-num {
    position: absolute;
    right: 10px; bottom: 10px;
    background: var(--film);
    color: var(--text);
    font-family: var(--head);
    font-size: .95rem;
    letter-spacing: .06em;
    padding: .2rem .55rem .1rem;
    pointer-events: none;
}
.card:hover .card-thumb { transform: translate(-3px, -3px); border-color: var(--amber); }
.card:hover .card-thumb img { filter: none; }
.card-body { flex: 1; display: flex; flex-direction: column; padding-top: .9rem; min-width: 0; }
.card-title {
    margin: 0 0 .5rem;
    font-family: var(--head);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 1.28rem;
    line-height: 1.18;
    letter-spacing: .02em;
}
.card-title a { color: var(--white); text-decoration: none; }
.card-title a:hover { color: var(--amber); }
.card-excerpt { color: #CFC9BD; font-size: .95rem; line-height: 1.5; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: inherit; }
.card-foot {
    margin-top: auto;
    padding-top: .8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.card-date { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.latest-more { margin: 2.2rem 0 0; text-align: right; }
.empty-state { color: var(--muted); padding: 1.4rem 1.6rem; border: 1px dashed var(--rule); }
.empty-state p:last-child { margin-bottom: 0; }

/* Блок 3: отбор в серию */
.filmstrip {
    position: relative;
    background: var(--film);
    padding: 16px 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--rule) var(--film);
}
.filmstrip::before, .filmstrip::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 6px;
    background: repeating-linear-gradient(90deg, transparent 0 10px, #2A2826 10px 18px);
}
.filmstrip::before { top: 5px; }
.filmstrip::after { bottom: 5px; }
.filmstrip-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(10, minmax(84px, 1fr));
    gap: 8px;
}
.strip-frame {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #000;
    cursor: pointer;
}
.strip-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 440 / 324;
    object-fit: cover;
    transition: filter .15s;
}
.strip-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top right, transparent calc(50% - 1px), var(--amber) calc(50% - .5px), var(--amber) calc(50% + .5px), transparent calc(50% + 1px)),
        linear-gradient(to bottom right, transparent calc(50% - 1px), var(--amber) calc(50% - .5px), var(--amber) calc(50% + .5px), transparent calc(50% + 1px));
    opacity: 0;
    transition: opacity .15s;
}
.strip-frame.is-out img { filter: brightness(.72) saturate(.7); }
.strip-frame.is-out::after { opacity: 1; }
.strip-frame:hover img { filter: brightness(1.08); }
.strip-frame:not(.is-out) { box-shadow: 0 0 0 1px rgba(232, 163, 61, .0); }
.strip-frame:not(.is-out):hover { box-shadow: 0 0 0 1px var(--amber); }
.select-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem 2.4rem;
    margin-top: 1.4rem;
}
.select-count {
    margin: 0;
    font-family: var(--head);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 1.25rem;
    color: var(--white);
}
.select-live { margin: .2rem 0 0; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ice); }
.select-text { margin: 0; color: #BFB6A8; font-size: .92rem; max-width: 46rem; }

/* Блок 4: словарь */
.glossary-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem 3rem; }
.glossary-head { min-width: 0; }
.glossary-head .tag-title { margin-bottom: .2rem; }
.glossary-count {
    margin: 0;
    font-family: var(--head);
    font-weight: 500;
    font-size: clamp(5rem, 14vw, 9rem);
    line-height: .95;
    color: var(--amber);
    letter-spacing: -.02em;
}
.glossary-list {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
}
.glossary-row {
    display: grid;
    grid-template-columns: 8.4rem minmax(0, 1fr);
    gap: 1rem;
    padding: .95rem 0;
    border-bottom: 1px solid var(--divider);
}
.glossary-row dt {
    font-family: var(--head);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 1.12rem;
    color: var(--white);
    line-height: 1.2;
}
.glossary-row dd { margin: 0; font-size: .88rem; line-height: 1.45; color: #BFB6A8; }
.glossary-row:hover dt { color: var(--amber); }

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 1.6rem 0 3.4rem; }
.crumbs {
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.8rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--divider);
}
.crumbs a { color: var(--text); text-decoration-color: var(--rule); }
.crumbs-sep { color: var(--amber); margin: 0 .35rem; }
.crumbs-current { color: var(--muted); }

.layout-single, .layout-with-sidebar { display: block; }
.content-area { min-width: 0; }
.page-head { margin-bottom: 2rem; }
.page-lead { color: #BFB6A8; max-width: 44rem; }

.sidebar {
    min-width: 0;
    margin-top: 3rem;
    background-color: var(--sheet);
    background-image: var(--grain);
    border: 1px solid var(--divider);
    padding: 1.6rem 1.5rem;
    color: var(--text);
}
.sidebar .widget + .widget { margin-top: 2rem; }
.sidebar .widget-title {
    display: flex; align-items: center; gap: .6rem;
    margin: 0 0 1rem;
    font-family: var(--head); font-weight: 500;
    text-transform: uppercase; letter-spacing: .06em;
    font-size: 1.15rem; color: var(--white);
}
.sidebar .widget-title::before { content: ""; width: 1.4rem; height: 3px; background: var(--amber); flex: 0 0 auto; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .6rem 0; border-bottom: 1px solid var(--divider); color: var(--text); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--text); text-decoration: none; }
.sidebar a:hover { color: var(--amber); }
.sidebar .post-date { display: block; font-size: .75rem; color: var(--muted); letter-spacing: .1em; }
.sidebar p, .sidebar .textwidget { color: #CFC9BD; }

/* Запись и страница */
.entry-head { margin-bottom: 1.4rem; }
.entry-title {
    margin: 0 0 .6rem;
    font-size: clamp(1.9rem, 5vw, 3.1rem);
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.08;
}
.entry-meta {
    display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
    font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
    margin: 0;
}
.entry-cats a { color: var(--amber); text-decoration: none; margin-right: .6rem; }
.entry-cover { margin: 0 0 2rem; background: var(--film); padding: 14px 10px 10px; border: 1px solid #000; }
.entry-cover img { display: block; width: 100%; }
.entry-content { font-size: 1.05rem; line-height: 1.72; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.85rem; text-transform: uppercase; font-weight: 500; }
.entry-content h3 { font-size: 1.4rem; font-weight: 500; }
.entry-content h4 { font-size: 1.15rem; }
.entry-content a { color: var(--amber); text-decoration-color: rgba(232, 163, 61, .45); }
.entry-content a:hover { text-decoration-color: var(--amber); }
.entry-content img { display: block; }
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption, .wp-caption-text { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ice); margin-top: .5rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--amber); }
.entry-content ol li::marker { color: var(--amber); font-family: var(--head); }
.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.4rem 1.6rem;
    background: var(--wine);
    border-left: 3px solid var(--amber);
    font-size: 1.12rem;
    color: var(--white);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: .6rem; font-size: .8rem; font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .95rem; border: 1px solid var(--rule); }
.entry-content th, .entry-content td { border: 1px solid var(--rule); padding: .6rem .8rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--sheet); font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--white); }
.entry-content pre { background: var(--film); border: 1px solid var(--divider); padding: 1rem 1.2rem; overflow-x: auto; font-size: .9rem; }
.entry-content code { background: var(--sheet); padding: .1em .35em; font-size: .92em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content hr { border: 0; border-top: 1px solid var(--divider); margin: 2.4rem 0; }
.table-scroll, .wp-block-table { overflow-x: auto; }
.alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.page-links { margin-top: 1.6rem; font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; }
.entry-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.entry-tags a { font-size: .82rem; text-decoration: none; padding: .3rem .7rem; border: 1px solid var(--rule); color: var(--text); }
.entry-tags a:hover { border-color: var(--amber); color: var(--amber); }

.post-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 3rem 0 0; }
.post-nav-link {
    display: block;
    padding: 1.1rem 1.3rem;
    border: 1px solid var(--rule);
    text-decoration: none;
    color: var(--white);
    font-family: var(--head);
    font-size: 1.05rem;
    line-height: 1.25;
    transition: border-color .15s, transform .15s;
}
.post-nav-link span { display: block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: .3rem; }
.post-nav-link:hover { border-color: var(--amber); transform: translate(-2px, -2px); color: var(--white); }
.post-nav-next { text-align: right; }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2.6rem; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: .5rem .8rem;
    border: 1px solid var(--rule);
    font-family: var(--head);
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    background: transparent;
}
.pager a.page-numbers:hover { border-color: var(--amber); color: var(--amber); }
.pager .page-numbers.current { background: var(--amber); border-color: var(--amber); color: #111; }
.pager .page-numbers.dots { border: 0; min-width: auto; padding-inline: .2rem; color: var(--muted); }

/* Поиск */
.search-form { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.2rem 0 1.6rem; max-width: 32rem; }
.search-field {
    flex: 1 1 12rem;
    min-width: 0;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 0;
    color: var(--text);
    font: inherit;
    padding: .65rem .8rem;
}
.search-field::placeholder { color: var(--muted); }
.search-field:focus { border-color: var(--amber); outline: none; }

/* 404 */
.notfound-code {
    margin: 0;
    font-family: var(--head);
    font-weight: 600;
    font-size: clamp(6rem, 20vw, 11rem);
    line-height: .9;
    color: var(--amber);
}

/* Комментарии */
.comments { margin-top: 3.4rem; padding-top: 2.4rem; border-top: 1px solid var(--divider); }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.4rem; padding-left: 1rem; border-left: 1px solid var(--divider); }
.note-body { padding: 1.2rem 1.3rem; margin-bottom: 1rem; background: var(--sheet); border: 1px solid var(--divider); }
.note-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .7rem; }
.note-head img { display: block; border-radius: 0; filter: grayscale(1); }
.note-author { display: block; font-family: var(--head); font-size: 1.05rem; color: var(--white); }
.note-date { font-size: .74rem; letter-spacing: .12em; color: var(--muted); }
.note-moderation { color: var(--amber); font-size: .9rem; }
.note-text p:last-child { margin-bottom: 0; }
.note-reply { margin-top: .6rem; }
.note-reply a { font-family: var(--head); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); text-decoration: none; }
.comment-respond { margin-top: 2rem; }
.comment-reply-title { font-family: var(--head); text-transform: uppercase; font-weight: 500; font-size: 1.5rem; margin: 0 0 1rem; }
.comment-reply-title small { margin-left: 1rem; font-size: .8rem; }
.comment-form label { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 0;
    color: var(--text);
    font: inherit;
    padding: .65rem .8rem;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--amber); outline: none; }
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.comment-notes, .logged-in-as { font-size: .85rem; color: var(--muted); }
.req { color: var(--amber); }
.comment-form .submit {
    font-family: var(--head); font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
    background: var(--amber); color: #111; border: 1px solid var(--amber); border-radius: 0;
    padding: .7rem 1.4rem; cursor: pointer; font-size: .95rem;
}
.comment-form .submit:hover { background: var(--white); border-color: var(--white); }
.comments .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ---------- Подвал ---------- */
.colophon { background-color: var(--paper-deep); background-image: var(--grain); border-top: 1px solid var(--divider); color: var(--muted); }
.colophon-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.2rem; padding: 2.8rem 0 2.2rem; }
.colophon-col { min-width: 0; }
.colophon .widget-title {
    margin: 0 0 .8rem;
    font-family: var(--head); font-weight: 500;
    text-transform: uppercase; letter-spacing: .06em;
    font-size: 1.15rem; color: var(--white);
}
.colophon .widget, .colophon .textwidget, .colophon p { color: #ADA596; font-size: .9rem; line-height: 1.55; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin: 0 0 .35rem; }
.colophon a { color: var(--text); text-decoration-color: var(--rule); }
.colophon a:hover { color: var(--amber); }
.colophon .widget_nav_menu a {
    font-family: var(--head);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .92rem;
    text-decoration: none;
}
.colophon-bottom { border-top: 1px solid var(--divider); }
.colophon-bottom p {
    margin-block: 0;
    padding: 1rem 0 1.1rem;
    text-align: center;
    font-family: var(--head);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .78rem;
    color: var(--muted);
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .8rem 1.6rem;
    padding: 1rem 1.4rem;
    background: var(--sheet);
    border-top: 2px solid var(--amber);
    color: var(--text);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .45);
}
.cookie-text { margin: 0; font-size: .9rem; max-width: 46rem; color: var(--text); }

/* ---------- ≥ 600px ---------- */
@media (min-width: 600px) {
    .shell { width: min(85%, 1180px); }
    .nav-toggle { display: none; }
    .primary-nav, .primary-nav.is-open { display: block; width: auto; }
    .primary-menu { display: flex; flex-wrap: wrap; margin: 0; }
    .primary-menu li { border-top: 0; }
    .primary-menu li + li { border-left: 1px solid var(--rule); }
    .primary-menu a { padding: .1rem 1rem; font-size: .92rem; }
    .primary-menu li:last-child a { padding-right: 0; }
    .masthead-brand { gap: 1.8rem; padding: 2rem 0 2.4rem; }
    .brand-aperture { width: 74px; height: 74px; }
    .band { padding: 3.2rem 0; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .select-foot { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); }
    .post-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-nav-next { grid-column: 2; }
    .colophon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem; }
    .scheme-lines { display: block; flex: 0 0 auto; width: 220px; height: 320px; }
    .scheme-labels { grid-template-rows: repeat(4, 80px); gap: 0; flex: 0 1 15rem; }
}

/* ---------- ≥ 960px ---------- */
@media (min-width: 960px) {
    .scale-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 16rem); gap: 3rem; align-items: start; }
    .scale-notes { border-top: 0; padding-top: 2.2rem; }
    .card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .glossary-layout { grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); }
    .glossary-head .tag-title { white-space: nowrap; font-size: 2.1rem; }
    .glossary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0; }
    .glossary-row:nth-child(odd) { padding-right: 1.6rem; border-right: 1px solid var(--divider); }
    .glossary-row:nth-child(even) { padding-left: 1.6rem; }
    .glossary-row:nth-last-child(-n+2) { border-bottom: 0; }
    .layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
    .layout-with-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
        column-gap: 6%;
        align-items: start;
    }
    .layout-with-sidebar .sidebar { margin-top: 0; }
}

/* ---------- ≥ 1200px ---------- */
@media (min-width: 1200px) {
    .frame-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr); gap: 2.4rem; align-items: center; }
    .frame-scheme { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 12rem); align-items: stretch; }
    .scheme-lines { width: 100%; height: auto; aspect-ratio: 220 / 320; }
    .scheme-labels { grid-template-rows: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
    .scale-hand { font-size: 1.05rem; }
    .scale-hand svg { width: 30px; }
    .swatch { width: 40px; height: 40px; }
    .glossary-row { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
    .cookie-banner { padding: 1rem 1.1rem; }
    .sidebar { padding: 1.3rem 1.1rem; }
    .note-body { padding: 1rem 1.1rem; }
    .entry-content blockquote { padding: 1.1rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
