/* ============================================================
   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: 1920px;
  --section-pad-x: 60px;
  --section-pad-x-mobile: 20px;
}

/* bg-shader フォールバック（JS適用前・失敗時の保険） */
.bg-shader {
  background-color: var(--color-accent);
}
.nobr{display: inline-block;}

/* ============================================================
   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);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  background-color: var(--color-bg);
}

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

/* ============================================================
   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: visible;
  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;
}

/* Navigation drawer */
.header-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 3;
  width: min(420px, 100vw);
  height: 100svh;
  padding: 6.5rem 2.5rem 3rem;
  overflow-y: auto;
  color: var(--color-text);
  background: var(--color-bg);
  border-left: 1px solid rgba(80, 78, 77, 0.18);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s ease, visibility 0.35s ease;
}

.header.active .header-nav {
  transform: translateX(0);
  visibility: visible;
}

.nav-group + .nav-group {
  margin-top: 3.5rem;
}

.nav-group h2 {
  margin: 0 0 1rem;
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li + li {
  margin-top: 0.1rem;
}

.nav-link {
  display: block;
  width: 100%;
  padding: 0.65rem 0 0.65rem 2rem;
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  transition: color 0.2s ease;
}

a.nav-link:hover,
a.nav-link:focus-visible {
  color: var(--color-accent);
  outline: none;
}

a.nav-link[aria-current="page"] {
  color: var(--color-accent);
}

.nav-link--disabled {
  color: rgba(80, 78, 77, 0.55);
  cursor: default;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.header.active .nav-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

.hamburger-menu {
  display: flex;
  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: 4;
}

.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);
}

.hamburger-menu.active span {
  background-color: var(--color-text);
}

/* ============================================================
   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: 0rem 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;
}
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-item {
  margin-bottom: 2rem;
  font-variant-numeric: tabular-nums;
}

.info-item h4 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0 0 0.5rem;
  word-break: break-word;
}

.info-item p {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin: 0;
}

.info-item a {
  color: var(--color-accent);
  text-decoration: underline;
}

.info-item a:hover {
  text-decoration: none;
}
/* Utility classes */
.annotations {
  text-indent: -1em;
  padding-left: 1em;
}

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

.signature {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  text-align: right;
  margin-top: 5rem;
}

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

  .header-content {
    height: var(--header-height);
  }

  .header-nav {
    width: 100%;
    padding: 6rem var(--section-pad-x-mobile) 2.5rem;
    border-left: 0;
  }

  .nav-link {
    font-size: var(--font-size-md);
    padding-left: 2rem;
  }

  .signature {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
  }
}
