/*
Theme Name: dds_school5-priozersk.ru
Theme URI: https://school5-priozersk.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: pzvon
*/

/* ---------- Шрифты ---------- */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/caveat-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: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/caveat-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-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: "Roboto Condensed"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-condensed-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-condensed-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: "Roboto Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-condensed-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-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: "Roboto Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/roboto-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Палитра ---------- */
:root {
    --page: #EAF1F6;
    --grid: #C3D6E4;
    --paper: #FBF8F0;
    --board: #2F4A3E;
    --board-deep: #23382F;
    --wood: #4A3824;
    --wood-light: #5E4830;
    --ink: #23303A;
    --muted: #6B7A85;
    --pen: #E4572E;
    --blue: #1F5C99;
    --marker: #F2C230;
    --chalk: #F4F1E6;
    --sky-note: #67C3F0;
    --rule: #D3DFE8;
    --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
    --text: "Roboto Condensed", "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
    --shadow: 0 8px 18px rgba(35, 48, 58, .16), 0 2px 4px rgba(35, 48, 58, .12);
}

/* Скрытие через атрибут hidden — до основных стилей элементов */
.cookie-banner[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;
    color: var(--ink);
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.6;
    background-color: var(--page);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 26px 26px;
    background-position: -1px -1px;
}
img { max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { margin: 1.4em 0 .55em; line-height: 1.2; color: var(--ink); }
p, li, dd, dt, td, th, h1, h2, h3, h4, figcaption, blockquote, .card__title, .crumbs { overflow-wrap: break-word; hyphens: auto; }
a {
    color: var(--blue);
    text-decoration: underline wavy var(--pen);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
    transition: color .2s ease;
}
a:hover { color: var(--pen); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 3px dashed var(--pen);
    outline-offset: 3px;
}
.skip {
    position: absolute;
    left: 1rem;
    top: -60px;
    z-index: 100;
    padding: .6rem 1rem;
    background: var(--marker);
    color: var(--ink);
    font-weight: 700;
}
.skip:focus { top: 1rem; }

.shell { width: min(85%, 1200px); margin-inline: auto; }

/* ---------- Кнопка «жёлтая бумага» ---------- */
.btn-paper {
    position: relative;
    display: inline-block;
    padding: .55rem 1.25rem .6rem;
    border: 2px solid var(--blue);
    border-radius: 3px 6px 2px 5px / 5px 2px 6px 3px;
    background: var(--marker);
    color: var(--blue);
    font-family: var(--text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 2px 3px 0 rgba(35, 48, 58, .18);
    transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn-paper::before {
    content: "";
    position: absolute;
    inset: -6px -5px -5px -6px;
    border: 2px solid var(--blue);
    border-radius: 4px 2px 5px 3px;
    opacity: .5;
    transform: rotate(-1.4deg);
    pointer-events: none;
}
.btn-paper:hover {
    color: var(--blue);
    background: #F6D261;
    transform: translate(-1px, -2px) rotate(-.6deg);
    box-shadow: 4px 5px 0 rgba(35, 48, 58, .2);
}
.btn-paper:active { transform: translate(0, 1px); box-shadow: 1px 1px 0 rgba(35, 48, 58, .2); }

/* ---------- Детали канцелярии ---------- */
.tape {
    position: absolute;
    width: 92px;
    height: 26px;
    background: rgba(242, 194, 48, .78);
    box-shadow: 0 1px 2px rgba(35, 48, 58, .12);
    clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 48%);
}
.clip {
    position: absolute;
    top: -30px;
    left: 34px;
    width: 26px;
    height: 70px;
    z-index: 3;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 70'%3E%3Cpath d='M18 26 V55 a6 6 0 0 1 -12 0 V12 a8 8 0 0 1 16 0 V50 a3.5 3.5 0 0 1 -7 0 V22' fill='none' stroke='%237A8792' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(1px 2px 1px rgba(35, 48, 58, .25));
    transform: rotate(-8deg);
}

/* ---------- Шапка-доска ---------- */
.board-top { padding: 0 18px; }
.masthead {
    position: relative;
    color: var(--chalk);
    background-color: var(--board);
    background-image:
        radial-gradient(ellipse 38% 60% at 30% 40%, rgba(244, 241, 230, .07), transparent 70%),
        radial-gradient(ellipse 30% 50% at 72% 64%, rgba(244, 241, 230, .06), transparent 70%),
        radial-gradient(ellipse 20% 40% at 90% 20%, rgba(244, 241, 230, .05), transparent 70%);
    border: 9px solid var(--wood);
    border-top: 0;
    border-radius: 0 0 4px 4px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, .28), 0 6px 14px rgba(35, 48, 58, .2);
}
.masthead__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.6rem 0 1.7rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    color: var(--chalk);
    text-decoration: none;
}
.brand:hover { color: var(--chalk); }
.brand__mark { flex: 0 0 auto; display: block; }
.brand__svg { display: block; width: 88px; height: auto; }
.brand-logo { display: block; max-height: 72px; width: auto; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name {
    font-family: var(--hand);
    font-size: clamp(2.2rem, 4vw, 3.3rem);
    font-weight: 700;
    line-height: .95;
    letter-spacing: .01em;
    text-shadow: 0 0 1px rgba(244, 241, 230, .5);
}
.brand__sub { font-size: 1.1rem; line-height: 1.3; margin-top: .25rem; }
.brand__desc {
    max-width: 46ch;
    margin-top: .35rem;
    font-size: .8rem;
    line-height: 1.35;
    color: rgba(244, 241, 230, .72);
}
.topnav__list {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.topnav__list a {
    color: var(--chalk);
    font-size: 1.08rem;
    text-decoration: none;
    padding: .2rem 0;
    background: linear-gradient(var(--marker), var(--marker)) left bottom / 0 2px no-repeat;
    transition: background-size .25s ease, color .2s ease;
}
.topnav__list a:hover,
.topnav__list .current-menu-item > a {
    color: #fff;
    background-size: 100% 2px;
}
.nav-toggle {
    display: none;
    align-items: center;
    gap: .55rem;
    padding: .5rem .8rem;
    border: 2px dashed rgba(244, 241, 230, .7);
    border-radius: 4px;
    background: transparent;
    color: var(--chalk);
    font: 500 1rem var(--text);
    cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--chalk);
    border-radius: 2px;
    position: relative;
    transition: transform .2s ease;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-main { display: block; padding-bottom: 4rem; }

/* ---------- Заголовки секций ---------- */
.fsec { position: relative; min-width: 0; padding: 0; }
.fsec__title,
.page-head__title {
    display: inline-block;
    margin: 0 0 1.6rem;
    font-family: var(--hand);
    font-size: clamp(2.1rem, 3.4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.05;
    color: #141B21;
    text-decoration: underline wavy var(--blue);
    text-decoration-thickness: 2px;
    text-underline-offset: .28em;
    text-decoration-skip-ink: none;
}
.fsec__title--center { display: block; text-align: center; }

/* ---------- Главная ---------- */
.front { padding-top: 3.2rem; }
.front__duo {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 3rem 3.4rem;
    align-items: start;
}
.front__duo > * { min-width: 0; }
.front__duo--top .timetable { margin-top: 3.4rem; }
.front__duo--bottom { margin-top: 4.5rem; align-items: stretch; }

/* Блок 1 — расписание */
.timetable__sheet {
    position: relative;
    padding: 2.4rem 1.6rem 3.2rem;
    background: var(--paper);
    border-radius: 3px;
    box-shadow: var(--shadow);
    transform: rotate(-2deg);
}
.timetable__tick { position: absolute; top: -18px; left: -14px; width: 62px; height: auto; z-index: 2; }
.tape--corner { top: -10px; right: -26px; transform: rotate(32deg); }
.timetable__scroll { overflow-x: auto; }
.timetable__grid {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    table-layout: fixed;
}
.timetable__grid th {
    padding: .1rem .3rem .4rem;
    border-bottom: 2px solid var(--ink);
    font-family: var(--hand);
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}
.timetable__grid th:nth-child(odd) { transform: rotate(-3deg); }
.timetable__grid th + th,
.timetable__grid td + td { border-left: 2px solid var(--ink); }
.timetable__grid td {
    padding: .9rem .45rem;
    text-align: center;
    vertical-align: top;
    font-size: .98rem;
    line-height: 1.25;
}
.timetable__topics td { border-bottom: 2px solid var(--ink); }
.timetable__topics td.is-marked {
    background: linear-gradient(176deg, transparent 6%, rgba(242, 194, 48, .7) 7%, rgba(242, 194, 48, .62) 90%, transparent 91%);
}
.timetable__tips td {
    padding-top: .5rem;
    padding-bottom: 1.6rem;
    font-family: var(--hand);
    font-size: 1.28rem;
    line-height: 1.6rem;
    color: var(--blue);
    background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(1.6rem - 1px), var(--rule) calc(1.6rem - 1px), var(--rule) 1.6rem);
    background-position: 0 .5rem;
}
.timetable__marker {
    position: absolute;
    right: -34px;
    bottom: -44px;
    width: 128px;
    height: auto;
    display: block;
    filter: drop-shadow(2px 4px 3px rgba(35, 48, 58, .25));
    transform: rotate(4deg);
}

/* Блок 2 — схема разбора */
.anatomy__sheet {
    position: relative;
    padding: 2.6rem 2rem 2rem;
    background: var(--paper);
    border-radius: 3px;
    box-shadow: var(--shadow);
    transform: rotate(.8deg);
}
.anatomy__sheet::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 46px;
    height: 46px;
    background: linear-gradient(225deg, var(--page) 50%, #E3DCC8 50%, #F3EEE1 100%);
    box-shadow: -3px 3px 5px rgba(35, 48, 58, .14);
    border-bottom-left-radius: 4px;
}
.anatomy__title { font-size: clamp(1.9rem, 3vw, 2.45rem); max-width: 15ch; margin-right: 2rem; }
.anatomy__map { position: relative; aspect-ratio: 4 / 3; margin-top: .4rem; }
.anatomy__arrows { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.anatomy__book {
    position: absolute;
    left: 33%;
    top: 34.5%;
    width: 34%;
    height: auto;
    display: block;
}
.anatomy__parts { margin: 0; padding: 0; list-style: none; }
.anatomy__part {
    position: absolute;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: .45rem;
    align-items: center;
    line-height: 1.15;
}
.anatomy__part .num {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--pen);
    color: #fff;
    font-family: var(--hand);
    font-size: 1.35rem;
    font-weight: 700;
    box-shadow: 1px 2px 0 rgba(35, 48, 58, .2);
}
.anatomy__part strong { font-weight: 500; font-size: 1.05rem; }
.anatomy__hint { font-size: .78rem; color: var(--muted); line-height: 1.2; margin-top: .15rem; }
.anatomy__part--1 { left: 2%; top: 3%; width: 31%; }
.anatomy__part--2 { left: 66%; top: 11%; width: 33%; }
.anatomy__part--4 { left: 76%; top: 46%; width: 27%; }
.anatomy__part--3 { left: 0; top: 72%; width: 29%; }
.anatomy__part--5 { left: 64.5%; top: 75%; width: 34%; }

/* Последние записи */
.latest { margin-top: 5rem; }
.cards {
    display: grid;
    gap: 2.6rem 2.2rem;
    align-items: start;
}
.cards--front { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: .6rem; }
.cards--front > .card:nth-child(n+4) { display: none; }
.cards--list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); padding-top: 1rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    padding: 1rem 1.1rem 1.35rem;
    background: var(--paper);
    border-radius: 3px;
    box-shadow: var(--shadow);
    transform: rotate(-1.8deg);
    transition: transform .25s ease, box-shadow .25s ease;
}
.cards > .card:nth-child(3n+2) { transform: rotate(1deg); }
.cards > .card:nth-child(3n) { transform: rotate(2.2deg); }
.cards > .card:hover { transform: rotate(0) translateY(-5px); box-shadow: 0 14px 26px rgba(35, 48, 58, .2); }
.card__tape {
    position: absolute;
    top: -12px;
    right: 22px;
    z-index: 3;
    width: 74px;
    height: 24px;
    background: rgba(233, 230, 218, .85);
    box-shadow: 0 1px 2px rgba(35, 48, 58, .15);
    transform: rotate(34deg);
    clip-path: polygon(4% 0, 96% 6%, 100% 52%, 95% 100%, 3% 94%, 0 46%);
}
.card__photo {
    position: relative;
    margin: -1.6rem .3rem 0 -.2rem;
    padding: 8px 8px 22px;
    background: #fff;
    box-shadow: 0 3px 8px rgba(35, 48, 58, .2);
    transform: rotate(-1.5deg);
}
.cards > .card:nth-child(3n+2) .card__photo { transform: rotate(1.2deg); }
.card__photo a { display: block; text-decoration: none; }
.card__photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 1rem;
}
.card__title { margin: 0 0 .45rem; font-size: 1.22rem; font-weight: 700; line-height: 1.22; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--blue); text-decoration: underline wavy var(--pen); text-decoration-thickness: 1.5px; }
.card-excerpt {
    font-size: .95rem;
    line-height: 1.4;
    color: #34424D;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: inherit; }
.card__date { display: block; margin: .3rem 0 1rem; font-size: .84rem; color: var(--muted); }
.card__more { align-self: flex-start; margin-top: auto; margin-left: 4px; }
.latest__all { margin: 3rem 0 0; text-align: center; }
.empty-note { color: var(--muted); font-size: 1.05rem; }

/* Блок 3 — привычки */
.habits__board {
    display: grid;
    grid-template-columns: 44px minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: stretch;
}
.habits__ruler {
    min-height: 100%;
    background:
        linear-gradient(var(--ink), var(--ink)) left top / 3px 100% no-repeat,
        repeating-linear-gradient(to bottom, var(--ink) 0 2px, transparent 2px 65px) left top / 32px 100% no-repeat,
        repeating-linear-gradient(to bottom, var(--ink) 0 2px, transparent 2px 13px) left top / 15px 100% no-repeat;
}
.habits__notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: .6rem;
    row-gap: .2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.memo {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 8.6rem;
    padding: 1rem .9rem 1.1rem;
    text-align: center;
    color: var(--ink);
    box-shadow: 2px 4px 8px rgba(35, 48, 58, .2);
    transform: rotate(-2deg);
    transition: transform .2s ease;
}
.memo::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 22px;
    height: 22px;
    background: linear-gradient(315deg, var(--page) 50%, rgba(255, 255, 255, .7) 50%);
    box-shadow: -2px -2px 3px rgba(35, 48, 58, .1);
}
.memo strong { font-size: 1.04rem; font-weight: 500; line-height: 1.2; }
.memo span { margin-top: .35rem; font-family: var(--hand); font-size: 1.12rem; line-height: 1.05; color: #3A4A55; }
.memo--yellow { background: var(--marker); }
.memo--blue { background: var(--sky-note); }
.habits__notes .memo:nth-child(even) { grid-column: 2; margin-top: 2.6rem; transform: rotate(2deg); }
.habits__notes .memo:nth-child(odd) { grid-column: 1; }
.habits__notes .memo:nth-child(3) { margin-top: -1.2rem; transform: rotate(-1deg); }
.habits__notes .memo:nth-child(4) { margin-top: 1.4rem; }
.habits__notes .memo:nth-child(5) { margin-top: -.4rem; transform: rotate(1.5deg); }
.memo:hover { transform: rotate(0) scale(1.03); z-index: 2; }
.habits__track { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.habits__cells {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border: 2px solid var(--ink);
    background: rgba(255, 255, 255, .45);
}
.habits__cell { aspect-ratio: 1; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.habits__cell:nth-child(5n) { border-right: 0; }
.habits__cell:nth-last-child(-n+5) { border-bottom: 0; }
.habits__cell.is-on--yellow { background: rgba(242, 194, 48, .78); }
.habits__cell.is-on--blue { background: rgba(103, 195, 240, .78); }
.habits__track figcaption { margin-top: .7rem; font-family: var(--hand); font-size: 1.3rem; line-height: 1.1; color: var(--blue); }

/* Блок 4 — словарь на доске */
.glossary { display: flex; flex-direction: column; }
.glossary__board {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-areas: "i1 bell" "i2 bell" "i3 i4";
    gap: 1.3rem 2rem;
    align-items: center;
    padding: 2.4rem 2.2rem 2.8rem;
    color: var(--chalk);
    background-color: var(--board);
    background-image:
        radial-gradient(ellipse 50% 40% at 25% 30%, rgba(244, 241, 230, .07), transparent 70%),
        radial-gradient(ellipse 40% 40% at 75% 75%, rgba(244, 241, 230, .06), transparent 70%);
    border: 11px solid var(--wood);
    border-radius: 5px;
    box-shadow: inset 0 0 36px rgba(0, 0, 0, .35), var(--shadow);
}
.glossary__list { display: contents; margin: 0; }
.glossary__item { min-width: 0; font-size: 1.32rem; line-height: 1.3; }
.glossary__item dt { display: inline; font-weight: 500; }
.glossary__item dt::after { content: " — "; }
.glossary__item dd { display: inline; margin: 0; }
.glossary__item--1 { grid-area: i1; }
.glossary__item--2 { grid-area: i2; }
.glossary__item--3 { grid-area: i3; }
.glossary__item--4 { grid-area: i4; }
.glossary__bell {
    grid-area: bell;
    justify-self: center;
    display: block;
    width: min(100%, 240px);
    height: auto;
}
.glossary__arrow { position: absolute; display: block; opacity: .9; pointer-events: none; }
.glossary__arrow--a { left: 37%; top: 37%; width: 84px; height: auto; }
.glossary__arrow--b { right: 3%; top: 60%; width: 36px; height: auto; }
.glossary__arrow--c { left: 33%; bottom: 3%; width: 84px; height: auto; }
.glossary__sticky {
    position: absolute;
    top: -20px;
    right: 18px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 96px;
    height: 90px;
    padding: .5rem;
    background: var(--marker);
    color: var(--ink);
    font-family: var(--hand);
    font-size: 1.12rem;
    line-height: 1;
    text-align: center;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, .3);
    transform: rotate(5deg);
}
.glossary__eraser {
    position: absolute;
    right: 16%;
    bottom: -10px;
    width: 62px;
    height: 12px;
    background: linear-gradient(#FFFFFF, #E4E1D6);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.timetable__grid td, .timetable__grid th, .anatomy__part, .anatomy__part *, .memo, .memo *, .glossary__item, .glossary__item *, .habits__track figcaption, .board-bottom .widget, .board-bottom .widget *, .brand__desc { hyphens: manual; }

/* ---------- Внутренние страницы ---------- */
.inner { padding-top: 1.6rem; }
.crumbs {
    margin: 0 0 2.6rem;
    font-size: .92rem;
    color: var(--muted);
}
.crumbs a { color: var(--blue); }
.crumbs__sep { margin: 0 .3rem; color: var(--pen); font-weight: 700; }
.crumbs__current { color: var(--ink); }
.layout-single { display: block; }
.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: 1rem; }
.page-head__lead { max-width: 60ch; color: #34424D; }

.sheet {
    position: relative;
    padding: 2.6rem 2.6rem 2.4rem 3.8rem;
    background-color: var(--paper);
    background-image: linear-gradient(90deg, transparent 2.3rem, rgba(228, 87, 46, .45) 2.3rem, rgba(228, 87, 46, .45) calc(2.3rem + 2px), transparent calc(2.3rem + 2px));
    border-radius: 3px;
    box-shadow: var(--shadow);
}
.entry__title {
    margin: 0 0 .6rem;
    font-family: var(--hand);
    font-size: clamp(2.2rem, 4vw, 3rem);
    line-height: 1.05;
    color: #141B21;
}
.entry__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; color: var(--muted); }
.entry__cats a { margin-right: .6rem; }
.entry__photo { margin: 1.6rem 0; padding: 10px 10px 26px; background: #fff; box-shadow: 0 3px 10px rgba(35, 48, 58, .18); transform: rotate(-.6deg); }
.entry__photo img { display: block; width: 100%; height: auto; }
.entry__content { margin-top: 1.4rem; }
.entry__content h2 { font-family: var(--hand); font-size: 2.1rem; color: #141B21; text-decoration: underline wavy var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: .25em; }
.entry__content h3 { font-size: 1.32rem; font-weight: 700; }
.entry__content h4 { font-size: 1.12rem; font-weight: 700; }
.entry__content ul, .entry__content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry__content li { margin-bottom: .35em; }
.entry__content ul li::marker { color: var(--pen); }
.entry__content ol li::marker { color: var(--blue); font-weight: 700; }
.entry__content blockquote {
    margin: 1.6rem 0;
    padding: 1.2rem 1.5rem 1.2rem 1.6rem;
    background: #FFF4C7;
    border-left: 6px solid var(--marker);
    box-shadow: 2px 3px 6px rgba(35, 48, 58, .12);
    font-size: 1.1rem;
    transform: rotate(-.4deg);
}
.entry__content blockquote p:last-child { margin-bottom: 0; }
.entry__content table { width: 100%; margin: 1.4rem 0; border-collapse: collapse; border: 2px solid var(--ink); font-size: .96rem; }
.entry__content th, .entry__content td { padding: .55rem .7rem; border: 1px solid var(--ink); text-align: left; vertical-align: top; }
.entry__content th { background: var(--page); font-weight: 700; }
.entry__content img { display: block; height: auto; }
.entry__content figure { margin: 1.6rem 0; }
.entry__content figcaption { font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.entry__content pre { overflow-x: auto; padding: 1rem 1.2rem; background: var(--board); color: var(--chalk); border-radius: 4px; font-size: .92rem; }
.entry__content code { font-size: .92em; background: rgba(195, 214, 228, .45); padding: .05em .3em; border-radius: 3px; }
.entry__content pre code { background: none; padding: 0; }
.entry__content hr { border: 0; height: 8px; margin: 2rem 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 Q6 0 12 4 T24 4' fill='none' stroke='%231F5C99' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x center / 24px 8px; }
.entry__pages { margin-top: 1.4rem; font-weight: 500; }
.entry__tags { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin-top: 1.8rem; padding-top: 1rem; border-top: 1px dashed var(--grid); font-size: .92rem; }
.sibling-posts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
    margin: 2.2rem 0;
}
.sibling-posts__link {
    display: block;
    padding: 1rem 1.2rem;
    background: var(--paper);
    border-left: 5px solid var(--marker);
    box-shadow: 0 3px 8px rgba(35, 48, 58, .12);
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.3;
}
.sibling-posts__link span { display: block; margin-bottom: .3rem; font-size: .84rem; font-weight: 400; color: var(--muted); }
.sibling-posts__link--next { grid-column: 2; text-align: right; border-left: 0; border-right: 5px solid var(--sky-note); }
.sibling-posts__link:hover { color: var(--blue); transform: translateY(-2px); }

/* Сайдбар */
.sidebar {
    position: relative;
    min-width: 0;
    margin-top: .4rem;
    padding: 2rem 1.5rem 1.5rem;
    background: #F3F7FA;
    border: 1px solid var(--grid);
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(35, 48, 58, .1);
    color: var(--ink);
}
.sidebar::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    width: 90px;
    height: 24px;
    margin-left: -45px;
    background: rgba(242, 194, 48, .75);
    transform: rotate(-3deg);
}
.sidebar .widget { margin-bottom: 1.8rem; color: var(--ink); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    margin: 0 0 .9rem;
    font-family: var(--hand);
    font-size: 1.85rem;
    color: #141B21;
    text-decoration: underline wavy var(--blue);
    text-decoration-thickness: 1.5px;
    text-underline-offset: .25em;
}
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar li { padding: .55rem 0 .55rem 1.3rem; border-bottom: 1px dashed var(--grid); position: relative; line-height: 1.3; }
.sidebar li::before { content: ""; position: absolute; left: 0; top: .95rem; width: 8px; height: 8px; border-radius: 50%; background: var(--pen); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); text-decoration: none; }
.sidebar a:hover { color: var(--blue); text-decoration: underline wavy var(--pen); }
.sidebar .post-date { display: block; font-size: .82rem; color: var(--muted); }

/* Пагинация */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    margin: 3rem 0 0;
}
.pager .page-numbers {
    display: inline-block;
    min-width: 2.7rem;
    padding: .45rem .8rem;
    border: 2px solid var(--blue);
    border-radius: 3px 5px 2px 4px;
    background: var(--paper);
    color: var(--blue);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 2px 2px 0 rgba(35, 48, 58, .15);
    transition: transform .15s ease, background-color .15s ease;
}
.pager a.page-numbers:hover { background: var(--marker); transform: translateY(-2px) rotate(-1deg); }
.pager .page-numbers.current { background: var(--blue); color: #fff; }
.pager .page-numbers.dots { border: 0; background: none; box-shadow: none; min-width: 0; padding: .45rem .2rem; color: var(--muted); }

/* Поиск */
.search-form { margin: 1.4rem 0; }
.search-form__label { display: block; margin-bottom: .4rem; font-family: var(--hand); font-size: 1.4rem; color: var(--blue); }
.search-form__row { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.search-form__field {
    flex: 1 1 220px;
    min-width: 0;
    padding: .65rem .9rem;
    border: 2px solid var(--ink);
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
    font: 1rem var(--text);
}
.search-form__btn { flex: 0 0 auto; }

/* 404 */
.lost { text-align: left; }
.lost__code { margin: 0; font-family: var(--hand); font-size: clamp(4.5rem, 12vw, 7.5rem); line-height: .9; color: var(--pen); transform: rotate(-4deg); display: inline-block; }
.lost__home { margin: 1.6rem 0 0; }

/* Комментарии */
.talk { margin-top: 2.4rem; }
.talk__title { margin-top: 0; font-family: var(--hand); font-size: 2rem; }
.talk__list, .talk__list .children { list-style: none; margin: 0; padding: 0; }
.talk__list .children { padding-left: 1.6rem; border-left: 2px dashed var(--grid); }
.note__body { padding: 1rem 0; border-bottom: 1px dashed var(--grid); }
.note__head { display: flex; align-items: center; gap: .8rem; }
.note__head img { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: block; overflow: hidden; font-size: 0; background: var(--grid); }
.note__author { display: block; font-weight: 700; }
.note__date { font-size: .82rem; color: var(--muted); }
.note__wait { font-size: .9rem; color: var(--pen); margin: .5rem 0 0; }
.note__text { margin-top: .6rem; }
.note__reply a { font-size: .9rem; }
.talk__closed { color: var(--muted); }
.comment-respond { margin-top: 1.6rem; }
.comment-reply-title { font-family: var(--hand); font-size: 1.9rem; margin: 0 0 .6rem; }
.comment-reply-title small { font-family: var(--text); font-size: .9rem; margin-left: .6rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-weight: 500; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    border: 2px solid var(--ink);
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
    font: 1rem var(--text);
}
.comment-form-cookies-consent { display: flex; gap: .6rem; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; font-size: .92rem; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--muted); }
.required { color: var(--pen); }
.form-submit { margin-top: 1.4rem; }

/* ---------- Подвал-доска ---------- */
.board-bottom {
    position: relative;
    color: var(--chalk);
    background-color: var(--board-deep);
    background-image:
        radial-gradient(ellipse 35% 55% at 20% 30%, rgba(244, 241, 230, .05), transparent 70%),
        radial-gradient(ellipse 30% 50% at 80% 70%, rgba(244, 241, 230, .05), transparent 70%);
    border-top: 11px solid var(--wood);
    border-bottom: 11px solid var(--wood);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, .35);
}
.footboard { padding: 3rem 0 1.6rem; }
.footboard__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem 3rem;
}
.footboard__col { min-width: 0; }
.board-bottom .widget { margin-bottom: 1.4rem; color: rgba(244, 241, 230, .88); font-size: .98rem; line-height: 1.5; }
.board-bottom .widget-title {
    margin: 0 0 .9rem;
    font-family: var(--text);
    font-size: 1.65rem;
    font-weight: 500;
    color: var(--chalk);
    text-decoration: underline wavy var(--marker);
    text-decoration-thickness: 1.5px;
    text-underline-offset: .3em;
}
.board-bottom p { color: rgba(244, 241, 230, .88); }
.board-bottom a { color: var(--chalk); text-decoration-color: var(--pen); }
.board-bottom a:hover { color: var(--marker); }
.board-bottom ul { margin: 0; padding: 0; list-style: none; }
.board-bottom li { margin: 0 0 .55rem; }
.board-bottom .post-date { display: block; font-size: .82rem; color: rgba(244, 241, 230, .65); }
.footboard__copy { margin: 1.6rem 0 0; padding-top: 1.2rem; border-top: 1px dashed rgba(244, 241, 230, .25); text-align: center; font-size: .92rem; color: rgba(244, 241, 230, .8); }
.footboard__chalk {
    position: absolute;
    right: 9%;
    bottom: -9px;
    width: 46px;
    height: 9px;
    background: linear-gradient(#FFFFFF, #E8E4D8);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

/* ---------- Cookie-баннер ---------- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: min(92%, 720px);
    padding: 1rem 1.4rem 1rem 1.5rem;
    background: var(--marker);
    color: var(--ink);
    box-shadow: 3px 6px 16px rgba(35, 48, 58, .3);
    transform: translateX(-50%) rotate(-.5deg);
}
.cookie-banner__text { margin: 0; font-size: .95rem; line-height: 1.35; }
.cookie-banner__btn { flex: 0 0 auto; background: var(--paper); }
.cookie-banner__btn:hover { background: #fff; }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
    .anatomy__hint { display: none; }
}
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .masthead__row { flex-wrap: wrap; }
    .topnav { display: none; flex-basis: 100%; }
    .topnav.is-open { display: block; }
    .topnav__list { flex-direction: column; gap: 0; padding: .4rem 0 0; border-top: 1px dashed rgba(244, 241, 230, .35); }
    .topnav__list a { display: block; padding: .6rem 0; }
    .brand__desc { font-size: .74rem; max-width: 52ch; }
    .front__duo { grid-template-columns: minmax(0, 1fr); gap: 3.4rem; }
    .front__duo--top .timetable { margin-top: 0; }
    .anatomy__hint { display: block; }
    .cards--front { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards--front > .card:nth-child(3) { grid-column: 1 / -1; width: calc(50% - 1.1rem); justify-self: center; }
    .layout-with-sidebar { display: block; }
    .sidebar { margin-top: 3rem; }
    .footboard__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .shell { width: 92%; }
    .board-top { padding: 0 8px; }
    .masthead { border-width: 0 6px 6px; }
    .masthead__row { padding: 1.1rem 0 1.2rem; gap: .9rem; }
    .brand { gap: .7rem; }
    .brand__svg { width: 60px; }
    .brand__sub { font-size: .92rem; }
    .front { padding-top: 2rem; }
    .timetable__sheet { padding: 2rem 1rem 2.6rem; transform: rotate(-1deg); }
    .timetable__marker { width: 92px; right: -10px; bottom: -34px; }
    .tape--corner { right: -8px; }
    .anatomy__sheet { padding: 2.4rem 1.2rem 1.6rem; transform: none; }
    .anatomy__map { aspect-ratio: auto; }
    .anatomy__arrows { display: none; }
    .anatomy__book { position: static; width: 62%; margin: 0 auto 1.2rem; }
    .anatomy__part { position: static; width: auto; padding: .55rem 0; border-bottom: 1px dashed var(--grid); }
    .anatomy__part:last-child { border-bottom: 0; }
    .cards--front { grid-template-columns: minmax(0, 1fr); }
    .cards--front > .card:nth-child(3) { width: auto; justify-self: stretch; }
    .card, .cards > .card:nth-child(3n+2), .cards > .card:nth-child(3n) { transform: rotate(-.8deg); }
    .habits__board { grid-template-columns: 28px minmax(0, 1fr); }
    .habits__track { grid-column: 1 / -1; max-width: 190px; justify-self: center; width: 100%; }
    .habits__track figcaption { text-align: center; }
    .habits__ruler { background-size: 3px 100%, 22px 100%, 11px 100%; }
    .memo { min-height: 7.4rem; padding: .8rem .6rem 1rem; }
    .memo strong { font-size: .95rem; }
    .glossary__board { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bell" "i1" "i2" "i3" "i4"; padding: 2.4rem 1.4rem 2.4rem; border-width: 8px; }
    .glossary__bell { width: 140px; }
    .glossary__arrow { display: none; }
    .glossary__item { font-size: 1.18rem; }
    .glossary__sticky { width: 80px; height: 76px; font-size: 1rem; right: 8px; }
    .sheet { padding: 2.2rem 1.2rem 1.8rem 2.4rem; background-image: linear-gradient(90deg, transparent 1.3rem, rgba(228, 87, 46, .45) 1.3rem, rgba(228, 87, 46, .45) calc(1.3rem + 2px), transparent calc(1.3rem + 2px)); }
    .sibling-posts { grid-template-columns: minmax(0, 1fr); }
    .sibling-posts__link--next { grid-column: auto; }
    .footboard__cols { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; gap: .8rem; padding: 1rem 1.2rem; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
