/*
Theme Name: dds_happydewaliimages.com
Theme URI: https://happydewaliimages.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: hdwjrn
*/

/* ---------- Шрифты ---------- */
@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+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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-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; }

/* ---------- Переменные ---------- */
:root {
    --paper: #E8E1D0;
    --paper-light: #F1ECDF;
    --sand: #D9CFB8;
    --ink: #1B2A41;
    --ink-deep: #142033;
    --graphite: #22262B;
    --muted: #7A7062;
    --brick: #B4432B;
    --brick-dark: #93351F;
    --teal: #3E6E6A;
    --teal-deep: #345E5A;
    --side: #DDD4BF;
    --grid-line: rgba(27, 42, 65, 0.06);
    --font-head: "Oswald", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
    --font-text: "IBM Plex Mono", "PT Mono", "Courier New", Consolas, monospace;
    --shadow-hard: 4px 4px 0 var(--ink);
}

/* ---------- Скрытие через hidden (до основных стилей) ---------- */
.cookie-banner[hidden] { display: none !important; }
.site-nav[hidden] { display: none !important; }

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-text);
    font-size: 15px;
    line-height: 1.7;
    color: var(--graphite);
    background-color: var(--paper);
    background-image:
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(122, 112, 98, 0.14) 50%, transparent calc(50% + 1px)),
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 100% 100%, 22px 22px, 22px 22px;
}
@media (min-width: 600px) { body { font-size: 16px; } }

p, li, dd, td, th, figcaption, blockquote, .widget, .card-title, .page-title, .brand-name {
    overflow-wrap: break-word;
    hyphens: auto;
}
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    font-weight: 500;
    line-height: 1.2;
    color: var(--ink);
    margin: 1.4em 0 0.6em;
    letter-spacing: 0.02em;
}
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--ink); text-decoration: underline dashed rgba(27, 42, 65, 0.55); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--brick); text-decoration-color: var(--brick); text-decoration-style: solid; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px dashed var(--brick); outline-offset: 3px; }

.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: 12px; top: -60px; z-index: 100;
    background: var(--brick); color: #fff; padding: 0.5em 1em; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

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

/* ---------- Кнопки-штампы ---------- */
.btn-stamp, .search-submit, .form-submit .submit, button.btn-stamp {
    display: inline-block;
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 0.86rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: var(--ink);
    background: var(--paper-light);
    border: 2px solid var(--ink);
    border-radius: 0;
    padding: 0.55em 1.1em;
    box-shadow: 3px 3px 0 var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background-color .12s, color .12s;
}
.btn-stamp:hover, .search-submit:hover, .form-submit .submit:hover {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 var(--ink);
    background: var(--ink);
    color: var(--paper);
}
.btn-small { font-size: 0.78rem; padding: 0.4em 0.8em; }
.link-dash { font-weight: 600; }

/* ---------- Штамп ---------- */
.stamp {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    color: var(--brick);
    border: 3px double var(--brick);
    padding: 0.1em 0.65em;
    transform: rotate(-9deg);
    opacity: 0.88;
    background: rgba(241, 236, 223, 0.55);
    -webkit-mask-image: repeating-linear-gradient(115deg, #000 0 7px, rgba(0, 0, 0, 0.78) 7px 9px);
    mask-image: repeating-linear-gradient(115deg, #000 0 7px, rgba(0, 0, 0, 0.78) 7px 9px);
    pointer-events: none;
    user-select: none;
}

/* ---------- Шапка ---------- */
.masthead {
    background: var(--ink);
    color: var(--paper);
    border-bottom: 3px solid var(--ink-deep);
    box-shadow: inset 0 -6px 0 rgba(232, 225, 208, 0.06);
}
.masthead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding: 1.1rem 0;
}
.brand {
    display: flex; align-items: center; gap: 0.9rem;
    color: var(--paper); text-decoration: none; min-width: 0; flex: 1 1 300px;
}
.brand:hover { color: #fff; }
.brand-logo-box { flex: 0 0 auto; color: var(--paper); }
.brand-mark { width: 48px; height: 48px; display: block; }
.brand-logo { max-height: 56px; width: auto; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: clamp(1.2rem, 2.8vw, 1.85rem);
    line-height: 1.15;
    letter-spacing: 0.04em;
}
.brand-desc {
    font-size: 0.74rem;
    line-height: 1.45;
    color: rgba(232, 225, 208, 0.72);
    margin-top: 0.35rem;
    max-width: 40em;
}

.nav-toggle {
    display: inline-flex; align-items: center; gap: 0.55rem;
    background: transparent; color: var(--paper);
    border: 2px solid var(--paper); padding: 0.4rem 0.8rem;
    font-family: var(--font-text); font-size: 0.85rem; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] { background: var(--paper); color: var(--ink); }

.site-nav { flex: 1 1 100%; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.nav-list a {
    display: inline-block;
    color: var(--paper);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
}
.nav-list a:hover { color: #fff; border-bottom-color: var(--paper); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a { border-bottom: 1px solid var(--paper); }

@media (min-width: 960px) {
    .nav-toggle { display: none; }
    .site-nav, .site-nav[hidden] { display: block !important; flex: 0 0 auto; }
    .nav-list { display: grid; grid-template-columns: repeat(2, auto); column-gap: 1.2rem; row-gap: 0.2rem; }
}

/* ---------- Полосы главной ---------- */
.band { padding: 2.6rem 0 3rem; position: relative; }
.band-paper { background: transparent; }
.band-teal { background: var(--teal); color: #F4F1E8; }
.band-sand {
    background-color: var(--sand);
    background-image: linear-gradient(rgba(27, 42, 65, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(27, 42, 65, 0.05) 1px, transparent 1px);
    background-size: 22px 22px;
    border-top: 1px solid rgba(27, 42, 65, 0.25);
    border-bottom: 1px solid rgba(27, 42, 65, 0.25);
}
.band-inner { min-width: 0; }
@media (min-width: 960px) {
    .band-inner, .masthead-row, .colophon-inner { width: 85%; margin-left: auto; margin-right: auto; }
    .band { padding: 3.2rem 0 3.6rem; }
}

.sec-title {
    display: inline-block;
    font-size: clamp(1.45rem, 3.4vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    margin: 0 0 1.6rem;
    padding-bottom: 0.15rem;
    border-bottom: 5px double var(--ink);
}
.sec-num { color: var(--brick); margin-right: 0.15em; }
.sec-title-light { color: #F4F1E8; border-bottom-color: #F4F1E8; }
.sec-title-light .sec-num { color: #F2C9A8; }

/* Блок 1 — требования */
.needs-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (min-width: 960px) { .needs-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2.6rem; } }
.needs-lead { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.1rem; }
.needs-list {
    list-style: none; margin: 0; padding: 0 0 1.2rem;
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem 1.6rem;
    border-bottom: 2px dashed rgba(27, 42, 65, 0.45);
}
@media (min-width: 600px) { .needs-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.check {
    display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 0.7rem;
    width: 100%; text-align: left; background: none; border: 0; padding: 0.35rem 0;
    font: inherit; color: inherit; cursor: pointer;
}
.check::before {
    content: ""; grid-row: 1 / span 2; width: 20px; height: 20px; margin-top: 0.22em;
    border: 2px solid var(--ink); background: var(--paper-light);
    display: flex; align-items: center; justify-content: center;
}
.check[aria-pressed="true"]::before {
    content: "✓"; color: var(--brick); font-family: var(--font-head); font-weight: 700; font-size: 1rem; line-height: 1;
}
.check-name { font-family: var(--font-head); font-size: 1.12rem; letter-spacing: 0.04em; color: var(--ink); }
.check-hint { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.check[aria-pressed="true"] .check-name { text-decoration: line-through; text-decoration-color: var(--brick); text-decoration-thickness: 2px; }
.check:hover .check-name { color: var(--brick); }
.needs-count { margin: 0.8rem 0 0; font-size: 0.82rem; color: var(--muted); }
.needs-count-num { font-family: var(--font-head); font-size: 1.15rem; color: var(--brick); }

.needs-figure { margin: 0; position: relative; min-width: 0; }
.house-wrap { position: relative; }
.house-wrap img { width: 100%; aspect-ratio: 1416 / 896; object-fit: contain; }
.room-tag {
    position: absolute; left: var(--x); top: var(--y);
    transform: translate(-50%, -50%);
    font-size: 0.66rem; line-height: 1.2; white-space: nowrap;
    background: rgba(241, 236, 223, 0.92); color: var(--ink);
    border: 1px solid var(--ink); padding: 0.15em 0.45em;
}
@media (min-width: 600px) { .room-tag { font-size: 0.76rem; } }
.stamp-corner { position: absolute; top: -0.6rem; right: 0; z-index: 2; }
.needs-caption { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; border-left: 3px solid var(--teal); padding-left: 0.7rem; }

/* Блок 2 — таблица условий */
.terms-wrap { position: relative; }
.terms-scroll { overflow-x: auto; border: 2px solid var(--ink); background: rgba(20, 32, 51, 0.12); }
.terms-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.86rem; }
.terms-table th, .terms-table td { border: 1.5px solid var(--ink); padding: 0.65rem 0.85rem; vertical-align: top; text-align: left; }
.terms-table thead th { font-family: var(--font-head); font-weight: 500; font-size: 1.05rem; letter-spacing: 0.04em; color: #fff; background: rgba(20, 32, 51, 0.22); }
.terms-table tbody th { font-family: var(--font-head); font-weight: 500; font-size: 1rem; letter-spacing: 0.03em; color: #fff; width: 22%; }
.terms-table td { color: #EDEAE0; }
.terms-table tbody tr:hover td { background: rgba(232, 225, 208, 0.08); }
.stamp-table { position: absolute; right: -0.4rem; bottom: -1.4rem; background: rgba(241, 236, 223, 0.9); font-size: 1.25rem; z-index: 2; }
.terms-note { margin: 2rem 0 0; font-size: 0.8rem; color: rgba(244, 241, 232, 0.82); max-width: 46em; }

/* Блок 3 — записи */
.band-sketch {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='220' viewBox='0 0 160 220'%3E%3Cg fill='none' stroke='%237A7062' stroke-opacity='.35' stroke-width='1.2'%3E%3Cpath d='M20 30 L130 24 L136 190 L26 196 Z'/%3E%3Cpath d='M40 60 L110 58 M42 80 L100 78 M44 100 L118 97'/%3E%3Cpath d='M10 210 Q 60 170 150 200'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='200' viewBox='0 0 140 200'%3E%3Cg fill='none' stroke='%237A7062' stroke-opacity='.35' stroke-width='1.2'%3E%3Cpath d='M20 20 L120 30 L110 120 L14 110 Z'/%3E%3Cpath d='M30 150 L120 140 M60 160 L70 190'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1% top 30%, right 1% top 12%;
}
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 1.8rem; }
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.has-side .card-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .has-side .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card-cell { position: relative; min-width: 0; filter: drop-shadow(4px 4px 0 var(--ink)); transition: transform .15s, filter .15s; }
.card-cell:hover { transform: translate(-2px, -2px); filter: drop-shadow(6px 6px 0 var(--ink)); }
.card-cell::before {
    content: ""; position: absolute; z-index: 3; top: -6px; left: 26px;
    width: 30px; height: 9px; border: 2px solid #8B8478; border-bottom-color: transparent;
    transform: rotate(-6deg);
}
.card {
    --fold: 30px;
    position: relative;
    display: flex; flex-direction: column;
    height: 100%;
    background: var(--ink);
    padding: 2px;
    clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
}
.card::before {
    content: ""; position: absolute; inset: 2px;
    background: var(--paper-light);
    clip-path: polygon(0 0, calc(100% - var(--fold) + 1px) 0, 100% calc(var(--fold) - 1px), 100% 100%, 0 100%);
}
.card::after {
    content: ""; position: absolute; top: 0; right: 0; width: var(--fold); height: var(--fold); z-index: 2;
    background: linear-gradient(to bottom left, transparent calc(50% - 1px), var(--ink) calc(50% - 1px), var(--ink) calc(50% + 1px), #CFC4AA calc(50% + 1px));
}
.card-thumb { position: relative; z-index: 1; padding: 12px 12px 0; }
.card-thumb a { display: block; border: 1px solid rgba(27, 42, 65, 0.4); }
.card-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.card-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; padding: 0.9rem 1.1rem 1.1rem; min-width: 0; }
.card-title { font-size: 1.22rem; margin: 0 0 0.45rem; letter-spacing: 0.03em; }
.card-title a { text-decoration: none; color: var(--ink); }
.card-title a:hover { color: var(--brick); }
.card-excerpt { font-size: 0.82rem; line-height: 1.6; color: var(--graphite); flex: 1; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px dashed rgba(27, 42, 65, 0.4); }
.card-date { font-size: 0.78rem; color: var(--muted); }
.latest-more { margin: 2rem 0 0; text-align: right; font-size: 0.9rem; }

/* Блок 4 — маршрут */
.route { position: relative; }
.route-line { display: none; }
.route-steps {
    list-style: none; margin: 0; padding: 0 0 0 0.2rem;
    display: grid; gap: 1.3rem; position: relative;
}
.route-steps::before {
    content: ""; position: absolute; left: 24px; top: 10px; bottom: 10px;
    border-left: 2px dashed var(--ink);
}
.route-step { position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr); column-gap: 0.9rem; align-items: center; }
.route-num {
    grid-row: 1 / span 2;
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--ink);
    background: var(--paper-light); border: 2px solid var(--ink);
    box-shadow: 0 0 0 4px var(--sand), 0 0 0 5px var(--ink);
    position: relative; z-index: 1;
}
.route-name { font-family: var(--font-head); font-size: 1.15rem; color: var(--ink); letter-spacing: 0.03em; line-height: 1.2; }
.route-hint { font-size: 0.78rem; color: #5F574B; line-height: 1.45; }
.route-step:hover .route-num { background: var(--brick); color: #fff; }

@media (min-width: 960px) {
    .route { padding-top: 0.4rem; }
    .route-line { display: block; position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 120px; }
    .route-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; padding: 0; }
    .route-steps::before { display: none; }
    .route-step { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; row-gap: 0.35rem; align-content: start; }
    .route-step:nth-child(even) { margin-top: 62px; }
    .route-num { grid-row: auto; }
    .route-name { font-size: 1.2rem; }
}

/* Блок 5 — пометки на полях */
.band-spread::after {
    content: ""; position: absolute; left: 50%; top: 4.5rem; bottom: 2rem; width: 0;
    border-left: 1px solid rgba(122, 112, 98, 0.28);
    box-shadow: 4px 0 10px rgba(122, 112, 98, 0.12);
    pointer-events: none;
}
.margins-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.4rem; align-items: center; position: relative; z-index: 1; }
@media (min-width: 960px) { .margins-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; } }
.margins-quote { margin: 0; padding: 0 0 0 0.2rem; }
.margins-quote p {
    font-family: var(--font-head); font-weight: 500;
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    line-height: 1.12; letter-spacing: 0.05em;
    color: var(--brick); margin: 0 0 1rem;
}
.margins-quote footer { font-size: 0.86rem; color: var(--muted); max-width: 30em; border-top: 1px dashed rgba(27, 42, 65, 0.4); padding-top: 0.8rem; }
.stickers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; padding: 0.5rem 0.4rem; }
@media (min-width: 600px) { .stickers { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.sticker {
    padding: 1rem 0.95rem 1.1rem;
    border: 1px solid rgba(27, 42, 65, 0.55);
    box-shadow: 3px 4px 0 rgba(27, 42, 65, 0.75);
    position: relative;
    transition: transform .15s;
}
.sticker::before {
    content: ""; position: absolute; top: -9px; left: 50%; width: 46px; height: 16px; transform: translateX(-50%) rotate(-3deg);
    background: rgba(241, 236, 223, 0.75); border: 1px solid rgba(122, 112, 98, 0.35);
}
.sticker-a { background: #E3C7B6; transform: rotate(-3deg); }
.sticker-b { background: #E9DEB9; transform: rotate(2deg); }
@media (min-width: 600px) { .sticker-b { margin-top: 2.2rem; } }
.sticker-c { background: #C8D6CF; transform: rotate(-1.5deg); }
.sticker:hover { transform: rotate(0) translateY(-3px); }
.sticker-title { font-size: 1.02rem; margin: 0 0 0.45rem; letter-spacing: 0.03em; line-height: 1.2; }
.sticker p { font-size: 0.78rem; line-height: 1.5; margin: 0; color: var(--graphite); }

/* ---------- Внутренние страницы ---------- */
.page-wrap { padding: 1.6rem 0 3.4rem; }
.crumbs { font-size: 0.8rem; color: var(--muted); margin-bottom: 1.6rem; padding-bottom: 0.6rem; border-bottom: 1px dashed rgba(27, 42, 65, 0.4); overflow-wrap: break-word; }
.crumbs a { color: var(--ink); }
.crumbs-sep { margin: 0 0.35em; color: var(--brick); }
.crumbs span[aria-current] { color: var(--graphite); }

.layout-single { display: block; }
.layout-single .content-area { width: 100%; }
@media (min-width: 960px) {
    .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;
    }
}
.content-area { min-width: 0; }

.page-head { margin-bottom: 1.8rem; }
.page-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    letter-spacing: 0.04em;
    margin: 0 0 0.6rem;
    display: inline-block;
    border-bottom: 5px double var(--ink);
    padding-bottom: 0.1rem;
}
.page-lead { color: var(--muted); font-size: 0.92rem; }

.sheet {
    background: var(--paper-light);
    border: 2px solid var(--ink);
    box-shadow: var(--shadow-hard);
    padding: 1.4rem 1.2rem;
    margin-bottom: 2rem;
    position: relative;
}
@media (min-width: 600px) { .sheet { padding: 2.2rem 2.4rem; } }
.entry-meta { font-size: 0.82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.4rem 0 0; }
.entry-cat a { color: var(--teal); }
.entry-figure { margin: 1.4rem 0; border: 1px solid rgba(27, 42, 65, 0.45); }
.entry-figure img { width: 100%; }
.entry-content { margin-top: 1.4rem; }
.entry-content h2 { font-size: 1.6rem; border-bottom: 1px solid rgba(27, 42, 65, 0.35); padding-bottom: 0.2rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.entry-content ul li::marker { color: var(--brick); }
.entry-content ol li::marker { font-family: var(--font-head); color: var(--brick); }
.entry-content blockquote {
    margin: 1.6em 0; padding: 1rem 1.3rem;
    border-left: 4px solid var(--brick);
    background: rgba(217, 207, 184, 0.5);
    font-style: normal;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content img { margin: 1em 0; }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 0.4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.86rem; display: block; overflow-x: auto; }
table, th, td { border: 1px solid var(--ink); }
.entry-content th, .entry-content td { padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
.entry-content th { background: var(--sand); font-family: var(--font-head); font-weight: 500; }
.entry-content pre, .entry-content code { font-family: var(--font-text); background: rgba(27, 42, 65, 0.07); }
.entry-content pre { padding: 1rem; overflow-x: auto; }
.entry-content hr { border: 0; border-top: 5px double rgba(27, 42, 65, 0.5); margin: 2em 0; }
.entry-content .alignleft { float: left; margin: 0.3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: 0.3em 0 1em 1.4em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-tags { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.82rem; }
.entry-tags a { border: 1px solid var(--ink); padding: 0.1em 0.6em; text-decoration: none; background: var(--paper); }
.entry-tags a:hover { background: var(--ink); color: var(--paper); }

.entry-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 600px) { .entry-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.entry-nav a {
    display: block; padding: 0.9rem 1.1rem; text-decoration: none;
    border: 1px dashed var(--ink); background: rgba(241, 236, 223, 0.6);
    font-family: var(--font-head); font-size: 1.02rem; line-height: 1.3;
}
.entry-nav a span { display: block; font-family: var(--font-text); font-size: 0.74rem; color: var(--muted); margin-bottom: 0.2rem; }
.entry-nav-next { text-align: right; grid-column: -2; }
.entry-nav a:hover { border-style: solid; background: var(--paper-light); }

/* Пагинация (type => plain) */
.pager { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2.4rem 0 0; align-items: center; }
.pager .page-numbers, .pager > a, .pager > span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.5rem; height: 2.5rem; padding: 0 0.7rem;
    border: 2px solid var(--ink); background: var(--paper-light); color: var(--ink);
    text-decoration: none; font-weight: 600; font-size: 0.86rem;
    box-shadow: 2px 2px 0 var(--ink);
}
.pager a.page-numbers:hover { background: var(--ink); color: var(--paper); transform: translate(2px, 2px); box-shadow: none; }
.pager .page-numbers.current { background: var(--brick); border-color: var(--brick); color: #fff; box-shadow: 2px 2px 0 var(--ink); }
.pager .page-numbers.dots { border: 0; background: none; box-shadow: none; min-width: auto; }

.empty-note { padding: 1.4rem 1.3rem; border: 2px dashed var(--ink); background: rgba(241, 236, 223, 0.6); }
.empty-note p { margin-top: 0; }

/* Сайдбар */
.sidebar {
    min-width: 0;
    margin-top: 2.4rem;
    background: var(--side);
    border: 2px solid var(--ink);
    padding: 1.3rem 1.3rem 0.4rem;
    position: relative;
    color: var(--graphite);
}
.sidebar::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 20px);
}
@media (min-width: 960px) { .sidebar { margin-top: 0; } }
.sidebar .widget { margin-bottom: 1.6rem; font-size: 0.86rem; color: var(--graphite); }
.sidebar .widget-title { color: var(--ink); font-size: 1.15rem; margin: 0.6rem 0 0.8rem; letter-spacing: 0.05em; border-bottom: 4px double var(--ink); display: inline-block; }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.45rem 0 0.45rem 1.1rem; border-bottom: 1px dashed rgba(27, 42, 65, 0.35); position: relative; line-height: 1.45; }
.sidebar .widget li::before { content: "›"; position: absolute; left: 0; color: var(--brick); }
.sidebar .widget a { color: var(--ink); }
.sidebar .widget a:hover { color: var(--brick); }
.sidebar .post-date { display: block; font-size: 0.74rem; color: #5F574B; }

/* Поиск */
.search-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.search-field {
    flex: 1 1 200px; min-width: 0;
    font-family: var(--font-text); font-size: 0.9rem;
    padding: 0.55em 0.8em; border: 2px solid var(--ink); background: #fff; color: var(--graphite); border-radius: 0;
}

/* 404 */
.lost { text-align: left; }
.lost-code { font-family: var(--font-head); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; margin: 0 0 0.4rem; color: var(--brick); letter-spacing: 0.08em; opacity: 0.85; }

/* Комментарии */
.comments-title { margin-top: 0; font-size: 1.4rem; }
.note-list, .note-list .children { list-style: none; margin: 0; padding: 0; }
.note-list .children { padding-left: 1.4rem; border-left: 2px dashed rgba(27, 42, 65, 0.35); }
.note-body { padding: 0.9rem 0 1rem; border-bottom: 1px dashed rgba(27, 42, 65, 0.35); }
.note-head { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; }
.note-author { font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); }
.note-date { font-size: 0.76rem; color: var(--muted); }
.note-wait { font-size: 0.8rem; color: var(--brick); margin: 0.3rem 0; }
.note-text { font-size: 0.9rem; }
.note-reply a { font-size: 0.8rem; font-weight: 600; }
.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-size: 1.3rem; }
.comment-reply-title small { font-family: var(--font-text); font-size: 0.75rem; margin-left: 0.8rem; }
.comment-form label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; font-family: var(--font-text); font-size: 0.9rem; padding: 0.55em 0.7em;
    border: 2px solid var(--ink); background: #fff; color: var(--graphite); border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: 0.5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.form-note { font-size: 0.8rem; color: var(--muted); }

/* ---------- Подвал ---------- */
.colophon { background: var(--ink); color: #D7D2C5; padding: 2.8rem 0 1.4rem; border-top: 3px solid var(--ink-deep); }
.colophon-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
@media (min-width: 600px) { .colophon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .colophon-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 3rem; } }
.colophon-col { min-width: 0; }
.colophon .widget { font-size: 0.84rem; color: #D7D2C5; margin-bottom: 1rem; }
.colophon .widget-title { color: #F4F1E8; font-size: 1.25rem; margin: 0 0 0.7rem; letter-spacing: 0.05em; }
.colophon .widget p { color: #D7D2C5; }
.colophon .widget ul { list-style: none; margin: 0; padding: 0; }
.colophon .widget li { margin-bottom: 0.4rem; }
.colophon .widget a { color: #F4F1E8; text-decoration-color: rgba(244, 241, 232, 0.55); }
.colophon .widget a:hover { color: #F2C9A8; text-decoration-color: #F2C9A8; }
.colophon .post-date { color: #B8B2A3; font-size: 0.74rem; display: block; }
.colophon-copy { margin: 2.2rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(232, 225, 208, 0.25); font-size: 0.78rem; color: #B8B2A3; }

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.4rem;
    padding: 1rem 1.3rem;
    background: var(--paper-light); color: var(--graphite);
    border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
    max-width: 760px; margin-inline: auto;
}
.cookie-text { margin: 0; font-size: 0.82rem; flex: 1 1 300px; min-width: 0; }

/* ---------- Мобильные поправки ---------- */
@media (max-width: 600px) {
    .band { padding: 2.2rem 0 2.6rem; }
    .sheet { padding: 1.3rem 1.1rem; }
    .sidebar { padding: 1.2rem 1.1rem 0.3rem; }
    .cookie-banner { padding: 0.9rem 1rem; left: 0.6rem; right: 0.6rem; bottom: 0.6rem; }
    .stamp-corner { font-size: 0.85rem; top: -1.2rem; }
    .stamp-table { font-size: 1rem; bottom: -1.6rem; }
    .band-spread::after { display: none; }
    .room-tag { font-size: 0.58rem; padding: 0.1em 0.3em; }
}
