/* Базовая тема и общие размеры интерфейса */
:root {
    --color-ink: #171512;
    --color-text: #253d6b;
    --color-muted: #6e7e9d;
    --color-line: #e3e5e8;
    --color-surface: #fffefb;
    --color-soft: #fff7d3;
    --color-yellow: #ffbd08;
    --color-yellow-deep: #f7a800;
    --color-orange: #f36d00;
    --color-navy: #263d6d;
    --shadow-soft: 0 18px 55px rgba(40, 31, 12, 0.08);
    --shadow-card: 0 10px 30px rgba(40, 31, 12, 0.06);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --container: 1320px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--color-ink);
    background:
        radial-gradient(circle at 18% 6%, rgba(255, 194, 17, 0.045), transparent 23rem),
        var(--color-surface);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Защищает мобильную сетку от горизонтального разъезда декоративных элементов. */
html,
body {
    overflow-x: hidden;
    overflow-x: clip;
}

body.is-modal-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

/* Компоненты часто переключаются через HTML-атрибут hidden. */
[hidden] {
    display: none !important;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    letter-spacing: -0.035em;
}

.container {
    width: min(calc(100% - 48px), var(--container));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    color: #fff;
    background: var(--color-ink);
    border-radius: 10px;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* Логотип и шапка */
.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    background: rgba(255, 254, 251, 0.88);
    border-bottom: 1px solid rgba(220, 220, 215, 0.82);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 78px;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    width: max-content;
}

.brand__visual {
    width: 225px;
    height: auto;
    overflow: hidden;
}

.brand__sun-rays {
    animation: brand-sun-spin 16s linear infinite;
    transform-box: fill-box;
    transform-origin: center;
    will-change: transform;
}

@keyframes brand-sun-spin {
    to {
        transform: rotate(360deg);
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 44px;
}

.site-nav__link {
    position: relative;
    padding: 27px 0 25px;
    font-size: 17px;
    font-weight: 540;
}

.site-nav__link::after {
    position: absolute;
    right: 50%;
    bottom: 17px;
    left: 50%;
    height: 2px;
    content: "";
    background: var(--color-yellow-deep);
    border-radius: 2px;
    transition: right 0.2s ease, left 0.2s ease;
}

.site-nav__link:hover::after,
.site-nav__link.is-active::after {
    right: 0;
    left: 0;
}

.site-header .button--login {
    justify-self: end;
}

.site-header__menu {
    display: none;
}

.icon-button {
    display: grid;
    place-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* Более точный селектор не даёт общему стилю кнопки раскрыть меню на десктопе. */
.site-header .site-header__menu {
    display: none;
}

/* Кнопки и текстовые ссылки */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    gap: 13px;
    font-weight: 750;
    line-height: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.button--large {
    min-height: 64px;
    padding-inline: 31px;
    font-size: 19px;
    border-radius: 15px;
}

.button--primary {
    color: #14110b;
    background: linear-gradient(135deg, #ffca16, #ffad00);
    border-color: #ffb400;
    box-shadow: 0 12px 25px rgba(245, 160, 0, 0.2);
}

.button--primary:hover {
    box-shadow: 0 16px 30px rgba(245, 160, 0, 0.28);
}

.button--dark {
    color: #fff;
    background: linear-gradient(145deg, #2a2926, #161513);
    box-shadow: 0 10px 24px rgba(26, 24, 20, 0.16);
}

.button--soft {
    background: var(--color-soft);
    border-color: #ffe07b;
}

.button--ghost {
    border-color: var(--color-line);
}

.button--wide {
    width: 100%;
}

.text-link {
    display: inline-flex;
    align-items: center;
    width: max-content;
    gap: 10px;
    font-weight: 720;
    border-bottom: 2px solid var(--color-yellow);
    transition: color 0.2s ease, gap 0.2s ease;
}

.text-link:hover {
    color: var(--color-orange);
    gap: 14px;
}

.text-link--large {
    font-size: 18px;
    font-weight: 500;
}

.eyebrow {
    margin-bottom: 17px;
    color: var(--color-navy);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* Первый экран */
.hero {
    padding: 34px 0 48px;
    overflow: hidden;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(440px, 0.9fr) minmax(570px, 1.1fr);
    align-items: center;
    min-height: 450px;
    gap: 35px;
}

.hero__content {
    position: relative;
    z-index: 3;
    padding: 30px 0 22px;
}

.hero__title {
    max-width: 650px;
    margin-bottom: 14px;
    font-size: clamp(56px, 5.2vw, 78px);
    line-height: 0.97;
    letter-spacing: -0.065em;
}

.hero__title span {
    color: var(--color-orange);
}

.hero__lead {
    margin-bottom: 26px;
    color: var(--color-text);
    font-size: 21px;
    line-height: 1.42;
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero__trust {
    display: flex;
    align-items: center;
    margin-top: 22px;
    gap: 10px;
    color: var(--color-muted);
    font-size: 14px;
}

.hero__trust-icon {
    color: #7d8ba7;
}

.hero-visual {
    position: relative;
    align-self: stretch;
    min-height: 465px;
    background:
        linear-gradient(135deg, rgba(255, 247, 202, 0.9), rgba(255, 228, 130, 0.74)),
        #fff3b8;
    border: 1px solid rgba(255, 199, 53, 0.25);
    border-radius: 64px 28px 54px 30px;
    isolation: isolate;
}

.hero-visual::after {
    position: absolute;
    z-index: -1;
    right: 4%;
    bottom: -19px;
    left: 4%;
    height: 65px;
    content: "";
    background: rgba(222, 147, 0, 0.15);
    filter: blur(34px);
    border-radius: 50%;
}

.hero-visual__sun {
    position: absolute;
    z-index: -1;
    top: -14px;
    right: 9%;
    width: 255px;
    height: 255px;
    background: linear-gradient(145deg, #ffd916, #ffae00);
    border-radius: 50%;
    box-shadow: 0 18px 50px rgba(246, 161, 0, 0.15);
}

.hero-visual__image {
    position: absolute;
    z-index: 2;
    right: -4.5%;
    bottom: -1px;
    width: 109%;
    height: auto;
    max-height: 505px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 18px 15px rgba(93, 54, 3, 0.08));
}

.hero-visual__leaf {
    position: absolute;
    z-index: 1;
    color: #f47a00;
    font-size: 58px;
    transform: rotate(35deg) scaleX(0.62);
}

.hero-visual__leaf--one {
    top: 85px;
    left: -18px;
}

.hero-visual__leaf--two {
    top: 115px;
    right: -13px;
    transform: rotate(-28deg) scaleX(0.62);
}

.hero-note {
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    padding: 11px 15px;
    background: rgba(255, 255, 255, 0.91);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(63, 43, 4, 0.13);
    backdrop-filter: blur(8px);
}

.hero-note--top {
    top: 34px;
    left: -21px;
    gap: 9px;
}

.hero-note--top span {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    color: #b87800;
    background: #fff2b2;
    border-radius: 10px;
}

.hero-note--bottom {
    right: -20px;
    bottom: 25px;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 18px;
}

.hero-note--bottom strong {
    color: var(--color-orange);
    font-size: 21px;
    line-height: 1.1;
}

.hero-note--bottom span {
    color: var(--color-muted);
    font-size: 12px;
}

/* Каталог инструментов */
.tools-section {
    padding: 12px 0 62px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 35px;
}

.section-heading h2 {
    margin-bottom: 0;
    font-size: clamp(34px, 3.4vw, 49px);
    line-height: 1.05;
}

.section-heading .eyebrow {
    margin-bottom: 10px;
}

.section-heading__lead {
    max-width: 660px;
    margin: 17px auto 0;
    color: var(--color-muted);
    font-size: 18px;
}

.section-heading--center {
    justify-content: center;
    text-align: center;
}

.search-box {
    display: flex;
    align-items: center;
    width: min(48%, 535px);
    min-height: 56px;
    padding: 0 17px;
    gap: 14px;
    color: var(--color-ink);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #d7dce4;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(32, 49, 83, 0.035);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--color-yellow);
    box-shadow: 0 0 0 4px rgba(255, 190, 9, 0.12);
}

.search-box input {
    width: 100%;
    color: var(--color-ink);
    background: transparent;
    border: 0;
    outline: 0;
}

.search-box input::placeholder {
    color: #8795b3;
}

.search-box__clear {
    display: none;
    padding: 5px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.search-box.has-value .search-box__clear {
    display: block;
}

.tools-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 26px;
}

.category-panel {
    padding-right: 18px;
    border-right: 1px solid var(--color-line);
}

.category-panel__label {
    margin: 0 0 12px 5px;
    color: var(--color-navy);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.category-panel__list {
    display: grid;
    gap: 5px;
}

.category-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: 0 14px;
    gap: 16px;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.category-button::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: -4px;
    width: 5px;
    content: "";
    background: transparent;
    border-radius: 4px;
}

.category-button:hover {
    background: #fff9df;
}

.category-button.is-active {
    background: linear-gradient(90deg, #fff1ac, #fff8d9);
}

.category-button.is-active::before {
    background: var(--color-yellow-deep);
}

.category-button--favorite {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--color-line);
    border-radius: 0;
}

.category-button__count {
    display: grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    margin-left: auto;
    padding: 0 7px;
    color: #8a6400;
    background: #fff0a0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
}

.tools-results__meta {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--color-muted);
    font-size: 14px;
}

.tools-results__meta p {
    margin: 0;
}

.tools-results__count {
    display: grid;
    place-items: center;
    min-width: 29px;
    height: 29px;
    background: var(--color-soft);
    border-radius: 50%;
    font-weight: 750;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tools-grid--wide {
    gap: 18px;
}

.tool-card {
    position: relative;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    min-height: 170px;
    padding: 20px 18px;
    gap: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #dce0e7;
    border-radius: 12px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tool-card:hover {
    z-index: 2;
    border-color: #f2c045;
    box-shadow: var(--shadow-card);
    transform: translateY(-4px);
}

.tool-card--accent {
    background: linear-gradient(120deg, #fff7bf, #fffef5 75%);
    border: 1.5px solid #f0ad00;
}

.tool-card__icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    background: linear-gradient(145deg, #fff5b7, #ffe488);
    border-radius: 14px;
}

.tool-card__content {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
    padding: 8px 19px 0 0;
}

.tool-card__title {
    margin-bottom: 4px;
    font-size: 19px;
    line-height: 1.2;
}

.tool-card__description {
    margin-bottom: 14px;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.35;
}

.tool-card .text-link {
    margin-top: auto;
    font-size: 14px;
}

.tool-card__favorite {
    position: absolute;
    z-index: 3;
    top: 13px;
    right: 12px;
    padding: 5px;
    color: var(--color-navy);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.tool-card__favorite:hover {
    color: var(--color-yellow-deep);
    transform: scale(1.12);
}

.tool-card__favorite.is-favorite {
    color: var(--color-yellow-deep);
}

.tool-card__favorite.is-favorite svg {
    fill: currentColor;
}

.empty-state {
    padding: 60px 24px;
    text-align: center;
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    color: #98720d;
    background: var(--color-soft);
    border-radius: 20px;
}

.empty-state h2,
.empty-state h3 {
    margin-bottom: 7px;
}

.empty-state p {
    max-width: 510px;
    margin: 0 auto 23px;
    color: var(--color-muted);
}

.empty-state--large {
    padding: 100px 24px 130px;
}

/* Шаги и призыв к действию */
.steps-section {
    padding: 72px 0;
    background: linear-gradient(180deg, #fffdf7, #fff8dc);
    border-top: 1px solid #eee9d9;
}

.steps-grid,
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 40px;
    gap: 20px;
}

.step-card,
.value-card {
    position: relative;
    padding: 30px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(225, 218, 197, 0.8);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 28px rgba(89, 67, 7, 0.04);
}

.step-card__number {
    position: absolute;
    top: 24px;
    right: 25px;
    color: #e2dcbf;
    font-size: 29px;
    font-weight: 850;
}

.step-card__icon,
.value-card__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 24px;
    background: #ffe994;
    border-radius: 14px;
}

.step-card h3,
.value-card h3 {
    margin-bottom: 8px;
    font-size: 22px;
}

.step-card p,
.value-card p {
    margin-bottom: 0;
    color: var(--color-muted);
}

.cta-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 58px;
    padding: 39px 46px;
    gap: 30px;
    overflow: hidden;
    background: linear-gradient(125deg, #ffcb21, #ffb300 70%);
    border-radius: var(--radius-lg);
}

.cta-banner::after {
    position: absolute;
    top: -80px;
    right: 24%;
    width: 210px;
    height: 210px;
    content: "";
    border: 45px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.cta-banner > * {
    position: relative;
    z-index: 1;
}

.cta-banner .eyebrow {
    margin-bottom: 7px;
    color: #765400;
}

.cta-banner h2 {
    margin: 0;
    font-size: clamp(28px, 3vw, 42px);
}

/* Внутренние страницы */
.inner-hero {
    padding: 75px 0 64px;
    text-align: center;
    background: linear-gradient(180deg, #fff9e0, rgba(255, 250, 228, 0));
}

.inner-hero__content > p:last-child {
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 19px;
}

.inner-hero h1,
.about-hero h1,
.tool-hero h1 {
    margin: 0;
    font-size: clamp(42px, 5vw, 66px);
    line-height: 1.02;
}

.inner-hero__icon {
    display: grid;
    place-items: center;
    width: 67px;
    height: 67px;
    margin: 0 auto 18px;
    color: #a26e00;
    background: #ffe79a;
    border-radius: 20px;
}

.inner-section {
    min-height: 440px;
    padding: 38px 0 90px;
}

.favorites-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 23px;
}

.favorites-head p {
    margin: 0;
    color: var(--color-muted);
}

.favorites-head strong {
    color: var(--color-ink);
    font-size: 22px;
}

.about-hero {
    padding: 76px 0 70px;
}

.about-hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 80px;
}

.about-hero__content > p:not(.eyebrow) {
    max-width: 690px;
    margin: 25px 0 30px;
    color: var(--color-text);
    font-size: 20px;
}

.about-hero__card {
    position: relative;
    min-height: 390px;
    padding: 60px;
    overflow: hidden;
    background: linear-gradient(145deg, #fff4ba, #ffc727);
    border-radius: 42px 19px 42px 19px;
}

.about-hero__sun {
    position: absolute;
    top: -70px;
    right: -35px;
    width: 245px;
    height: 245px;
    background: rgba(255, 140, 0, 0.38);
    border-radius: 50%;
}

.about-hero__quote {
    position: relative;
    z-index: 1;
    max-width: 480px;
    font-size: 35px;
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.045em;
}

.about-hero__mini {
    position: absolute;
    right: 28px;
    bottom: 28px;
    display: flex;
    align-items: center;
    padding: 14px 18px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.84);
    border-radius: 15px;
    box-shadow: var(--shadow-card);
}

.values-section {
    padding: 80px 0;
    background: #fffaf0;
}

.about-cta {
    padding: 0 0 80px;
    background: #fffaf0;
}

/* Рабочая страница инструмента */
.notice {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 12px;
}

.notice--warning {
    background: #fff2bd;
    border: 1px solid #f1d264;
}

.tool-hero {
    padding: 36px 0 34px;
    background: linear-gradient(180deg, #fffbeb, rgba(255, 251, 235, 0));
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 29px;
    gap: 8px;
    color: var(--color-muted);
    font-weight: 650;
}

.icon--back {
    transform: rotate(180deg);
}

.tool-hero__heading {
    display: grid;
    grid-template-columns: 85px minmax(0, 1fr) auto;
    align-items: center;
    gap: 23px;
}

.tool-hero__icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    background: linear-gradient(145deg, #fff2aa, #ffdc68);
    border-radius: 20px;
}

.tool-hero h1 {
    margin-bottom: 8px;
    font-size: clamp(38px, 4.1vw, 56px);
}

.tool-hero .eyebrow {
    margin-bottom: 6px;
}

.tool-hero__heading > div > p:last-child {
    margin: 0;
    color: var(--color-text);
    font-size: 18px;
}

.tool-hero__time {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 9px;
    color: var(--color-text);
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: 12px;
    white-space: nowrap;
}

.workspace-section {
    padding: 12px 0 90px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(340px, 0.76fr) minmax(460px, 1.24fr);
    gap: 22px;
}

.workspace__panel {
    min-height: 500px;
    padding: 28px;
    background: #fff;
    border: 1px solid #dfe2e7;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.workspace__settings {
    align-self: start;
}

.workspace__result {
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #fffefb, #fffbeb);
}

.workspace__panel-head {
    display: flex;
    align-items: center;
    margin-bottom: 27px;
    gap: 14px;
}

.workspace__panel-head .eyebrow {
    margin-bottom: 3px;
    font-size: 10px;
}

.workspace__panel-head h2 {
    margin: 0;
    font-size: 24px;
}

.workspace__step {
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    height: 43px;
    color: #825b00;
    background: #ffe998;
    border-radius: 13px;
    font-weight: 850;
}

.form {
    display: grid;
    gap: 18px;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
}

.field {
    display: grid;
    gap: 7px;
}

.field__label {
    font-size: 14px;
    font-weight: 730;
}

.field__input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    color: var(--color-ink);
    background: #fff;
    border: 1px solid #d9dde4;
    border-radius: 10px;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field__input:focus {
    border-color: var(--color-yellow-deep);
    box-shadow: 0 0 0 4px rgba(255, 188, 4, 0.12);
}

/* Общий выпадающий список: нативный select остаётся источником значения формы. */
select.field__input {
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23263d6d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    cursor: pointer;
    appearance: none;
}

select.field__input::-ms-expand {
    display: none;
}

.select-control {
    position: relative;
    width: 100%;
}

select.field__input.select-control__native {
    position: absolute;
    width: 1px;
    min-height: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.select-control__button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 50px;
    padding: 0 44px 0 14px;
    overflow: hidden;
    color: var(--color-ink);
    text-align: left;
    background: #fff;
    border: 1px solid #d9dde4;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.select-control__button:hover {
    background: #fffdf7;
    border-color: #c7ceda;
}

.select-control__button:focus-visible,
.select-control.is-open .select-control__button {
    border-color: var(--color-yellow-deep);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(255, 188, 4, 0.14);
}

.select-control__button:disabled {
    color: #8c97aa;
    background: #f3f5f8;
    cursor: not-allowed;
}

.select-control__value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-control__chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    color: var(--color-navy);
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.select-control.is-open .select-control__chevron {
    transform: translateY(-50%) rotate(180deg);
}

.select-control__menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 280px;
    padding: 6px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d7dce5;
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(31, 49, 84, 0.18);
}

.select-control.is-upward .select-control__menu {
    top: auto;
    bottom: calc(100% + 8px);
}

.select-control__option {
    position: relative;
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 9px 38px 9px 12px;
    color: #273a60;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.select-control__option:hover,
.select-control__option:focus-visible {
    background: #fff5c7;
    outline: 0;
}

.select-control__option.is-selected {
    color: #192f5a;
    background: #fff8db;
    font-weight: 750;
}

.select-control__option.is-selected::after {
    position: absolute;
    top: 50%;
    right: 13px;
    width: 7px;
    height: 12px;
    content: "";
    border-right: 2px solid #b67b00;
    border-bottom: 2px solid #b67b00;
    transform: translateY(-62%) rotate(45deg);
}

.select-control__option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.field__textarea {
    min-height: 130px;
    padding-block: 13px;
    resize: vertical;
}

.field__hint {
    color: var(--color-muted);
    font-size: 12px;
}

.form__message {
    min-height: 20px;
    margin: 0;
    color: #3b774f;
    text-align: center;
}

.result-placeholder {
    display: grid;
    place-items: center;
    flex: 1;
    align-content: center;
    min-height: 350px;
    padding: 45px;
    text-align: center;
    border: 1px dashed #d9d6c7;
    border-radius: 14px;
}

.result-placeholder__icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin-bottom: 18px;
    color: #927008;
    background: #fff0b4;
    border-radius: 22px;
}

.result-placeholder h3 {
    margin-bottom: 8px;
    font-size: 22px;
}

.result-placeholder p {
    max-width: 390px;
    margin: 0;
    color: var(--color-muted);
}

.result-content {
    flex: 1;
    min-height: 350px;
    padding: 26px;
    background: #fff;
    border: 1px solid #e6e3da;
    border-radius: 14px;
}

.result-content h2 {
    margin-bottom: 7px;
    font-size: 27px;
}

.result-content h3 {
    margin: 24px 0 10px;
    font-size: 18px;
}

.result-content p,
.result-content li {
    color: #3a4760;
}

.result-content ol,
.result-content ul {
    padding-left: 22px;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    margin: 14px 0 22px;
    gap: 8px;
}

.result-meta span {
    padding: 6px 10px;
    color: #5d4c17;
    background: #fff3bc;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.lesson-step {
    display: grid;
    grid-template-columns: 58px 1fr;
    padding: 12px 0;
    gap: 13px;
    border-top: 1px solid #ece9df;
}

.lesson-step__time {
    color: var(--color-orange);
    font-size: 13px;
    font-weight: 800;
}

.lesson-step strong,
.lesson-step p {
    display: block;
    margin: 0;
}

.worksheet-item,
.test-item {
    margin-top: 13px;
    padding: 15px;
    background: #fffdf4;
    border: 1px solid #eee8d7;
    border-radius: 10px;
}

.worksheet-item p,
.test-item p {
    margin: 0;
}

.answer-lines {
    height: 35px;
    margin-top: 12px;
    background: repeating-linear-gradient(transparent 0 16px, #d8dbe0 17px 18px);
}

.flashcards-grid,
.groups-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.flashcard,
.group-card {
    padding: 17px;
    background: linear-gradient(145deg, #fff6ca, #fffdf2);
    border: 1px solid #f0d97e;
    border-radius: 12px;
}

.flashcard strong,
.group-card strong {
    display: block;
    margin-bottom: 5px;
}

.flashcard p,
.group-card p {
    margin: 0;
    font-size: 14px;
}

.class-timer {
    display: grid;
    place-items: center;
    min-height: 300px;
    text-align: center;
}

.class-timer__label {
    color: var(--color-muted);
    font-size: 18px;
}

.class-timer__display {
    margin: 10px 0 25px;
    font-size: clamp(72px, 10vw, 120px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
}

.class-timer__controls {
    display: flex;
    gap: 10px;
}

.workspace__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    gap: 10px;
}

/* Генератор расписаний */
.schedule-builder {
    display: grid;
    gap: 22px;
}

.schedule-builder__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 28px;
    gap: 30px;
    background: linear-gradient(135deg, #fff8d8, #fffdf5 58%, #f5f8ff);
    border: 1px solid #eedc99;
    border-radius: var(--radius-md);
}

.schedule-builder__intro h2 {
    margin-bottom: 7px;
    font-size: clamp(25px, 3vw, 34px);
}

.schedule-builder__intro p {
    margin-bottom: 0;
    color: var(--color-text);
}

.schedule-builder__intro .eyebrow {
    margin-bottom: 5px;
}

.schedule-source-note {
    display: flex;
    align-items: center;
    flex: 0 0 340px;
    padding: 15px 17px;
    gap: 13px;
    color: #36466a;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #e2e7f0;
    border-radius: 13px;
}

.schedule-source-note svg {
    flex: 0 0 auto;
    color: #14804a;
}

.schedule-source-note.is-saved {
    border-color: #a9d8bc;
    background: #f1fbf5;
}

.schedule-source-note.is-error {
    border-color: #e6b0a9;
    background: #fff3f1;
}

.schedule-source-note span,
.schedule-source-note strong {
    display: block;
}

.schedule-source-note span {
    font-size: 12px;
}

.schedule-source-note strong {
    margin-bottom: 2px;
    color: var(--color-ink);
    font-size: 14px;
}

.schedule-form {
    display: grid;
    grid-template-columns: minmax(300px, 0.75fr) minmax(510px, 1.25fr);
    gap: 22px;
}

.schedule-card {
    padding: 27px;
    background: #fff;
    border: 1px solid #dfe2e7;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.schedule-card--load {
    grid-row: span 2;
}

.schedule-card--rules {
    grid-column: 1 / -1;
}

.schedule-card__head {
    display: flex;
    align-items: center;
    min-height: 48px;
    margin-bottom: 22px;
    gap: 13px;
}

.schedule-card__head .eyebrow {
    margin-bottom: 2px;
    font-size: 10px;
}

.schedule-card__head h3 {
    margin: 0;
    font-size: 23px;
}

.schedule-card__badge {
    margin-left: auto;
    padding: 7px 10px;
    color: #5e4d1a;
    background: #fff2b8;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.schedule-basics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.schedule-field--wide {
    grid-column: 1 / -1;
}

.schedule-load-input {
    min-height: 250px;
    padding: 14px;
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre;
}

.schedule-load-setup {
    display: grid;
    margin-bottom: 20px;
    gap: 12px;
}

.schedule-setup-panel {
    padding: 15px;
    background: #fbfcfe;
    border: 1px solid #e0e5ed;
    border-radius: 13px;
}

.schedule-setup-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 13px;
    gap: 12px;
}

.schedule-setup-panel__head strong,
.schedule-setup-panel__head span {
    display: block;
}

.schedule-setup-panel__head strong {
    color: var(--color-ink);
    font-size: 14px;
}

.schedule-setup-panel__head > div > span {
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 11px;
    line-height: 1.4;
}

.schedule-setup-panel__count {
    flex: 0 0 auto;
    padding: 5px 8px;
    color: #5f501e;
    background: #fff0ad;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.subject-catalog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 226px;
    padding-right: 3px;
    overflow-y: auto;
    gap: 7px;
}

.subject-catalog__item {
    min-width: 0;
    min-height: 39px;
    padding: 8px 9px;
    background: #fff;
    border: 1px solid #e1e6ee;
    border-radius: 9px;
}

.subject-catalog__item:hover {
    border-color: #e7bd39;
}

.switch-control--compact {
    align-items: center;
    gap: 8px;
}

.switch-control--compact .switch-control__track {
    flex-basis: 34px;
    width: 34px;
    height: 19px;
    margin-top: 0;
}

.switch-control--compact .switch-control__thumb {
    width: 13px;
    height: 13px;
}

.switch-control--compact .switch-control__input:checked + .switch-control__track .switch-control__thumb {
    transform: translateX(15px);
}

.switch-control--compact .switch-control__content {
    min-width: 0;
}

.switch-control--compact .switch-control__content strong {
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.subject-catalog__loading,
.subject-catalog__empty,
.subject-picker__empty {
    margin: 0;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.45;
}

.subject-catalog__loading,
.subject-catalog__empty {
    grid-column: 1 / -1;
    padding: 8px 2px;
}

.custom-subject-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 11px;
    gap: 8px;
}

.custom-subject-form .field__input,
.custom-subject-form .button {
    min-height: 40px;
    font-size: 12px;
}

.custom-subject-form .button {
    padding-inline: 13px;
}

.custom-subjects {
    display: flex;
    flex-wrap: wrap;
    margin-top: 9px;
    gap: 6px;
}

.custom-subjects:empty {
    display: none;
}

.custom-subject {
    display: inline-flex;
    align-items: center;
    padding: 5px 5px 5px 9px;
    color: #31476f;
    background: #edf3fc;
    border: 1px solid #d8e3f2;
    border-radius: 999px;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
}

.custom-subject button {
    display: grid;
    width: 20px;
    height: 20px;
    padding: 0;
    color: #7c5a51;
    background: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    place-items: center;
}

.schedule-teachers-list {
    display: grid;
    gap: 8px;
}

.schedule-teacher-profile {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1.1fr) 34px;
    align-items: end;
    padding: 10px;
    background: #fff;
    border: 1px solid #e1e6ee;
    border-radius: 10px;
    gap: 8px;
}

.schedule-teacher-profile .field {
    min-width: 0;
    gap: 4px;
}

.schedule-teacher-profile .field__label {
    color: #687791;
    font-size: 10px;
    text-transform: uppercase;
}

.schedule-teacher-profile .field__input,
.schedule-teacher-profile .subject-picker__button {
    min-height: 40px;
    font-size: 12px;
}

.schedule-teacher-profile__remove {
    width: 34px;
    height: 40px;
    color: #a04c43;
    border-radius: 8px;
}

.schedule-setup-panel--teachers > .button {
    min-height: 39px;
    margin-top: 10px;
    padding-inline: 13px;
    font-size: 12px;
}

.schedule-roster-title {
    margin-bottom: 9px;
}

.schedule-roster-title strong,
.schedule-roster-title span {
    display: block;
}

.schedule-roster-title strong {
    font-size: 14px;
}

.schedule-roster-title span {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 11px;
}

.subject-picker {
    position: relative;
    min-width: 0;
}

.subject-picker__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 46px;
    padding: 8px 11px;
    color: var(--color-ink);
    background: #fff;
    border: 1px solid #d6dce6;
    border-radius: 9px;
    gap: 8px;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.subject-picker__button:hover,
.subject-picker.is-open .subject-picker__button {
    border-color: #e7b522;
}

.subject-picker__button:focus-visible {
    outline: 3px solid rgba(255, 188, 4, 0.2);
    outline-offset: 1px;
}

.subject-picker__button span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.subject-picker__button svg {
    flex: 0 0 auto;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.subject-picker.is-open .subject-picker__button svg {
    transform: rotate(-90deg);
}

.subject-picker__panel {
    position: absolute;
    z-index: 80;
    top: calc(100% + 6px);
    left: 0;
    display: grid;
    width: max(100%, 240px);
    max-height: 270px;
    padding: 7px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 11px;
    box-shadow: 0 14px 34px rgba(30, 45, 72, 0.18);
    gap: 5px;
}

.subject-picker__panel[hidden] {
    display: none;
}

.subject-picker__panel .subject-catalog__item {
    min-height: 36px;
}

.schedule-roster {
    overflow: visible;
    border: 1px solid #dfe4ec;
    border-radius: 12px;
}

.schedule-roster__head,
.schedule-load-row {
    display: grid;
    grid-template-columns: 0.62fr 1.08fr 1.28fr 72px 36px;
    align-items: center;
    gap: 7px;
}

.schedule-roster__head {
    padding: 9px 10px;
    color: #65738c;
    background: #f2f5fa;
    border-bottom: 1px solid #dfe4ec;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.schedule-roster__rows {
    display: grid;
}

.schedule-load-row {
    padding: 7px 9px;
    background: #fff;
    border-bottom: 1px solid #edf0f4;
}

.schedule-load-row:last-child {
    border-bottom: 0;
}

.schedule-load-row .field__input,
.schedule-load-row .select-control__button {
    min-height: 38px;
    padding-inline: 9px;
    font-size: 12px;
}

.schedule-load-row__remove {
    width: 34px;
    height: 34px;
    color: #a04c43;
    border-radius: 8px;
}

.schedule-load-row__remove:hover {
    background: #fff0ed;
}

.schedule-load-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 10px;
}

.schedule-load-actions .button {
    min-height: 40px;
    padding-inline: 14px;
    font-size: 12px;
}

.schedule-load-actions > span {
    color: var(--color-muted);
    font-size: 11px;
    text-align: right;
}

.schedule-paste {
    margin-top: 11px;
    padding: 0 12px 12px;
    background: #fbfcfe;
    border: 1px solid #e3e7ee;
    border-radius: 10px;
}

.schedule-paste summary {
    padding: 11px 0;
    color: #41577f;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.schedule-paste .button {
    min-height: 39px;
    margin-top: 9px;
    padding-inline: 14px;
    font-size: 12px;
}

.schedule-inline-message {
    min-height: 20px;
    margin-top: 8px;
    color: #37825a;
    font-size: 13px;
}

.schedule-inline-message.is-error {
    color: #b43f32;
}

.schedule-rule-toggles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
    gap: 10px;
}

/* Общий переключатель логических настроек. */
.switch-control {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
}

.switch-control__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.switch-control__track {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 24px;
    margin-top: 1px;
    background: #dce4ee;
    border: 1px solid #cad4e1;
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(31, 49, 84, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.switch-control__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(31, 49, 84, 0.24);
    transition: transform 0.2s ease;
}

.switch-control__input:checked + .switch-control__track {
    background: var(--color-yellow);
    border-color: var(--color-yellow-deep);
}

.switch-control__input:checked + .switch-control__track .switch-control__thumb {
    transform: translateX(20px);
}

.switch-control__input:focus-visible + .switch-control__track {
    box-shadow: 0 0 0 4px rgba(255, 188, 4, 0.2);
}

.switch-control__input:disabled ~ * {
    opacity: 0.55;
    cursor: not-allowed;
}

.switch-control__content strong,
.switch-control__content small {
    display: block;
}

.switch-control__content small {
    margin-top: 3px;
    color: var(--color-muted);
    line-height: 1.35;
}

.switch-control--card {
    min-height: 112px;
    padding: 16px;
    background: #fbfcfe;
    border: 1px solid #dfe4ed;
    border-radius: 13px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.switch-control--card:hover {
    border-color: #edc443;
    transform: translateY(-1px);
}

.switch-control--card:has(.switch-control__input:checked) {
    background: #fffaf0;
    border-color: #edc443;
}

.switch-control--card .switch-control__content strong {
    margin-bottom: 5px;
    font-size: 14px;
}

.switch-control--card .switch-control__content small {
    font-size: 11px;
}

.teacher-rules {
    background: #fbfcfe;
    border: 1px solid #e0e4eb;
    border-radius: 14px;
}

.teacher-rules + .teacher-rules {
    margin-top: 12px;
}

.teacher-rules summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    list-style: none;
    cursor: pointer;
}

.teacher-rules summary::-webkit-details-marker {
    display: none;
}

.teacher-rules summary span,
.teacher-rules summary strong,
.teacher-rules summary small {
    display: block;
}

.teacher-rules summary small {
    margin-top: 2px;
    color: var(--color-muted);
}

.teacher-rules summary svg {
    transition: transform 0.2s ease;
}

.teacher-rules[open] summary svg {
    transform: rotate(90deg);
}

.teacher-rules__help {
    padding: 12px 18px;
    color: #596983;
    background: #eef3fb;
    border-block: 1px solid #dfe5ef;
    font-size: 12px;
}

.teacher-rules__list {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.teacher-rule {
    display: grid;
    grid-template-columns: 1.35fr 1.05fr 0.8fr 0.62fr 0.45fr 0.75fr 0.72fr 34px;
    align-items: end;
    padding: 11px;
    gap: 8px;
    background: #fff;
    border: 1px solid #e2e6ed;
    border-radius: 11px;
}

.subject-rule {
    grid-template-columns: 0.55fr 1.3fr 1fr 0.8fr 0.62fr 0.72fr 34px;
}

.teacher-rule .field {
    min-width: 0;
    gap: 4px;
}

.teacher-rule .field__label {
    color: #6d7b94;
    font-size: 10px;
    text-transform: uppercase;
}

.teacher-rule .field__input {
    min-height: 40px;
    padding-inline: 9px;
    font-size: 12px;
}

.teacher-rule .subject-picker__button {
    min-height: 40px;
    padding-inline: 9px;
    font-size: 12px;
}

.teacher-rule .select-control__button {
    min-height: 40px;
    padding: 0 32px 0 9px;
    font-size: 12px;
}

.teacher-rule .select-control__chevron {
    right: 8px;
}

.teacher-rule .select-control__option {
    min-height: 36px;
    padding-block: 7px;
    font-size: 12px;
}

.teacher-rule__remove {
    width: 34px;
    height: 40px;
    color: #a04c43;
    border-radius: 8px;
}

.teacher-rule__remove:hover {
    color: #812f27;
    background: #fff0ed;
}

.schedule-add-rule {
    min-height: 41px;
    margin: 0 14px 14px;
    padding-inline: 15px;
    font-size: 13px;
}

.schedule-generate-bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 27px;
    gap: 24px;
    color: #fff;
    background: linear-gradient(135deg, #253d6d, #172747);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 40px rgba(28, 48, 88, 0.18);
}

.schedule-generate-bar strong,
.schedule-generate-bar span {
    display: block;
}

.schedule-generate-bar__actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.schedule-generate-bar__actions .button--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
}

.schedule-generate-bar strong {
    margin-bottom: 3px;
    font-size: 18px;
}

.schedule-generate-bar span {
    color: #c9d3e6;
    font-size: 13px;
}

.schedule-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(20, 17, 11, 0.25);
    border-top-color: #14110b;
    border-radius: 50%;
    animation: schedule-spin 0.7s linear infinite;
}

@keyframes schedule-spin {
    to {
        transform: rotate(360deg);
    }
}

.schedule-output {
    display: grid;
    padding-top: 38px;
    gap: 18px;
}

.schedule-output__toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.schedule-output__toolbar .eyebrow {
    margin-bottom: 5px;
}

.schedule-output__toolbar h2 {
    margin-bottom: 3px;
    font-size: clamp(30px, 4vw, 42px);
}

.schedule-output__toolbar p:last-child {
    margin: 0;
    color: var(--color-muted);
}

.schedule-output__actions {
    display: flex;
    gap: 9px;
}

.schedule-quality {
    display: grid;
    grid-template-columns: 205px 1fr;
    padding: 18px;
    gap: 14px;
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 16px;
}

.quality-score {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    padding: 15px;
    gap: 9px;
    color: #1e6a46;
    background: #eaf7ef;
    border-radius: 12px;
}

.quality-score--good {
    color: #765b08;
    background: #fff5c9;
}

.quality-score--attention {
    color: #9a4034;
    background: #fff0ed;
}

.quality-score > strong {
    font-size: 46px;
    line-height: 1;
    letter-spacing: -0.06em;
}

.quality-score span,
.quality-score small {
    display: block;
}

.quality-score span {
    font-size: 12px;
    font-weight: 700;
}

.quality-score small {
    margin-top: 3px;
    font-weight: 500;
}

.quality-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.quality-item {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 11px;
    gap: 9px;
    background: #fbfcfd;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
}

.quality-item > span {
    display: grid;
    place-items: center;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    color: #fff;
    background: #2f9a65;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 850;
}

.quality-item--warn > span {
    background: #e88745;
}

.quality-item strong,
.quality-item small {
    display: block;
}

.quality-item strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quality-item small {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 10px;
    line-height: 1.25;
}

.absence-panel {
    display: grid;
    grid-template-columns: minmax(270px, 1fr) 230px 180px auto;
    align-items: end;
    padding: 17px;
    gap: 12px;
    background: #f6f8fc;
    border: 1px solid #dfe5ef;
    border-radius: 14px;
}

.absence-panel__title {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 11px;
}

.absence-panel__title strong,
.absence-panel__title small {
    display: block;
}

.absence-panel__title small {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 11px;
}

.absence-panel__icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    color: #49638d;
    background: #fff;
    border-radius: 11px;
}

.absence-report {
    display: grid;
    grid-template-columns: 260px 1fr;
    padding: 18px;
    gap: 20px;
    background: #fff8df;
    border: 1px solid #ecd27b;
    border-radius: 14px;
}

.absence-report > div p {
    margin: 4px 0 0;
    color: #6d6041;
    font-size: 13px;
}

.absence-report ol {
    display: grid;
    margin: 0;
    padding: 0;
    gap: 6px;
    list-style: none;
}

.absence-change {
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: start;
    padding: 8px 10px;
    gap: 9px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 8px;
}

.absence-change > span {
    color: #665014;
    font-size: 12px;
    font-weight: 800;
}

.absence-change p {
    margin: 0;
    color: #4f5870;
    font-size: 12px;
}

.absence-change--unresolved {
    background: #fff0ed;
}

.schedule-view-switch {
    display: flex;
    align-items: center;
    padding: 5px;
    gap: 4px;
    background: #f0f3f8;
    border-radius: 11px;
}

.schedule-view-switch button {
    min-height: 39px;
    padding: 0 16px;
    font-weight: 730;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.schedule-view-switch button.is-active {
    background: #fff;
    box-shadow: 0 3px 12px rgba(30, 45, 74, 0.08);
}

.schedule-view-switch > span {
    margin-left: auto;
    padding-right: 10px;
    color: var(--color-muted);
    font-size: 12px;
}

.schedule-pages {
    display: grid;
    gap: 24px;
}

.schedule-page {
    width: 100%;
    min-width: 860px;
    padding: 28px;
    overflow: hidden;
    color: #1d2a44;
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(28, 44, 77, 0.08);
}

.schedule-page__header {
    display: grid;
    grid-template-columns: 1fr 1.45fr 1fr;
    align-items: center;
    padding: 0 2px 15px;
    border-bottom: 3px solid #f3bd13;
}

.schedule-page__brand {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.schedule-page__brand strong {
    max-width: 100%;
    line-height: 1.3;
}

.schedule-page__title {
    text-align: center;
}

.schedule-page__title small,
.schedule-page__year small {
    display: block;
    color: #73819b;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.schedule-page__title h3 {
    margin: 2px 0 0;
    font-size: 25px;
}

.schedule-page__title--simple h3 {
    margin: 0;
}

.schedule-page__title p {
    margin: 0;
    color: #73819b;
    font-size: 11px;
}

.schedule-page__year {
    text-align: right;
}

.schedule-page__year strong {
    display: block;
    margin-top: 3px;
    font-size: 15px;
}

.schedule-table {
    width: 100%;
    margin-top: 15px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    border: 1px solid #d9dfe9;
    border-radius: 11px;
}

.schedule-table th,
.schedule-table td {
    border-right: 1px solid #d9dfe9;
    border-bottom: 1px solid #d9dfe9;
}

.schedule-table tr > *:last-child {
    border-right: 0;
}

.schedule-table tbody tr:last-child > * {
    border-bottom: 0;
}

.schedule-table thead th {
    height: 42px;
    padding: 7px;
    color: #fff;
    background: #273e6c;
    font-size: 12px;
}

.schedule-table thead th:first-child {
    width: 56px;
}

.schedule-table tbody th {
    color: #273e6c;
    background: #fff2b8;
}

.schedule-table tbody th span,
.schedule-table tbody th small {
    display: block;
}

.schedule-table tbody th span {
    font-size: 17px;
}

.schedule-table tbody th small {
    font-size: 9px;
    font-weight: 600;
}

.schedule-lesson {
    height: 62px;
    padding: 6px 8px;
    vertical-align: middle;
    text-align: center;
    background: #fff;
    outline: 0;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.schedule-lesson[contenteditable]:hover,
.schedule-lesson[contenteditable]:focus {
    position: relative;
    z-index: 1;
    background: #fffdf3;
    box-shadow: inset 0 0 0 2px #f2bd14;
}

.schedule-lesson strong,
.schedule-lesson span {
    display: block;
}

.schedule-lesson strong {
    font-size: 12px;
    line-height: 1.22;
}

.schedule-lesson span {
    margin-top: 3px;
    overflow: hidden;
    color: #687895;
    font-size: 9px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-lesson.is-complex {
    background: #fffbdf;
}

.schedule-lesson.is-changed {
    background: #e8f6ed;
    box-shadow: inset 4px 0 #3ca36b;
}

.schedule-lesson.needs-replacement {
    background: #fff0ed;
    box-shadow: inset 4px 0 #d45a4d;
}

.schedule-lesson--empty {
    color: #bdc4d0;
    background: #fafbfc;
}

.schedule-page__footer {
    display: flex;
    justify-content: space-between;
    margin-top: 9px;
    gap: 15px;
    color: #7b879c;
    font-size: 9px;
}

.schedule-overview-page--compact {
    min-width: 1220px;
}

.schedule-overview-page--dense {
    min-width: 1620px;
}

.schedule-overview-table thead th:first-child {
    width: 105px;
}

.schedule-overview-table tbody th {
    padding: 7px 8px;
    text-align: left;
}

.schedule-overview-table tbody th span {
    font-size: 12px;
}

.schedule-overview-table tbody th small {
    margin-top: 2px;
    color: #7a7048;
}

.schedule-overview-cell {
    height: auto;
    padding: 5px;
    vertical-align: top;
    background: #fff;
    outline: 0;
}

.schedule-overview-cell--empty {
    color: #bdc4d0;
    background: #fafbfc;
    text-align: center;
    vertical-align: middle;
}

.schedule-overview-cell ol {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 1px;
}

.schedule-overview-item {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    min-height: 22px;
    overflow: hidden;
    background: #f8fafc;
    border-radius: 4px;
    cursor: help;
}

.schedule-overview-item > span {
    display: grid;
    min-height: 22px;
    color: #72809a;
    background: #eef2f7;
    font-size: 9px;
    font-weight: 750;
    place-items: center;
}

.schedule-overview-item > strong {
    min-width: 0;
    padding: 4px 5px;
    overflow: hidden;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.schedule-overview-item.is-complex {
    background: #fffbdf;
}

.schedule-overview-item.is-changed {
    background: #e8f6ed;
    box-shadow: inset 3px 0 #3ca36b;
}

.schedule-overview-item.needs-replacement {
    background: #fff0ed;
    box-shadow: inset 3px 0 #d45a4d;
}

.schedule-overview-item.is-empty {
    color: #a9b2c0;
}

.schedule-overview-page--compact .schedule-overview-item > strong {
    font-size: 9px;
}

.schedule-overview-page--dense .schedule-overview-item {
    grid-template-columns: 17px minmax(0, 1fr);
}

.schedule-overview-page--dense .schedule-overview-item > strong {
    padding-inline: 3px;
    font-size: 8px;
}

/* Модальное окно и уведомления */
.modal {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.25s, opacity 0.25s;
}

.modal.is-open {
    visibility: visible;
    opacity: 1;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(22, 20, 16, 0.58);
    border: 0;
    backdrop-filter: blur(5px);
}

.modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    padding: 35px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    transform: translateY(18px) scale(0.98);
    transition: transform 0.25s ease;
}

.modal__dialog--auth {
    width: min(100%, 620px);
    padding: 26px 32px 24px;
    overflow: visible;
}

.modal.is-open .modal__dialog {
    transform: translateY(0) scale(1);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    background: #f5f3ef;
    border-radius: 50%;
}

.modal__symbol {
    display: grid;
    place-items: center;
    width: 76px;
    height: 66px;
    margin-bottom: 20px;
    background: #fff7d9;
    border: 1px solid #ffe18a;
    border-radius: 16px;
}

.modal__symbol .brand-mark {
    width: 62px;
    height: auto;
}

.modal__dialog--auth .modal__symbol {
    width: 64px;
    height: 56px;
    margin-bottom: 14px;
}

.modal__dialog--auth .modal__symbol .brand-mark {
    width: 52px;
}

.modal .eyebrow {
    margin-bottom: 6px;
}

.modal h2 {
    margin-bottom: 8px;
    font-size: 31px;
}

.modal__dialog--auth h2 {
    margin-bottom: 6px;
    font-size: 29px;
}

.modal__lead {
    margin-bottom: 24px;
    color: var(--color-muted);
}

.modal__dialog--auth .modal__lead {
    margin-bottom: 16px;
    font-size: 15px;
}

/* Вход без пароля */
.auth-qr {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: center;
    padding: 10px;
    gap: 18px;
    background: #fffaf0;
    border: 1px solid #f2dfaa;
    border-radius: 17px;
}

.auth-qr__image-wrap {
    display: grid;
    place-items: center;
    width: 160px;
    min-height: 160px;
    padding: 6px;
    background: #fff;
    border: 1px solid #eee8da;
    border-radius: 12px;
}

.auth-qr__image {
    width: 100%;
    height: auto;
}

.auth-qr__loader {
    max-width: 145px;
    color: var(--color-muted);
    font-size: 13px;
    text-align: center;
}

.auth-qr__details {
    display: grid;
    justify-items: start;
    gap: 5px;
}

.auth-qr__details p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
}

.auth-qr__details strong {
    color: var(--color-navy);
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0.16em;
}

.auth-qr__details span {
    color: var(--color-muted);
    font-size: 12px;
}

.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--color-navy);
    background: transparent;
    border: 0;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
    gap: 7px;
    font-weight: 700;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 12px 0;
    color: var(--color-muted);
    gap: 11px;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background: var(--color-line);
}

.auth-actions,
.auth-account-actions {
    display: grid;
    gap: 10px;
}

.modal__dialog--auth .auth-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal__dialog--auth .button {
    min-height: 44px;
    padding-inline: 16px;
}

.auth-recovery-toggle {
    margin: 13px auto 0;
}

.auth-recovery-form {
    margin-top: 17px;
    padding-top: 17px;
    border-top: 1px solid var(--color-line);
}

.auth-privacy {
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 12px;
    text-align: center;
}

.modal__symbol--success {
    color: #28734a;
    background: #eaf8ef;
    border-color: #bee4cb;
}

.field__label small {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 500;
}

.auth-account-actions {
    margin-top: 18px;
}

.auth-account-actions .text-button {
    margin: 5px auto 0;
    color: var(--color-muted);
}

.form__message.is-error {
    color: #a43a32;
}

.form__message.is-success {
    color: #28734a;
}

/* Отдельные страницы подтверждения QR и email-ссылок */
.page-auth {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 189, 8, 0.18), transparent 28rem),
        linear-gradient(145deg, #fffdf6, #fff8df);
}

.auth-page {
    display: grid;
    place-items: center;
    align-content: center;
    width: min(calc(100% - 32px), 540px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 38px 0;
}

.auth-page__brand {
    justify-self: center;
    margin-bottom: 40px;
}

.auth-page__brand .brand__visual {
    width: 205px;
}

.auth-page__card {
    width: 100%;
    padding: 34px;
    background: #fff;
    border: 1px solid #ede7d8;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.auth-page__card h1 {
    margin-bottom: 9px;
    font-size: 34px;
}

.auth-page__lead {
    color: var(--color-muted);
}

.auth-page__note {
    max-width: 470px;
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: 12px;
    text-align: center;
}

.auth-confirmation {
    display: grid;
    justify-items: center;
    margin: 22px 0;
    padding: 20px;
    color: var(--color-navy);
    background: #fff7d7;
    border: 1px solid #f2d46c;
    border-radius: 15px;
}

.auth-confirmation span,
.auth-confirmation small {
    color: var(--color-muted);
}

.auth-confirmation strong {
    margin: 5px 0;
    font-size: 40px;
    line-height: 1;
    letter-spacing: 0.18em;
}

.auth-email-badge {
    margin: 20px 0;
    padding: 13px 15px;
    color: var(--color-navy);
    background: #f4f7fd;
    border: 1px solid #dce4f2;
    border-radius: 11px;
    text-align: center;
    font-weight: 750;
}

.js-recovery-result .button + .button {
    margin-top: 10px;
}

@media (max-width: 560px) {
    .auth-qr {
        grid-template-columns: 1fr;
    }

    .auth-qr__image-wrap {
        width: min(100%, 220px);
        min-height: 190px;
        justify-self: center;
    }

    .auth-qr__details {
        justify-items: center;
        text-align: center;
    }

    .auth-page__card {
        padding: 27px 21px;
    }
}

@media (max-width: 700px) {
    .modal__dialog--auth .auth-actions {
        grid-template-columns: 1fr;
    }
}

.toast {
    position: fixed;
    z-index: 400;
    right: 24px;
    bottom: 24px;
    max-width: 330px;
    padding: 13px 18px;
    color: #fff;
    background: #24221e;
    border-radius: 12px;
    box-shadow: 0 13px 35px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Ненавязчивое уведомление о технически необходимых cookie */
.cookie-notice {
    position: fixed;
    z-index: 280;
    right: 20px;
    bottom: 20px;
    left: 20px;
    width: min(calc(100% - 40px), 760px);
    margin: 0 auto;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cookie-notice__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px 15px 20px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #e7e0cf;
    border-radius: 17px;
    box-shadow: 0 16px 45px rgba(23, 21, 17, 0.18);
    backdrop-filter: blur(14px);
    gap: 22px;
}

.cookie-notice strong {
    color: var(--color-ink);
    font-size: 15px;
}

.cookie-notice p {
    margin: 3px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.4;
}

.cookie-notice__button {
    flex: 0 0 auto;
    min-height: 42px;
    padding-inline: 22px;
}

@media (max-width: 620px) {
    .cookie-notice {
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: calc(100% - 24px);
    }

    .cookie-notice__content {
        align-items: stretch;
        padding: 16px;
        flex-direction: column;
        gap: 13px;
    }

    .cookie-notice__button {
        width: 100%;
    }
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Футер */
.site-footer {
    border-top: 1px solid var(--color-line);
    background: var(--color-surface);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 112px;
    gap: 25px;
}

.site-footer .brand__visual {
    width: 195px;
}

.site-footer .brand__sun-rays {
    animation: none;
}

.site-footer p {
    margin: 0;
    color: var(--color-text);
}

.site-footer__copyright {
    justify-self: end;
    color: var(--color-muted) !important;
    font-size: 14px;
}

/* Появление блоков при прокрутке */
body.js-ready .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

body.js-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Планшеты */
@media (max-width: 1120px) {
    .site-nav {
        gap: 26px;
    }

    .hero__grid {
        grid-template-columns: minmax(390px, 0.92fr) minmax(470px, 1.08fr);
    }

    .hero-visual {
        min-height: 405px;
    }

    .hero__title {
        font-size: 58px;
    }

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

    .about-hero__grid {
        gap: 45px;
    }

    .schedule-form {
        grid-template-columns: 1fr;
    }

    .schedule-card--load,
    .schedule-card--rules {
        grid-column: auto;
        grid-row: auto;
    }

    .schedule-rule-toggles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-rule {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .subject-rule__subject,
    .subject-rule__condition {
        grid-column: span 2;
    }

    .teacher-rule__teacher,
    .teacher-rule__condition {
        grid-column: span 2;
    }

    .teacher-rule__remove {
        justify-self: end;
    }

    .schedule-teacher-profile {
        grid-template-columns: minmax(180px, 0.85fr) minmax(260px, 1.15fr) 34px;
    }

    .absence-panel {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .absence-panel__title {
        grid-column: 1 / -1;
    }

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

    .schedule-pages {
        overflow-x: auto;
        padding-bottom: 8px;
    }
}

@media (max-width: 900px) {
    .container {
        width: min(calc(100% - 36px), var(--container));
    }

    .site-header__inner {
        grid-template-columns: auto 1fr auto;
    }

    .site-header .site-header__menu {
        display: grid;
        justify-self: end;
        width: 44px;
        height: 44px;
        border: 1px solid var(--color-line);
        border-radius: 11px;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 18px;
        left: 18px;
        display: grid;
        padding: 10px;
        gap: 0;
        visibility: hidden;
        background: #fff;
        border: 1px solid var(--color-line);
        border-radius: 15px;
        box-shadow: var(--shadow-soft);
        opacity: 0;
        transform: translateY(-7px);
        transition: 0.2s ease;
    }

    .site-nav.is-open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .site-nav__link {
        padding: 13px 15px;
        border-radius: 9px;
    }

    .site-nav__link:hover,
    .site-nav__link.is-active {
        background: #fff7d8;
    }

    .site-nav__link::after {
        display: none;
    }

    .site-header .button--login {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        min-height: 44px;
        padding-inline: 19px;
    }

    .site-header__menu {
        grid-column: 3;
    }

    .hero {
        padding-top: 20px;
    }

    .hero__grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        min-width: 0;
        gap: 26px;
    }

    .hero__content {
        width: 100%;
        min-width: 0;
        max-width: 720px;
        padding-bottom: 0;
    }

    .hero__title {
        font-size: clamp(54px, 9vw, 72px);
    }

    .hero-visual {
        width: 100%;
        min-width: 0;
        min-height: 475px;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
        min-width: 0;
        gap: 19px;
    }

    .section-heading > div,
    .tools-results {
        width: 100%;
        min-width: 0;
    }

    .search-box {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .tools-layout {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        min-width: 0;
    }

    .category-panel {
        padding: 0 0 16px;
        border-right: 0;
        border-bottom: 1px solid var(--color-line);
    }

    .category-panel__list {
        display: flex;
        overflow-x: auto;
        padding: 4px 4px 8px;
        gap: 7px;
        scrollbar-width: thin;
    }

    .category-button {
        width: auto;
        min-width: max-content;
        min-height: 48px;
    }

    .category-button::before {
        top: auto;
        right: 10px;
        bottom: -3px;
        left: 10px;
        width: auto;
        height: 4px;
    }

    .category-button--favorite {
        display: none;
    }

    .tools-results__meta {
        display: flex;
    }

    .about-hero__grid {
        grid-template-columns: 1fr;
    }

    .about-hero__card {
        min-height: 320px;
    }

    .workspace {
        grid-template-columns: 1fr;
    }

    .tool-hero__heading {
        grid-template-columns: 80px 1fr;
    }

    .tool-hero__time {
        grid-column: 2;
        width: max-content;
    }

    .schedule-builder__intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .schedule-source-note {
        flex-basis: auto;
        width: 100%;
    }

    .schedule-quality {
        grid-template-columns: 1fr;
    }

    .quality-score {
        min-height: 88px;
    }

    .schedule-output__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Мобильные устройства */
@media (max-width: 640px) {
    .container {
        width: min(calc(100% - 28px), var(--container));
    }

    .site-header__inner {
        grid-template-columns: minmax(0, 1fr) 44px 44px;
        min-height: 68px;
        gap: 10px;
    }

    .brand__visual {
        width: min(163px, 43vw);
        max-width: 100%;
    }

    .site-header .button--login {
        min-width: 44px;
        width: 44px;
        padding: 0;
    }

    .site-header .button--login span {
        display: none;
    }

    .hero {
        padding: 22px 0 42px;
    }

    .hero__content {
        max-width: none;
        padding: 10px 0 0;
    }

    .hero__title {
        max-width: 100%;
        font-size: clamp(41px, 12.7vw, 54px);
        line-height: 0.98;
    }

    .hero__lead {
        max-width: 100%;
        font-size: 18px;
    }

    .desktop-only {
        display: none;
    }

    .hero__actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
    }

    .hero__actions .button {
        width: 100%;
    }

    .hero-visual {
        min-height: clamp(310px, 86vw, 370px);
        overflow: hidden;
        border-radius: 35px 18px 35px 18px;
    }

    .hero-visual__sun {
        width: 170px;
        height: 170px;
    }

    .hero-visual__image {
        right: auto;
        left: 50%;
        width: 118%;
        max-width: none;
        transform: translateX(-50%);
    }

    .hero-note--top {
        top: 16px;
        left: 12px;
    }

    .hero-note--bottom {
        right: 9px;
        bottom: 9px;
    }

    .hero-visual__leaf {
        display: none;
    }

    .section-heading h2 {
        max-width: 100%;
        font-size: clamp(32px, 9.5vw, 38px);
    }

    .category-panel {
        width: 100%;
        min-width: 0;
    }

    .category-panel__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        padding: 3px 3px 10px;
        overflow: visible;
        gap: 7px;
    }

    .category-button {
        width: 100%;
        min-width: 0;
        min-height: 50px;
        padding-inline: 11px;
        gap: 10px;
        font-size: 14px;
    }

    .category-button svg {
        flex: 0 0 auto;
    }

    .tools-section {
        padding-bottom: 45px;
    }

    .tools-grid,
    .steps-grid,
    .values-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        min-width: 0;
    }

    .tool-card {
        grid-template-columns: 72px minmax(0, 1fr);
        width: 100%;
        min-width: 0;
        min-height: 154px;
    }

    .steps-section,
    .values-section {
        padding: 58px 0;
    }

    .cta-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 30px 24px;
    }

    .cta-banner .button {
        width: 100%;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        padding: 28px 0;
        gap: 15px;
        text-align: center;
    }

    .site-footer .brand,
    .site-footer__copyright {
        justify-self: center;
    }

    .inner-hero,
    .about-hero {
        padding: 55px 0 45px;
    }

    .inner-hero h1,
    .about-hero h1 {
        font-size: 42px;
    }

    .favorites-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .about-hero__card {
        min-height: 300px;
        padding: 35px 27px;
    }

    .about-hero__quote {
        font-size: 28px;
    }

    .tool-hero__heading {
        grid-template-columns: 1fr;
    }

    .tool-hero__time {
        grid-column: 1;
    }

    .workspace__panel {
        min-height: auto;
        padding: 20px;
    }

    .workspace__panel-head {
        align-items: flex-start;
    }

    .form__row,
    .flashcards-grid,
    .groups-grid {
        grid-template-columns: 1fr;
    }

    .result-content {
        padding: 19px;
    }

    .workspace__actions {
        flex-direction: column;
    }

    .schedule-builder__intro,
    .schedule-card,
    .schedule-generate-bar {
        padding: 20px;
    }

    .schedule-basics-grid,
    .schedule-rule-toggles,
    .quality-list,
    .absence-panel,
    .absence-report {
        grid-template-columns: 1fr;
    }

    .subject-catalog,
    .custom-subject-form,
    .schedule-teacher-profile {
        grid-template-columns: 1fr;
    }

    .schedule-setup-panel__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .schedule-teacher-profile__remove {
        justify-self: end;
    }

    .subject-picker__panel {
        right: 0;
        width: 100%;
        min-width: 0;
    }

    .schedule-field--wide,
    .absence-panel__title {
        grid-column: auto;
    }

    .teacher-rule {
        grid-template-columns: 1fr 1fr;
    }

    .teacher-rule__teacher,
    .teacher-rule__condition {
        grid-column: 1 / -1;
    }

    .teacher-rule__remove {
        grid-column: 2;
    }

    .schedule-generate-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .schedule-generate-bar .button,
    .schedule-generate-bar__actions,
    .schedule-output__actions,
    .schedule-output__actions .button {
        width: 100%;
    }

    .schedule-generate-bar__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .schedule-roster__head {
        display: none;
    }

    .schedule-load-row {
        grid-template-columns: 0.55fr 1.1fr 58px 34px;
    }

    .schedule-load-row label:nth-child(3) {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .schedule-load-row label:nth-child(4) {
        grid-column: 3;
        grid-row: 1;
    }

    .schedule-load-row__remove {
        grid-column: 4;
        grid-row: 1;
    }

    .schedule-load-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .schedule-load-actions > span {
        text-align: left;
    }

    .schedule-output__actions {
        flex-direction: column;
    }

    .schedule-view-switch {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .schedule-view-switch button {
        flex: 1;
    }

    .schedule-view-switch > span {
        width: 100%;
        margin: 4px 5px 3px;
        padding: 0;
    }

    .modal__dialog {
        padding: 30px 22px 23px;
    }
}

/* Отдельные правила для печати готового материала */
@media print {
    @page {
        size: A4 landscape;
        margin: 9mm;
    }

    .site-header,
    .site-footer,
    .skip-link,
    .cookie-notice,
    .tool-hero,
    .workspace__settings,
    .workspace__panel-head,
    .workspace__actions,
    .modal,
    .toast,
    .schedule-builder__intro,
    .schedule-form,
    .schedule-output__toolbar,
    .schedule-quality,
    .absence-panel,
    .absence-report,
    .schedule-view-switch {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .workspace,
    .workspace__result {
        display: block;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .result-content {
        display: block !important;
        padding: 0;
        border: 0;
    }

    .workspace-section,
    .schedule-output {
        padding: 0;
    }

    .workspace-section .container {
        width: 100%;
        max-width: none;
    }

    .schedule-pages {
        display: block;
    }

    .schedule-page {
        width: 100%;
        min-width: 0;
        min-height: 185mm;
        padding: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        break-after: page;
        page-break-after: always;
    }

    .schedule-page:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .schedule-page__header {
        padding-bottom: 3mm;
    }

    .schedule-table {
        margin-top: 3mm;
    }

    .schedule-table thead th {
        height: 8mm;
    }

    .schedule-overview-page {
        min-height: 0;
    }

    .schedule-overview-page .schedule-page__header {
        padding-bottom: 2mm;
    }

    .schedule-overview-table {
        margin-top: 2mm;
    }

    .schedule-overview-table thead th {
        height: 6mm;
        padding: 1mm;
        font-size: 7pt;
    }

    .schedule-overview-table thead th:first-child {
        width: 19mm;
    }

    .schedule-overview-table tbody th {
        padding: 1mm;
    }

    .schedule-overview-table tbody th span {
        font-size: 6.5pt;
    }

    .schedule-overview-table tbody th small {
        display: none;
    }

    .schedule-overview-cell {
        height: auto;
        padding: 0.7mm;
    }

    .schedule-overview-item {
        grid-template-columns: 4mm minmax(0, 1fr);
        min-height: 3.6mm;
        border-radius: 0;
    }

    .schedule-overview-item > span {
        min-height: 3.6mm;
        font-size: 5.5pt;
    }

    .schedule-overview-item > strong,
    .schedule-overview-page--compact .schedule-overview-item > strong,
    .schedule-overview-page--dense .schedule-overview-item > strong {
        padding: 0.6mm;
        font-size: 6pt;
        line-height: 1.05;
    }

    .schedule-overview-page--dense .schedule-overview-item {
        grid-template-columns: 3.2mm minmax(0, 1fr);
    }

    .schedule-overview-page--dense .schedule-overview-item > strong {
        padding-inline: 0.35mm;
        font-size: 5pt;
    }

    .schedule-lesson {
        height: 18mm;
    }

    .schedule-page__footer {
        margin-top: 2mm;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
