/* Trial only. Shared navigation reserves header geometry before JS; the
   controller still validates the DOM and owns scrolling/interaction states. */
#body_wrap.hamuya-trial-page {
  --hamuya-header-assets: 1;
  --swl-logo_size_pc: 52px;
}
#body_wrap.hamuya-trial-page.hamuya-header-ready {
  --swl-header_h: var(--hamuya-header-height, 88px);
}
/* Reserve the native toolbar before JS measures it. Never reposition its children. */
html:has(#wpadminbar) #body_wrap.hamuya-trial-page {
  --hamuya-bar-bottom: var(--wp-admin--admin-bar--height, 32px);
}
@media (max-width: 782px) {
  html:has(#wpadminbar) #body_wrap.hamuya-trial-page {
    --hamuya-bar-bottom: var(--wp-admin--admin-bar--height, 46px);
  }
}
#body_wrap.hamuya-trial-page.hamuya-header-ready #header {
  --hamuya-header-ink: #34312D;
  --hamuya-symbol-filter: none;
  position: sticky !important;
  top: var(--hamuya-bar-bottom, 0px) !important;
  margin-bottom: calc(-1 * var(--hamuya-header-height)) !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 100;
  background: #F4EFE6 !important;
  color: var(--hamuya-header-ink) !important;
  transition: background-color 200ms ease, color 200ms ease;
}
/* One existing header, not a second menu implementation. */
#body_wrap.hamuya-trial-page.hamuya-header-ready #fix_header {
  display: none !important;
}
#body_wrap.hamuya-trial-page.hamuya-header-ready #header .l-header__inner {
  background: transparent !important;
  color: inherit;
}
@media (min-width: 761px) {
  #body_wrap.hamuya-trial-page:not(.hamuya-header-compact) #header .l-header__inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 88px !important;
    min-height: 88px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
  }
}
/* A menu button can retain focus after closing. Only keyboard navigation in
   the desktop menu keeps this background opaque; never blur SWELL controls. */
#body_wrap.hamuya-trial-page.hamuya-header-ready.hamuya-header-over:not(.hamuya-header-interacting) #header:not(:has(#gnav :focus-visible)) {
  --hamuya-header-ink: #FFFFFF;
  --hamuya-symbol-filter: brightness(0) invert(1);
  background: transparent !important;
  box-shadow: none !important;
}
/* Header logo:
   - Over HERO (transparent header): white house symbol + white "はむ家" (logo-hero-white.png, 284x95).
   - Scrolled (cream #F4EFE6 header): original red/green house symbol only (logo-symbol-color.png, 106x95).
   The inner <img> remains in the DOM with opacity:0 so its alt text and link stay accessible. */
#body_wrap.hamuya-trial-page #header .l-header__logo,
#body_wrap.hamuya-trial-page #header .c-headLogo {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
#body_wrap.hamuya-trial-page #header .c-catchphrase {
  display: none !important;
}
#body_wrap.hamuya-trial-page #header .c-headLogo__link {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  width: var(--hamuya-logo-width, 58px) !important;
  height: var(--hamuya-logo-height, 52px) !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  text-decoration: none !important;
  transform: none !important;
  vertical-align: middle;
}
#body_wrap.hamuya-trial-page #header .c-headLogo__link:hover {
  background: transparent !important;
  transform: none !important;
  opacity: 0.88;
}
#body_wrap.hamuya-trial-page #header .c-headLogo__link img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
#body_wrap.hamuya-trial-page #header .c-headLogo__link::before,
#body_wrap.hamuya-trial-page #header .c-headLogo__link::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background-repeat: no-repeat !important;
  background-position: var(--hamuya-logo-position, left center) !important;
  background-size: var(--hamuya-logo-size, contain) !important;
  pointer-events: none !important;
  transition: opacity 180ms ease !important;
}
#body_wrap.hamuya-trial-page #header .c-headLogo__link::before {
  background-image: url("../images/logo/logo-symbol-color.png") !important;
  filter: var(--hamuya-symbol-filter, none);
  opacity: 1 !important;
}
#body_wrap.hamuya-trial-page #header .c-headLogo__link::after {
  background-image: url("../images/logo/logo-hero-white.png") !important;
  opacity: 0 !important;
}
#body_wrap.hamuya-trial-page.hamuya-header-ready.hamuya-header-over:not(.hamuya-header-interacting):not(.hamuya-header-compact) #header:not(:has(#gnav :focus-visible)) .c-headLogo__link {
  width: var(--hamuya-over-logo-width, 155px) !important;
}
#body_wrap.hamuya-trial-page.hamuya-header-ready.hamuya-header-over:not(.hamuya-header-interacting):not(.hamuya-header-compact) #header:not(:has(#gnav :focus-visible)) .c-headLogo__link::before {
  opacity: var(--hamuya-over-logo-house-opacity, 0) !important;
}
#body_wrap.hamuya-trial-page.hamuya-header-ready.hamuya-header-over:not(.hamuya-header-interacting):not(.hamuya-header-compact) #header:not(:has(#gnav :focus-visible)) .c-headLogo__link::after {
  opacity: var(--hamuya-over-logo-wordmark-opacity, 1) !important;
}
/* Vertically center desktop navigation alongside logo and Book Now button. */
#body_wrap.hamuya-trial-page #header #gnav,
#body_wrap.hamuya-trial-page #header .l-header__gnav {
  display: flex !important;
  align-items: center !important;
  align-self: center !important;
  height: auto !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
#body_wrap.hamuya-trial-page #header .c-gnav {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
#body_wrap.hamuya-trial-page #header .c-gnav > li {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}
#body_wrap.hamuya-trial-page #header .c-gnav > li:not(.btn-hamu-booknow) > a:not(.btn-hamu-booknow) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  min-height: 44px !important;
  padding: 8px 12px !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}
#body_wrap.hamuya-trial-page #header .c-gnav > li:not(.btn-hamu-booknow) > a:not(.btn-hamu-booknow) .ttl {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2 !important;
}
/* The supplied Additional CSS sets color on .c-gnav itself.
   Styling #gnav alone cannot override a color declared on a nested list.
   Target the known menu class without assuming that #gnav is the list. */
#body_wrap.hamuya-trial-page.hamuya-header-ready #header .c-gnav,
#body_wrap.hamuya-trial-page.hamuya-header-ready #header .c-gnav > li:not(.btn-hamu-booknow) > a:not(.btn-hamu-booknow) {
  color: var(--hamuya-header-ink) !important;
  text-shadow: none;
}
/* Only top-level navigation: do not turn dropdown links white. */
#body_wrap.hamuya-trial-page.hamuya-header-ready #header #gnav,
#body_wrap.hamuya-trial-page.hamuya-header-ready #header #gnav > li:not(.btn-hamu-booknow) > a:not(.btn-hamu-booknow),
#body_wrap.hamuya-trial-page.hamuya-header-ready #header .l-header__menuBtn,
#body_wrap.hamuya-trial-page.hamuya-header-ready #header .l-header__customBtn,
#body_wrap.hamuya-trial-page.hamuya-header-ready #header :is(.l-header__menuBtn, .l-header__customBtn) :is(a, button) {
  color: var(--hamuya-header-ink) !important;
  text-shadow: none;
}
/* Header Book Now button: compact 1-line horizontal rectangle ("BOOK NOW ↗").
   Scrolled / opaque cream header state: solid #C8392A background, no border, white text. */
#body_wrap.hamuya-trial-page #header li.btn-hamu-booknow,
#body_wrap.hamuya-trial-page #header .c-gnav > li:has(.btn-hamu-booknow) {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  flex-shrink: 0 !important;
  height: auto !important;
}
#body_wrap.hamuya-trial-page #header .c-gnav > li:has(.btn-hamu-booknow) > a:not(.btn-hamu-booknow) {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transform: none !important;
}
#body_wrap.hamuya-trial-page #header .btn-hamu-booknow {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  flex-shrink: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 36px !important;
  padding: 8px 14px !important;
  margin: 0 !important;
  background: #C8392A !important;
  color: #FFFFFF !important;
  font-family: "Zen Kaku Gothic New", "Zen Maru Gothic", "Yu Gothic", Meiryo, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  border: 1px solid transparent !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease !important;
}
#body_wrap.hamuya-trial-page #header .btn-hamu-booknow:hover,
#body_wrap.hamuya-trial-page #header .btn-hamu-booknow:focus-visible {
  background: #AB2F23 !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
}
/* Over HERO video / transparent header state: transparent background, 1px white border, white text. */
#body_wrap.hamuya-trial-page.hamuya-header-ready.hamuya-header-over:not(.hamuya-header-interacting) #header:not(:has(#gnav :focus-visible)) .btn-hamu-booknow {
  background: transparent !important;
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
}
#body_wrap.hamuya-trial-page.hamuya-header-ready.hamuya-header-over:not(.hamuya-header-interacting) #header:not(:has(#gnav :focus-visible)) .btn-hamu-booknow:hover,
#body_wrap.hamuya-trial-page.hamuya-header-ready.hamuya-header-over:not(.hamuya-header-interacting) #header:not(:has(#gnav :focus-visible)) .btn-hamu-booknow:focus-visible {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
}
/* Hide bed icon and any forced line breaks inside the button; keep text on 1 line. */
#body_wrap.hamuya-trial-page #header .btn-hamu-booknow :is(i, svg, br, .c-gnav__icon, .sub) {
  display: none !important;
}
#body_wrap.hamuya-trial-page #header .btn-hamu-booknow :is(a, span, .ttl) {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: #FFFFFF !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-transform: inherit !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
}
#body_wrap.hamuya-trial-page #header .btn-hamu-booknow > a::before,
#body_wrap.hamuya-trial-page #header .btn-hamu-booknow > a::after,
#body_wrap.hamuya-trial-page #header .c-gnav > li:has(.btn-hamu-booknow) > a::before,
#body_wrap.hamuya-trial-page #header .c-gnav > li:has(.btn-hamu-booknow) > a::after {
  content: none !important;
  display: none !important;
}
#body_wrap.hamuya-trial-page #header .btn-hamu-booknow::after {
  content: "↗" !important;
  position: static !important;
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  margin-left: 0.45em !important;
  background: transparent !important;
  color: #FFFFFF !important;
  font-size: 1em !important;
  line-height: 1 !important;
  opacity: 1 !important;
  transform: none !important;
}
/* Native icon shapes, breakpoints and menu visibility remain SWELL's. */
#body_wrap.hamuya-trial-page.hamuya-header-ready #header :is(a, button):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
#body_wrap.hamuya-trial-page.hamuya-header-ready #header .btn-hamu-booknow:focus-visible,
#body_wrap.hamuya-trial-page.hamuya-header-ready #header .btn-hamu-booknow a:focus-visible {
  outline: 2px solid var(--hamuya-header-ink, #34312D);
  outline-offset: 3px;
}
#body_wrap.hamuya-trial-page.hamuya-header-ready .hamuya-home .hero {
  padding-top: calc(32px + var(--hamuya-header-height));
}
/* Panel targets come from actual aria-controls attributes, never guessed SWELL IDs. */
html.hamuya-header-document .hamuya-header-controlled-panel {
  background-color: #F4EFE6 !important;
  color: #34312D !important;
}
@media (max-width: 760px) {
  #body_wrap.hamuya-trial-page #header .c-headLogo__link {
    width: var(--hamuya-logo-width, 49px) !important;
    height: var(--hamuya-logo-height, 44px) !important;
  }
  #body_wrap.hamuya-trial-page #header .c-headLogo__link::before,
  #body_wrap.hamuya-trial-page #header .c-headLogo__link::after {
    background-position: center center !important;
  }
  #body_wrap.hamuya-trial-page.hamuya-header-ready.hamuya-header-over:not(.hamuya-header-interacting):not(.hamuya-header-compact) #header:not(:has(#gnav :focus-visible)) .c-headLogo__link {
    width: var(--hamuya-over-logo-width, 132px) !important;
  }
  #body_wrap.hamuya-trial-page.hamuya-header-ready .hamuya-home .hero {
    padding-top: calc(25px + var(--hamuya-header-height));
  }
}
@media (prefers-reduced-motion: reduce) {
  #body_wrap.hamuya-trial-page.hamuya-header-ready #header,
  #body_wrap.hamuya-trial-page #header .c-headLogo__link::before,
  #body_wrap.hamuya-trial-page #header .c-headLogo__link::after,
  #body_wrap.hamuya-trial-page #header .btn-hamu-booknow { transition: none !important; }
}
/* SWELL mobile navigation: hide desktop menu */

  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-languages {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; max-width: 320px; margin: 0 0 28px; padding: 0; color: #34312D;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-language {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; padding: 0 4px; box-sizing: border-box;
    font-size: 15px; font-weight: 400; color: #34312D; background: none; border: 0;
    text-decoration: none; box-shadow: none;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-language[aria-current="true"] { text-decoration: underline; text-underline-offset: 5px; }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-language::before,
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-language::after { content: none; }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-language-separator { font-size: 14px; }


/* HAMUYA fullscreen menu prototype.
   :has() scopes an existing SWELL panel even when it is outside #body_wrap.
   SWELL retains visibility, pointer events, menu state, focus and scroll locking.
   Remove this block to restore the standard panel layout. */

  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu {
    --hamuya-menu-top: 0px;
    position: fixed;
    /* Cover the viewport even when a mobile admin bar scrolls out of view.
       Reserve its space inside the moving panel, not above the panel. */
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    color: #34312D;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))):has(#wpadminbar) #sp_menu {
    --hamuya-menu-top: 32px;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__inner {
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #F4EFE6 !important;
    color: #34312D;
    border: 0;
    box-shadow: none;
    /* SWELL owns transition/animation timing, including reduced motion. */
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__inner::before {
    background-color: #F4EFE6;
  }
  /* SWELL's -88vw leaves 12vw visible after expanding the panel to full width.
     Include the initial state before data-spmenu is set; leave opened untouched. */
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))):not([data-spmenu="opened"]) #sp_menu .p-spMenu__inner {
    transform: translateX(-100%);
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__body {
    position: absolute;
    inset: calc(72px + var(--hamuya-menu-top) + env(safe-area-inset-top, 0px)) 0 0;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 8px max(24px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    background: #F4EFE6 !important;
    color: #34312D;
    border: 0;
    box-shadow: none;
  }
  /* Verified MENU heading only; keep other widget titles and menu items. */
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__body .c-widget__title.-spmenu {
    display: none !important;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu :is(.p-spMenu__nav, .p-spMenu__nav ul) {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__nav li {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__nav li > a {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 56px;
    padding: 14px 0;
    color: #34312D;
    background: transparent;
    border: 0;
    box-shadow: none;
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__nav li > a:hover {
    color: #C8392A;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu :is(a, button):focus-visible {
    outline: 2px solid #C8392A;
    outline-offset: 3px;
  }
  /* Verified close wrapper/button; do not reposition other toggleMenu controls. */
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__closeBtn {
    position: absolute;
    top: calc(12px + var(--hamuya-menu-top) + env(safe-area-inset-top, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: auto;
    left: auto;
    z-index: 2;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    transform: none;
    background: transparent !important;
    border: 0;
    box-shadow: none;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__closeBtn button.c-iconBtn.-menuBtn.c-plainBtn[data-onclick="toggleMenu"] {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 48px;
    min-height: 48px;
    margin: 0;
    padding: 8px;
    color: #34312D;
    background: transparent !important;
    border: 0;
    box-shadow: none;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .p-spMenu__closeBtn .c-iconBtn__icon.icon-close-thin {
    color: inherit;
    font-size: 26px;
    line-height: 1;
  }

@media (max-width: 782px) {
  html:has(#body_wrap.hamuya-trial-page):has(#wpadminbar) #sp_menu { --hamuya-menu-top: 46px; }
}

/* Six trial links only; completed panel/close-button/transform rules above stay intact. */

  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-recruitment {
    width: 100%; max-width: 320px; margin: 0; padding: 8px 0 0;
    border-top: 1px solid #34312D30;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-recruitment > :is(a, span) {
    display: inline-flex; align-items: center; min-height: 44px;
    padding: 8px 0; font-family: var(--sans); font-size: 14px; line-height: 1.6;
    font-weight: 400; color: #34312D; background: transparent;
    border: 0; box-shadow: none; text-decoration: none;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-recruitment > a:hover { color: #C8392A; }

@keyframes hamuya-menu-cross { from { transform: translateX(0); } to { transform: translateX(24px); } }
@keyframes hamuya-menu-leg-front { 0%,100% { transform: rotate(-17deg); } 50% { transform: rotate(19deg); } }
@keyframes hamuya-menu-leg-back { 0%,100% { transform: rotate(19deg); } 50% { transform: rotate(-17deg); } }
@keyframes hamuya-menu-arm-front { 0%,100% { transform: rotate(15deg); } 50% { transform: rotate(-14deg); } }
@keyframes hamuya-menu-arm-back { 0%,100% { transform: rotate(-14deg); } 50% { transform: rotate(15deg); } }

  html[lang|="ja"]:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-stroll {
    height: 34px; width: 64px; flex: 0 0 64px; margin: 0;
    overflow: hidden; pointer-events: none;
  }
  #sp_menu .hamuya-menu-stroll * { pointer-events: none; }
  #sp_menu .hamuya-menu-stroll .hamuya-menu-traveler { width: 27.2px; height: 34px; }
  #sp_menu .hamuya-menu-stroll svg { display: block; width: 27.2px; height: 34px; }
  #sp_menu .hamuya-menu-stroll.is-walking .hamuya-menu-traveler { animation: hamuya-menu-cross 3.2s linear 1 both; }
  #sp_menu .hamuya-menu-stroll :is(.limb-leg-front,.limb-leg-back) { transform-box: view-box; transform-origin: 40px 55px; }
  #sp_menu .hamuya-menu-stroll :is(.limb-arm-front,.limb-arm-back) { transform-box: view-box; transform-origin: 40px 29px; }
  #sp_menu .hamuya-menu-stroll.is-walking .limb-leg-front { animation: hamuya-menu-leg-front 1.6s ease-in-out 2; }
  #sp_menu .hamuya-menu-stroll.is-walking .limb-leg-back { animation: hamuya-menu-leg-back 1.6s ease-in-out 2; }
  #sp_menu .hamuya-menu-stroll.is-walking .limb-arm-front { animation: hamuya-menu-arm-front 1.6s ease-in-out 2; }
  #sp_menu .hamuya-menu-stroll.is-walking .limb-arm-back { animation: hamuya-menu-arm-back 1.6s ease-in-out 2; }

@media (prefers-reduced-motion: reduce) {
  #sp_menu .hamuya-menu-stroll * { animation: none !important; }
}

  html[lang|="ja"]:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu :is(.hamuya-section-menu li > a, .hamuya-menu-booking, .hamuya-menu-language) {
    font-family: var(--sans);
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu a.hamuya-menu-booking {
    display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; width: 100%; max-width: 320px; min-height: 52px;
    margin: 20px 0 28px; padding: 12px 20px;
    background: #C8392A; color: #FFFFFF; border: 0; border-radius: 2px;
    font-size: 17px; font-weight: 700; line-height: 1.5; text-align: center;
    text-decoration: none; box-shadow: none;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu a.hamuya-menu-booking:is(:hover, :active) { background: #B43225; }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu a.hamuya-menu-booking::before,
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu a.hamuya-menu-booking::after { content: none; }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-logo {
    position: absolute; z-index: 2;
    top: calc(12px + var(--hamuya-menu-top) + env(safe-area-inset-top, 0px));
    left: max(24px, env(safe-area-inset-left, 0px));
    display: flex; align-items: center; width: 120px; height: 48px;
    padding: 0; margin: 0; border: 0; background: transparent;
  }
  /* Reuse the existing house + はむ家 artwork, recolored for the cream panel. */
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-logo span {
    display: block; width: 120px; height: 40.14px; background: #34312D;
    -webkit-mask: url("../images/logo/logo-hero-white.png") center / contain no-repeat;
    mask: url("../images/logo/logo-hero-white.png") center / contain no-repeat;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-logo::before,
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-logo::after { content: none; }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-section-menu { padding: 12px 0 20px; }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-section-menu li { display: block; margin: 0 0 8px; border: 0; }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-section-menu li > a {
    font-size: clamp(20px, 5.4vw, 22px); font-weight: 500; line-height: 1.6;
    padding: 14px 0; min-height: 60px; color: #34312D; border: 0;
  }
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-section-menu :is(li, a)::before,
  html:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-section-menu :is(li, a)::after { content: none; }


/* Keep the decoration outside the town link's tap target. */

  html[lang|="ja"]:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-section-menu .hamuya-menu-town-row {
    display: flex; align-items: center; gap: 16px;
  }
  html[lang|="ja"]:has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-town-row > a {
    flex: 0 1 auto; width: max-content; min-width: 0; overflow-wrap: anywhere;
  }
  html:not([lang|="ja"]):has(#body_wrap.hamuya-trial-page:is(.hamuya-header-compact,:not(.hamuya-navigation-enabled))) #sp_menu .hamuya-menu-stroll { display: none; }


@media (max-width: 959px) {
  #body_wrap.hamuya-trial-page:not(.hamuya-navigation-enabled) #header #gnav { display: none !important; }
}

/* TOP only: the PHP marker is present before the header is painted. The shared
   CSS supplies 88px/64px according to capabilities; JS then refines the measurement.
   Keep the non-enhanced language/header fallback and all lower-page flow intact. */
#body_wrap.hamuya-top-header.hamuya-navigation-enabled {
  --hamuya-header-height: var(--hamuya-header-layout-height, 88px);
}
#body_wrap.hamuya-top-header.hamuya-navigation-enabled #header {
  position: sticky !important; top: var(--hamuya-bar-bottom, 0px) !important;
  margin-bottom: calc(-1 * var(--hamuya-header-height)) !important;
  transform: none !important; opacity: 1 !important; visibility: visible !important; z-index: 100;
}
#body_wrap.hamuya-top-header.hamuya-navigation-enabled .hamuya-home {
  --hamuya-top-offset: var(--hamuya-bar-bottom, 0px);
}
#body_wrap.hamuya-top-header.hamuya-navigation-enabled .hamuya-home .hero {
  padding-top: calc(32px + var(--hamuya-header-height));
}
#body_wrap.hamuya-top-header.hamuya-navigation-enabled:not(.hamuya-header-ready) #header {
  --hamuya-header-ink: #FFFFFF; --hamuya-symbol-filter: brightness(0) invert(1);
  background: transparent !important; box-shadow: none !important;
}
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  #body_wrap.hamuya-top-header.hamuya-navigation-enabled:not(.hamuya-header-ready) #header .c-headLogo__link { width: 155px !important; }
  #body_wrap.hamuya-top-header.hamuya-navigation-enabled:not(.hamuya-header-ready) #header .c-headLogo__link::before { opacity: 0 !important; }
  #body_wrap.hamuya-top-header.hamuya-navigation-enabled:not(.hamuya-header-ready) #header .c-headLogo__link::after { opacity: 1 !important; }
}
@media (max-width: 760px) {
  #body_wrap.hamuya-top-header.hamuya-navigation-enabled .hamuya-home .hero { padding-top: calc(25px + var(--hamuya-header-height)); }
}
