#headerWrap .naviBox ul.iconNavi > .gom-mobile-menu { display: none; }
@media (min-width: 1200px) {
  #headerWrap .naviBox { z-index: 12; }
  #headerWrap .naviBox ul.textNavi { gap: clamp(12px, 1.25vw, 22px); }
  #headerWrap .naviBox .textNavi > li > a,
  #headerWrap .gom-parent > summary { font-size: 16px; }
  .gom-parent { position: relative; }
  #headerWrap .gom-parent > summary {
    display: flex; align-items: center; min-height: 44px; gap: 5px;
    cursor: pointer; color: #995c14; font-weight: bold; white-space: nowrap;
    list-style: none;
  }
  .gom-parent > summary::-webkit-details-marker { display: none; }
  .gom-parent > summary::after {
    content: ''; width: 5px; height: 5px; margin-top: -3px;
    border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
  }
  .gom-parent[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
  .gom-dropdown {
    position: absolute; top: 100%; left: 0; z-index: 1;
    width: max-content; min-width: 164px; max-width: 260px; padding: 3px 12px;
    background: #fffaf1; border: 1px solid #ddc49e; border-top: 3px solid #b47934;
    border-radius: 0 0 6px 6px; box-shadow: 0 5px 14px #5439172b; text-align: left;
  }
  .textNavi > li:last-child .gom-dropdown { right: 0; left: auto; }
  #headerWrap .naviBox ul.textNavi .gom-dropdown a {
    display: flex; min-height: 40px; padding: 0 5px; color: #714619; font-size: 15px;
  }
  .gom-dropdown a + a { border-top: 1px solid #ead9bf; }
  .gom-dropdown a:hover, .gom-dropdown a:focus-visible { background: #f6ead7; }
}

@media (max-width: 1199px) {
 #headerWrap .naviBox { z-index: 20; }
 #headerWrap .naviBox ul.textNavi { display:none !important; }
 #headerWrap .naviBox ul.iconNavi > .gom-mobile-menu { display:block; }
}
@media (max-width: 767px) { #headerWrap .naviBox ul.iconNavi > .gom-mobile-menu { padding-left: 10px; } }
@media (max-width: 639px) { #headerWrap .naviBox ul.iconNavi > .gom-mobile-menu { padding-left: 5px; } }

#headerWrap .naviBox .gom-mobile-menu .gom-menu-trigger {
  appearance: none; display: block; margin: 0; padding: 0; border: 0;
  background: transparent; line-height: 0; cursor: pointer;
}
.gom-mobile-dialog:not([open]) { display: none; }
.gom-mobile-dialog[open] {
  position: fixed; inset: 0; display: flex; flex-direction: column; box-sizing: border-box;
  width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; color: #69451c; background: #fffaf1; text-align: left;
}
.gom-mobile-dialog::backdrop { background: #fffaf1; }
html.gom-menu-open, html.gom-menu-open body { overflow: hidden; }
.gom-mobile-dialog {
  --menu-row: 44px;
  --menu-gap: 4px;
  --menu-edge: 3px;
}
@supports (height: 100dvh) {
  .gom-mobile-dialog {
    --menu-row: clamp(44px, calc(6dvh + 5px), 58px);
    --menu-gap: clamp(2px, calc(4dvh - 21px), 12px);
    --menu-edge: clamp(2px, calc(2dvh - 10px), 8px);
  }
}
.gom-mobile-heading, .gom-mobile-sections {
  box-sizing: border-box; width: 100%; max-width: 740px; margin: 0 auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}
.gom-mobile-heading {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding-block: max(var(--menu-edge), env(safe-area-inset-top)) var(--menu-edge); border-bottom: 1px solid #d7bd93;
}
.gom-mobile-heading h2 { margin: 0; font-size: 20px; font-weight: bold; line-height: 1.4; }
.gom-menu-close {
  min-height: 44px; padding: 0 12px; border: 1px solid #ceb089; border-radius: 5px;
  background: #fffdf8; color: #714619; font: inherit; font-size: 15px; cursor: pointer;
}
.gom-mobile-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.gom-mobile-sections {
  padding: var(--menu-edge) max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}
.gom-menu-quicklinks {
  display: grid; grid-template-columns: 1.30fr repeat(3, 1fr); align-items: stretch;
  background: #f5e8d2; border-radius: 5px; margin-bottom: var(--menu-edge);
}
.gom-mobile-sections a {
  display: flex; align-items: center; box-sizing: border-box; min-width: 0;
  transition-property: color, background-color, border-color;
  min-height: var(--menu-row); padding: 2px 6px; color: #66401a; font-size: 15px; line-height: 1.28;
}
.gom-menu-quicklinks a { justify-content: center; padding-inline: 2px; text-align: center; font-weight: bold; }
.gom-menu-quicklinks a + a { border-inline-start: 1px solid #e2caa9; }
.gom-mobile-sections section {
  display: grid; grid-template-columns: 5.6rem minmax(0,1fr); gap: 5px;
  padding-block: var(--menu-gap); border-top: 1px solid #dfcaa8;
}
.gom-mobile-sections h3 { display: flex; margin: 0; }
.gom-mobile-sections h3:only-child { grid-column: 1 / -1; }
.gom-mobile-sections h3 a {
  width: 100%; gap: 3px; justify-content: space-between;
  padding-inline: 4px 5px; color: #774509; font-weight: bold;
}
.gom-mobile-sections h3 a::after {
  content: ''; flex: none; width: 5px; height: 5px; border: solid #995d17;
  border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
.gom-mobile-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--menu-edge) 4px; }
.gom-mobile-group a { border: 1px solid #e6d4b9; border-radius: 4px; background: #fffaf2; }
.gom-menu-label { min-width: 0; }
.gom-mobile-sections h3 .gom-menu-label, .gom-mobile-sections h3 .gom-menu-label span { font-weight: inherit; }
.gom-menu-quicklinks a, .gom-mobile-sections h3 a { white-space: nowrap; }
.gom-menu-label > span { display: inline-block; }
.gom-mobile-sections a:active { background: #ecd7b6; }
.gom-mobile-sections .gom-training-menu { grid-template-columns: minmax(0,1fr); gap: var(--menu-edge); }
.gom-training-menu .gom-mobile-group { grid-template-columns: 1fr .95fr 1fr 1.25fr; }
.gom-training-menu .gom-mobile-group a { justify-content: center; text-align: center; padding-inline: 2px; }
@media (min-width: 540px) {
  .gom-mobile-sections section, .gom-mobile-sections .gom-training-menu { grid-template-columns: minmax(134px, 1fr) minmax(0, 3.2fr); gap: 6px; }
  .gom-mobile-group, .gom-training-menu .gom-mobile-group { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .gom-training-menu .gom-mobile-group a { justify-content: flex-start; text-align: left; padding-inline: 6px; }
}
@media (max-width: 359px) {
  .gom-mobile-sections section { grid-template-columns: 5.2rem minmax(0,1fr); }
  .gom-mobile-sections a { font-size: 14px; }
  .gom-mobile-group a { padding-inline: 4px; }
}
.gom-mobile-dialog :is(button,a):focus-visible,
.gom-menu-trigger:focus-visible { outline: 2px solid #764b18; outline-offset: -2px; }

.gom-header-bar { display: contents; }
#headerWrap .logoBox img { height: auto; }
@media (max-width: 767px) {
  html {
    --gom-header-icon: clamp(56px, 18vw, 76px);
    --gom-header-height: calc(var(--gom-header-icon) + 8px + env(safe-area-inset-top, 0px));
    scroll-padding-top: calc(var(--gom-header-height) + 8px);
  }
  #headerWrap.headerHome { height: auto; background-size: 100% auto; background-position: center bottom; }
  #headerWrap:is(.headerHome, .headerPage) > :is(.inner, .headerInner) {
    box-sizing: border-box; padding: var(--gom-header-height) 8px 0;
  }
  #headerWrap .gom-header-bar {
    position: fixed; z-index: 3000; inset: 0 0 auto;
    display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
    align-items: center; column-gap: 6px; height: var(--gom-header-height);
    padding: calc(4px + env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right)) 4px max(8px, env(safe-area-inset-left));
    background: #faf9f3 url(images/main_bg.jpg);
  }
  #headerWrap:is(.headerHome, .headerPage) .logoBox { position: static; min-width: 0; z-index: 1; }
  #headerWrap .logoBox :is(h1, a, picture) { display: block; margin: 0; line-height: 0; }
  #headerWrap:is(.headerHome, .headerPage) .logoBox img { display: block; width: 81%; max-width: 200.88px; }
  #headerWrap:is(.headerHome, .headerPage) nav { min-width: 0; }
  #headerWrap:is(.headerHome, .headerPage) .naviBox { position: relative; inset: auto; display: block; width: auto; }
  #headerWrap .naviBox ul.iconNavi { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
  #headerWrap .naviBox ul.iconNavi > :is(li.facilities, li.gom-mobile-menu) { display: block; float: none; padding: 0; margin: 0; }
  #headerWrap .naviBox ul.iconNavi :is(a, button) { display: block; line-height: 0; }
  #headerWrap .gom-header-bar .naviBox ul.iconNavi img { display: block; height: var(--gom-header-icon); width: auto; }
  #headerWrap.headerHome .headerCatch { position: static; width: 94%; margin: 5px auto 0; }
  /* The lower 258 pixels of the 640px-wide background contain the group photograph. */
  #headerWrap.headerHome::after { content: ""; display: block; aspect-ratio: 640 / 266; }
}
@media (max-width: 767px) and (max-height: 500px) {
  html { --gom-header-icon: 48px; }
  #headerWrap .gom-header-bar .logoBox img { max-height: var(--gom-header-icon); object-fit: contain; object-position: left center; }
}

@media (max-width: 767px) {
  .gom-mobile-dialog[open] {
    --phone-row: clamp(30px, calc(10vh - 22.8px), 48px);
    --phone-row: clamp(30px, calc(10dvh - 22.8px), 48px);
    background: #fffdf8;
  }
  .gom-mobile-heading, .gom-mobile-sections {
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }
  .gom-mobile-heading {
    min-height: 50px;
    padding-block: max(6px, env(safe-area-inset-top)) 6px;
    border: 0;
  }
  .gom-menu-close {
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    background: #f6ead7;
  }
  .gom-mobile-sections { padding-block: 0 max(6px, env(safe-area-inset-bottom)); }
  .gom-mobile-sections section { display: block; padding: 0; border: 0; }
  .gom-menu-quicklinks, .gom-mobile-group, .gom-training-menu .gom-mobile-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 6px;
  }
  .gom-menu-quicklinks { margin: 0; background: transparent; }
  .gom-menu-quicklinks a, .gom-mobile-group a, .gom-training-menu .gom-mobile-group a {
    justify-content: center;
    min-height: calc(var(--phone-row) - 3px);
    margin-bottom: 3px;
    padding: 2px;
    border: 1px solid #ead9bf;
    border-radius: 5px;
    color: #483824;
    font-size: .875rem;
    font-weight: normal;
    text-align: center;
  }
  .gom-menu-quicklinks a { background: #f6ead7; }
  .gom-mobile-sections h3 a {
    justify-content: flex-start;
    gap: 8px;
    min-height: 34px;
    padding: 2px 0;
    font-size: .9375rem;
    color: #714619;
    white-space: normal;
  }
  .gom-mobile-sections h3 a::before {
    content: '';
    width: 3px;
    height: 18px;
    border-radius: 1px;
    background: #b47934;
  }
  .gom-mobile-sections h3 a::after { content: none; }
}
@media (max-width: 349px) {
  .gom-mobile-group a[href$="#p04"] { font-size: .8125rem; }
}
