/*
Theme Name: dds_aksakovmagazine.ru
Theme URI: https://aksakovmagazine.ru/
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: aksmag
*/

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

/* ---------- Переменные ---------- */
:root {
    --paper: #EDE6D6;
    --paper-light: #F4EFE2;
    --paper-card: #F7F2E6;
    --grid: #C9C0AC;
    --forest: #3B4A3F;
    --forest-deep: #2F3C33;
    --ink-blue: #1F2A44;
    --ochre: #D8B15A;
    --text: #22201C;
    --muted: #6E6A5E;
    --terra: #D8542B;
    --terra-dark: #B8441F;
    --sage: #4F7A6A;
    --mustard: #E8C34A;
    --line: #8C8474;
    --kraft: #E3D7BC;
    --tape: rgba(226, 211, 170, 0.86);
    --sticky: #F3DE95;
    --on-dark: #EDE6D6;
    --f-body: "PT Sans", "Segoe UI", Arial, sans-serif;
    --f-head: "Roboto Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    --f-mono: "Roboto Mono", "Consolas", "Courier New", monospace;
    --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.22 0 0 0 0 0.16 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 .95 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    --shell-w: 92%;
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--paper);
    background-image:
        var(--grain),
        linear-gradient(rgba(201, 192, 172, 0.32) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 192, 172, 0.32) 1px, transparent 1px);
    background-size: 160px 160px, 22px 22px, 22px 22px;
}
p, li, dd, blockquote, h1, h2, h3, h4, h5, h6, figcaption, td, th, a, span { overflow-wrap: break-word; }
p, li, dd, blockquote, figcaption, td { hyphens: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-weight: 700; line-height: 1.2; margin: 1.4em 0 0.6em; color: var(--text); }
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--sage); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s; }
a:hover { color: var(--terra); text-decoration-style: wavy; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px dashed var(--terra); outline-offset: 3px; }
figure { margin: 0; }
button { font: inherit; }
.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: -100px; z-index: 100; padding: .6rem 1rem; background: var(--terra); color: #fff; font-family: var(--f-mono); }
.skip-link:focus { top: 1rem; color: #fff; }

.shell { width: min(var(--shell-w), 1180px); margin-inline: auto; }
.home { --shell-w: 85%; }

/* ---------- Кнопка-ярлык ---------- */
.tag-btn {
    display: inline-block;
    padding: .5rem 1.15rem .55rem;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: .01em;
    color: #FBF6EA;
    background: var(--terra);
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transform: rotate(-2deg);
    clip-path: polygon(0 6%, 4% 0, 18% 4%, 33% 0, 52% 5%, 70% 1%, 86% 5%, 100% 0, 98% 30%, 100% 62%, 97% 100%, 80% 95%, 62% 100%, 44% 96%, 25% 100%, 8% 95%, 0 100%, 2% 66%, 0 34%);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
    transition: transform .15s, background-color .15s;
}
.tag-btn:hover, .tag-btn:focus-visible { color: #FBF6EA; background: var(--terra-dark); transform: rotate(0deg) translateY(-2px); text-decoration: none; }

/* ---------- Шапка ---------- */
.masthead {
    background-color: var(--forest);
    background-image: var(--grain-light), linear-gradient(180deg, rgba(0,0,0,0) 70%, rgba(0,0,0,.12));
    background-size: 160px 160px, auto;
    color: var(--on-dark);
    border-bottom: 4px solid var(--forest-deep);
}
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.4rem 0; position: relative; }
.brand { display: flex; align-items: center; gap: 1.1rem; text-decoration: none; color: var(--on-dark); min-width: 0; }
.brand:hover { color: var(--on-dark); text-decoration: none; }
.brand-mark { flex: 0 0 auto; width: 76px; height: 76px; padding: 4px; background: #E7DCC2; box-shadow: 2px 3px 0 rgba(0,0,0,.25); transform: rotate(-2deg); }
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1; letter-spacing: .01em; color: #F1EADA; }
.brand-sub { display: block; font-family: var(--f-mono); font-weight: 500; font-size: clamp(.95rem, 1.5vw, 1.2rem); letter-spacing: .04em; margin-top: .35rem; color: #E4DCC9; }
.brand-desc { display: block; margin-top: .45rem; max-width: 54ch; font-size: .86rem; line-height: 1.3; color: #CFC7B3; }

.nav-toggle { display: none; }
.site-nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; }
.site-nav-list li { display: flex; align-items: center; min-width: 0; }
.site-nav-list li + li { border-left: 1px solid rgba(237, 230, 214, .38); }
.site-nav-list a { display: block; padding: .45rem 1.25rem; font-family: var(--f-head); font-size: 1.08rem; line-height: 1.2; text-align: center; color: var(--on-dark); text-decoration: none; max-width: 10.5em; }
.site-nav-list a:hover, .site-nav-list .current-menu-item > a { color: var(--mustard); text-decoration: underline wavy var(--terra); text-underline-offset: 5px; }

/* ---------- Ярлык-заголовок секции ---------- */
.strip-title {
    position: relative;
    display: inline-block;
    margin: 0 0 1.6rem;
    padding: .45rem 1.3rem .5rem 1.1rem;
    font-family: var(--f-mono);
    font-weight: 500;
    font-size: clamp(1.25rem, 2.3vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: .015em;
    color: var(--text);
    background-color: #E6D9B6;
    background-image: var(--grain);
    background-size: 160px 160px;
    transform: rotate(-1deg);
    clip-path: polygon(1% 4%, 30% 0, 62% 5%, 99% 0, 97% 26%, 100% 52%, 98% 78%, 100% 100%, 64% 95%, 33% 100%, 0 96%, 2% 70%, 0 44%, 2% 20%);
    filter: drop-shadow(0 2px 0 rgba(0,0,0,.08));
    max-width: 100%;
}
.strip-num { font-weight: 700; margin-right: .2em; }
.strip-title--on-dark { background-color: #E2D3AE; }
.strip-title--page { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1.2rem; }
.plain-title { margin: 0 0 1.6rem; font-family: var(--f-mono); font-weight: 500; font-size: clamp(1.35rem, 2.4vw, 1.8rem); letter-spacing: .02em; }

/* ---------- Полосы главной ---------- */
.band { position: relative; padding: 3.2rem 0; }
.band--paper { background: transparent; }
.band--forest {
    background-color: var(--forest);
    background-image: var(--grain-light);
    background-size: 160px 160px;
    color: var(--on-dark);
}
.leaf { position: absolute; pointer-events: none; height: auto; }

/* Блок 1: карта квартала */
.quarter-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 2.4rem; align-items: start; }
.quarter-sheet-wrap { position: relative; min-width: 0; }
.quarter-sheet-wrap .strip-title { position: relative; z-index: 3; margin-bottom: -1.4rem; margin-left: -.6rem; }
.quarter-sheet {
    position: relative;
    container-type: inline-size;
    aspect-ratio: 494 / 292;
    background-color: #F2ECDE;
    background-image:
        linear-gradient(rgba(140, 132, 116, .33) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 132, 116, .33) 1px, transparent 1px),
        var(--grain);
    background-size: 3.4% 5.75%, 3.4% 5.75%, 160px 160px;
    background-position: -1px -1px, -1px -1px, 0 0;
    border: 1px solid #D8CFBB;
    box-shadow: 0 6px 14px rgba(60, 50, 30, .14), 0 1px 0 rgba(0,0,0,.05);
}
.quarter-ink { position: absolute; left: 18.6%; top: 1.7%; width: 66.8%; height: auto; }
.street { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); font-family: var(--f-hand); font-weight: 700; font-size: 1rem; font-size: 3.6cqw; line-height: 1; white-space: nowrap; color: #2B2925; }
.street--lenina { left: 39.5%; top: 11.6%; --r: -16deg; }
.street--mira { left: 25.3%; top: 64%; --r: -78deg; }
.street--square { left: 59.5%; top: 71.5%; --r: -6deg; font-size: .9rem; font-size: 3cqw; }
.street--tihiy { left: 46.6%; top: 91.6%; --r: -2deg; }
.snap {
    position: absolute;
    margin: 0;
    padding: 6px 6px 18px;
    padding: .9cqw .9cqw 2.9cqw;
    background: #FBF9F3;
    box-shadow: 0 3px 8px rgba(40, 30, 15, .22);
    transform: rotate(var(--r, 0deg));
    transition: transform .25s;
}
.snap img { width: 100%; aspect-ratio: 1 / .93; object-fit: cover; display: block; filter: saturate(.95) contrast(1.02); }
.snap::before {
    content: "";
    position: absolute;
    top: -7%; left: 30%;
    width: 44%; height: 15%;
    background: var(--tape);
    transform: rotate(-4deg);
    box-shadow: 0 1px 1px rgba(0,0,0,.06);
}
.snap:hover { transform: rotate(0deg) scale(1.04); z-index: 4; }
.snap--bakery { left: 2.4%; top: 15%; width: 19%; --r: -5deg; }
.snap--cafe { left: 2%; top: 59%; width: 17.4%; --r: -3deg; }
.snap--bench { left: 53.4%; top: 22%; width: 17%; --r: 3deg; }
.snap--graffiti { left: 77.6%; top: 7.5%; width: 19%; --r: 3deg; }
.snap--bicycle { left: 76%; top: 58.5%; width: 19.6%; --r: -4deg; }
.quarter-notes { position: relative; padding-top: 3.2rem; min-width: 0; }
.quarter-notes-title { margin: 0 0 1.1rem; font-family: var(--f-mono); font-weight: 500; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.25; }
.quarter-notes p { margin: 0 0 1.1rem; font-size: 1rem; line-height: 1.45; }
.quarter-notes strong { font-family: var(--f-head); font-weight: 700; }
.leaf--quarter { right: -3.5rem; bottom: -5.5rem; width: 150px; transform: rotate(8deg); z-index: 2; }

/* Блок 2: разбор привычки */
.habit { padding-bottom: 2.6rem; overflow: hidden; }
.habit .shell { position: relative; }
.habit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.2rem; align-items: stretch; }
.habit-side { display: flex; flex-direction: column; justify-content: space-around; gap: 2rem; min-width: 0; }
.habit-note { display: flex; align-items: center; gap: .3rem; margin: 0; font-family: var(--f-hand); font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.1; color: #F1EADA; }
.habit-side--left .habit-note { justify-content: flex-end; text-align: right; }
.habit-note--a { transform: translateY(-.6rem); }
.habit-note--b { padding-left: 1rem; }
.habit-note--c { transform: translateY(-1rem); }
.habit-note--d { padding-left: 1.6rem; }
.habit-arrow { flex: 0 0 auto; width: 78px; height: 30px; fill: none; stroke: #E8E1D0; stroke-width: 2.2; stroke-dasharray: 6 5; stroke-linecap: round; }
.habit-arrow path + path { stroke-dasharray: none; }
.habit-arrow--flip { transform: scaleX(-1); }
.habit-photo {
    position: relative;
    margin: 0;
    padding: 8px;
    background: #FBF9F3;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .35);
    transform: rotate(.5deg);
}
.habit-photo::before { content: ""; position: absolute; top: -12px; left: 38%; width: 26%; height: 24px; background: var(--tape); transform: rotate(-2deg); }
.habit-photo img { width: 100%; aspect-ratio: 882 / 641; object-fit: cover; }
.habit-caption { max-width: 62ch; margin: 2rem auto 0; text-align: center; font-size: .98rem; color: #D7D0BF; }
.leaf--habit { left: -4.6rem; top: 42%; width: 104px; transform: rotate(-12deg); opacity: .95; }

/* Свежие заметки и карточки */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 1.8rem; }
.card-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.2rem 1.3rem 1.4rem;
    filter: drop-shadow(0 3px 4px rgba(60, 45, 20, .18));
    transition: transform .25s;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: var(--paper-card);
    background-image: var(--grain);
    background-size: 160px 160px;
    clip-path: polygon(0 1%, 9% 0, 21% 1.2%, 36% .2%, 51% 1%, 66% 0, 81% 1.3%, 100% .3%, 99.2% 14%, 100% 29%, 99% 45%, 100% 61%, 99.3% 77%, 100% 92%, 99% 100%, 84% 98.8%, 68% 100%, 52% 99%, 36% 100%, 20% 98.9%, 5% 100%, 0 98.8%, .8% 84%, 0 68%, .9% 52%, 0 36%, .7% 19%);
}
.card { isolation: isolate; }
.card:hover { transform: translateY(-4px) rotate(-.4deg); }
.card-head { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.card-head::before {
    content: "";
    position: absolute;
    left: .6rem; top: -1.7rem;
    width: 16px; height: 46px;
    z-index: 3;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 46'%3E%3Cpath d='M11 30V7a4 4 0 0 0-8 0v29a5 5 0 0 0 10 0V12' fill='none' stroke='%23777169' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.card-thumb { position: relative; display: block; flex: 0 0 56%; max-width: 56%; padding: 5px 5px 14px; background: #FDFCF8; box-shadow: 0 2px 5px rgba(0,0,0,.16); transform: rotate(-1.5deg); }
.card-thumb::after { content: ""; position: absolute; top: -10px; right: -26%; width: 62%; height: 22px; background: var(--tape); transform: rotate(3deg); }
.card-thumb img { display: block; width: 100%; aspect-ratio: 1 / .92; object-fit: cover; }
.card-date { font-family: var(--f-mono); font-weight: 500; font-size: .86rem; color: var(--text); padding-top: .3rem; white-space: nowrap; }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-title { margin: 0 0 .4rem; font-family: var(--f-head); font-size: 1.28rem; line-height: 1.2; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--terra); text-decoration: underline wavy var(--terra); }
.card-excerpt { flex: 1; font-size: .95rem; line-height: 1.45; color: #3A3731; margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more { align-self: flex-end; }
.empty-note { font-family: var(--f-hand); font-size: 1.6rem; color: var(--muted); }

/* Блоки 3 и 4 */
.band.duo { padding: 0; }
.duo { background-color: var(--paper-light); background-image: var(--grain); background-size: 160px 160px; }
.duo-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: stretch; }
.calendar { position: relative; padding: 3.2rem 2.6rem 3.4rem 0; min-width: 0; }
.calendar-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 13rem); gap: 1.4rem; align-items: start; }
.calendar-week { min-width: 0; }
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: .35rem; font-family: var(--f-head); font-size: .98rem; text-align: center; color: var(--text); }
.calendar-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(58px, auto));
    border-right: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
    background-color: #F8F4EA;
    background-image:
        linear-gradient(90deg, var(--line) 2px, transparent 2px),
        linear-gradient(180deg, var(--line) 2px, transparent 2px);
    background-size: calc(100% / 7) 100%, 100% calc(100% / 5);
}
.cal-snap { position: relative; z-index: 2; align-self: center; justify-self: center; width: 84%; margin: 0; padding: 4px 4px 9px; background: #FDFCF8; box-shadow: 0 2px 5px rgba(0,0,0,.22); }
.cal-snap::before { content: ""; position: absolute; top: -6px; left: 30%; width: 40%; height: 11px; background: var(--tape); }
.cal-snap img { width: 100%; aspect-ratio: 1 / .92; object-fit: cover; }
.cal-snap--1 { grid-column: 1; grid-row: 2; transform: rotate(-4deg); }
.cal-snap--2 { grid-column: 4; grid-row: 1; transform: rotate(4deg); }
.cal-snap--3 { grid-column: 6; grid-row: 2; transform: rotate(-3deg); }
.cal-snap--4 { grid-column: 2; grid-row: 4; transform: rotate(3deg); }
.cal-sticker {
    position: relative;
    z-index: 3;
    align-self: center;
    justify-self: center;
    width: 140%;
    margin: 0;
    padding: .45rem .3rem;
    font-family: var(--f-hand);
    font-weight: 700;
    font-size: 1.12rem;
    line-height: 1.05;
    text-align: center;
    color: #26231D;
    hyphens: manual;
    background: var(--sticky);
    box-shadow: 0 2px 4px rgba(0,0,0,.18);
}
.cal-sticker--wed { grid-column: 3; grid-row: 2; transform: rotate(-5deg); }
.cal-sticker--fri { grid-column: 5; grid-row: 3; transform: rotate(-3deg); }
.cal-sticker--sun { grid-column: 7; grid-row: 4; transform: rotate(-6deg) translateX(18%); }
.calendar-tips { list-style: none; margin: 1.8rem 0 0; padding: 0; }
.calendar-tips li { position: relative; margin: 0 0 1.15rem; padding-left: 1.4rem; font-family: var(--f-head); font-size: 1.08rem; line-height: 1.3; }
.calendar-tips li::before { content: ""; position: absolute; left: 0; top: .45em; width: 9px; height: 9px; background: var(--sage); transform: rotate(45deg); }
.leaf--calendar { left: -4rem; bottom: 1.2rem; width: 104px; transform: rotate(-6deg); }

.shelf {
    position: relative;
    padding: 3.2rem 0 3.4rem 2.6rem;
    min-width: 0;
    background-color: var(--ochre);
    box-shadow: 0 0 0 100vmax var(--ochre);
    clip-path: inset(0 -100vmax 0 0);
}
.shelf .strip-title { background-color: #EADBB2; }
.shelf-motto { position: relative; display: block; margin: 0 0 1.2rem; text-align: center; font-family: var(--f-hand); font-weight: 700; font-size: clamp(2.1rem, 3.6vw, 3rem); line-height: 1; color: var(--text); transform: rotate(-2deg); }
.shelf-motto span { display: inline-block; }
.shelf-underline { display: block; width: min(78%, 300px); height: 14px; margin: .15rem auto 0; fill: none; stroke: var(--terra); stroke-width: 2.4; stroke-linecap: round; }
.shelf-art { position: relative; container-type: inline-size; max-width: 520px; margin: 0 auto; }
.shelf-art img { width: 100%; aspect-ratio: 870 / 490; }
.spine {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--f-head);
    font-size: .8rem;
    font-size: 4.3cqw;
    line-height: 1.02;
    text-align: center;
    color: #23211C;
    overflow: hidden;
}
.spine--1 { left: 6.9%; width: 14%; top: 22%; bottom: 13.5%; }
.spine--2 { left: 32.2%; width: 9.6%; top: 32%; bottom: 13.5%; }
.spine--3 { left: 43.6%; width: 8.8%; top: 23%; bottom: 13.5%; }
.spine--4 { left: 63.5%; width: 8.8%; top: 27.5%; bottom: 13.5%; }
.spine--5 { left: 83.8%; width: 9.4%; top: 35%; bottom: 13.5%; transform: rotate(178deg); }
.shelf-text { max-width: 40ch; margin: 1.4rem auto 1.2rem; text-align: center; font-size: .98rem; color: #2A2620; }
.shelf .tag-btn { display: table; margin: 0 auto; }

/* ---------- Внутренние страницы ---------- */
.inner { padding: 1.8rem 0 3.6rem; }
.crumbs { margin: 0 0 1.6rem; font-family: var(--f-mono); font-size: .82rem; color: var(--muted); }
.crumbs a { color: var(--sage); text-decoration: underline wavy rgba(79, 122, 106, .5); text-underline-offset: 4px; }
.crumbs a:hover { color: var(--terra); }
.crumbs-sep { margin: 0 .25rem; color: var(--terra); }
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67fr) minmax(0, 27fr); gap: 6%; align-items: start; }
.layout-single { display: block; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }
.page-head { margin-bottom: 1.6rem; }
.page-intro { max-width: 70ch; color: var(--muted); }

.paper-sheet {
    position: relative;
    padding: 2.4rem 2.6rem;
    margin-bottom: 2rem;
    background-color: var(--paper-card);
    background-image:
        linear-gradient(rgba(201, 192, 172, .3) 1px, transparent 1px),
        var(--grain);
    background-size: 100% 28px, 160px 160px;
    border: 1px solid #DDD3BF;
    box-shadow: 0 6px 16px rgba(60, 45, 20, .12);
}
.paper-sheet::before { content: ""; position: absolute; top: -12px; left: 50%; width: 120px; height: 24px; margin-left: -60px; background: var(--tape); transform: rotate(-2deg); }
.entry-head { margin-bottom: 1.4rem; }
.entry-title { margin: 0 0 .5rem; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin: 0; font-family: var(--f-mono); font-size: .84rem; color: var(--muted); }
.entry-cat a { color: var(--sage); }
.entry-cover { margin: 0 0 1.6rem; padding: 8px 8px 22px; background: #FDFCF8; box-shadow: 0 3px 8px rgba(0,0,0,.18); transform: rotate(-.6deg); }
.entry-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.entry-content { font-size: 1.06rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-family: var(--f-mono); font-weight: 500; font-size: 1.5rem; display: inline-block; padding: 0 .3rem; background: linear-gradient(transparent 58%, rgba(232, 195, 74, .55) 58%); }
.entry-content h3 { font-size: 1.3rem; border-bottom: 2px solid var(--terra); display: inline-block; padding-bottom: .1rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content ul { list-style: none; padding-left: 1.4rem; }
.entry-content ul li { position: relative; }
.entry-content ul li::before { content: ""; position: absolute; left: -1.1rem; top: .62em; width: 7px; height: 7px; background: var(--sage); transform: rotate(45deg); }
.entry-content ol li::marker { font-family: var(--f-mono); color: var(--terra); }
.entry-content li { margin-bottom: .35em; }
.entry-content blockquote { position: relative; margin: 1.6rem 0; padding: 1.2rem 1.4rem 1.2rem 1.6rem; background: var(--sticky); border-left: 4px solid var(--sage); font-family: var(--f-hand); font-size: 1.45rem; line-height: 1.25; transform: rotate(-.4deg); box-shadow: 0 2px 5px rgba(0,0,0,.12); }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content figure { margin: 1.6rem 0; }
.entry-content figcaption { margin-top: .4rem; font-family: var(--f-hand); font-size: 1.2rem; color: var(--muted); text-align: center; }
.entry-content table { width: 100%; margin: 1.6rem 0; border-collapse: collapse; border: 2px solid var(--line); background: #FBF8F0; font-size: .95rem; }
.entry-content th, .entry-content td { padding: .55rem .75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { font-family: var(--f-head); background: #EADFC4; }
.entry-content pre { overflow-x: auto; padding: 1rem; background: #EFE7D4; font-family: var(--f-mono); font-size: .9rem; }
.entry-content a { color: var(--terra-dark); }
.entry-content hr { border: 0; height: 12px; margin: 2rem 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12'%3E%3Cpath d='M0 6 Q10 0 20 6 T40 6' fill='none' stroke='%238C8474' stroke-width='1.5'/%3E%3C/svg%3E") repeat-x center; }
.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; }
.wp-caption-text { font-size: .9rem; color: var(--muted); }
.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.6rem 0 0; }
.entry-tags a { padding: .2rem .6rem; font-family: var(--f-mono); font-size: .8rem; background: #E8DCC0; color: var(--text); text-decoration: none; }
.entry-tags a:hover { background: var(--mustard); }

/* Сайдбар */
.sidebar {
    position: relative;
    min-width: 0;
    padding: 2rem 1.6rem 1.6rem;
    background-color: var(--kraft);
    background-image: var(--grain);
    background-size: 160px 160px;
    color: var(--text);
    box-shadow: 0 4px 12px rgba(60, 45, 20, .14);
    transform: rotate(.4deg);
}
.sidebar::before { content: ""; position: absolute; top: -11px; left: 18%; width: 90px; height: 22px; background: var(--tape); transform: rotate(-4deg); }
.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title { margin: 0 0 .9rem; padding-bottom: .4rem; font-family: var(--f-mono); font-weight: 500; font-size: 1.15rem; color: var(--text); border-bottom: 2px solid var(--terra); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0; border-bottom: 1px dashed rgba(110, 106, 94, .45); line-height: 1.35; color: var(--text); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: #2A2620; text-decoration: none; }
.sidebar a:hover { color: var(--terra-dark); text-decoration: underline wavy var(--terra); }
.sidebar .post-date { display: block; font-family: var(--f-mono); font-size: .78rem; color: #5E5A4F; }
.sidebar p, .sidebar .textwidget { color: var(--text); }

/* Пагинация */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .55rem; margin: 2.6rem 0 0; }
.pager .page-numbers { display: inline-block; min-width: 2.6rem; padding: .45rem .8rem; font-family: var(--f-mono); font-weight: 500; font-size: .95rem; text-align: center; text-decoration: none; color: var(--text); background: var(--paper-card); border: 1px solid #CFC4AC; box-shadow: 0 2px 0 rgba(0,0,0,.08); transition: transform .15s, background-color .15s; }
.pager a.page-numbers:hover { background: var(--mustard); transform: rotate(-2deg); color: var(--text); }
.pager .page-numbers.current { color: #FBF6EA; background: var(--terra); border-color: var(--terra); transform: rotate(-2deg); }
.pager .page-numbers.dots { background: none; border: 0; box-shadow: none; min-width: 0; }
.pager--inline { justify-content: flex-start; margin-top: 1.4rem; }
.pager--inline > a, .pager--inline > span { padding: .3rem .7rem; border: 1px solid #CFC4AC; text-decoration: none; }

/* Поиск */
.search-form { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0; }
.search-field { flex: 1 1 14rem; min-width: 0; padding: .65rem .9rem; font: inherit; color: var(--text); background: #FDFBF5; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 0; }
.search-submit { transform: none; }

/* 404 */
.lost { text-align: left; }
.lost-code { margin: 0 0 .2rem; font-family: var(--f-mono); font-weight: 700; font-size: clamp(4rem, 12vw, 7.5rem); line-height: 1; color: var(--terra); transform: rotate(-3deg); display: inline-block; }

/* Комментарии */
.comments-area { padding-top: 2rem; }
.comments-title, .comment-reply-title { margin: 0 0 1.2rem; font-family: var(--f-mono); font-weight: 500; font-size: 1.35rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 1.6rem; border-left: 2px dashed rgba(140,132,116,.5); }
.note-comment-body { margin-bottom: 1.2rem; padding: 1rem 1.2rem; background: #FBF8EF; border: 1px solid #E0D6C1; }
.note-comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; margin-bottom: .5rem; font-size: .9rem; }
.note-comment-meta img { border-radius: 50%; }
.note-comment-author { font-family: var(--f-head); font-weight: 700; }
.note-comment-meta time { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.note-comment-wait { font-style: italic; color: var(--terra-dark); }
.note-comment-reply a { font-family: var(--f-mono); font-size: .82rem; color: var(--sage); }
.comment-form label { display: block; margin-bottom: .3rem; font-family: var(--f-head); font-size: .95rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: .6rem .8rem; font: inherit; color: var(--text); background: #FDFBF5; border: 1px solid var(--line); border-radius: 0; }
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-family: var(--f-body); font-size: .9rem; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--muted); }
.form-submit .submit { padding: .6rem 1.4rem; font-family: var(--f-head); font-weight: 700; font-size: 1rem; color: #FBF6EA; background: var(--terra); border: 0; cursor: pointer; transform: rotate(-1.5deg); }
.form-submit .submit:hover { background: var(--terra-dark); transform: none; }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; font-family: var(--f-mono); font-size: .85rem; }

/* ---------- Подвал ---------- */
.colophon {
    padding: 3rem 0 1.6rem;
    background-color: var(--ink-blue);
    background-image: var(--grain-light);
    background-size: 160px 160px;
    color: #E6E1D4;
}
.colophon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem; }
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1.4rem; }
.colophon .widget-title { margin: 0 0 .7rem; font-family: var(--f-mono); font-weight: 500; font-size: clamp(1.4rem, 2.3vw, 1.85rem); color: #F2EDE1; }
.colophon .textwidget, .colophon p { color: #D9D3C4; font-size: .98rem; line-height: 1.45; }
.colophon a { color: #F2EDE1; }
.colophon a:hover { color: var(--mustard); }
.colophon-col--right { text-align: right; }
.colophon-col--mid { text-align: center; }
.colophon-col--mid ul { list-style: none; margin: 0; padding: 0; }
.colophon-col--mid li { margin: 0 0 .35rem; }
.colophon-col--mid a { color: #EDE8DC; text-decoration: underline wavy rgba(232, 195, 74, .7); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.colophon-col--mid a:hover { color: var(--mustard); text-decoration-color: var(--terra); }
.colophon .sidebar-like li, .colophon li { color: #D9D3C4; }
.colophon-copy { margin-top: 1.6rem; margin-bottom: 0; padding-top: 1.2rem; border-top: 1px dashed rgba(230, 225, 212, .25); text-align: center; font-size: .86rem; color: #C8C2B2; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    max-width: 760px;
    margin: 0 auto;
    padding: 1.1rem 1.4rem;
    background-color: var(--sticky);
    background-image: var(--grain);
    background-size: 160px 160px;
    color: var(--text);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
    transform: rotate(-.4deg);
}
.cookie-banner-text { margin: 0; font-size: .95rem; line-height: 1.4; }
.cookie-banner-btn { flex: 0 0 auto; }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
    .leaf--quarter { right: -1rem; bottom: -4rem; width: 120px; }
    .leaf--habit { display: none; }
    .leaf--calendar { left: -2.4rem; width: 80px; }
}

@media (max-width: 960px) {
    .home { --shell-w: 92%; }
    .masthead-row { flex-wrap: wrap; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        padding: .5rem .8rem;
        font-family: var(--f-mono);
        font-size: .9rem;
        color: var(--on-dark);
        background: transparent;
        border: 1px solid rgba(237, 230, 214, .5);
        cursor: pointer;
    }
    .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--on-dark); position: relative; content: ""; }
    .nav-toggle-bars::before { position: absolute; top: -6px; }
    .nav-toggle-bars::after { position: absolute; top: 6px; }
    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }
    .site-nav-list { flex-direction: column; padding: .4rem 0 .6rem; }
    .site-nav-list li + li { border-left: 0; border-top: 1px solid rgba(237, 230, 214, .25); }
    .site-nav-list a { max-width: none; text-align: left; padding: .7rem .2rem; }

    .quarter-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .quarter-notes { padding-top: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.4rem; }
    .quarter-notes p { margin: 0; }
    .quarter-notes-title { grid-column: 1 / -1; margin-bottom: 0; }
    .leaf--quarter { display: none; }

    .habit-grid { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
    .habit-photo { order: -1; max-width: 560px; justify-self: center; width: 100%; }
    .habit-side { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: .6rem 1.6rem; }
    .habit-side--left .habit-note { justify-content: flex-start; text-align: left; }
    .habit-note, .habit-note--a, .habit-note--b, .habit-note--c, .habit-note--d { transform: none; padding-left: 0; font-size: 1.45rem; }
    .habit-arrow { display: none; }
    .habit-note span::before { content: "— "; color: var(--mustard); }

    .card-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .duo-grid { grid-template-columns: minmax(0, 1fr); }
    .calendar { padding: 3rem 0 2.4rem; }
    .leaf--calendar { display: none; }
    .shelf { padding: 2.8rem 0 3rem; clip-path: inset(0 -100vmax); }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
    .layout-single .content-area { width: 100%; }
    .colophon-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .colophon-col--right, .colophon-col--mid { text-align: left; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .band { padding: 2.4rem 0; }
    .brand-mark { width: 58px; height: 58px; }
    .brand-desc { display: none; }
    .masthead-row { padding: 1rem 0; }

    .quarter-sheet-wrap .strip-title { margin-bottom: -1rem; margin-left: -.2rem; }
    .snap::before { display: none; }
    .quarter-notes { grid-template-columns: minmax(0, 1fr); }

    .card-grid, .card-grid--three { grid-template-columns: minmax(0, 1fr); }
    .card { padding: 1.1rem 1.1rem 1.3rem; }

    .calendar-body { grid-template-columns: minmax(0, 1fr); }
    .calendar-grid { grid-template-rows: repeat(5, minmax(44px, auto)); }
    .cal-sticker { font-size: .86rem; width: 150%; padding: .3rem .15rem; }
    .cal-sticker--sun { transform: rotate(-6deg) translateX(-12%); }
    .calendar-tips { margin-top: .4rem; }

    .paper-sheet { padding: 1.8rem 1.3rem; }
    .sidebar { padding: 1.8rem 1.3rem 1.4rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.2rem; left: .6rem; right: .6rem; bottom: .6rem; }
    .entry-content table { display: block; overflow-x: auto; }
}

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