/* AMIX GAMES — GAME SELECT
   色・余白・書体はこのページ専用。共通ファイルは参照のみ（../common/fonts）。 */

:root {
  --bg: #0b0b0e;
  --bg2: #131318;
  --ink: #f4f1ea;
  --dim: rgba(244, 241, 234, 0.56);
  --mute: rgba(244, 241, 234, 0.32);
  --line: rgba(244, 241, 234, 0.13);
  --accent: #ff5a1f;            /* JSが選択中ゲームの色へ差し替える */
  --accent-ink: #0b0b0e;
  --f-en: "Anton", "Dela Gothic One", sans-serif;
  --f-ja: "Dela Gothic One", "Noto Sans JP", sans-serif;   /* 極太の見出し用。小サイズでは潰れるので --f-ja-s を使う */
  --f-ja-s: "Noto Sans JP", system-ui, sans-serif;
  --f-mono: "Space Mono", "Noto Sans JP", ui-monospace, monospace;
  --f-body: "Noto Sans JP", system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}
body.is-locked { overflow: hidden; }

a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- 固定レイヤー ---------- */
#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  display: block;
}
#gl2 {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;                   /* INDEX行ホバーのプレビュー。本文より前、ヘッダーより後ろ */
  pointer-events: none;
  display: none;
}
html.gl-on #gl2 { display: block; }
html.no-gl #gl, html.no-gl #gl2 { display: none; }

.glow {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 62%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%),
    radial-gradient(40% 40% at 80% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  opacity: 0.9;
  transition: background 0.9s var(--ease-io), opacity 0.6s;
  filter: saturate(1.1);
}
html.no-gl .glow { opacity: 0.45; }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  width: 200%;
  height: 200%;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  animation: grain 0.6s steps(3) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-3%, 2%); }
  66% { transform: translate(2%, -4%); }
  100% { transform: translate(0, 0); }
}

/* ---------- ローダー（PRESS START ゲート） ----------
   背景は透過。裏のWebGLでカバーが飛んできて山積みになる。本文はゲートを抜けるまで隠す */
/* 本文を隠すのは WebGL 起動後（html.gl-on）だけ。JSなし・WebGLなし・クローラーには最初から見える */
html.js:not(.no-gl) body:not(.is-in) main, html.js:not(.no-gl) body:not(.is-in) .site-head, html.js:not(.no-gl) body:not(.is-in) .marquee { visibility: hidden; }
body.is-in main, body.is-in .site-head { animation: fadein 0.9s var(--ease) both; }
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(80% 70% at 50% 50%, rgba(11, 11, 14, 0.25), rgba(11, 11, 14, 0.92) 100%);
  display: grid;
  place-items: end center;
  padding-bottom: clamp(28px, 7svh, 72px);
  transition: opacity 0.6s var(--ease-io), visibility 0s 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
html.no-gl .loader { display: none; }
.loader-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(244, 241, 234, 0.06) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, transparent 0%, rgba(244, 241, 234, 0.08) 48%, transparent 52%);
  background-size: 100% 4px, 100% 220%;
  animation: scan 3.2s linear infinite;
  mix-blend-mode: screen;
}
@keyframes scan { from { background-position: 0 0, 0 -120%; } to { background-position: 0 0, 0 120%; } }
.loader-inner { text-align: center; position: relative; }
.loader-brand {
  font-family: var(--f-en);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--dim);
  margin-bottom: 10px;
}
.loader-count {
  font-family: var(--f-en);
  font-size: clamp(56px, 9vw, 112px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.loader-count small { font-size: 0.22em; color: var(--mute); letter-spacing: 0.1em; margin-left: 0.3em; vertical-align: 0.3em; }
.loader-bar { width: min(320px, 60vw); height: 2px; background: var(--line); margin: 16px auto 14px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s var(--ease), background 0.6s; }
.loader-hint { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.4em; color: var(--mute); }

/* 読み込み完了 → PRESS START */
.loader.is-ready .loader-brand, .loader.is-ready .loader-count, .loader.is-ready .loader-bar, .loader.is-ready .loader-hint { display: none; }
.loader-start { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: fadein 0.6s var(--ease) both; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.press-start-credit { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.36em; color: var(--mute); }
.press-start-credit span { color: var(--dim); }
.press-start-credit i { font-style: normal; color: var(--accent); margin: 0 0.2em; }
.press-start {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  font-family: var(--f-en);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding: 8px 24px;
  transition: color 0.25s, transform 0.4s var(--ease);
}
.press-start-text {
  position: relative;
  display: inline-block;
  animation: blink 1.2s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }
/* RGBずれ＋スライスのグリッチ（数秒に一度） */
.press-start-text::before, .press-start-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
}
.press-start-text::before { color: #ff2a4a; animation: glitch-a 3.4s steps(1, end) infinite; }
.press-start-text::after { color: #2ad4ff; animation: glitch-b 3.4s steps(1, end) infinite; }
@keyframes glitch-a {
  0%, 88% { opacity: 0; clip-path: inset(0 0 0 0); transform: none; }
  89% { opacity: 0.9; clip-path: inset(10% 0 62% 0); transform: translate(-0.06em, -0.02em); }
  91% { opacity: 0.9; clip-path: inset(48% 0 18% 0); transform: translate(0.05em, 0.01em); }
  93% { opacity: 0.9; clip-path: inset(70% 0 4% 0); transform: translate(-0.04em, 0); }
  95%, 100% { opacity: 0; }
}
@keyframes glitch-b {
  0%, 88% { opacity: 0; clip-path: inset(0 0 0 0); transform: none; }
  89% { opacity: 0.9; clip-path: inset(55% 0 20% 0); transform: translate(0.06em, 0.02em); }
  91% { opacity: 0.9; clip-path: inset(5% 0 70% 0); transform: translate(-0.05em, -0.01em); }
  93% { opacity: 0.9; clip-path: inset(30% 0 40% 0); transform: translate(0.04em, 0); }
  95%, 100% { opacity: 0; }
}
.press-start:hover .press-start-text, .press-start:focus-visible .press-start-text { animation: none; color: var(--accent); }
.press-start:hover { transform: scale(1.03); }
.press-start:active { transform: scale(0.97); }
.press-start-sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--dim); }
.press-start-mute {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--mute);
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: color 0.25s, border-color 0.25s;
}
.press-start-mute:hover { color: var(--ink); border-color: rgba(244, 241, 234, 0.4); }
@media (prefers-reduced-motion: reduce) {
  .press-start-text, .loader-scan { animation: none; }
  .press-start-text::before, .press-start-text::after { display: none; }
}
/* 入場時の白フラッシュ */
.flash { position: fixed; inset: 0; z-index: 101; background: var(--ink); opacity: 0; pointer-events: none; }
.flash.is-on { animation: flash 0.55s var(--ease-io) both; }
@keyframes flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }

/* ---------- ヘッダー ---------- */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  mix-blend-mode: difference;
  pointer-events: none;
}
.site-head > * { pointer-events: auto; }
.site-head-brand {
  font-family: var(--f-en);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
}
.site-head-brand span { position: relative; padding-right: 0.3em; }
.site-head-brand span::after {
  content: "";
  position: absolute;
  right: 0; top: 0.15em; bottom: 0.1em;
  width: 1px;
  background: currentColor;
  opacity: 0.5;
}
.site-head-nav { display: flex; gap: 26px; }
.site-head-nav a, .head-btn {
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  opacity: 0.85;
  transition: opacity 0.25s;
}
.site-head-nav a::after, .head-btn::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.site-head-nav a:hover, .head-btn:hover { opacity: 1; }
.site-head-nav a:hover::after, .head-btn:hover::after { transform: scaleX(1); transform-origin: left; }
.site-head-right { display: flex; gap: 22px; }
.head-btn { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0.18em; }
.head-btn span { opacity: 0.6; }
.head-btn[aria-pressed="true"] span { opacity: 1; }
.sound-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.sound-bars b { width: 2px; height: 30%; background: currentColor; transition: height 0.3s; }
.head-btn[aria-pressed="true"] .sound-bars b { animation: bars 0.8s ease-in-out infinite alternate; }
.head-btn[aria-pressed="true"] .sound-bars b:nth-child(2) { animation-delay: -0.25s; }
.head-btn[aria-pressed="true"] .sound-bars b:nth-child(3) { animation-delay: -0.5s; }
@keyframes bars { from { height: 20%; } to { height: 100%; } }
@media (max-width: 720px) {
  .site-head { padding: 14px 18px; }
  .site-head-nav { display: none; }
  .site-head-right { gap: 14px; }
}

/* ---------- ヒーロー（GAME SELECT） ---------- */
main { position: relative; z-index: 3; }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 var(--pad);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.hero-title {
  position: absolute;
  left: 0; right: 0;
  top: clamp(84px, 11svh, 130px);
  z-index: -1;                  /* canvas(z1)の背面へ */
  text-align: center;
  font-family: var(--f-en);
  font-weight: 400;
  font-size: clamp(72px, 12.6vw, 220px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 241, 234, 0.34);
  pointer-events: none;
  white-space: nowrap;
}
.hero-title-line { display: inline-block; }
.hero-title-line--2 { margin-left: 0.18em; }
html.no-gl .hero-title { position: static; z-index: auto; color: var(--ink); -webkit-text-stroke: 0; padding-top: 14svh; font-size: clamp(56px, 11vw, 180px); }

.hero-eyebrow {
  position: absolute;
  top: clamp(60px, 7svh, 92px);
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 2.2em;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--dim);
  pointer-events: none;
}
.hero-eyebrow span { position: relative; }
.hero-eyebrow span + span::before { content: ""; position: absolute; left: -1.25em; top: 50%; width: 3px; height: 3px; background: var(--accent); border-radius: 50%; transform: translateY(-50%); }

/* 選択中ゲーム：画面下の帯（番号｜タイトル｜説明｜操作） */
.sel {
  grid-row: 3;
  align-self: end;
  display: grid;
  grid-template-columns: auto minmax(0, 1.25fr) minmax(0, 1fr) auto;
  gap: 0 clamp(24px, 3vw, 48px);
  align-items: end;
  padding-bottom: clamp(24px, 4.5svh, 48px);
  position: relative;
  z-index: 4;
}
.sel-no {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.sel-no-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.4em; color: var(--dim); margin-bottom: 8px; }
.sel-no-num {
  font-family: var(--f-en);
  font-size: clamp(80px, 9vw, 140px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  color: var(--accent);
  transition: color 0.6s;
  font-variant-numeric: tabular-nums;
}
.sel-body { min-width: 0; display: contents; }
.sel-head { min-width: 0; }
.sel-genre {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--dim);
  margin-bottom: 8px;
  padding-left: 14px;
  position: relative;
}
.sel-genre::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; background: var(--accent); transform: translateY(-50%) rotate(45deg); transition: background 0.6s; }
.sel-title { display: flex; flex-direction: column; gap: 2px; }
.sel-title-en {
  font-family: var(--f-en);
  font-size: clamp(36px, 3.6vw, 60px);
  line-height: 0.95;
  letter-spacing: 0.005em;
  overflow: hidden;
  padding-bottom: 0.04em;
}
.sel-title-en .ch { display: inline-block; white-space: pre; }
.sel-title-ja { font-family: var(--f-ja-s); font-weight: 700; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.3; letter-spacing: 0.02em; color: var(--ink); }
.sel-text { min-width: 0; align-self: end; }
.sel-desc { font-size: 13px; line-height: 1.8; color: var(--dim); max-width: 44ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sel-play { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--dim); margin-top: 10px; }
.sel-play span { color: var(--mute); margin-right: 1em; letter-spacing: 0.3em; }

/* 切り替えアニメーション（JSが .is-out を付け外しする） */
.sel-genre, .sel-title-ja, .sel-desc, .sel-play, .sel-no-num, .btn-play-text {
  transition: opacity 0.32s var(--ease-io), transform 0.5s var(--ease);
}
.sel.is-out .sel-genre, .sel.is-out .sel-title-ja, .sel.is-out .sel-desc, .sel.is-out .sel-play, .sel.is-out .btn-play-text { opacity: 0; transform: translateY(10px); }
.sel.is-out .sel-no-num { opacity: 0; transform: translateY(-14px); }
.sel-title-en .ch { transition: transform 0.55s var(--ease), opacity 0.3s; transition-delay: calc(var(--d, 0) * 22ms); }
.sel.is-out .sel-title-en .ch { transform: translateY(110%); opacity: 0; transition-duration: 0.3s; transition-delay: calc(var(--d, 0) * 10ms); }

.sel-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; }
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--f-ja);
  font-size: 17px;
  letter-spacing: 0.08em;
  padding: 16px 24px 16px 30px;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition: color 0.4s, transform 0.5s var(--ease);
}
.btn-play::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: inherit;
  transform: translateY(102%);
  transition: transform 0.5s var(--ease), background 0.6s;
  z-index: -1;
}
.btn-play:hover::before, .btn-play:focus-visible::before { transform: translateY(0); }
.btn-play:hover { color: var(--accent-ink); }
.btn-play-arrow { font-family: var(--f-mono); font-size: 18px; transition: transform 0.4s var(--ease); }
.btn-play:hover .btn-play-arrow { transform: translateX(6px); }
.sel-nav { display: flex; align-items: center; gap: 14px; }
.sel-nav-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border-color 0.3s, background 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.sel-nav-btn:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.sel-nav-btn:active { transform: scale(0.92); }
.sel-counter { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; color: var(--dim); font-variant-numeric: tabular-nums; }
.sel-counter b { color: var(--ink); font-weight: 400; }
.sel-counter i { font-style: normal; margin: 0 0.3em; color: var(--mute); }

.hero-hint {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(24px, 4.5svh, 48px) + 150px);
  transform: translateX(-50%);
  display: flex;
  gap: 1.6em;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.36em;
  color: var(--mute);
  white-space: nowrap;
  transition: opacity 0.6s;
}
.hero-hint.is-hidden { opacity: 0; }
.hero-hint-key { animation: hintkey 2.4s ease-in-out infinite; }
@keyframes hintkey { 0%, 100% { letter-spacing: 0.36em; } 50% { letter-spacing: 0.7em; } }
html.no-gl .hero-hint, html.no-gl .sel { display: none; }
html.no-gl .hero { grid-template-rows: auto auto auto; min-height: auto; padding-top: 70px; }
html.no-gl .hero-title { padding-top: 6svh; }
html.no-gl .hero-eyebrow { position: static; grid-row: 2; margin: 18px 0 0; justify-content: center; }
html.no-gl .hero-fallback { grid-row: 3; }

/* 3D非対応フォールバック */
.hero-fallback { display: none; list-style: none; }
html.no-gl .hero-fallback {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 40px 0 64px;
}
.hero-fallback a { display: block; text-decoration: none; border: 1px solid var(--line); overflow: hidden; background: var(--bg2); }
.hero-fallback img { width: 100%; aspect-ratio: 1000 / 650; object-fit: cover; transition: transform 0.6s var(--ease); }
.hero-fallback a:hover img { transform: scale(1.04); }
.hero-fallback span { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; padding: 10px 12px; color: var(--dim); }

@media (max-width: 1024px) {
  .hero { grid-template-rows: 60svh auto 1fr; min-height: auto; padding-bottom: 40px; }
  .hero-eyebrow { position: static; grid-row: 2; justify-content: flex-start; gap: 1.8em; margin: 6px 0 14px; }
  .sel { grid-row: 3; align-self: start; grid-template-columns: auto minmax(0, 1fr); gap: 0 20px; padding-bottom: 0; }
  .sel-text { grid-column: 2; margin-top: 10px; }
  .sel-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 22px; }
  .hero-hint { display: none; }
}
@media (max-width: 720px) {
  .hero { grid-template-rows: 60svh auto 1fr; min-height: auto; padding-bottom: 40px; }
  .hero-title { top: 7svh; font-size: 16.5vw; white-space: normal; line-height: 0.98; }
  .hero-title-line { display: block; }
  .hero-title-line--2 { margin-left: 0; }
  .hero-eyebrow { position: static; grid-row: 2; justify-content: flex-start; gap: 1.8em; font-size: 9px; margin: 6px 0 14px; }
  .hero-eyebrow span:nth-child(3) { display: none; }
  .sel { grid-row: 3; align-self: start; grid-template-columns: auto minmax(0, 1fr); padding-bottom: 0; }
  .sel-no-num { font-size: 64px; }
  .sel-title-en { font-size: clamp(32px, 9vw, 44px); }
  .sel-desc { font-size: 13px; -webkit-line-clamp: 4; }
  .btn-play { font-size: 16px; padding: 15px 22px 15px 26px; }
}

/* ---------- マーキー ---------- */
.marquee {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg);
  padding: 14px 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 0.9em;
  width: max-content;
  font-family: var(--f-en);
  font-size: clamp(18px, 2.2vw, 28px);
  letter-spacing: 0.1em;
  white-space: nowrap;
  animation: marquee 34s linear infinite;
}
.marquee-track span { padding: 0 0.4em; }
.marquee-track i { font-style: normal; color: var(--accent); font-size: 0.6em; transition: color 0.6s; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- INDEX ---------- */
.list {
  position: relative;
  z-index: 3;
  background: var(--bg);
  padding: clamp(64px, 10vh, 120px) var(--pad) clamp(64px, 10vh, 120px);
}
.list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.list-title { display: flex; flex-direction: column; gap: 6px; }
.list-title-en { font-family: var(--f-en); font-size: clamp(56px, 8vw, 120px); line-height: 0.9; letter-spacing: 0.01em; }
.list-title-ja { font-family: var(--f-ja-s); font-weight: 500; font-size: 14px; color: var(--dim); letter-spacing: 0.06em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--dim);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.filter:hover { color: var(--ink); border-color: rgba(244, 241, 234, 0.4); }
.filter.is-on { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.list-count { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.3em; color: var(--mute); margin-bottom: 6px; }
.list-count b { color: var(--ink); font-weight: 400; }

.rows { list-style: none; border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row.is-hidden { display: none; }
.row.is-enter { animation: rowin 0.6s var(--ease) both; animation-delay: calc(var(--k, 0) * 28ms); }
@keyframes rowin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.row-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.15fr) minmax(0, 1fr) 220px 40px;
  align-items: center;
  gap: 28px;
  padding: 24px 0;
  text-decoration: none;
  position: relative;
  isolation: isolate;
}
.row-link::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--pad) * -1);
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
  z-index: -1;
}
.row-link:hover::before, .row-link:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.row-link:hover, .row-link:focus-visible { color: var(--bg); }
.row-no { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--mute); transition: color 0.3s; }
.row.is-current .row-no { color: var(--accent); }
.row-link:hover .row-no { color: var(--bg); }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title {
  font-family: var(--f-en);
  font-size: clamp(26px, 2.6vw, 40px);
  line-height: 1;
  letter-spacing: 0.01em;
  transition: transform 0.5s var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-link:hover .row-title { transform: translateX(10px); }
.row-sub { font-family: var(--f-ja-s); font-weight: 700; font-size: 12.5px; line-height: 1.4; color: var(--dim); transition: color 0.3s; }
.row-link:hover .row-sub { color: rgba(11, 11, 14, 0.7); }
.row-desc { font-size: 12.5px; line-height: 1.75; color: var(--dim); transition: color 0.3s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-link:hover .row-desc { color: rgba(11, 11, 14, 0.72); }
.row-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.row-genre { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; }
.row-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.row-tags i {
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 100px;
  opacity: 0.55;
}
.row-arrow { font-family: var(--f-mono); font-size: 20px; opacity: 0; transform: translateX(-10px); transition: opacity 0.3s, transform 0.5s var(--ease); text-align: right; }
.row-link:hover .row-arrow { opacity: 1; transform: none; }
.row-img { display: none; }

/* タッチ環境・3D非対応：カーソル追従プレビューの代わりにサムネイルを行内へ */
@media (hover: none), (pointer: coarse) {
  .row-link { grid-template-columns: 40px minmax(0, 1fr) 132px; grid-template-areas: "no main img" "no desc img" "no meta img"; gap: 6px 16px; padding: 18px 0; align-items: start; }
  .row-no { grid-area: no; padding-top: 6px; }
  .row-main { grid-area: main; }
  .row-desc { grid-area: desc; }
  .row-meta { grid-area: meta; flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
  .row-arrow { display: none; }
  .row-img { grid-area: img; display: block; width: 132px; aspect-ratio: 1000 / 650; object-fit: cover; border-radius: 4px; align-self: center; }
  .row-link::before { display: none; }
  .row-link:hover, .row-link:focus-visible { color: var(--ink); }
  .row-link:hover .row-title { transform: none; }
  .row-link:hover .row-sub, .row-link:hover .row-desc, .row-link:hover .row-no { color: var(--dim); }
}
html.no-gl .row-link { grid-template-columns: 40px minmax(0, 1fr) 132px; grid-template-areas: "no main img" "no desc img" "no meta img"; gap: 6px 16px; align-items: start; }
html.no-gl .row-no { grid-area: no; }
html.no-gl .row-main { grid-area: main; }
html.no-gl .row-desc { grid-area: desc; }
html.no-gl .row-meta { grid-area: meta; }
html.no-gl .row-arrow { display: none; }
html.no-gl .row-img { grid-area: img; display: block; width: 132px; aspect-ratio: 1000 / 650; object-fit: cover; border-radius: 4px; align-self: center; }
@media (max-width: 720px) {
  .row-link, html.no-gl .row-link { grid-template-columns: 32px minmax(0, 1fr) 96px; gap: 4px 12px; }
  .row-img, html.no-gl .row-img { width: 96px; }
  .row-title { font-size: 22px; white-space: normal; }
  .row-desc { font-size: 12px; -webkit-line-clamp: 3; }
  .row-tags { display: none; }
}

/* ---------- ABOUT / FAQ ---------- */
.about, .faq {
  position: relative;
  z-index: 3;
  background: var(--bg);
  padding: clamp(56px, 9vh, 110px) var(--pad);
}
.about { border-top: 1px solid var(--line); }
.about-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.about-side { position: sticky; top: 96px; }
.about-body { max-width: 760px; }
.about-title, .faq-title { display: flex; flex-direction: column; gap: 10px; font-family: var(--f-ja-s); font-weight: 700; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.4; letter-spacing: 0.02em; margin-bottom: 0; }
.about-title-en, .faq-title-en { font-family: var(--f-en); font-size: clamp(44px, 6vw, 84px); line-height: 0.9; letter-spacing: 0.01em; color: transparent; -webkit-text-stroke: 1px rgba(244, 241, 234, 0.5); }
.about p { color: var(--dim); margin-bottom: 1.2em; font-size: 14.5px; }
.about-facts { display: grid; grid-template-columns: 120px 1fr; gap: 10px 20px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 13.5px; }
.about-facts dt { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--mute); padding-top: 6px; }
.about-facts dd { color: var(--ink); }
.faq { border-top: 1px solid var(--line); }
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.faq-side { position: sticky; top: 96px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 44px 20px 0;
  font-family: var(--f-ja-s);
  font-weight: 700;
  font-size: 15px;
  position: relative;
  transition: color 0.3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-mono);
  font-size: 20px;
  color: var(--dim);
  transition: transform 0.4s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--dim); font-size: 14px; padding: 0 0 22px; }

/* ---------- フッター ---------- */
.site-foot {
  position: relative;
  z-index: 3;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 56px var(--pad) 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px 40px;
  align-items: end;
}
.site-foot-logo { font-family: var(--f-en); font-size: clamp(64px, 12vw, 200px); line-height: 0.98; letter-spacing: 0.01em; grid-column: 1 / -1; }
.site-foot-logo span { display: block; color: transparent; -webkit-text-stroke: 1px rgba(244, 241, 234, 0.4); }
.site-foot-nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; }
.site-foot-nav a { text-decoration: none; color: var(--dim); transition: color 0.3s; }
.site-foot-nav a:hover { color: var(--accent); }
.site-foot-note { font-family: var(--f-mono); font-size: 10.5px; line-height: 2; letter-spacing: 0.08em; color: var(--mute); text-align: right; }
.site-foot-note a { color: var(--dim); text-decoration: none; }
.site-foot-note a:hover { color: var(--ink); }
@media (max-width: 900px) {
  .about-inner, .faq { grid-template-columns: 1fr; gap: 28px; }
  .about-side, .faq-side { position: static; }
  .about-title, .faq-title { margin-bottom: 0; }
}
@media (max-width: 720px) { .site-foot { grid-template-columns: 1fr; } .site-foot-note { text-align: left; } }

/* ---------- カスタムカーソル（hover可能なポインタのみ） ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor summary { cursor: none; }
  .cursor {
    display: block;
    position: fixed;
    left: 0; top: 0;
    z-index: 200;
    pointer-events: none;
    will-change: transform;
  }
  .cursor-dot {
    position: absolute;
    left: -3px; top: -3px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ink);
    mix-blend-mode: difference;
    transition: transform 0.25s var(--ease), opacity 0.25s;
  }
  .cursor-ring {
    position: absolute;
    left: -20px; top: -20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(244, 241, 234, 0.7);
    mix-blend-mode: difference;
    transition: transform 0.45s var(--ease), opacity 0.3s, border-color 0.3s, background 0.3s;
  }
  .cursor-label {
    position: absolute;
    left: 0; top: 0;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    font-family: var(--f-mono);
    font-size: 10px;
    letter-spacing: 0.3em;
    color: var(--bg);
    white-space: nowrap;
    transition: opacity 0.25s, transform 0.4s var(--ease);
    padding-left: 0.3em;
  }
  html[data-cursor="link"] .cursor-ring { transform: scale(1.6); border-color: transparent; background: rgba(244, 241, 234, 0.9); }
  html[data-cursor="link"] .cursor-dot { opacity: 0; }
  html[data-cursor="drag"] .cursor-ring,
  html[data-cursor="play"] .cursor-ring,
  html[data-cursor="select"] .cursor-ring { transform: scale(2.1); border-color: transparent; background: var(--ink); mix-blend-mode: normal; }
  html[data-cursor="drag"] .cursor-dot,
  html[data-cursor="play"] .cursor-dot,
  html[data-cursor="select"] .cursor-dot { opacity: 0; }
  html[data-cursor="drag"] .cursor-label,
  html[data-cursor="play"] .cursor-label,
  html[data-cursor="select"] .cursor-label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  html[data-cursor="dragging"] .cursor-ring { transform: scale(0.5); background: var(--ink); border-color: transparent; mix-blend-mode: normal; }
  html[data-cursor="dragging"] .cursor-dot { opacity: 0; }
  html[data-cursor="hide"] .cursor { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero-hint-key { animation: none; }
  .row.is-enter { animation: none; }
  .sel-title-en .ch { transition-delay: 0s !important; }
}

/* OGP撮影モード（?ogp=1）：ヘッダー・ヒント・カーソルを隠す */
html.ogp .site-head, html.ogp .hero-hint, html.ogp .cursor, html.ogp .grain { display: none !important; }
html.ogp .hero-title { -webkit-text-stroke: 2px rgba(244, 241, 234, 0.6); }
