@font-face {
    font-family: Manrope;
    src: url("../fonts/Manrope-Variable.ttf") format("truetype");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #FCF8F5;
    --purple: #6C4FC3;
    --purple-dark: #553DA8;
    --ink: #26223A;
    --muted: #6D6780;
    --line: #E7E1D8;
    --apricot: #F39866;
    --card: #FFFFFF;
    --ok: #1F7A4D;
    --danger: #9B2C2C;
    --shadow: 0 18px 50px rgba(58, 42, 92, 0.08);
    --radius: 28px;
    --content: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Manrope, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); }
button, input, select, textarea { font: inherit; color: inherit; }
.skip {
    position: absolute;
    left: 12px;
    top: -40px;
    background: #fff;
    padding: 8px 12px;
}
.skip:focus { top: 12px; }
.wrap { width: min(var(--content), calc(100% - 40px)); margin: 0 auto; }
.site-header { padding: 18px 0 8px; }
.header-row { display: flex; align-items: center; gap: 28px; }
.brand {
    display: flex;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
    min-width: 0;
    flex-shrink: 0;
}
.brand-logo {
    display: block;
    width: min(280px, 52vw);
    height: auto;
}
.nav { display: flex; gap: 26px; margin-left: 24px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--purple); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.omc-label { font-weight: 800; letter-spacing: 0.04em; }
.omc-link, .cabinet-link { color: var(--ink); text-decoration: none; font-weight: 700; }
.omc-link.is-pending { color: var(--muted); font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); gap: 36px; align-items: start; padding: 18px 0 10px; }
.kicker { color: var(--purple); font-weight: 700; margin: 8px 0 12px; }
h1 { font-size: clamp(42px, 5vw, 68px); line-height: 0.98; letter-spacing: -0.045em; margin: 0 0 16px; font-weight: 800; }
.lead { font-size: 22px; line-height: 1.35; margin: 0 0 14px; max-width: 34rem; }
.text-link { font-weight: 700; text-underline-offset: 3px; }
.hero-art { margin-top: 18px; border-radius: 18px; }

.apply-card {
    background: var(--card);
    border: 1px solid #EFEAE3;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 28px 22px;
}
.apply-card h2 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
.card-note { color: var(--muted); margin: 6px 0 18px; }
.wizard-steps { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0 0 22px; }
.wizard-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 700; flex: 1; position: relative; }
.wizard-steps li span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #D9D3EA; display: grid; place-items: center; font-size: 0; background: #fff; }
.wizard-steps li.is-current { color: var(--ink); }
.wizard-steps li.is-current span { background: var(--purple); border-color: var(--purple); }
.wizard-steps li::before { content: ""; position: absolute; top: 8px; left: -40%; right: 60%; height: 2px; background: #E4DEF2; }
.wizard-steps li:first-child::before { display: none; }
label { display: block; font-weight: 800; margin: 14px 0 8px; }
input, select, textarea {
    width: 100%;
    border: 1px solid #E4DDD4;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    outline: 3px solid rgba(108, 79, 195, 0.35);
    outline-offset: 2px;
}
.button, button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 18px;
    border: 0;
    border-radius: 14px;
    background: var(--purple);
    color: white;
    font-weight: 800;
    padding: 16px 18px;
    cursor: pointer;
}
.button:hover { background: var(--purple-dark); }
.button.secondary { background: transparent; color: var(--purple); border: 1px solid #D9D0F0; width: auto; }
.fine { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.how { padding: 28px 0 48px; }
.how h2 { font-size: 32px; letter-spacing: -0.04em; margin-bottom: 8px; }
.how-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 0; margin: 0; }
.how-list h3 { margin: 8px 0; font-size: 20px; }
.how-list p { margin: 0; color: #3c3750; }
.step-no { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #EFEAFE; color: var(--purple); font-weight: 800; }
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 32px; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row p { margin: 0; }

.page { padding: 12px 0 56px; }
.page h1 { font-size: clamp(36px, 4vw, 56px); }
.prose { max-width: 760px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.alert { border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.alert-error { background: #FDECEC; color: var(--danger); }
.alert-ok { background: #E8F6EE; color: var(--ok); }
.field-error { color: var(--danger); font-size: 14px; margin: 4px 0 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.filters input { max-width: 360px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.auth-card { max-width: 460px; }
.muted { color: var(--muted); }
.badge { display: inline-block; border-radius: 999px; background: #EFEAFE; color: var(--purple); padding: 2px 8px; font-size: 13px; font-weight: 700; }
.save-state { min-height: 1.2em; color: var(--muted); font-size: 14px; }

@media (max-width: 1024px) {
    .hero { grid-template-columns: 1fr; }
    .nav { margin-left: 0; }
    .how-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .wrap { width: min(var(--content), calc(100% - 28px)); }
    .nav-toggle { display: inline-flex; }
    .nav { display: none; flex-direction: column; position: absolute; left: 14px; right: 14px; top: 72px; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); z-index: 5; }
    .nav.is-open { display: flex; }
    .header-row { flex-wrap: wrap; }
    .header-tools { width: 100%; justify-content: space-between; }
    .brand-logo { width: min(220px, 70vw); }
    h1 { font-size: 40px; }
    .lead { font-size: 18px; }
}
@media (max-width: 390px) {
    .apply-card { padding: 18px 16px; }
    .wizard-steps { gap: 8px; }
}

/* Кабинеты (участник, оргкомитет, эксперт, редакция, админ) */
.desk,
.admin { padding-bottom: 72px; }
.desk-hero,
.admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 28px;
    padding: 8px 0 4px;
}
.desk-kicker,
.admin-kicker {
    margin: 0 0 8px;
    color: var(--purple);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.02em;
}
.desk h1,
.admin h1 {
    font-size: clamp(34px, 4vw, 48px);
    margin-bottom: 10px;
}
.desk-lead,
.admin-lead {
    margin: 0;
    color: #3c3750;
    max-width: 40rem;
    font-size: 17px;
}
.desk-lead code,
.desk code,
.admin-lead code,
.admin code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92em;
    background: #F3EEE8;
    padding: 1px 6px;
    border-radius: 6px;
}
.desk-status,
.admin-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.status-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}
.status-chip.is-ok {
    background: #E8F6EE;
    border-color: #C7E6D3;
    color: var(--ok);
}
.status-chip.is-warn {
    background: #FFF4E8;
    border-color: #F0D7B8;
    color: #9A5B1F;
}
.status-chip.is-danger {
    background: #FDECEC;
    border-color: #F0C4C4;
    color: var(--danger);
}
.desk-shell,
.admin-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.desk-shell.is-single { grid-template-columns: 1fr; }
.desk-nav,
.admin-nav {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.desk-nav a,
.admin-nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 12px;
    border-radius: 12px;
}
.desk-nav a:hover,
.desk-nav a:focus-visible,
.desk-nav a.is-active,
.desk-nav a.is-current,
.admin-nav a:hover,
.admin-nav a:focus-visible,
.admin-nav a.is-current {
    background: #F4F0FF;
    color: var(--purple);
}
.desk-nav-back,
.admin-nav-back {
    margin-top: 8px;
    color: var(--muted) !important;
    font-weight: 600 !important;
}
.desk-nav-label {
    margin: 10px 4px 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.desk-main,
.admin-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}
.desk-panel,
.admin-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px 24px 20px;
    box-shadow: 0 10px 28px rgba(58, 42, 92, 0.04);
    scroll-margin-top: 20px;
}
.desk-panel-head,
.admin-panel-head {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F0EBE3;
}
.desk-panel-head h2,
.admin-panel-head h2 {
    margin: 0 0 6px;
    font-size: 26px;
    letter-spacing: -0.03em;
}
.desk-panel-head p,
.admin-panel-head p {
    margin: 0;
    color: var(--muted);
}
.desk-block,
.admin-block {
    background: #FBF9F6;
    border: 1px solid #F0EBE3;
    border-radius: 16px;
    padding: 16px 18px 14px;
    margin-bottom: 16px;
}
.desk-block:last-child,
.admin-block:last-child { margin-bottom: 0; }
.desk-block h3,
.admin-block h3 {
    margin: 0 0 12px;
    font-size: 17px;
}
.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
}
.field-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { margin: 0 0 10px; font-weight: 800; font-size: 14px; }
.field input,
.field select,
.field textarea {
    margin-top: 6px;
    font-weight: 500;
}
.field-span { grid-column: 1 / -1; }
.hint {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}
.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin: 8px 0 0;
}
.check input {
    width: auto;
    margin: 0;
}
.desk-actions,
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    align-items: center;
}
.desk .button,
.desk button.button,
.admin .button,
.admin button.button {
    width: auto;
    min-width: 160px;
    margin-top: 0;
}
.desk .button-compact,
.admin .button-compact {
    min-width: 0;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 12px;
}
.desk-table,
.admin-table {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.desk-table table,
.admin-table table { background: transparent; }
.desk-table th,
.admin-table th {
    font-size: 13px;
    color: var(--muted);
    font-weight: 800;
    background: #FBF9F6;
}
.desk-table td a {
    font-weight: 700;
    text-decoration: none;
}
.desk-table td a:hover { text-decoration: underline; }
.desk-list,
.admin-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.desk-list li,
.admin-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: #FBF9F6;
    border: 1px solid #F0EBE3;
    border-radius: 14px;
}
.desk-list li > div,
.admin-list li > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.desk-list a {
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
}
.desk-list a:hover { color: var(--purple); }
.desk-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}
.desk-stat {
    background: #FBF9F6;
    border: 1px solid #F0EBE3;
    border-radius: 16px;
    padding: 14px 16px;
}
.desk-stat strong {
    display: block;
    font-size: 28px;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 4px;
}
.desk-stat span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.desk-empty {
    margin: 0;
    padding: 22px 18px;
    border: 1px dashed #E4DDD4;
    border-radius: 16px;
    color: var(--muted);
    background: #FCFBF9;
}
.desk-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0 0 18px;
}
.desk-steps-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.desk-steps a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.desk-steps a span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #F4F0FF;
    color: var(--purple);
    font-weight: 800;
    flex-shrink: 0;
}
.desk-steps a.is-current {
    color: var(--ink);
    border-color: #D9D0F0;
    background: #F8F5FF;
    box-shadow: 0 8px 20px rgba(108, 79, 195, 0.08);
}
.desk-steps a.is-current span {
    background: var(--purple);
    color: #fff;
}
.contest-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.contest-meta .meta-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}
.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.criteria-card { margin-bottom: 0; }
.criteria-card h3 {
    font-size: 15px;
    line-height: 1.3;
    min-height: 2.6em;
}
.audit-list time {
    white-space: nowrap;
    font-size: 13px;
}
.scale-list {
    margin: 6px 0 14px;
    padding-left: 18px;
    color: var(--muted);
    font-size: 14px;
}
.desk-inline-forms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.role-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 10px;
}
.user-editor {
    border: 1px solid #F0EBE3;
    border-radius: 16px;
    background: #FBF9F6;
    margin-bottom: 10px;
    overflow: hidden;
}
.user-editor summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    flex-wrap: wrap;
}
.user-editor summary::-webkit-details-marker { display: none; }
.user-editor summary::after {
    content: "▾";
    color: var(--muted);
    font-weight: 700;
}
.user-editor[open] summary::after { content: "▴"; }
.user-editor-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.user-editor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.user-editor-body {
    padding: 0 16px 16px;
    border-top: 1px solid #F0EBE3;
    background: #fff;
}

@media (max-width: 1024px) {
    .desk-hero,
    .admin-hero { grid-template-columns: 1fr; }
    .desk-status,
    .admin-status { justify-content: flex-start; }
    .desk-shell,
    .admin-shell { grid-template-columns: 1fr; }
    .desk-nav,
    .admin-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .desk-nav a,
    .admin-nav a { padding: 8px 12px; }
    .desk-nav-label { width: 100%; margin-top: 4px; }
    .field-grid-3 { grid-template-columns: 1fr 1fr; }
    .contest-meta,
    .desk-stats { grid-template-columns: 1fr 1fr; }
    .desk-steps,
    .desk-steps-5 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .field-grid,
    .field-grid-3 { grid-template-columns: 1fr; }
    .desk-list li,
    .admin-list li { flex-direction: column; align-items: flex-start; }
    .desk .button,
    .desk button.button,
    .admin .button,
    .admin button.button { width: 100%; }
    .desk-stats { grid-template-columns: 1fr; }
    .desk-steps,
    .desk-steps-5 { grid-template-columns: 1fr; }
}

/* Справочник — публичная витрина */
.guide-home {
    margin: 0;
    padding: 0 0 64px;
}
.guide-stage {
    position: relative;
    min-height: min(78vh, 720px);
    display: grid;
    align-items: end;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
}
.guide-stage-media,
.guide-stage-veil {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.guide-stage-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
    transform: scale(1.04);
    animation: guide-stage-pan 28s ease-in-out alternate infinite;
}
.guide-stage-veil {
    background:
        linear-gradient(180deg, rgba(28, 20, 48, 0.28) 0%, rgba(28, 20, 48, 0.55) 42%, rgba(28, 20, 48, 0.88) 100%),
        radial-gradient(120% 80% at 12% 18%, rgba(108, 79, 195, 0.35), transparent 55%),
        radial-gradient(90% 70% at 88% 70%, rgba(243, 152, 102, 0.22), transparent 50%);
}
.guide-stage::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 72px;
    z-index: 1;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath fill='%23FCF8F5' d='M0 40c180 30 360-20 540-10s360 50 540 20 270-40 360-30v60H0z'/%3E%3C/svg%3E")
        bottom / 100% 100% no-repeat;
}
.guide-stage-copy {
    position: relative;
    z-index: 2;
    padding: 72px 0 88px;
    max-width: 46rem;
    animation: guide-rise 0.7s ease both;
}
.guide-stage-meta {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}
.guide-brand {
    margin: 0 0 16px;
    font-size: clamp(40px, 6.4vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.045em;
    font-weight: 800;
    color: #fff;
    text-wrap: balance;
}
.guide-lead {
    margin: 0 0 28px;
    font-size: clamp(18px, 2.1vw, 22px);
    line-height: 1.4;
    max-width: 34rem;
    color: rgba(255, 255, 255, 0.9);
}
.guide-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.guide-cta .button {
    width: auto;
    margin: 0;
    min-width: 12rem;
    box-shadow: 0 12px 30px rgba(20, 12, 40, 0.22);
}
.guide-cta .button.secondary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    backdrop-filter: blur(6px);
}
.guide-cta .button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}
.guide-body {
    padding-top: 12px;
}
.guide-block {
    margin: 48px 0;
    animation: guide-rise 0.65s ease both;
    animation-delay: 0.08s;
}
.guide-block-head {
    display: grid;
    gap: 6px;
    margin-bottom: 22px;
    max-width: 40rem;
}
.guide-block-head h2 {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 36px);
    letter-spacing: -0.035em;
}
.guide-block-head p {
    margin: 0;
    color: var(--muted);
}
.guide-featured {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
}
.guide-featured a {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
    min-height: 100%;
    padding: 28px 24px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
.guide-featured a:hover,
.guide-featured a:focus-visible {
    background: #F7F3FF;
}
.guide-featured-no {
    font-size: clamp(34px, 4vw, 48px);
    line-height: 0.9;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--purple);
}
.guide-featured-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.guide-featured-copy strong {
    font-size: 20px;
    letter-spacing: -0.025em;
    line-height: 1.2;
}
.guide-featured-copy span {
    color: var(--muted);
    font-size: 15px;
}
.guide-stories {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}
.guide-story {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 18px;
    padding: 22px 4px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    transition: background 0.18s ease, padding-left 0.18s ease;
}
.guide-story:hover,
.guide-story:focus-visible {
    background: rgba(108, 79, 195, 0.04);
    padding-left: 10px;
}
.guide-story-no {
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--purple);
    padding-top: 2px;
}
.guide-story-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.guide-story-main strong {
    font-size: 20px;
    letter-spacing: -0.025em;
}
.guide-story-meta {
    color: var(--muted);
    font-size: 15px;
}
.guide-story-summary {
    color: #3c3750;
    max-width: 46rem;
}
.guide-more { margin: 22px 0 0; }
.guide-about {
    padding: 28px 0 8px;
    border-top: 1px solid var(--line);
}
.guide-about-text {
    margin: 0;
    max-width: 40rem;
    font-size: 18px;
    color: #3c3750;
}
@keyframes guide-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes guide-stage-pan {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .guide-stage-media img,
    .guide-stage-copy,
    .guide-block {
        animation: none;
    }
    .guide-story:hover,
    .guide-story:focus-visible {
        padding-left: 4px;
    }
}

/* Справочник — каталог/карточки (внутренние списки) */
.guide-hero { margin-bottom: 36px; padding: 12px 0 8px; }
.guide-section { margin: 36px 0; }
.guide-section h2 { font-size: 28px; letter-spacing: -0.03em; margin: 0 0 8px; }
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 16px 0 20px;
}
.guide-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 18px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 10px 28px rgba(58, 42, 92, 0.04);
    transition: transform .18s ease, border-color .18s ease;
}
.guide-card:hover { border-color: #D9D0F0; transform: translateY(-2px); }
.guide-card.is-featured { border-color: #D9D0F0; background: linear-gradient(180deg, #F8F5FF 0%, #fff 48%); }
.guide-card-no { color: var(--purple); font-weight: 800; letter-spacing: 0.04em; }
.guide-card strong { font-size: 18px; letter-spacing: -0.02em; }
.guide-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 16px;
    margin-bottom: 22px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.guide-filters .desk-actions { grid-column: 1 / -1; }
.guide-pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}
.guide-pager a { font-weight: 700; text-decoration: none; }
.breadcrumbs { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.breadcrumbs a { color: var(--muted); font-weight: 700; }
.guide-deed-head { margin-bottom: 22px; }
.guide-summary { font-size: 20px; line-height: 1.4; max-width: 40rem; }
.guide-sections { display: flex; flex-direction: column; gap: 22px; max-width: 44rem; }
.guide-sections h2 { font-size: 22px; margin: 0 0 8px; }
.guide-read-bar { margin-bottom: 18px; }
.guide-spread {
    display: grid;
    gap: 16px;
}
.guide-spread.is-book {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: linear-gradient(90deg, #f7f4ef 0%, #fff 46%, #fff 54%, #f7f4ef 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(58, 42, 92, 0.08);
}
.guide-spread.is-book .guide-spread-page {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 520px;
    background: transparent;
}
.guide-spread.is-book .guide-spread-page + .guide-spread-page {
    border-left: 1px solid rgba(58, 42, 92, 0.12);
}
.guide-spread-page {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px 26px;
    min-height: 420px;
    box-shadow: 0 14px 40px rgba(58, 42, 92, 0.06);
}
.guide-spread-page.is-empty { opacity: 0.55; }
.guide-photo-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: start;
}
.guide-photo-row img,
.guide-photo-preview img {
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f3f1f7;
}
.guide-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}
.guide-photo-preview figure { margin: 0; max-width: 180px; }
.guide-photo-preview figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.checkbox-field input { width: auto; }
.save-state {
    min-height: 1.25em;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}
.guide-deed-qr {
    margin: 28px 0 8px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.guide-deed-qr img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
}
.mail-template-edit {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 18px;
    margin-top: 12px;
    align-items: start;
}
.mail-preview-frame-wrap {
    background: #E7E1D8;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
}
.mail-preview-frame-wrap .meta-label {
    display: block;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.mail-preview-frame {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
    border-radius: 12px;
    background: #FCF8F5;
}
@media (max-width: 980px) {
    .mail-template-edit { grid-template-columns: 1fr; }
    .mail-preview-frame { height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
    .guide-card { transition: none; }
    .guide-card:hover { transform: none; }
}
@media (max-width: 1024px) {
    .guide-featured { grid-template-columns: 1fr; }
    .guide-filters { grid-template-columns: 1fr 1fr; }
    .guide-spread.is-book { grid-template-columns: 1fr; }
    .guide-spread.is-book .guide-spread-page + .guide-spread-page { border-left: 0; border-top: 1px solid rgba(58, 42, 92, 0.12); }
}
@media (max-width: 760px) {
    .guide-stage { min-height: min(88vh, 640px); }
    .guide-stage-copy { padding: 56px 0 76px; }
    .guide-cta .button { width: 100%; min-width: 0; }
    .guide-story { grid-template-columns: 3.2rem 1fr; gap: 12px; }
    .guide-filters { grid-template-columns: 1fr; }
    .guide-spread.is-book .guide-spread-page { min-height: 0; }
    .guide-photo-row { grid-template-columns: 1fr; }
}
