/* =========================================================
   AGK公式ゲームポータルサイト
   コンセプト：アイドルのライブ会場 × ゲームのタイトル画面
   色はサムネイルの世界観（夜空・るんるんピンク・黄金のたまご・定時のネオン）から採用
   ========================================================= */

:root {
  --night: #150a33;        /* 夜空インディゴ（背景） */
  --stage: #221048;        /* ステージの床（面） */
  --stage-2: #2f1768;      /* 一段明るい面 */
  --pink: #ff4fa0;         /* るんるんピンク */
  --gold: #ffc93c;         /* 黄金のたまご */
  --gold-deep: #f08a00;
  --cyan: #3fe3ff;         /* 定時のネオン */
  --cream: #fff8ec;        /* 文字色 */
  --muted: #c9bee8;        /* 補助テキスト */
  --line: rgba(201, 190, 232, 0.18);

  --font-display: "Dela Gothic One", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;

  /* オープニング演出が終わるまでヒーローの登場を待たせる秒数（JSで上書きされる） */
  --intro-delay: 2.55s;
}

.no-intro { --intro-delay: 0s; }

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  overflow-x: hidden;
}

/* 飾り（見出しの透かし文字・テロップ等）がスマホで横スクロールを生まないように切り取る */
main {
  overflow-x: hidden;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--gold);
  color: var(--night);
  font-weight: 800;
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

/* ---------------------------------------------------------
   オープニング演出（3・2・1 → 閃光 → AGK → 幕が上がる）
   --------------------------------------------------------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 55%, #3a1680 0%, var(--night) 60%, #07031a 100%);
  overflow: hidden;
  animation: intro-out 0.55s cubic-bezier(0.7, 0, 0.3, 1) 2.35s forwards;
}
.no-intro .intro { display: none; }
.intro.is-skipped { animation: intro-out 0.35s ease-in forwards; }

.intro > * { grid-area: 1 / 1; }

.intro__count span {
  display: block;
  grid-area: 1 / 1;
  font-family: var(--font-display);
  font-size: clamp(6rem, 30vw, 14rem);
  line-height: 1;
  color: var(--cream);
  text-shadow: 0 0 40px var(--pink), 0 0 90px var(--pink);
  opacity: 0;
  animation: count-pop 0.36s ease-out both;
}
.intro__count { display: grid; }
.intro__count span:nth-child(1) { animation-delay: 0.1s; }
.intro__count span:nth-child(2) { animation-delay: 0.45s; color: var(--gold); text-shadow: 0 0 40px var(--gold-deep), 0 0 90px var(--gold-deep); }
.intro__count span:nth-child(3) { animation-delay: 0.8s; color: var(--cyan); text-shadow: 0 0 40px var(--cyan), 0 0 90px #1a8bd8; }

.intro__flash {
  inset: 0;
  position: absolute;
  background: #fff;
  opacity: 0;
  animation: flash 0.4s ease-out 1.15s both;
}

.intro__rays {
  position: absolute;
  width: 220vmax; height: 220vmax;
  left: 50%; top: 50%;
  margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(from 0deg, rgba(255, 201, 60, 0.16) 0deg 8deg, transparent 8deg 22deg);
  opacity: 0;
  animation: rays-in 0.4s ease-out 1.15s both, spin 14s linear infinite;
}

.intro__logo {
  font-family: var(--font-display);
  font-size: clamp(7rem, 34vw, 18rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--gold);
  -webkit-text-stroke: 0.035em var(--night);
  text-shadow:
    0 0.05em 0 var(--pink),
    0 0.09em 0 #a3186a,
    0 0 0.4em rgba(255, 79, 160, 0.6);
  opacity: 0;
  animation: logo-slam 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) 1.15s both, shake 0.3s linear 1.4s;
}

.intro__sub {
  align-self: end;
  margin-bottom: 18vh;
  font-weight: 800;
  font-size: clamp(1rem, 3.4vw, 1.5rem);
  letter-spacing: 0.3em;
  color: var(--cream);
  opacity: 0;
  animation: rise 0.5s ease-out 1.45s both;
}

.intro__skip {
  position: absolute;
  right: 20px; bottom: calc(20px + env(safe-area-inset-bottom));
  padding: 8px 18px;
  font: 700 0.875rem var(--font-body);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  cursor: pointer;
}
.intro__skip:hover { background: rgba(255, 255, 255, 0.18); }

@keyframes count-pop {
  0%   { opacity: 0; transform: scale(2.2); }
  30%  { opacity: 1; transform: scale(1); }
  80%  { opacity: 1; transform: scale(0.92); }
  100% { opacity: 0; transform: scale(0.6); }
}
@keyframes flash { 0% { opacity: 0; } 20% { opacity: 0.95; } 100% { opacity: 0; } }
@keyframes rays-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes logo-slam {
  from { opacity: 0; transform: scale(3.2) rotate(-6deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes shake {
  0%, 100% { translate: 0 0; }
  25% { translate: -6px 4px; }
  50% { translate: 5px -3px; }
  75% { translate: -3px -4px; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes intro-out {
  from { clip-path: inset(0 0 0 0); visibility: visible; }
  to   { clip-path: inset(0 0 100% 0); visibility: hidden; }
}

/* ---------------------------------------------------------
   ヘッダー
   --------------------------------------------------------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: linear-gradient(to bottom, rgba(21, 10, 51, 0.92), rgba(21, 10, 51, 0.6));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.875rem;
}

.topbar__mark {
  display: inline-block;
  padding: 1px 8px 2px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--night);
  background: linear-gradient(180deg, #ffe38a, var(--gold) 55%, var(--gold-deep));
  border-radius: 6px;
  box-shadow: 0 3px 0 var(--pink);
}

.topbar__right { display: flex; align-items: center; gap: 10px; }
.topbar__nav { display: flex; gap: 6px; }
.topbar__nav a {
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: background-color 0.2s, border-color 0.2s;
}
.topbar__nav a:hover { background: rgba(255, 79, 160, 0.18); border-color: var(--pink); }

/* 効果音 ON/OFF：ONのときはネオンが点灯、OFFのときは消灯 */
.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 9px;
  font: 800 0.8125rem/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  background: rgba(63, 227, 255, 0.1);
  border: 1.5px solid var(--cyan);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(63, 227, 255, 0.45);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.sound-toggle[hidden] { display: none; }
.sound-toggle:hover { background: rgba(63, 227, 255, 0.2); }
.sound-toggle__icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound-toggle__speaker { fill: currentColor; }
.sound-toggle__mute { display: none; }
.sound-toggle__state { min-width: 2.2em; text-align: left; }
.sound-toggle.is-off {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  box-shadow: none;
}
.sound-toggle.is-off .sound-toggle__wave { display: none; }
.sound-toggle.is-off .sound-toggle__mute { display: inline; }

/* ---------------------------------------------------------
   ヒーロー（ライブ会場のステージ）
   --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 96px var(--gutter) 88px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

/* 背景：サムネイルが斜めに流れる壁 */
.hero__wall {
  position: absolute;
  inset: -30% -20%;
  z-index: -3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  transform: rotate(-11deg);
  opacity: 0.34;
}
.wall-row {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: wall-slide 90s linear infinite;
}
.wall-row:nth-child(even) { animation-direction: reverse; animation-duration: 110s; }
.wall-row img {
  width: clamp(220px, 26vw, 360px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
}
@keyframes wall-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 55% at 50% 48%, rgba(21, 10, 51, 0.72), rgba(21, 10, 51, 0.2) 70%),
    linear-gradient(to bottom, rgba(21, 10, 51, 0.85), rgba(21, 10, 51, 0.1) 30%, rgba(21, 10, 51, 0.2) 70%, var(--night));
}

/* スポットライト */
.hero__lights {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  animation: fade-in 0.8s ease-out var(--intro-delay) both;
}
.beam {
  position: absolute;
  top: -12%;
  width: 34vw;
  min-width: 260px;
  height: 130%;
  transform-origin: 50% 0;
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  mix-blend-mode: screen;
  filter: blur(6px);
}
.beam--pink { left: 2%;  background: linear-gradient(to bottom, rgba(255, 79, 160, 0.75), rgba(255, 79, 160, 0) 85%); animation: sweep-l 7s ease-in-out infinite alternate; }
.beam--gold { left: 33%; background: linear-gradient(to bottom, rgba(255, 201, 60, 0.6), rgba(255, 201, 60, 0) 80%); animation: sweep-c 9s ease-in-out infinite alternate; }
.beam--cyan { right: 2%; background: linear-gradient(to bottom, rgba(63, 227, 255, 0.65), rgba(63, 227, 255, 0) 85%); animation: sweep-r 8s ease-in-out infinite alternate; }
@keyframes sweep-l { from { transform: rotate(-28deg); } to { transform: rotate(12deg); } }
@keyframes sweep-c { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes sweep-r { from { transform: rotate(26deg); } to { transform: rotate(-10deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.hero__particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__inner {
  display: grid;
  justify-items: center;
  gap: clamp(18px, 3vw, 28px);
  max-width: 760px;
}

.hero__title { margin: 0; font-weight: 400; display: grid; justify-items: center; }

/* ロゴ：サムネイルのタイトル文字と同じ「金の塗り＋紫のフチ＋ピンクの厚み」 */
.logo {
  display: flex;
  font-family: var(--font-display);
  font-size: clamp(6.5rem, 26vw, 15rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.logo__ch {
  position: relative;
  display: inline-block;
  animation: drop-in 0.7s cubic-bezier(0.25, 1.7, 0.45, 1) both;
  animation-delay: var(--intro-delay);
}
.logo__ch:nth-child(2) { animation-delay: calc(var(--intro-delay) + 0.09s); }
.logo__ch:nth-child(3) { animation-delay: calc(var(--intro-delay) + 0.18s); }

/* 下地：太いフチと厚み */
.logo__ch::before {
  content: attr(data-ch);
  position: absolute;
  inset: 0;
  z-index: 0;
  color: #2a0f5c;
  -webkit-text-stroke: 0.1em #2a0f5c;
  text-shadow:
    0 0.05em 0 var(--pink),
    0 0.085em 0 #b01f73,
    0 0.12em 0 #7c1252,
    0 0.2em 0.25em rgba(0, 0, 0, 0.55);
}
/* 塗り：金のグラデーション＋きらりと走る光 */
.logo__fill {
  position: relative;
  z-index: 1;
  color: transparent;
  background:
    linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.95) 50%, transparent 60%) no-repeat,
    linear-gradient(180deg, #fff6c2 0%, #ffe070 38%, var(--gold) 55%, var(--gold-deep) 100%);
  background-size: 250% 100%, 100% 100%;
  background-position: 200% 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 4.5s ease-in-out calc(var(--intro-delay) + 0.9s) infinite;
}
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-120%) scale(0.6); }
  to   { opacity: 1; transform: none; }
}
@keyframes shine {
  0%   { background-position: 200% 0, 0 0; }
  35%, 100% { background-position: -120% 0, 0 0; }
}

.hero__name {
  margin-top: 0.35em;
  padding: 0.2em 0.9em 0.25em;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.6vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--cream);
  background: linear-gradient(90deg, #d4247f, var(--pink) 50%, #d4247f);
  border-radius: 10px;
  box-shadow: 0 5px 0 #7c1252, 0 0 30px rgba(255, 79, 160, 0.55);
  transform: rotate(-2deg);
  animation: stamp 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) calc(var(--intro-delay) + 0.45s) both;
}
@keyframes stamp {
  from { opacity: 0; transform: rotate(-2deg) scale(1.8); }
  to   { opacity: 1; transform: rotate(-2deg) scale(1); }
}

.hero__lead {
  max-width: 34em;
  font-size: clamp(0.95rem, 2.4vw, 1.125rem);
  font-weight: 700;
  line-height: 1.9;
  text-shadow: 0 2px 12px rgba(21, 10, 51, 0.9);
  animation: rise 0.6s ease-out calc(var(--intro-delay) + 0.7s) both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  animation: rise 0.6s ease-out calc(var(--intro-delay) + 0.85s) both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-weight: 800;
  text-decoration: none;
  color: var(--cream);
  background: rgba(21, 10, 51, 0.55);
  border: 2px solid rgba(255, 248, 236, 0.5);
  border-radius: 999px;
  transition: transform 0.15s, background-color 0.2s, border-color 0.2s;
}
.hero-btn:hover { transform: translateY(-2px); border-color: var(--cream); background: rgba(47, 23, 104, 0.8); }
.hero-btn--main {
  color: var(--night);
  background: linear-gradient(180deg, #ffe38a, var(--gold) 55%, var(--gold-deep));
  border-color: transparent;
  box-shadow: 0 5px 0 #b35a00, 0 0 24px rgba(255, 201, 60, 0.45);
}
.hero-btn--main:hover { background: linear-gradient(180deg, #fff0b0, #ffd45c 55%, var(--gold)); border-color: transparent; }
.hero-btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.8em;
  height: 1.8em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--cream);
  background: var(--pink);
  border-radius: 999px;
}

/* 朝5時カウントダウン：LEDパネル風 */
.hero__clock {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(7, 3, 26, 0.6);
  border: 1px solid rgba(63, 227, 255, 0.35);
  border-radius: 10px;
  animation: rise 0.6s ease-out calc(var(--intro-delay) + 1s) both;
}
.hero__clock-time {
  padding: 2px 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(63, 227, 255, 0.8);
  font-variant-numeric: tabular-nums;
  background: rgba(63, 227, 255, 0.08);
  border-radius: 6px;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 30px;
  height: 48px;
  margin-left: -15px;
  border: 2px solid rgba(255, 248, 236, 0.6);
  border-radius: 999px;
}
.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 6px;
  height: 10px;
  margin-left: -3px;
  background: var(--gold);
  border-radius: 3px;
  animation: scroll-dot 1.6s ease-in-out infinite;
}
@keyframes scroll-dot { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(18px); opacity: 0; } 100% { opacity: 0; } }

/* ---------------------------------------------------------
   テロップ（電光掲示板）
   --------------------------------------------------------- */
.ticker {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--pink);
  color: var(--night);
  border-block: 3px solid var(--night);
  box-shadow: 0 0 0 3px var(--gold);
  transform: rotate(-1.5deg);
  margin: 8px -12px 0;
}
.ticker[hidden] { display: none; }
/* 左端に固定の「お知らせ」ラベル */
.ticker__label {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 18px 0 max(24px, var(--gutter));
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.9rem, 2.2vw, 1.125rem);
  color: var(--gold);
  background: var(--night);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  padding-right: 30px;
}
.ticker__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  animation: blink 1.2s steps(2, jump-none) infinite;
}
.ticker__viewport { flex: 1; min-width: 0; overflow: hidden; }
.ticker__track {
  display: flex;
  width: max-content;
  animation: wall-slide 45s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 26px;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.4vw, 1.25rem);
  white-space: nowrap;
}
.ticker__item::after { content: "★"; margin-left: 12px; color: var(--gold); -webkit-text-stroke: 1px var(--night); }
.ticker__date {
  padding: 1px 10px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.8em;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
  background: var(--night);
  border-radius: 4px;
}

/* ---------------------------------------------------------
   セクション見出し
   --------------------------------------------------------- */
.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 140px) var(--gutter) 0;
}
.section--upcoming { padding-bottom: clamp(80px, 12vw, 140px); }

.sec-head {
  position: relative;
  margin-bottom: clamp(40px, 7vw, 72px);
}
.sec-head__ghost {
  position: absolute;
  left: -0.05em;
  top: -0.55em;
  z-index: -1;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 13vw, 9rem);
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 79, 160, 0.35);
  pointer-events: none;
}
.section--upcoming .sec-head__ghost { -webkit-text-stroke-color: rgba(63, 227, 255, 0.3); }

.sec-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.25;
  text-shadow: 0 4px 0 #7c1252;
}
.section--upcoming .sec-head__title { text-shadow: 0 4px 0 #0f5a78; }
.sec-head__lead {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

/* ---------------------------------------------------------
   公開中ゲーム（ゲーム機の画面 × 紹介パネル）
   --------------------------------------------------------- */
.games {
  display: grid;
  gap: clamp(72px, 10vw, 120px);
}

.game {
  --accent: var(--gold);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "visual body";
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.game--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "body visual"; }

.game__visual {
  grid-area: visual;
  position: relative;
  display: block;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--stage-2), #120830);
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 36px color-mix(in srgb, var(--accent) 45%, transparent),
    0 24px 50px rgba(0, 0, 0, 0.5);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.3s ease-out, box-shadow 0.3s;
  will-change: transform;
}
.game__visual:hover {
  box-shadow:
    0 0 0 3px var(--accent),
    0 0 60px color-mix(in srgb, var(--accent) 65%, transparent),
    0 30px 60px rgba(0, 0, 0, 0.55);
}
.game__screen {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  background: #000;
}
.game__screen img { width: 100%; height: 100%; object-fit: cover; }
/* 走査線（ブラウン管っぽさ） */
.game__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 4px);
  pointer-events: none;
}
.game__glare {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 14px;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.35), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.game__visual:hover .game__glare { opacity: 1; }

.game__badge {
  position: absolute;
  top: -14px;
  left: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  font-weight: 800;
  font-size: 0.8125rem;
  color: var(--night);
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.game__badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8173c;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
  animation: blink 1.2s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.game__body { grid-area: body; }

.game__genre {
  display: inline-block;
  padding: 2px 12px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 999px;
}

.game__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.3;
  text-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 55%, #000);
}
.game__subtitle {
  margin-top: 4px;
  font-weight: 800;
  color: var(--muted);
}
.game__catch {
  margin-top: 16px;
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--accent);
}
.game__desc {
  margin-top: 10px;
  max-width: 34em;
  color: #e9e2fb;
}

.game__cast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 18px;
}
.game__cast-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--muted);
}
.game__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.game__chips li {
  padding: 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 2;
  background: rgba(255, 248, 236, 0.1);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
}

.game__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 26px;
}

/* アーケードの押しボタン */
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 30px 14px 22px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
  text-decoration: none;
  color: var(--night);
  background: linear-gradient(180deg, #ffe38a, var(--gold) 55%, var(--gold-deep));
  border-radius: 999px;
  box-shadow: 0 6px 0 #b35a00, 0 10px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s, box-shadow 0.1s, filter 0.2s;
}
.btn-play:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 8px 0 #b35a00, 0 14px 28px rgba(0, 0, 0, 0.45); }
.btn-play:active { transform: translateY(5px); box-shadow: 0 1px 0 #b35a00, 0 4px 10px rgba(0, 0, 0, 0.4); }
.btn-play__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--night);
}
.btn-play__icon svg { width: 14px; height: 14px; margin-left: 2px; fill: var(--gold); }
.btn-play__newtab { width: 18px; height: 18px; fill: currentColor; opacity: 0.75; }

.game__host {
  font-size: 0.8125rem;
  color: var(--muted);
  word-break: break-all;
}

/* ---------------------------------------------------------
   開発中ゲーム
   --------------------------------------------------------- */
.soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(24px, 3vw, 36px);
}

.soon {
  --accent: var(--cyan);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--stage-2), var(--stage));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 20px;
}

.soon__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0520;
}
.soon__visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.9);
}

/* 「開発中」の立入禁止テープ */
.soon__tape {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: 3%;
  z-index: 3;
  overflow: hidden;
  padding: 3px 0;
  color: var(--night);
  background: repeating-linear-gradient(-45deg, var(--gold) 0 18px, #ffd76a 18px 36px);
  border-block: 2px solid var(--night);
  transform: rotate(-3deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.soon__tape span {
  display: block;
  width: max-content;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  animation: wall-slide 16s linear infinite;
}

.soon__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 22px 22px 24px;
}
.soon__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.375rem;
  line-height: 1.4;
}
.soon__subtitle { font-weight: 800; font-size: 0.875rem; color: var(--accent); }
.soon__teaser { color: #e9e2fb; font-size: 0.9375rem; }
.soon__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--accent);
}
.soon__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: blink 1.4s steps(2, jump-none) infinite;
}

/* ---- サムネイルがまだ無いゲームの仮画像 ---- */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, var(--stage-2), #07031a 75%);
}
.ph__text {
  margin-bottom: 18%;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  letter-spacing: 0.1em;
  color: var(--accent);
  animation: blink 1.6s steps(2, jump-none) infinite;
}

/* ---------------------------------------------------------
   フッター
   --------------------------------------------------------- */
.footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 56px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  text-align: center;
  background: #0c0524;
  border-top: 3px solid var(--pink);
}
.footer__brand { font-weight: 800; }
.footer__note { max-width: 36em; font-size: 0.875rem; color: var(--muted); }
.footer__top { font-size: 0.875rem; font-weight: 700; color: var(--gold); }
.footer__copy { font-size: 0.75rem; color: var(--muted); }

.noscript {
  max-width: var(--max);
  margin: 40px auto;
  padding: 16px var(--gutter);
  color: var(--gold);
  font-weight: 700;
}

/* ---------------------------------------------------------
   ゲーム開始のワープ演出
   --------------------------------------------------------- */
.warp {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 0 var(--gutter);
  text-align: center;
  background: var(--night);
  clip-path: circle(0% at var(--wx, 50%) var(--wy, 50%));
  transition: clip-path 0.5s cubic-bezier(0.7, 0, 0.3, 1);
}
.warp.is-active { clip-path: circle(160vmax at var(--wx, 50%) var(--wy, 50%)); }
.warp[hidden] { display: none; }
.warp__rays {
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 79, 160, 0.22) 0deg 6deg, transparent 6deg 18deg);
  animation: spin 3s linear infinite;
}
.warp.is-launched .warp__rays { animation-duration: 12s; }
.warp__label {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 10vw, 7rem);
  line-height: 1.1;
  white-space: nowrap;
  color: var(--gold);
  -webkit-text-stroke: 0.04em var(--night);
  text-shadow: 0 0.06em 0 var(--pink), 0 0 40px rgba(255, 201, 60, 0.6);
}
.warp.is-active .warp__label { animation: logo-slam 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 0.15s both; }
.warp__title {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 3.4vw, 1.75rem);
  line-height: 1.4;
}
.warp__msg {
  position: relative;
  max-width: 30em;
  font-weight: 700;
  color: var(--muted);
}
.warp.is-active .warp__title,
.warp.is-active .warp__msg { animation: rise 0.4s ease-out 0.3s both; }
.warp.is-launched .warp__msg { color: var(--cyan); }
/* 起動までのゲージ（JS の LAUNCH_WAIT = 0.5秒 と同じ長さで満タンになる） */
.warp__gauge {
  position: relative;
  width: min(320px, 70vw);
  height: 12px;
  margin-top: 6px;
  overflow: hidden;
  background: rgba(255, 248, 236, 0.12);
  border: 2px solid rgba(255, 248, 236, 0.5);
  border-radius: 999px;
}
.warp__gauge span {
  display: block;
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 10px, #ffe38a 10px 20px);
  box-shadow: 0 0 12px rgba(255, 201, 60, 0.8);
  transform-origin: left;
  transform: scaleX(0);
}
.warp.is-active .warp__gauge span { animation: gauge 0.5s linear forwards; }
.warp.is-launched .warp__gauge,
.warp.is-blocked .warp__gauge { display: none; }
@keyframes gauge { to { transform: scaleX(1); } }
.warp__actions {
  position: relative;
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.warp.is-launched .warp__actions,
.warp.is-blocked .warp__actions { display: flex; animation: rise 0.3s ease-out both; }
.warp.is-launched .warp__open { display: none; }
.warp__open,
.warp__close {
  padding: 10px 22px;
  font: 800 0.9375rem var(--font-body);
  text-decoration: none;
  border-radius: 999px;
  cursor: pointer;
}
.warp__open {
  color: var(--night);
  background: linear-gradient(180deg, #ffe38a, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 4px 0 #b35a00;
}
.warp__close {
  color: var(--cream);
  background: transparent;
  border: 2px solid rgba(255, 248, 236, 0.5);
}
.warp__close:hover { border-color: var(--cream); }

/* ゲームのタブから戻ってきたときのひとこと */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 160;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.6vw, 1.125rem);
  white-space: nowrap;
  color: var(--night);
  background: var(--gold);
  border: 3px solid var(--night);
  border-radius: 999px;
  box-shadow: 0 5px 0 var(--pink), 0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 140%);
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.3s;
  pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* クリックしたところへ飛ぶレーザー（画面全体の上に重ねる透明なキャンバス） */
.laser {
  position: fixed;
  inset: 0;
  z-index: 300;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* レーザーが命中したボタンが一瞬光る */
.is-hit { animation: hit-flash 0.32s ease-out; }
@keyframes hit-flash {
  0%   { filter: brightness(2.2) saturate(1.4); }
  100% { filter: none; }
}

/* ---------------------------------------------------------
   スコア（ヘッダーの右下にぶら下がる電光掲示板）
   --------------------------------------------------------- */
.hud {
  position: fixed;
  top: 58px;
  right: var(--gutter);
  z-index: 49;
  display: grid;
  justify-items: end;
  gap: 1px;
  padding: 6px 14px 8px;
  font-family: var(--font-display);
  line-height: 1.1;
  background: rgba(12, 5, 36, 0.92);
  border: 2px solid var(--gold);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), 0 0 16px rgba(255, 201, 60, 0.3);
}
.hud[hidden] { display: none; }
.hud p { display: flex; align-items: baseline; gap: 8px; }
.hud__label { font-size: 0.6875rem; letter-spacing: 0.08em; color: var(--pink); }
.hud__score {
  min-width: 6.2em;
  text-align: right;
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 201, 60, 0.75);
  transform-origin: right center;
}
.hud__sub { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* 日本語ラベルは表示用の太字フォントだと小さくて潰れるので、本文の丸ゴシックにする */
.hud__sub .hud__label { font-family: var(--font-body); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.02em; color: var(--muted); }
.hud__top { color: var(--cyan); }
.hud__top .hud__label { color: var(--cyan); }
/* 今のスコアが全体1位に並んだ・超えたとき */
.hud.is-top { border-color: var(--cyan); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), 0 0 22px rgba(63, 227, 255, 0.6); }
.hud.is-top .hud__top { color: #fff; text-shadow: 0 0 10px var(--cyan); animation: blink 0.8s steps(2, jump-none) infinite; }
.hud.is-bump .hud__score { animation: score-bump 0.35s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes score-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); color: #fff; }
  100% { transform: scale(1); }
}

/* ---------------------------------------------------------
   毒キノコ（ページの余白にだけ生える）
   --------------------------------------------------------- */
.mush-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 40;
  pointer-events: none;
}
.mush-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.mush {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  transform-origin: 50% 100%;
  animation: mush-in 0.45s cubic-bezier(0.3, 1.7, 0.5, 1) both;
}
.mush svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 50% 100%;
  animation: mush-idle 1.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 8px rgba(160, 80, 255, 0.7));
}
.mush--gold svg {
  animation-duration: 0.9s;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 12px rgba(255, 201, 60, 0.95));
}
.mush.is-leaving { animation: mush-out 0.4s ease-in forwards; }
.mush.is-dead { animation: mush-pop 0.4s ease-out forwards; }
@keyframes mush-in {
  from { opacity: 0; transform: scale(0.3, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes mush-idle {
  0%, 100% { transform: scale(1, 1) rotate(-4deg); }
  50%      { transform: scale(1.06, 0.93) rotate(4deg); }
}
@keyframes mush-out { to { opacity: 0; transform: scale(1.15, 0); } }
@keyframes mush-pop {
  0%   { transform: scale(1); filter: brightness(3); }
  35%  { transform: scale(1.4, 0.75); filter: brightness(3); opacity: 1; }
  100% { transform: scale(1.7); filter: brightness(2); opacity: 0; }
}

/* はじける胞子 */
.puff {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e2b8ff, #8b3fe0 70%);
  animation: puff 0.55s ease-out forwards;
}
.puff--gold { background: radial-gradient(circle at 35% 35%, #fff6c2, var(--gold) 70%); }
@keyframes puff {
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

/* 得点が浮かぶ */
.score-pop {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-family: var(--font-display);
  font-size: 1.25rem;
  white-space: nowrap;
  color: var(--cream);
  -webkit-text-stroke: 1px var(--night);
  text-shadow: 0 2px 0 var(--pink), 0 0 12px rgba(255, 79, 160, 0.8);
  transform: translate(-50%, -50%);
  animation: score-pop 0.9s ease-out forwards;
}
.score-pop--gold { font-size: 1.5rem; color: var(--gold); text-shadow: 0 2px 0 #b35a00, 0 0 14px rgba(255, 201, 60, 0.9); }
@keyframes score-pop {
  0%   { opacity: 0; transform: translate(-50%, -30%) scale(0.6); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(1); }
}

/* キノコに照準を合わせたとき */
.is-aiming,
.is-aiming * { cursor: crosshair !important; }

/* ---------------------------------------------------------
   レスポンシブ
   --------------------------------------------------------- */
@media (max-width: 860px) {
  .game,
  .game--flip {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "visual" "body";
  }
}

@media (max-width: 560px) {
  body { font-size: 0.9375rem; }
  .topbar__name { display: none; }
  .topbar__right { gap: 6px; }
  .topbar__nav { gap: 4px; }
  .topbar__nav a { padding: 5px 10px; font-size: 0.8125rem; }
  .sound-toggle { height: 32px; padding: 0 8px 0 7px; gap: 3px; font-size: 0.75rem; }
  .hud { padding: 4px 10px 6px; }
  .hud__score { font-size: 1.125rem; }
  .hud__sub { font-size: 0.75rem; }
  .hud__sub .hud__label { font-size: 0.6875rem; }
  .hero { padding-top: 84px; }
  .hero__lead br { display: none; }
  .hero__actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; }
  .hero-btn { justify-content: center; }
  .hero__clock { flex-direction: column; gap: 4px; padding: 8px 14px; }
  .ticker__label { padding-left: 20px; padding-right: 24px; }
  .toast { white-space: normal; width: max-content; max-width: calc(100% - 32px); text-align: center; }
  .btn-play { width: 100%; justify-content: center; }
  .game__cta { justify-content: center; }
}

/* ---------------------------------------------------------
   動きを減らす設定の人には、演出を止めて内容だけ見せる
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .intro { display: none; }
  .beam { transform: none; }
}
