*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── MODERN APPLE & LUXURY GLASS DESIGN SYSTEM — COLOR TOKENS ── */
:root {
    --lang-banner-height: 0px;
    /* Backgrounds */
    --bg: #0a0b0e;
    --bg2: rgba(22, 25, 35, 0.75);
    --bg3: rgba(32, 36, 50, 0.6);
    --bg-solid: #13151c;
    --bg-elevated: #1c202b;

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border2: rgba(255, 255, 255, 0.18);

    /* Accent */
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-subtle: rgba(0, 113, 227, 0.15);
    --accent-gradient: linear-gradient(135deg, #0071e3 0%, #38bdf8 100%);

    /* Text */
    --text: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.65);
    --text-tertiary: rgba(248, 250, 252, 0.42);

    /* Effects */
    --glass-bg: rgba(20, 24, 33, 0.65);
    --glass-blur: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(0, 113, 227, 0.25);

    /* Spring-like easing curves */
    --ease-spring: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

    /* Spacing & Radii */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    /* Safe Area Insets (iPhone & Mobile Devices) */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* ── LIGHT THEME ── */
html[data-theme="light"] {
    --bg: #f6f8fc;
    --bg2: rgba(255, 255, 255, 0.82);
    --bg3: rgba(240, 243, 250, 0.85);
    --bg-solid: #ffffff;
    --bg-elevated: #edf2fa;

    --border: rgba(0, 0, 0, 0.07);
    --border2: rgba(0, 0, 0, 0.15);

    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-subtle: rgba(0, 113, 227, 0.09);
    --accent-gradient: linear-gradient(135deg, #0071e3 0%, #0284c7 100%);

    --text: #0f172a;
    --text-secondary: rgba(15, 23, 42, 0.62);
    --text-tertiary: rgba(15, 23, 42, 0.4);

    --glass-bg: rgba(255, 255, 255, 0.78);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 25px rgba(0, 113, 227, 0.15);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 113, 227, 0.15), transparent 100%),
        radial-gradient(circle at 90% 20%, rgba(139, 92, 246, 0.08), transparent 45%),
        radial-gradient(circle at 10% 60%, rgba(56, 189, 248, 0.06), transparent 40%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
    padding-top: var(--lang-banner-height, 0px);
    transition: padding-top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Touch manipulation to eliminate 300ms tap delays on mobile */
a, button, [role="button"], input, select, textarea {
    touch-action: manipulation;
}

html[data-theme="light"] body {
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 113, 227, 0.08), transparent 100%),
        radial-gradient(circle at 90% 20%, rgba(139, 92, 246, 0.05), transparent 45%),
        radial-gradient(circle at 10% 60%, rgba(56, 189, 248, 0.04), transparent 40%);
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 max(1.25rem, calc(var(--safe-right) + 1rem)) 0 max(1.25rem, calc(var(--safe-left) + 1rem));
    position: relative;
}

/* ── SITE-NAV — Modern Header matching root index.html ── */
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    background: var(--glass-bg, rgba(20, 24, 33, 0.65));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border2, rgba(255, 255, 255, 0.18));
    border-radius: 100px;
    margin-top: 0.8rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(0, 113, 227, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
    position: sticky;
    top: max(0.6rem, env(safe-area-inset-top));
    z-index: 99995;
}

html[data-theme="light"] .site-nav {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 0 15px rgba(0, 113, 227, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.6);
    border-color: var(--border, rgba(0, 0, 0, 0.07));
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text, #f8fafc);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-brand:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.brand-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    color: var(--text, #f8fafc);
}

.brand-sub {
    font-size: 0.72rem;
    color: var(--text-tertiary, rgba(248, 250, 252, 0.42));
    font-weight: 500;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg3, rgba(32, 36, 50, 0.6));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    color: var(--text-secondary, rgba(248, 250, 252, 0.65));
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.theme-btn:hover {
    background: var(--bg-elevated, #1c202b);
    color: var(--text, #f8fafc);
    border-color: var(--border2, rgba(255, 255, 255, 0.18));
    transform: rotate(20deg) scale(1.08);
    box-shadow: 0 0 15px rgba(0, 113, 227, 0.25);
}

.theme-btn:active {
    transform: scale(0.88);
}

.theme-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.sun-icon { display: none; }
.moon-icon { display: block; }
html[data-theme="light"] .sun-icon { display: block !important; }
html[data-theme="light"] .moon-icon { display: none !important; }
html[data-theme="dark"] .sun-icon { display: none !important; }
html[data-theme="dark"] .moon-icon { display: block !important; }

/* ── NAV — Floating Glass Island Header ── */
nav:not(.site-nav) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.2rem;
    margin-top: 0.8rem;
    margin-bottom: 3.5rem;
    position: sticky;
    top: calc(0.8rem + var(--lang-banner-height, 0px));
    z-index: 99995;
    background: var(--glass-bg);
    backdrop-filter: saturate(200%) blur(28px);
    -webkit-backdrop-filter: saturate(200%) blur(28px);
    border: 1px solid var(--border2);
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(0, 113, 227, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s var(--ease-out);
}

html[data-theme="light"] nav:not(.site-nav) {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 0 15px rgba(0, 113, 227, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.nav-logo {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(0, 113, 227, 0.08);
    border: 1px solid rgba(0, 113, 227, 0.25);
    transition: all 0.3s var(--ease-spring);
    flex-shrink: 0;
}

.nav-logo::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0071e3;
    box-shadow: 0 0 10px #0071e3;
    animation: logoPulse 3s infinite ease-in-out;
}

@keyframes logoPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.nav-logo:hover {
    background: rgba(0, 113, 227, 0.18);
    border-color: rgba(0, 113, 227, 0.5);
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 0 16px rgba(0, 113, 227, 0.3);
}

.nav-links {
    display: flex;
    gap: 0.22rem;
    align-items: center;
}

.nav-links a {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 11px;
    border-radius: 100px;
    transition: all 0.25s var(--ease-out);
    letter-spacing: -0.01em;
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg3);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-links a:active {
    transform: scale(0.96);
}

/* ── NAV SEARCH TRIGGER BUTTON & FULL OVERLAY ── */
.nav-search-trigger-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 7px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease-out);
    margin-left: 0.2rem;
}

.nav-search-trigger-btn:hover {
    color: var(--accent);
    background: var(--bg3);
    transform: scale(1.08);
}

.nav-search-trigger-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Nav items hide animation during search active state */
nav.is-search-active .nav-logo,
nav.is-search-active .nav-links > a,
nav.is-search-active .theme-toggle-btn,
nav.is-search-active .lang-switch-btn,
nav.is-search-active .nav-search-trigger-btn,
nav.is-search-active .nav-mobile-toggle {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* Full Nav Search Overlay */
.nav-search-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.25s var(--ease-out), visibility 0.25s var(--ease-out), transform 0.25s var(--ease-out);
    z-index: 50;
    padding: 0 4px;
}

nav.is-search-active .nav-search-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-search-overlay-form {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-overlay-input {
    width: 100%;
    padding: 0.65rem 3.5rem 0.65rem 2.75rem;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: var(--bg-solid);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-subtle), var(--shadow-sm);
}

.nav-overlay-icon {
    position: absolute;
    left: 1rem;
    width: 16px;
    height: 16px;
    fill: var(--accent);
    pointer-events: none;
}

.nav-overlay-kbd {
    position: absolute;
    right: 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    color: var(--text-tertiary);
    pointer-events: none;
    font-family: 'Space Mono', monospace;
}

.nav-overlay-close-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-overlay-close-btn:hover {
    color: var(--text);
    background: var(--bg-elevated);
    border-color: var(--border2);
    transform: scale(1.05);
}

/* ── SECTION TITLE — Modern Uppercase ── */
.section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border2) 0%, transparent 100%);
}

/* ── SUCCESS PAGE PROFILE / NOTICE CARD ── */
.profile-card {
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(var(--glass-blur));
    -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.85rem;
    margin-bottom: 3rem;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), var(--shadow-sm);
}

.bio-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

/* ── INQUIRY FORM ── */
.inquiry-section {
    margin-bottom: 3rem;
}

.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.form-group .required {
    font-size: 10px;
    background: rgba(255, 59, 48, 0.12);
    color: #ff453a;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(255, 59, 48, 0.2);
    font-weight: 600;
}

.inquiry-form input[type="text"],
.inquiry-form input[type="email"],
.inquiry-form input[type="url"],
.inquiry-form select,
.inquiry-form textarea {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 18px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring), background-color 0.3s var(--ease-spring);
    letter-spacing: -0.01em;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.inquiry-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230071e3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    padding-right: 44px;
    cursor: pointer;
}

.inquiry-form select option {
    background-color: var(--bg-solid);
    color: var(--text);
}

.inquiry-form select:invalid,
.inquiry-form select option[value=""] {
    color: var(--text-tertiary);
}

.inquiry-form input[type="text"]:focus,
.inquiry-form input[type="email"]:focus,
.inquiry-form input[type="url"]:focus,
.inquiry-form select:focus,
.inquiry-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-solid);
    box-shadow: 0 0 0 4px var(--accent-subtle), 0 0 15px rgba(0, 113, 227, 0.15);
}

.inquiry-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* ── CHECKBOX ── */
.checkbox-group {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.checkbox-group label a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.checkbox-group label a:hover {
    color: var(--accent-hover);
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--border2);
    border-radius: 6px;
    background: var(--bg3);
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s var(--ease-spring), background-color 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring);
    flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.checkbox-group input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-subtle);
}

.checkbox-group input[type="checkbox"]:hover {
    border-color: var(--accent);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: linear-gradient(135deg, #0071e3 0%, #38bdf8 100%);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s var(--ease-spring), transform 0.2s var(--ease-out), box-shadow 0.3s var(--ease-spring);
    margin-top: 0.5rem;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.35);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 113, 227, 0.5);
}

.submit-btn:active {
    transform: scale(0.97);
    transition: transform 100ms ease-out;
}

/* ── FORM VALIDATION ERROR STYLES ── */
.form-group.has-error input[type="text"],
.form-group.has-error input[type="email"],
.form-group.has-error input[type="url"],
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #ff453a !important;
    background-color: rgba(255, 59, 48, 0.05) !important;
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.15) !important;
}

.checkbox-group.has-error input[type="checkbox"] {
    border-color: #ff453a !important;
    background-color: rgba(255, 59, 48, 0.05) !important;
    box-shadow: 0 0 0 4px rgba(255, 59, 48, 0.15) !important;
}

.error-message {
    font-size: 12px;
    color: #ff453a;
    margin-top: 4px;
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
    animation: fadeInError 0.25s ease forwards;
}

.checkbox-group .error-message {
    width: 100%;
    margin-top: 8px;
}

.error-message svg {
    color: #ff453a;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
    letter-spacing: -0.01em;
}

/* ── THEME SWITCHER ── */
.theme-toggle-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 7px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease-spring);
    outline: none;
    margin-left: 6px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    color: var(--text);
    background-color: var(--bg-elevated);
    border-color: var(--border2);
    transform: rotate(20deg) scale(1.08);
    box-shadow: 0 0 15px rgba(0, 113, 227, 0.25);
}

.theme-toggle-btn:active {
    transform: scale(0.88);
    transition: transform 100ms ease-out;
}

.theme-toggle-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

/* Display icon matching the current theme */
html[data-theme="light"] .sun-icon {
    display: none;
}
html[data-theme="dark"] .moon-icon {
    display: none;
}
html:not([data-theme="light"]) .moon-icon {
    display: none;
}

/* ── LANGUAGE SWITCHER ── */
.lang-switch-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 5px 9px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.25s var(--ease-spring);
    outline: none;
    margin-left: 6px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    line-height: 1.2;
}

.lang-switch-btn:hover {
    color: var(--text);
    background-color: var(--bg-elevated);
    border-color: var(--border2);
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(0, 113, 227, 0.2);
}

.lang-switch-btn:active {
    transform: scale(0.92);
}

.lang-switch-btn svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

/* ── MODAL BASE ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-solid);
    border: 1px solid var(--border2);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 720px;
    margin: auto;
    box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 113, 227, 0.25);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.4s var(--ease-out);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.6rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 82%;
    letter-spacing: -0.01em;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    border-radius: 50%;
    transition: background-color 0.3s var(--ease-spring), color 0.3s var(--ease-spring);
}

.modal-close-btn:hover {
    background-color: var(--bg3);
    color: var(--text);
}

.modal-close-btn:active {
    transform: scale(0.9);
    transition: transform 100ms ease-out;
}

.modal-close-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.modal-footer {
    padding: 1.25rem 1.6rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.3s var(--ease-spring), background-color 0.3s var(--ease-spring), transform 0.15s ease-out;
    letter-spacing: -0.01em;
}

.modal-btn:hover {
    border-color: var(--border2);
    background-color: var(--bg-elevated);
}

.modal-btn:active {
    transform: scale(0.95);
    transition: transform 100ms ease-out;
}

.modal-btn.primary {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.35);
}

.modal-btn.primary:hover {
    box-shadow: 0 6px 24px rgba(0, 113, 227, 0.5);
}

/* ── INQUIRY CONFIRMATION MODAL ── */
#confirm-modal .modal-content,
.inquiry-confirm-modal {
    max-width: 620px;
    width: 94%;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 113, 227, 0.25);
    background: var(--bg-solid);
}

#confirm-modal .modal-body,
.confirm-modal-body {
    padding: 1.5rem 1.75rem !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 1 auto !important;
}

#confirm-modal .confirm-intro-text,
.confirm-intro-text {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

#confirm-modal .confirm-preview-list,
.confirm-preview-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#confirm-modal .confirm-item,
.confirm-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#confirm-modal .confirm-label,
.confirm-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

#confirm-modal .confirm-value,
.confirm-value {
    font-size: 14.5px;
    color: var(--text);
    background: var(--bg3);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
}

#confirm-modal .confirm-value.preview-message-box,
.confirm-value.preview-message-box {
    min-height: 110px;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#confirm-modal .modal-footer,
.confirm-modal-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--bg-solid);
}

/* ── TOAST NOTIFICATION ── */
.toast-container {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-solid);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 13px 26px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 113, 227, 0.15);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
    letter-spacing: -0.01em;
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ── MOBILE NAVIGATION HAMBURGER & GLASS DRAWER SYSTEM ── */
.nav-mobile-toggle {
    display: none;
    background: var(--bg3);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s var(--ease-spring);
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.nav-mobile-toggle:active {
    transform: scale(0.92);
}

.nav-hamburger-icon {
    width: 17px;
    height: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform-origin: center;
}

body.is-menu-open {
    overflow: hidden;
    touch-action: none;
}

body.is-menu-open .nav-hamburger-icon span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
body.is-menu-open .nav-hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
body.is-menu-open .nav-hamburger-icon span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

body.is-menu-open .nav-mobile-toggle {
    background: rgba(0, 113, 227, 0.15);
    border-color: rgba(0, 113, 227, 0.45);
    color: var(--accent);
    box-shadow: 0 0 14px rgba(0, 113, 227, 0.25);
}

.nav-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 11, 15, 0.90);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    z-index: 99990;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

html[data-theme="light"] .nav-mobile-drawer {
    background: rgba(246, 248, 252, 0.94);
}

.nav-mobile-drawer.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-mobile-drawer-content {
    padding: calc(max(0.6rem, var(--safe-top)) + 4.6rem) 1.5rem max(2.5rem, calc(var(--safe-bottom) + 1.5rem)) 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
}

.nav-mobile-drawer-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-mobile-drawer-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    padding-left: 0.4rem;
}

.nav-mobile-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-mobile-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 1.02rem;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-mobile-drawer-link:active {
    background: var(--bg3);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(0.98);
}

.nav-mobile-drawer-link-arrow {
    width: 14px;
    height: 14px;
    fill: var(--text-tertiary);
    transition: transform 0.2s ease, fill 0.2s ease;
    flex-shrink: 0;
}

.nav-mobile-drawer-link:active .nav-mobile-drawer-link-arrow {
    transform: translateX(3px);
    fill: var(--accent);
}

/* ── RESPONSIVE & MOBILE TOUCH OPTIMIZATIONS ── */
@media (max-width: 768px), (pointer: coarse) {
    nav {
        margin-top: max(0.6rem, env(safe-area-inset-top));
        top: calc(max(0.6rem, env(safe-area-inset-top)) + var(--lang-banner-height, 0px));
        gap: 6px;
    }

    .nav-links > a {
        display: none !important;
    }

    .nav-mobile-toggle {
        display: inline-flex !important;
    }

    nav.is-search-active .nav-mobile-toggle,
    nav.is-search-active .theme-toggle-btn,
    nav.is-search-active .lang-switch-btn,
    nav.is-search-active .nav-search-trigger-btn {
        display: none !important;
    }

    .theme-toggle-btn,
    .nav-search-trigger-btn,
    .nav-mobile-toggle,
    .modal-close-btn,
    .nav-overlay-close-btn {
        min-width: 42px;
        min-height: 42px;
        width: 42px;
        height: 42px;
        padding: 9px;
        margin: 0;
        box-sizing: border-box;
    }

    /* iOS Safari Automatic Zoom Prevention on Inputs */
    input, select, textarea,
    .nav-overlay-input {
        font-size: 16px !important;
    }

    .nav-overlay-kbd {
        display: none !important;
    }

    .modal-btn:active,
    .submit-btn:active {
        transform: scale(0.97) !important;
        transition: transform 80ms ease-out !important;
    }

    #confirm-modal .modal-content,
    .inquiry-confirm-modal {
        width: 96% !important;
        max-height: 88dvh !important;
        border-radius: var(--radius-lg) !important;
    }

    #confirm-modal .modal-body,
    .confirm-modal-body {
        padding: 1.25rem 1.15rem !important;
    }

    #confirm-modal .modal-footer,
    .confirm-modal-footer {
        padding: 1rem 1.15rem !important;
        flex-direction: column-reverse !important;
        gap: 10px !important;
    }

    #confirm-modal .modal-footer .modal-btn,
    .confirm-modal-footer .modal-btn {
        width: 100% !important;
        justify-content: center !important;
        min-height: 46px !important;
    }
}

@media (max-width: 640px) {
    nav {
        padding: 0.45rem 0.85rem;
        margin-top: 0.4rem;
        margin-bottom: 2.2rem;
        top: max(0.5rem, var(--safe-top));
        border-radius: 100px;
    }

    .nav-logo {
        font-size: 13px;
        padding: 4px 10px;
        gap: 6px;
    }

    .nav-links {
        gap: 2px;
        overflow: visible;
        padding: 0;
        max-width: none;
    }

    .nav-links > a {
        display: none !important;
    }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
