html {
  scroll-padding-top: 56px;
}

@media (min-width: 1024px) {
  html {
    scroll-padding-top: 76px;
  }
}

[id] {
  scroll-margin-top: 56px;
}

@media (min-width: 1024px) {
  [id] {
    scroll-margin-top: 76px;
  }
}

body {
  background-color: #f7f9fb; /* 全体の背景色 */
  color: #222222;
  font-size: 14px;
  line-height: 1.7;
}

/* FAQ回答：上下の余白を均等に（pt-0 による上詰まりを補正） */
.faq-answer > div {
  padding-top: 0.875rem;
}

/* スマホ：下部固定CTAバー分の余白 */
@media (max-width: 1023px) {
  body {
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* スマホ：スティッキーヘッダー */
.site-header-mobile {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* スマホ：ヘッダー右アクション（電話 / メニュー） */
.mobile-header-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-shrink: 0;
}

.mobile-header-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 48px;
  min-height: 48px;
  padding: 4px 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.mobile-header-action__icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.mobile-header-action__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* 電話：アクセント塗り（主アクション） */
.mobile-header-action--tel {
  background: #0055aa;
  color: #ffffff;
}

.mobile-header-action--tel:active {
  background: #004488;
}

/* メニュー：同サイズ・同トーンのネイビー塗り（対になる副アクション） */
.mobile-header-action--menu {
  background: #112233;
  color: #ffffff;
}

.mobile-header-action--menu:active {
  background: #1a2d3f;
}

.mobile-header-action--menu:focus-visible,
.mobile-header-action--tel:focus-visible {
  outline: 2px solid #0055aa;
  outline-offset: 2px;
}

.mobile-header-action--menu[aria-expanded="true"] {
  background: #0055aa;
}

/* スマホ：ナビドロワー オーバーレイ */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(17, 34, 51, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* スマホ：ナビドロワー本体 */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: min(85vw, 320px);
  height: 100%;
  height: 100dvh;
  background: #112233;
  color: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #223344;
  flex-shrink: 0;
}

.nav-drawer__title {
  font-size: 0.875rem;
  font-weight: 700;
}

.nav-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: #ffffff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.nav-drawer__close:active {
  background: rgba(255, 255, 255, 0.08);
}

.nav-drawer__links {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-drawer .mobile-nav-link {
  display: block;
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid #223344;
  min-height: 3rem;
  line-height: 1.4;
}

.nav-drawer .mobile-nav-link:hover,
.nav-drawer .mobile-nav-link:active {
  background: #0055aa;
}

.nav-drawer__footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #223344;
  background: #0d1a28;
}

.nav-drawer__hours {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.nav-drawer__tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  background: #0055aa;
  text-decoration: none;
}

.nav-drawer__tel:active {
  background: #004488;
}

.nav-drawer__contact {
  width: 100%;
  text-decoration: none;
}

body.nav-drawer-open {
  overflow: hidden;
}

body.tel-modal-open {
  overflow: hidden;
}

/* PC向け：電話番号案内モーダル */
.tel-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.tel-modal[hidden] {
  display: none;
}

.tel-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 34, 51, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tel-modal.is-open .tel-modal__overlay {
  opacity: 1;
}

.tel-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: #ffffff;
  border: 1px solid #cccccc;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 1.75rem 1.5rem 1.5rem;
  text-align: center;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tel-modal.is-open .tel-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.tel-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #555555;
  cursor: pointer;
}

.tel-modal__close:hover,
.tel-modal__close:focus-visible {
  color: #112233;
  outline: 2px solid #0055aa;
  outline-offset: 2px;
}

.tel-modal__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #112233;
}

.tel-modal__lead {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #555555;
}

.tel-modal__number {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #e07a00;
  line-height: 1.2;
}

.tel-modal__hours {
  margin: 0 0 1.25rem;
  font-size: 0.6875rem;
  color: #777777;
}

.tel-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tel-modal__copy {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.tel-modal__dismiss {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #cccccc;
  background: #f7f9fb;
  color: #112233;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tel-modal__dismiss:hover,
.tel-modal__dismiss:focus-visible {
  background: #eef2f6;
  outline: 2px solid #0055aa;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .tel-modal__overlay,
  .tel-modal__panel {
    transition: none;
  }
}

/* PCグローバルナビ：ドロップダウン */
.nav-item-has-dropdown {
  position: relative;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #112233;
  border: 1px solid #223344;
  border-top: 2px solid #0055aa;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.nav-dropdown a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus {
  background: #0055aa;
  outline: none;
}

.nav-item-has-dropdown:hover .nav-dropdown,
.nav-item-has-dropdown:focus-within .nav-dropdown {
  display: block;
}

/* スマホ：下部固定CTA safe-area */
.mobile-sticky-cta {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: calc(3.5rem + env(safe-area-inset-bottom, 0px));
}

.mobile-sticky-cta a {
  min-height: 3.5rem;
}

/* ヘッダー・ナビ・各セクション・フッターの中央寄せ用インナー（1024px） */
.section-inner {
  max-width: 1024px;
  margin: 0 auto;
  width: 100%;
}

/*
 * fieldset の UA 既定（min-width: min-content）を解除。
 * 長い legend がドキュメント幅を押し広げ、スマホで横スクロールするのを防ぐ。
 */
fieldset {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

legend {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: break-word;
}

@media (max-width: 639px) {
  legend {
    width: 100%;
  }
}

/* 2010年代風の立体感のあるグラデーションボタン */
.btn-classic-blue {
  background: linear-gradient(to bottom, #1e73be 0%, #0f4f8a 100%);
  border: 1px solid #083c6d;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 3px rgba(0, 0, 0, 0.15);
  transition: all 0.1s ease;
}
.btn-classic-blue:hover {
  background: linear-gradient(to bottom, #2481d4 0%, #125ba0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 5px rgba(0, 0, 0, 0.25);
}
.btn-classic-blue:active {
  background: #0d467a;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.btn-classic-orange {
  background: linear-gradient(to bottom, #ff9900 0%, #cc6600 100%);
  border: 1px solid #994c00;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 3px rgba(0, 0, 0, 0.15);
}
.btn-classic-orange:hover {
  background: linear-gradient(to bottom, #ffaa11 0%, #dd7700 100%);
}

.btn-classic-white {
  background: linear-gradient(to bottom, #ffffff 0%, #f0f0f0 100%);
  border: 1px solid #cccccc;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-classic-white:hover {
  background: linear-gradient(to bottom, #f9f9f9 0%, #e5e5e5 100%);
  border-color: #bbbbbb;
}

/* 2010年代の王道：セクション左側の太い青色ボーダー */
.section-title {
  border-left: 6px solid #0055aa;
  padding-left: 12px;
  font-weight: bold;
  color: #112233;
}

/* 細かなグリッド線（2010年代の技術系企業サイトの背景パターン） */
.bg-tech-dots {
  background-size: 8px 8px;
  background-image: radial-gradient(rgba(0, 85, 170, 0.04) 1px, transparent 0);
}
