/*
Theme Name: dds_rodkisten.com
Theme URI: https://rodkisten.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: rodkist
*/

/* ---------- Шрифты ---------- */
@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+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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-condensed-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: "Fira Sans Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fira-sans-condensed-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/fira-sans-condensed-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 Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/fira-sans-condensed-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pangolin"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/pangolin-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: "Pangolin"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/pangolin-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Переменные ---------- */
:root {
    --graphite: #23262B;
    --night: #1A1C20;
    --board: #2A2E34;
    --chalk: #F2EFE6;
    --pencil: #9AA0A6;
    --pencil-light: #C4C8CC;
    --lime: #C6F24E;
    --coral: #FF6B4A;
    --coral-ink: #B8391C;
    --azure: #5BC8E8;
    --kraft: #D8C7A8;
    --forest: #2F4A3C;
    --tape: #E8D44D;
    --paper: #F3F0E6;
    --paper-white: #F6F5F0;
    --ink: #23262B;
    --ink-soft: #5D6268;
    --f-body: "Fira Sans", "Segoe UI", Roboto, Arial, sans-serif;
    --f-head: "Fira Sans Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --f-hand: "Pangolin", "Comic Sans MS", "Segoe Print", cursive;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' 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(%23n)'/%3E%3C/svg%3E");
    --chalk-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 6' preserveAspectRatio='none'%3E%3Cpath d='M0 3.2C80 2.2 160 4.1 240 3S400 2.1 480 3.7 560 2.7 600 3.1' fill='none' stroke='%23F2EFE6' stroke-width='2.2' stroke-opacity='.78' stroke-dasharray='46 2 24 1 70 3 18 1'/%3E%3C/svg%3E");
    --chalk-under: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 6' preserveAspectRatio='none'%3E%3Cpath d='M1 4C30 2.6 64 3.4 119 2.4' fill='none' stroke='%23F2EFE6' stroke-width='1.8' stroke-opacity='.8' stroke-linecap='round'/%3E%3C/svg%3E");
    --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 5Q10 0 20 5T40 5' fill='none' stroke='%23F2EFE6' stroke-width='2' stroke-opacity='.85'/%3E%3C/svg%3E");
    --wave-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 5Q10 0 20 5T40 5' fill='none' stroke='%23FF6B4A' stroke-width='2'/%3E%3C/svg%3E");
}

/* ---------- Скрытие через hidden (A11) ---------- */
.cookie-banner[hidden] { display: none !important; }
[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--graphite);
    background-image:
        var(--grain),
        radial-gradient(ellipse 40% 18% at 18% 22%, rgba(242, 239, 230, .035), transparent 70%),
        radial-gradient(ellipse 30% 14% at 82% 58%, rgba(242, 239, 230, .03), transparent 70%),
        radial-gradient(ellipse 36% 12% at 40% 88%, rgba(242, 239, 230, .03), transparent 70%);
    color: var(--chalk);
    font-family: var(--f-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    hyphens: auto;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 600;
    line-height: 1.18;
    margin: 0 0 .6em;
    overflow-wrap: break-word;
    hyphens: auto;
}
p { margin: 0 0 1em; }
a { color: var(--chalk); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lime); }
:focus-visible { outline: 2px dashed var(--lime); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--lime); color: var(--ink); padding: .6rem 1rem; font-weight: 500;
}
.skip:focus { top: 1rem; }

/* Единственный контейнер ширины */
.shell { width: min(92%, 1180px); margin-inline: auto; }

/* ---------- Скотч ---------- */
.tape {
    position: absolute;
    z-index: 3;
    width: 74px;
    height: 22px;
    background: rgba(232, 212, 77, .86);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    clip-path: polygon(0 6%, 4% 0, 9% 8%, 14% 1%, 100% 0, 97% 30%, 100% 55%, 96% 100%, 0 100%, 3% 70%, 0 40%);
    pointer-events: none;
}

/* ---------- Кнопки ---------- */
.chalk-btn {
    display: inline-block;
    position: relative;
    padding: .42rem 1rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: .98rem;
    line-height: 1.2;
    color: var(--chalk);
    text-decoration: none;
    border: 2px solid currentColor;
    border-radius: 3px 6px 2px 5px;
    box-shadow: 2px 2px 0 -1px currentColor;
    transform: rotate(-1deg);
    transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.chalk-btn:hover { background: var(--lime); color: var(--ink); border-color: var(--ink); transform: rotate(0) translate(-1px, -1px); }
.chalk-btn.ink, .card .chalk-btn { color: var(--ink); }

/* ---------- Шапка ---------- */
.masthead { padding: 2.2rem 0 0; }
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
}
.brand { display: flex; align-items: flex-start; gap: 1.2rem; min-width: 0; flex: 1 1 auto; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; margin-top: .3rem; }
.brand-svg { display: block; width: 64px; height: 64px; }
.brand-logo { display: block; width: 64px; height: auto; }
.brand-text { min-width: 0; }
.site-title {
    font-family: var(--f-hand);
    font-weight: 400;
    font-size: clamp(1.55rem, 3.3vw, 2.55rem);
    line-height: 1.12;
    margin: 0 0 .45rem;
    letter-spacing: .005em;
}
.site-title a { color: var(--chalk); text-decoration: none; }
.site-title a:hover { color: var(--lime); }
.site-desc { margin: 0; max-width: 40rem; font-size: .93rem; line-height: 1.45; color: var(--pencil-light); }
.topnav { flex: 0 0 auto; padding-left: 1.6rem; position: relative; }
.topnav::before {
    content: "";
    position: absolute; left: 0; top: -.3rem; bottom: -.3rem; width: 3px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 200' preserveAspectRatio='none'%3E%3Cpath d='M3 0C2.4 50 3.8 100 2.9 150S3.2 190 3 200' fill='none' stroke='%23F2EFE6' stroke-width='2' stroke-opacity='.7' stroke-dasharray='30 2 50 1 60 3'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.topnav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.topnav-list a {
    display: inline-block;
    padding: .05rem .1rem .35rem;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--chalk);
    text-decoration: none;
    background: var(--chalk-under) left bottom / 100% 6px no-repeat;
    transition: color .15s ease, transform .15s ease;
}
.topnav-list a:hover, .topnav-list .current-menu-item > a { color: var(--lime); transform: translateX(3px); }
.menu-toggle {
    display: none;
    align-items: center;
    gap: .55rem;
    background: transparent;
    color: var(--chalk);
    border: 2px solid var(--chalk);
    border-radius: 3px 6px 2px 5px;
    padding: .45rem .8rem;
    font: 600 1rem var(--f-head);
    cursor: pointer;
}
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: "";
}
.menu-toggle-bars::before { position: absolute; top: -6px; }
.menu-toggle-bars::after { position: absolute; top: 6px; }
.chalk-rule { height: 6px; margin-top: 1.8rem; background: var(--chalk-line) center / 100% 100% no-repeat; }

/* ---------- Главная: общее ---------- */
.front { overflow: hidden; }
.front .shell { width: min(85%, 1180px); }
.fs { position: relative; padding: 2.8rem 0; }
.fs-title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: var(--chalk);
    margin: 0 0 1.6rem;
}
.wavy {
    display: inline-block;
    padding-bottom: .5rem;
    background: var(--wave) left bottom / 40px 10px repeat-x;
}
.tape-edge { width: 120px; height: 30px; }
.empty-note { color: var(--pencil-light); font-style: italic; }

/* ---------- Блок 1: Стена процесса ---------- */
.fs-wall { padding-top: 2rem; }
.wall-strip {
    list-style: none;
    margin: 0;
    padding: 1.2rem 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.6rem;
    align-items: start;
    transform: rotate(-1.6deg);
}
.polaroid {
    position: relative;
    min-width: 0;
    background: #ECEBE6;
    padding: 9px 9px 0;
    box-shadow: 0 10px 18px rgba(0, 0, 0, .38), 0 1px 0 rgba(255, 255, 255, .5) inset;
    transition: transform .2s ease;
}
.polaroid:nth-child(1) { transform: rotate(-5deg) translateY(10px); }
.polaroid:nth-child(2) { transform: rotate(2.5deg) translateY(12px); }
.polaroid:nth-child(3) { transform: rotate(-1.5deg); }
.polaroid:nth-child(4) { transform: rotate(1deg) translateY(-4px); }
.polaroid:nth-child(5) { transform: rotate(4deg) translateY(-8px); }
.polaroid:hover { transform: rotate(0) translateY(-6px) scale(1.03); z-index: 4; }
.polaroid .tape { top: -13px; left: 50%; margin-left: -37px; transform: rotate(-3deg); }
.polaroid:nth-child(5) .tape { left: auto; right: -26px; top: -8px; transform: rotate(36deg); }
.polaroid img { display: block; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; background: #ddd; }
.polaroid-cap {
    display: block;
    padding: .7rem .2rem .85rem;
    text-align: center;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: .86rem;
    line-height: 1.25;
    color: #4A4E54;
}
.wall-note {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: .4rem;
    margin: 1.2rem 8% 0 0;
    color: var(--lime);
    font-family: var(--f-head);
    font-weight: 600;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    line-height: 1;
}
.wall-note svg { display: block; flex: 0 0 auto; margin-bottom: .6rem; }

/* ---------- Блок 2: Полки ---------- */
.fs-shelves {
    isolation: isolate;
    color: var(--ink);
    padding: 3.4rem 0;
    margin: 1rem 0;
}
.fs-shelves::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--kraft) url("images/kraft-tile.jpg") repeat;
    background-size: 320px 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    clip-path: polygon(0.00% 11px, 3.57% 14px, 7.14% 5px, 10.71% 9px, 14.29% 12px, 17.86% 8px, 21.43% 5px, 25.00% 5px, 28.57% 2px, 32.14% 9px, 35.71% 14px, 39.29% 2px, 42.86% 11px, 46.43% 4px, 50.00% 14px, 53.57% 8px, 57.14% 5px, 60.71% 14px, 64.29% 11px, 67.86% 2px, 71.43% 14px, 75.00% 14px, 78.57% 11px, 82.14% 8px, 85.71% 14px, 89.29% 14px, 92.86% 4px, 96.43% 5px, 100.00% 4px, 100.00% calc(100% - 9px), 96.43% calc(100% - 11px), 92.86% calc(100% - 8px), 89.29% calc(100% - 11px), 85.71% calc(100% - 12px), 82.14% calc(100% - 14px), 78.57% calc(100% - 5px), 75.00% calc(100% - 14px), 71.43% calc(100% - 2px), 67.86% calc(100% - 14px), 64.29% calc(100% - 14px), 60.71% calc(100% - 11px), 57.14% calc(100% - 9px), 53.57% calc(100% - 9px), 50.00% calc(100% - 14px), 46.43% calc(100% - 9px), 42.86% calc(100% - 12px), 39.29% calc(100% - 8px), 35.71% calc(100% - 11px), 32.14% calc(100% - 14px), 28.57% calc(100% - 14px), 25.00% calc(100% - 2px), 21.43% calc(100% - 5px), 17.86% calc(100% - 2px), 14.29% calc(100% - 12px), 10.71% calc(100% - 14px), 7.14% calc(100% - 12px), 3.57% calc(100% - 4px), 0.00% calc(100% - 8px));
}
.fs-shelves .tape-left { left: -24px; top: 4px; transform: rotate(-38deg); }
.shelves-grid {
    position: relative;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) minmax(0, 220px);
    gap: 1.4rem 2rem;
    align-items: end;
}
.shelves-arrow { width: 100px; height: 100px; align-self: end; margin-bottom: .5rem; }
.splatter { position: absolute; pointer-events: none; }
.splatter-left { width: 60px; height: 90px; left: -60px; top: 30%; opacity: .85; }
.splatter-right { width: 70px; height: 95px; right: -50px; top: -10px; opacity: .9; }
.shelves-main { min-width: 0; }
.fs-shelves .fs-title { color: var(--ink); margin-bottom: 1.2rem; }
.shelves {
    list-style: none;
    margin: 0;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 2px solid #F7F2E8;
    border-radius: 2px 5px 3px 4px;
}
.shelf {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .25rem .8rem;
    padding: .75rem 1rem;
    min-width: 0;
    border: 2px solid #F7F2E8;
    border-radius: 4px 2px 5px 3px;
    background: rgba(247, 242, 232, .14);
    transition: background-color .15s ease, transform .15s ease;
}
.shelf:hover { background: rgba(247, 242, 232, .38); transform: translateY(-2px); }
.shelf-name { font-family: var(--f-head); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.15; }
.shelf-name b { font-weight: 600; }
.shelf-ico { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shelf-text { grid-column: 1 / -1; font-size: .88rem; line-height: 1.4; color: #3B3E43; }
.shelves-count { min-width: 0; }
.big-four {
    display: block;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(6rem, 15vw, 12rem);
    line-height: .82;
    color: var(--coral);
    transform: rotate(-3deg);
    margin-bottom: .3rem;
}
.shelves-motto { margin: 0; font-family: var(--f-head); font-weight: 600; font-size: clamp(1.15rem, 1.9vw, 1.45rem); line-height: 1.2; }

/* ---------- Блок записей ---------- */
.fs-latest { padding-bottom: 4rem; }
.cards { display: grid; gap: 2.4rem 2rem; }
.cards-front { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem clamp(1.4rem, 4vw, 3.4rem); padding-top: .6rem; }
.cards-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); padding-top: .8rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 12px 22px rgba(0, 0, 0, .4);
    transition: transform .2s ease, box-shadow .2s ease;
}
.cards-front .card:nth-child(3n+1) { transform: rotate(-2.2deg); }
.cards-front .card:nth-child(3n+2) { transform: rotate(.8deg); }
.cards-front .card:nth-child(3n) { transform: rotate(2deg); }
.cards-list .card:nth-child(odd) { transform: rotate(-.8deg); }
.cards-list .card:nth-child(even) { transform: rotate(.7deg); }
.cards .card:hover { transform: rotate(0) translateY(-5px); box-shadow: 0 18px 28px rgba(0, 0, 0, .45); }
.card .tape { top: -11px; left: 50%; margin-left: -37px; transform: rotate(-2deg); }
.cards .card:nth-child(3n+1) .tape { left: -16px; margin-left: 0; top: -4px; transform: rotate(-40deg); }
.cards .card:nth-child(3n) .tape { left: auto; right: -18px; margin-left: 0; top: -2px; transform: rotate(38deg); }
.card-thumb { padding: 12px 12px 0; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(.85); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1.7rem 1.4rem 1.4rem; }
.card-title { font-size: 1.32rem; margin: 0 0 .35rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--coral-ink); }
.post-date { display: block; font-size: .88rem; color: #6A6F75; margin-bottom: .55rem; }
.card-excerpt { flex: 1; font-size: .92rem; line-height: 1.5; color: #3A3D42; margin-bottom: 1rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-excerpt a { color: var(--coral-ink); }
.card .chalk-btn { align-self: flex-start; }
.card .chalk-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sticky .card-title a::before { content: "★ "; color: var(--coral-ink); }
.fs-latest .tape-bl { left: 4%; bottom: -10px; transform: rotate(-28deg); }
.fs-latest .tape-br { right: -20px; bottom: 6px; transform: rotate(8deg); }

/* ---------- Блок 3: Палитра ---------- */
.fs-palette {
    background-color: var(--forest);
    background-image: var(--grain);
    padding: 3rem 0 3.4rem;
}
.fs-palette .tape-bl { left: -30px; bottom: 14px; transform: rotate(32deg); }
.palette-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.palette-main { min-width: 0; }
.swatches {
    list-style: none;
    margin: 0;
    padding: .6rem 0 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.6rem 1.4rem;
}
.swatch {
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding: 8px 8px 1.3rem;
    transition: transform .2s ease;
}
.swatch::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--paper-white);
    box-shadow: 0 6px 12px rgba(0, 0, 0, .3);
    clip-path: polygon(0 0, 100% 0, 100.0% calc(100% - 2px), 93.8% calc(100% - 5px), 87.5% calc(100% - 6px), 81.2% calc(100% - 6px), 75.0% calc(100% - 3px), 68.8% calc(100% - 3px), 62.5% calc(100% - 7px), 56.2% calc(100% - 0px), 50.0% calc(100% - 6px), 43.8% calc(100% - 5px), 37.5% calc(100% - 2px), 31.2% calc(100% - 5px), 25.0% calc(100% - 0px), 18.8% calc(100% - 6px), 12.5% calc(100% - 5px), 6.2% calc(100% - 5px), 0.0% calc(100% - 7px));
}
.swatch:nth-child(even) { transform: rotate(1.2deg); }
.swatch:nth-child(odd) { transform: rotate(-.8deg); }
.swatch:hover { transform: rotate(0) translateY(-4px); }
.swatch .tape { top: -10px; left: 50%; margin-left: -32px; width: 64px; height: 18px; transform: rotate(-3deg); }
.swatch img { display: block; width: 100%; aspect-ratio: 72 / 61; object-fit: cover; }
.swatch-name { display: block; margin-top: .65rem; font-family: var(--f-head); font-weight: 600; font-size: .9rem; line-height: 1.2; color: var(--ink); }
.swatch-role { display: block; font-size: .78rem; line-height: 1.3; color: var(--ink-soft); }
.ruler { display: flex; align-items: stretch; gap: .7rem; min-height: 220px; align-self: center; }
.ruler-scale {
    width: 14px;
    border-left: 2px solid rgba(242, 239, 230, .8);
    background:
        repeating-linear-gradient(to bottom, rgba(242, 239, 230, .8) 0 2px, transparent 2px 22px) left top / 14px 100% no-repeat,
        repeating-linear-gradient(to bottom, rgba(242, 239, 230, .65) 0 2px, transparent 2px 11px) left top / 8px 100% no-repeat;
}
.ruler-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.1;
    color: var(--chalk);
    text-align: center;
}

/* ---------- Блок 4: Полевой дневник ---------- */
.fs-diary { padding: 3rem 0 3.6rem; }
.fs-diary .tape-r { right: -26px; bottom: 0; transform: rotate(-34deg); }
.diary {
    position: relative;
    container-type: inline-size;
    margin: .6rem 0 0;
}
.diary-img { display: block; width: 73%; height: auto; }
.diary-list {
    position: absolute;
    left: 3.6%;
    top: 22%;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--f-hand);
    font-size: 3.1cqw;
    line-height: 1.25;
    color: var(--chalk);
}
.diary-list li::before { content: "•"; margin-right: .35em; }
.diary-motto {
    position: absolute;
    left: 52.5%;
    top: 68%;
    margin: 0;
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 5.4cqw;
    line-height: 1;
    color: var(--coral);
    white-space: nowrap;
}
.diary-arrow { position: absolute; left: 72%; top: 24%; width: 9cqw; height: 9cqw; }
.diary-lead { max-width: 44rem; margin: 2.2rem 0 0; color: var(--pencil-light); }

/* ---------- Внутренние страницы ---------- */
.inner { padding: 1.6rem 0 4rem; }
.crumbs { font-size: .9rem; color: var(--pencil); margin: 0 0 1.6rem; }
.crumbs a { color: var(--pencil-light); }
.crumbs a:hover { color: var(--lime); }
.crumbs .sep { margin: 0 .3rem; color: var(--pencil); }
.crumbs span:last-child { color: var(--chalk); }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.layout-single { display: block; width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }
.page-head { margin-bottom: 1.8rem; }
.page-title { font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--chalk); margin-bottom: 1rem; }
.page-intro { color: var(--pencil-light); max-width: 42rem; }

.sheet {
    position: relative;
    background: var(--paper);
    color: var(--ink);
    padding: clamp(1.6rem, 4vw, 3rem) clamp(1.3rem, 4vw, 3rem);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .4);
    margin-bottom: 2rem;
}
.sheet > .tape { top: -12px; left: 50%; margin-left: -37px; transform: rotate(-2deg); }
.sheet a { color: var(--coral-ink); }
.sheet a:hover { color: var(--ink); }
.entry-title { font-size: clamp(1.8rem, 3.6vw, 2.5rem); color: var(--ink); margin-bottom: .6rem; }
.entry-head { margin-bottom: 1.6rem; padding-bottom: 1rem; background: var(--wave-ink) left bottom / 40px 10px repeat-x; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .9rem; color: var(--ink-soft); }
.entry-meta .post-date { display: inline; margin: 0; color: var(--ink-soft); }
.entry-cats a {
    display: inline-block; margin-right: .35rem; padding: .05rem .55rem;
    background: var(--tape); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .82rem;
}
.entry-cover { margin: 0 0 1.6rem; }
.entry-cover img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.04rem; line-height: 1.72; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.8em 0 .6em; color: var(--ink); }
.entry-content h2 { font-size: 1.7rem; }
.entry-content h3 { font-size: 1.35rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--coral); }
.entry-content ol li::marker { color: var(--coral-ink); font-weight: 600; }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.5rem;
    background: var(--graphite);
    color: var(--chalk);
    border-left: 5px solid var(--lime);
    font-family: var(--f-hand);
    font-size: 1.2rem;
    line-height: 1.5;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote a { color: var(--lime); }
.entry-content blockquote cite { display: block; margin-top: .6rem; font-family: var(--f-body); font-size: .9rem; color: var(--pencil-light); font-style: normal; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; border: 2px solid var(--ink); }
.entry-content th, .entry-content td { border: 1px solid #8A8E93; padding: .55rem .75rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--kraft); font-family: var(--f-head); font-weight: 600; }
.entry-content .wp-block-table { overflow-x: auto; margin: 0 0 1.4em; }
.entry-content pre { overflow-x: auto; background: var(--graphite); color: var(--chalk); padding: 1rem 1.2rem; font-size: .9rem; }
.entry-content code { background: rgba(35, 38, 43, .08); padding: .05em .3em; font-size: .92em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .4rem; }
.entry-content hr { border: 0; height: 10px; background: var(--wave-ink) center / 40px 10px repeat-x; margin: 2em 0; }
.entry-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.entry-tags a { font-size: .88rem; text-decoration: none; border: 1.5px dashed currentColor; padding: .1rem .55rem; }
.page-links { margin-top: 1.4rem; font-weight: 500; }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin: 0 0 2rem; }
.post-nav-link {
    display: block; min-width: 0; padding: 1rem 1.2rem;
    border: 2px solid rgba(242, 239, 230, .7); border-radius: 3px 6px 2px 5px;
    color: var(--chalk); text-decoration: none; font-family: var(--f-head); font-weight: 600; line-height: 1.3;
}
.post-nav-link span { display: block; font-family: var(--f-body); font-weight: 400; font-size: .82rem; color: var(--pencil); margin-bottom: .2rem; }
.post-nav-link.next { text-align: right; grid-column: 2; }
.post-nav-link:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- Сайдбар ---------- */
.sidebar {
    min-width: 0;
    background-color: var(--board);
    background-image: var(--grain);
    color: var(--chalk);
    padding: 1.6rem 1.5rem;
    border: 2px solid rgba(242, 239, 230, .35);
    border-radius: 4px 2px 5px 3px;
    position: relative;
}
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 1.3rem; color: var(--chalk); margin: 0 0 1rem; padding-bottom: .5rem;
    background: var(--wave) left bottom / 40px 10px repeat-x;
}
.sidebar, .sidebar p, .sidebar li { color: var(--chalk); }
.sidebar a { color: var(--chalk); text-decoration: none; }
.sidebar a:hover { color: var(--lime); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .55rem 0; border-bottom: 1px dashed rgba(242, 239, 230, .25); line-height: 1.35; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .post-date { color: var(--pencil-light); font-size: .82rem; display: block; }

/* ---------- Пагинация (type => plain) ---------- */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 2.6rem 0 0; }
.pager .page-numbers {
    display: inline-block;
    min-width: 2.6rem;
    padding: .42rem .75rem;
    text-align: center;
    font-family: var(--f-head);
    font-weight: 600;
    color: var(--chalk);
    text-decoration: none;
    border: 2px solid rgba(242, 239, 230, .75);
    border-radius: 3px 6px 2px 5px;
    transition: background-color .15s ease, color .15s ease;
}
.pager a.page-numbers:hover { background: var(--chalk); color: var(--ink); }
.pager .page-numbers.current { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.pager .page-numbers.dots { border: 0; min-width: 0; padding-inline: .2rem; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.2rem 0; }
.search-field {
    flex: 1 1 200px; min-width: 0;
    padding: .65rem .85rem;
    font: inherit; color: var(--ink);
    background: #FFFDF7;
    border: 2px solid var(--ink);
    border-radius: 3px 6px 2px 5px;
}
.search-submit {
    padding: .6rem 1.2rem;
    font: 600 1rem var(--f-head);
    color: var(--ink); background: var(--lime);
    border: 2px solid var(--ink);
    border-radius: 3px 6px 2px 5px;
    cursor: pointer;
}
.search-submit:hover { background: var(--coral); color: #fff; }
.sidebar .search-field { border-color: var(--chalk); }
.sidebar .search-submit { border-color: var(--chalk); }
.empty-sheet p { margin-bottom: .6rem; }
.lost { text-align: center; }
.lost .search-form { max-width: 30rem; margin-inline: auto; }
.lost-code { font-family: var(--f-head); font-weight: 700; font-size: clamp(5rem, 14vw, 8rem); line-height: .9; color: var(--coral); margin: .5rem 0 .6rem; transform: rotate(-3deg); }

/* ---------- Комментарии ---------- */
.comments-title, .comment-reply-title { font-size: 1.5rem; color: var(--ink); }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 1.6rem; border-left: 2px dashed #B9B4A6; padding-left: 1rem; }
.note-body { padding: 1rem 0; border-bottom: 1px dashed #B9B4A6; }
.note-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; margin-bottom: .5rem; }
.note-avatar { border-radius: 50%; display: block; }
.note-author { font-family: var(--f-head); font-weight: 600; }
.note-date { font-size: .84rem; color: var(--ink-soft); }
.note-wait { font-style: italic; color: var(--coral-ink); }
.note-text p:last-child { margin-bottom: .4rem; }
.note-reply a { font-size: .88rem; font-weight: 500; }
.comment-respond { margin-top: 1.6rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 500; margin-bottom: .3rem; }
.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(--ink);
    background: #FFFDF7; border: 2px solid var(--ink); border-radius: 3px 6px 2px 5px;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; font-size: .9rem; }
.form-note { font-size: .88rem; color: var(--ink-soft); }
.req { color: var(--coral-ink); }
.comment-form .submit {
    padding: .65rem 1.4rem; font: 600 1rem var(--f-head);
    background: var(--ink); color: var(--paper); border: 2px solid var(--ink);
    border-radius: 3px 6px 2px 5px; cursor: pointer;
}
.comment-form .submit:hover { background: var(--lime); color: var(--ink); }
.comments .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin: 1rem 0; }

/* ---------- Подвал ---------- */
.site-foot {
    background-color: var(--night);
    background-image: var(--grain);
    color: var(--pencil-light);
    padding: 3rem 0 1.6rem;
}
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 0; }
.foot-col { min-width: 0; padding: 0 2rem; }
.foot-col:first-child { padding-left: 0; }
.foot-col:last-child { padding-right: 0; }
.foot-col + .foot-col { border-left: 2px solid rgba(242, 239, 230, .28); }
.site-foot .widget { margin-bottom: 1.4rem; }
.site-foot .widget-title { font-size: 1.4rem; color: var(--chalk); margin: 0 0 .7rem; }
.site-foot p, .site-foot .textwidget { color: var(--pencil-light); font-size: .95rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .35rem; }
.site-foot a { color: var(--chalk); text-decoration: underline; text-decoration-color: rgba(242, 239, 230, .45); }
.site-foot a:hover { color: var(--lime); text-decoration-color: var(--lime); }
.copyright {
    margin: 2rem 0 0; padding-top: 1.2rem; text-align: center; font-size: .86rem; color: var(--pencil);
    background: var(--chalk-line) center top / 100% 4px no-repeat;
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 60;
    width: min(92%, 760px);
    transform: translateX(-50%) rotate(-.6deg);
    display: flex;
    align-items: center;
    gap: 1rem 1.6rem;
    padding: 1.2rem 1.5rem;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
    border-top: 6px solid var(--tape);
}
.cookie-text { margin: 0; font-size: .92rem; line-height: 1.45; flex: 1 1 auto; min-width: 0; }
.cookie-accept {
    flex: 0 0 auto;
    padding: .55rem 1.3rem;
    font: 600 1rem var(--f-head);
    color: var(--ink);
    background: var(--lime);
    border: 2px solid var(--ink);
    border-radius: 3px 6px 2px 5px;
    cursor: pointer;
}
.cookie-accept:hover { background: var(--ink); color: var(--lime); }

/* ---------- Выравнивание WP ---------- */
.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: .85rem; color: var(--ink-soft); }

/* ---------- Адаптив: планшет ---------- */
@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .menu-toggle { display: inline-flex; }
    .topnav { flex: 1 1 100%; padding-left: 0; display: none; }
    .topnav.is-open { display: block; }
    .topnav::before { display: none; }
    .topnav-list { padding: .6rem 0 0; }
    .layout-with-sidebar { display: block; }
    .layout-with-sidebar .sidebar { margin-top: 2.4rem; }
    .layout-single { width: 100%; }
    .wall-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); transform: none; gap: 2rem 1.4rem; }
    .shelves-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 200px); }
    .shelves-arrow { display: none; }
    .cards-front { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .diary-img { width: 80%; }
    .diary-list { font-size: 3.4cqw; top: 22%; }
    .diary-motto { left: 56%; font-size: 6cqw; top: 74%; }
    .diary-arrow { left: 80%; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-col:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding: 1.4rem 0 0; border-top: 2px solid rgba(242, 239, 230, .2); }
}

/* ---------- Адаптив: мобильный ---------- */
@media (max-width: 600px) {
    .masthead { padding-top: 1.4rem; }
    .brand { gap: .8rem; }
    .brand-svg, .brand-logo { width: 46px; height: 46px; }
    .site-desc { font-size: .86rem; }
    .front .shell { width: min(92%, 1180px); }
    .fs { padding: 2.2rem 0; }
    .wall-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 1.1rem; }
    .polaroid:nth-child(5) { grid-column: 1 / -1; justify-self: center; width: 60%; }
    .wall-note { margin-right: 0; }
    .fs-shelves { padding: 2.6rem 0; }
    .shelves-grid { grid-template-columns: minmax(0, 1fr); }
    .shelves { grid-template-columns: minmax(0, 1fr); }
    .shelves-count { display: flex; align-items: center; gap: 1rem; }
    .big-four { font-size: 5.5rem; margin: 0; }
    .splatter-left { display: none; }
    .splatter-right { right: -30px; }
    .cards-front { grid-template-columns: minmax(0, 1fr); }
    .card-body { padding: 1.5rem 1.2rem 1.2rem; }
    .palette-wrap { grid-template-columns: minmax(0, 1fr); }
    .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ruler { min-height: 0; flex-direction: column; gap: .5rem; }
    .ruler-scale {
        width: 100%; height: 14px; border-left: 0; border-top: 2px solid rgba(242, 239, 230, .8);
        background: repeating-linear-gradient(to right, rgba(242, 239, 230, .8) 0 2px, transparent 2px 22px) left top / 100% 12px no-repeat;
    }
    .ruler-text { writing-mode: horizontal-tb; transform: none; text-align: left; }
    .diary-img { width: 100%; }
    .diary-list { position: static; font-size: 1.3rem; display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; margin-top: 1rem; }
    .diary-motto { position: static; font-size: 1.9rem; margin-top: .6rem; white-space: normal; }
    .diary-arrow { display: none; }
    .sheet { padding: 1.6rem 1.2rem; }
    .post-nav { grid-template-columns: minmax(0, 1fr); }
    .post-nav-link.next { grid-column: 1; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); }
    .foot-col, .foot-col:first-child, .foot-col:last-child { padding: 0; }
    .foot-col + .foot-col { border-left: 0; border-top: 2px solid rgba(242, 239, 230, .2); padding-top: 1.4rem; }
    .foot-col:nth-child(3) { padding: 1.4rem 0 0; }
    .cookie-banner { flex-direction: column; align-items: flex-start; padding: 1rem 1.2rem; transform: translateX(-50%); }
}

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