/* Shared brand header for the home page and all inner pages. */
:root { --home-dark: #142d25; --home-serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif; }
.line-arrow { display: inline-block; position: relative; width: 28px; height: 9px; flex: 0 0 28px; border-bottom: 1px solid currentColor; transform: translateY(-3px); transition: transform .25s; }
.line-arrow::after { content: ""; position: absolute; right: 0; bottom: -1px; width: 8px; height: 8px; border-right: 1px solid currentColor; transform: rotate(-45deg); transform-origin: bottom right; }
a:hover > .line-arrow { transform: translate(4px, -3px); }

.home-header { position: absolute; z-index: 40; top: 0; left: 0; width: 100%; color: #fff; text-shadow: 0 1px 4px #0d231b; --header-offset: 0px; }
.admin-bar .home-header { --header-offset: 32px; top: var(--header-offset); }
.home-header-inner { max-width: 1600px; margin-inline: auto; padding-inline: clamp(24px,3.4vw,48px); min-height: 112px; display: flex; align-items: center; gap: clamp(16px,2.4vw,38px); }
.home-brand { margin-right: auto; flex: 0 0 auto; min-width: 0; }
.home-wordmark { display: block; white-space: nowrap; text-decoration: none; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 400; letter-spacing: .005em; line-height: 1; }
.home-wordmark > span { display: block; margin-top: 12px; font-family: "Yu Gothic", sans-serif; font-size: 9px; letter-spacing: .21em; }
.home-brand .custom-logo { max-height: 62px; max-width: 180px; object-fit: contain; }
.home-navigation { display: flex; align-items: center; gap: 26px; }
.home-navigation a { padding-block: 12px; font-size: 12px; letter-spacing: .04em; text-decoration: none; }
.home-navigation a:hover { text-decoration: underline; text-underline-offset: 5px; }
.home-navigation ul { list-style: none; padding: 0; margin: 0; }
.home-navigation > ul { display: flex; align-items: center; gap: clamp(10px,1.35vw,21px); }
.home-navigation li { position: relative; }
.home-navigation > ul > li > a { white-space: nowrap; }
.home-navigation .sub-menu, .home-navigation .children { display: none; position: absolute; top: 100%; left: 0; min-width: 190px; padding: 12px 18px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); text-shadow: none; }
.home-navigation li:hover > .sub-menu, .home-navigation li:focus-within > .sub-menu, .home-navigation li:hover > .children, .home-navigation li:focus-within > .children { display: block; }
.home-navigation .sub-menu .sub-menu { position: static; border: 0; padding-inline: 12px; }
.home-navigation .sub-menu a { display: block; padding: 8px 0; }
.home-header-book { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 20px; border: 1px solid #ffffffaa; padding: 11px 20px; min-height: 48px; font-size: 12px; text-decoration: none; white-space: nowrap; }
.home-header-book:hover { background: #ffffff14; }
.home-menu-toggle, .submenu-toggle { display: none; }
.home-header--inner { position: relative; top: auto; color: var(--ink); background: var(--paper); border-bottom: 1px solid var(--line); text-shadow: none; }
.admin-bar .home-header--inner { top: auto; }
.home-header--inner .home-header-inner { min-height: 88px; }
.home-header--inner .home-header-book { border-color: var(--ink); color: var(--ink); }
.home-header--inner .home-header-book:hover { color: var(--ink); background: var(--accent); }
.home-header:not(.home-header--inner).is-scrolled { position: fixed; top: var(--header-offset); background: var(--home-dark); text-shadow: none; box-shadow: 0 2px 14px #10251e24; }
.home-header.is-scrolled .home-header-inner { min-height: 68px; }
.home-header.is-scrolled .home-wordmark { font-size: 25px; }
.home-header.is-scrolled .home-wordmark > span { margin-top: 7px; }
.home-header.is-scrolled .custom-logo { max-height: 46px; }
.home-header.is-scrolled .home-header-book { min-height: 44px; padding-block: 8px; }
.sjl-brand-home [id] { scroll-margin-top: 84px; }
@media (max-width: 1200px) {
  .home-header--inner .home-header-inner { min-height: 82px; }
  .home-header .home-menu-toggle { display: inline-flex; }
  .home-header .home-navigation { display: none; }
}
@media (max-width: 900px) {
  .home-header-inner { min-height: 90px; }
  .home-header .home-menu-toggle { display: inline-flex; }
  .home-header .home-navigation { display: none; }
}
.home-header.menu-is-open { color: #fff; background: var(--home-dark); text-shadow: none; }
.home-header.menu-is-open .home-header-book { color: #fff; border-color: #ffffffaa; }
.home-header.menu-is-open .home-header-book:hover { color: #fff; background: #ffffff18; }
.home-header.menu-is-open .home-navigation { display: block; position: absolute; z-index: 41; inset: 100% 0 auto; max-height: calc(100dvh - var(--panel-top, 100px)); overflow-y: auto; overscroll-behavior: contain; background: var(--home-dark); color: #fff; padding: 12px clamp(24px,5vw,64px) 24px; box-shadow: 0 12px 20px #10251e33; text-shadow: none; }
.home-header.menu-is-open .home-navigation > ul { display: block; max-width: 760px; margin: 0 auto; }
.home-header.menu-is-open .home-navigation > ul > li { border-bottom: 1px solid #ffffff26; }
.home-header.menu-is-open .home-navigation > a { display: block; border-bottom: 1px solid #ffffff26; }
.home-header.menu-is-open .home-navigation a { display: block; font-size: 15px; line-height: 1.5; min-height: 44px; padding: 12px 0; white-space: normal; }
.home-header.menu-is-open .home-navigation li.has-submenu-toggle > a { padding-right: 54px; }
.home-header.menu-is-open .home-navigation .sub-menu, .home-header.menu-is-open .home-navigation .children { display: none; position: static; min-width: 0; padding: 0 0 4px 20px; background: transparent; color: #fff; border: 0; }
.home-header.menu-is-open .home-navigation li.submenu-open > .sub-menu, .home-header.menu-is-open .home-navigation li.submenu-open > .children { display: block; }
.home-header.menu-is-open .home-navigation .sub-menu a, .home-header.menu-is-open .home-navigation .children a { font-size: 13px; padding-block: 9px; min-height: 40px; color: #d9e4dc; }
.home-header.menu-is-open .submenu-toggle { display: inline-flex; position: absolute; right: 0; top: 0; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; color: #fff; background: transparent; font-size: 22px; line-height: 1; }
.home-menu-toggle { flex: 0 0 44px; width: 44px; height: 48px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 0; border: 0; background: transparent; color: inherit; order: 3; }
.menu-lines { width: 23px; height: 8px; border-block: 1px solid currentColor; }
.menu-word { font-size: 9px; line-height: 1; }
.home-menu-toggle[aria-expanded=true] .menu-lines { border: 0; height: 22px; position: relative; }
.home-menu-toggle[aria-expanded=true] .menu-lines::before, .home-menu-toggle[aria-expanded=true] .menu-lines::after { content: ""; position: absolute; top: 10px; left: 0; width: 23px; height: 1px; background: currentColor; transform: rotate(45deg); }
.home-menu-toggle[aria-expanded=true] .menu-lines::after { transform: rotate(-45deg); }
.home-header-book { order: 2; }
@media (max-width: 1200px) {
  .home-header .home-header-book .line-arrow { display: none; }
}
@media (max-width: 900px) {
  .home-wordmark { font-size: 25px; }
  .home-wordmark > span { font-size: 8px; margin-top: 8px; }
  .home-header-book { padding-inline: 14px; min-height: 44px; }
  .home-header-book .line-arrow { display: none; }
}
@media (max-width: 600px) {
  .admin-bar .home-header { --header-offset: 46px; }
  .home-header-inner, .home-header--inner .home-header-inner { min-height: 76px; padding-inline: 20px; gap: 12px; }
  .home-wordmark, .home-header.is-scrolled .home-wordmark { font-size: 23px; }
  .home-wordmark > span { font-size: 7px; }
  .home-header-book { padding: 9px 10px; font-size: 11px; }
  .home-header.is-scrolled .home-header-inner { min-height: 64px; }
  .home-brand .custom-logo { max-width: 130px; max-height: 48px; }
  .home-header.menu-is-open .home-navigation { padding: 6px 24px 20px; }
}
@media (max-width: 350px) {
  .home-header-inner, .home-header--inner .home-header-inner { padding-inline: 12px; gap: 8px; }
  .home-wordmark, .home-header.is-scrolled .home-wordmark { font-size: 20px; }
}
html:not(.js) .home-header { position: relative; top: auto; background: var(--home-dark); color: #fff; }
html:not(.js) .home-header-inner { flex-wrap: wrap; padding-block: 14px; }
html:not(.js) .home-navigation { display: block; flex-basis: 100%; order: 4; }
html:not(.js) .home-navigation > ul { display: block; }
html:not(.js) .home-navigation a { display: block; padding: 8px 0; }
html:not(.js) .home-navigation .sub-menu, html:not(.js) .home-navigation .children { display: block; position: static; background: transparent; color: inherit; border: 0; }
html:not(.js) .home-menu-toggle { display: none; }
html:not(.js) .home-header-book { color: #fff; border-color: #ffffffaa; }
@media (prefers-reduced-motion: reduce) { .line-arrow { transition: none; } }
