/* Screen-only landscape UX. All layout overrides require the runtime phone class. */
.landscape-nav,.landscape-only-menu{display:none}
/* Avoid cross-document snapshots of a retiring banner on landscape phones. */
@media screen and (max-width:960px) and (orientation:landscape) and (pointer:coarse),
       screen and (max-width:960px) and (orientation:landscape) and (hover:none){
  @view-transition{navigation:none}
}
@media screen{
  html.landscape-phone-root{scroll-padding-bottom:80px}
  body.is-landscape-phone{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
  body.is-landscape-phone>.mobile-actions{display:none!important}
  body.is-landscape-phone .landscape-nav{
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:fixed;
    left:0;right:0;bottom:0;z-index:100;box-sizing:border-box;
    background:#f5f1e8;border-top:1px solid #c6b58e;
    padding-bottom:env(safe-area-inset-bottom);
  }
  body.is-landscape-phone .landscape-nav a{
    display:flex;align-items:center;justify-content:center;min-width:0;
    min-height:48px;padding:6px 4px;box-sizing:border-box;
    color:#102b3b;font:600 13px/1.4 sans-serif;text-align:center;
    text-decoration:none;border-right:1px solid #d5d3cc;
  }
  body.is-landscape-phone .landscape-nav a:last-child{border-right:0}
  body.is-landscape-phone .landscape-nav a:focus-visible{outline:2px solid #9a8053;outline-offset:-4px}
  body.is-landscape-phone .landscape-nav a:nth-child(2){background:#102b3b;color:#f5f1e8}
  body.is-landscape-phone.landscape-input-obscured .landscape-nav{visibility:hidden;pointer-events:none}
  /* Keep questionnaire actions accessible in document flow above the shared nav. */
  body.is-landscape-phone>.actions{display:flex!important;position:static;flex-wrap:wrap}
  body.is-landscape-phone .shell{padding-bottom:24px}
  body.is-landscape-phone .landscape-auto-header{
    position:sticky!important;top:var(--landscape-header-offset,0px)!important;z-index:110;min-height:64px;box-sizing:border-box;
    padding:8px 18px;gap:16px;flex-wrap:nowrap;
    transition:transform 160ms ease-out;transform:translateY(0);
  }
  body.is-landscape-phone .landscape-auto-header.is-header-hidden{transform:translateY(calc(-1 * var(--landscape-header-retreat,100%)))!important;pointer-events:none}
  body.is-landscape-phone .header .desktop-nav,
  body.is-landscape-phone .header .header-book{display:none}
  body.is-landscape-phone .header .brand{min-width:0;flex:0 1 auto}
  body.is-landscape-phone .header .brand-jp{font-size:17px;letter-spacing:.04em;white-space:nowrap}
  body.is-landscape-phone .header .brand-en{font-size:7px;letter-spacing:.12em}
  body.is-landscape-phone .header .brand-logo{width:42px;height:auto;flex:0 0 42px}
  body.is-landscape-phone .mobile-menu,
  body.is-landscape-phone .landscape-only-menu{display:block;flex:0 0 auto;margin-left:auto;font-size:13px;color:#102b3b}
  body.is-landscape-phone .mobile-menu summary{cursor:pointer;padding:10px 4px;white-space:nowrap}
  body.is-landscape-phone .mobile-menu nav{
    position:absolute;top:100%;right:0;left:auto;width:min(340px,100vw);
    max-height:calc(100dvh - 130px);overflow:auto;box-sizing:border-box;
    background:#f5f1e8;color:#102b3b;border:1px solid #d5d3cc;padding:8px 18px;
    overscroll-behavior:contain;
  }
  body.is-landscape-phone .mobile-menu nav a{display:block;padding:10px 0;font-size:14px;line-height:1.4;border-bottom:1px solid #ddd;color:#102b3b}
  body.is-landscape-phone .site-head-inner{display:flex;align-items:center;gap:14px}
  body.is-landscape-phone .site-head .head-note{display:none}
}
@media screen and (prefers-reduced-motion:reduce){
  body.is-landscape-phone .landscape-auto-header{transition:none}
}

/* Shared tablet portrait menu (761–900px). The home header keeps its booking action. */
@media screen and (min-width:761px) and (max-width:900px) and (orientation:portrait){
  body:not(.home-page):not(.is-landscape-phone) .header{
    padding:16px 20px;
    min-height:86px;
    flex-wrap:wrap;
    gap:12px;
  }
  body:not(.home-page):not(.is-landscape-phone) .brand-jp{font-size:20px;letter-spacing:.07em}
  body:not(.home-page):not(.is-landscape-phone) .brand-en{font-size:8px;letter-spacing:.18em}
  body:not(.home-page):not(.is-landscape-phone) .desktop-nav,
  body:not(.home-page):not(.is-landscape-phone) .header-book{display:none!important}
  body:not(.home-page):not(.is-landscape-phone) .mobile-menu{
    display:block!important;
    margin-left:auto;
    font-size:12px;
  }
  body:not(.home-page):not(.is-landscape-phone) .mobile-menu summary{
    min-height:44px;
    display:flex;
    align-items:center;
    cursor:pointer;
    padding:8px 0;
    white-space:nowrap;
  }
  body:not(.home-page):not(.is-landscape-phone) .mobile-menu nav{
    max-height:calc(100dvh - 160px);
    overflow-y:auto;
    overscroll-behavior:contain;
    position:absolute;
    z-index:1500;
    right:0;
    left:0;
    top:100%;
    background:var(--paper);
    border-bottom:1px solid var(--line);
    padding:15px 25px;
    box-shadow:0 12px 18px #182b3d15;
  }
  body:not(.home-page):not(.is-landscape-phone) .mobile-menu nav a{
    display:block;
    padding:10px;
    border-bottom:1px solid var(--line);
    font-size:15px;
    white-space:normal;
  }
}
