/* Keep the original desktop layout; adapt only smaller screens. */
@media screen and (max-width: 1000px) {
  html { min-width: 0; height: auto; margin: 0; }
  body { height: auto; margin: 0; line-height: 1.5; }
  #main { width: calc(100% - 24px); max-width: 970px; font-size: 16px; }
  #main *, #main *::before, #main *::after { box-sizing: border-box; }
  #main img { max-width: 100%; height: auto; }
  #header, #header-sub { height: auto; }
  #header > a, #header-sub > a { display: block; width: 100%; aspect-ratio: 740 / 130; overflow: hidden; }
  #header #logo, #header-sub #logo { position: static; display: block; width: 131.081%; max-width: none; height: auto; clip-path: none; }
  #main .h1-homep h1 { position: static; margin: 10px 0 16px; padding: 0; text-align: center; font-size: clamp(15px, 2.5vw, 20px); line-height: 1.5; letter-spacing: 0.5px; }
  #menu { position: static; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; width: 100%; margin-bottom: 16px; }
  #menu li, #menu li.last { float: none; padding: 0; min-width: 0; }
  #menu li a { width: 100%; height: auto; min-height: 48px; display: flex; align-items: center; justify-content: center; padding: 10px 8px; font-size: 17px; line-height: 1.4; background-size: 100% 120px; }
  #menu li.act a, #menu li a:hover { background-position: 0 -60px !important; }
  a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #d84444; outline-offset: 3px; }
  #faded { position: relative; top: auto; left: auto; width: 100%; height: auto; aspect-ratio: 688 / 359; margin-bottom: 16px; }
  #faded > ul:not(.pagination), #faded > ul:not(.pagination) > li { width: 100% !important; height: 100% !important; }
  #faded > ul:not(.pagination) > li > img { width: 100%; height: 100%; object-fit: cover; }
  #faded p { top: auto; bottom: 0; width: 100%; height: auto; min-height: 66px; padding: 12px 104px 12px 16px; font-size: clamp(16px, 2.8vw, 24px); line-height: 1.35; letter-spacing: 0; }
  #faded a.prev, #faded a.next { top: auto; bottom: 10px; width: 44px; height: 44px; background-image: none; background-color: #262626; border: 1px solid #666; border-radius: 3px; }
  #faded a.prev::before, #faded a.next::before { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; text-indent: 0; font-size: 30px; line-height: 1; }
  #faded a.prev::before { content: '\2039'; }
  #faded a.next::before { content: '\203a'; }
  #faded a.prev { right: 54px; }
  #faded a.next { right: 6px; }
  #header-box { position: static; width: 100%; height: auto; background-color: #0c0c0c; border: 1px solid #393939; }
  #header-box .inner { padding: 20px; }
  #header-box strong { font-size: 28px; padding-bottom: 12px; }
  #header-box ul li { line-height: 1.5; background-position: 0 18px; }
  #header-box ul li a { display: block; padding: 10px 0; }
  #header-box em a { width: auto; max-width: 180px; height: auto; min-height: 44px; padding: 10px 14px; line-height: 1.5; background: #a92323; border-radius: 3px; }
  #content #indent { padding-top: 20px; }
  #page1 .row-2 .col-1, #page1 .row-2 .col-2, #page1 .row-2 .col-3 { float: none; width: 100%; padding: 0 0 24px; }
  .box-1 .inner { padding: 24px 20px 0; }
  #content-box { padding: 24px; min-height: 0; }
  #content p, #content li { overflow-wrap: anywhere; }
  #content p { line-height: 1.65; }
  .p-sub { margin-right: 0; }
  .spacer[style*="border: none"] { height: 0; margin-bottom: 12px; }
  h2 { font-size: 26px; line-height: 1.25; }
  h3 { font-size: 21px; line-height: 1.4; }
  #content-box .stit { width: 44px; margin: 0 0 12px 12px; }
  .list-service li a { display: block; padding: 8px 0; line-height: 1.5; }
  .price-list { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 12px; }
  .price { float: none; width: auto; }
  .tright { text-align: left; }
  #content-box > .inner { display: flex; flex-direction: column; }
  #content-box > .inner > .wrapper.half { order: 0; width: 100%; }
  #content-box > .inner > #wrapper { order: 1; width: 100%; float: none; margin: 24px 0 0; }
  #form-div { width: 100%; padding: 20px; }
  #form1 p:not(.submit) { display: flex; flex-direction: column; padding-bottom: 18px; }
  #form1 label { order: -1; margin: 0 0 6px; color: #555; line-height: 1.5; }
  #form1 input:not([type="submit"]), #form1 textarea { width: 100%; max-width: 100%; min-height: 44px; padding: 12px; font-size: 16px; }
  #form1 textarea { min-height: 160px; resize: vertical; }
  #form1 input[type="submit"] { min-height: 48px; font-size: 16px; padding: 12px 24px; }
  #footer { height: auto; overflow: visible; padding-bottom: 24px; }
  #footer .inner { padding-top: 28px; }
  #footer p { float: none; width: 100%; background-position: 0 0; padding: 28px 0 12px; line-height: 1.6; }
  #menu-bot { float: none; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
  #menu-bot li { float: none; margin: 0; padding: 0; background: none; }
  #menu-bot li a { display: block; min-height: 44px; padding: 10px 0; color: #aaa; }
}
@media screen and (max-width: 599px) {
  #menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #menu li.last { grid-column: span 2; }
  #menu li a { font-size: 16px; }
  #main .h1-homep h1 { max-width: 100%; }
  #faded { aspect-ratio: 4 / 3; }
  #faded p { padding: 12px 104px 12px 12px; min-height: 88px; font-size: 16px; }
  #content-box, .box-1 .inner { padding: 20px 16px; }
  .box-1 .inner { padding-bottom: 0; }
  h2 { font-size: 23px; }
  h3 { font-size: 20px; }
  .price-list { grid-template-columns: minmax(0, 1fr); gap: 2px; margin-bottom: 16px; }
  #form-div { padding: 16px; }
}

/* The menu stays visible when JavaScript is unavailable. */
.menu-toggle { display: none; }
@media screen and (max-width: 780px) {
  #header.nav-ready .menu-toggle, #header-sub.nav-ready .menu-toggle {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; min-height: 48px; margin: 0 0 16px; padding: 12px 16px;
    border: 1px solid #494949; border-radius: 2px;
    background: linear-gradient(#383838, #101010); color: #fff;
    font: 18px 'Dosis', Arial, sans-serif; cursor: pointer;
  }
  .menu-toggle[aria-expanded="true"] { background: #b52828 !important; }
  .menu-toggle:focus-visible { outline: 2px solid #d84444; outline-offset: 3px; }
  .menu-icon { display: block; position: relative; width: 22px; height: 2px; background: currentColor; }
  .menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; }
  .menu-icon::before { top: -7px; }
  .menu-icon::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }
  #header.nav-ready #menu, #header-sub.nav-ready #menu { display: none; }
  #header.nav-ready #menu.is-open, #header-sub.nav-ready #menu.is-open {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px;
  }
  #header.nav-ready #menu li.last, #header-sub.nav-ready #menu li.last { grid-column: auto; }
}
