/*
Theme Name: dds_family-port.ru
Theme URI: https://family-port.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: svdom
*/

/* ---------- Шрифты ---------- */
@font-face {
    font-family: "Caveat";
    src: url("fonts/caveat.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "PT Serif";
    src: url("fonts/ptserif-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "PT Serif";
    src: url("fonts/ptserif-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "PT Serif";
    src: url("fonts/ptserif-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* ---------- Переменные ---------- */
:root {
    --cream: #F4EBD9;
    --sand: #EADFC8;
    --mint: #DCE8DD;
    --milk: #F0E4D0;
    --ink: #3A322B;
    --muted: #8A7A66;
    --brick: #B5533C;
    --brick-deep: #93412D;
    --sage: #6E7F5C;
    --pencil: #5B5750;
    --tag: #EFD9A0;
    --sheet: #FBF6EC;
    --seam: #8B6A4A;
    --pin: #9C7F5A;
    --hand: "Caveat", "Segoe Script", "Comic Sans MS", cursive;
    --serif: "PT Serif", Georgia, "Times New Roman", serif;
    --shadow: 0 2px 3px rgba(58, 50, 43, .12), 0 8px 18px rgba(58, 50, 43, .12);
    --shadow-lift: 0 4px 6px rgba(58, 50, 43, .14), 0 16px 28px rgba(58, 50, 43, .16);
    --torn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' preserveAspectRatio='none'%3E%3Cpath d='M0 14V3.9L5 4.4L9 2.4L17 2.6L25 2.3L33 3.3L37 4.6L41 3.4L49 4.5L57 2.7L62 5.8L70 7.7L78 5.5L82 7.9L86 5.3L91 3.7L96 5.2L104 3.9L109 2.6L117 5.8L123 2.6L127 5.4L135 3.2L143 4.6L149 4.8L156 4.2L161 6.8L166 2.5L172 5.2L178 6.4L184 5.7L188 2.7L195 3.0L201 2.9L208 4.5L212 6.6L220 6.7L226 4.0L232 5.6L240 3.9V14Z'/%3E%3C/svg%3E");
    --wave-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='8' viewBox='0 0 20 8'%3E%3Cpath d='M0 4 Q5 0.5 10 4 T20 4' fill='none' stroke='%23B5533C' stroke-width='1.6'/%3E%3C/svg%3E");
    --wave-pencil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='8' viewBox='0 0 26 8'%3E%3Cpath d='M0 4 Q6.5 1.5 13 4 T26 4' fill='none' stroke='%235B5750' stroke-opacity='.7' stroke-width='1.1'/%3E%3C/svg%3E");
}

/* ---------- Элементы, управляемые атрибутом hidden (до основных стилей) ---------- */
.cookie-note[hidden] { display: none !important; }
.topnav[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;
    font-family: var(--serif);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--cream);
    background-image:
        radial-gradient(ellipse 340px 220px at 12% 18%, rgba(181, 140, 90, .07), transparent 70%),
        radial-gradient(ellipse 280px 260px at 86% 62%, rgba(181, 140, 90, .06), transparent 70%),
        radial-gradient(circle at 30% 40%, rgba(138, 122, 102, .09) 0 1px, transparent 1.6px),
        radial-gradient(circle at 70% 80%, rgba(138, 122, 102, .07) 0 1px, transparent 1.6px),
        repeating-linear-gradient(17deg, rgba(138, 122, 102, .025) 0 1px, transparent 1px 9px);
    background-size: 100% 1200px, 100% 1400px, 37px 41px, 53px 47px, auto;
    overflow-wrap: break-word;
    hyphens: auto;
}

img { max-width: 100%; height: auto; }

a { color: var(--brick); text-decoration: none; }

.entry-content a,
.comment-content a,
.widget a:not(.paper-btn),
.breadcrumbs a {
    background-image: var(--wave-red);
    background-repeat: repeat-x;
    background-position: 0 100%;
    background-size: 14px 5px;
    padding-bottom: 3px;
}
.entry-content a:hover,
.comment-content a:hover,
.breadcrumbs a:hover { color: var(--brick-deep); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px dashed var(--sage);
    outline-offset: 3px;
}

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--hand);
    font-weight: 700;
    line-height: 1.12;
    color: var(--ink);
    margin: 1.4em 0 .5em;
    hyphens: manual;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.7rem); }
h3 { font-size: 1.85rem; }
h4 { font-size: 1.55rem; }
h5, h6 { font-size: 1.35rem; }

ul, ol { padding-left: 1.35em; margin: 0 0 1.1em; }
li { margin-bottom: .3em; }

blockquote {
    margin: 1.6em 0;
    padding: 1.1rem 1.4rem 1.1rem 1.6rem;
    background: var(--sand);
    border-left: 3px solid var(--sage);
    font-family: var(--hand);
    font-size: 1.55rem;
    line-height: 1.3;
    transform: rotate(-.4deg);
}
blockquote p:last-child { margin-bottom: 0; }

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--pencil);
    background: var(--sheet);
}
th, td {
    border: 1px solid var(--pencil);
    padding: .55rem .7rem;
    text-align: left;
    vertical-align: top;
}
th { font-family: var(--hand); font-size: 1.3rem; background: rgba(239, 217, 160, .45); }

hr {
    border: 0;
    height: 8px;
    margin: 2em 0;
    background: var(--wave-pencil) repeat-x 0 50% / 26px 8px;
}

code, pre { font-family: Consolas, "Courier New", monospace; font-size: .92em; }
pre {
    background: var(--sand);
    padding: 1rem 1.2rem;
    overflow-x: auto;
    border: 1px dashed var(--muted);
}

.screen-reader-text,
.skip-link:not(:focus) {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link:focus {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 100;
    padding: .5rem 1rem;
    background: var(--tag);
    color: var(--ink);
}

/* ---------- Контейнер ---------- */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ---------- Шапка ---------- */
.masthead { padding: 1.6rem 0 1.2rem; position: relative; z-index: 5; }

.masthead__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--ink);
    min-width: 0;
    flex: 1 1 420px;
}
.brand__logo { flex: 0 0 auto; display: block; }
.brand__logo img,
.brand__logo svg { display: block; width: 96px; height: auto; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name {
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(2.4rem, 4.6vw, 3.4rem);
    line-height: .95;
}
.brand__sub {
    font-size: 1.02rem;
    line-height: 1.3;
    margin-top: .35rem;
}
.brand__desc {
    font-size: .84rem;
    font-style: italic;
    color: var(--muted);
    line-height: 1.35;
    margin-top: .35rem;
    max-width: 46ch;
}

.nav-toggle {
    display: none;
    font-family: var(--hand);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--tag);
    border: 1px solid var(--muted);
    padding: .2rem 1rem .3rem;
    cursor: pointer;
    transform: rotate(-2deg);
    box-shadow: 0 2px 4px rgba(58, 50, 43, .15);
}

.topnav {
    padding-bottom: 10px;
    background: var(--wave-pencil) repeat-x 0 100% / 26px 8px;
}
.topnav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .2rem 1.3rem;
}
.topnav li { margin: 0; }
.topnav a {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.45rem;
    color: var(--ink);
    display: inline-block;
    padding: 0 .1rem;
    transition: color .2s ease, transform .2s ease;
}
.topnav a:hover { color: var(--brick); transform: rotate(-2deg); }
.topnav .current-menu-item > a,
.topnav .current_page_item > a,
.topnav .current-menu-ancestor > a { color: var(--brick); }

/* ---------- Полосы-страницы альбома ---------- */
.strip {
    position: relative;
    padding: 3rem 0 3.4rem;
}
.strip + .strip,
.site-foot { margin-top: 0; }

.strip::before,
.site-foot::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -13px;
    height: 14px;
    background: inherit;
    background-color: var(--strip-bg, var(--cream));
    -webkit-mask: var(--torn) repeat-x 0 0 / 240px 14px;
    mask: var(--torn) repeat-x 0 0 / 240px 14px;
}
.strip::after,
.site-foot::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: 7px;
    height: 3px;
    background:
        linear-gradient(var(--seam), var(--seam)) 0 0 / 100% 1px no-repeat,
        repeating-linear-gradient(90deg, transparent 0 46px, rgba(139, 106, 74, .8) 46px 54px, transparent 54px 92px) 0 2px / 100% 1px no-repeat;
    opacity: .45;
    pointer-events: none;
}

.strip--grid {
    --strip-bg: var(--cream);
    background-color: var(--cream);
}
.strip--linen {
    --strip-bg: var(--sand);
    background-color: var(--sand);
    background-image:
        repeating-linear-gradient(0deg, rgba(138, 122, 102, .08) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(138, 122, 102, .07) 0 1px, transparent 1px 3px);
}
.strip--mint {
    --strip-bg: var(--mint);
    background-color: var(--mint);
    background-image:
        radial-gradient(circle at 25% 35%, rgba(110, 127, 92, .08) 0 1px, transparent 1.6px),
        radial-gradient(circle at 75% 65%, rgba(110, 127, 92, .06) 0 1px, transparent 1.6px);
    background-size: 31px 29px, 43px 37px;
}
.strip--milk {
    --strip-bg: var(--milk);
    background-color: var(--milk);
}

/* ---------- Общие декоративные детали ---------- */
.grid-paper {
    background-color: var(--sheet);
    background-image:
        linear-gradient(rgba(91, 87, 80, .10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 87, 80, .10) 1px, transparent 1px);
    background-size: 18px 18px;
}

.paper-tag {
    display: inline-block;
    margin: 0 0 .6rem;
    padding: .1rem 1rem .15rem 1.3rem;
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--ink);
    background: var(--tag);
    clip-path: polygon(10px 0, 100% 0, calc(100% - 4px) 50%, 100% 100%, 10px 100%, 0 50%);
    transform: rotate(-2deg);
}
.paper-tag--sage { background: var(--sage); color: #FBF6EC; }

.tape {
    position: absolute;
    top: -12px;
    left: 50%;
    width: 92px;
    height: 26px;
    margin-left: -46px;
    background: rgba(239, 217, 160, .78);
    clip-path: polygon(3% 0, 97% 6%, 100% 30%, 96% 55%, 100% 82%, 97% 100%, 2% 94%, 0 70%, 4% 45%, 0 18%);
    box-shadow: 0 1px 2px rgba(58, 50, 43, .08);
    z-index: 2;
    pointer-events: none;
}

.pin {
    position: absolute;
    top: 14px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #D2B48A 0 18%, var(--pin) 45%, #6E5638 100%);
    box-shadow: 1px 2px 3px rgba(58, 50, 43, .35);
    z-index: 3;
}
.pin--l { left: 18px; }
.pin--r { right: 18px; }

.hand-title {
    hyphens: manual;
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(2.2rem, 4.2vw, 3.1rem);
    line-height: 1.05;
    margin: 0 0 .7rem;
}

.paper-btn {
    display: inline-block;
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.45rem;
    line-height: 1.2;
    color: var(--brick);
    background: #F6EBD3;
    padding: .55rem 1.5rem .6rem;
    border: 1px solid var(--sage);
    box-shadow: inset 0 0 0 3px #F6EBD3, inset 0 0 0 4px var(--sage), 2px 3px 6px rgba(58, 50, 43, .18);
    clip-path: polygon(0 3%, 6% 0, 40% 2%, 72% 0, 100% 2%, 99% 48%, 100% 97%, 64% 100%, 30% 98%, 1% 100%, 0 55%);
    transform: rotate(-2.5deg);
    transition: transform .25s ease, box-shadow .25s ease, color .2s ease;
}
.paper-btn:hover {
    transform: rotate(0deg) translateY(-2px);
    color: var(--brick-deep);
    box-shadow: inset 0 0 0 3px #F6EBD3, inset 0 0 0 4px var(--brick), 3px 6px 10px rgba(58, 50, 43, .22);
}

.brick-btn {
    display: inline-block;
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.2;
    color: #FBF6EC;
    background: var(--brick);
    padding: .3rem .95rem .35rem;
    border: 1px solid var(--brick-deep);
    clip-path: polygon(0 4%, 50% 0, 100% 3%, 99% 52%, 100% 97%, 48% 100%, 1% 98%, 0 50%);
    box-shadow: inset 0 0 0 2px var(--brick), inset 0 0 0 3px rgba(251, 246, 236, .45);
    transition: background-color .2s ease, transform .2s ease;
    white-space: nowrap;
}
.brick-btn:hover { background: var(--brick-deep); transform: rotate(-2deg); }

.wavy-title {
    display: inline-block;
    font-size: clamp(2.2rem, 4vw, 2.9rem);
    margin: 0;
    padding-bottom: 8px;
    background: var(--wave-red) repeat-x 0 100% / 20px 8px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.4rem;
    text-align: center;
}
.section-head .paper-tag { margin: 0; transform: rotate(3deg); }

/* ---------- Блок 1: рецепт недели ---------- */
.pinned-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.4rem;
    align-items: center;
    padding: 3rem 2.6rem 2.6rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(138, 122, 102, .25);
}
.pinned-card > * { min-width: 0; }

.pinned-card__photo {
    margin: 0;
    background: #FFFDF8;
    padding: 10px 10px 12px;
    box-shadow: var(--shadow);
    transform: rotate(-1.6deg);
}
.pinned-card__photo img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.pinned-card__text p { margin-bottom: 1rem; max-width: 34ch; }

.pencil-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.6rem;
    font-family: var(--hand);
    font-size: 1.55rem;
    line-height: 1.25;
    color: var(--ink);
}
.pencil-list li { margin: 0; }

.pinned-card__action { text-align: right; padding-right: .5rem; }

/* ---------- Блок 2: ладошка-открытка ---------- */
.craft-frame {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 2.2rem;
    align-items: center;
    padding: 2.2rem 2.4rem;
    background-color: var(--mint);
    border: 4px solid var(--sage);
    box-shadow: inset 0 0 0 5px var(--mint), inset 0 0 0 6px rgba(110, 127, 92, .55), var(--shadow);
}
.craft-frame > * { min-width: 0; }

.craft-board {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1fr);
    grid-template-areas:
        "snap1 sheet snap2"
        "snap3 sheet snap4";
    gap: 1.2rem .4rem;
    align-items: center;
}
.craft-sheet {
    grid-area: sheet;
    position: relative;
    margin: 0;
    background: #E8E7EC;
    padding: 1.4rem 1rem;
    box-shadow: var(--shadow);
    transform: rotate(.6deg);
}
.craft-sheet img {
    display: block;
    width: 100%;
    max-width: 260px;
    margin-inline: auto;
    aspect-ratio: 384 / 416;
    object-fit: contain;
}

.snap {
    position: relative;
    margin: 0;
    background: #FFFDF8;
    padding: 6px 6px 9px;
    box-shadow: var(--shadow);
    z-index: 2;
    transition: transform .25s ease;
}
.snap img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.snap--1 { grid-area: snap1; transform: rotate(-4deg); }
.snap--2 { grid-area: snap2; transform: rotate(3.5deg); }
.snap--3 { grid-area: snap3; transform: rotate(3deg); }
.snap--4 { grid-area: snap4; transform: rotate(-3deg); }
.snap:hover { transform: rotate(0) scale(1.04); z-index: 4; }

.snap::after {
    content: "";
    position: absolute;
    width: 46px;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 30'%3E%3Cpath d='M2 6 C14 3 26 8 36 20' fill='none' stroke='%235B5750' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M28 19 L37 21 L36 12' fill='none' stroke='%235B5750' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
    pointer-events: none;
}
.snap--1::after { right: -40px; top: 40%; }
.snap--2::after { left: -40px; top: 40%; transform: scaleX(-1); }
.snap--3::after { right: -40px; top: 22%; transform: scaleY(-1); }
.snap--4::after { left: -40px; top: 22%; transform: scale(-1, -1); }

.craft-text { text-align: center; }
.craft-lead { font-size: 1.1rem; margin-bottom: 1.2rem; }

.craft-steps {
    list-style: none;
    counter-reset: craft;
    padding: 0;
    margin: 0 auto;
    max-width: 30ch;
    text-align: left;
}
.craft-steps li {
    counter-increment: craft;
    position: relative;
    padding-left: 2.4rem;
    margin-bottom: .55rem;
    font-size: .98rem;
    line-height: 1.45;
}
.craft-steps li::before {
    content: counter(craft);
    position: absolute;
    left: 0;
    top: -.15rem;
    width: 1.8rem;
    height: 1.8rem;
    display: grid;
    place-items: center;
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--brick);
    border: 1.5px solid var(--brick);
    border-radius: 48% 52% 46% 54%;
}

/* ---------- Карточки записей ---------- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.6rem 2.4rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--sheet);
    padding: 14px 14px 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(138, 122, 102, .2);
    clip-path: polygon(0 0.6%, 30% 0, 62% 0.8%, 100% 0, 99.6% 40%, 100% 100%, 70% 99.2%, 35% 100%, 0.4% 99.4%, 0 60%);
    transition: transform .3s ease, box-shadow .3s ease;
    min-width: 0;
}
.card-wrap { position: relative; min-width: 0; }
.card-wrap:nth-child(3n+1) .card { transform: rotate(-1.8deg); }
.card-wrap:nth-child(3n+2) .card { transform: rotate(.9deg); background: #F7F0E2; }
.card-wrap:nth-child(3n+3) .card { transform: rotate(1.9deg); background: #F3EDDF; }
.card-wrap:hover .card { transform: rotate(0) translateY(-4px); box-shadow: var(--shadow-lift); }
.card-wrap .tape { top: -10px; }
.card-wrap:nth-child(3n+2) .tape { transform: rotate(-3deg); }
.card-wrap:nth-child(3n+3) .tape { transform: rotate(4deg); margin-left: -30px; }

.card-thumb { display: block; overflow: hidden; }
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .4s ease;
}
.card-wrap:hover .card-thumb img { transform: scale(1.03); }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: .9rem .25rem 0;
    min-width: 0;
}
.card-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.65rem;
    line-height: 1.1;
    margin: 0 0 .45rem;
}
.card-title a { color: var(--ink); transition: color .2s ease; }
.card-title a:hover { color: var(--brick); }

.card-excerpt { font-size: .97rem; line-height: 1.5; margin-bottom: .9rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt ul, .card-excerpt ol { margin: 0 0 .5em; padding-left: 1.1em; }
.card-excerpt li { margin: 0; }

.card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
}
.card-date {
    font-family: var(--hand);
    font-size: 1.25rem;
    color: var(--muted);
}

.empty-note {
    text-align: center;
    font-family: var(--hand);
    font-size: 1.6rem;
    color: var(--muted);
    grid-column: 1 / -1;
}

/* ---------- Блоки 3 и 4 ---------- */
.duo {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: start;
}
.duo > * { min-width: 0; }

.evenings {
    position: relative;
    padding: 2rem 2rem 2.2rem;
    box-shadow: var(--shadow);
    transform: rotate(-.5deg);
    text-align: center;
}
.evenings .hand-title { font-size: clamp(2rem, 3.4vw, 2.6rem); }
.evenings__lead { margin-bottom: 1.4rem; }

.week {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1.5px solid var(--pencil);
    border-left: 1.5px solid var(--pencil);
    text-align: center;
}
.week li {
    margin: 0;
    display: flex;
    flex-direction: column;
    border-right: 1.5px solid var(--pencil);
    border-bottom: 1.5px solid var(--pencil);
    min-width: 0;
}
.week__day {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.2;
    padding: .25rem .2rem;
    border-bottom: 1.5px solid var(--pencil);
    color: var(--ink);
}
.week li:nth-child(6) .week__day,
.week li:nth-child(7) .week__day { color: var(--brick); }
.week__idea {
    flex: 1;
    font-family: var(--hand);
    font-size: 1.15rem;
    line-height: 1.12;
    padding: .55rem .3rem .4rem;
    color: var(--pencil);
    overflow-wrap: normal;
    hyphens: auto;
}
.week__mark {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0 auto .55rem;
    border: 1.5px solid var(--sage);
    border-radius: 46% 54% 50% 48%;
}

.pantry { text-align: center; padding-top: .6rem; }
.pantry .hand-title { font-size: clamp(2rem, 3.4vw, 2.6rem); }

.pantry-board {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr) minmax(0, .9fr);
    grid-template-areas:
        "jam   tags  yarn"
        "kids  tags  cloth"
        "herbs tags  cloth";
    gap: .9rem .6rem;
    align-items: center;
    margin: 1.4rem 0 1.2rem;
}
.pantry-board > * { min-width: 0; }

.clip {
    margin: 0;
    background: #FFFDF8;
    padding: 5px 5px 8px;
    box-shadow: var(--shadow);
    transition: transform .25s ease;
}
.pantry-board .clip { width: 100%; max-width: 124px; justify-self: center; }
.clip img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.clip:hover { transform: rotate(0) scale(1.05); position: relative; z-index: 3; }
.clip--jam { grid-area: jam; transform: rotate(-4deg); }
.clip--yarn { grid-area: yarn; transform: rotate(4deg); }
.clip--kids { grid-area: kids; transform: rotate(3deg); }
.clip--herbs { grid-area: herbs; transform: rotate(-3deg); }
.clip--cloth { grid-area: cloth; transform: rotate(-4deg); }

.pantry-tags {
    grid-area: tags;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
}
.pantry-tags li { margin: 0; position: relative; }
.pantry-tags li:nth-child(odd) { align-self: flex-start; }
.pantry-tags li:nth-child(even) { align-self: flex-end; }
.pantry-tags li + li::before {
    content: "";
    position: absolute;
    top: -1.2rem;
    left: 30%;
    width: 34px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 20'%3E%3Cpath d='M2 2 C10 4 20 8 28 15' fill='none' stroke='%235B5750' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M21 15 L29 16 L27 9' fill='none' stroke='%235B5750' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.pantry-tags li:nth-child(odd) + li::before { left: 18%; }
.pantry-tags li:nth-child(even) + li::before { left: 54%; transform: scaleX(-1); }

.pantry-tag {
    display: inline-block;
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--ink);
    background: var(--tag);
    padding: .25rem 1.3rem .3rem 1.5rem;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
    filter: drop-shadow(1px 2px 1px rgba(58, 50, 43, .18));
    transition: background-color .2s ease, transform .2s ease;
}
.pantry-tags li:nth-child(1) .pantry-tag { transform: rotate(-4deg); }
.pantry-tags li:nth-child(2) .pantry-tag { transform: rotate(3deg); }
.pantry-tags li:nth-child(3) .pantry-tag { transform: rotate(-2deg); }
.pantry-tags li:nth-child(4) .pantry-tag { transform: rotate(4deg); }
.pantry-tag:hover { background: #E8C878; color: var(--brick-deep); }

.pantry__caption {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.85rem;
    margin: 0;
}

/* ---------- Внутренние страницы ---------- */
.page-main { padding: 1rem 0 3.6rem; }

.breadcrumbs {
    font-size: .92rem;
    color: var(--muted);
    margin: .4rem 0 1.6rem;
}
.breadcrumbs .sep { margin: 0 .35rem; color: var(--sage); }
.breadcrumbs span:last-child { color: var(--ink); }

.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-sheet {
    position: relative;
    background: var(--sheet);
    padding: 2.6rem 2.6rem 2.4rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(138, 122, 102, .2);
}
.page-sheet > .tape { left: 18%; transform: rotate(-4deg); }

.page-title {
    margin: 0 0 .8rem;
    font-size: clamp(2.3rem, 4.6vw, 3.2rem);
}
.page-head {
    text-align: center;
    margin-bottom: 2.2rem;
}
.page-head .page-title {
    display: inline-block;
    padding-bottom: 8px;
    background: var(--wave-red) repeat-x 0 100% / 20px 8px;
}
.archive-desc { color: var(--muted); max-width: 60ch; margin: .6rem auto 0; }

.entry-meta {
    font-family: var(--hand);
    font-size: 1.3rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1rem;
}
.entry-meta a { color: var(--sage); }

.entry-cover {
    margin: 0 0 1.8rem;
    background: #FFFDF8;
    padding: 10px;
    box-shadow: var(--shadow);
    transform: rotate(-.6deg);
}
.entry-cover img { display: block; width: 100%; height: auto; }

.entry-content > *:first-child { margin-top: 0; }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-family: var(--hand); font-size: 1.2rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.entry-content ul li::marker { color: var(--brick); }
.entry-content ol li::marker { color: var(--brick); font-family: var(--hand); font-weight: 700; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }

.entry-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.entry-tags a {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink);
    background: var(--tag);
    padding: .05rem .9rem .1rem 1.1rem;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.4rem;
    flex-wrap: wrap;
}
.post-nav a { font-family: var(--hand); font-size: 1.35rem; font-weight: 700; }

.blog-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.6rem 2.2rem;
    padding-top: .6rem;
}
.layout-single .blog-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Пагинация ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin-top: 3rem;
}
.pager .page-numbers {
    display: inline-block;
    min-width: 2.6rem;
    padding: .2rem .7rem .3rem;
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.35rem;
    text-align: center;
    color: var(--ink);
    background: var(--sheet);
    border: 1px solid var(--muted);
    box-shadow: 1px 2px 3px rgba(58, 50, 43, .12);
    transition: transform .2s ease, background-color .2s ease;
}
.pager a.page-numbers:hover { background: var(--tag); transform: rotate(-3deg); }
.pager .page-numbers.current { background: var(--brick); border-color: var(--brick-deep); color: #FBF6EC; transform: rotate(2deg); }
.pager .page-numbers.dots { background: none; border: 0; box-shadow: none; min-width: 0; }

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; }
.sidebar .widget {
    position: relative;
    background: var(--sand);
    background-image:
        repeating-linear-gradient(0deg, rgba(138, 122, 102, .07) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(138, 122, 102, .06) 0 1px, transparent 1px 3px);
    padding: 1.8rem 1.5rem 1.4rem;
    margin-bottom: 2.2rem;
    box-shadow: var(--shadow);
    color: var(--ink);
    transform: rotate(.6deg);
}
.sidebar .widget:nth-child(even) { transform: rotate(-.6deg); background-color: var(--mint); }
.sidebar .widget-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.9rem;
    color: var(--ink);
    margin: 0 0 .8rem;
}
.sidebar .widget a { color: var(--brick); }
.sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar .widget li {
    padding: .45rem 0;
    border-bottom: 1px dashed rgba(91, 87, 80, .35);
    margin: 0;
    line-height: 1.4;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget .post-date { display: block; color: var(--muted); font-size: .85rem; }

/* ---------- Поиск ---------- */
.search-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-form label { flex: 1 1 200px; min-width: 0; }
.search-field {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    padding: .6rem .8rem;
    color: var(--ink);
    background: var(--sheet);
    border: 1px solid var(--muted);
    border-radius: 0;
}
.search-submit {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.3rem;
    color: #FBF6EC;
    background: var(--brick);
    border: 1px solid var(--brick-deep);
    padding: .3rem 1.2rem;
    cursor: pointer;
    transition: background-color .2s ease;
}
.search-submit:hover { background: var(--brick-deep); }

/* ---------- 404 ---------- */
.lost {
    text-align: center;
}
.lost__mark {
    font-family: var(--hand);
    font-weight: 700;
    font-size: clamp(5rem, 14vw, 8rem);
    color: var(--brick);
    line-height: 1;
    margin: 0;
    transform: rotate(-4deg);
}
.lost .search-form { max-width: 480px; margin: 1.6rem auto; }

/* ---------- Комментарии ---------- */
.comments-area {
    margin-top: 2.6rem;
    padding: 2rem 2rem 1.6rem;
    background: var(--sand);
    box-shadow: var(--shadow);
}
.comments-title { margin: 0 0 1.2rem; font-size: 2rem; }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { margin-left: 1.6rem; }
.comment-body {
    background: var(--sheet);
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--sage);
}
.comment-meta { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline; margin-bottom: .4rem; }
.comment-author { font-family: var(--hand); font-weight: 700; font-size: 1.35rem; }
.comment-date { font-size: .82rem; color: var(--muted); }
.comment-awaiting { font-style: italic; color: var(--muted); font-size: .9rem; }
.comment-reply-link { font-family: var(--hand); font-size: 1.15rem; font-weight: 700; }
.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-size: 1.8rem; margin: 0 0 .8rem; }
.comment-reply-title small { font-size: 1rem; margin-left: .6rem; }
.comment-form p { margin-bottom: .9rem; }
.comment-form label { display: block; font-size: .92rem; margin-bottom: .2rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    padding: .55rem .75rem;
    background: var(--sheet);
    border: 1px solid var(--muted);
    color: var(--ink);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; }
.comment-form .submit {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.35rem;
    color: #FBF6EC;
    background: var(--brick);
    border: 1px solid var(--brick-deep);
    padding: .35rem 1.4rem;
    cursor: pointer;
}
.comment-form .submit:hover { background: var(--brick-deep); }
.comment-nav { display: flex; justify-content: space-between; margin: 1rem 0; }

/* ---------- Подвал ---------- */
.site-foot {
    --strip-bg: var(--milk);
    position: relative;
    background-color: var(--milk);
    background-image:
        linear-gradient(rgba(138, 106, 74, .07), rgba(138, 106, 74, .07)),
        repeating-linear-gradient(0deg, rgba(138, 122, 102, .06) 0 1px, transparent 1px 3px);
    padding: 3rem 0 1.4rem;
    margin-top: 1rem;
    color: var(--ink);
}
.strip--milk + .site-foot { margin-top: 0; }
.site-foot::before { background-image: none; background-color: #E7DAC4; }

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}
.foot-cols > * { min-width: 0; }
.foot-cols .widget { margin-bottom: 1rem; color: var(--ink); }
.foot-cols .widget-title {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 2rem;
    color: var(--ink);
    margin: 0 0 .6rem;
}
.foot-cols .widget p,
.foot-cols .textwidget { font-size: .95rem; color: var(--ink); }
.foot-cols .widget a { color: var(--brick); }
.foot-cols .widget a:hover { color: var(--brick-deep); }
.foot-col--mid { text-align: center; }
.foot-col--mid .widget ul { list-style: none; padding: 0; margin: 0; }
.foot-col--mid .widget li { margin: 0 0 .25rem; }
.foot-col--mid .widget a { color: var(--ink); background: none; padding: 0; }
.foot-col--mid .widget a:hover { color: var(--brick); }

.copyline {
    margin: 2rem 0 0;
    padding-top: 1rem;
    text-align: center;
    font-size: .88rem;
    color: var(--muted);
    border-top: 1px dashed rgba(91, 87, 80, .35);
}

/* ---------- Cookie ---------- */
.cookie-note {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 90;
    width: min(92%, 640px);
    transform: translateX(-50%) rotate(-.6deg);
    display: flex;
    align-items: center;
    gap: 1rem 1.4rem;
    flex-wrap: wrap;
    justify-content: center;
    background: var(--sheet);
    padding: 1.2rem 1.4rem 1.1rem;
    box-shadow: var(--shadow-lift);
    border: 1px solid rgba(138, 122, 102, .35);
}
.cookie-note p { margin: 0; font-size: .92rem; flex: 1 1 260px; min-width: 0; }
.cookie-note .tape { top: -12px; }
.cookie-note button {
    font-family: var(--hand);
    font-weight: 700;
    font-size: 1.35rem;
    color: #FBF6EC;
    background: var(--brick);
    border: 1px solid var(--brick-deep);
    padding: .25rem 1.4rem .3rem;
    cursor: pointer;
    transition: background-color .2s ease;
}
.cookie-note button:hover { background: var(--brick-deep); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .pinned-card { grid-template-columns: minmax(0, 1fr); padding: 3rem 1.8rem 2.2rem; }
    .pinned-card__text p { max-width: none; }
    .craft-frame { grid-template-columns: minmax(0, 1fr); padding: 2rem 1.6rem; }
    .duo { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
    .notes-grid,
    .layout-single .blog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; }
    .layout-single .content-area { width: 100%; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-col--mid { text-align: left; }
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-block; }
    .topnav { flex-basis: 100%; }
    .topnav ul { flex-direction: column; gap: .2rem; padding: .4rem 0 .6rem; }
    .brand__logo img, .brand__logo svg { width: 72px; }
}

@media (max-width: 600px) {
    body { font-size: 1rem; }
    .strip { padding: 2.4rem 0 2.6rem; }
    .pinned-card { padding: 2.8rem 1.2rem 1.8rem; gap: 1.6rem; }
    .pinned-card__action { text-align: center; padding-right: 0; }
    .craft-frame { padding: 1.6rem 1.1rem; }
    .craft-board { gap: .9rem .3rem; }
    .snap::after { display: none; }
    .notes-grid,
    .blog-list,
    .layout-single .blog-list { grid-template-columns: minmax(0, 1fr); }
    .evenings { padding: 1.6rem 1.1rem 1.8rem; transform: none; }
    .week { grid-template-columns: minmax(0, 1fr); text-align: left; }
    .week li { flex-direction: row; align-items: center; }
    .week__day { flex: 0 0 3.2rem; border-bottom: 0; border-right: 1.5px solid var(--pencil); text-align: center; }
    .week__idea { padding: .4rem .7rem; }
    .week__mark { margin: 0 .7rem 0 0; flex: 0 0 18px; }
    .pantry-board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas:
            "jam   yarn  kids"
            "tags  tags  tags"
            "herbs cloth cloth";
    }
    .pantry-tags { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: .8rem; }
    .pantry-tags li:nth-child(n) { align-self: auto; }
    .pantry-tags li + li::before { display: none; }
    .page-sheet { padding: 2.2rem 1.2rem 1.6rem; }
    .comments-area { padding: 1.6rem 1.1rem 1.2rem; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .cookie-note { padding: 1.2rem 1.1rem 1rem; }
    .alignleft, .alignright { float: none; margin: 1em 0; }
}

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