:root {
    --navy: #102f46;
    --navy-deep: #092236;

    --cream: #f4ead8;

    --gold: #d8a653;
    --gold-light: #f0cf8c;
    --gold-dark: #a97327;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    background: #102f46;
}


/* =========================================================
   ОСНОВА
   ========================================================= */

.start-screen {
    position: relative;

    width: 100vw;
    height: 100dvh;

    overflow: hidden;

    background:
        url("main_menu_winter.png")
        center center / cover
        no-repeat;
}


/* Затемнение не выбеливает город.
   Оно только помогает меню и заголовку. */

.start-screen__shade {
    position: absolute;
    inset: 0;

    z-index: 1;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(4, 22, 39, .16) 0%,
            rgba(5, 25, 43, .03) 42%,
            rgba(5, 23, 38, .09) 67%,
            rgba(4, 20, 34, .24) 100%
        );
}


/* =========================================================
   ФИРМЕННЫЙ БЛОК
   ========================================================= */

.start-brand {
    position: absolute;

    z-index: 5;

    top: clamp(20px, 3.1vh, 38px);
    left: 50%;

    transform: translateX(-50%);

    width: min(930px, calc(100vw - 40px));

    color: var(--cream);

    text-align: center;

    text-shadow:
        0 3px 13px rgba(0, 0, 0, .50);
}


.brand-ornament {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    width: 100%;

    margin-bottom: 5px;

    color: var(--gold-light);
}


.brand-line {
    width: clamp(65px, 9vw, 145px);
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--gold-light)
        );
}

.brand-line:last-child {
    transform: scaleX(-1);
}


.brand-city {
    width: clamp(90px, 9vw, 130px);
    height: auto;

    filter:
        drop-shadow(
            0 2px 4px rgba(0, 0, 0, .28)
        );
}


.start-brand h1 {
    margin: 0;

    color: #f2ecdf;

    font-size:
        clamp(48px, 6.8vw, 104px);

    font-weight: 800;

    line-height: .91;

    letter-spacing: .035em;

    text-shadow:
        0 4px 0 rgba(26, 38, 47, .16),
        0 7px 20px rgba(0, 0, 0, .38);
}


.brand-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    margin-top: 10px;
}


.brand-subtitle span {
    width: clamp(35px, 5vw, 80px);
    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--gold)
        );
}

.brand-subtitle span:last-child {
    transform: scaleX(-1);
}


.brand-subtitle p {
    margin: 0;

    color: #f3e5ca;

    font-size:
        clamp(15px, 1.55vw, 24px);

    font-weight: 500;

    letter-spacing: .025em;

    white-space: nowrap;
}


/* =========================================================
   ЦЕНТРАЛЬНОЕ МЕНЮ
   ========================================================= */

.start-menu {
    position: absolute;

    z-index: 6;

    left: 50%;
    top: 53%;

    transform:
        translate(-50%, -50%);

    width:
        min(390px, calc(100vw - 38px));

    display: flex;
    flex-direction: column;

    gap: 10px;
}


.start-menu-button {
    position: relative;

    width: 100%;
    min-height: 57px;

    display: grid;

    grid-template-columns:
        54px 1fr 54px;

    align-items: center;

    padding: 0 16px;

    color: #f4eee2;

    background:
        linear-gradient(
            180deg,
            rgba(17, 53, 76, .94),
            rgba(9, 35, 54, .95)
        );

    border:
        1px solid rgba(225, 183, 107, .64);

    border-radius: 8px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 7px 20px rgba(0, 0, 0, .26);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    text-decoration: none;

    font-size: 20px;
    font-weight: 500;

    cursor: pointer;

    transition:
        transform .14s ease,
        border-color .14s ease,
        filter .14s ease;
}


.start-menu-button span:nth-child(2) {
    grid-column: 2;

    text-align: center;
}


.start-menu-button:hover {
    transform: translateY(-1px);

    filter: brightness(1.08);

    border-color:
        rgba(239, 199, 125, .90);
}


.start-menu-button--primary {
    color: #fff7e9;

    background:
        linear-gradient(
            180deg,
            #c8923d,
            #9c6826
        );

    border-color:
        rgba(246, 211, 144, .91);

    box-shadow:
        inset 0 1px 0 rgba(255, 241, 205, .42),
        0 8px 24px rgba(78, 48, 13, .35);
}


.menu-symbol {
    grid-column: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ecd4a4;

    font-size: 27px;
    font-weight: 400;
}


/* =========================================================
   НИЖНЯЯ ПЛАШКА
   ========================================================= */

.start-service {
    position: absolute;

    z-index: 8;

    left: 50%;
    bottom: 18px;

    transform: translateX(-50%);

    width:
        min(720px, calc(100vw - 34px));

    padding:
        10px 22px 9px;

    color: #f3eadc;

    background:
        linear-gradient(
            180deg,
            rgba(14, 47, 69, .94),
            rgba(8, 35, 54, .95)
        );

    border:
        1px solid rgba(216, 166, 83, .70);

    border-radius: 15px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 12px 35px rgba(0,0,0,.30);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


.service-main {
    display: grid;

    grid-template-columns:
        1fr 1px 1fr 1px 1fr;

    align-items: center;

    min-height: 54px;
}


.service-divider {
    width: 1px;
    height: 33px;

    background:
        rgba(223, 184, 113, .43);
}


.service-item {
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    margin: 0;
    padding: 0 12px;

    color: #f5ebda;

    background: transparent;

    border: 0;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        color .14s ease,
        background .14s ease;
}


.service-item:hover {
    color: #fff;

    background:
        rgba(255,255,255,.045);
}


.service-icon {
    width: 25px;

    color: #ebca8b;

    font-size: 21px;
    line-height: 1;

    text-align: center;
}


.service-legal {
    min-height: 27px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 11px;

    padding-top: 7px;

    border-top:
        1px solid rgba(255,255,255,.09);

    color:
        rgba(239, 232, 220, .76);

    font-size: 11px;
}


.service-legal button {
    margin: 0;
    padding: 0;

    color: inherit;
    background: transparent;

    border: 0;

    font-size: inherit;

    cursor: pointer;
}


.service-legal button:hover {
    color: #fff;
    text-decoration: underline;
}


/* =========================================================
   СООБЩЕНИЕ
   ========================================================= */

.start-toast {
    position: absolute;

    z-index: 20;

    left: 50%;
    bottom: 135px;

    transform:
        translate(-50%, 10px);

    max-width:
        min(500px, calc(100vw - 34px));

    padding:
        10px 17px;

    color: #fff;

    background:
        rgba(8, 32, 49, .96);

    border:
        1px solid rgba(220, 174, 93, .68);

    border-radius: 8px;

    box-shadow:
        0 10px 30px rgba(0,0,0,.30);

    font-size: 13px;
    font-weight: 600;

    text-align: center;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity .16s ease,
        transform .16s ease;
}


.start-toast.is-visible {
    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* =========================================================
   МОБИЛЬНЫЙ
   ========================================================= */

@media (max-width: 700px) {

    .start-screen {
        background-position: center center;
    }

    .start-brand {
        top: 20px;
    }

    .brand-ornament {
        margin-bottom: 3px;
    }

    .start-brand h1 {
        font-size:
            clamp(39px, 12vw, 58px);
    }

    .brand-subtitle {
        gap: 7px;
        margin-top: 7px;
    }

    .brand-subtitle p {
        font-size: 12px;
    }

    .brand-subtitle span {
        width: 20px;
    }

    .start-menu {
        top: 50%;

        width:
            min(320px, calc(100vw - 30px));
    }

    .start-menu-button {
        min-height: 49px;

        grid-template-columns:
            40px 1fr 40px;

        font-size: 16px;
    }

    .menu-symbol {
        font-size: 22px;
    }

    .start-service {
        bottom: 9px;

        width:
            calc(100vw - 18px);

        padding:
            7px 8px 7px;
    }

    .service-main {
        min-height: 44px;
    }

    .service-item {
        height: 42px;

        gap: 5px;

        padding: 0 5px;

        font-size: 12px;
    }

    .service-icon {
        display: none;
    }

    .service-divider {
        height: 26px;
    }

    .service-legal {
        gap: 5px;

        font-size: 9px;
    }

    .start-toast {
        bottom: 105px;
    }

}


/* Невысокие ноутбуки */

@media (max-height: 760px) and (min-width: 701px) {

    .start-brand {
        top: 14px;
    }

    .brand-city {
        width: 82px;
    }

    .start-brand h1 {
        font-size: 54px;
    }

    .brand-subtitle {
        margin-top: 6px;
    }

    .brand-subtitle p {
        font-size: 15px;
    }

    .start-menu {
        top: 51%;
        width: 340px;

        gap: 7px;
    }

    .start-menu-button {
        min-height: 47px;

        font-size: 17px;
    }

    .start-service {
        bottom: 10px;

        padding-top: 6px;
        padding-bottom: 6px;
    }

}

/* START BRAND FINAL */

.start-brand {
    position: absolute !important;
    z-index: 5 !important;

    top: 14px !important;
    left: 50% !important;

    transform: translateX(-50%) !important;

    width: min(900px, calc(100vw - 40px)) !important;

    margin: 0 !important;
    padding: 0 !important;
}

.start-brand-image {
    display: block !important;

    width: 100% !important;
    height: auto !important;

    margin: 0 auto !important;

    object-fit: contain !important;

    filter:
        drop-shadow(0 4px 10px rgba(0,0,0,.28));
}

@media (max-width: 700px) {
    .start-brand {
        top: 10px !important;
        width: calc(100vw - 20px) !important;
    }
}

/* END BRAND FINAL */

/* MAIN MENU MODALS START */

body.modal-open {
    overflow: hidden;
}

.game-modal {
    position: fixed;
    inset: 0;

    z-index: 100;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 24px;
}

.game-modal.is-open {
    display: flex;
}

.game-modal__backdrop {
    position: absolute;
    inset: 0;

    background:
        rgba(4, 18, 31, .66);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.game-modal__panel {
    position: relative;

    z-index: 2;

    width:
        min(650px, calc(100vw - 36px));

    max-height:
        calc(100dvh - 48px);

    overflow-y: auto;

    padding:
        30px 32px 27px;

    color: #183247;

    background:
        rgba(250, 249, 246, .97);

    border:
        1px solid
        rgba(218, 175, 96, .72);

    border-radius: 15px;

    box-shadow:
        0 24px 70px
        rgba(0, 0, 0, .37);
}

.game-modal__panel--small {
    width:
        min(470px, calc(100vw - 36px));
}

.game-modal__close {
    position: absolute;

    top: 11px;
    right: 14px;

    width: 34px;
    height: 34px;

    padding: 0;

    color: #6d7880;
    background: transparent;

    border: 0;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}

.game-modal__eyebrow {
    margin-bottom: 5px;

    color: #ae7b2d;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: .08em;
}

.game-modal h2 {
    margin:
        0 38px 14px 0;

    color: #17334a;

    font-size: 25px;
    line-height: 1.2;
}

.game-modal p {
    margin:
        0 0 12px;

    color: #657582;

    font-size: 15px;
    line-height: 1.55;
}

.game-modal__note {
    font-size: 13px !important;
    color: #89949c !important;
}

.game-modal__about-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    margin-top: 21px;
}

.game-modal__about-grid > div {
    padding: 15px 16px;

    background: #f3f5f5;

    border:
        1px solid #e1e6e8;

    border-radius: 9px;
}

.game-modal__about-grid strong {
    display: block;

    margin-bottom: 5px;

    color: #17334a;

    font-size: 14px;
}

.game-modal__about-grid span {
    display: block;

    color: #6e7d88;

    font-size: 13px;
    line-height: 1.45;
}

.game-modal__actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;
}

.game-modal__actions form {
    margin: 0;
}

.game-modal__primary,
.game-modal__secondary {
    min-height: 42px;

    padding:
        0 18px;

    border-radius: 7px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.game-modal__primary {
    color: #fff;

    background:
        linear-gradient(
            180deg,
            #c99742,
            #a8752c
        );

    border:
        1px solid #a8752c;
}

.game-modal__secondary {
    color: #536675;

    background: #fff;

    border:
        1px solid #d6dde1;
}


/* Три пункта вместо четырёх:
   центр меню слегка опускаем,
   чтобы композиция не стала слишком верхней. */

.start-menu {
    top: 55% !important;
}


@media (max-width: 700px) {

    .game-modal {
        padding: 14px;
    }

    .game-modal__panel {
        width: 100%;

        padding:
            25px 20px 21px;
    }

    .game-modal__about-grid {
        grid-template-columns: 1fr;
    }

    .game-modal__actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .game-modal__actions form,
    .game-modal__primary,
    .game-modal__secondary {
        width: 100%;
    }

}

/* MAIN MENU MODALS END */

/* =========================================================
   MAIN MENU BUTTONS — GAME STYLE V2
   ========================================================= */

.start-menu {
    gap: 12px !important;
    width: min(410px, calc(100vw - 38px)) !important;
}

.start-menu-button {
    position: relative !important;

    min-height: 64px !important;

    grid-template-columns:
        66px 1fr 66px !important;

    padding: 0 16px !important;

    color: #f5eee1 !important;

    background:
        linear-gradient(
            180deg,
            #153d59 0%,
            #0b2d45 55%,
            #08263b 100%
        ) !important;

    border:
        2px solid #bf8b3d !important;

    border-radius: 11px !important;

    box-shadow:
        inset 0 0 0 2px rgba(9, 29, 43, .92),
        inset 0 0 0 3px rgba(233, 188, 106, .35),
        inset 0 1px 0 rgba(255,255,255,.11),
        0 5px 0 rgba(4, 19, 29, .56),
        0 9px 20px rgba(0,0,0,.28) !important;

    font-size: 22px !important;
    font-weight: 500 !important;

    text-shadow:
        0 2px 2px rgba(0,0,0,.42);

    transition:
        transform .12s ease,
        filter .12s ease,
        box-shadow .12s ease !important;
}


/* Внутренняя тонкая золотая рамка */

.start-menu-button::before {
    content: "";

    position: absolute;
    inset: 5px;

    border:
        1px solid rgba(238, 196, 119, .36);

    border-radius: 6px;

    pointer-events: none;
}


/* Основная золотая кнопка */

.start-menu-button--primary {
    color: #fff7e7 !important;

    background:
        linear-gradient(
            180deg,
            #c58b2f 0%,
            #aa7023 52%,
            #8d5818 100%
        ) !important;

    border-color:
        #e2b65f !important;

    box-shadow:
        inset 0 0 0 2px rgba(89, 50, 10, .82),
        inset 0 0 0 3px rgba(255, 221, 148, .42),
        inset 0 1px 0 rgba(255, 247, 220, .42),
        0 5px 0 rgba(70, 40, 9, .70),
        0 10px 23px rgba(50, 29, 7, .34) !important;
}

.start-menu-button--primary::before {
    border-color:
        rgba(255, 229, 169, .48);
}


/* Иконки */

.menu-symbol {
    grid-column: 1 !important;

    color: #efd5a0 !important;

    font-size: 32px !important;
    font-weight: 400 !important;

    text-shadow:
        0 2px 2px rgba(0,0,0,.38);
}

.start-menu-button--primary .menu-symbol {
    color: #fff1ca !important;
}


/* Текст строго по центру */

.start-menu-button > span:nth-child(2) {
    grid-column: 2 !important;

    text-align: center !important;
}


/* Hover */

.start-menu-button:hover {
    transform: translateY(-2px) !important;

    filter: brightness(1.08) !important;
}

.start-menu-button:active {
    transform: translateY(1px) !important;

    box-shadow:
        inset 0 0 0 2px rgba(9, 29, 43, .92),
        inset 0 0 0 3px rgba(233, 188, 106, .32),
        0 2px 0 rgba(4, 19, 29, .60),
        0 5px 12px rgba(0,0,0,.22) !important;
}


/* Mobile */

@media (max-width: 700px) {

    .start-menu {
        width:
            min(330px, calc(100vw - 28px)) !important;

        gap: 9px !important;
    }

    .start-menu-button {
        min-height: 54px !important;

        grid-template-columns:
            48px 1fr 48px !important;

        font-size: 17px !important;
    }

    .menu-symbol {
        font-size: 25px !important;
    }
}


/* MAIN MENU WIDTH REDUCTION */

.start-menu {
    width: min(280px, calc(100vw - 38px)) !important;
}

@media (max-width: 700px) {
    .start-menu {
        width: min(260px, calc(100vw - 28px)) !important;
    }
}


/* MAIN MENU WIDTH — 25% REDUCTION */

.start-menu {
    width: min(308px, calc(100vw - 38px)) !important;
}

@media (max-width: 700px) {
    .start-menu {
        width: min(248px, calc(100vw - 28px)) !important;
    }
}


/* =========================================================
   LOWER SERVICE PANEL — COMPACT V2
   ========================================================= */

.start-service {
    width: min(560px, calc(100vw - 34px)) !important;

    padding:
        7px 18px 7px !important;

    border-radius: 13px !important;
}

.service-main {
    min-height: 44px !important;
}

.service-item {
    height: 40px !important;

    gap: 8px !important;

    padding:
        0 10px !important;

    font-size: 14px !important;
    font-weight: 600 !important;
}

.service-divider {
    height: 26px !important;
}

.service-icon {
    width: 21px !important;

    font-size: 18px !important;
}

.service-legal {
    min-height: 22px !important;

    padding-top: 5px !important;

    gap: 8px !important;

    font-size: 10px !important;
}

@media (max-width: 700px) {

    .start-service {
        width:
            calc(100vw - 18px) !important;

        padding:
            6px 8px !important;
    }

    .service-main {
        min-height: 40px !important;
    }

    .service-item {
        height: 38px !important;

        font-size: 12px !important;
    }

}


/* SERVICE ICONS V2 */

.service-icon {
    width: 30px !important;
    height: 30px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    color: #f0c873 !important;
}

.service-icon svg {
    width: 27px;
    height: 27px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* SERVICE LEGAL FONT SIZE V4 */

.service-legal {
    font-size: 14px !important;
}

@media (max-width: 700px) {
    .service-legal {
        font-size: 11px !important;
    }
}

