:root {
  --color-bg: #0d080f;
  --color-paper: #fff2b8;
  --color-ink: #fff8df;
  --color-muted: #cfc4dc;
  --color-line: rgba(255, 235, 150, 0.18);
  --color-card: rgba(18, 12, 34, 0.82);
  --color-gold: #f3d45f;
  --color-pink: #e26ba0;
  --color-pink-soft: #f4c0d1;
  /* 各セクションの暗い板の濃さ（0=透明〜1=真っ黒）。読みやすさはここで一括調整 */
  --veil: 0.62;
  --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Yu Gothic", "YuGothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--color-bg);
  /* スクロールバーは消さず、夜の背景に溶ける細い半透明にする。
     機能（＝下に続きがある手がかり）は残しつつ、存在感だけ薄める。 */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(243, 212, 95, 0.28) transparent;
}

/* WebKit/Blink（Chrome / Safari / Edge）: 細く半透明のオーバーレイ風 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(243, 212, 95, 0.22);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(243, 212, 95, 0.42);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-base);
  /* 3層構造：
     ・最背面 = 画像層 body::before（画面に固定）
     ・中間   = グラデ層 body::after（ページ全体に伸びる。上=透明→下=暗）
     ・最前面 = 文字（各セクション）
     暗さはグラデ層だけが担当する。個々の要素は暗幕を持たない。 */
}

/* 画像層：写真を画面に固定する最背面レイヤー */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    url("./work-nomi-party-bg.jpg") center 30% / cover no-repeat,
    #0d080f;
}

/* グラデ層：ページ全体の高さに対して、上は透明（写真くっきり）→
   下にスクロールするほど暗くなる（夜が更けていく）。
   position:absolute + height:100% で body＝ページ全体の高さに伸びる。 */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(13, 8, 15, 0) 0%,
    rgba(13, 8, 15, 0.55) 55%,
    rgba(13, 8, 15, 0.92) 100%
  );
}

a {
  color: inherit;
}

.kicker {
  margin: 0 0 12px;
  color: var(--color-pink-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

/* ---------- Hero (photo) ---------- */

.hero {
  position: relative;
  min-height: min(82svh, 760px);
  padding: 22px 22px 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: transparent;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* 下端の黒グラデは廃止（段差線の原因）。暗さはグラデ層に任せる。
     ここはヒーローのピンクの光だけを担う。 */
  background:
    radial-gradient(circle at 72% 32%, rgba(226, 107, 160, 0.28), transparent 46%);
}

.top-link {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  min-height: 38px;
  margin-bottom: clamp(86px, 18svh, 180px);
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: rgba(10, 7, 20, 0.5);
  color: var(--color-muted);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  backdrop-filter: blur(4px);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

h1 {
  margin-bottom: 16px;
  color: var(--color-paper);
  font-family: "Kaisei Opti", var(--font-base);
  font-size: clamp(3rem, 13vw, 5.6rem);
  font-weight: 400;
  line-height: 0.98;
  text-shadow: 0 0 26px rgba(226, 107, 160, 0.32), 0 16px 40px rgba(0, 0, 0, 0.6);
}

.lead {
  margin-bottom: 22px;
  color: var(--color-ink);
  font-family: "Klee One", var(--font-base);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 650;
  line-height: 1.74;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
}

/* ---------- Shell ---------- */

.home-shell {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 64px max(16px, calc((100% - 680px) / 2)) 40px;
  display: grid;
  gap: 64px;
  /* 暗さはグラデ層(body::after)が一手に担う。shell は透明。 */
  background: transparent;
}

/* ---------- 文字フェード幕（画面の天地で常に溶ける） ----------
   各文字ブロックの opacity は JS が画面内のY位置から毎フレーム計算する。
   画面の上端10%と下端10%がフェード帯。中央80%は不透明。
   JS が無効/未対応のときに文字が消えたままにならないよう、初期は不透明。 */

.fade-band {
  position: relative;
  transition: opacity 120ms linear;
}

.section-heading {
  margin-bottom: 18px;
}

.section-note {
  margin: 10px 0 0;
  color: var(--color-muted);
  font-family: "Klee One", var(--font-base);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.82;
}

h2 {
  margin-bottom: 0;
  color: var(--color-paper);
  font-family: "Kaisei Decol", var(--font-base);
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 400;
  line-height: 1.3;
}

/* ---------- Concept ---------- */

.concept-lead {
  margin-top: 14px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-family: "Klee One", var(--font-base);
  font-size: 1rem;
  font-style: italic;
  font-weight: 600;
  line-height: 2.02;
}

/* ---------- Start / CTA ---------- */

.start {
  /* 枠・背景・影は持たず、他セクションと同じ地のテキストブロックにする。 */
  padding: 0;
}

.start h2 {
  margin-bottom: 8px;
}

.start-note {
  margin-bottom: 22px;
  color: var(--color-muted);
  font-family: "Klee One", var(--font-base);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.82;
}

.primary-button {
  position: relative;
  min-height: 60px;
  width: 100%;
  padding: 16px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(253, 243, 207, 0.78);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 18%, #fdf3cf 0%, #f7e08a 32%, var(--color-gold) 62%, #e6a838 100%);
  color: #20120d;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.34),
    0 0 16px rgba(243, 212, 95, 0.36),
    0 0 34px rgba(243, 212, 95, 0.16);
}

.primary-button::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1.5px solid rgba(243, 212, 95, 0.48);
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 14px rgba(243, 212, 95, 0.12);
}

.primary-button.secondary {
  margin-top: 22px;
}

/* ---------- Games ---------- */

.games .section-heading {
  margin-bottom: 16px;
}

.game-group + .game-group {
  margin-top: 26px;
}

h3 {
  margin-bottom: 12px;
  padding-left: 1em;
  color: var(--color-pink-soft);
  font-family: "Kaisei Decol", var(--font-base);
  font-size: 1.16rem;
  font-weight: 400;
}

.game-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  list-style: none;
}

.game-list li {
  min-height: 70px;
  padding: 10px 0 10px 2em;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
}

.game-list .num {
  color: var(--color-gold);
  font-family: "Spectral", Georgia, serif;
  font-size: 1.16rem;
  font-style: italic;
  font-weight: 850;
}

.game-item-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.game-list strong {
  color: var(--color-ink);
  font-family: "Kaisei Decol", var(--font-base);
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.25;
}

.game-list small {
  color: var(--color-muted);
  font-family: "Klee One", var(--font-base);
  font-size: 0.86rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.76;
}

/* ---------- Promise ---------- */

.promise {
  text-align: center;
}

.promise h2 {
  margin-bottom: 18px;
}

.note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.note span {
  min-height: 32px;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 28px 0 40px;
  text-align: center;
  /* 最下部はグラデ層が十分暗いので自前背景は不要 */
  background: transparent;
}

.site-footer a {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

/* ---------- Floating PLAY ボタン（左下固定・常時表示） ---------- */

.fab-play {
  position: fixed;
  left: 80px;
  bottom: 80px;
  z-index: 50;
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  /* 中心を白寄りに置き、外周へゴールド→深いゴールドへ抜けるラジアル。
     中心をやや上(38%)にずらすと、光源が上にある球体のように見える。 */
  background: radial-gradient(
    circle at 50% 38%,
    #fdf3cf 0%,
    #f7e08a 32%,
    var(--color-gold) 60%,
    #e6a838 100%
  );
  color: #20120d;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
  /* セーフエリア（iPhone のホームバー等）を避ける */
  margin-left: env(safe-area-inset-left);
  margin-bottom: env(safe-area-inset-bottom);
  /* ゆっくり明滅するグロー。影は2層（足元の影＋外周グロー）で、
     グローの広がりと濃さを keyframes で脈打たせる。 */
  animation: fab-glow 3.2s ease-in-out infinite;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

/* 二重丸の外輪郭。本体の外側に少し離して半透明ゴールドの枠を重ねる。 */
.fab-play::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 1.5px solid rgba(243, 212, 95, 0.55);
  pointer-events: none;
  animation: fab-ring 3.2s ease-in-out infinite;
}

@keyframes fab-ring {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

@keyframes fab-glow {
  /* 最小：グローをぐっと絞って淡く */
  0%,
  100% {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.4),
      0 0 10px rgba(243, 212, 95, 0.18),
      0 0 20px rgba(243, 212, 95, 0.08);
  }
  /* 最大：広く・濃く。最小との差を大きくして強く脈打たせる */
  50% {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.4),
      0 0 30px rgba(243, 212, 95, 0.75),
      0 0 60px rgba(243, 212, 95, 0.5),
      0 0 92px rgba(243, 212, 95, 0.28);
  }
}

.fab-play:hover {
  transform: translateY(-2px) scale(1.04);
  /* ホバー中は明滅を止めて、強めのグローで固定 */
  animation-play-state: paused;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.46),
    0 0 32px rgba(243, 212, 95, 0.8),
    0 0 64px rgba(243, 212, 95, 0.5),
    0 0 96px rgba(243, 212, 95, 0.3);
}

.fab-play:hover::before {
  animation-play-state: paused;
  opacity: 1;
  transform: scale(1.08);
}

.fab-play:active {
  transform: translateY(0) scale(0.98);
}

.fab-play:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .fab-play {
    transition: none;
    /* 明滅は止め、控えめなグローで固定 */
    animation: none;
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.4),
      0 0 20px rgba(243, 212, 95, 0.45),
      0 0 40px rgba(243, 212, 95, 0.22);
  }

  .fab-play::before {
    animation: none;
    opacity: 0.7;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  /* フェード幕を効かせず常に不透明にする（JS 側でも判定してスキップ） */
  .fade-band {
    opacity: 1 !important;
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 520px) {
  .hero {
    min-height: 76svh;
    padding: 16px 18px 44px;
  }

  .top-link {
    margin-bottom: clamp(76px, 16svh, 132px);
  }

  .home-shell {
    padding-left: 18px;
    padding-right: 18px;
    gap: 44px;
  }

  .start {
    padding: 24px 18px;
  }
}

/* 横画面（横長かつ十分広い）では、タイトルブロックを「左端と画面中央の
   中点」＝画面幅の 25% にコンテンツ中心が来るよう配置する。
   縦画面・スマホは従来の左下寄せのまま。 */
@media (min-width: 760px) and (min-aspect-ratio: 1 / 1) {
  .hero {
    justify-content: flex-start;   /* リンクとタイトルの間延びを抑える */
    padding-bottom: 80px;
  }

  .top-link {
    margin-bottom: clamp(96px, 16svh, 170px);
  }

  .hero-content {
    --hero-w: 520px;           /* タイトルの位置計算に使う想定幅 */
    --hero-center: 35vw;       /* ブロック中心を置く水平位置（左端0〜中央50vw） */
    /* ブロック自体は広く取り、リードが折り返さないようにする。
       右端が画面外に出ないよう右余白を確保。 */
    max-width: none;
    margin-left: max(22px, calc(var(--hero-center) - var(--hero-w) / 2));
    margin-right: 40px;
    text-align: left;          /* 塊は左揃え */
  }

  /* タイトルだけは想定幅で改行位置を保つ（広がったブロックに引きずられない） */
  .hero-content h1 {
    max-width: var(--hero-w);
  }

  /* リードは1行に収まりやすい幅を確保（親が広くなったので効く） */
  .hero-content .lead {
    max-width: min(52ch, 64vw);
  }

  /* 戻りリンクは左上に据え置き */
}
