/* フォントは index.html の <link> で読み込んでいます。
   CSS の @import にすると「HTML→style.css→フォントCSS→フォント本体」と
   直列に待たされるため、意図的にこちらには書いていません。 */

:root {
  --cream: #fff6e9;
  --paper: #fffdf9;

  --coral: #ff6f59;
  --coral-ink: #c14026;   /* 文字用（クリーム地でコントラスト比 4.87） */
  --sunny: #ffb347;
  --brown: #6b4a3a;
  --text: #4a3b32;
  --muted: #7d6d5e;       /* クリーム地で 4.65 */
  --muted-soft: #7a6858;  /* 白地で 5.32 */

  /* 夜（二次会） */
  --night-1: #1b1233;
  --night-2: #241a3f;
  --night-3: #120d24;
  --neon-blue: #6f8dff;
  --neon-pink: #ff7ad4;
  --night-text: #efe8ff;
  --night-muted: #b3a5d6;

  --shadow: 0 10px 30px rgba(107, 74, 58, 0.14);
  --shadow-lg: 0 24px 60px rgba(107, 74, 58, 0.3);

  /* 斜めの境界線の傾き（ヒーロー下と一次会→二次会で共通） */
  --slant: 7vw;

  --focus: #1d6fe0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* Google FontsのM+PLUS Roundedは本文全体に効くため、CJKのサブセットが
     69ファイル・901KBにもなっていた（実測）。端末標準の丸ゴシック/游ゴシックに
     切り替えて撤去した。Hiragino Maru Gothic ProNはMac/iPhoneの標準フォントで
     元のM+PLUS Roundedに近い丸みがあるので、見た目の差はそこまで大きくない。 */
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Maru Gothic ProN",
    "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", Meiryo, sans-serif;
  background: var(--cream);
  color: var(--text);
}

body.no-scroll { overflow: hidden; }

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

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

/* ===================== 合言葉画面 ===================== */
#lock-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

#lock-screen.fade-out { opacity: 0; }

.lock-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 179, 71, 0.34), transparent 46%),
    radial-gradient(circle at 84% 14%, rgba(255, 111, 89, 0.28), transparent 44%),
    radial-gradient(circle at 74% 92%, rgba(111, 141, 255, 0.3), transparent 48%),
    linear-gradient(155deg, #fff6e9, #ffe6d4 52%, #e7dcf2);
}

.lock-card {
  position: relative;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(8px);
  border-radius: 26px;
  padding: 44px 38px 38px;
  max-width: 390px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.lock-card.shake { animation: shake 0.45s; }

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

.lock-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--coral-ink);
}

.lock-card h1 {
  font-family: "Yomogi", cursive;
  font-size: 40px;
  line-height: 1.2;
  margin: 6px 0 4px;
  color: var(--brown);
  font-weight: 400;
}

.lock-date {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.lock-rule {
  width: 44px;
  height: 3px;
  border-radius: 3px;
  margin: 22px auto 20px;
  background: linear-gradient(90deg, var(--coral), var(--sunny));
}

.lock-card p.sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  margin: 0 0 24px;
}

#lock-form { display: flex; flex-direction: column; gap: 12px; }

#lock-input {
  padding: 15px 18px;
  border-radius: 14px;
  border: 2px solid #ecd9cb;
  font-size: 16px;
  font-family: inherit;
  text-align: center;
  outline: none;
  background: white;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#lock-input::placeholder { color: #b7a695; }

#lock-input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 111, 89, 0.16);
}

#lock-form button {
  padding: 15px;
  border-radius: 14px;
  border: none;
  background: var(--coral-ink);
  color: white;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

#lock-form button:hover { background: #a83318; transform: translateY(-1px); }
#lock-form button:active { transform: translateY(0); }

.lock-error {
  color: var(--coral-ink);
  font-size: 13px;
  min-height: 18px;
  font-weight: 700;
  margin: 12px 0 0;
}

/* ===================== 本編 ===================== */
#main-content {
  display: none;
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- ヒーロー ---------- */
/* 写真の色を殺さないよう、色を被せず「上下だけ暗くするスクリム」にしている */
.hero {
  position: relative;
  text-align: center;
  padding: 104px 20px calc(var(--slant) + 56px);
  overflow: hidden;
  color: white;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}

/* 背景写真は2枚重ねて交互にフェードさせる */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: #221812;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 38%;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

.hero-slide.is-active { opacity: 1; }

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 12, 8, 0.72) 0%,
    rgba(20, 12, 8, 0.34) 34%,
    rgba(20, 12, 8, 0.46) 66%,
    rgba(28, 16, 34, 0.82) 100%
  );
}

.hero-inner { position: relative; }

.hero .kicker {
  display: inline-block;
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  margin-bottom: 22px;
  padding-left: 0.3em;
}

.hero h1 {
  font-family: "Yomogi", cursive;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 66px);
  margin: 0 0 16px;
  line-height: 1.3;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.45);
}

.hero .lead {
  font-size: 17px;
  margin: 0 0 30px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-facts {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(10, 6, 4, 0.42);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 11px 26px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.96);
}

.hero-facts em {
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-right: 4px;
}

.hero-facts .sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

/* ---------- 追従ナビ ---------- */
#pill-nav-wrap {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 12px;
  margin-top: calc(var(--slant) / -2 - 6px);
  margin-bottom: 8px;
  pointer-events: none;
}

#pill-nav {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 5px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(60, 40, 30, 0.2);
  pointer-events: auto;
}

.pill {
  display: flex;
  align-items: baseline;
  gap: 7px;
  text-decoration: none;
  color: var(--brown);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  transition: background 0.25s, color 0.25s;
  white-space: nowrap;
}

.pill strong { font-weight: 800; }

.pill span { font-size: 11px; color: var(--muted-soft); }

.pill:hover { background: rgba(255, 179, 71, 0.24); }

.pill.active { background: var(--coral-ink); color: #fff; }
.pill.active span { color: rgba(255, 255, 255, 0.82); }

/* ---------- ギャラリーの帯 ---------- */
main { padding: 0; }

.band { position: relative; }

.section-inner {
  position: relative; /* 提灯の演出レイヤー（.lantern-field）より手前に出すため */
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.gallery-section { scroll-margin-top: 84px; }

/* 一次会：和の座敷、あたたかい昼の色 */
.band-day {
  padding: 42px 0 calc(var(--slant) + 64px);
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 179, 71, 0.2), transparent 42%),
    radial-gradient(circle at 88% 26%, rgba(255, 158, 181, 0.14), transparent 40%),
    var(--cream);
}

/* 動画セクション（トップ） */
.band-movie {
  padding: 42px 0 52px;
}

.band-movie + .band-day {
  padding-top: 8px;
}

.video-wrap {
  position: relative;
  background: #100b16;
  padding: 10px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.video-wrap.in-view { opacity: 1; transform: translateY(0); }

.video-wrap video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 74vh;
  border-radius: 8px;
  background: #000;
}

.video-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* 二次会：ネオンの夜。ヒーローと同じ角度で切って上に食い込ませる */
.night-wrap {
  position: relative;
  margin-top: calc(var(--slant) * -1);
}

.band-night {
  padding: calc(var(--slant) + 60px) 0 88px;
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  color: var(--night-text);
  background:
    radial-gradient(circle at 16% 14%, rgba(111, 141, 255, 0.4), transparent 46%),
    radial-gradient(circle at 84% 24%, rgba(255, 122, 212, 0.3), transparent 44%),
    radial-gradient(circle at 55% 96%, rgba(64, 214, 214, 0.18), transparent 46%),
    linear-gradient(172deg, var(--night-1), var(--night-2) 48%, var(--night-3));
}

/* 提灯がゆっくり立ちのぼる、夜セクションの背景演出。
   クリックを邪魔しないよう pointer-events:none。写真より奥に敷く（.section-inner 側で z-index を上げてある）。 */
.lantern-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.lantern {
  position: absolute;
  /* left/top は script.js が個体ごとに%で指定する。セクションの実際の高さを
     基準にした%なので、写真が多くセクションが長くなっても常にどこかに見える。 */
  width: var(--size, 30px);
  height: calc(var(--size, 30px) * 1.3);
  border-radius: 45% 45% 40% 40% / 55% 55% 45% 45%;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 9px),
    radial-gradient(circle at 50% 38%, #ffdb95 0%, #ff9d4d 55%, #d9502f 100%);
  box-shadow: 0 0 14px 4px rgba(255, 160, 70, 0.4);
  opacity: 0.6;
  animation-name: lantern-bob;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.lantern::before,
.lantern::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 38%;
  height: 10%;
  background: rgba(35, 20, 10, 0.6);
  transform: translateX(-50%);
  border-radius: 2px;
}

.lantern::before { top: -7%; }
.lantern::after { bottom: -7%; }

/* その場でゆっくり上下＋左右に揺れる（提灯が吊り下がって風に揺れているイメージ）。
   セクションの高さに関係なく、割り当てられた位置でずっと見えている。 */
@keyframes lantern-bob {
  0%, 100% { transform: translate(0, 0); opacity: 0.55; }
  50% { transform: translate(var(--sway, 10px), calc(var(--rise, 20px) * -1)); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .lantern { display: none; }
}

/* 木漏れ日のように漂う、一次会（昼）セクションの背景演出。
   写真の裏に置くと、写真が隙間なく並ぶ関係でほぼ隠れてしまうため、
   写真の「上」に乗せている（クリックは pointer-events:none なので操作は妨げない）。
   mix-blend-mode は写真の明るい部分（照明・白いシャツなど）に重なると
   ほぼ消えてしまい狙い通りにならなかったため、蛍と同じ「box-shadowでにじませる」
   方式にしてある。こちらは背景の色に関係なく安定して見える。 */
.light-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

.light-mote {
  position: absolute;
  width: var(--size, 20px);
  height: var(--size, 20px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 250, 235, 0.95) 0%,
    rgba(255, 214, 130, 0.75) 55%,
    rgba(255, 179, 71, 0) 78%
  );
  box-shadow: 0 0 12px 4px rgba(255, 214, 130, 0.5), 0 0 24px 9px rgba(255, 179, 71, 0.22);
  opacity: 0.6;
  animation-name: light-drift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes light-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.45; }
  50% { transform: translate(var(--drift, 12px), calc(var(--drift, 12px) * -1)) scale(1.2); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  .light-mote { animation: none; opacity: 0.55; }
}

/* 斜め線の上に載せるバッジ */
.turn-badge {
  position: absolute;
  top: calc(var(--slant) / 2 - 21px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  padding: 12px 30px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fff;
  background: linear-gradient(135deg, #6f5cff, #b45cff 55%, #ff7ad4);
  box-shadow: 0 12px 30px rgba(90, 50, 160, 0.45), 0 0 0 6px var(--cream);
  white-space: nowrap;
}

/* ---------- セクション見出し ---------- */
.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-heading.in-view { opacity: 1; transform: translateY(0); }

.avatar {
  width: 72px; height: 72px; min-width: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  padding: 3px;
  background: linear-gradient(135deg, var(--coral), var(--sunny));
  box-shadow: var(--shadow);
}

.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 3px solid var(--paper);
}

.band-night .avatar {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
  box-shadow: 0 0 26px rgba(150, 120, 255, 0.55);
}

.band-night .avatar img { border-color: rgba(255, 255, 255, 0.16); }

.heading-text { display: flex; flex-direction: column; gap: 4px; }

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--coral-ink);
}

.band-night .eyebrow { color: var(--neon-pink); }

.section-heading h2 {
  font-size: 27px;
  margin: 0;
  color: var(--brown);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.band-night .section-heading h2 { color: #fff; }

.meta { font-size: 12px; color: var(--muted); font-weight: 700; }

.band-night .meta { color: var(--night-muted); }

/* ---------- グループの小見出し（歓談・花束贈呈 など） ---------- */
.group-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 34px 0 14px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 800;
  color: var(--brown);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.group-label.in-view { opacity: 1; transform: translateY(0); }

.group-label::before {
  content: "";
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--coral), var(--sunny));
  flex: none;
}

.group-label em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.grid + .group-label { margin-top: 40px; }

.band-night .group-label { color: #fff; }
.band-night .group-label em { color: var(--night-muted); }
.band-night .group-label::before {
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink));
}

/* ---------- 貼り紙風のお知らせ ---------- */
.gallery-note {
  position: relative;
  max-width: 620px;
  margin: 36px auto 42px;
  padding: 28px 30px 24px;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-0.6deg);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-note.in-view {
  opacity: 1;
  transform: rotate(-0.6deg) translateY(0);
}

/* 左右に貼ったマスキングテープ */
.gallery-note::before,
.gallery-note::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 60px;
  height: 22px;
  background: rgba(255, 179, 71, 0.55);
  box-shadow: 0 3px 6px rgba(60, 40, 20, 0.18);
}

.gallery-note::before { left: 22px; transform: rotate(-7deg); }
.gallery-note::after { right: 22px; transform: rotate(6deg); background: rgba(255, 122, 89, 0.5); }

.note-pin {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%) rotate(-8deg);
  font-size: 26px;
  filter: drop-shadow(0 3px 3px rgba(60, 40, 20, 0.3));
}

.gallery-note p {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: var(--text);
}

.band-night .gallery-note { background: #221733; }
.band-night .gallery-note p { color: var(--night-text); }

@media (max-width: 640px) {
  .gallery-note { padding: 26px 20px 20px; margin: 30px auto 34px; }
  .gallery-note p { font-size: 13.5px; }
}

/* ---------- 写真グリッド（ポラロイド風） ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 26px 22px;
  padding: 8px 4px;
}

.thumb {
  --tilt: 0deg;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(26px) rotate(var(--tilt));
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.thumb.in-view { opacity: 1; transform: translateY(0) rotate(var(--tilt)); }

.thumb:focus-visible { outline: none; }

.frame {
  position: relative;
  display: block;
  background: var(--paper);
  padding: 9px 9px 17px;
  border-radius: 5px;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}

.band-night .frame {
  background: #fbf7f2;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.thumb:hover .frame,
.thumb:focus-visible .frame {
  transform: rotate(calc(var(--tilt) * -1)) scale(1.04) translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.thumb:focus-visible .frame {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.band-night .thumb:hover .frame,
.band-night .thumb:focus-visible .frame {
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6), 0 0 26px rgba(150, 120, 255, 0.45);
}

.frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  background: #efe7de;
}

/* ---------- 動画クリップのサムネイル ---------- */
/* <video preload="metadata"> で実際の1コマを出す方法も試したが、実測で
   この動画群は「metadata」を指定してもブラウザがほぼ全体を読み込んで
   しまうことを確認した（9.0MBのファイルで9.46MB転送）ため採用しなかった。
   9本分だと開いただけで数十〜100MB級になってしまう。
   動画データを一切読み込まない、アイコンだけの軽いカードにしてある。 */
.video-group-label { margin-top: 30px; }

.video-thumb-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(145deg, var(--coral), #c9432c 120%);
}

.band-night .video-thumb-inner {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(145deg, var(--neon-blue), #5233c9 120%);
}

/* 動画と同じ名前の画像があるときは、それをカードいっぱいに敷く
   （build_images.py の images/thumbs/video/ 参照。無ければ上のグラデーションのまま） */
.video-thumb-inner img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.video-play-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--coral-ink);
  font-size: 15px;
  padding-left: 3px; /* ▶ の視覚的な中心を合わせる */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-thumb:hover .video-play-icon,
.video-thumb:focus-visible .video-play-icon {
  transform: scale(1.12);
}

.video-thumb-num {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 7px;
  border-radius: 999px;
}

.video-thumb-duration {
  position: absolute;
  bottom: 7px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: #bdab9b;
  letter-spacing: 0.04em;
}

.band-night .video-thumb-duration { color: var(--night-muted); }

.band-night .video-thumb-duration { color: var(--night-muted); }

/* ---------- 会場への感謝＆地図 ---------- */
/* band-night をそのまま使うと斜めカットまで付いてくるので、専用のクラスにしてある */
.venues {
  padding: 46px 0 56px;
  color: var(--night-text);
  background: linear-gradient(180deg, var(--night-2), var(--night-3));
}

.venues-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
}

.venues .section-heading h2 { color: #fff; }

.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 8px;
}

.venue-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.venue-card.in-view { opacity: 1; transform: translateY(0); }

.venue-card h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #fff;
}

.venue-addr {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--night-muted);
}

.venue-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1a1330;
}

.venue-map iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
}

.venue-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--neon-pink);
  text-decoration: none;
}

.venue-link:hover { text-decoration: underline; }

/* ---------- フッター ---------- */
footer {
  text-align: center;
  padding: 4px 20px 60px;
  color: var(--night-muted);
  font-size: 14px;
  line-height: 2;
  background: var(--night-3);
}

/* 「またみんなで集まろうね」の吹き出し */
.thanks-bubble {
  position: relative;
  display: inline-block;
  background: var(--paper);
  padding: 16px 30px;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px) scale(0.94);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.thanks-bubble.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: bubble-bob 4.5s ease-in-out 0.6s infinite;
}

/* 吹き出しのしっぽ */
.thanks-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  transform: translateX(-50%);
  border-width: 13px 10px 0;
  border-style: solid;
  border-color: var(--paper) transparent transparent;
}

@keyframes bubble-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1); }
}

footer .thanks {
  font-family: "Yomogi", cursive;
  font-size: 21px;
  color: var(--coral-ink);
  margin: 0;
}

footer .small {
  font-size: 12px;
  color: #9a8fc0;
  margin: 22px 0 0;
  line-height: 1.9;
}

/* ---------- 蛍集めミニゲーム ---------- */
/* 数匹の蛍がそれぞれ違う速さ・タイミングで漂う（script.js が個体ごとに
   animation-delay / animation-duration / 開始位置を割り当てる）。
   全部タップすると Present by Muro が浮かぶ。 */
.firefly-zone {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 130px;
  margin: 30px auto 0;
}

.firefly {
  position: absolute;
  left: 6%;
  top: 60%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  animation-name: firefly-wander;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.firefly-glow {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff6d8 0%, #ffe58a 45%, rgba(255, 229, 138, 0) 75%);
  box-shadow: 0 0 10px 3px rgba(255, 229, 138, 0.85), 0 0 22px 8px rgba(255, 200, 100, 0.35);
  animation: firefly-twinkle 2.6s ease-in-out infinite;
}

.firefly:hover .firefly-glow,
.firefly:focus-visible .firefly-glow {
  animation-play-state: paused;
  opacity: 1;
  transform: scale(1.25);
}

/* タップして見つけた蛍は、そこで静かに光ったまま留まる */
.firefly.found {
  animation-play-state: paused;
  cursor: default;
}

.firefly.found .firefly-glow {
  animation: none;
  opacity: 1;
  transform: scale(1.5);
  box-shadow: 0 0 14px 5px rgba(255, 229, 138, 0.95), 0 0 34px 14px rgba(255, 200, 100, 0.5);
}

@keyframes firefly-twinkle {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* 8点をゆるく巡回する経路。left/top は .firefly-zone のサイズを基準にした% なので
   画面幅が変わっても比率は保たれる。個体ごとに duration/delay が違うので
   同じ経路でもバラバラに散らばって見える。 */
/* 経路そのものを個体ごとに変える（--fx0〜--fx6 / --fy0〜--fy6 は script.js が
   蛍ごとにランダムな値を設定する）。以前は全員が同じ経路をタイミングだけ
   ずらして辿っていたため、時々ぴったり重なって下の蛍が押せなくなっていた。 */
@keyframes firefly-wander {
  0%   { left: calc(var(--fx0, 6) * 1%);  top: calc(var(--fy0, 60) * 1%); }
  14%  { left: calc(var(--fx1, 26) * 1%); top: calc(var(--fy1, 18) * 1%); }
  28%  { left: calc(var(--fx2, 50) * 1%); top: calc(var(--fy2, 55) * 1%); }
  42%  { left: calc(var(--fx3, 74) * 1%); top: calc(var(--fy3, 15) * 1%); }
  56%  { left: calc(var(--fx4, 92) * 1%); top: calc(var(--fy4, 55) * 1%); }
  70%  { left: calc(var(--fx5, 76) * 1%); top: calc(var(--fy5, 85) * 1%); }
  84%  { left: calc(var(--fx6, 34) * 1%); top: calc(var(--fy6, 78) * 1%); }
  100% { left: calc(var(--fx0, 6) * 1%);  top: calc(var(--fy0, 60) * 1%); }
}

/* 普段は完全に空（何も表示しない）。5匹全部見つけたときだけ、
   .all-found が付いて初めて文字と控えめな背景が現れる。
   空の状態でも枠だけ見えてしまうと「ここに何かある」と勘づかれてしまうため、
   通常時は背景・枠・余白を一切持たせていない。 */
.firefly-progress {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  color: #c9bce6;
  font-size: 12px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, padding 0.3s ease;
}

/* 見つけ終わったときも派手にしない。キラキラや強調した枠は付けず、
   文字が読める最低限の背景だけを添えた、ひっそりとした見せ方にしてある。 */
.firefly-progress.all-found {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 229, 138, 0.2);
  color: #e9e1f5;
}

@media (prefers-reduced-motion: reduce) {
  /* 蛍は「探して捕まえる」が成立条件そのものなので、動きを減らす設定でも
     止めない（下の方の * { animation:none } からも除外している）。
     移動量は小さく・ゆっくりなので、酔いなどの心配が少ないタイプの動きと判断した。 */
  .thanks-bubble.in-view { animation: none; }
}

/* ---------- ライトボックス ---------- */
#lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

/* 背景はページを透かしたまま強くぼかす。
   ぼかし処理は背景が静止している間はGPU側で使い回されるため、
   不透明な黒にしても軽くはならない（実測で差が出なかった）。
   写真の親ではなく専用の層にかけないと、前景の写真まで眠くなる。 */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 12, 24, 0.74);
  backdrop-filter: blur(26px) saturate(1.2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ぼかしに対応していないブラウザでは、透けたままだと写真が見づらいので濃くする */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lightbox-backdrop { background: rgba(18, 12, 24, 0.94); }
}

#lightbox.open { display: flex; }

/* 写真は不透明の台紙に載せる。半透明の上に直接置くと背景と合成されて
   写真の色が眠くなるため（実測で確認）。額装のような見た目にもなる。 */
.lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: min(94vw, 1180px);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #100b16;
  padding: 14px 14px 2px;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

#lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#lightbox-img.show { opacity: 1; transform: scale(1); }

/* 動画クリップ用。通常は写真と同じく自然な縦横比のまま最大サイズだけ制限する。 */
#lightbox-video-wrap { max-width: 92vw; }

#lightbox-video {
  display: block;
  max-width: 92vw;
  max-height: 72vh;
  border-radius: 10px;
  background: #000;
}

/* 縦横が逆に記録された動画（teacher1.mp4 など）用。
   枠を「回した後の見た目」の縦横比に固定し、中の <video> だけを
   width:100%+height:auto で回して中央に重ねる（transform/aspect-ratio の
   具体的な値は script.js が動画ごとのサイズから計算して inline で設定する）。 */
#lightbox-video-wrap.video-rotated {
  position: relative;
  width: min(92vw, 720px);
  overflow: hidden;
  border-radius: 10px;
  background: #000;
}

#lightbox-video-wrap.video-rotated #lightbox-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

#lightbox-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  margin: 14px 0 12px;
}

#lightbox-counter strong { font-weight: 800; }
#lightbox-counter .dot { opacity: 0.5; }

#lightbox-counter .num {
  margin-left: 6px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: white;
  font-size: 22px;
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.34);
  transform: translateY(-50%) scale(1.08);
}

#lightbox-prev { left: -16px; }
#lightbox-next { right: -16px; }

/* 画面の高さが足りないと台紙の外に出て押せなくなるため、画面基準で固定する */
#lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: white;
  font-size: 22px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s, transform 0.3s;
}

#lightbox-close:hover { background: rgba(255, 255, 255, 0.34); transform: rotate(90deg); }

/* ---------- スマホ ---------- */
@media (max-width: 700px) {
  :root { --slant: 12vw; }

  .hero { padding-top: 76px; }
  .hero-facts { gap: 10px; padding: 9px 18px; font-size: 12px; }

  .pill { padding: 8px 15px; font-size: 13px; }
  .pill span { display: none; }

  .turn-badge {
    font-size: 12px;
    padding: 11px 24px;
    top: calc(var(--slant) / 2 - 20px);
  }

  .avatar { width: 58px; height: 58px; min-width: 58px; }
  .section-heading { gap: 14px; }
  .section-heading h2 { font-size: 22px; }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 20px 14px;
  }

  .frame { padding: 7px 7px 14px; }

  .lightbox-inner { padding: 8px 8px 2px; border-radius: 14px; max-width: 96vw; }
  #lightbox-img { max-height: 66vh; }
  #lightbox-counter { margin: 10px 0 9px; font-size: 12px; }
  .lb-btn { width: 42px; height: 42px; font-size: 18px; }
  #lightbox-prev { left: -4px; }
  #lightbox-next { right: -4px; }
  #lightbox-close { top: 10px; right: 10px; }
}

/* 画面が低いときは写真の高さを抑える（閉じるボタンは画面基準で固定済み） */
@media (max-height: 620px) {
  #lightbox-img { max-height: 64vh; }
  #lightbox-counter { margin: 10px 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  /* 蛍（.firefly / .firefly-glow）だけは対象から外す。詳しい理由は
     フッターの蛍のCSSにあるコメントを参照。 */
  *:not(.firefly):not(.firefly-glow) { animation: none !important; transition: none !important; }
  .thumb, .section-heading { opacity: 1; transform: rotate(var(--tilt)); }
  .section-heading { transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 招待状（フッターの吹き出しをタップすると落ちてくる小ネタ） ---------- */
/* 見た目はただの吹き出しのまま。タップできることを示すヒントはあえて出していない。 */
.thanks-bubble {
  cursor: pointer;
}

#invite-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  background: rgba(20, 12, 24, 0.45);
  backdrop-filter: blur(3px);
}

#invite-overlay.open {
  display: flex;
  animation: invite-backdrop 0.25s ease;
}

@keyframes invite-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.invite-card {
  position: relative;
  width: min(86vw, 360px);
  background: var(--paper);
  border-radius: 4px;
  padding: 40px 26px 30px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  /* 上からふわっと落ちてきて、軽くはずんで止まる */
  animation: invite-fall 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 二重にタップされたときも同じ動きを最初からやり直せるよう、クラスの付け外しで再生する */
.invite-card.replay {
  animation-name: invite-fall;
}

@keyframes invite-fall {
  0%   { transform: translateY(-130vh) rotate(-10deg); opacity: 0; }
  55%  { transform: translateY(14px) rotate(3deg); opacity: 1; }
  75%  { transform: translateY(-8px) rotate(-2deg); }
  100% { transform: translateY(0) rotate(-1.5deg); opacity: 1; }
}

/* くじ・チケット風の縁取り（左右にギザギザの切り取り線） */
.invite-card::before,
.invite-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  background-image: radial-gradient(circle at 0 50%, transparent 6px, var(--cream) 6.5px);
  background-size: 10px 16px;
  background-repeat: repeat-y;
}

.invite-card::before { left: -1px; }
.invite-card::after { right: -1px; transform: scaleX(-1); }

.invite-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 74px;
  height: 24px;
  background: rgba(255, 179, 71, 0.55);
  box-shadow: 0 3px 6px rgba(60, 40, 20, 0.18);
}

.invite-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--coral-ink);
  margin-bottom: 14px;
}

.invite-text {
  font-family: "Yomogi", cursive;
  font-size: 26px;
  line-height: 1.6;
  color: var(--brown);
  margin: 0 0 20px;
}

.invite-foot {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  padding-top: 14px;
  border-top: 1px dashed rgba(107, 74, 58, 0.25);
}

#invite-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(107, 74, 58, 0.08);
  color: var(--brown);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

#invite-close:hover {
  background: rgba(107, 74, 58, 0.16);
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  #invite-overlay.open { animation: none; }
  .invite-card { animation: none; }
}
