:root {
    --bg-dark: #111111;
    --bg-light: #5b4f42;
    --text-dark: #0f0f0f;
    --text-light: #ffffff;
    --accent: #d7b98c;
    --accent-soft: #f4e3c9;
    --earth: #3a3028;
    --cream: #fff7ea;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--earth);
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: var(--earth);
    color: var(--text-dark);
    text-align: center;
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

.language-page {
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 18%, rgba(244, 227, 201, 0.28), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(215, 185, 140, 0.26), transparent 24%),
        linear-gradient(145deg, #4f4438 0%, #342b24 48%, #1f1a16 100%);
    color: var(--cream);
}

.language-shell {
    width: 100%;
    height: 100vh;
    height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: max(28px, env(safe-area-inset-top)) 28px max(28px, env(safe-area-inset-bottom));
    position: relative;
    overflow: hidden;
}

.language-shell::before,
.language-shell::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 247, 234, 0.16);
    border-radius: 999px;
    pointer-events: none;
}

.language-shell::before {
    width: 420px;
    height: 420px;
    top: -150px;
    left: -130px;
}

.language-shell::after {
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: -130px;
}

.language-card {
    width: min(100%, 560px);
    padding: 42px;
    border: 1px solid rgba(255, 247, 234, 0.22);
    border-radius: 32px;
    background: rgba(48, 40, 33, 0.72);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    position: relative;
    z-index: 1;
}

.brand-mark {
    width: 108px;
    height: 108px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    background: linear-gradient(145deg, rgba(255, 247, 234, 0.96), rgba(215, 185, 140, 0.88));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.brand-mark img {
    width: 70%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.language-card h1 {
    margin: 0;
    color: var(--cream);
    font-size: clamp(42px, 9vw, 72px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.language-intro {
    margin: 18px auto 30px;
    max-width: 360px;
    color: rgba(255, 247, 234, 0.78);
    font-size: 17px;
    line-height: 1.55;
}

.language-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.language-button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 247, 234, 0.22);
    border-radius: 20px;
    color: var(--cream);
    text-decoration: none;
    background: rgba(255, 247, 234, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.language-button:hover,
.language-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 247, 234, 0.55);
    background: rgba(255, 247, 234, 0.14);
    outline: none;
}

.language-button.primary {
    background: linear-gradient(135deg, var(--cream), var(--accent));
    color: var(--earth);
    border-color: transparent;
}

.language-name {
    font-size: 20px;
    font-weight: 800;
}

.language-note {
    font-size: 13px;
    opacity: 0.76;
}

.menu-container {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: var(--bg-light);
    padding: 0;
    position: relative;
}

.long-menu-image {
    width: 100%;
    max-width: 860px;
    height: auto;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.12);
}

.back-link {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 5;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--cream);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    background: rgba(58, 48, 40, 0.84);
    border: 1px solid rgba(255, 247, 234, 0.24);
    backdrop-filter: blur(10px);
}

.back-link:active {
    transform: scale(0.98);
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-inner {
    position: relative;
    width: auto;
    max-width: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.popup-img {
    display: block;
    width: auto;
    height: auto;
    max-height: 80vh;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.close-circle {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    color: #000000;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.close-circle:active {
    transform: scale(0.95);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 380px) {
    .language-shell {
        padding: max(14px, env(safe-area-inset-top)) 18px max(14px, env(safe-area-inset-bottom));
    }

    .language-card {
        padding: 24px 18px;
        border-radius: 26px;
    }

    .brand-mark {
        width: 76px;
        height: 76px;
        margin-bottom: 18px;
    }

    .language-intro {
        font-size: 15px;
        margin: 14px auto 22px;
    }

    .language-button {
        padding: 14px 16px;
    }

    .eyebrow {
        font-size: 11px;
    }

    .language-name {
        font-size: 18px;
    }

    .popup-inner {
        max-width: 80%;
    }

    .close-circle {
        width: 32px;
        height: 32px;
        font-size: 18px;
        top: -12px;
        right: -12px;
    }
}
