.global-header.wp-block-toma-global-header {
    background: #fff;
    box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.1);
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 100000 !important;
    padding: 20px 100px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transition: transform 400ms ease, background 400ms ease, padding 400ms ease;
}

/* Override global header tag z-index if it wraps our block */
header {
    z-index: 100000 !important;
    border-bottom: none !important; /* Eliminate legacy theme border */
}

.admin-bar .global-header.wp-block-toma-global-header {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .global-header.wp-block-toma-global-header {
        top: 46px !important;
    }
}

.open_menu .gh-logo {
    opacity: 0 !important;
    pointer-events: none !important;
}

.global-header.wp-block-toma-global-header .gh-inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important; 
    height: auto !important;
    background: #fff !important;
    box-shadow: none !important;
    transform: none !important;
}

.gh-left {
    flex-shrink: 0;
    position: relative !important;
    z-index: 10;
}

.gh-logo {
    position: relative !important;
    top: auto !important;
    left: 0 !important;
    margin-left: 0 !important;
    opacity: 1 !important;
}

.gh-logo a {
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Reset H1 for consistent alignment */
.global-header h1 {
    margin: 0 !important;
    padding: 0 !important;
}

.gh-logo img {
    width: 180px !important;
    height: auto !important;
    vertical-align: middle;
}

.gh-logo img {
    width: 180px !important;
    height: auto !important;
    vertical-align: middle;
}

.gh-logo-scroll {
    display: none !important;
    position: relative !important;
    left: 0 !important;
    margin-left: 0 !important;
    top: auto !important;
}

.gh-logo-scroll img {
    height: 30px !important;
    width: auto !important;
    max-width: 100% !important;
    vertical-align: middle;
    object-fit: contain;
    margin: 0 !important; /* Ensure no bottom margin */
}

.gh-logo-scroll a {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 !important;
    left: 0 !important;
    position: relative !important;
}

/* Scrolled State for Compact Header */
.is-scrolled .gh-right {
    flex-direction: row !important;
    align-items: center !important;
}

.is-scrolled .gh-right-top {
    display: none !important;
}

.is-scrolled .gh-logo {
    display: none !important;
}

.is-scrolled .gh-logo-scroll {
    display: block !important;
}

.is-scrolled.global-header {
    padding: 0 100px !important;
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(10px);
    z-index: 90 !important;
}

@media screen and (min-width: 768px) {
    .is-scrolled.global-header .gh-inner {
        padding: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        height: 70px !important; /* Explicitly compact height */
    }
}

/* Align content to the 1080px grid during scroll */
.is-scrolled .gh-left {
    max-width: 40% !important;
    display: flex !important;
    align-items: center !important;
    height: 70px !important;
}

.is-scrolled .gh-right {
}

/* All states share the grid padding */
.gh-right {
    display: flex !important;
    flex-direction: column !important; /* Two rows layout by default */
    align-items: flex-end !important;
    gap: 10px;
    position: relative !important;
}

.gh-right-top,
.gh-right-bottom {
    display: flex !important;
    align-items: center !important;
    gap: 30px;
}

/* Open menu state override */
.open_menu .gh-right {
    /* Maintain natural flow from the sticky header */
}

.open_menu .gh-right-top,
.open_menu .gh-right-bottom {
    gap: 30px;
}

/* Hide nav IN THE HEADER when menu is open - Physical Removal to prevent layout shift */
.open_menu .gh-inner > .gh-nav-main,
.open_menu .gh-right-bottom .gh-nav-main {
    display: none !important;
}

/* Show SNS and Language on PC even when menu is open - PC ONLY */
@media screen and (min-width: 768px) {
    html.open_menu .gh-right-top .gh-nav-sns,
    html.open_menu .gh-right-top .gh-nav-lang,
    html.open_menu .gh-nav-sns-list,
    html.open_menu .gh-nav-sns-item {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        display: flex !important;
        width: auto !important;
        height: auto !important;
    }
}

/* Clean header during open menu - only Logo and Burger remain in the bar */
html.open_menu .gh-right-top,
html.menu-closing .gh-right-top {
    display: none !important;
}

.open_menu .gh-nav-lang,
.open_menu .gh-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.gh-nav-lang {
    background: transparent !important;
}

.open_menu .gh-nav-lang-btn {
    background: transparent !important;
    border: none !important;
}

.open_menu .gh-nav-lang-btn {
    color: #fff !important;
    outline: none !important;
    list-style: none !important;
    background: transparent !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
}

.open_menu .gh-nav-lang-text {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

/* Specific icon restoration - matching normal header proportions */
.open_menu .icon-lang {
    display: inline-block !important;
    color: #fff !important;
    font-size: 20px !important; /* Globe at 20px */
    visibility: visible !important;
    opacity: 1 !important;
    margin-right: 0 !important;
}

.open_menu .icon-arrow-b {
    display: inline-block !important;
    color: #fff !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.open_menu .icon-lang::before,
.open_menu .icon-arrow-b::before {
    display: inline-block !important;
    color: #fff !important;
    font-size: inherit !important;
}

/* TARGETED DOT REMOVAL - ONLY THE OFFENDING PSEUDOS */
.open_menu .gh-nav-lang::before,
.open_menu .gh-nav-lang::after,
.open_menu .gh-nav-lang-btn::before,
.open_menu .gh-nav-lang-btn::after,
.open_menu .gh-nav-lang-text::before,
.open_menu .gh-nav-lang-text::after {
    display: none !important;
    content: none !important;
}

html.open_menu .global-header,
html.open_menu header.global-header,
html.open_menu .is-scrolled.global-header,
html.open_menu .wp-block-template-part,
html.open_menu .gh-inner {
    background-color: #292929 !important; /* Solid block to prevent transparency */
    opacity: 1 !important;
    visibility: visible !important;
    backdrop-filter: none !important; /* Remove blur effects that might cause visual transparency */
    box-shadow: none !important;
    width: 100vw !important;
    left: 0 !important;
}

.gh-nav-main-list {
    display: flex !important;
    align-items: center !important;
    gap: 30px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.gh-nav-main-item a {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    padding: 0 0 !important;
    line-height: 2 !important;
}

.gh-nav-sns-list {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    list-style: none !important;
    padding: 0 !important;
}

.gh-nav-sns-item a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* SNS brand colors scoped to header */
.global-header .icon-sns-fb { color: #1877F2; }
.global-header .icon-sns-insta { color: #E4405F; }
.global-header .icon-sns-line { color: #06C755; }
.global-header .icon-sns-x { color: #000; }
.global-header .icon-sns-note { color: #41C9B4; }

/* Ultimate White SNS icons during open menu state */
html.open_menu .gh-nav-sns [class^="icon-sns-"],
html.open_menu .gh-nav-sns a [class^="icon-sns-"],
html.open_menu .gh-nav-sns-item a span,
.gh-menu-footer .icon-sns-fb,
.gh-menu-footer .icon-sns-insta,
.gh-menu-footer .icon-sns-line,
.gh-menu-footer .icon-sns-x,
.gh-menu-footer .icon-sns-note {
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.gh-nav-sns {
    margin-right: 0 !important;
}

.gh-nav-lang {
    margin-right: 0 !important; /* Remove rogue global margin */
    padding: 0 !important;
    right: auto !important;
    top: auto !important;
    position: relative !important;
    z-index: 10010 !important;
}

.gh-nav-lang-btn {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

.gh-btn {
    width: 24px !important;
    height: 22px !important;
    position: relative !important;
    z-index: 10003 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateY(2px) !important;
    margin: 0 !important;
    right: auto !important;
    left: auto !important;
    align-self: center !important;
}

.gh-btn button span.line,
.gh-btn button span.line::before,
.gh-btn button span.line::after {
    background: #000; /* Removed !important */
    transition: background 400ms ease, transform 400ms ease, width 400ms ease;
}

/* Open menu state transitions */
.open_menu .gh-btn button span.line {
    background: transparent !important;
}

.open_menu .gh-btn button span.line::before,
.open_menu .gh-btn button span.line::after {
    background: #fff !important;
}

/* --------------------------------------------------
  gh-nav-mega
-------------------------------------------------- */
.gh-nav-mega {
    position: fixed;
    left: 0;
    width: 100vw;
    background: #F3F1EA;
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 400ms ease, visibility 400ms ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gh-nav-mega::before {
    content: "\e908";
    font-family: "icomoon" !important;
    position: absolute;
    top: -3px;
    left: var(--icon-x, 50%);
    transform: translateX(-50%) scaleX(0); /* Hidden when inactive */
    font-size: 16px;
    color: #D7D7D7;
    transition: transform 400ms ease;
    pointer-events: none;
}

.gh-nav-mega.active {
    visibility: visible;
    opacity: 1;
}

.gh-nav-mega.active::before {
    transform: translateX(-50%) scaleX(1); /* Reveal on active */
}

.gh-nav-mega-inner {
    display: flex !important;
    align-items: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 40px 100px !important;
    box-sizing: border-box !important;
}

@media screen and (max-width: 1080px) {
    .gh-nav-mega-inner {
        padding: 40px 40px !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    .gh-nav-mega-hd {
        width: auto !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important;
        font-size: 18px !important;
    }
    .gh-nav-mega-list {
        columns: 1 !important;
        column-gap: 0 !important;
    }
}

.gh-nav-mega-hd {
    width: 280px; /* Slightly wider */
    font-size: 24px !important;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #000;
    line-height: 1.3 !important;
    flex-shrink: 0;
    padding-top: 4px; /* Alignment compensation */
    margin-right: 80px; /* Space before the list starts */
}

.gh-nav-mega-list {
    display: block !important;
    columns: 2 !important;
    column-gap: 120px !important; /* Wider gap to fill the space */
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100% !important; /* Ensure it spans the box */
}

.gh-nav-mega-item {
    break-inside: avoid !important;
    margin-bottom: 10px;
}

.gh-nav-mega-item:last-child {
    margin-bottom: 0;
}

.gh-nav-mega-item a,
.gh-nav-mega-link {
    font-size: 14px !important;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: opacity 0.3s ease;
    display: block;
    padding: 0; /* Moving spacing to margin-bottom of item */
    line-height: 1.5 !important;
}

.gh-nav-mega-item a:hover {
    opacity: 0.6;
}

/* SP Adjustments */
@media screen and (max-width: 1200px) {
    .gh-nav-main-list {
        gap: 20px !important;
    }
    .gh-right-bottom {
        gap: 20px !important;
    }
}

@media screen and (max-width: 1140px) {
    .gh-nav-main-list {
        gap: 15px !important;
    }
    .gh-right-bottom {
        gap: 15px !important;
    }
}

@media screen and (max-width: 1280px) {
    .gh-logo img {
        width: 165px !important;
    }
    .global-header.wp-block-toma-global-header,
    .is-scrolled.global-header {
        padding-inline: 40px !important; /* Reduced from 60px for more breathing room */
    }
}

@media screen and (max-width: 1080px) {
    .gh-nav-main-list {
        gap: 12px !important;
    }
    .gh-right-bottom {
        gap: 12px !important;
    }
    .gh-nav-main-item a {
        font-size: 13px !important;
    }
    .gh-logo img {
        width: 140px !important;
    }
    .global-header.wp-block-toma-global-header {
        padding: 20px 20px !important; /* Reduced from 40px */
    }
    .is-scrolled.global-header {
        padding: 0 20px !important; /* Reduced from 40px */
    }
}

@media screen and (max-width: 960px) {
    .gh-nav-main-list {
        gap: 8px !important;
    }
    .gh-right-bottom {
        gap: 8px !important;
    }
    .gh-nav-main-item a {
        font-size: 12px !important;
        letter-spacing: -0.02em;
    }
    .gh-logo img {
        width: 130px !important;
    }
}

@media screen and (max-width: 767px) {
    .gh-right-bottom .gh-nav-main {
        display: none !important;
    }
}

@media screen and (max-width: 767px) {
    .global-header.wp-block-toma-global-header,
    .is-scrolled.global-header {
        padding-inline: 15px !important; /* Restore normal state padding */
        box-shadow: none !important;
    }

    html.open_menu .global-header {
        padding: 0 !important; /* Eliminate vertical padding to close top/bottom gaps */
    }

    .global-header .gh-inner {
        padding: 0 15px !important; /* Tightened from 20px to fit 375px screens */
        display: grid !important;
        grid-template-columns: 85px 1fr 44px !important; /* Slightly narrower logo column to give more space to center nav */
        grid-template-rows: 70px !important; /* Force a single row */
        align-items: center !important;
        gap: 10px !important; /* Logical separation between cells */
        height: 70px !important; /* Sync with scrolled height */
        overflow: visible !important; /* Allow small overflows for anti-aliasing */
        width: 100% !important; /* Ensure it doesn't shrink/center on mobile */
        max-width: none !important;
        margin: 0 !important;
    }

    .gh-menu {
        background-color: #292929 !important; /* Unified backdrop with header */
    }

    .gh-left {
        grid-row: 1 !important;
        grid-column: 1 !important;
        justify-self: start !important; /* Anchor specifically to the left edge */
        z-index: 11;
        width: 85px !important;
        flex: 0 0 85px !important;
        display: flex !important;
        align-items: center !important; /* Force vertical center */
        justify-content: center !important;
        height: 100% !important;
        overflow: visible; /* Prevent truncation */
    }

    .gh-menu-snav-list {
        display: flex !important;
        align-items: center !important;
        gap: 30px !important;
        list-style: none !important; /* Remove default bullets */
        padding: 0 !important;
        margin: 0 !important;
    }

    .gh-left a {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
    }

    .gh-logo img {
        width: 80px !important; /* Refined further for perfect balance */
        height: auto !important;
        margin: 0 !important;
        transform: none !important;
    }

    .gh-logo-scroll img {
        width: 80px !important; /* Unified with unscrolled size for consistency */
        height: auto !important;
        margin: 0 !important;
        transform: none !important;
    }

    .gh-left img {
        height: auto !important;
    }

    .gh-right {
        grid-row: 1 !important;
        grid-column: 3 !important;
        justify-self: end !important; /* Anchor exactly to the right edge */
        position: relative !important;
        width: 44px !important;
        justify-content: flex-end !important;
        padding: 0 !important; /* Reset PC padding */
        margin: 0 !important;
    }

    .gh-btn {
        display: flex !important; /* Revealed only on mobile */
        position: relative !important; /* Move into the grid flow */
        margin: 0 !important;
        width: 44px !important;
        height: 44px !important;
        z-index: 20 !important; /* Keep it above nav items but contained */
        align-items: center !important;
        justify-content: center !important;
        transform: translateY(2px) !important;
    }

    .gh-btn button {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        position: relative !important;
    }

    .gh-btn .line {
        width: 24px !important; /* Fixed width for the icon bars */
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        position: absolute !important;
    }

    .gh-btn .line::before {
        width: 24px !important;
        left: 0 !important;
        top: -8px !important; /* Symmetrical top bar */
    }

    .gh-btn .line::after {
        width: 24px !important;
        left: 0 !important;
        top: 8px !important; /* Symmetrical bottom bar */
    }

    /* Solid bar covering the entire header area when menu is open */
    html.open_menu .gh-inner {
        background-color: transparent !important;
        height: 70px !important;
        width: 100% !important;
        max-width: none !important;
        gap: 0 !important; /* Close the transparent gaps */
        padding: 0 15px !important; /* Synchronized with closed state (15px) */
        position: relative;
        grid-template-columns: 85px 1fr 44px !important; /* Synchronized with closed state logo column */
    }

    /* The ultimate shield: a full-width background bar */
    html.open_menu .gh-inner::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        height: 70px;
        background-color: #292929;
        z-index: 100; /* Above menu content */
        pointer-events: none;
    }

    html.open_menu .gh-left,
    html.open_menu .gh-sp-nav,
    html.open_menu .gh-btn {
        background-color: transparent !important; /* Managed by pseudo-element parent */
        z-index: 101 !important; /* Must be above the pseudo-shield */
        height: 70px !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
    }

    html.open_menu .gh-left {
        width: 85px !important;
        padding-left: 20px !important; /* Requested breathing room for logo */
        justify-content: flex-start !important;
    }

    html.open_menu .gh-btn {
        width: 44px !important;
        padding-right: 0 !important; /* Reset to original tight fit */
        justify-content: flex-end !important;
    }

    html.open_menu .gh-sp-nav {
        flex: 1 !important;
        justify-self: center !important;
        display: flex !important;
        justify-content: center !important;
        width: auto !important;
    }

    html.open_menu .gh-right {
        background-color: transparent !important;
        height: auto !important;
        z-index: 102 !important; /* Higher than the shield (100) */
    }

    .open_menu .gh-btn .line {
        background-color: transparent !important;
    }

    html.open_menu .gh-btn .line::before {
        top: 0 !important;
        transform: translateX(-50%) rotate(45deg) !important;
        transform-origin: center !important;
        background-color: #fff !important;
        width: 24px !important;
    }

    html.open_menu .gh-btn .line::after {
        top: 0 !important;
        transform: translateX(-50%) rotate(-45deg) !important;
        transform-origin: center !important;
        background-color: #fff !important;
        width: 24px !important;
    }

    .gh-logo,
    .gh-logo-scroll {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        line-height: 0 !important;
    }

    .gh-logo {
        display: block !important;
    }

    .gh-logo a,
    .gh-logo-scroll a {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        padding: 0 !important;
    }

    /* Unified logo sizes handled above (100px unscrolled / 60px scrolled) */
    .is-scrolled .gh-logo,
    html.open_menu .gh-logo {
        display: none !important;
    }
    .gh-logo-scroll {
        display: none !important;
    }
    .is-scrolled .gh-logo-scroll,
    html.open_menu .gh-logo-scroll {
        display: block !important;
    }

    .gh-nav-sns, .gh-nav-lang {
        display: none !important;
    }
    
    .gh-right-top {
        display: none !important;
    }

    /* Force SNS icons to white in mobile menu */
    .gh-menu-box .gh-nav-sns a {
        color: #fff !important;
    }

    /* Prevent Mega Menu ghosts on mobile */
    .gh-nav-mega {
        display: none !important;
    }
}
.gh-menu-snav {
    margin-top: 0 !important;
}

.gh-menu-inner {
    padding: 60px 0 0 !important; /* Tightened from 100px */
}
.gh-menu-box {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
/* Clean logical separation for burger menu sections */
.gh-menu-footer .gf-bottom {
    display: flex !important;
    width: 100% !important;
    max-width: 1080px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    box-sizing: border-box !important;
}

.gf-nav {
    order: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    width: 100% !important;
    max-width: 1080px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    padding-block: 60px !important;
    box-sizing: border-box !important;
}

/* Hard reset for navigation items to ensure text alignment with logo */
.gf-nav-item,
.gf-nav-item-hd {
    margin: 0 !important;
    padding: 0 !important;
}

.gh-menu-footer {
    order: 2 !important;
    width: 100% !important;
    background: #292929 !important; /* Matched to header bar color */
}

.gh-menu-footer .global_footer {
    width: 100% !important;
    background: transparent !important;
    padding: 0 !important;
    margin-top: 0 !important; /* Eliminate the theme's 100px default margin */
}

.gh-menu-footer .gf-bottom {
    display: none !important; /* Hide logo/contact section in burger menu per user request */
}

.gh-menu-footer,
.gh-menu-footer a,
.gh-menu-footer p,
.gh-menu-footer dl,
.gh-menu-footer dt,
.gh-menu-footer dd,
.gh-menu-footer li,
.gh-menu-footer span {
    color: #fff !important;
}

.gh-menu-footer .gf-nav-item-hd-icon::before {
    border-color: #fff !important;
}

@media screen and (max-width: 1023px) {
    .gf-nav {
        padding-inline: 20px !important;
    }
}

@media screen and (max-width: 767px) {
    .gf-nav {
        grid-template-columns: 1fr !important;
    }
    /* Logo section hidden globally above */
}
/* Language Button & Modal Styles */

.gh-nav-lang {
    position: relative;
    z-index: 2;
    background: #FFF;
    display: inline-block;
}

.gh-nav-lang-btn {
    appearance: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 6px 14px 6px 15px;
    border: 1px solid #fff;
    border-bottom: none;
    background: transparent;
    transition: border 400ms ease;
    cursor: pointer;
    font-family: inherit;
}

.gh-nav-lang.show .gh-nav-lang-btn {
    border-color: #B4B4B4;
}

.gh-nav-lang .icon-lang {
    font-size: 20px;
    line-height: 1;
}

.gh-nav-lang-text {
    padding: 0 10px 0 5px; /* Shorter gap from globe icon */
    font-size: 14px;
    font-weight: 500; /* Thinner font as requested */
}

.gh-nav-lang .icon-arrow-b {
    display: inline-block;
    font-size: 10px;
    transform: rotate(0deg);
    transition: transform 400ms ease;
}

.gh-nav-lang.show .icon-arrow-b {
    transform: rotateX(180deg);
}

.gh-nav-lang-box {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    min-width: 160px !important;
    border: 1px solid #B4B4B4 !important;
    border-top: none !important;
    background: #FFF !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    z-index: 10010 !important;
}

.gh-nav-lang-item {
    font-size: 14px;
    list-style: none;
}

/* Cleaned up duplicate declarations */

.gh-nav-lang-item a {
    display: block;
    padding: 8px 14px;
    text-decoration: none;
    color: #333;
    transition: background 400ms ease;
}

.gh-nav-lang-item a:hover {
    background: #EFEFEF;
}

.gh-nav-lang-item:last-child {
    border-top: 1px solid #B4B4B4;
}

/* Modal Styles */
.lang-modal-show {
    overflow: hidden;
}

.lang-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200000 !important; /* Above the header (100000) */
    overflow: auto;
}

.lang-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.lang-modal-wrapper {
    position: relative;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 780px;
    padding: 45px 30px;
    background: #FFF;
    border-radius: 20px;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
}

.lang-modal-close {
    appearance: none;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: opacity 400ms ease;
}

.lang-modal-close:hover {
    opacity: 0.6;
}

.lang-modal-close::before,
.lang-modal-close::after {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background: #666;
}

.lang-modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.lang-modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.lang-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.lang-modal-content-hd {
    text-align: center;
    font-size: 24px;
    line-height: 1.5;
    font-weight: 700;
    margin: 0;
}

.lang-modal-content-text {
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

.lang-modal-content-term {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
}

.lang-modal-content-term a {
    color: #333;
    text-decoration: underline;
}

.lang-modal-content-google img {
    width: 112px;
    height: auto;
}

/* Button inside modal */
.parts-btn-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: #222;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.3s;
}

.parts-btn-link:hover {
    background: #444;
}

.parts-btn-icon {
    margin-left: 10px;
}

@media screen and (max-width: 767px) {
    .lang-modal-wrapper {
        padding: 30px 20px;
    }
    .lang-modal-content-hd {
        font-size: 18px;
    }
    .lang-modal-content-text {
        font-size: 14px;
    }
}

/* SP Scrolled Quick Navigation */
.gh-sp-nav {
    display: none;
}

@media screen and (max-width: 767px) {
    .gh-sp-nav {
        display: none !important;
        grid-column: 2 !important; /* Explicitly anchor to the middle column */
        grid-row: 1 !important; /* Force to first row */
        justify-self: center !important; /* Center the navigation icons for better balance */
        z-index: 12; /* Ensure visibility over logos */
    }

    .is-scrolled .gh-sp-nav {
        display: block !important;
    }

    .gh-sp-nav-list {
        display: flex !important;
        flex-wrap: nowrap !important; /* Never wrap */
        align-items: stretch !important;
        gap: 0 !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .gh-sp-nav-item {
        display: block !important;
        position: relative !important;
        padding: 0 12px !important; /* Slightly relaxed from 8px for better breathing room */
        flex: 0 0 auto !important; /* Prevent items from collapsing/shrinking into each other */
    }

    .gh-sp-nav-item:not(:last-child)::after {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 14px;
        width: 1px;
        background: rgba(0,0,0,0.15);
        z-index: 5;
    }

    .gh-sp-nav-item a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important; /* Center content within the 70px block */
        height: 100% !important;
        text-decoration: none !important;
        color: #333 !important;
    }

    html.open_menu .gh-sp-nav-item a {
        color: #fff !important;
    }

    html.open_menu .gh-sp-nav-item:not(:last-child)::after {
        background: rgba(255, 255, 255, 0.2);
    }

    .gh-sp-nav-item [class^="icon-"] {
        display: block !important;
        visibility: visible !important;
        font-size: 18px !important;
        line-height: 1 !important;
        margin-bottom: 4px !important;
        opacity: 1 !important;
    }

    .gh-sp-nav-text {
        font-size: 9px; /* Compact font */
        font-weight: 700;
        white-space: nowrap;
        line-height: 1.2; /* Room for descenders */
        letter-spacing: -0.05em; /* Squeeze text slightly for small screens */
    }

    /* Menu container adjustments */
    .gh-menu-inner {
        height: 100dvh !important;
        overflow-y: auto !important;
    }

    .gh-menu-box {
        height: auto !important; /* Allow natural expansion */
        min-height: calc(100dvh - 70px) !important;
        margin-top: 0 !important;
        padding-bottom: 200px !important; /* Massive buffer for the 'Bottomless List' */
        display: flex !important;
        flex-direction: column !important;
    }

    /* Footer bottom and SNS hidden globally to keep menu simple */
}

/* 
   FINAL OVERRIDE FOR OPEN MENU SNS (PC)
   Placed at the end of file to win all specificity wars.
*/
@media screen and (min-width: 768px) {
    /* Center the header content within the 1080px grid when menu is open */
    /* Center the header content within the 1080px grid when menu is open or closing */
    html.open_menu .gh-inner,
    html.menu-closing .gh-inner,
    html.open_menu .gh-menu-inner,
    html.menu-closing .gh-menu-inner {
        max-width: 1080px !important;
        margin-inline: auto !important;
        padding-inline: 20px !important; /* Added 20px breathing room to prevent window contact */
        display: flex !important;
        flex-direction: column !important; /* Stack rows */
    }

    html.open_menu .gh-inner,
    html.menu-closing .gh-inner {
        flex-direction: row !important; /* Header bar remains row */
        justify-content: space-between !important;
        align-items: center !important;
        position: relative !important;
    }

    /* Right-aligned layout for menu content within 1080px grid */
    html.open_menu .gh-menu-top-pc,
    html.menu-closing .gh-menu-top-pc {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 30px !important;
        margin-bottom: 20px !important; /* Space above sub-nav */
        margin-top: 10px !important; /* Breathing room from header bar */
        width: 100% !important;
    }

    html.open_menu .gh-menu-snav,
    html.menu-closing .gh-menu-snav {
        display: flex !important;
        justify-content: flex-end !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* Target all SNS icons and Lang text inside the new menu container */
    /* Ensure they stay styled during open AND closing states */
    html.open_menu .gh-menu-top-pc [class^="icon-sns-"],
    html.menu-closing .gh-menu-top-pc [class^="icon-sns-"],
    html.open_menu .gh-menu-top-pc [class^="icon-sns-"]::before,
    html.menu-closing .gh-menu-top-pc [class^="icon-sns-"]::before,
    html.open_menu .gh-menu-top-pc .gh-nav-lang-text,
    html.menu-closing .gh-menu-top-pc .gh-nav-lang-text,
    html.open_menu .gh-menu-top-pc .icon-lang,
    html.menu-closing .gh-menu-top-pc .icon-lang,
    html.open_menu .gh-menu-top-pc .icon-arrow-b,
    html.menu-closing .gh-menu-top-pc .icon-arrow-b {
        color: #fff !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    .gh-menu-snav-list {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* --------------------------------------------------
   Core Header & Menu Definitions (Migrated from assets)
   Integrated to prevent source-of-truth conflicts.
-------------------------------------------------- */

.gh-logo-scroll img {
    -webkit-transition: -webkit-filter 400ms ease;
    transition: -webkit-filter 400ms ease;
    transition: filter 400ms ease;
    transition: filter 400ms ease, -webkit-filter 400ms ease;
}

.open_menu .gh-logo-scroll img,
.menu-closing .gh-logo-scroll img {
    -webkit-filter: brightness(0) invert(1);
    filter: brightness(0) invert(1);
}

/* Base SNS & Language (Non-block scoped fallbacks) */
.gh-nav-sns a {
    -webkit-transition: color 400ms ease, opacity 400ms ease;
    transition: color 400ms ease, opacity 400ms ease;
}

.open_menu .gh-nav-sns a,
.menu-closing .gh-nav-sns a {
    color: #FFF !important;
}

.gh-nav-lang-btn {
    -webkit-transition: border 400ms ease;
    transition: border 400ms ease;
}

.gh-nav-lang .icon-arrow-b {
    -webkit-transition: -webkit-transform 400ms ease;
    transition: -webkit-transform 400ms ease;
    transition: transform 400ms ease;
}

.gh-nav-lang-item a {
    -webkit-transition: background 400ms ease;
    transition: background 400ms ease;
}

/* Main Menu Icons */
.gh-nav-main .icon-logo-obj {
    position: absolute;
    bottom: -37px;
    left: 50%;
    margin-left: -35px;
    -webkit-transform: scaleX(0);
    transform: scaleX(0);
    font-size: 16px;
    color: #D7D7D7;
    -webkit-transition: -webkit-transform 400ms ease;
    transition: -webkit-transform 400ms ease;
    transition: transform 400ms ease;
}

.gh-nav-main-item.show .icon-logo-obj {
    -webkit-transform: scaleX(1);
    transform: scaleX(1);
}

/* Burger Button Base */
.gh-btn button {
    -webkit-transition: opacity 400ms ease;
    transition: opacity 400ms ease;
}

.gh-btn .line {
    -webkit-transition: background 400ms cubic-bezier(0.61, 1, 0.88, 1) 150ms;
    transition: background 400ms cubic-bezier(0.61, 1, 0.88, 1) 150ms;
}

.gh-btn .line::before,
.gh-btn .line::after {
    -webkit-transition: background 400ms cubic-bezier(0.61, 1, 0.88, 1) 150ms, width 300ms cubic-bezier(0.61, 1, 0.88, 1), -webkit-transform 400ms cubic-bezier(0.61, 1, 0.88, 1) 150ms;
    transition: background 400ms cubic-bezier(0.61, 1, 0.88, 1) 150ms, width 300ms cubic-bezier(0.61, 1, 0.88, 1), -webkit-transform 400ms cubic-bezier(0.61, 1, 0.88, 1) 150ms;
    transition: transform 400ms cubic-bezier(0.61, 1, 0.88, 1) 150ms, background 400ms cubic-bezier(0.61, 1, 0.88, 1) 150ms, width 300ms cubic-bezier(0.61, 1, 0.88, 1);
}

/* --------------------------------------------------
   gh-menu Base Position & Animation
-------------------------------------------------- */
.gh-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 0;
    overflow: hidden;
    background: #292929;
    z-index: 100;
    -webkit-transition: height 400ms ease;
    transition: height 400ms ease;
}

.open_menu .gh-menu {
    height: 100dvh;
}

.menu-closing .gh-menu {
    height: 0;
}

.gh-menu-inner {
    height: 100dvh;
    overflow-y: auto !important;
    scrollbar-width: none;
    -ms-overflow-style: none; /* IE/Edge */
}

.gh-menu-inner::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Responsive Overrides migrated from assets */
@media screen and (max-width: 767px) {
    .gh-menu-inner {
        height: auto;
        overflow: visible;
    }

    .gh-menu-box {
        height: calc(100dvh - 164px);
        overflow-y: auto !important;
        scrollbar-width: none;
        margin-top: 124px;
    }
}

/* --- Language Dropdown --- */
.gh-nav-lang {
    position: relative;
    z-index: 2;
    background: #FFF;
}

.gh-nav-lang.show .gh-nav-lang-btn {
    border-color: #B4B4B4 !important;
}

.gh-nav-lang.show .icon-arrow-b {
    -webkit-transform: rotateX(180deg);
    transform: rotateX(180deg);
}

.gh-nav-lang-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 6px 14px 6px 15px;
    border: 1px solid #fff;
    background: transparent;
}

.gh-nav-lang-text {
    padding: 0 15px 0 10px;
    font-size: 0.875rem;
    font-weight: 700;
}

.gh-nav-lang-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border: 1px solid #B4B4B4;
    border-top: none;
    background: #FFF;
}

.gh-nav-lang-item {
    font-size: 0.875rem;
    line-height: 1.5714285714;
    font-weight: 500;
}

.gh-nav-lang-item a {
    display: block;
    padding: 3px 14px;
}

/* --- Burger Button Display & Base --- */
.gh-btn {
    display: flex !important;
    width: 24px !important;
    height: 22px !important;
    position: relative !important;
    z-index: 200 !important;
    align-items: center !important;
    justify-content: center !important;
    transform: translateY(2px) !important;
}

.gh-btn button {
    appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.gh-btn .line,
.gh-btn .line::before,
.gh-btn .line::after {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #222;
}

.gh-btn .line {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.gh-btn .line::before {
    content: "";
    top: -8px;
}

.gh-btn .line::after {
    content: "";
    top: 8px;
}

/* State Changes */
.open_menu .gh-btn .line {
    background-color: transparent !important;
}

.open_menu .gh-btn .line::before {
    top: 0 !important;
    transform: rotate(45deg);
    background-color: #fff !important;
}

.open_menu .gh-btn .line::after {
    top: 0 !important;
    transform: rotate(-45deg);
    background-color: #fff !important;
}

/* --- Menu Content: Navigation & Logic --- */
.gh-menu-snav {
    width: 70.2781844802%;
    margin: 104px auto 0;
    color: #FFF;
}

@media screen and (max-width: 767px) {
    .gh-menu-snav {
        width: calc(100% - 40px) !important;
        margin: 40px 20px 0 !important;
    }
}

.gh-menu-snav-list {
    display: flex;
    justify-content: flex-end;
    gap: 50px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media screen and (max-width: 767px) {
    .gh-menu-snav-list {
        justify-content: center;
        gap: 30px;
    }
}

.gh-menu-snav-item {
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.1em;
}

.gh-menu-snav-icon {
    padding-right: 10px;
    vertical-align: middle;
}

/* --- Internal Footer Info In Menu --- */
.gh-menu .gf-nav {
    padding-top: 60px;
    padding-bottom: 60px;
}

@media screen and (max-width: 767px) {
    .gh-menu .gf-nav {
        padding: 30px 20px !important;
        width: 100% !important;
    }
    
    .gh-menu .gf-logo {
        display: none !important;
    }
}

/* --- Final Cleanup Reset --- */
.gh-nav ul,
.gh-nav li,
.gh-nav-sns-list,
.gh-nav-sns-item,
.gh-nav-main-list,
.gh-nav-main-item,
.gh-nav-lang-list,
.gh-nav-lang-item {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
