:root,
[data-theme="dark"] {
    --bg: #222222;
    --fg: #ffffff;
    --muted: rgba(255, 255, 255, 0.52);
    --line: rgba(255, 255, 255, 0.16);
    --bar: #2c2c2c;
    --bar-stroke: rgba(255, 255, 255, 0.14);
    --gold: #d9b24a;
    --glass: rgb(255 255 255 / 0.09);
    --glass-shine: rgb(255 255 255 / 0.22);
}

[data-theme="light"] {
    --bg: #e8e8e8;
    --fg: #222222;
    --muted: rgba(34, 34, 34, 0.52);
    --line: rgba(34, 34, 34, 0.14);
    --bar: #dedede;
    --bar-stroke: rgba(34, 34, 34, 0.16);
    --gold: #c49a2a;
    --glass: rgb(255 255 255 / 0.38);
    --glass-shine: rgb(255 255 255 / 0.55);
}

* { box-sizing: border-box; }

html {
    background: var(--bg);
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--fg);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-weight: 500;
    line-height: 1.45;
    overflow-x: hidden;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

.flip {
    position: fixed;
    top: 50%;
    z-index: 20;
    width: 2.6rem;
    height: 2.6rem;
    margin-top: -1.3rem;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    color: var(--fg);
}

.flip::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    margin: 0 auto;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
}

.flip-prev { left: 0.9rem; }
.flip-prev::before { transform: rotate(45deg) translate(2px, 0); }
.flip-next { right: 0.9rem; }
.flip-next::before { transform: rotate(-135deg) translate(2px, 0); }

a { color: inherit; }

.skip {
    position: absolute;
    left: -999px;
    top: 0;
}

.skip:focus {
    left: 1rem;
    top: 1rem;
    z-index: 40;
    background: var(--bg);
    color: var(--fg);
    padding: 0.4rem 0.7rem;
}

.orb {
    display: block;
    border-radius: 50%;
    flex-shrink: 0;
    will-change: transform;
}

.orb-solid {
    background: var(--gold);
    border: 1px solid var(--gold);
}

.orb-empty {
    background: transparent;
    border: 1px solid var(--fg);
}

.preloader {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    background: var(--bg);
    clip-path: circle(150% at 50% 50%);
}

.preloader.is-gone {
    pointer-events: none;
}

.preloader-orb {
    width: 18px;
    height: 18px;
}

.chrome {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
}

.brand, .theme {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}

.brand .orb,
.theme .orb {
    width: 14px;
    height: 14px;
}

.theme-wipe {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    transition: clip-path 0.72s cubic-bezier(0.76, 0, 0.24, 1);
}

.atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.atmosphere-wash {
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(ellipse 52% 42% at 16% 18%, rgb(217 178 74 / 0.14), transparent 58%),
        radial-gradient(ellipse 48% 40% at 86% 14%, rgb(176 98 72 / 0.12), transparent 56%),
        radial-gradient(ellipse 58% 48% at 78% 82%, rgb(78 122 128 / 0.11), transparent 60%),
        radial-gradient(ellipse 64% 52% at 22% 88%, rgb(255 255 255 / 0.05), transparent 62%),
        radial-gradient(ellipse 42% 36% at 48% 48%, rgb(140 78 92 / 0.08), transparent 68%);
    animation: wash-drift 16s ease-in-out infinite alternate;
}

[data-theme="light"] .atmosphere-wash {
    background:
        radial-gradient(ellipse 52% 42% at 16% 18%, rgb(196 154 42 / 0.12), transparent 58%),
        radial-gradient(ellipse 48% 40% at 86% 14%, rgb(176 98 72 / 0.1), transparent 56%),
        radial-gradient(ellipse 58% 48% at 78% 82%, rgb(78 122 128 / 0.09), transparent 60%),
        radial-gradient(ellipse 64% 52% at 22% 88%, rgb(255 255 255 / 0.28), transparent 62%),
        radial-gradient(ellipse 42% 36% at 48% 48%, rgb(140 78 92 / 0.07), transparent 68%);
}

.spot {
    position: absolute;
    width: 58vmin;
    height: 58vmin;
    border-radius: 50%;
    background: radial-gradient(circle, rgb(217 178 74 / 0.16), transparent 70%);
    will-change: transform;
}

[data-theme="light"] .spot {
    background: radial-gradient(circle, rgb(196 154 42 / 0.14), transparent 70%);
}

.spot.s1 {
    top: -8%;
    left: -6%;
    animation: spot-a 13s ease-in-out infinite alternate;
}

.spot.s2 {
    top: 8%;
    right: -10%;
    width: 48vmin;
    height: 48vmin;
    background: radial-gradient(circle, rgb(176 98 72 / 0.15), transparent 70%);
    animation: spot-b 18s ease-in-out infinite alternate;
}

[data-theme="light"] .spot.s2 {
    background: radial-gradient(circle, rgb(176 98 72 / 0.12), transparent 70%);
}

.spot.s3 {
    bottom: -12%;
    left: 18%;
    width: 72vmin;
    height: 72vmin;
    background: radial-gradient(circle, rgb(78 122 128 / 0.13), transparent 72%);
    animation: spot-c 22s ease-in-out infinite alternate;
}

[data-theme="light"] .spot.s3 {
    background: radial-gradient(circle, rgb(78 122 128 / 0.1), transparent 72%);
}

.spot.s4 {
    bottom: 12%;
    right: 8%;
    width: 40vmin;
    height: 40vmin;
    background: radial-gradient(circle, rgb(140 78 92 / 0.12), transparent 70%);
    animation: spot-d 11s ease-in-out infinite alternate;
}

[data-theme="light"] .spot.s4 {
    background: radial-gradient(circle, rgb(140 78 92 / 0.1), transparent 70%);
}

@keyframes wash-drift {
    from { transform: translate3d(-4%, -3%, 0) rotate(-4deg) scale(1.05); }
    to { transform: translate3d(5%, 4%, 0) rotate(5deg) scale(1.12); }
}

@keyframes spot-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(18vw, 14vh, 0) scale(1.25); }
}

@keyframes spot-b {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to { transform: translate3d(-16vw, 20vh, 0) scale(0.85); }
}

@keyframes spot-c {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(14vw, -18vh, 0) scale(1.2); }
}

@keyframes spot-d {
    from { transform: translate3d(0, 0, 0) scale(0.9); }
    to { transform: translate3d(-12vw, -10vh, 0) scale(1.3); }
}

main {
    position: relative;
    z-index: 1;
}

.deck-view {
    overflow: hidden;
    width: 100%;
}

.deck {
    display: flex;
    align-items: stretch;
}

.deck.is-moving {
    transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}

.slide {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.slide.is-short {
    overflow-y: hidden;
}

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 5.5rem 1.4rem 1.5rem;
}

.hero-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-emblem {
    width: min(320px, 58vw);
    height: auto;
    display: block;
}

[data-theme="dark"] .hero-emblem {
    filter: invert(1);
}

.hero-title {
    margin: 1.4rem 0 0;
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 7vw, 5.4rem);
    line-height: 0.88;
    letter-spacing: -0.03em;
    text-align: center;
    text-transform: uppercase;
    max-width: 12ch;
    color: transparent;
    background-image: linear-gradient(
        105deg,
        var(--fg) 0%,
        var(--fg) 28%,
        var(--gold) 48%,
        var(--fg) 68%,
        var(--fg) 100%
    );
    background-size: 180% 100%;
    background-position: 100% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: title-sweep 9s ease-in-out infinite;
}

@keyframes title-sweep {
    0%, 100% { background-position: 100% 50%; }
    50% { background-position: 0% 50%; }
}

.home-about {
    position: relative;
    z-index: 1;
    max-width: 74rem;
    margin: 2.4rem auto 0;
    padding: 0 1.4rem;
}

.home-info {
    position: relative;
    z-index: 1;
    max-width: 74rem;
    margin: 2.2rem auto 0;
    padding: 0 1.4rem 6rem;
}

.home-info__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr);
    gap: 1.6rem 2rem;
    align-items: start;
    border: 1px solid var(--line);
    background: var(--glass);
    padding: 1.5rem 1.6rem;
}

.home-info__title {
    margin: 0 0 0.7rem;
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-weight: 800;
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.home-info__dates {
    margin: 0 0 1rem;
    color: var(--gold);
    font-size: 1.05rem;
    font-weight: 600;
}

.home-info__text {
    max-width: none;
}

.home-info__text img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
}

.home-info__files-title {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.home-info__file-list {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.home-info__file-list a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.home-info__file-list a:hover,
.home-info__file-list a:focus-visible {
    border-bottom-color: var(--gold);
}

.home-info__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.home-info__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--gold);
    color: var(--gold);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    transition: background 160ms ease, color 160ms ease;
}

.home-info__cta:hover,
.home-info__cta:focus-visible {
    background: var(--gold);
    color: var(--bg);
}

.home-info__media {
    margin: 0;
}

.home-info__media img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
}

.home-info__media figcaption {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: var(--muted);
}

@media (max-width: 800px) {
    .home-info__inner {
        grid-template-columns: 1fr;
    }
}

.page {
    padding: 6.5rem 1.4rem 5.5rem;
    max-width: 42rem;
    margin: 0 auto;
    min-height: 100%;
    box-sizing: border-box;
}

.page-material {
    max-width: 46rem;
    padding-bottom: 4rem;
}

.page.season {
    max-width: 46rem;
}

.page.seasons {
    max-width: min(72rem, 98vw);
}

.slide article.page:has(.notices),
.page:has(.notices),
.slide article.page:has(.season-list),
.page:has(.season-list),
.slide article.page:has(.materials-groups),
.page:has(.materials-groups) {
    max-width: min(72rem, 98vw);
}

.slide article.page:has(.russia-map),
.page.page-russia {
    max-width: min(1280px, 98vw);
}

.page h1 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    margin: 0 0 1.4rem;
}

.page.season h1 {
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: 0.06em;
    text-transform: none;
}

.prose { font-size: 1.05rem; max-width: 38rem; color: var(--fg); }
.home-about.prose { max-width: 70rem; }
.prose a { border-bottom: 1px solid var(--fg); text-decoration: none; }
.prose a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.prose p { margin: 0 0 0.9rem; }
.prose h2 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 1.85rem 0 0.7rem;
}
.prose h3 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 1.35rem 0 0.55rem;
}
.prose ul,
.prose ol {
    margin: 0 0 1.1rem;
    padding: 0 0 0 1.15rem;
}
.prose li {
    margin: 0 0 0.55rem;
    line-height: 1.5;
}
.prose li::marker {
    color: var(--gold);
}

.prose-material {
    max-width: 44rem;
}
.prose-material > ul,
.prose-material > ol {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.prose-material > ul > li,
.prose-material > ol > li {
    margin: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    background: var(--glass);
    line-height: 1.45;
}
.prose-material ul ul,
.prose-material ol ol,
.prose-material ul ol,
.prose-material ol ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin: 0.55rem 0 0;
    display: block;
    gap: 0;
}
.prose-material ul ul > li,
.prose-material ol ol > li,
.prose-material ul ol > li,
.prose-material ol ul > li {
    padding: 0.2rem 0;
    border: 0;
    background: transparent;
}
.prose-material a {
    overflow-wrap: anywhere;
}
.prose-material > ul > li > a,
.prose-material > ol > li > a,
.prose-material li a:not([href^="#"]) {
    border-bottom-color: transparent;
    color: var(--gold);
    font-weight: 600;
}
.prose-material li a:hover {
    border-bottom-color: var(--gold);
}
.prose-material embed,
.prose-material img {
    max-width: 100%;
    height: auto;
    margin: 0.8rem 0 1.2rem;
    border: 1px solid var(--line);
}

.when, .back {
    font-size: 0.82rem;
    color: var(--muted);
}

.back a { text-decoration: none; border-bottom: 1px solid var(--line); }

.news-gallery {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.4rem;
    max-width: 38rem;
}

.news-media {
    margin: 0;
}

.news-media-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.news-media--video video {
    display: block;
    width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #000;
}

.news-media figcaption {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.notices {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.notices li {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.season-mark {
    display: inline-block;
    margin: 0 0 0.6rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
}

.iypt {
    margin: 0.55rem 0 0;
    max-width: 42rem;
}

.iypt span {
    display: block;
    margin-bottom: 0.2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--gold);
}

.iypt p { margin: 0; }

.iypt .prose {
    margin: 0.55rem 0 0;
}

.season-panel > .iypt {
    margin: 0 0 1.2rem;
}

.season-switch { margin-top: 1.6rem; }

.season-switch--nested {
    margin-top: 0;
}

.season-switch--nested > .season-tabs {
    margin-bottom: 1rem;
}

.problems-subhead {
    margin: 0 0 1rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
}

.season-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin: 0 0 1.3rem;
    padding: 0 0 0.15rem;
    border-bottom: 1px solid var(--line);
}

.season-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    margin: 0;
    padding: 0.7rem 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    line-height: 1;
    cursor: pointer;
}

.season-tab .radio {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    background: transparent;
    position: relative;
    flex-shrink: 0;
}

.season-tab .radio::after {
    content: "";
    position: absolute;
    inset: 2.5px;
    border-radius: 50%;
    background: currentColor;
    transform: scale(0);
}

.season-tab[aria-selected="true"] {
    color: var(--fg);
}

.season-tab[aria-selected="true"] .radio::after {
    transform: scale(1);
}

.season-tab:hover,
.season-tab:focus-visible {
    color: var(--fg);
}

.season-panel[hidden] { display: none; }

.season-panel > h2:first-child {
    margin-top: 0;
}

.season-list {
    list-style: none;
    margin: 1.2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.55rem;
    align-items: stretch;
}

.season-card {
    display: flex;
}

.season-card.is-current {
    grid-column: 1 / -1;
}

.season-card a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    flex: 1;
    min-height: 5.1rem;
    text-decoration: none;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    box-sizing: border-box;
}

.season-card.is-current a {
    border-color: var(--gold);
    min-height: 5.6rem;
}

.season-card strong {
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.season-card .season-city {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.2;
    min-height: 1.15em;
}

.season-card .season-city:empty::before {
    content: "\00a0";
}

.page.season .season-panel > h2 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-size: 1.8rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin: 2rem 0 0.8rem;
}

.problems h2 {
    margin: 0 0 0.45rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.problem-scans {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin: 0 0 1.5rem;
}

.problem-scan {
    margin: 0;
}

.problem-scan__pages {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
    background: #1a1a1a;
    padding: 0.35rem;
}

.problem-scan--spread .problem-scan__pages {
    grid-template-columns: 1fr 1fr;
}

.problem-scan__pages img {
    display: block;
    width: 100%;
    height: auto;
    background: #f4f4f0;
}

.problem-scan figcaption {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 720px) {
    .problem-scan--spread .problem-scan__pages {
        grid-template-columns: 1fr;
    }
}

.problems {
    list-style: none;
    margin: 0;
    padding: 0;
}

.problems li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.problems h2 {
    margin: 0 0 0.45rem;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.problems p {
    margin: 0;
    max-width: 40rem;
}

.ranking {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.results-split {
    display: grid;
    grid-template-columns: minmax(12rem, 0.72fr) minmax(16rem, 1.15fr);
    gap: 1.6rem 2.4rem;
    align-items: start;
}

.results-split > * {
    min-width: 0;
    overflow-x: auto;
}

.results-split h2 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin: 0 0 0.7rem;
}

.results-split h3 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-size: 1.12rem;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin: 1.15rem 0 0.45rem;
}

.results-split h2 + h3 {
    margin-top: 0;
}

.results-split--three {
    grid-template-columns: minmax(12rem, 1.05fr) minmax(12rem, 1fr) minmax(10rem, 0.85fr);
}

@media (max-width: 1100px) {
    .results-split--three {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .results-split {
        grid-template-columns: 1fr;
    }
}

.ranking th,
.ranking td {
    text-align: left;
    padding: 0.5rem 0.6rem 0.5rem 0;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.ranking th:last-child,
.ranking td:last-child {
    white-space: nowrap;
}

.photos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.photos img { max-width: 100%; height: auto; }
.photos span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }

.photo-studio { margin-top: 0.2rem; }

.photo-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.4rem;
}

.photo-frame {
    margin: 0;
    min-height: 14rem;
    display: grid;
    place-items: center;
    background: rgb(0 0 0 / 0.18);
}

.photo-frame img {
    max-width: 100%;
    max-height: min(68vh, 32rem);
    height: auto;
    display: block;
}

.photo-frame figcaption {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

.photo-nav {
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    padding: 0;
    background: none;
    color: var(--fg);
    cursor: pointer;
}

.photo-nav::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    margin: 0 auto;
    border-left: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
}

.photo-prev::before { transform: rotate(45deg); }
.photo-next::before { transform: rotate(-135deg); }

.photo-count {
    margin: 0.55rem 0 1.1rem;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.85rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.photo-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.2rem, 1fr));
    gap: 0.4rem;
}

.photo-stage[hidden],
.photo-grid[hidden] {
    display: none !important;
}

.photo-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--line);
    background: none;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-thumb.is-on {
    border-color: var(--gold);
}

.photo-album {
    margin-top: 0.2rem;
}

.photo-album-extra { margin-top: 1.6rem; }

.photo-album-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 0.8rem 0 1rem;
}

.photo-album-btn {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0 0.95rem;
    border: 1px solid var(--line);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.78rem;
    text-decoration: none;
    cursor: pointer;
}

.photo-album-btn:hover,
.photo-album-btn:focus-visible,
.photo-album-btn.is-on {
    border-color: var(--gold);
}

.photo-embed-wrap {
    border: 1px solid var(--line);
    overflow: hidden;
    min-height: 28rem;
}

.photo-embed {
    display: block;
    width: 100%;
    height: min(70vh, 40rem);
    border: 0;
    background: var(--bg);
}

.photo-album-fallback {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.photo-album-fallback a + a {
    margin-left: 0.15rem;
}

.rail {
    position: fixed;
    left: 50%;
    bottom: 1.35rem;
    z-index: 20;
    width: max-content;
    max-width: calc(100vw - 1.8rem);
    transform: translateX(-50%);
}

.rail-glass {
    --gx: 50%;
    --gy: 0px;
    position: relative;
    background: color-mix(in srgb, var(--bar) 75%, transparent);
    backdrop-filter: blur(22px) saturate(1.7);
    -webkit-backdrop-filter: blur(22px) saturate(1.7);
    box-shadow:
        inset 0 1px 0 var(--glass-shine),
        inset 0 0 0 1px var(--bar-stroke);
    clip-path: polygon(24px 0, 100% 0, calc(100% - 24px) 100%, 0 100%);
}

.rail-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        circle 9rem at var(--gx) var(--gy),
        rgb(255 255 255 / 0.2),
        transparent 68%
    );
}

.rail-bar {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.82rem 3.1rem 0.82rem 2.9rem;
    scrollbar-width: thin;
    scrollbar-color: var(--muted) transparent;
    -webkit-overflow-scrolling: touch;
}

.rail-bar::-webkit-scrollbar {
    height: 5px;
}

.rail-bar::-webkit-scrollbar-track {
    background: transparent;
}

.rail-bar::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 999px;
}

.rail-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--bar-stroke);
    background: color-mix(in srgb, var(--bar) 75%, transparent);
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    backdrop-filter: blur(22px) saturate(1.7);
    -webkit-backdrop-filter: blur(22px) saturate(1.7);
    box-shadow: inset 0 1px 0 var(--glass-shine);
    transition: opacity 0.2s ease, color 0.2s ease;
}

.rail-prev { left: 0.55rem; }
.rail-next { right: 0.55rem; }

.rail-arrow:hover,
.rail-arrow:focus-visible { color: var(--fg); }

.rail-arrow.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.rail-arrow.is-hidden { display: none; }

.rail a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    color: var(--muted);
    line-height: 1;
    transform: none;
}

.rail .radio {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    background: transparent;
    position: relative;
    flex-shrink: 0;
}

.rail .radio::after {
    content: "";
    position: absolute;
    inset: 2.5px;
    border-radius: 50%;
    background: currentColor;
    transform: scale(0);
}

.rail a.is-now {
    color: var(--fg);
}

.rail a.is-now .radio::after {
    transform: scale(1);
}

.rail a:hover,
.rail a:focus-visible { color: var(--fg); }

@media (max-width: 800px) {
    .flip { display: none; }
    .notices li { grid-template-columns: 1fr; gap: 0.2rem; }
    .rail { bottom: 0.85rem; width: calc(100vw - 1.2rem); }
    .rail-bar {
        gap: 0.95rem;
        padding: 0.64rem 2.4rem 0.64rem 2.2rem;
    }
    .rail a { font-size: 0.86rem; }
    .rail-arrow {
        width: 1.6rem;
        height: 1.6rem;
    }
    .rail-prev { left: 0.4rem; }
    .rail-next { right: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .preloader { display: none; }
    .deck.is-moving { transition: none; }
    .atmosphere-wash,
    .spot,
    .hero-title { animation: none; }
    .hero-title {
        color: var(--fg);
        background: none;
        -webkit-text-fill-color: var(--fg);
    }
    * { scroll-behavior: auto !important; }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none !important; }
}

/* —— Турниры в России: карта —— */
.page-russia {
    max-width: min(1280px, 98vw);
}

.slide article.page:has(.russia-map) {
    max-width: min(1280px, 98vw);
}

.russia-map {
    margin-top: 0.4rem;
}

.russia-intro {
    max-width: 42rem;
    margin-bottom: 1.2rem;
}

.russia-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 1.15fr);
    gap: 1.4rem 1.6rem;
    align-items: stretch;
    height: min(70vh, 40rem);
}

.russia-map-stage {
    min-width: 0;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.russia-svg-wrap {
    width: 100%;
    flex: 1;
    min-height: 0;
    border: 1px solid var(--line);
    background:
        radial-gradient(ellipse 70% 55% at 40% 45%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 70%),
        var(--bar);
    padding: 0;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    height: auto;
}

.russia-svg-wrap.is-panning {
    cursor: grabbing;
}

.russia-svg-inner {
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
}

.russia-svg-wrap svg {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
}

.russia-svg-wrap .russia-region {
    fill: color-mix(in srgb, var(--fg) 14%, var(--bg));
    stroke: color-mix(in srgb, var(--fg) 28%, transparent);
    stroke-width: 0.6;
    vector-effect: non-scaling-stroke;
    cursor: pointer;
    transition: fill 160ms ease, stroke 160ms ease, filter 160ms ease;
    outline: none;
}

.russia-svg-wrap .russia-region:focus,
.russia-svg-wrap .russia-region:focus-visible {
    outline: none;
}

.russia-svg-wrap .russia-region.has-tournament {
    fill: color-mix(in srgb, var(--gold) 42%, var(--bg));
    stroke: color-mix(in srgb, var(--gold) 70%, var(--fg));
}

.russia-svg-wrap .russia-region:hover,
.russia-svg-wrap .russia-region.is-hover {
    fill: color-mix(in srgb, var(--gold) 58%, var(--fg));
    stroke: var(--gold);
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--gold) 45%, transparent));
}

.russia-svg-wrap .russia-region.is-active {
    fill: color-mix(in srgb, var(--gold) 72%, var(--fg));
    stroke: var(--gold);
    stroke-width: 1.1;
}

.russia-hint {
    margin: 0.55rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.russia-zoom-bar {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 2;
}

.russia-zoom-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bar) 88%, transparent);
    color: var(--fg);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.russia-zoom-btn:hover,
.russia-zoom-btn:focus-visible {
    border-color: var(--gold);
    color: var(--gold);
}

.russia-panel {
    border: 1px solid var(--line);
    background: var(--bar);
    padding: 1.25rem 1.35rem 1.5rem;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.russia-panel-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.russia-tour-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
}

.russia-tour-switch-btn {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--glass);
    color: var(--fg);
    font: inherit;
    font-size: 0.82rem;
    line-height: 1.2;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
}

.russia-tour-switch-btn:hover,
.russia-tour-switch-btn:focus-visible {
    border-color: var(--gold);
}

.russia-tour-switch-btn.is-on {
    border-color: var(--gold);
    color: var(--gold);
}

.russia-panel-title {
    margin: 0 0 0.45rem;
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.05;
    text-transform: uppercase;
}

.russia-panel-lead,
.russia-panel-meta {
    margin: 0 0 0.9rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.russia-block {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
}

.russia-block h3 {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.russia-block.is-hidden,
.russia-panel-body.is-hidden,
.russia-panel-empty.is-hidden {
    display: none;
}

.russia-pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
}

.russia-problems {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.9rem;
}

.russia-problems.is-hidden,
.russia-problems-pending.is-hidden {
    display: none;
}

.russia-problems-pending {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.russia-problems li {
    margin-bottom: 0.45rem;
}

.russia-problems .st {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    margin-top: 0.15rem;
}

.russia-matrix {
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
}

.russia-matrix-title {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0 0 0.45rem;
}

.russia-matrix-lead,
.russia-matrix-empty {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 42rem;
}

.russia-matrix-scroll {
    overflow: auto;
    max-width: 100%;
    border: 1px solid var(--line);
    background: rgb(0 0 0 / 0.18);
}

.russia-matrix-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 0.78rem;
}

.russia-matrix-table th,
.russia-matrix-table td {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding: 0.45rem 0.5rem;
    text-align: center;
    vertical-align: middle;
}

.russia-matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg);
    font-weight: 600;
    white-space: nowrap;
}

.russia-matrix-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: left;
    min-width: 12rem;
    max-width: 18rem;
    background: var(--bg);
    font-weight: 500;
}

.russia-matrix-corner {
    left: 0;
    z-index: 3 !important;
    text-align: left !important;
}

.russia-matrix-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    margin: 0;
    padding: 0.15rem 0.1rem;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    max-width: 7.5rem;
    white-space: normal;
    line-height: 1.2;
}

.russia-matrix-col.is-national {
    max-width: 9rem;
    color: var(--fg);
}

.russia-matrix-col-name {
    font-weight: 600;
}

.russia-matrix-col-when {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.25;
}

.russia-matrix-col:hover,
.russia-matrix-col:focus-visible {
    color: var(--gold);
}

.russia-matrix-col:hover .russia-matrix-col-when,
.russia-matrix-col:focus-visible .russia-matrix-col-when {
    color: color-mix(in srgb, var(--gold) 70%, var(--muted));
}

.russia-matrix-national {
    background: color-mix(in srgb, var(--gold) 10%, var(--bg));
}

.russia-matrix-num {
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    margin-right: 0.35rem;
}

.russia-matrix-name {
    color: var(--fg);
}

.russia-matrix-table td {
    width: 2.4rem;
    min-width: 2.4rem;
    height: 2rem;
}

.russia-matrix-table td.is-on {
    background: color-mix(in srgb, var(--gold) 28%, transparent);
}

.russia-matrix-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--gold);
}

.russia-matrix-legend {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.7rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.russia-matrix-swatch {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 2px;
    background: color-mix(in srgb, var(--gold) 45%, transparent);
    border: 1px solid var(--gold);
}

.russia-link {
    color: var(--gold);
    text-underline-offset: 0.15em;
}

.russia-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    gap: 0.45rem;
}

.russia-photos a {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
}

.russia-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.russia-none p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    .russia-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
    .russia-map-stage {
        height: min(55vh, 28rem);
    }
    .russia-panel {
        height: auto;
        max-height: min(60vh, 32rem);
    }
    .russia-svg-wrap svg {
        max-height: none;
    }
}

/* Полезные материалы */
.materials-groups {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.materials-group-title {
    margin: 0 0 1rem;
    font-family: "Alumni Sans", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.9rem;
}

.material-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    background: var(--glass);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.material-card:hover,
.material-card:focus-visible {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.material-card-title {
    font-weight: 600;
    font-size: 1.02rem;
}

.material-card-summary {
    color: var(--muted);
    font-size: 0.86rem;
}

.prose u {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

/* Партнёры — крупные одинаковые эмблемы-ссылки */
.partners-page {
    max-width: 72rem;
}

.partners-lead {
    margin: 0 0 1.6rem;
    color: var(--muted);
    max-width: 36rem;
}

.partners-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 1.1rem 1.25rem;
    align-items: stretch;
}

.partners-grid > li {
    display: flex;
    min-height: 0;
}

.partner-card {
    display: grid;
    grid-template-rows: 9rem auto;
    gap: 0.7rem;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 12.5rem;
    padding: 1.1rem 0.9rem 0.9rem;
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--glass);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.partner-card:hover,
.partner-card:focus-visible {
    border-color: var(--gold);
    background: color-mix(in srgb, var(--glass) 70%, var(--gold) 12%);
    transform: translateY(-2px);
    outline: none;
}

.partner-emblem {
    display: grid;
    place-items: center;
    height: 9rem;
    padding: 0.25rem;
    overflow: hidden;
}

.partner-emblem img {
    width: min(100%, 13rem);
    height: 6.5rem;
    object-fit: contain;
    object-position: center;
    display: block;
    /* Единый монохром под текущую тему */
    filter: grayscale(1) contrast(1.15) brightness(0);
    opacity: 0.92;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

[data-theme="dark"] .partner-emblem img {
    filter: grayscale(1) contrast(1.1) brightness(0) invert(1);
}

.partner-card:hover .partner-emblem img,
.partner-card:focus-visible .partner-emblem img {
    opacity: 1;
}

.partner-name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6em;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
    color: var(--fg);
}

@media (max-width: 900px) {
    .partners-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }
    .partner-card {
        grid-template-rows: 7rem auto;
        min-height: 10.5rem;
        padding: 0.9rem 0.75rem 0.8rem;
    }
    .partner-emblem {
        height: 7rem;
    }
    .partner-emblem img {
        height: 4.6rem;
    }
}

@media (max-width: 520px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
}

/* —— Контакты —— */
.page.page-contacts,
.slide article.page:has(.contacts-page) {
    max-width: min(72rem, 98vw);
}

.contacts-page {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.contacts-section {
    min-width: 0;
}

.contacts-section-title {
    margin: 0 0 1rem;
    font-family: "Alumni Sans", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
}

.contacts-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
    align-items: stretch;
}

.contact-card {
    display: flex;
    gap: 0.9rem;
    min-width: 0;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    background: var(--glass);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.contact-avatar {
    flex: 0 0 auto;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bar);
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contact-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.contact-name {
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.3;
}

.contact-subtitle {
    color: var(--muted);
    font-size: 0.86rem;
}

.contact-methods {
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact-method {
    display: grid;
    grid-template-columns: minmax(4.5rem, auto) 1fr;
    gap: 0.5rem;
    font-size: 0.86rem;
}

.contact-method-type {
    margin: 0;
    color: var(--muted);
}

.contact-method-value {
    margin: 0;
    overflow-wrap: anywhere;
}

.contact-method-value a {
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--gold) 55%, transparent);
    text-underline-offset: 0.15em;
}

.contact-method-value a:hover,
.contact-method-value a:focus-visible {
    text-decoration-color: var(--gold);
}

.contacts-empty {
    color: var(--muted);
}

/* —— Документы (вне колоды: PDF/HTML viewer) —— */
.slide article.page:has(.documents),
.page.page-documents {
    max-width: min(72rem, 98vw);
    width: 100%;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
    padding-bottom: 6.5rem;
}

/* Документы вне колоды: вьюер занимает оставшуюся высоту окна, без «съезда» под меню.
   Явная высота на article (не % от main) — иначе iframe/PDF схлопывается после пересчёта. */
html:has(body.documents-route),
html:has(.page-documents .documents) {
    height: 100%;
    overflow: hidden;
}

body.documents-route,
body:has(.page-documents .documents) {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
}

body.documents-route main,
body:has(.page-documents .documents) main {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
}

.page.page-documents {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.page.page-documents > h1 {
    flex: 0 0 auto;
}

.page.page-documents .documents {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.documents {
    margin-top: 0.35rem;
}

.documents > .season-tabs {
    flex: 0 0 auto;
    position: relative;
    z-index: 6;
    /* Непрозрачный фон: native PDF в iframe не перехватывает клики по вкладкам */
    background: var(--bg);
    margin-bottom: 0;
    padding-bottom: 0.85rem;
}

.documents-h2 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0.35rem 0 0.45rem;
}

.documents-lead {
    margin: 0 0 0.85rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.documents-lead a {
    color: var(--gold, #d9b24a);
}

.documents-toolbar {
    flex: 0 0 auto;
}

.documents-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.documents-panel[hidden] {
    display: none !important;
}

.documents-viewer {
    flex: 1 1 auto;
    min-height: max(18rem, 42vh);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    background: rgb(0 0 0 / 0.22);
    border-radius: 1px;
    position: relative;
    z-index: 0;
}

.documents-viewer.is-loading::after {
    content: "Загрузка…";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.documents-pdf-pages {
    padding: 0.5rem;
    display: grid;
    gap: 0.5rem;
}

.documents-pdf-page {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 1px 0 rgb(0 0 0 / 0.25);
}

.documents-html-sheet {
    padding: 1.25rem clamp(1rem, 3vw, 2.5rem) 2.5rem;
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    color: var(--fg);
    line-height: 1.55;
    columns: 1;
}

.documents-html-sheet h2,
.documents-html-sheet h3 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 800;
    margin: 1.35rem 0 0.65rem;
}

.documents-html-sheet h2 { font-size: 1.45rem; }
.documents-html-sheet h3 { font-size: 1.15rem; color: var(--gold); }
.documents-html-sheet .a-center { text-align: center; }
.documents-html-sheet .a-right { text-align: right; }
.documents-html-sheet .muted { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.25rem; }
.documents-html-sheet p { margin: 0 0 0.7rem; font-size: 0.98rem; }
.documents-html-sheet ul {
    margin: 0 0 0.9rem;
    padding: 0 0 0 1.2rem;
}
.documents-html-sheet li { margin: 0 0 0.35rem; }

.documents-viewer-error {
    margin: 1.5rem;
    color: var(--muted);
}

.documents-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 17rem);
    gap: 1.25rem 1.25rem;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}

.documents-main {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.vok-panel {
    align-self: start;
    max-height: 100%;
    overflow: auto;
    padding: 1rem 1.05rem 1.1rem;
    border: 1px solid var(--line);
    background: var(--glass);
    backdrop-filter: blur(14px) saturate(1.4);
    -webkit-backdrop-filter: blur(14px) saturate(1.4);
}

.vok-panel .documents-h2 {
    font-size: 1.35rem;
    margin-top: 0;
}

.vok-panel .documents-lead {
    font-size: 0.88rem;
}

.vok-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
}

.vok-list li {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
}

.vok-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.vok-role {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold, #d9b24a);
}

.vok-names {
    line-height: 1.4;
    font-size: 0.92rem;
}

.vok-note {
    margin-top: -0.25rem;
}

@media (max-width: 900px) {
    body.documents-route,
    body:has(.page-documents .documents) {
        overflow: auto;
        height: auto;
    }

    body.documents-route main,
    body:has(.page-documents .documents) main {
        height: auto;
        overflow: visible;
    }

    .page.page-documents {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .documents-split {
        grid-template-columns: 1fr;
    }

    .vok-panel {
        order: -1;
        max-height: none;
    }

    .documents-viewer {
        flex: none;
        height: min(70vh, 34rem);
        min-height: 16rem;
    }

    .documents > .season-tabs {
        position: sticky;
        top: 0;
    }
}

/* —— Доска заявок на тренировочные бои —— */
.page-training-board {
    max-width: min(72rem, 98vw);
}

.page-training-board h2 {
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: 0.02em;
    margin: 2.2rem 0 1rem;
}

.board-notice {
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    font-size: 0.95rem;
}

.board-notice--ok {
    border-color: var(--gold);
    color: var(--gold);
}

.board-notice--error {
    border-color: rgba(224, 108, 108, 0.55);
    color: #e06c6c;
}

.board-form-lead {
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 38rem;
    margin: 0 0 1.2rem;
}

.board-create-form {
    display: grid;
    gap: 1rem;
    margin-top: 0.6rem;
}

.field {
    display: grid;
    gap: 0.35rem;
}

.field label {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.field input[type="text"],
.field input[type="password"],
.field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    background: var(--glass);
    color: var(--fg);
    font: inherit;
    font-size: 0.98rem;
    resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgb(217 178 74 / 0.18);
}

.field.has-errors input,
.field.has-errors textarea {
    border-color: rgba(224, 108, 108, 0.6);
}

.hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.field-error {
    margin: 0;
    color: #e06c6c;
    font-size: 0.85rem;
}

.board-submit,
.board-delete-submit {
    justify-self: start;
    padding: 0.75rem 1.4rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: transparent;
    color: var(--gold);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.board-submit:hover,
.board-delete-submit:not(:disabled):hover {
    background: var(--gold);
    color: #222;
}

.board-delete-submit:disabled {
    opacity: 0.45;
    cursor: default;
}

.board-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.board-cards > h2 {
    grid-column: 1 / -1;
}

.board-card:only-child {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .board-cards {
        grid-template-columns: 1fr;
    }
}

.board-card {
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    padding: 1.1rem 1.2rem;
    background: var(--glass);
}

.board-card h3 {
    margin: 0 0 0.7rem;
    font-family: "Alumni Sans", "Arial Narrow", sans-serif;
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: 0.01em;
    line-height: 1;
}

.board-card-facts {
    margin: 0;
    display: grid;
    gap: 0.55rem;
}

.board-card-fact {
    display: grid;
    gap: 0.1rem;
}

.board-card-fact dt {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.board-card-fact dd {
    margin: 0;
    font-size: 0.98rem;
}

.board-card-date {
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.board-empty {
    color: var(--muted);
}

.board-delete {
    margin-top: 0.9rem;
    border-top: 1px solid var(--line);
    padding-top: 0.7rem;
}

.board-delete summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 0.85rem;
    list-style: none;
}

.board-delete summary::-webkit-details-marker {
    display: none;
}

.board-delete summary:hover {
    color: var(--fg);
}

.board-delete-form {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.7rem;
}
