/* Keep both controls available wherever a guest is reading. */
:root {
  --controls-top: 21px;
  --controls-right: 4.2vw;
  --toggle-size: 52px;
}
.header .menu-toggle {
  top: var(--controls-top);
  right: var(--controls-right);
  width: var(--toggle-size);
  height: var(--toggle-size);
}
.header-languages {
  position: fixed;
  top: var(--controls-top);
  right: calc(var(--controls-right) + var(--toggle-size) + 14px);
  z-index: 45;
  display: flex;
  align-items: center;
  height: var(--toggle-size);
  color: #161616;
  font: 12px/1 'DM Sans', Arial, sans-serif;
  letter-spacing: .08em;
  pointer-events: auto;
}
.header-languages a {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  font-family: inherit;
  text-underline-offset: .42em;
}
.header-languages a[aria-current="true"] { text-decoration: underline; }
.header-languages a:hover { text-decoration: underline; }
.header-languages a:focus-visible, .menu-toggle:focus-visible { outline: 1px solid currentColor; outline-offset: 0; }
.header-languages span { opacity: .6; }
.header:has(.menu-toggle.is-over-hero) .header-languages { color: #fff; }
.header-languages[hidden], .header:has(.menu-toggle[aria-expanded="true"]) .header-languages { display: none; }

/* A short Japanese phrase moves as one unit until it exceeds the full reading column. */
body:has(#top.hero) .keep-phrase,
.chapter-about .keep-phrase,
.menu-drinks-copy .keep-phrase,
.top-reservation-intro .keep-phrase {
  display: inline-block;
  inline-size: max-content;
  max-inline-size: 100%;
  white-space: normal;
  line-break: strict;
  vertical-align: top;
}

/* English follows the same editorial hierarchy, with horizontal titles and a readable measure. */
html[lang="en"] body { font-family: 'DM Sans', Arial, sans-serif; }
html[lang="en"] main :is(h1, h2, .about-copy p, .feature-copy p, .about-story-copy p, .menu-story-copy p, .menu-drinks-copy p) {
  font-family: Georgia, 'Times New Roman', serif;
}
html[lang="en"] :is(h1, h2, dt, p, .text-link, .site-footer-button, .site-footer-link, .mobile-menu a) { letter-spacing: .025em; }
html[lang="en"] .chapter .page-title-en:lang(ja) { font-family: var(--serif); }
html[lang="en"] .menu-story-copy { word-break: normal; }
html[lang="en"] .menu-story-copy p { text-wrap: pretty; }
html[lang="en"] body:has(#top.hero) .about-copy { max-width: 70ch; }
html[lang="en"] body:has(#top.hero) :is(.about-copy, .feature-copy) p,
html[lang="en"] .chapter :is(.about-story-copy, .menu-drinks-copy, .menu-story-copy) p {
  font-size: 16px;
  letter-spacing: .018em;
  line-height: 1.9;
}
html[lang="en"] body:has(#top.hero) .feature {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-areas: 'title photo' 'copy photo';
  row-gap: 18px;
}
html[lang="en"] body:has(#top.hero) .feature.space {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: 'photo title' 'photo copy';
}
html[lang="en"] body:has(#top.hero) .feature .feature-title {
  grid-area: title;
  writing-mode: horizontal-tb;
  letter-spacing: .035em;
  line-height: 1.45;
  text-wrap: balance;
}
html[lang="en"] body:has(#top.hero) .feature .feature-copy { grid-area: copy; }
html[lang="en"] body:has(#top.hero) .feature figure { grid-area: photo; }

@media (max-width: 900px) {
  :root {
    --controls-top: max(10px, env(safe-area-inset-top));
    --controls-right: max(4vw, env(safe-area-inset-right));
    --toggle-size: 48px;
  }
  .header-languages { right: calc(var(--controls-right) + var(--toggle-size) + 4px); }
  .header:has(.menu-toggle:not(.is-over-hero)[aria-expanded="false"])::before {
    content: '';
    position: fixed;
    inset: 0 0 auto;
    height: calc(var(--controls-top) + var(--toggle-size) + 10px);
    background: linear-gradient(to bottom, var(--paper) 0%, rgba(250,250,247,.95) 60%, transparent);
    pointer-events: none;
  }
  body.menu-open { overflow: hidden; }
  .header .menu-toggle[aria-expanded="true"] { color: white !important; }
  .mobile-menu:not([hidden]) {
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding: calc(var(--controls-top) + var(--toggle-size) + 12px) 7vw max(32px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #000;
    color: #fff;
    box-shadow: none;
  }
  .mobile-menu .menu-pages, .mobile-menu .menu-actions { align-items: center; }
  .mobile-menu .menu-pages { gap: clamp(8px, 1.5vh, 14px); margin-block-start: auto; }
  .mobile-menu a { width: fit-content; min-height: 44px; font-size: 14px; padding: 12px 18px; color: #fff; text-align: center; }
  .mobile-menu a:hover { color: #fff; }
  .mobile-menu .menu-actions { margin-block: clamp(42px, 7vh, 64px) auto; }
  .mobile-menu .menu-reservation { min-width: 180px; border-color: rgba(255,255,255,.66); }
  .mobile-menu .menu-reservation:hover { color: #161616; background: #fafaf7; }
  .mobile-menu a:focus-visible { outline: 1px solid currentColor; outline-offset: 0; }
  body:has(#top.hero) > .header { position: absolute; inset: 0 0 auto; }
  #top.hero {
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 0;
    max-height: none;
    margin: 0;
  }
  #top .hero-logo { top: 29%; left: 8%; width: clamp(49px, 8vw, 68px); height: auto; aspect-ratio: 9 / 25; }
  #top .hero-image img { object-position: 51% 60%; }
  #top .hero-slide--chef img { object-position: 35% 50%; }
  #top .hero-slide--interior img { object-position: 52% 50%; }
  .chapter-about .about-story-image { justify-self: center; }
}

@media (max-width: 650px) {
  :root {
    --mobile-measure: min(87%, 34rem);
    --heading-space: clamp(32px, 9vw, 42px);
  }
  .header { height: calc(var(--controls-top) + var(--toggle-size) + 8px); }
  body:has(#top.hero) .about { padding-block: 70px 72px; }
  body:has(#top.hero) .greeting-title { max-width: var(--mobile-measure); margin-bottom: 50px; text-wrap: balance; }
  body:has(#top.hero) .about-copy, body:has(#top.hero) .features,
  .chapter-about .about-story, .chapter-cuisine .menu-page-wrap, .chapter-access .access-wrap,
  .site-footer-inner { width: var(--mobile-measure); }
  body:has(#top.hero) .about-photo { width: 90%; margin-top: 36px; aspect-ratio: 4 / 3; justify-self: center; }
  body:has(#top.hero) .features { gap: 70px; margin-bottom: 78px; }
  body:has(#top.hero) .feature, html[lang="en"] body:has(#top.hero) .feature,
  html[lang="en"] body:has(#top.hero) .feature.space {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'title' 'copy' 'photo';
    gap: var(--heading-space);
  }
  body:has(#top.hero) .feature .feature-title {
    grid-area: title;
    writing-mode: horizontal-tb;
    font-size: clamp(17px, 4.3vw, 19px);
    line-height: 1.65;
    letter-spacing: .07em;
    text-wrap: balance;
  }
  body:has(#top.hero) .feature .feature-copy { grid-area: copy; }
  #space:lang(ja) .feature-copy {
    justify-self: stretch;
    min-inline-size: 0;
  }
  #space:lang(ja) .feature-copy p {
    max-inline-size: none;
    text-wrap: wrap;
  }
  #space:lang(ja) .feature-copy p > span {
    display: inline-block;
    inline-size: max-content;
    max-inline-size: 100%;
    white-space: normal;
    line-break: strict;
    vertical-align: top;
  }
  body:has(#top.hero) .feature figure { grid-area: photo; aspect-ratio: 4 / 3; margin-top: 8px; }
  body:has(#top.hero) :is(.about-copy, .feature-copy) p,
  .chapter-about .about-story-copy p, .chapter-cuisine :is(.menu-story, .menu-drinks) p {
    font-size: 14px;
    line-height: 2.05;
    letter-spacing: .035em;
  }
  body:has(#top.hero) .feature .text-link { margin-top: 0; }
  .chapter-about .about-page-heading, .chapter-cuisine .menu-page-heading, .chapter-access .access-intro {
    padding-block: 40px 56px;
  }
  .chapter-about .about-story { gap: 28px; padding-bottom: 72px; }
  .chapter-cuisine .menu-story { padding-bottom: 60px; gap: 22px; }
  .chapter-cuisine .menu-story figure { aspect-ratio: 4 / 3; }
  .chapter-cuisine .menu-course { display: grid; grid-template-columns: 1fr; gap: 36px; padding-block: 42px 46px; }
  .chapter-cuisine :is(.menu-story, .menu-course, .menu-drinks) h2 { margin-bottom: var(--heading-space); }
  .chapter-cuisine .menu-course header { margin: 0; }
  .chapter-cuisine .menu-course header p br { display: initial; }
  .chapter-cuisine .menu-course header p { line-height: 1.7; }
  .chapter-cuisine .menu-course-items { margin: 0; }
  .chapter-cuisine .menu-course-items > div { align-items: baseline; column-gap: 14px; }
  .chapter-cuisine .menu-course-items > div + div { padding-top: 32px; }
  .chapter-cuisine .menu-course-items > div:not(:last-child) { padding-bottom: 32px; }
  .chapter-cuisine .menu-course-items dt { text-wrap: pretty; }
  .chapter-cuisine .menu-drinks { padding-block: 62px 72px; }
  .chapter-access .access-photo { width: 90%; margin-bottom: 32px; aspect-ratio: 3 / 2; }
  .chapter-access .access-details > div { grid-template-columns: 1fr; gap: 10px; padding: 20px 6px 22px; }
  .chapter-access .access-details dt { font-size: 13px; }
  .chapter-access .access-details dd { font-size: 14px; line-height: 1.9; }
  .chapter-access .access-map { height: clamp(210px, 57vw, 300px); margin-block: 28px 65px; }
  .site-footer-copy { font-size: 14px; line-height: 1.95; }
  .site-footer-main { row-gap: 34px; padding-bottom: 46px; }
  .site-footer-heading { margin-bottom: var(--heading-space); }
  .site-footer-reserve .top-reservation-intro { margin-bottom: 30px; }
  .site-footer-phone, .site-footer-link, .site-footer-social a, .access-details a[href^="tel:"] {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .site-footer-social a { min-width: 44px; }
  .site-footer-reserve .site-footer-button,
  .site-footer-reserve .site-footer-phone { display: flex; margin-inline: auto; }
  .site-footer-reserve .site-footer-phone { width: fit-content; font-size: 17px; margin-top: 24px; }
  html[lang="en"] body:has(#top.hero) :is(.about-copy, .feature-copy) p,
  html[lang="en"] .chapter :is(.about-story-copy, .menu-drinks-copy, .menu-story-copy) p { font-size: 15px; }
  .chapter :is(.about-page-heading, .menu-page-heading, .access-intro) h1,
  body:has(#top.hero) .greeting-title { font-size: 21px; }
  .chapter-cuisine :is(.menu-story, .menu-course, .menu-drinks) h2 { font-size: 18px; }
  .chapter-cuisine .menu-course-items dt { font-size: 14px; }
  .site-footer-copy { font-size: 14px; }
  .chapter-access .access-details .site-footer-link { display: flex; }
}
@media (max-width: 560px) {
  .site-footer-reserve { padding-top: 40px; }
}
@media (max-width: 900px) and (max-height: 480px) {
  .mobile-menu:not([hidden]) { padding-block: 60px 24px; }
}
