/* ============================================================
   GLOBAL TOKENS
   ============================================================ */
:root {
  --font-family-primary: 'Inter', 'YakuHanJP', 'Noto Sans JP',
    -apple-system, BlinkMacSystemFont, sans-serif;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-normal: 400;

  --font-size-sm: 0.75rem;
  --font-size-base: 1rem;
  --font-size-md: 1.25rem;
  --font-size-lg: 1.5rem;
  --font-size-xl: 2rem;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  --color-primary: black;
  --color-text: #504e4d;
  --color-muted: #666;
  --color-accent: #ff6bb4;
  --color-bg: rgb(245, 250, 255);

  --header-height: 60px;
  --section-max-w: 1800px;
  --section-pad-x: 20px;
}

/* ============================================================
   HEADER/FOOTER INCLUDE
   ============================================================ */
#site-header {
  min-height: var(--header-height);
}

#site-footer {
  min-height: 80px;
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-primary);
  background-color: var(--color-bg);
}

/* 見出しは等幅数字を解除 */
h1, h2, h3, h4, h5, h6 {
  font-variant-numeric: normal;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 0 20px;
  background-color: var(--color-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.header.visible {
  opacity: 1;
  pointer-events: auto;
}

.header-content {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.header-title {
  margin: 0;
  padding: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: white;
}

.header-title a {
  color: white;
  text-decoration: none;
}

/* Nav ── PC */
.header-nav {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: white;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-primary);
}

/* Hamburger ── 初期は非表示（モバイルのみ表示） */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  /* 少し大きめにして押しやすく */
  height: 40px;
  gap: 6px;
  /* 線同士の間隔を少し広げてクリーンに */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 3;
}

.hamburger-menu span {
  display: block;
  width: 24px;
  /* 横幅も少し調整 */
  height: 2px;
  background-color: white;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, width 0.3s ease;
}

/* Hamburger ── × アニメーション */
.hamburger-menu.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 30px 20px;
}

.footer-content {
  display: flex;
  max-width: 100%;
  margin: 0 auto;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

.footer-links a {
  text-decoration: none;
  color: var(--color-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.copyright {
  color: var(--color-muted);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  margin: 0;
}

/* ============================================================
   GYRO BANNER
   ============================================================ */
.gyro-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.gyro-banner--visible {
  transform: translateY(0);
}

.gyro-banner__text {
  margin: 0;
  font-size: var(--font-size-sm);
  color: #444;
  flex: 1;
}

.gyro-banner__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.gyro-banner__btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gyro-banner__btn:active {
  opacity: 0.7;
}

.gyro-banner__btn--allow {
  background: var(--color-accent);
  color: #fff;
  font-weight: var(--font-weight-medium);
}

.gyro-banner__btn--deny {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-muted);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.content {
  position: relative;
  padding: 100px 0 0;
  z-index: 1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
}

.section-line {
  flex: 1;
  height: 1px;
}

/* Utility classes */
.annotations {
  text-indent: -1em;
  padding-left: 1em;
}

.space-top1 {
  padding-top: 1rem;
}

/* ============================================================
   RESPONSIVE ── モバイル (≤ 480px) - Header
   ============================================================ */
@media (max-width: 480px) {
  /* Header */
  .header {
    padding: 0 20px;
  }

  /* header-content ── 位置ズレ防止のため調整 */
  .header-content {
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-height);
    align-items: flex-start;
    /* 行の開始位置に合わせる */
    align-content: flex-start;
    /* 複数行を上詰めに配置 */
  }

  .header-title,
  .hamburger-menu {
    height: var(--header-height);
    /* 高さを固定 */
    display: flex;
    align-items: center;
    /* 高さの中で中央配置 */
  }

  .header-title {
    order: 1;
    /* PCサイズと統一されている（継承） */
  }

  .hamburger-menu {
    order: 2;
  }

  /* Nav ── ドロップダウン展開 */
  .header-nav {
    order: 3;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    background: transparent;
    transition: max-height 0.35s ease, padding 0.35s ease;
  }

  .header.active .header-nav {
    max-height: 300px;
    padding: 0 0 30px;
    /* 下部余白を調整 */
  }

  .nav-menu {
    flex-direction: column;
    align-items: flex-end;
    /* 項目自体を右寄せ */
    gap: 0;
    width: 100%;
  }

  .nav-link {
    display: block;
    font-size: var(--font-size-md);
    padding: 12px 0;
    text-align: right;
    width: 100%;
    /* クリック可能範囲を広げつつ、テキストは右寄せ */
  }
}
