/* Статические мировые локации, их темы, карточки и мобильная раскладка. */

/* Общий каркас сцены локации. */
.scene {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px 15px 0 0;
    background: #17202a;
    transition: background 0.35s;
}

.scene::before,
.scene::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Затемняет левую и нижнюю части сцены для читаемости текста. */
.scene::after {
    background:
        linear-gradient(
            90deg,
            #080b10e8 0%,
            #080b10a8 46%,
            transparent 80%
        ),
        linear-gradient(
            0deg,
            #080b10d8,
            transparent 55%
        );
}

/* Тема замка героев. */
.castle-theme {
    background:
        radial-gradient(
            circle at 78% 25%,
            #d5a95c38,
            transparent 16%
        ),
        linear-gradient(
            125deg,
            #101821 30%,
            #283341 70%,
            #171c23
        );
}

/* Рисует условный силуэт замка без изображения. */
.castle-theme::before {
    display: block;
    background:
        linear-gradient(
            90deg,
            transparent 60%,
            #0004 60%
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0 70px,
            #ffffff05 71px 73px
        );
    clip-path: polygon(
        58% 27%,
        67% 27%,
        67% 12%,
        73% 12%,
        73% 31%,
        80% 31%,
        80% 7%,
        88% 7%,
        88% 35%,
        96% 35%,
        96% 100%,
        58% 100%
    );
    background-color: #11192388;
}

/* Тема поместья героя. */
.estate-theme {
    background:
        radial-gradient(
            circle at 77% 28%,
            #72a15e38,
            transparent 18%
        ),
        linear-gradient(
            125deg,
            #101813 28%,
            #2c3d32 70%,
            #171c18
        );
}

/* Рисует условные крыши поместья. */
.estate-theme::before {
    background:
        linear-gradient(
            90deg,
            transparent 61%,
            #0a100d88 61%
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0 45px,
            #ffffff05 46px 48px
        );
    clip-path: polygon(
        59% 39%,
        69% 25%,
        80% 38%,
        89% 20%,
        98% 37%,
        98% 100%,
        59% 100%
    );
    background-color: #15221a88;
}

/* Тема мистического района. */
.observatory-theme {
    background:
        radial-gradient(
            circle at 78% 24%,
            #865edb55,
            transparent 18%
        ),
        radial-gradient(
            circle at 65% 70%,
            #315f8655,
            transparent 24%
        ),
        linear-gradient(
            125deg,
            #11101b 28%,
            #302847 70%,
            #171624
        );
}

.far-journeys-theme {
    background:
        radial-gradient(circle at 18% 26%, #2d739048, transparent 30%),
        radial-gradient(circle at 82% 18%, #bd8b4336, transparent 34%),
        linear-gradient(145deg, #0a1015, #17202a 58%, #090c10);
}

/* Рисует башни и шпили мистического района. */
.observatory-theme::before {
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 55px,
            #ffffff06 56px 58px
        );
    clip-path: polygon(
        58% 38%,
        64% 38%,
        64% 22%,
        68% 22%,
        68% 38%,
        73% 38%,
        78% 16%,
        83% 38%,
        88% 38%,
        88% 28%,
        93% 28%,
        93% 100%,
        58% 100%
    );
    background-color: #171126aa;
}

.observatory-theme .scene-light {
    background: #885edb55;
}

.observatory-theme .location-mark {
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* Тема торгового квартала. */
.shop_district-theme {
    background:
        radial-gradient(
            circle at 78% 24%,
            #d59a4455,
            transparent 18%
        ),
        linear-gradient(
            125deg,
            #17130f 28%,
            #4a3623 70%,
            #211812
        );
}

/* Условные силуэты торговых зданий. */
.shop_district-theme::before {
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 55px,
            #ffffff06 56px 58px
        );

    clip-path: polygon(
        58% 42%,
        64% 42%,
        64% 30%,
        72% 30%,
        72% 38%,
        80% 38%,
        80% 22%,
        88% 22%,
        88% 35%,
        96% 35%,
        96% 100%,
        58% 100%
    );

    background-color: #21170faa;
}

/* Золотистое свечение торгового квартала. */
.shop_district-theme .scene-light {
    background: #d59a4455;
}

/* Эмблема торгового квартала. */
.shop_district-theme .location-mark {
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* Тема кузницы: раскалённый металл, уголь и печное свечение. */
.great_forge-theme {
    background:
        radial-gradient(
            circle at 78% 30%,
            #e163304f,
            transparent 18%
        ),
        radial-gradient(
            circle at 66% 82%,
            #8f311f38,
            transparent 24%
        ),
        linear-gradient(
            125deg,
            #15100e 28%,
            #4b2920 70%,
            #211412
        );
}

/* Силуэт печей, труб и кузнечного цеха. */
.great_forge-theme::before {
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 48px,
            #ffb36b08 49px 51px
        );
    clip-path: polygon(
        57% 44%,
        64% 44%,
        64% 25%,
        69% 25%,
        69% 43%,
        75% 43%,
        82% 31%,
        89% 43%,
        94% 43%,
        94% 18%,
        98% 18%,
        98% 100%,
        57% 100%
    );
    background-color: #1b0d09b8;
}

.great_forge-theme .scene-light {
    background: #e35f315c;
}

/* Тема учебного полигона: сталь, пыль и красные боевые знамёна. */
.improve_stats-theme {
    background:
        radial-gradient(
            circle at 76% 25%,
            #bd554044,
            transparent 19%
        ),
        radial-gradient(
            circle at 68% 78%,
            #76644738,
            transparent 25%
        ),
        linear-gradient(
            125deg,
            #111419 28%,
            #3a3432 70%,
            #1b1b1d
        );
}

/* Силуэт частокола и тренировочных башен. */
.improve_stats-theme::before {
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 42px,
            #ffffff07 43px 45px
        );
    clip-path: polygon(
        57% 47%,
        62% 47%,
        62% 30%,
        67% 22%,
        72% 30%,
        72% 47%,
        79% 47%,
        79% 34%,
        84% 27%,
        89% 34%,
        89% 47%,
        98% 47%,
        98% 100%,
        57% 100%
    );
    background-color: #17191db0;
}

.improve_stats-theme .scene-light {
    background: #b64d3e42;
}

/* Тема таверны: тёплый свет, дерево и вечерний уют. */
.tavern-theme {
    background:
        radial-gradient(
            circle at 78% 29%,
            #e8a64b52,
            transparent 17%
        ),
        radial-gradient(
            circle at 67% 76%,
            #8b462f3d,
            transparent 25%
        ),
        linear-gradient(
            125deg,
            #17110e 28%,
            #4c3525 70%,
            #241813
        );
}

/* Силуэт таверны с крышей и печной трубой. */
.tavern-theme::before {
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 38px,
            #ffd99b08 39px 41px
        );
    clip-path: polygon(
        57% 48%,
        65% 48%,
        74% 29%,
        84% 48%,
        90% 48%,
        90% 27%,
        94% 27%,
        94% 48%,
        98% 48%,
        98% 100%,
        57% 100%
    );
    background-color: #1b100ab5;
}

.tavern-theme .scene-light {
    background: #e5a14d52;
}

/* Тема обители магов: холодные кубы и фиолетовое зачарование. */
.mage_home-theme {
    background:
        radial-gradient(
            circle at 79% 23%,
            #4bcbd755,
            transparent 17%
        ),
        radial-gradient(
            circle at 68% 76%,
            #8e4fc550,
            transparent 25%
        ),
        linear-gradient(
            125deg,
            #0e131b 28%,
            #273953 66%,
            #241b36
        );
}

/* Силуэт магических башен и центрального шпиля. */
.mage_home-theme::before {
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 52px,
            #bffcff08 53px 55px
        );
    clip-path: polygon(
        57% 44%,
        63% 44%,
        63% 28%,
        68% 20%,
        73% 28%,
        73% 44%,
        78% 44%,
        84% 14%,
        90% 44%,
        98% 44%,
        98% 100%,
        57% 100%
    );
    background-color: #101523b8;
}

.mage_home-theme .scene-light {
    background: #5acbd650;
}

/* Тема отдельного здания обсерватории. */
.observatory-building-theme {
    background:
        radial-gradient(
            circle at 81% 19%,
            #ddd4ff70 0 2px,
            transparent 3px
        ),
        radial-gradient(
            circle at 70% 34%,
            #8d72df58,
            transparent 18%
        ),
        radial-gradient(
            circle at 86% 62%,
            #3e75a547,
            transparent 22%
        ),
        linear-gradient(
            125deg,
            #0e101b 28%,
            #252847 68%,
            #151527
        );
}

/* Силуэт купола обсерватории и башни телескопа. */
.observatory-building-theme::before {
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 50px,
            #ffffff07 51px 53px
        );
    clip-path: polygon(
        57% 48%,
        64% 48%,
        68% 34%,
        74% 27%,
        80% 34%,
        84% 48%,
        88% 48%,
        88% 22%,
        93% 22%,
        93% 48%,
        98% 48%,
        98% 100%,
        57% 100%
    );
    background-color: #111224b8;
}

.observatory-building-theme .scene-light {
    background: #8671d94d;
}

/* Большое размытое свечение внутри сцены. */
.scene-light {
    position: absolute;
    top: 6%;
    right: 10%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: #e8bd7140;
    filter: blur(70px);
}

.estate-theme .scene-light {
    background: #80b06b38;
}

/* Содержимое сцены: эмблема, заголовок и описание. */
.scene-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 28px;
    min-height: 0;
    max-width: 720px;
    padding: 30px 48px 34px;
}

/* Главное эмодзи локации без рамки и декоративного круга. */
.location-mark {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 65px;
    line-height: 1;
}

.estate-theme .location-mark {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.eyebrow {
    color: var(--gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.19em;
}

.location-copy h1 {
    margin: 6px 0 12px;
    font: 600 clamp(30px, 5vw, 48px) Georgia, serif;
}

/* Встроенная подпись заголовка по умолчанию скрыта и нужна только телефону. */
.title-inline-eyebrow {
    display: none;
}

.location-copy > p {
    max-width: 530px;
    margin: 0;
    color: #b1b4b8;
    font-size: 14px;
    line-height: 1.65;
}

.feature-list {
    display: none;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 19px;
}

.feature-list span {
    padding: 6px 9px;
    border: 1px solid #ffffff12;
    border-radius: 99px;
    color: #c3c6ca;
    background: #0d111788;
    font-size: 10px;
}

/* Панель выбора направления под сценой. */
.navigation-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 15px 15px;
    background: #111720;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-title div {
    display: grid;
    gap: 3px;
}

.panel-title span {
    font: 600 18px Georgia, serif;
}

.panel-title small {
    color: var(--muted);
}

.panel-title > b {
    padding: 6px 9px;
    border: 1px solid #8c6935;
    border-radius: 6px;
    color: var(--gold);
    font-size: 9px;
    letter-spacing: 0.11em;
}

/* Сетка карточек переходов. */
.location-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.location-card {
    position: relative;
    min-height: 112px;
    padding: 15px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #ffffff14;
    border-radius: 11px;
    color: var(--text);
    background:
        linear-gradient(
            145deg,
            #222b37,
            #151b24
        );
    text-align: left;
    transition: 0.18s;
}

/* Цветное свечение отдельной карточки. */
.location-card::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--glow, #ffffff0b);
    filter: blur(18px);
}

.location-card:hover {
    transform: translateY(-3px);
    border-color: #d2a85a88;
    filter: brightness(1.1);
}

.location-card.locked {
    cursor: not-allowed;
    border-color: #9b55554d;
    filter: grayscale(0.45);
    opacity: 0.62;
}

.location-card.locked:hover {
    transform: none;
    border-color: #9b55554d;
    filter: grayscale(0.45);
}

.location-card .icon {
    display: block;
    margin-bottom: 10px;
    font-size: 27px;
}

.location-card .icon img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.location-card strong {
    display: block;
    font: 600 14px Georgia, serif;
}

.location-card small {
    display: block;
    margin-top: 4px;
    color: #8f98a4;
    font-size: 10px;
}

.location-card.route {
    border-color: #c6964855;
}

.location-card.route::before {
    content: "ОТКРЫТО";
    position: absolute;
    top: 9px;
    right: 9px;
    color: #dbb36e;
    font-size: 7px;
    letter-spacing: 0.12em;
}

@media (max-width: 9999px) {
    .scene {
        min-height: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .scene-content {
        display: block;
        min-height: 0;
        padding: 22px 23px 26px;
    }

    .location-mark {
        width: auto;
        height: auto;
        margin-bottom: 12px;
        font-size: 50px;
    }

    .location-copy h1 {
        font-size: 36px;
    }

    /* В торговом квартале эмодзи и название образуют одну компактную строку. */
    .shop_district-theme .scene-content {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 14px;
        row-gap: 10px;
    }

    .shop_district-theme .location-mark {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
        font-size: 42px;
    }

    .shop_district-theme .location-copy {
        display: contents;
    }

    .shop_district-theme .location-copy h1 {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        font-size: 31px;
        line-height: 1.05;
    }

    .shop_district-theme .location-copy > p {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
    }

    .shop_district-theme .feature-list {
        grid-column: 1 / -1;
    }

    /* Таверна использует такую же компактную шапку, как торговый квартал. */
    .tavern-theme .scene-content {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 14px;
        row-gap: 10px;
    }

    .tavern-theme .location-mark {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
        font-size: 42px;
    }

    .tavern-theme .location-copy {
        display: contents;
    }

    .tavern-theme .location-copy h1 {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        font-size: 31px;
        line-height: 1.05;
    }

    .tavern-theme .location-copy > p {
        grid-column: 1 / -1;
        grid-row: 2;
        margin: 0;
    }

    .tavern-theme .feature-list {
        grid-column: 1 / -1;
    }

    /* В мистическом районе подпись заполняет место под названием рядом с эмодзи. */
    .observatory-theme .scene-content {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
        align-items: center;
        column-gap: 14px;
        row-gap: 4px;
    }

    .observatory-theme .location-mark {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        margin: 0;
        font-size: 42px;
    }

    .observatory-theme .location-copy {
        display: contents;
    }

    .observatory-theme .location-copy h1 {
        grid-column: 2;
        grid-row: 1 / 3;
        margin: 0;
        font-size: 31px;
        line-height: 1.05;
    }

    .observatory-theme .title-second-line {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .observatory-theme .title-inline-eyebrow {
        display: inline;
        color: var(--gold);
        font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 7px;
        font-weight: 800;
        line-height: 1.2;
        letter-spacing: 0.12em;
        white-space: nowrap;
        transform: translateY(1.5px);
    }

    .observatory-theme .eyebrow {
        display: none;
    }

    .observatory-theme .location-copy > p {
        grid-column: 1 / -1;
        grid-row: 3;
        margin: 8px 0 0;
    }

    .observatory-theme .feature-list {
        grid-column: 1 / -1;
    }

    /* Общая шапка мировых локаций: рубрика сверху, изображение слева, текст справа. */
    .world-location-theme .scene-content {
        display: grid;
        grid-template-columns: 82px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        align-items: center;
        column-gap: 16px;
        row-gap: 5px;
    }

    .world-location-theme .location-copy {
        display: contents;
    }

    .world-location-theme .eyebrow {
        display: block;
        grid-column: 1 / -1;
        grid-row: 1;
        margin-bottom: 8px;
    }

    .world-location-theme .location-mark {
        grid-column: 1;
        grid-row: 2 / 4;
        align-self: center;
        justify-self: center;
        margin: 0;
    }

    .world-location-theme .location-copy h1 {
        grid-column: 2;
        grid-row: 2;
        align-self: end;
        margin: 0;
        font-size: 31px;
        line-height: 1.05;
    }

    .world-location-theme .location-copy > p {
        grid-column: 2;
        grid-row: 3;
        align-self: start;
        margin: 2px 0 0;
        font-size: 12px;
        line-height: 1.4;
    }

    .world-location-theme .title-inline-eyebrow {
        display: none;
    }

    .world-location-theme .feature-list {
        grid-column: 1 / -1;
    }

    .navigation-panel {
        padding: 17px 12px;
        border: 0;
        border-radius: 0;
    }

    .location-grid {
        grid-template-columns: 1fr 1fr;
    }

    .location-card {
        min-height: 92px;
        padding: 11px 12px;
    }

    /* На телефоне эмодзи служит небольшим маркером в углу карточки. */
    .location-card .icon {
        margin-bottom: 5px;
        font-size: 20px;
        line-height: 1;
    }

    .location-card .icon img {
        display: block;
        width: 60px;
        height: 60px;
        object-fit: contain;
    }

    .location-card strong {
        font-size: 13px;
        line-height: 1.15;
    }

    .location-card small {
        margin-top: 3px;
        font-size: 9px;
        line-height: 1.25;
    }
}
