:root {
    --color-white: #ffffff;
    --color-dark-blue: #0b1f3a;
    --color-blue: #163b67;
    --color-gray: #eef2f6;
    --color-gold: #d4af37;
    --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 15px 35px rgba(0, 0, 0, 0.12);
    --radius-large: 15px;
    --transition: 0.4s cubic-bezier(.22, .61, .36, 1);
    --font-main: "Inter", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }
body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--color-dark-blue);
    background: var(--color-white);
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font: inherit; }
.page-container { width: 100%; }
.screen {
    width: 100%;
    height: 100vh;
    min-height: 700px;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
}
.section-container {
    width: min(1200px, 90%);
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-header, .navigation-footer {
    position: fixed;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 100;
}
.site-header { top: 25px; }
.navigation-footer { bottom: 25px; }
.nav-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(12px);
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.nav-button:hover { transform: scale(1.15); background: rgba(255,255,255,.3); }
.nav-button.hidden { opacity: 0; pointer-events: none; }

.hero-screen { display: flex; justify-content: center; align-items: center; color: white; }
.hero-background { position: absolute; inset: 0; overflow: hidden; }
.hero-background::before {
    content: "";
    position: absolute;
    inset: -3%;
    background: url("assets/media/school-hero.webp") center 42% / cover no-repeat;
    filter: blur(5px);
    transform: scale(1.055);
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,17,36,.58), rgba(5,20,45,.88)); }
.hero-content { position: relative; z-index: 2; width: min(900px,90%); text-align: center; }
.hero-anniversary-number {
    font-family: 'Cormorant Garamond', Georgia, serif;
    position: absolute;
    z-index: 1;
    font-size: clamp(18rem,45vw,40rem);
    font-weight: 800;
    color: rgba(255,255,255,.08);
    line-height: 1;
}
.hero-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2.7rem,6vw,5.6rem); line-height:.95; letter-spacing:-.025em; margin-bottom: 25px; }
.hero-subtitle { color: var(--color-gold); font-size: clamp(1.3rem,3vw,2rem); margin-bottom: 30px; }
.hero-description { font-size: clamp(1rem,2vw,1.25rem); line-height: 1.7; max-width: 750px; margin: 0 auto; }

.events-screen, .facts-screen { background: var(--color-gray); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2rem,4vw,3.2rem); margin: 0 0 15px; }
.section-description { max-width: 700px; margin: 0 auto; color: #536174; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 30px; }
.news-card { background:white; border-radius: var(--radius-large); overflow:hidden; box-shadow: var(--shadow-card); transition: var(--transition); }
.news-card:hover { transform: scale(1.04); }
.news-image { width:100%; height:220px; object-fit:cover; }
.news-content { padding:25px; }
.news-date { color: var(--color-gold); font-weight:600; }
.news-title { margin:15px 0; }
.news-text { color:#586579; line-height:1.6; }
.news-button { margin-top:20px; padding:12px 25px; border:none; border-radius:30px; background:var(--color-dark-blue); color:white; cursor:pointer; transition:var(--transition); }
.news-button:hover { transform:translateY(-3px); }

/* Пятнашки */
.facts-container { width: min(1280px, 92%); padding: 28px 0; }
.facts-header { margin-bottom: 16px; }
.puzzle-shell {
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 22px 34px 26px;
    background: rgba(255,255,255,.96);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(11,31,58,.10);
}
.puzzle-topline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 1.1rem;
}
.puzzle-line { width: 50px; height: 2px; background: #dce3eb; border-radius: 99px; }
.sliding-puzzle {
    --puzzle-image: url("assets/facts/01.webp");
    width: min(760px, 100%);
    aspect-ratio: 16 / 10;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: #d8e0e8;
    box-shadow: 0 12px 28px rgba(11,31,58,.18);
    outline: none;
}
.sliding-puzzle:focus-visible { box-shadow: 0 0 0 4px rgba(22,59,103,.2), 0 12px 28px rgba(11,31,58,.18); }
.puzzle-tile {
    position: relative;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    background-image: var(--puzzle-image);
    background-size: 400% 400%;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.puzzle-tile:hover { filter: brightness(1.05); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.puzzle-tile:active { transform: scale(.97); }
.puzzle-tile:focus-visible { outline: 3px solid var(--color-gold); outline-offset: -3px; }
.puzzle-empty {
    border-radius: 8px;
    background: linear-gradient(145deg, #0b1f3a, #17385f);
    box-shadow: inset 0 0 18px rgba(0,0,0,.18);
}
.puzzle-message {
    min-height: 22px;
    margin: 12px 0 0;
    text-align: center;
    color: #607087;
    font-size: .9rem;
}
.puzzle-message.success { color: #237245; font-weight: 700; }
.puzzle-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; width: min(760px, 100%); margin: 18px auto 0; }
.puzzle-action {
    min-height: 78px;
    display: grid;
    grid-template-columns: 44px 1fr 24px;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    border: 1px solid #e5eaf0;
    border-radius: 14px;
    background: white;
    color: var(--color-dark-blue);
    font-size: 1.15rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(11,31,58,.08);
    transition: .2s ease;
}
.puzzle-action:hover { transform: translateY(-3px); box-shadow: 0 13px 28px rgba(11,31,58,.13); }
.puzzle-action-icon { font-size: 1.8rem; text-align: center; }
.puzzle-action-arrow { font-size: 2rem; justify-self: end; }

.collection-modal[hidden] { display: none; }
.collection-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5,20,45,.62);
    backdrop-filter: blur(8px);
}
.collection-dialog {
    width: min(960px, 100%);
    max-height: min(760px, 90vh);
    overflow: hidden;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}
.collection-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 28px; border-bottom: 1px solid #e8edf2; }
.collection-dialog-header h3 { margin: 0 0 6px; font-size: 1.55rem; }
.collection-dialog-header p { margin: 0; color: #68778a; }
.collection-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #eef2f6; color: var(--color-dark-blue); font-size: 28px; cursor: pointer; }
.facts-collection { max-height: calc(90vh - 110px); overflow-y: auto; padding: 24px 28px 30px; display: grid; grid-template-columns: repeat(auto-fill,minmax(125px,1fr)); gap: 16px; }
.collection-card { min-height: 150px; border-radius: 14px; overflow: hidden; background: #e1e5ea; position: relative; box-shadow: 0 7px 18px rgba(11,31,58,.08); }
.collection-card img { width: 100%; height: 100%; object-fit: cover; }
.collection-card-number { position: absolute; top: 8px; left: 8px; min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 99px; background: rgba(11,31,58,.88); color: white; font-size: .78rem; font-weight: 700; }
.collection-card.locked { display: grid; place-items: center; color: #8994a2; font-size: 2.2rem; }
.collection-card-title { position: absolute; inset: auto 0 0; padding: 30px 10px 10px; color: white; font-size: .78rem; background: linear-gradient(transparent, rgba(5,20,45,.85)); }

.reveal { opacity:0; transform:translateY(40px); transition:.8s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }

@media (max-width: 800px) {
    .screen { min-height: 650px; }
    .section-container { width: 92%; }
    .news-grid { grid-template-columns: 1fr; overflow-y:auto; max-height:65vh; }
    .facts-container { justify-content: flex-start; overflow-y: auto; padding-top: 80px; }
    .puzzle-shell { padding: 18px; }
    .sliding-puzzle { aspect-ratio: 1 / 1; }
    .puzzle-actions { gap: 12px; }
    .puzzle-action { min-height: 64px; padding: 0 16px; grid-template-columns: 34px 1fr 18px; font-size: 1rem; }
}

@media (max-width: 520px) {
    .site-header { top: 12px; }
    .navigation-footer { bottom: 12px; }
    .nav-button { width: 48px; height: 48px; font-size: 22px; }
    .facts-header .section-title {
    font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.75rem; }
    .puzzle-actions { grid-template-columns: 1fr; }
    .facts-collection { grid-template-columns: repeat(2,1fr); padding: 18px; }
}

/* ==================================================
   ОТДЕЛЬНАЯ СТРАНИЦА КОЛЛЕКЦИИ
================================================== */
.collection-page-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(212,175,55,.12), transparent 28%),
        linear-gradient(145deg, #eef2f6 0%, #f8fafc 55%, #e8edf3 100%);
}
.collection-page {
    width: min(1320px, 92%);
    margin: 0 auto;
    padding: 48px 0 70px;
}
.collection-page-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
    margin-bottom: 34px;
}
.collection-page-header h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    margin: 4px 0 10px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
}
.collection-kicker {
    margin: 0;
    color: var(--color-gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
}
.collection-subtitle { margin: 0; color: #627086; max-width: 680px; line-height: 1.6; }
.collection-back {
    align-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: white;
    color: var(--color-dark-blue);
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(11,31,58,.09);
    transition: .2s ease;
}
.collection-back:hover { transform: translateX(-4px); }
.collection-counter {
    padding: 15px 20px;
    border-radius: 14px;
    background: white;
    box-shadow: 0 8px 22px rgba(11,31,58,.09);
    font-weight: 800;
    white-space: nowrap;
}
.collection-page-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(82px, 1fr));
    gap: 16px;
}
.fact-square {
    aspect-ratio: 1 / 1;
    min-width: 0;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}
.fact-square--locked {
    display: grid;
    place-items: center;
    background: #050505;
    color: white;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.fact-square-question {
    font-size: clamp(2rem, 3.4vw, 3.6rem);
    line-height: 1;
    font-weight: 800;
}
.fact-square--opened {
    border: 0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    cursor: pointer;
    color: white;
    background: linear-gradient(145deg, #163b67, #091b32);
    box-shadow: 0 12px 28px rgba(11,31,58,.23);
    transition: transform .2s ease, box-shadow .2s ease;
}
.fact-square--opened:hover { transform: translateY(-5px); box-shadow: 0 17px 34px rgba(11,31,58,.3); }
.fact-square-number { font-size: 1.5rem; font-weight: 800; color: var(--color-gold); }
.fact-square-title { font-weight: 800; }
.fact-square-open { font-size: .72rem; opacity: .72; text-transform: uppercase; letter-spacing: .08em; }
.fact-modal[hidden] { display: none; }
.fact-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2,8,18,.72);
    backdrop-filter: blur(10px);
}
.fact-modal-card {
    width: min(720px, 100%);
    position: relative;
    padding: 42px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 30px 80px rgba(0,0,0,.34);
}
.fact-modal-number { color: var(--color-gold); font-weight: 800; letter-spacing: .12em; }
.fact-modal-card h2 { margin: 10px 0 18px; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.fact-modal-card p { margin: 0; color: #4f5f74; line-height: 1.75; font-size: 1.05rem; }
.fact-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #eef2f6;
    color: var(--color-dark-blue);
    font-size: 28px;
    cursor: pointer;
}
@media (max-width: 1100px) {
    .collection-page-grid { grid-template-columns: repeat(7, minmax(82px, 1fr)); }
}
@media (max-width: 780px) {
    .collection-page { padding-top: 26px; }
    .collection-page-header { grid-template-columns: 1fr; gap: 18px; }
    .collection-back { justify-self: start; }
    .collection-counter { justify-self: start; }
    .collection-page-grid { grid-template-columns: repeat(5, minmax(58px, 1fr)); gap: 10px; }
    .fact-square { border-radius: 10px; }
}
@media (max-width: 480px) {
    .collection-page-grid { grid-template-columns: repeat(4, minmax(54px, 1fr)); }
    .fact-modal-card { padding: 34px 24px 28px; }
}


/* Минимальный футер */
.site-footer {
    margin-top: 48px;
    padding: 18px 20px;
    border-top: 1px solid rgba(16, 44, 79, 0.12);
    color: #6b7280;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
}

.site-footer p {
    margin: 0;
}


/* Футер всегда прижат к нижней части страницы */
html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
}


/* ==================================================
   НИЖНЯЯ ЧАСТЬ ГЛАВНОЙ СТРАНИЦЫ
================================================== */

/*
 * Последняя секция больше не обрезает кнопки.
 * После неё можно прокрутить страницу до настоящего футера.
 */
.facts-screen {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
    padding-bottom: 36px;
}

.facts-screen > .section-container {
    height: auto !important;
    min-height: 100vh;
    padding-top: 32px;
    padding-bottom: 32px;
}

/* Кнопка перехода между экранами остаётся отдельной навигацией. */
.navigation-footer {
    position: fixed;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 100;
}

/* Настоящий минимальный футер после содержимого страницы. */
.site-footer.site-footer-minimal {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
    width: 100%;
    flex: 0 0 auto;
    margin: 0;
    padding: 16px 20px;
    border-top: 1px solid rgba(16, 44, 79, 0.12);
    color: #6b7280;
    background: #ffffff;
    text-align: center;
    font-size: 0.88rem;
    line-height: 1.4;
    z-index: auto;
}

.site-footer.site-footer-minimal p {
    margin: 0;
}

/* Футер доступен при обычной вертикальной прокрутке. */
html {
    scroll-snap-type: y proximity;
}


/* ==================================================
   КАРТОЧКИ МЕРОПРИЯТИЙ С ФОНОВЫМИ ИЗОБРАЖЕНИЯМИ
================================================== */

.news-card {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: flex-end;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Используем уже существующие изображения фактов. */
.news-card:nth-child(1) {
    background-image: url("assets/facts/01.webp");
}

.news-card:nth-child(2) {
    background-image: url("assets/facts/02.webp");
}

.news-card:nth-child(3) {
    background-image: url("assets/facts/03.webp");
}

/* Затемнение для читаемости текста. */
.news-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            180deg,
            rgba(4, 15, 31, .08) 0%,
            rgba(4, 15, 31, .20) 38%,
            rgba(4, 15, 31, .88) 100%
        );
}

.news-card:hover {
    transform: translateY(-6px);
}

.news-content {
    width: 100%;
    box-sizing: border-box;
    padding: 30px 26px 28px;
    color: #fff;
    background: transparent;
}

.news-date {
    color: #f2c230;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}

.news-title {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.news-text {
    margin-bottom: 0;
    color: rgba(255, 255, 255, .90);
    text-shadow: 0 2px 8px rgba(0, 0, 0, .50);
}

/* Старые изображения и кнопки больше не используются. */
.news-image,
.news-button {
    display: none !important;
}

@media (max-width: 700px) {
    .news-card {
        min-height: 380px;
    }
}

/* ==================================================
   КНОПКА ВХОДА И ПРОФИЛЯ
================================================== */
.account-entry {
    position: fixed;
    top: 25px;
    right: 28px;
    z-index: 130;
    min-height: 48px;
    padding: 6px 16px 6px 7px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
    transition: .2s ease;
}

.account-entry:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .28);
}

.account-entry-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--color-dark-blue);
    background: #fff;
    font-size: 1rem;
    font-weight: 800;
}

.account-entry-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--color-dark-blue);
    font-weight: 800;
}

.account-entry.is-authorized .account-entry-icon {
    display: none;
}

.account-entry--light,
.account-entry--inline {
    color: var(--color-dark-blue);
    border-color: rgba(16, 44, 79, .14);
    background: #fff;
    box-shadow: 0 8px 22px rgba(11, 31, 58, .09);
    backdrop-filter: none;
}

.account-entry--light:hover,
.account-entry--inline:hover {
    background: #fff;
    box-shadow: 0 12px 28px rgba(11, 31, 58, .14);
}

.account-entry--inline {
    position: static;
    min-height: 46px;
    padding-right: 14px;
}

.collection-header-actions {
    align-self: start;
    display: flex;
    align-items: stretch;
    gap: 10px;
}

@media (max-width: 780px) {
    .collection-header-actions {
        justify-self: start;
        flex-wrap: wrap;
    }
}

@media (max-width: 520px) {
    .account-entry {
        top: 12px;
        right: 12px;
        min-height: 44px;
        padding: 5px 12px 5px 5px;
    }

    .account-entry-label {
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .account-entry-icon,
    .account-entry-avatar {
        width: 32px;
        height: 32px;
    }

    .account-entry--inline {
        top: auto;
        right: auto;
    }
}

/* Контрастная версия кнопки на всех экранах главной страницы. */
.account-entry:not(.account-entry--inline) {
    color: var(--color-dark-blue);
    border-color: rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .92);
}

.account-entry:not(.account-entry--inline):hover {
    background: #fff;
}


/* ==================================================
   ГАЛЕРЕЯ РУКОВОДИТЕЛЕЙ
================================================== */
.section-kicker { margin:0 0 10px; color:var(--color-gold); font-size:.8rem; font-weight:800; letter-spacing:.16em; text-transform:uppercase; }
.leaders-screen { background:linear-gradient(145deg,#f2f0eb 0%,#fff 55%,#e9eef4 100%); color:var(--color-dark-blue); }
.leaders-container { justify-content:center; gap:30px; padding-top:76px; padding-bottom:76px; }
.leaders-grid { width:100%; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.leader-card { min-width:0; padding:14px 14px 22px; border:1px solid rgba(16,44,79,.10); border-radius:18px; background:rgba(255,255,255,.92); box-shadow:0 14px 34px rgba(11,31,58,.10); }
.leader-photo-frame { aspect-ratio:4/5; overflow:hidden; border-radius:12px; background:#dfe5eb; }
.leader-photo-frame img { width:100%; height:100%; display:block; object-fit:cover; filter:sepia(.08) saturate(.9) contrast(.98); }
.leader-years { margin:16px 2px 8px; color:#a77b13; font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.leader-card h3 { margin:0 2px; font-family:'Cormorant Garamond',Georgia,serif; font-size:clamp(1.35rem,2vw,1.8rem); line-height:1.05; }
.leader-photo-placeholder { display:grid; place-items:center; align-content:center; gap:10px; text-align:center; color:#fff; background:linear-gradient(145deg,#183e69,#081b34); }
.leader-photo-placeholder span { font-family:'Cormorant Garamond',Georgia,serif; font-size:4.5rem; color:#e4bd50; }
.leader-photo-placeholder small { max-width:150px; color:rgba(255,255,255,.7); line-height:1.35; }
@media (max-width:1050px){ .leaders-grid{grid-template-columns:repeat(2,minmax(0,1fr));} .leaders-screen{height:auto;min-height:100vh;} }
@media (max-width:600px){ .leaders-grid{grid-template-columns:1fr;} .leaders-container{padding-top:88px;} .leader-card{max-width:420px;width:100%;justify-self:center;} }

/* ==========================================================
   СОБРАННАЯ КАРТОЧКА ФАКТА НА ГЛАВНОЙ
   Лицевая и обратная стороны занимают одну и ту же область.
   Текст факта больше не выводится под изображением.
   ========================================================== */
.sliding-puzzle.puzzle-solved {
    display: block;
    position: relative;
    padding: 0;
    gap: 0;
    overflow: visible;
    background: transparent;
    perspective: 1400px;
}

.fact-flip-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    perspective: 1400px;
}

.fact-flip-card:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 4px;
}

.fact-flip-card-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform-style: preserve-3d;
    transition: transform .65s cubic-bezier(.2,.75,.2,1);
    box-shadow: 0 12px 28px rgba(11,31,58,.18);
}

.fact-flip-card.is-flipped .fact-flip-card-inner {
    transform: rotateY(180deg);
}

.fact-flip-face {
    position: absolute;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.fact-flip-front {
    align-items: stretch;
    justify-content: stretch;
    background: #0b1f3a;
}

.fact-flip-front img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.fact-flip-front .fact-flip-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 2;
    max-width: calc(100% - 28px);
    padding: 7px 12px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: rgba(7, 25, 48, .78);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(6px);
}

.fact-flip-back {
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    padding: clamp(26px, 5vw, 56px);
    transform: rotateY(180deg);
    background:
        radial-gradient(circle at 85% 15%, rgba(218, 179, 73, .16), transparent 28%),
        linear-gradient(145deg, #0a1e38, #112d50);
    color: #fff;
    text-align: left;
}

.fact-flip-number {
    color: var(--color-gold);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: .08em;
}

.fact-flip-number::before {
    content: "ФАКТ ";
}

.fact-flip-title {
    display: block;
    max-width: 92%;
    font-size: clamp(1.35rem, 3vw, 2.3rem);
    line-height: 1.08;
}

.fact-flip-text {
    display: block;
    max-width: 92%;
    max-height: 46%;
    overflow: auto;
    padding-right: 8px;
    color: rgba(255,255,255,.9);
    font-size: clamp(.88rem, 1.7vw, 1.08rem);
    line-height: 1.55;
}

.fact-flip-hint-back {
    margin-top: 4px;
    color: rgba(255,255,255,.62);
    font-size: .78rem;
    font-weight: 600;
}

@media (max-width: 640px) {
    .fact-flip-front .fact-flip-hint {
        bottom: 10px;
        font-size: .7rem;
    }

    .fact-flip-back {
        gap: 10px;
        padding: 22px;
    }

    .fact-flip-text {
        max-height: 52%;
    }
}

.account-entry {
    scale: 1.35;
    transform-origin: top right;
}