/* Shared trial navigation only. CSS expresses preference; JS verifies actual fit. */
/* Preserve native booking nodes, but never paint their old neighbouring entries.
   The first selector also protects a nonstandard theme fallback when JS is on. */
html.hamuya-navigation-js #body_wrap.hamuya-navigation-enabled #header .c-gnav:not(.hamuya-pc-menu) > li:not(:has(a.btn-hamu-booknow)),
#body_wrap.hamuya-navigation-enabled #header .c-gnav[data-hamuya-navigation="server"] > li:not(.hamuya-pc-menu-item):not(.hamuya-pc-language):not(:has(a.btn-hamu-booknow)) {
  display: none !important;
}
.hamuya-navigation-nojs { padding: 20px; background: #F4EFE6; color: #34312D; }
.hamuya-navigation-nojs ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.hamuya-navigation-nojs a { display: inline-block; padding: 10px 0; color: inherit; }
/* English TOP starts with the same ink as its finished transparent header;
   do not animate from the legacy menu's maroon when the controller starts. */
#body_wrap.hamuya-top-en #header .c-gnav,
#body_wrap.hamuya-top-en #header .c-gnav > li:not(.btn-hamu-booknow) > a:not(.btn-hamu-booknow) {
  color: var(--hamuya-header-ink, #34312D) !important;
}
#body_wrap.hamuya-navigation-enabled {
  --hamuya-prefers-desktop: 0;
  --hamuya-wide-logo-width: 155px;
  --hamuya-color-logo-width: 58px;
  --hamuya-wide-booking-width: 135px;
  --hamuya-header-layout-height: 64px;
  --hamuya-over-logo-width: 46px;
  --hamuya-over-logo-house-opacity: 1;
  --hamuya-over-logo-wordmark-opacity: 0;
}
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  #body_wrap.hamuya-navigation-enabled {
    --hamuya-prefers-desktop: 1; --hamuya-header-layout-height: 88px;
    --hamuya-over-logo-width: 155px;
    --hamuya-over-logo-house-opacity: 0; --hamuya-over-logo-wordmark-opacity: 1;
  }
}
/* Reserve the finished header height before footer scripts run. A measured
   width fallback may still select compact mode; it uses the same 64px geometry. */
#body_wrap.hamuya-navigation-enabled.hamuya-header-compact { --hamuya-header-layout-height: 64px; }
#body_wrap.hamuya-trial-page.hamuya-navigation-enabled #header .l-header__inner {
  height: var(--hamuya-header-layout-height) !important;
  min-height: var(--hamuya-header-layout-height) !important;
}
/* Native logo/menu hosts, before the existing booking node is moved by JS.
   Only the desktop list is offscreen in mobile mode; page content stays visible. */
@media (max-width: 959px), (hover: none), (pointer: coarse), (pointer: none) {
  #body_wrap.hamuya-navigation-enabled:not(.hamuya-header-desktop):not(.hamuya-header-compact) #header {
    --hamuya-logo-width: 46px; --hamuya-logo-height: 44px;
    --hamuya-logo-position: center; --hamuya-logo-size: auto 40px;
  }
  #body_wrap.hamuya-navigation-enabled:not(.hamuya-header-desktop):not(.hamuya-header-compact) #header .l-header__inner {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center; padding: 10px 16px !important; box-sizing: border-box;
  }
  #body_wrap.hamuya-navigation-enabled:not(.hamuya-header-desktop):not(.hamuya-header-compact) #header .l-header__inner > :is(.l-header__logo, .c-headLogo) {
    position: static; transform: none; grid-column: 2; grid-row: 1; justify-self: center;
  }
  #body_wrap.hamuya-navigation-enabled:not(.hamuya-header-desktop):not(.hamuya-header-compact) #header .l-header__menuBtn {
    display: flex !important; position: static; transform: none; align-items: center; justify-content: center;
    grid-column: 1; grid-row: 1; justify-self: start; width: 44px; height: 44px;
  }
  #body_wrap.hamuya-navigation-enabled:not(.hamuya-header-desktop):not(.hamuya-header-compact) #header #gnav {
    position: absolute; left: -10000px; top: 0; width: max-content; visibility: hidden; pointer-events: none;
  }
}
#body_wrap.hamuya-navigation-enabled #header .hamuya-pc-language { position: relative; flex-shrink: 0; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-switch { position: relative; font-family: "Zen Maru Gothic", "Yu Gothic", Meiryo, sans-serif; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-toggle {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 10px;
  border: 0; border-radius: 0; background: transparent; color: var(--hamuya-header-ink, #34312D);
  font: inherit; font-size: 13px; line-height: 1.4; cursor: pointer; white-space: nowrap;
}
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-options {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; min-width: 152px;
  margin: 0; padding: 8px; list-style: none; background: #F4EFE6; color: #34312D;
  border: 1px solid #D7CEC1; box-shadow: 0 6px 18px #34312D1A; font-size: 14px; line-height: 1.6;
}
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-options[hidden] { display: none !important; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-options li { display: block; margin: 0; padding: 0; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-options :is(a, span) {
  display: flex; align-items: center; min-height: 44px; padding: 8px 12px; color: #34312D;
  font: inherit; text-decoration: none; white-space: nowrap;
}
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-options a:hover { background: #E9E2D6; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-options [aria-current="true"] { text-decoration: underline; text-underline-offset: 4px; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-switch :is(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-language-options [aria-disabled="true"],
#body_wrap.hamuya-navigation-enabled .hamuya-footer [aria-disabled="true"],
html:has(#body_wrap.hamuya-navigation-enabled) #sp_menu [aria-disabled="true"] { opacity: .55; cursor: default; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-pc-menu-item [aria-disabled="true"] { opacity: .55; }
#body_wrap.hamuya-navigation-enabled .hamuya-footer a.hamuya-footer-recruitment { margin-top: 18px; min-height: 44px; font-size: 13px; font-weight: 400; }
/* Compact header uses the native menu button and a single portalled reservation link. */
#body_wrap.hamuya-navigation-enabled #header .hamuya-booking-source-empty { display: none; }
#body_wrap.hamuya-navigation-enabled #header .hamuya-header-booking-host { flex: 0 0 auto; }
/* Never animate layout/visibility while measuring or changing interaction mode. */
#body_wrap.hamuya-navigation-enabled #header .c-gnav.hamuya-pc-menu,
#body_wrap.hamuya-navigation-enabled #header .c-gnav.hamuya-pc-menu > li > a { transition-property: color, background-color; }
/* Hidden but measurable; inert/aria-hidden remove this list from interaction in compact mode. */
#body_wrap.hamuya-navigation-enabled.hamuya-header-compact #header #gnav {
  position: absolute; left: -10000px; top: 0; width: max-content; max-width: none;
  visibility: hidden; pointer-events: none;
}
#body_wrap.hamuya-navigation-enabled.hamuya-header-compact #header {
  --swl-header_h: 64px;
  --hamuya-logo-width: 46px;
  --hamuya-logo-height: 44px;
  --hamuya-logo-position: center;
  --hamuya-logo-size: auto 40px;
}
#body_wrap.hamuya-navigation-enabled.hamuya-header-compact #header .l-header__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; position: relative; padding-inline: 16px;
  box-sizing: border-box; height: 64px; min-height: 64px; padding-block: 10px;
}
#body_wrap.hamuya-navigation-enabled.hamuya-header-compact #header .hamuya-header-logo-host {
  position: static; transform: none; grid-column: 2; grid-row: 1; justify-self: center;
}
#body_wrap.hamuya-navigation-enabled.hamuya-header-compact #header .l-header__menuBtn {
  display: flex !important; align-items: center; justify-content: center; position: static; transform: none;
  grid-column: 1; grid-row: 1; justify-self: start; width: 44px; height: 44px;
}
#body_wrap.hamuya-navigation-enabled.hamuya-header-compact #header .l-header__menuBtn :is(button, a) {
  box-sizing: border-box; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
}
#body_wrap.hamuya-navigation-enabled.hamuya-header-compact #header .hamuya-header-booking-host {
  grid-column: 3; grid-row: 1; justify-self: end;
}
@media (min-width: 960px) {
  #body_wrap.hamuya-navigation-enabled #header .c-gnav.hamuya-pc-menu { column-gap: 0; }
  #body_wrap.hamuya-navigation-enabled #header #gnav { flex: 0 0 auto; width: max-content; margin-left: auto; margin-right: 16px; }
}
@media (min-width: 761px) and (max-width: 959px) {
  #body_wrap.hamuya-navigation-enabled .hamuya-footer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) and (max-width: 1099px) {
  #body_wrap.hamuya-navigation-enabled { --hamuya-menu-pad: 6px; }
  #body_wrap.hamuya-navigation-enabled:not(.hamuya-header-compact) #header .l-header__inner { padding-inline: 16px; }
  #body_wrap.hamuya-navigation-enabled #header .hamuya-language-toggle { padding-inline: 6px; }
  #body_wrap.hamuya-navigation-enabled #header #gnav { margin-right: 12px; }
}

/* Chinese TOP/ABOUT trials only: fixed SVG arrows follow the existing link color, never emoji fonts. */
html:has(#body_wrap:is(.hamuya-top-en, .hamuya-about-en, .hamuya-blog-en, .hamuya-top-zh, .hamuya-about-zh, .hamuya-job-zh, .hamuya-blog-zh)) .hamuya-zh-arrow {
  display: inline-block; width: 1em; height: 1em; vertical-align: -.12em; flex-shrink: 0; margin-inline-start: .35em;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
#body_wrap:is(.hamuya-top-en, .hamuya-about-en, .hamuya-blog-en, .hamuya-top-zh, .hamuya-about-zh, .hamuya-job-zh, .hamuya-blog-zh) .find-arrow svg {
  display: inline-block; width: 16px; height: 16px; vertical-align: -.15em;
}
/* Keep the existing native-icon reset; reveal only the English blog booking arrow. */
#body_wrap.hamuya-trial-page.hamuya-blog-en #header .btn-hamu-booknow > svg.hamuya-zh-arrow {
  display: inline-block !important;
}
