:root {
    --primary-orange: #b7784e;
    --primary-orange-light: #d3a27c;
    --primary-orange-dark: #945b38;
    --secondary-dark: #22241f;
    --bg-body: #22241f;
    --bg-card: #2b2d27;
    --bg-input: #30322c;
    --glass-bg: #2b2d27;
    --glass-border: rgba(235, 231, 220, 0.12);
    --glass-border-color: rgba(235, 231, 220, 0.12);
    --glass-blur: blur(0);
    --border-color: rgba(235, 231, 220, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.24);
    --header-bg: rgba(34, 36, 31, 0.97);
    --box-shadow-light: 0 8px 24px rgba(0, 0, 0, 0.18);
    --box-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.24);
    --radius-md: 12px;
    --radius-lg: 16px;
    --site-background: #22241f;
    --site-surface: #292b26;
    --site-card: #30322c;
    --site-border: rgba(235, 231, 220, 0.12);
    --site-muted: #c5c4bc;
    --site-accent: #d3a27c;
}

:root[data-theme="light"] {
    color-scheme: light;
    --primary-orange: #8e5737;
    --primary-orange-light: #aa704b;
    --primary-orange-dark: #75452d;
    --text-primary: #292b26;
    --text-secondary: #3f413b;
    --text-tertiary: #51524b;
    --secondary-dark: #f5f2eb;
    --bg-body: #f5f2eb;
    --bg-card: #fffdf8;
    --bg-input: #fffdf8;
    --glass-bg: #fffdf8;
    --glass-border: rgba(47, 45, 39, 0.12);
    --glass-border-color: rgba(47, 45, 39, 0.12);
    --glass-blur: blur(0);
    --border-color: rgba(47, 45, 39, 0.12);
    --shadow-color: rgba(47, 45, 39, 0.08);
    --header-bg: rgba(249, 247, 241, 0.97);
    --box-shadow-light: 0 8px 24px rgba(47, 45, 39, 0.07);
    --box-shadow-hover: 0 12px 30px rgba(47, 45, 39, 0.12);
    --site-background: #f5f2eb;
    --site-surface: #eeeae1;
    --site-card: #fffdf8;
    --site-border: rgba(47, 45, 39, 0.12);
    --site-muted: #55564f;
    --site-accent: #75452d;
    --why-chess-text: #50514b;
    --why-chess-text-color: #3f413b;
    --footer-text: #55564f;
}

:root:not([data-theme="light"]) {
    color-scheme: dark;
    --primary-orange: #d3a27c;
    --primary-orange-light: #e2b992;
    --text-primary: #f3f0e9;
    --text-secondary: #e4e0d6;
    --text-tertiary: #c5c4bc;
    --site-background: #22241f;
    --site-surface: #292b26;
    --site-card: #30322c;
    --site-muted: #c5c4bc;
    --site-accent: #d3a27c;
    --why-chess-text: #e3dfd5;
    --why-chess-text-color: #e3dfd5;
    --footer-text: #c5c4bc;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    overflow-x: clip;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--site-background);
    color: var(--text-primary, #f3f0e9);
    line-height: 1.7;
    letter-spacing: 0;
}

*,
*::before,
*::after {
    animation: none !important;
}

img {
    display: block;
    max-width: 100%;
}

:root[data-theme="light"] body {
    color: #292b26;
}

a {
    text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-orange-light);
    outline-offset: 3px;
}

.container {
    width: min(1160px, calc(100% - 40px));
    padding-left: 0;
    padding-right: 0;
}

header {
    border-bottom: 1px solid var(--site-border);
    box-shadow: none;
}

header.header-scrolled {
    box-shadow: 0 8px 22px var(--shadow-color);
}

.navbar {
    max-width: 1280px;
    padding-left: 24px;
    padding-right: 24px;
}

.logo-text {
    gap: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-link {
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.nav-cta-btn,
.mobile-contact-btn {
    background: var(--primary-orange-dark);
    border: 1px solid var(--primary-orange-dark);
    border-radius: 6px;
    box-shadow: none;
}

.nav-cta-btn:hover,
.mobile-contact-btn:hover,
.mobile-contact-btn:active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    box-shadow: none;
    transform: translateY(-1px);
}

.dropdown-menu,
.mobile-menu {
    box-shadow: 0 12px 32px var(--shadow-color);
}

.mobile-menu {
    right: 0;
    transform: translateX(105%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

.theme-toggle {
    box-shadow: none;
}

.hero,
.about-hero,
.art-hero,
.chess-hero,
.tech-hero,
.music-hero,
.speak-hero {
    isolation: isolate;
    min-height: min(720px, 88vh);
    min-height: min(720px, 88svh);
}

.hero-bg-image,
.about-hero-bg,
.art-hero-bg,
.chess-hero-bg,
.tech-hero-bg,
.music-hero-bg,
.speak-hero-bg {
    background-attachment: scroll !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

.about-hero-bg {
    background-image: linear-gradient(90deg, rgba(28, 29, 26, 0.82), rgba(28, 29, 26, 0.34)), url("images/gallery/gallery8.jpg") !important;
}

.art-hero-bg {
    background-image: linear-gradient(90deg, rgba(28, 29, 26, 0.86), rgba(28, 29, 26, 0.36)), url("images/art/art-studio.jpg") !important;
}

.chess-hero-bg {
    background-image: linear-gradient(90deg, rgba(28, 29, 26, 0.86), rgba(28, 29, 26, 0.34)), url("images/gallery/gallery1.jpg") !important;
}

.tech-hero-bg {
    background-image: linear-gradient(90deg, rgba(17, 26, 32, 0.78), rgba(17, 26, 32, 0.2)), url("images/ict-robotics-hero.svg") !important;
}

.music-hero-bg {
    background-image: linear-gradient(90deg, rgba(28, 29, 26, 0.86), rgba(28, 29, 26, 0.38)), url("images/music/music-class.jpg") !important;
}

.speak-hero-bg {
    background-image: linear-gradient(90deg, rgba(28, 29, 26, 0.86), rgba(28, 29, 26, 0.38)), url("images/speak/speaking-class.jpg") !important;
}

.hero-overlay,
.about-hero-overlay,
.art-hero-overlay,
.chess-hero-overlay,
.tech-hero-overlay,
.music-hero-overlay,
.speak-hero-overlay {
    background: linear-gradient(90deg, rgba(24, 25, 22, 0.44), rgba(24, 25, 22, 0.08)) !important;
}

.about-hero .container,
.art-hero .container,
.chess-hero .container,
.tech-hero .container,
.music-hero .container,
.speak-hero .container {
    position: relative;
    z-index: 4;
}

.about-hero-content,
.art-hero-content,
.chess-hero-content,
.tech-hero-content,
.music-hero-content,
.speak-hero-content {
    max-width: 760px;
    margin: 0 auto 0 0;
    text-align: left;
}

.about-logo-container,
.art-logo-container,
.chess-logo-container,
.tech-logo-container,
.music-logo-container,
.speak-logo-container {
    display: none;
}

.hero h1,
.about-hero h1,
.art-hero h1,
.chess-hero h1,
.tech-hero h1,
.music-hero h1,
.speak-hero h1 {
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.035em;
    text-shadow: none;
}

.hero .orange-text,
.about-hero .orange-text,
.art-hero .orange-text,
.chess-hero .orange-text,
.tech-hero .orange-text,
.music-hero .orange-text,
.speak-hero .orange-text {
    color: #e0b18a;
}

.hero p,
.about-hero p,
.art-hero p,
.chess-hero p,
.tech-hero p,
.music-hero p,
.speak-hero p {
    max-width: 650px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
    text-shadow: none;
}

.hero .hero-eyebrow,
.hero-subtitle,
.section-subtitle,
.section-header .subtitle {
    color: var(--site-accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-bg-particles,
.about-hero-particles,
.floating-art,
.floating-tech,
.floating-speech,
.music-notes,
.glow-orb,
.logo-glow,
.art-logo-glow,
.speak-logo-glow,
.hero-scroll-hint,
.icon-bg {
    display: none !important;
}

.hero-bg-particles *,
.about-hero-particles *,
.floating-art *,
.floating-tech *,
.floating-speech *,
.music-notes *,
.glow-orb *,
.logo-glow,
.visual-icon,
.icon-bg {
    animation: none !important;
}

.chess-slide {
    display: none;
}

.chess-slide:first-child {
    display: block;
    opacity: 1;
    animation: none !important;
}

.section-title,
.section-header h2,
.section-header h3,
.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.why-chess .section-title {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.why-chess .section-title .orange-text {
    color: #f0c39a;
}

.section-header {
    margin-bottom: 38px;
}

.title-underline {
    display: none;
}

.orange-text,
.text-highlight {
    color: var(--primary-orange);
}

:is(.glass-card, .skill-card, .benefit-card, .level-card, .instrument-card, .track-card, .speak-benefit-card, .value-card, .mission-card, .impact-card, .partner-card, .contact-card, .testimonial-card, .story-card, .why-chess-card, .winwin-visual, .benefits-cta) {
    background: var(--site-card);
    border: 1px solid var(--site-border);
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

:is(.glass-card, .skill-card, .benefit-card, .level-card, .instrument-card, .track-card, .speak-benefit-card, .value-card, .mission-card, .impact-card, .partner-card, .contact-card, .testimonial-card, .story-card, .why-chess-card, .winwin-visual, .benefits-cta):hover {
    transform: none;
    border-color: var(--primary-orange);
    box-shadow: var(--box-shadow-hover);
}

.benefit-icon,
.card-icon,
.visual-icon {
    animation: none;
}

.program-card {
    border-radius: 10px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.gallery-item,
.story-image,
.music-image-content img,
.tech-intro-image img,
.art-intro-image img {
    border-radius: 10px;
}

:is(.btn, .btn-primary, .btn-secondary, .btn-cta-primary, .btn-cta-secondary, .btn-benefits, .btn-music, .btn-partner, .btn-story, .btn-direction, .nav-cta-btn, .mobile-contact-btn) {
    min-height: 44px;
    border-radius: 6px;
    box-shadow: none;
    font-weight: 600;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.hero-buttons a,
.art-hero-buttons a,
.tech-hero-buttons a,
.music-hero-buttons a,
.speak-hero-buttons a {
    min-height: 46px;
    padding: 12px 22px;
    border: 1px solid var(--primary-orange-dark);
    border-radius: 6px;
    box-shadow: none;
    font-weight: 600;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.hero-buttons a:first-child,
.art-hero-buttons a:first-child,
.tech-hero-buttons a:first-child,
.music-hero-buttons a:first-child,
.speak-hero-buttons a:first-child {
    background: var(--primary-orange-dark);
    color: #fff;
}

.hero-buttons a:last-child,
.art-hero-buttons a:last-child,
.tech-hero-buttons a:last-child,
.music-hero-buttons a:last-child,
.speak-hero-buttons a:last-child {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.62);
    color: #fff;
}

.hero-buttons a:hover,
.art-hero-buttons a:hover,
.tech-hero-buttons a:hover,
.music-hero-buttons a:hover,
.speak-hero-buttons a:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

.hero-buttons a:first-child:hover,
.art-hero-buttons a:first-child:hover,
.tech-hero-buttons a:first-child:hover,
.music-hero-buttons a:first-child:hover,
.speak-hero-buttons a:first-child:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: #fff;
}

.art-cta,
.chess-cta,
.tech-cta,
.music-cta,
.speak-cta,
.sponsor-cta {
    background: var(--site-surface);
    color: var(--text-primary, #f3f0e9);
}

.art-cta h2,
.chess-cta h2,
.tech-cta h2,
.music-cta h2,
.speak-cta h2,
.sponsor-cta h2,
.art-cta p,
.chess-cta p,
.tech-cta p,
.music-cta p,
.speak-cta p,
.sponsor-cta p {
    color: inherit;
}

.benefits-section,
.gallery-section,
.about-story,
.mission-vision,
.core-values,
.impact-numbers,
.global-partners,
.chess-about,
.chess-levels,
.why-join,
.music-about,
.music-instruments,
.why-join-music,
.art-intro,
.art-categories,
.art-why-join,
.tech-intro,
.tech-tracks,
.tech-why-join,
.speak-intro,
.speak-skills,
.speak-levels,
.speak-why-join,
.apply-section {
    background-color: var(--site-background);
}

.feature-badges .badge,
.benefit-pills .pill,
.feature-tag,
.level-badge {
    border-radius: 6px;
    box-shadow: none;
}

footer {
    border-top: 1px solid var(--site-border);
    background: var(--site-background);
}

footer p,
.footer-copyright {
    color: var(--site-muted);
}

.footer-copyright p {
    color: var(--footer-text, var(--site-muted)) !important;
}

#cookieBanner {
    position: fixed;
    inset: auto 16px 16px;
    z-index: 9999;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px 24px;
    width: min(940px, calc(100% - 32px));
    margin-inline: auto;
    padding: 18px 22px;
    background: var(--header-bg);
    border: 1px solid var(--site-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px var(--shadow-color);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--text-primary, #f3f0e9);
}

#cookieBanner[hidden],
#cookieBanner [hidden] {
    display: none;
}

.cookie-consent-copy h2 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.cookie-consent-copy p,
.cookie-preferences p,
.cookie-status {
    margin: 0;
    color: var(--site-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.cookie-consent-copy a {
    color: var(--site-accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-button,
.cookie-settings-link {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--site-border);
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
}

.cookie-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cookie-button-primary {
    border-color: var(--primary-orange-dark);
    background: var(--primary-orange-dark);
    color: #fff;
}

.cookie-button:hover,
.cookie-settings-link:hover {
    border-color: var(--primary-orange);
}

.cookie-preferences,
.cookie-status {
    grid-column: 1 / -1;
}

.cookie-preferences label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.cookie-preferences input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-orange-dark);
}

.cookie-preferences .cookie-consent-actions {
    margin-top: 12px;
}

.cookie-status:empty {
    display: none;
}

.cookie-settings-link {
    min-height: auto;
    margin: 10px 0 0;
    padding: 4px 8px;
    color: var(--site-accent);
    font-size: 0.76rem;
}

.cookie-settings-link[hidden] {
    display: none;
}

.cookie-settings-floating {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 9998;
    margin: 0;
    background: var(--header-bg);
    box-shadow: 0 8px 22px var(--shadow-color);
}

.container > .back-home {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.container:has(> .last-updated) > ul li,
.container:has(> .last-updated) > ul li a {
    overflow-wrap: anywhere;
}

.map-consent-placeholder {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    background: var(--site-card);
    color: var(--text-primary, #f3f0e9);
    text-align: center;
}

.map-consent-placeholder[hidden] {
    display: none;
}

.map-consent-placeholder p {
    max-width: 460px;
    margin: 0;
    color: var(--site-muted);
    font-size: 0.88rem;
}

.map-consent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 700px) {
    #cookieBanner {
        inset: auto 10px 10px;
        grid-template-columns: 1fr;
        width: calc(100% - 20px);
        padding: 16px;
    }

    .cookie-consent-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .cookie-button-primary {
        grid-column: 1 / -1;
    }

    .cookie-button {
        padding-inline: 8px;
        font-size: 0.76rem;
    }
}

.tournament-topbar {
    margin: 0 0 28px;
}

.tournament-topbar a,
.back-home {
    color: var(--site-accent);
    font-size: 0.88rem;
    font-weight: 600;
}

.tournament-topbar a:hover,
.back-home:hover {
    color: var(--primary-orange-light);
}

.tournament-wrapper {
    max-width: 1160px;
}

.page-header {
    padding: 20px 0 28px;
    border-bottom: 1px solid var(--site-border);
    text-align: left;
}

.page-header h1,
.page-header p,
.section-title {
    color: var(--text-primary, #f3f0e9);
}

.page-header p {
    border-top: 0;
    padding-top: 0;
    font-size: 1rem;
}

.section-divider {
    height: 1px;
    background: var(--site-border);
}

.tournament-card {
    border: 1px solid var(--site-border);
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.tournament-card.upcoming .card-badge {
    animation: none;
    box-shadow: none;
    border-radius: 6px;
}

.admin-login,
#adminControls {
    border: 1px solid var(--site-border);
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
}

.admin-login input,
.admin-controls input,
.admin-controls select,
.admin-controls textarea {
    border-radius: 6px;
}

.security-policy,
.container:has(> .last-updated) {
    background: var(--site-card);
    border: 1px solid var(--site-border);
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 68px;
    }

    .container {
        width: min(100% - 36px, 1160px);
    }

    .navbar {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero,
    .about-hero,
    .art-hero,
    .chess-hero,
    .tech-hero,
    .music-hero,
    .speak-hero {
        min-height: 0;
        padding-top: 88px;
        padding-bottom: 68px;
    }

    .hero-content,
    .about-hero-content,
    .art-hero-content,
    .chess-hero-content,
    .tech-hero-content,
    .music-hero-content,
    .speak-hero-content {
        text-align: center;
    }

    .hero h1,
    .about-hero h1,
    .art-hero h1,
    .chess-hero h1,
    .tech-hero h1,
    .music-hero h1,
    .speak-hero h1 {
        font-size: clamp(2.25rem, 9vw, 3.4rem);
    }

    .hero p,
    .about-hero p,
    .art-hero p,
    .chess-hero p,
    .tech-hero p,
    .music-hero p,
    .speak-hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons,
    .cta-buttons {
        justify-content: center;
    }

    .tournament-wrapper {
        padding: 0 6px;
    }

    .tournament-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .page-header {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 960px) {
    header {
        z-index: 1004;
    }

    .navbar {
        min-width: 0;
        gap: 8px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .logo,
    .logo a,
    .nav-right {
        min-width: 0;
    }

    .logo {
        flex: 1 1 auto;
    }

    .logo a {
        gap: 6px;
    }

    .logo-img {
        width: auto;
        max-width: 40px;
        height: 34px;
    }

    .logo-text {
        gap: 3px;
        font-size: clamp(0.68rem, 2.4vw, 0.9rem);
        letter-spacing: -0.035em;
    }

    .nav-menu {
        display: none !important;
    }

    .nav-right {
        flex: 0 0 auto;
        gap: clamp(4px, 1.5vw, 10px);
        margin-left: auto;
    }

    .hamburger-btn {
        display: flex !important;
        width: 44px;
        height: 44px;
        min-width: 44px;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 10px;
        border: 1px solid var(--glass-border);
        border-radius: 10px;
        background: var(--glass-bg);
        color: var(--text-primary);
        cursor: pointer;
        z-index: 1008;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .hamburger-btn span {
        width: 21px;
        height: 2px;
    }

    .hamburger-btn.active {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .hamburger-btn:active,
    .hamburger-btn:hover {
        background: var(--mode-toggle-hover);
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1rem;
    }

    .mobile-overlay {
        z-index: 1005;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        touch-action: manipulation;
    }

    .mobile-menu,
    .mobile-menu.open {
        box-sizing: border-box;
        top: 0;
        right: 0 !important;
        width: min(24rem, calc(100vw - 12px));
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 1007;
        transition: transform 0.28s ease, visibility 0s linear;
    }

    .mobile-menu:not(.open) {
        visibility: hidden;
        pointer-events: none;
        transform: translateX(105%);
        transition: transform 0.28s ease, visibility 0s linear 0.28s;
    }

    .mobile-menu.open {
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }

    .mobile-menu-header {
        flex-shrink: 0;
        gap: 12px;
        padding: max(14px, env(safe-area-inset-top)) 16px 14px;
    }

    .mobile-brand {
        min-width: 0;
        gap: 10px;
    }

    .close-menu {
        display: inline-flex;
        width: 44px;
        height: 44px;
        min-width: 44px;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        font-size: 1.7rem;
        touch-action: manipulation;
    }

    .mobile-menu-content {
        min-height: 0;
        overscroll-behavior: contain;
        padding: 16px;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-menu-footer {
        flex-shrink: 0;
        padding: 14px 16px max(16px, env(safe-area-inset-bottom));
    }

    .mobile-contact-btn,
    .mobile-nav-link,
    .mobile-dropdown-menu a {
        min-height: 44px;
    }

    .mobile-dropdown-menu {
        transition: max-height 0.25s ease;
    }
}

@media (max-width: 420px) {
    .container {
        width: calc(100% - 32px);
    }

    .navbar {
        gap: 4px;
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .logo a {
        gap: 4px;
    }

    .logo-img {
        max-width: 32px;
        height: 30px;
    }

    .logo-text {
        gap: 2px;
        font-size: clamp(0.62rem, 2.8vw, 0.78rem);
    }

    .nav-right {
        gap: 4px;
    }
}

@media (max-width: 340px) {
    .logo-text .logo-international {
        display: none;
    }

    .logo-text {
        font-size: 0.72rem;
    }

    .theme-toggle,
    .hamburger-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .hamburger-btn {
        padding: 8px;
    }
}

@media (max-height: 520px) and (max-width: 960px) {
    .mobile-menu-header {
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: 8px;
    }

    .mobile-menu-content {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .mobile-menu-footer {
        padding-top: 8px;
    }
}

@media (max-width: 960px) {
    .container > *,
    [class*="grid"] > *,
    [class*="flex"] > * {
        min-width: 0;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100%;
        font-family: inherit;
    }

    iframe,
    video {
        max-width: 100%;
    }
}
