:root {
    --bg-main: #efe2d1;
    --bg-light: #f8efe4;
    --bg-deep: #e6d4bd;

    --glass-main: rgba(255, 255, 255, 0.26);
    --glass-soft: rgba(255, 250, 242, 0.18);
    --glass-strong: rgba(255, 255, 255, 0.38);
    --glass-edge: rgba(255, 255, 255, 0.72);

    --text-main: #171717;
    --text-muted: #4f4a44;

    --accent: #173f73;
    --accent-hover: #0f2f59;
    --accent-light: #245489;
    --accent-soft: rgba(23, 63, 115, 0.12);
    --accent-glass: rgba(23, 63, 115, 0.075);

    --border-light: rgba(255, 255, 255, 0.74);
    --border-strong: rgba(255, 255, 255, 0.92);
    --border-warm: rgba(190, 170, 145, 0.34);

    --shadow-main:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        inset 0 -1px 0 rgba(255, 255, 255, 0.18),
        inset 0 0 42px rgba(255, 255, 255, 0.12),
        0 34px 92px rgba(69, 52, 35, 0.22),
        0 16px 38px rgba(23, 63, 115, 0.09);

    --shadow-soft:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        inset 0 0 26px rgba(255, 255, 255, 0.10),
        0 18px 44px rgba(69, 52, 35, 0.14),
        0 8px 22px rgba(23, 63, 115, 0.07);

    --shadow-blue:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 15px 34px rgba(23, 63, 115, 0.25),
        0 8px 18px rgba(69, 52, 35, 0.12);

    --radius-xl: 38px;
    --radius-lg: 28px;
    --radius-md: 20px;

    --bg-line-opacity: 0.72;
    --bg-line-color: rgba(120, 102, 84, 0.075);
}

@font-face {
    font-family: 'Comfortaa';
    src: url('fonts/Comfortaa-VariableFont_wght.ttf') format('truetype');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: 'Comfortaa', Arial, sans-serif;
    color: var(--text-main);

    background:
        radial-gradient(circle at 82% 92%, rgba(214, 194, 166, 0.32), transparent 36%),
        linear-gradient(135deg, var(--bg-light) 0%, var(--bg-main) 48%, var(--bg-deep) 100%);

    overflow-x: hidden;
    touch-action: manipulation;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

body::before {
    background:
        linear-gradient(90deg, transparent 0 7%, rgba(255, 255, 255, 0.20) 7.4%, transparent 8.6%),
        linear-gradient(90deg, transparent 0 91%, rgba(255, 255, 255, 0.16) 91.5%, transparent 92.8%),
        radial-gradient(circle at 88% 78%, rgba(23, 63, 115, 0.045), transparent 28%);
    opacity: 0.78;
}

body::after {
    background:
        radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, 0.32), transparent 36%),
        radial-gradient(ellipse at 50% 105%, rgba(23, 63, 115, 0.075), transparent 44%),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.16), transparent 42%, rgba(69, 52, 35, 0.035));
}

button,
a {
    font: inherit;
}

.page {
    min-height: 100vh;
    padding: 28px clamp(18px, 4vw, 54px);
    position: relative;
    isolation: isolate;
}

/* ===== ФОНОВАЯ АРХИТЕКТУРНАЯ ИЛЛЮСТРАЦИЯ ===== */

.bg-illustration {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: var(--bg-line-opacity);

    background-image:
        linear-gradient(
            180deg,
            rgba(248, 239, 228, 0.10) 0%,
            rgba(239, 226, 209, 0.06) 48%,
            rgba(230, 212, 189, 0.10) 100%
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900'%3E%3Cg fill='none' stroke='rgba(120,102,84,0.10)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M104 760h1232M178 710h1084M248 662h944'/%3E%3Cpath d='M190 642c145-78 287-116 427-116h206c140 0 282 38 427 116' opacity='.48'/%3E%3Cpath d='M323 625c96-48 188-72 276-72h242c88 0 180 24 276 72' opacity='.38'/%3E%3Cpath d='M98 192h240M116 226h204M132 254h172M158 254v348M278 254v348M140 602h156M122 634h192M112 674h212'/%3E%3Cpath d='M184 254c0-34 68-34 68 0' opacity='.55'/%3E%3Cpath d='M1092 192h240M1110 226h204M1126 254h172M1152 254v348M1272 254v348M1134 602h156M1116 634h192M1106 674h212'/%3E%3Cpath d='M1178 254c0-34 68-34 68 0' opacity='.55'/%3E%3Cpath d='M430 274c0-78 580-78 580 0' opacity='.30'/%3E%3Cpath d='M462 318c0-56 516-56 516 0' opacity='.25'/%3E%3Cpath d='M520 386h400M548 426h344M576 466h288' opacity='.20'/%3E%3Cpath d='M70 120v620M1370 120v620' opacity='.20'/%3E%3Cpath d='M40 760c190-44 362-66 516-66h328c154 0 326 22 516 66' opacity='.24'/%3E%3C/g%3E%3Cg fill='rgba(120,102,84,0.045)'%3E%3Crect x='164' y='284' width='28' height='288' rx='14'/%3E%3Crect x='244' y='284' width='28' height='288' rx='14'/%3E%3Crect x='1158' y='284' width='28' height='288' rx='14'/%3E%3Crect x='1238' y='284' width='28' height='288' rx='14'/%3E%3C/g%3E%3C/svg%3E");

    background-repeat: no-repeat, no-repeat;
    background-position: center, center bottom;
    background-size: 100% 100%, min(1440px, 118vw) auto;
}

.bg-illustration::before,
.bg-illustration::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

..bg-illustration::before {
    background:
        linear-gradient(
            90deg,
            rgba(90, 78, 64, 0.045),
            transparent 18%,
            transparent 82%,
            rgba(90, 78, 64, 0.04)
        );
}

.bg-illustration::after {
    background:
        repeating-linear-gradient(90deg, transparent 0 96px, rgba(150, 130, 110, 0.035) 97px 98px, transparent 99px 192px);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 76%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 76%, transparent 100%);
}

/* ===== ВЕРХНЯЯ ПАНЕЛЬ ===== */

.topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 30;
}

.logo {
    color: var(--text-main);
    text-decoration: none;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.admin {
    position: relative;
    flex: 0 0 auto;
}

.admin-button {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    min-width: 132px;
    min-height: 54px;

    padding: 15px 24px;

    border-radius: 999px;

    border: 1px solid rgba(255, 255, 255, 0.78);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.48) 0%,
            rgba(255, 250, 242, 0.24) 44%,
            rgba(255, 255, 255, 0.13) 100%
        );

    color: var(--text-main);

    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;

    cursor: pointer;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -1px 0 rgba(255, 255, 255, 0.20),
        inset 0 0 28px rgba(255, 255, 255, 0.18),
        0 18px 44px rgba(69, 52, 35, 0.18),
        0 8px 22px rgba(23, 63, 115, 0.10);

    backdrop-filter: blur(34px) saturate(1.55) contrast(1.08) brightness(1.04);
    -webkit-backdrop-filter: blur(34px) saturate(1.55) contrast(1.08) brightness(1.04);

    overflow: hidden;
    isolation: isolate;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.admin-button::before {
    content: "";
    position: absolute;
    inset: 1px;

    border-radius: inherit;

    background:
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.76) 0%,
            rgba(255, 255, 255, 0.32) 22%,
            rgba(255, 255, 255, 0.06) 46%,
            rgba(255, 255, 255, 0.00) 62%,
            rgba(23, 63, 115, 0.075) 100%
        );

    pointer-events: none;
    z-index: -1;
}

.admin-button::after {
    content: "";
    position: absolute;

    right: -62px;
    top: -82px;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.70) 0%,
            rgba(255, 255, 255, 0.30) 25%,
            rgba(23, 63, 115, 0.14) 48%,
            transparent 72%
        );

    filter: blur(8px);
    opacity: 0.92;

    pointer-events: none;
    z-index: -1;
}

.admin-button:hover,
.admin-button:focus-visible {
    transform: translateY(-3px);

    border-color: rgba(23, 63, 115, 0.34);

    color: var(--accent);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.60) 0%,
            rgba(255, 250, 242, 0.30) 44%,
            rgba(255, 255, 255, 0.18) 100%
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        inset 0 -1px 0 rgba(255, 255, 255, 0.24),
        inset 0 0 34px rgba(255, 255, 255, 0.22),
        0 24px 54px rgba(69, 52, 35, 0.20),
        0 12px 30px rgba(23, 63, 115, 0.14);

    filter: saturate(1.05) brightness(1.02);

    outline: none;
}

.admin-button:active {
    transform: translateY(-1px);
}

.admin-icon {
    position: relative;
    z-index: 1;

    width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--accent);

    font-size: 18px;
    line-height: 1;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.50),
            rgba(255, 255, 255, 0.14)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.70),
        0 6px 14px rgba(23, 63, 115, 0.10);
}

.admin-button span {
    position: relative;
    z-index: 1;
}

.admin-menu {
    position: absolute;

    top: calc(100% + 14px);
    right: 0;

    width: 260px;

    padding: 10px;

    border-radius: 26px;

    border: 1px solid rgba(255, 255, 255, 0.76);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.46) 0%,
            rgba(255, 250, 242, 0.22) 46%,
            rgba(255, 255, 255, 0.12) 100%
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 0 rgba(255, 255, 255, 0.18),
        inset 0 0 32px rgba(255, 255, 255, 0.14),
        0 26px 64px rgba(69, 52, 35, 0.20),
        0 10px 28px rgba(23, 63, 115, 0.10);

    backdrop-filter: blur(36px) saturate(1.50) contrast(1.07) brightness(1.04);
    -webkit-backdrop-filter: blur(36px) saturate(1.50) contrast(1.07) brightness(1.04);

    display: none;

    z-index: 40;

    overflow: hidden;
    isolation: isolate;
}

.admin-menu::before {
    content: "";
    position: absolute;
    inset: 1px;

    border-radius: 25px;

    background:
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.64) 0%,
            rgba(255, 255, 255, 0.24) 24%,
            rgba(255, 255, 255, 0.04) 48%,
            rgba(23, 63, 115, 0.055) 100%
        );

    pointer-events: none;
    z-index: -1;
}

.admin-menu::after {
    content: "";
    position: absolute;

    right: -84px;
    top: -94px;

    width: 220px;
    height: 220px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.58) 0%,
            rgba(255, 255, 255, 0.22) 26%,
            rgba(23, 63, 115, 0.11) 48%,
            transparent 72%
        );

    filter: blur(10px);
    opacity: 0.86;

    pointer-events: none;
    z-index: -1;
}

.admin-menu.is-open {
    display: block;
}

.admin-menu a {
    position: relative;
    z-index: 1;

    display: block;

    padding: 14px 16px;

    border-radius: 17px;

    color: var(--text-main);

    text-decoration: none;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;

    background: transparent;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.admin-menu a:hover,
.admin-menu a:focus-visible {
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.42),
            rgba(23, 63, 115, 0.095)
        );

    color: var(--accent);

    transform: translateX(3px);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        0 8px 18px rgba(69, 52, 35, 0.09);

    outline: none;
}

/* ===== ОСНОВНОЙ ЭКРАН ===== */

.main {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 0 86px;
}

.choice-panel {
    width: min(100%, 1080px);
    padding: 50px 70px 58px;

    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 248, 240, 0.52);

    background:
        linear-gradient(
            135deg,
            rgba(244, 235, 223, 0.50) 0%,
            rgba(235, 223, 207, 0.34) 42%,
            rgba(226, 212, 193, 0.26) 100%
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.44),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 24px rgba(255, 255, 255, 0.05),
        0 30px 80px rgba(92, 73, 52, 0.18),
        0 14px 32px rgba(23, 63, 115, 0.06);

    backdrop-filter: blur(30px) saturate(1.22) contrast(1.03) brightness(0.99);
    -webkit-backdrop-filter: blur(30px) saturate(1.22) contrast(1.03) brightness(0.99);

    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.choice-panel::before {
    content: "";
    position: absolute;
    inset: 1px;

    border-radius: calc(var(--radius-xl) - 1px);

    background:
        linear-gradient(
            122deg,
            rgba(255, 255, 255, 0.72) 0%,
            rgba(255, 255, 255, 0.24) 18%,
            rgba(255, 255, 255, 0.05) 42%,
            rgba(255, 255, 255, 0.00) 58%,
            rgba(23, 63, 115, 0.055) 100%
        );

    pointer-events: none;
    z-index: -1;
}

.choice-panel::after {
    content: "";
    position: absolute;
    right: -140px;
    top: -160px;

    width: 390px;
    height: 390px;
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.62) 0%,
            rgba(255, 255, 255, 0.26) 26%,
            rgba(23, 63, 115, 0.11) 48%,
            transparent 72%
        );

    filter: blur(12px);
    opacity: 0.9;
    pointer-events: none;
    z-index: -1;
}

.choice-panel > * {
    position: relative;
    z-index: 1;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    margin-bottom: 28px;
    padding: 11px 20px;

    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.66);

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 250, 242, 0.18));

    color: var(--text-main);
    font-size: 15px;
    font-weight: 700;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        inset 0 0 18px rgba(255, 255, 255, 0.10),
        0 10px 24px rgba(69, 52, 35, 0.10);

    backdrop-filter: blur(24px) saturate(1.34);
    -webkit-backdrop-filter: blur(24px) saturate(1.34);
}

.badge-icon {
    color: var(--accent);
}

.choice-panel h1 {
    margin: 0;
    color: var(--text-main);

    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.075em;
    font-weight: 700;

    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.42),
        0 12px 28px rgba(69, 52, 35, 0.08);
}

.panel-text {
    max-width: 620px;
    margin: 24px auto 48px;

    color: var(--text-muted);
    font-size: 20px;
    line-height: 1.55;

    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.30);
}

/* ===== КАРТОЧКИ ГРУПП ===== */

.group-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
    width: 100%;
}

.group-card {
    position: relative;
    min-height: 230px;
    padding: 34px;

    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.72);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.36) 0%,
            rgba(255, 250, 242, 0.18) 46%,
            rgba(255, 255, 255, 0.10) 100%
        );

    box-shadow: var(--shadow-soft);

    color: var(--text-main);
    text-decoration: none;
    text-align: left;

    overflow: hidden;
    isolation: isolate;

    backdrop-filter: blur(34px) saturate(1.42) contrast(1.06);
    -webkit-backdrop-filter: blur(34px) saturate(1.42) contrast(1.06);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}

.group-card::before {
    content: "";
    position: absolute;
    inset: 1px;

    border-radius: calc(var(--radius-lg) - 1px);

    background:
        linear-gradient(
            128deg,
            rgba(255, 255, 255, 0.62) 0%,
            rgba(255, 255, 255, 0.22) 20%,
            rgba(255, 255, 255, 0.035) 46%,
            rgba(23, 63, 115, 0.055) 100%
        );

    pointer-events: none;
    z-index: -1;
}

.group-card::after {
    content: "";
    position: absolute;
    right: -72px;
    bottom: -90px;

    width: 230px;
    height: 230px;
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(23, 63, 115, 0.12) 0%,
            rgba(23, 63, 115, 0.07) 34%,
            transparent 70%
        );

    filter: blur(8px);
    opacity: 0.85;
    pointer-events: none;
    z-index: -1;
}

.group-card:hover,
.group-card:focus-visible {
    transform: translateY(-7px);
    border-color: rgba(23, 63, 115, 0.34);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.46) 0%,
            rgba(255, 250, 242, 0.24) 44%,
            rgba(255, 255, 255, 0.15) 100%
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 0 32px rgba(255, 255, 255, 0.14),
        0 28px 62px rgba(69, 52, 35, 0.20),
        0 12px 26px rgba(23, 63, 115, 0.10);

    outline: none;
}

.group-card > * {
    position: relative;
    z-index: 1;
}

.group-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 56px;
    height: 48px;
    margin-bottom: 34px;

    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.34);

    background:
        linear-gradient(
            145deg,
            rgba(45, 96, 153, 0.98) 0%,
            rgba(23, 63, 115, 0.98) 52%,
            rgba(15, 47, 89, 0.98) 100%
        );

    color: #ffffff;
    font-size: 24px;
    font-weight: 700;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 12px 24px rgba(23, 63, 115, 0.28);
}

.group-title {
    display: block;
    margin-bottom: 18px;

    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1;

    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.group-desc {
    display: block;
    padding-right: 70px;

    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.35;
}

.group-arrow {
    position: absolute;
    right: 34px;
    bottom: 34px;

    width: 56px;
    height: 56px;

    border-radius: 50%;
    border: 1px solid rgba(23, 63, 115, 0.42);

    color: var(--accent);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 32px;
    line-height: 1;

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.12));

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        inset 0 0 18px rgba(255, 255, 255, 0.12),
        0 10px 22px rgba(69, 52, 35, 0.11);

    backdrop-filter: blur(18px) saturate(1.28);
    -webkit-backdrop-filter: blur(18px) saturate(1.28);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.group-card:hover .group-arrow,
.group-card:focus-visible .group-arrow {
    background:
        linear-gradient(145deg, var(--accent-light), var(--accent));
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.36);
    transform: translateX(3px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 14px 30px rgba(23, 63, 115, 0.26);
}

/* ===== СОГЛАШЕНИЯ ===== */

.agreement {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 20;
}

.agreement-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 14px 28px;

    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.66);

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 250, 242, 0.16));

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        inset 0 0 20px rgba(255, 255, 255, 0.12),
        0 14px 34px rgba(69, 52, 35, 0.14);

    backdrop-filter: blur(28px) saturate(1.36) contrast(1.05);
    -webkit-backdrop-filter: blur(28px) saturate(1.36) contrast(1.05);

    color: var(--accent);
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;

    overflow: hidden;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.agreement-button:hover,
.agreement-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(23, 63, 115, 0.30);

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.50), rgba(255, 250, 242, 0.22));

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 0 24px rgba(255, 255, 255, 0.16),
        0 18px 42px rgba(69, 52, 35, 0.16);

    outline: none;
}

.agreement-icon {
    font-size: 22px;
    line-height: 1;
}

.agreement-menu {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);

    width: min(360px, calc(100vw - 36px));
    padding: 10px;

    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.44), rgba(255, 250, 242, 0.20));

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 0 28px rgba(255, 255, 255, 0.12),
        0 22px 56px rgba(69, 52, 35, 0.18);

    backdrop-filter: blur(32px) saturate(1.42) contrast(1.06);
    -webkit-backdrop-filter: blur(32px) saturate(1.42) contrast(1.06);

    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(8px);

    overflow: hidden;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;
}

.agreement-menu::before {
    content: "";
    position: absolute;
    inset: 1px;

    border-radius: 23px;

    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.58), transparent 36%, rgba(23, 63, 115, 0.04));

    pointer-events: none;
}

.agreement-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.agreement-menu a {
    position: relative;
    z-index: 1;

    display: block;
    padding: 12px 14px;

    border-radius: 16px;

    color: var(--text-main);
    text-align: center;
    text-decoration: none;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.agreement-menu a:hover,
.agreement-menu a:focus-visible {
    background: rgba(23, 63, 115, 0.10);
    color: var(--accent);
    transform: translateY(-1px);
    outline: none;
}

/* ===== СКРЫТИЕ СТАРЫХ ЭЛЕМЕНТОВ ===== */

body > footer,
.agreements-widget {
    display: none !important;
}

.buttons,
.button-group,
.particles {
    display: none !important;
}

/* ===== TELEGRAM BUTTON ===== */

.telegram-button {
    color: var(--accent) !important;

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 250, 242, 0.16)) !important;

    border: 1px solid rgba(255, 255, 255, 0.66) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        inset 0 0 20px rgba(255, 255, 255, 0.12),
        0 14px 34px rgba(69, 52, 35, 0.14) !important;

    backdrop-filter: blur(28px) saturate(1.36) contrast(1.05) !important;
    -webkit-backdrop-filter: blur(28px) saturate(1.36) contrast(1.05) !important;

    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.telegram-button:hover {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.50), rgba(255, 250, 242, 0.22)) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 0 24px rgba(255, 255, 255, 0.16),
        0 18px 42px rgba(69, 52, 35, 0.16) !important;

    transform: translateY(-2px) !important;
}

/* ===== АДАПТИВ ===== */
/* ===== АДАПТИВ ===== */

@media (max-width: 768px) {
    :root {
        --bg-line-opacity: 0.42;
        --radius-xl: 30px;
        --radius-lg: 24px;
    }

    .page {
        padding: 18px;
    }

    .bg-illustration {
        background-position: center, center bottom;
        background-size: 100% 100%, 1120px auto;
    }

    .bg-illustration::after {
        display: none;
    }

    .logo {
        font-size: 20px;
        letter-spacing: -0.03em;
    }

    .admin-button {
        min-width: 112px;
        min-height: 48px;
        padding: 13px 18px;
        font-size: 14px;

        backdrop-filter: blur(30px) saturate(1.42) contrast(1.06);
        -webkit-backdrop-filter: blur(30px) saturate(1.42) contrast(1.06);
    }

    .admin-icon {
        width: 22px;
        height: 22px;
        font-size: 16px;
    }

    .admin-menu {
        width: min(260px, calc(100vw - 36px));
        border-radius: 24px;

        backdrop-filter: blur(32px) saturate(1.44) contrast(1.06);
        -webkit-backdrop-filter: blur(32px) saturate(1.44) contrast(1.06);
    }

    .main {
        align-items: flex-start;
        padding-top: 70px;
        padding-bottom: 100px;
    }

    .choice-panel {
        padding: 32px 20px 28px;
        border-radius: 30px;

        backdrop-filter: blur(30px) saturate(1.36) contrast(1.05);
        -webkit-backdrop-filter: blur(30px) saturate(1.36) contrast(1.05);
    }

    .choice-panel::before {
        border-radius: 29px;
    }

    .panel-badge {
        margin-bottom: 22px;
        padding: 10px 15px;
        font-size: 13px;
    }

    .choice-panel h1 {
        font-size: 42px;
        letter-spacing: -0.055em;
    }

    .panel-text {
        font-size: 16px;
        margin: 18px auto 30px;
    }

    .group-cards {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .group-card {
        min-height: 180px;
        padding: 24px;

        backdrop-filter: blur(28px) saturate(1.34) contrast(1.04);
        -webkit-backdrop-filter: blur(28px) saturate(1.34) contrast(1.04);
    }

    .group-index {
        min-width: 50px;
        height: 44px;
        margin-bottom: 28px;
        font-size: 21px;
    }

    .group-title {
        font-size: 34px;
    }

    .group-desc {
        font-size: 15px;
    }

    .group-arrow {
        right: 24px;
        bottom: 24px;
        width: 48px;
        height: 48px;
        font-size: 27px;
    }

    .agreement {
        width: calc(100% - 36px);
        max-width: 460px;
    }

    .agreement-button {
        width: 100%;
        padding: 13px 18px;
        font-size: 14px;
    }

    .agreement-menu {
        width: 100%;
    }

    .telegram-button {
        bottom: 74px !important;
        right: 18px !important;
    }
}

@media (max-width: 380px) {
    .page {
        padding-inline: 14px;
    }

    .topbar {
        gap: 10px;
    }

    .choice-panel {
        padding-inline: 16px;
    }

    .choice-panel h1 {
        font-size: 38px;
    }

    .group-title {
        font-size: 31px;
    }

    .admin-button {
        min-width: 52px;
        min-height: 48px;
        padding: 13px 15px;
    }

    .admin-button span:last-child {
        display: none;
    }

    .admin-icon {
        width: 22px;
        height: 22px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
