:root {
  --bg: #07080d;
  --bg2: #0d1018;
  --ink: #f2f4f8;
  --mute: #8c95a6;
  --blue: #00e5ff;
  --blue-soft: #6cf0ff;
  --red: #ff2a3d;
  --red-soft: #ff6b78;
  --line: rgba(242, 244, 248, 0.14);
  /* 本文：シャープな近代角ゴシック */
  --sans: "Makinas-4-Square", "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  /* 見出し漢字：角がパキッとしたシャープな角ゴシック（丸み・潰れなし） */
  --display: "Comet", "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  /* 英字：ロゴの「マキナス Square」に合わせたスクエア・ジオメトリック体 */
  --square: "Makinas-4-Square", "Chakra Petch", "Zen Kaku Gothic New", sans-serif;
  --accent: #00e5ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(ellipse at 50% -10%, #101826 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: .06em;
  overflow-x: hidden;
  transition: background-color .8s;
}
a { color: inherit; text-decoration: none; }
.en {
  font-family: var(--square);
  font-weight: 600;
  letter-spacing: .18em;
}

/* ---------- 背景エフェクト ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.noise {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise 1.2s steps(6) infinite;
}
@keyframes noise {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.cursor-glow {
  position: fixed; width: 480px; height: 480px; border-radius: 50%; z-index: 2; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 65%);
  transform: translate(-50%, -50%); left: -500px; top: -500px; transition: background .6s;
}
body[data-mode="akuta"] { --accent: var(--blue); }
body[data-mode="arata"] { --accent: var(--red); }

section, header, footer { position: relative; z-index: 3; }

/* ---------- ナビ ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 5vw; backdrop-filter: blur(8px);
  background: linear-gradient(to bottom, rgba(7, 8, 13, .88), rgba(7, 8, 13, 0));
}
.nav-logo {
  display: inline-flex;
  align-items: center;
}
.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
  filter:
    drop-shadow(0 2px 8px rgba(0, 0, 0, .9))
    drop-shadow(-2px 0 8px rgba(0, 229, 255, .45))
    drop-shadow(2px 0 8px rgba(255, 42, 61, .45));
  transition: transform .25s ease, filter .25s ease;
}
.nav-logo:hover img {
  transform: scale(1.05);
  filter:
    drop-shadow(0 2px 10px rgba(0, 0, 0, .95))
    drop-shadow(-3px 0 12px rgba(0, 229, 255, .85))
    drop-shadow(3px 0 12px rgba(255, 42, 61, .85));
}
.nav nav a {
  font-family: var(--square);
  font-weight: 700;
  margin-left: 2em;
  font-size: .9rem;
  letter-spacing: .14em;
  color: var(--mute);
  transition: color .3s, text-shadow .3s;
}
.nav nav a:hover {
  color: var(--ink);
  text-shadow: 0 0 12px var(--accent);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  z-index: auto;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: transparent;
  perspective: 1000px;
}
.hero-kv {
  position: absolute;
  inset: -5%;
  z-index: 1;
  overflow: hidden;
  transition: transform .25s ease-out;
  will-change: transform;
}
.hero-kv img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
  user-select: none;
  pointer-events: none;
}
.hero-kv .kv-base {
  transform: scale(1.06);
  opacity: 0;
  animation:
    kvReveal 2s cubic-bezier(.16, 1, .3, 1) forwards,
    kvCamera 11s 2s ease-in-out infinite alternate;
}
/* 山門の赤とシアンのネオンだけが脈動・明滅する発光レイヤー */
.hero-kv .kv-neon {
  mix-blend-mode: color-dodge;
  filter: contrast(1.65) brightness(0.65) saturate(2.2) blur(4px);
  opacity: 0;
  animation:
    kvNeonPulse 3.2s 1.2s ease-in-out infinite alternate,
    kvCamera 11s 2s ease-in-out infinite alternate;
}
/* 背景自体にも時折走る電脳グリッチ＆色ズレレイヤー */
.hero-kv .kv-glitch {
  mix-blend-mode: screen;
  filter: contrast(1.4) saturate(2) hue-rotate(-15deg);
  opacity: 0;
  animation: kvBgGlitch 2.5s 1.5s infinite steps(1);
}
/* 電脳走査線＆光のゆらぎ */
.kv-scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 3px,
      rgba(0, 0, 0, .28) 3px,
      rgba(0, 0, 0, .28) 4px
    ),
    radial-gradient(circle at 50% 42%, rgba(0, 229, 255, .12), rgba(255, 42, 61, .1) 45%, transparent 70%);
  mix-blend-mode: overlay;
  pointer-events: none;
  animation: scanShift 6s linear infinite;
}
.hero-kv::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(to bottom, rgba(7, 8, 13, .6) 0%, transparent 20%, transparent 64%, var(--bg) 100%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .28) 0%, rgba(5, 6, 10, .75) 100%);
  pointer-events: none;
}
/* 背景切り替え時の電脳カット・フラッシュ演出 */
.hero-kv.is-switching .kv-base {
  animation: kvSwitchCut .36s steps(2) forwards !important;
}
.hero-kv.is-switching .kv-glitch {
  opacity: .92 !important;
  animation: kvSwitchGlitch .36s steps(1) forwards !important;
}
@keyframes kvSwitchCut {
  0% { filter: brightness(2.2) contrast(2) hue-rotate(90deg); transform: scale(1.09) translate(-18px, 4px) skewX(-6deg); }
  45% { filter: brightness(0.3) contrast(2.5) invert(0.15); transform: scale(1.07) translate(16px, -4px) skewX(5deg); }
  80% { filter: brightness(1.5) contrast(1.4) hue-rotate(-30deg); transform: scale(1.05) translate(-6px, 0); }
  100% { filter: brightness(1) contrast(1); transform: scale(1.04); }
}
@keyframes kvSwitchGlitch {
  0% { transform: scale(1.08) translate(28px, -6px) skewX(12deg); clip-path: inset(10% 0 40% 0); filter: contrast(2.2) saturate(3) hue-rotate(150deg); }
  35% { transform: scale(1.08) translate(-30px, 6px) skewX(-12deg); clip-path: inset(45% 0 10% 0); filter: contrast(2.2) saturate(3) hue-rotate(-60deg); }
  70% { transform: scale(1.06) translate(14px, 2px); clip-path: inset(20% 0 30% 0); }
  100% { opacity: 0; transform: scale(1.04); clip-path: none; }
}
@keyframes kvReveal {
  from { opacity: 0; transform: scale(1.1); filter: brightness(0.4) blur(6px); }
  to { opacity: 1; transform: scale(1.03); filter: brightness(1) blur(0); }
}
@keyframes kvCamera {
  0% { transform: scale(1.03) translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: scale(1.075) translate3d(-1%, 0.6%, 0) rotate(-0.35deg); }
  100% { transform: scale(1.045) translate3d(1%, -0.6%, 0) rotate(0.35deg); }
}
@keyframes kvNeonPulse {
  0% { opacity: .22; filter: contrast(1.6) brightness(0.55) saturate(2) blur(3px); }
  45% { opacity: .58; filter: contrast(1.8) brightness(0.85) saturate(2.5) blur(6px); }
  48% { opacity: .18; }
  52% { opacity: .72; filter: contrast(1.9) brightness(0.95) saturate(2.8) blur(8px); }
  100% { opacity: .42; filter: contrast(1.7) brightness(0.75) saturate(2.3) blur(4px) hue-rotate(8deg); }
}
@keyframes kvBgGlitch {
  0%, 17%, 21%, 51%, 55%, 82%, 86%, 100% {
    opacity: 0;
    transform: scale(1.04);
    clip-path: none;
  }
  18% {
    opacity: .65;
    transform: scale(1.05) translate(-16px, 2px);
    clip-path: inset(18% 0 52% 0);
    filter: contrast(1.8) saturate(2.5) hue-rotate(160deg);
  }
  19% {
    opacity: .55;
    transform: scale(1.05) translate(14px, -3px);
    clip-path: inset(55% 0 15% 0);
    filter: contrast(1.8) saturate(2.5) hue-rotate(-25deg);
  }
  52% {
    opacity: .75;
    transform: scale(1.06) translate(20px, 0) skewX(3deg);
    clip-path: inset(28% 0 38% 0);
    filter: contrast(2) brightness(1.2) saturate(3);
  }
  53% {
    opacity: .5;
    transform: scale(1.04) translate(-18px, 4px);
    clip-path: inset(62% 0 8% 0);
  }
  83% {
    opacity: .7;
    transform: scale(1.055) translate(-22px, -2px);
    clip-path: inset(12% 0 60% 0);
    filter: contrast(1.9) saturate(2.8) hue-rotate(140deg);
  }
  84% {
    opacity: .6;
    transform: scale(1.05) translate(18px, 3px);
    clip-path: inset(42% 0 22% 0);
  }
}
@keyframes scanShift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 24px, 0 0; }
}
.hero-inner {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(2vh);
  transition: transform .2s ease-out;
  will-change: transform;
}
.hero-logo-wrap {
  position: relative;
  width: clamp(360px, 48vw, 680px);
  aspect-ratio: 1692 / 1212;
  opacity: 0;
  filter:
    drop-shadow(0 8px 28px rgba(0, 0, 0, .95))
    drop-shadow(-6px -2px 22px rgba(0, 229, 255, .55))
    drop-shadow(6px 2px 22px rgba(255, 42, 61, .55));
  animation:
    logoEnter 1.2s .35s cubic-bezier(.16, 1, .3, 1) forwards,
    logoFloat 4.2s 1.6s ease-in-out infinite,
    logoGlow 2.8s 1.6s ease-in-out infinite alternate;
}
.hero-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}
.hero-logo-main {
  z-index: 3;
  animation: logoGlitchMain 2.5s infinite steps(1);
}
.hero-logo-cyan {
  z-index: 1;
  filter: brightness(0) saturate(100%) invert(72%) sepia(85%) saturate(3800%) hue-rotate(150deg) brightness(108%) contrast(108%);
  mix-blend-mode: screen;
  opacity: .85;
  animation: logoGlitchCyan 2.5s infinite steps(1);
}
.hero-logo-red {
  z-index: 2;
  filter: brightness(0) saturate(100%) invert(24%) sepia(98%) saturate(6400%) hue-rotate(342deg) brightness(104%) contrast(110%);
  mix-blend-mode: screen;
  opacity: .85;
  animation: logoGlitchRed 2.5s infinite steps(1);
}
@keyframes logoEnter {
  0% { opacity: 0; transform: scale(.88) translateY(18px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes logoGlow {
  0% {
    filter:
      drop-shadow(0 4px 12px rgba(0, 0, 0, 1))
      drop-shadow(0 8px 28px rgba(0, 0, 0, .95))
      drop-shadow(-5px -2px 16px rgba(0, 229, 255, .55))
      drop-shadow(5px 2px 16px rgba(255, 42, 61, .55));
  }
  50% {
    filter:
      drop-shadow(0 4px 14px rgba(0, 0, 0, 1))
      drop-shadow(0 8px 32px rgba(0, 0, 0, .95))
      drop-shadow(-10px 2px 32px rgba(0, 229, 255, .9))
      drop-shadow(10px -2px 32px rgba(255, 42, 61, .9));
  }
  100% {
    filter:
      drop-shadow(0 4px 12px rgba(0, 0, 0, 1))
      drop-shadow(0 8px 28px rgba(0, 0, 0, .95))
      drop-shadow(8px -3px 26px rgba(0, 229, 255, .75))
      drop-shadow(-8px 3px 26px rgba(255, 20, 90, .75));
  }
}
@keyframes logoGlitchMain {
  0%, 17%, 24%, 51%, 59%, 82%, 91%, 100% {
    transform: none;
    clip-path: none;
    opacity: 1;
  }
  18% { transform: translate(-14px, 2px) skewX(-10deg); clip-path: inset(25% 0 45% 0); }
  19% { transform: translate(16px, -3px) skewX(12deg); clip-path: inset(50% 0 22% 0); opacity: .88; }
  20% { transform: translate(-6px, 0); clip-path: none; }
  52% { transform: translate(20px, -2px) scaleX(1.05) skewX(14deg); clip-path: inset(30% 0 40% 0); }
  53% { transform: translate(-18px, 3px) scaleX(0.96) skewX(-12deg); clip-path: inset(55% 0 20% 0); opacity: .75; }
  54% { transform: translate(6px, 1px); clip-path: inset(20% 0 58% 0); }
  55% { transform: translate(-3px, 0); clip-path: none; }
  83% { transform: translate(-24px, -2px) skewX(-16deg); clip-path: inset(26% 0 48% 0); }
  84% { transform: translate(22px, 3px) skewX(15deg); clip-path: inset(46% 0 24% 0); opacity: .8; }
  85% { transform: translate(-10px, -1px); clip-path: inset(35% 0 35% 0); }
  86% { transform: translate(6px, 0); clip-path: none; }
}
@keyframes logoGlitchCyan {
  0%, 16%, 25%, 50%, 60%, 81%, 92%, 100% {
    transform: translate(-2.5px, -1px);
    clip-path: none;
    opacity: .75;
  }
  17% { transform: translate(-26px, -4px) skewX(-14deg) scaleX(1.05); clip-path: inset(22% 0 46% 0); opacity: 1; }
  18% { transform: translate(22px, 3px) skewX(10deg); clip-path: inset(48% 0 22% 0); opacity: 1; }
  19% { transform: translate(-14px, 0); clip-path: inset(32% 0 38% 0); opacity: 1; }
  20% { transform: translate(10px, -2px); clip-path: none; opacity: .9; }
  51% { transform: translate(-32px, 3px) skewX(-18deg) scaleX(1.07); clip-path: inset(26% 0 42% 0); opacity: 1; }
  52% { transform: translate(26px, -4px) skewX(14deg); clip-path: inset(54% 0 20% 0); opacity: 1; }
  53% { transform: translate(-16px, 2px); clip-path: inset(20% 0 60% 0); opacity: 1; }
  54% { transform: translate(12px, 0); clip-path: inset(40% 0 30% 0); opacity: .95; }
  82% { transform: translate(-36px, -3px) skewX(-20deg); clip-path: inset(24% 0 50% 0); opacity: 1; }
  83% { transform: translate(30px, 4px) skewX(16deg); clip-path: inset(44% 0 24% 0); opacity: 1; }
  84% { transform: translate(-20px, -2px); clip-path: inset(58% 0 18% 0); opacity: 1; }
  85% { transform: translate(14px, 1px); clip-path: inset(28% 0 42% 0); opacity: 1; }
  86% { transform: translate(-6px, 0); clip-path: none; opacity: .85; }
}
@keyframes logoGlitchRed {
  0%, 16%, 25%, 50%, 60%, 81%, 92%, 100% {
    transform: translate(2.5px, 1px);
    clip-path: none;
    opacity: .75;
  }
  17% { transform: translate(26px, 4px) skewX(14deg) scaleX(1.05); clip-path: inset(46% 0 22% 0); opacity: 1; }
  18% { transform: translate(-22px, -3px) skewX(-10deg); clip-path: inset(22% 0 50% 0); opacity: 1; }
  19% { transform: translate(16px, 1px); clip-path: inset(36% 0 32% 0); opacity: 1; }
  20% { transform: translate(-10px, 2px); clip-path: none; opacity: .9; }
  51% { transform: translate(32px, -3px) skewX(18deg) scaleX(1.07); clip-path: inset(50% 0 22% 0); opacity: 1; }
  52% { transform: translate(-28px, 4px) skewX(-14deg); clip-path: inset(22% 0 54% 0); opacity: 1; }
  53% { transform: translate(18px, -2px); clip-path: inset(56% 0 20% 0); opacity: 1; }
  54% { transform: translate(-12px, 0); clip-path: inset(26% 0 44% 0); opacity: .95; }
  82% { transform: translate(36px, 4px) skewX(20deg); clip-path: inset(48% 0 24% 0); opacity: 1; }
  83% { transform: translate(-30px, -4px) skewX(-16deg); clip-path: inset(22% 0 48% 0); opacity: 1; }
  84% { transform: translate(22px, 2px); clip-path: inset(20% 0 58% 0); opacity: 1; }
  85% { transform: translate(-14px, -1px); clip-path: inset(38% 0 30% 0); opacity: 1; }
  86% { transform: translate(6px, 0); clip-path: none; opacity: .85; }
}
.hero-copy {
  margin-top: -1.5rem;
  font-family: var(--square);
  font-weight: 700;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  letter-spacing: .28em;
  color: var(--ink);
  text-shadow:
    0 2px 16px rgba(0, 0, 0, .95),
    -3px 0 14px rgba(0, 229, 255, .45),
    3px 0 14px rgba(255, 42, 61, .45);
  opacity: 0;
  animation: fadeUp 1.4s 1.2s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-size: .7rem; color: var(--mute); display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--ink), transparent); animation: cue 2s infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- セクション共通 ---------- */
.section { padding: 140px 5vw 100px; max-width: 1240px; margin: 0 auto; }

/* ---------- STORY ---------- */
.story {
  padding: 100px 5vw 90px;
  max-width: 860px;
  text-align: center;
}
.story-body {
  display: grid;
  gap: 2.4rem;
  font-size: clamp(.95rem, 1.5vw, 1.12rem);
  line-height: 2.25;
  letter-spacing: .12em;
  color: rgba(242, 244, 248, 0.88);
}
.nowrap { display: inline-block; }
.story-body strong {
  display: inline-block;
  color: var(--ink);
  font-weight: 700;
  text-shadow:
    -2px 0 12px rgba(0, 229, 255, .32),
    2px 0 12px rgba(255, 42, 61, .32);
}
.story-body .yokai {
  display: inline-block;
  color: #c77dff;
  font-weight: 700;
  text-shadow:
    0 0 12px rgba(177, 74, 255, .65),
    0 0 26px rgba(123, 44, 191, .45);
}
.story-closing {
  margin-top: 1.2rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  letter-spacing: .2em;
  color: var(--ink);
  transform: skewX(-4deg);
  text-shadow:
    -3px 0 16px rgba(0, 229, 255, .45),
    3px 0 16px rgba(255, 42, 61, .45);
}
.total-power {
  margin: 0 auto 5.5rem;
  padding: 2.4rem 2rem;
  max-width: 580px;
  border: 1px solid rgba(0, 229, 255, .4);
  background: linear-gradient(135deg, rgba(0, 229, 255, .08), rgba(13, 16, 24, .92) 50%, rgba(255, 42, 61, .08));
  box-shadow: 0 0 36px -12px rgba(0, 229, 255, .35), inset 0 0 24px rgba(0, 229, 255, .06);
  position: relative;
}
.total-power-label {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: .24em;
  color: var(--ink);
}
.total-power-num {
  font-family: var(--square);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 4.4rem);
  line-height: 1.15;
  letter-spacing: .12em;
  margin: .35rem 0 .6rem;
  color: var(--blue);
  text-shadow:
    0 0 14px rgba(0, 229, 255, .85),
    0 0 32px rgba(0, 229, 255, .5),
    0 2px 10px rgba(0, 0, 0, .9);
}
.total-power-desc {
  font-size: .78rem;
  color: var(--mute);
  letter-spacing: .08em;
  line-height: 1.7;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: .18em;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  transform: skewX(-5deg);
  text-shadow: -3px 0 16px rgba(0, 229, 255, .35), 3px 0 16px rgba(255, 42, 61, .35);
}
.section-title .en {
  font-family: var(--square);
  font-size: .85rem;
  letter-spacing: .24em;
  color: var(--accent);
  font-weight: 700;
  transform: skewX(5deg);
  transition: color .6s;
}
.section-lead { color: var(--mute); margin-bottom: 3.5rem; font-weight: 500; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.1s, transform 1.1s; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 一族 ---------- */
.members { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.member {
  --c: var(--ink); --c-soft: var(--mute);
  position: relative; border: 1px solid var(--line); background: rgba(13, 16, 24, .7);
  overflow: hidden; transition: transform .6s cubic-bezier(.2, .8, .2, 1), border-color .6s, box-shadow .6s;
  opacity: 0; transform: translateY(40px);
}
.member.is-in { opacity: 1; transform: none; }
.member[data-theme="akuta"] { --c: var(--blue); --c-soft: var(--blue-soft); }
.member[data-theme="arata"] { --c: var(--red); --c-soft: var(--red-soft); }
.member:hover, .member:focus-visible {
  transform: translateY(-8px); border-color: var(--c); outline: none;
  box-shadow: 0 0 0 1px var(--c), 0 20px 60px -20px var(--c);
}
.member-visual { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #000; }
.member-visual img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  filter: grayscale(.85) brightness(.75); transform: scale(1.04);
  transition: filter .8s, transform 1.2s cubic-bezier(.2, .8, .2, 1);
}
.member-visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,8,13,1) 0%, transparent 45%);
}
.member:hover img, .member:focus-visible img { filter: grayscale(0) brightness(1); transform: scale(1.1); }
.member-kanji {
  position: absolute; right: 16px; bottom: -6px; z-index: 2;
  font-family: var(--display); font-size: 6.4rem; font-weight: 900; line-height: 1;
  transform: skewX(-5deg);
  color: transparent; -webkit-text-stroke: 1.2px var(--c); opacity: .55;
  transition: opacity .5s, filter .5s, transform .5s;
}
.member:hover .member-kanji {
  opacity: 1;
  /* text-shadowだと中が塗りつぶされて潰れるため、輪郭線だけを発光させる */
  filter: drop-shadow(0 0 8px var(--c));
  transform: skewX(-5deg) scale(1.04);
}
.member-body { padding: 22px 24px 28px; }
.member-role { font-family: var(--square); font-weight: 700; font-size: .8rem; color: var(--c-soft); letter-spacing: .3em; }
.member h3 {
  font-family: var(--display); font-weight: 900; font-size: 2.1rem; letter-spacing: .16em;
  display: flex; align-items: baseline; gap: .8rem; transform: skewX(-5deg); transform-origin: left bottom;
}
.member h3 .en { font-family: var(--square); font-weight: 700; font-size: .82rem; color: var(--c-soft); transform: skewX(5deg); }
.member-mission { margin: .5rem 0 1.2rem; font-size: .95rem; font-weight: 700; }
.member-data { display: grid; gap: .4rem; font-size: .85rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.member-data div { display: grid; grid-template-columns: 6.5em 1fr; align-items: baseline; }
.member-data dt { font-family: var(--square); color: var(--mute); }
.member-data .power { font-family: var(--square); font-weight: 700; color: var(--c-soft); letter-spacing: .08em; }
.member-data .power-note { font-size: .74rem; color: var(--mute); margin-left: .35em; letter-spacing: .04em; }
.secret { color: var(--c-soft); letter-spacing: .2em; }
.member blockquote {
  margin: 1.4rem 0; padding-left: 1rem; border-left: 2px solid var(--c); font-size: .92rem; line-height: 1.85; font-weight: 700;
}
.member-links { display: flex; gap: .8rem; margin-top: 1.4rem; }
.member-links a {
  font-family: var(--square); font-weight: 700; font-size: .78rem; letter-spacing: .14em; padding: .4rem 1rem;
  border: 1px solid var(--line); transition: border-color .3s, color .3s, background .3s;
}
.member-links a:hover { border-color: var(--c); color: var(--c-soft); background: color-mix(in srgb, var(--c) 12%, transparent); }
a[aria-disabled="true"] { opacity: .35; pointer-events: none; }

.member-unknown .member-body { opacity: .6; }
.silhouette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 22% 16% at 50% 34%, #1c1f29 98%, transparent 100%),
    radial-gradient(ellipse 46% 36% at 50% 92%, #1c1f29 98%, transparent 100%),
    linear-gradient(#0a0c12, #0a0c12);
  filter: blur(1px);
}
.member-unknown:hover .silhouette { animation: shake .4s steps(2) 2; }
@keyframes shake { 50% { transform: translateX(3px); filter: blur(2px) hue-rotate(90deg); } }

/* ---------- 関係図 ---------- */
.rel-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px 10px;
}
.rel-main {
  display: grid;
  grid-template-columns: auto minmax(220px, 380px) auto;
  align-items: center;
  gap: clamp(16px, 3.5vw, 44px);
  width: 100%;
  max-width: 960px;
  justify-content: center;
}
.rel-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.rel-node:hover {
  transform: translateY(-6px);
}
.rel-avatar {
  position: relative;
  width: clamp(150px, 20vw, 210px);
  height: clamp(150px, 20vw, 210px);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(20, 26, 40, .95), rgba(7, 8, 13, .95));
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  overflow: visible;
  transition: border-color .45s, box-shadow .45s;
}
.rel-avatar img {
  width: 108%;
  height: 108%;
  object-fit: contain;
  transform: translateY(-4px);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .85));
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), filter .45s;
  pointer-events: none;
}
.node-akuta .rel-avatar {
  border-color: rgba(0, 229, 255, .6);
  box-shadow: 0 0 32px -8px rgba(0, 229, 255, .55), inset 0 0 24px rgba(0, 229, 255, .12);
}
.node-arata .rel-avatar {
  border-color: rgba(255, 42, 61, .65);
  box-shadow: 0 0 32px -8px rgba(255, 42, 61, .6), inset 0 0 24px rgba(255, 42, 61, .14);
}
.node-akuta:hover .rel-avatar {
  border-color: var(--blue);
  box-shadow: 0 0 52px -4px var(--blue), inset 0 0 30px rgba(0, 229, 255, .22);
}
.node-arata:hover .rel-avatar {
  border-color: var(--red);
  box-shadow: 0 0 52px -4px var(--red), inset 0 0 30px rgba(255, 42, 61, .24);
}
.rel-node:hover .rel-avatar img {
  transform: translateY(-10px) scale(1.06);
}
.rel-name {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: .16em;
  display: flex;
  align-items: baseline;
  gap: .5rem;
  transform: skewX(-5deg);
}
.rel-name small {
  font-family: var(--square);
  font-size: .75rem;
  color: var(--mute);
  letter-spacing: .2em;
  transform: skewX(5deg);
}
.node-akuta .rel-name small { color: var(--blue-soft); }
.node-arata .rel-name small { color: var(--red-soft); }

/* 関係矢印 */
.rel-arrows {
  display: flex;
  flex-direction: column;
  gap: 34px;
  width: 100%;
  padding: 0 8px;
}
.rel-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.rel-label {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(.82rem, 1.2vw, .96rem);
  letter-spacing: .12em;
  padding: .3em .95em;
  border-radius: 2px;
  white-space: nowrap;
}
/* 芥 → 改（無関心・フラット） */
.arrow-to-arata .rel-label {
  color: var(--mute);
  background: rgba(13, 16, 24, .85);
  border: 1px solid rgba(242, 244, 248, .16);
}
.arrow-to-arata .arrow-line {
  position: relative;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, rgba(0, 229, 255, .55), rgba(242, 244, 248, .25));
}
.arrow-to-arata .arrow-line::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid rgba(242, 244, 248, .45);
  border-right: 1.5px solid rgba(242, 244, 248, .45);
  transform: rotate(45deg);
}
/* 改 → 芥（ライバル視・勝ちたい） */
.arrow-to-akuta .rel-label {
  color: #fff;
  background: rgba(255, 42, 61, .16);
  border: 1px solid rgba(255, 42, 61, .75);
  box-shadow: 0 0 18px rgba(255, 42, 61, .35);
  text-shadow: 0 0 10px rgba(255, 42, 61, .65);
}
.arrow-to-akuta .arrow-line {
  position: relative;
  width: 100%;
  height: 2px;
  background: linear-gradient(to left, var(--red), rgba(255, 42, 61, .45));
  box-shadow: 0 0 12px var(--red);
}
.arrow-to-akuta .arrow-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4.5px;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--red);
  border-left: 2px solid var(--red);
  transform: rotate(45deg);
  filter: drop-shadow(0 0 6px var(--red));
}

/* 未解放（？？？）ノード */
.rel-sub {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rel-sub-lines {
  display: flex;
  justify-content: space-between;
  width: min(380px, 60vw);
  height: 48px;
  margin-bottom: 8px;
}
.rel-sub-lines .sub-line {
  width: 48%;
  height: 100%;
  border-bottom: 1px dashed rgba(242, 244, 248, .2);
}
.rel-sub-lines .sub-line.left {
  border-left: 1px dashed rgba(242, 244, 248, .2);
  transform: skewX(24deg);
}
.rel-sub-lines .sub-line.right {
  border-right: 1px dashed rgba(242, 244, 248, .2);
  transform: skewX(-24deg);
}
.rel-sub .node-unknown .rel-avatar {
  width: 116px;
  height: 116px;
  border-style: dashed;
  border-color: rgba(242, 244, 248, .22);
}
.unknown-mark {
  font-family: var(--display);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--mute);
  opacity: .55;
}
.rel-sub .rel-name {
  font-size: 1.25rem;
  color: var(--mute);
}
.tree-msg { margin-top: 2rem; min-height: 1.9em; color: var(--mute); letter-spacing: .2em; font-size: .9rem; }

/* ---------- 記録 ---------- */
.records { list-style: none; border-top: 1px solid var(--line); }
.records li { display: grid; grid-template-columns: 8em 1fr; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.records time { font-family: var(--square); font-weight: 700; color: var(--accent); font-size: .9rem; letter-spacing: .15em; transition: color .6s; }

/* ---------- 檀家 ---------- */
.danka { text-align: center; }
.danka .section-title { align-items: center; }
.btn {
  font-family: var(--display); font-weight: 900;
  display: inline-flex; align-items: center; gap: 1rem; padding: 1rem 2.6rem; border: 1px solid var(--ink);
  letter-spacing: .2em; font-size: 1.05rem; position: relative; overflow: hidden; transform: skewX(-5deg);
}
.btn span { font-family: var(--square); font-size: .72rem; color: var(--mute); letter-spacing: .14em; transform: skewX(5deg); }
.btn[aria-disabled="true"] { opacity: .6; }

/* ---------- フッター ---------- */
.footer { text-align: center; padding: 70px 5vw 40px; border-top: 1px solid var(--line); margin-top: 60px; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.footer-logo {
  display: inline-flex;
  align-items: center;
}
.footer-logo img {
  height: 34px;
  width: auto;
  display: block;
  filter:
    drop-shadow(0 2px 8px rgba(0, 0, 0, .9))
    drop-shadow(-2px 0 8px rgba(0, 229, 255, .45))
    drop-shadow(2px 0 8px rgba(255, 42, 61, .45));
  transition: transform .25s ease, filter .25s ease;
}
.footer-logo:hover img {
  transform: scale(1.05);
  filter:
    drop-shadow(0 2px 10px rgba(0, 0, 0, .95))
    drop-shadow(-3px 0 12px rgba(0, 229, 255, .85))
    drop-shadow(3px 0 12px rgba(255, 42, 61, .85));
}
.copy { font-family: var(--square); font-size: .72rem; color: var(--mute); letter-spacing: .2em; }

/* ---------- パフォーマンス最適化（画面外でのアニメーション一時停止） ---------- */
.hero.is-offscreen *,
.hero.is-offscreen .kv-scanlines {
  animation-play-state: paused !important;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .members { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .nav { padding: 14px 4vw; }
  .nav-logo img { height: 26px; }
  .nav nav a { margin-left: 1em; font-size: .78rem; letter-spacing: .08em; }
  .cursor-glow { display: none; }
  .pc-br { display: none; }
}

@media (max-width: 640px) {
  .nav { padding: 12px 3.5vw; }
  .nav-logo img { height: 22px; }
  .nav nav a { margin-left: .75em; font-size: .72rem; letter-spacing: .05em; }

  .hero-logo-wrap { width: clamp(270px, 82vw, 420px); }
  .hero-copy {
    margin-top: -.8rem;
    font-size: clamp(.82rem, 3.7vw, 1rem);
    letter-spacing: .14em;
    padding: 0 3vw;
    white-space: nowrap;
  }

  .section { padding: 90px 5vw 70px; }
  .story { padding: 70px 4vw 60px; }
  .total-power {
    margin: 0 auto 3.8rem;
    padding: 1.8rem 1.1rem;
  }
  .total-power-label { font-size: .9rem; letter-spacing: .18em; }
  .total-power-num { font-size: clamp(2.5rem, 11vw, 3.4rem); }
  .total-power-desc { font-size: .72rem; letter-spacing: .04em; }

  .story-body {
    gap: 1.8rem;
    font-size: clamp(.8rem, 3.55vw, .95rem);
    line-height: 2.15;
    letter-spacing: .05em;
  }
  .story-closing {
    font-size: clamp(.92rem, 4.1vw, 1.25rem);
    letter-spacing: .1em;
    padding-top: 1.8rem;
    white-space: nowrap;
  }

  .section-lead {
    font-size: clamp(.82rem, 3.6vw, .95rem);
    letter-spacing: .04em;
    margin-bottom: 2.4rem;
  }

  /* 関係図：スマホでも左右対峙＋中央矢印＋下部？？？分岐の構図を維持 */
  .rel-chart { padding: 16px 0 8px; }
  .rel-main {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    max-width: 100%;
  }
  .rel-avatar {
    width: clamp(82px, 23vw, 110px);
    height: clamp(82px, 23vw, 110px);
  }
  .rel-name {
    font-size: 1.1rem;
    letter-spacing: .08em;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .rel-name small { font-size: .62rem; letter-spacing: .14em; }
  .rel-arrows { gap: 18px; padding: 0 2px; }
  .rel-label {
    font-size: clamp(.64rem, 2.7vw, .78rem);
    letter-spacing: .04em;
    padding: .25em .55em;
  }
  .rel-sub { margin-top: 18px; }
  .rel-sub-lines { width: 58vw; height: 34px; }
  .rel-sub .node-unknown .rel-avatar { width: 78px; height: 78px; }
  .unknown-mark { font-size: 2rem; }
  .rel-sub .rel-name { font-size: .95rem; }

  .records li { grid-template-columns: 6.2em 1fr; font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-kv img, .hero-copy, .reveal, .member { opacity: 1; transform: none; }
}
