:root {
  --blue: #005cff;
  --blue-hover: #004ce0;
  --navy: #06183d;
  --text: #081a3a;
  --text-2: #33476a;
  --muted: #64748b;
  --pale: #eaf3ff;
  --soft: #f4f8ff;
  --border: #d9e5f5;
  --halo: 0 0 2px rgba(255, 255, 255, 0.95), 0 0 10px rgba(255, 255, 255, 0.75), 0 0 22px rgba(255, 255, 255, 0.5);
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --out: cubic-bezier(0.23, 1, 0.32, 1);
  --edge: 28px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* display を指定した要素でも、hidden なら必ず隠す */

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #d3e2f5; /* 3D の霧の色と揃える */
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  /* iPhone の Safari は、条件によって小さい文字を勝手に大きくする(実機で、下の注意書きが
     ふくらんでメニューに重なった)。指定した大きさのまま出させる。 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: pinch-zoom; }

/* ---- 読み込み ---- */
#boot {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--soft);
  transition: opacity 0.6s ease 0.15s, visibility 0s linear 0.8s;
}
#boot.done { opacity: 0; visibility: hidden; }
.bars { display: flex; align-items: flex-end; gap: 7px; height: 46px; }
.bars i { width: 11px; border-radius: 3px; background: rgba(0, 92, 255, 0.16); transition: background 0.18s steps(2); }
.bars i:nth-child(1) { height: 14px; }
.bars i:nth-child(2) { height: 24px; }
.bars i:nth-child(3) { height: 35px; }
.bars i:nth-child(4) { height: 46px; }
.bars i.on { background: var(--blue); }
.boot-line { margin: 0; font: 500 12px var(--mono); letter-spacing: 0.14em; color: var(--text-2); }

/* ---- 音の確認(長い入場の前に、BGM を流してよいかを尋ねる。読み込み画面の中に出る。src/main.js) ----
   上から、ロゴ → 主役の柴犬 → 質問 → 2 つのボタン → ひとこと。その下に、小さくした電波バー(読み込みの進み具合)が残る。
   ・現れ方: 枠で切り取りながら広げることはしない(ロゴの板や柴犬が、まっすぐな線で切れて見えるため)。
             部品が 1 つずつ、少しずつ遅れて現れる。
   ・動き:   柴犬(跳んで登場 → ゆれる・ときどき跳ねる・まばたき)、左右の「音の棒」、後ろに広がる「電波の輪」、背景を流れる点。
             ボタンに触れると変わる(<div class="gate"> の data-mood)。loud = 音あり: 柴犬が喜んで跳ね、棒が大きく動く / quiet = 音なし: 棒が止まり、輪が消える
   ・動きはすべて transform と opacity だけで作る(裏で 3D の読み込みが走っていても、止まらずに動く) */
#boot { --dot: rgba(0, 92, 255, 0.13); --dot-far: rgba(0, 92, 255, 0.36); }
.gate { order: -1; position: relative; margin-bottom: -4px; --ink: var(--blue); }
.gate:focus { outline: none; }
.gate-in { display: grid; justify-items: center; gap: clamp(10px, 2.4vh, 22px); padding: 8px 20px 26px; text-align: center; }
@keyframes gate-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes gate-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes gate-fade { from { opacity: 0; } to { opacity: 1; } }

/* ロゴは絵そのものには手を加えず、大きさだけ決める */
.gate-logo { display: block; height: clamp(32px, 5.4vh, 44px); width: auto; animation: gate-drop 0.6s var(--out) 0.05s both; }
.gate-body { display: grid; justify-items: center; gap: clamp(8px, 1.8vh, 16px); }

/* 柴犬と、そのまわり。--fig は柴犬の高さ。跳ねる高さもこれに比例させて、どの画面でも上のロゴに重ならないようにしている */
.gate-stage { --fig: clamp(104px, 25vh, 228px); position: relative; padding-top: 4px; display: flex; align-items: center; justify-content: center; gap: clamp(8px, 1.4vw, 16px); }
.gate-figure {
  position: relative; z-index: 1; flex: none; height: var(--fig); aspect-ratio: 853 / 1357; transform-origin: 50% 100%;
  animation: gate-hop-in 0.8s ease-out 0.16s both, gate-idle 5.2s ease-in-out 1.1s infinite;
}
.gate-mascot { position: absolute; display: block; filter: drop-shadow(0 12px 12px rgba(6, 24, 61, 0.16)); }
.gate-mascot.pose-home { inset: 0; width: 100%; height: 100%; }
/* 跳ねる絵は、手を振る絵と同じ縮尺・同じ足の位置になるように置く(寸法は assets/mascot/meta.json から) */
.gate-mascot.pose-joy { left: 10.26%; bottom: 0; height: 88.8%; width: auto; visibility: hidden; }
.gate-blink { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; animation: gate-blink 4.6s steps(1, end) 2.2s infinite; }
/* 跳んで登場: 下から伸び上がり、着地で少しつぶれる */
@keyframes gate-hop-in {
  0% { opacity: 0; transform: translateY(40px) scale(0.72); }
  45% { opacity: 1; transform: translateY(calc(var(--fig) * -0.05)) scale(1.02, 1.05); }
  70% { transform: translateY(0) scale(1.05, 0.95); }
  85% { transform: translateY(calc(var(--fig) * -0.015)) scale(0.99, 1.01); }
  100% { opacity: 1; transform: none; }
}
/* ふだん: ゆっくり 2 回ゆれて、しゃがんで、ぴょんと跳ねる */
@keyframes gate-idle {
  0%, 36%, 92%, 100% { transform: none; }
  18%, 54% { transform: translateY(calc(var(--fig) * -0.018)); }
  70% { transform: scale(1.03, 0.96); }
  78% { transform: translateY(calc(var(--fig) * -0.07)) scale(0.98, 1.03); }
  86% { transform: scale(1.04, 0.95); }
}
@keyframes gate-blink { 0%, 92% { opacity: 0; } 93%, 96% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes gate-cheer { 0%, 100% { transform: scale(1.04, 0.95); } 50% { transform: translateY(calc(var(--fig) * -0.1)) scale(0.98, 1.03); } }
@keyframes gate-hush { from { transform: none; } to { transform: translateY(-2px); } }

/* 音の棒: 柴犬の左右に 5 本ずつ。柴犬に近いほど高く、濃い。--s 高さの割合 / --a 濃さ / --d 速さ / --o 始まりのずれ */
.gate-eq { display: flex; align-items: center; gap: clamp(3px, 0.45vw, 5px); height: calc(var(--fig) * 0.36); animation: gate-fade 0.6s ease 0.55s both; }
.gate-eq i {
  --lo: 0.22; --hi: 0.78;
  width: clamp(3px, 0.42vw, 5px); height: 100%; border-radius: 3px; background: var(--ink); opacity: var(--a);
  transform: scaleY(calc(var(--lo) * var(--s))); transition: transform 0.35s var(--out), opacity 0.35s ease;
  animation: gate-wave var(--d) ease-in-out var(--o) infinite alternate;
}
.gate-eq.left i { animation-direction: alternate-reverse; }
.gate-eq.right i:nth-child(1), .gate-eq.left i:nth-child(5) { --s: 1; --a: 0.9; --d: 0.58s; --o: -0.2s; }
.gate-eq.right i:nth-child(2), .gate-eq.left i:nth-child(4) { --s: 0.8; --a: 0.7; --d: 0.74s; --o: -0.5s; }
.gate-eq.right i:nth-child(3), .gate-eq.left i:nth-child(3) { --s: 0.62; --a: 0.5; --d: 0.52s; --o: -0.1s; }
.gate-eq.right i:nth-child(4), .gate-eq.left i:nth-child(2) { --s: 0.46; --a: 0.34; --d: 0.66s; --o: -0.4s; }
.gate-eq.right i:nth-child(5), .gate-eq.left i:nth-child(1) { --s: 0.32; --a: 0.2; --d: 0.8s; --o: -0.3s; }
@keyframes gate-wave { from { transform: scaleY(calc(var(--lo) * var(--s))); } to { transform: scaleY(calc(var(--hi) * var(--s))); } }

/* 電波の輪: 柴犬の後ろから、3 つの輪が順に広がって消える。
   上と下は消して、左右の弧だけ見せる(上のロゴや、下の質問の文字に、輪の線がかからないように) */
.gate-rings {
  position: absolute; left: 50%; top: 50%; z-index: -1; width: calc(var(--fig) * 1.9); aspect-ratio: 1; translate: -50% -50%; opacity: 0.8; pointer-events: none; transition: opacity 0.4s ease;
  -webkit-mask-image: linear-gradient(to bottom, transparent 20%, #000 37%, #000 60%, transparent 76%); mask-image: linear-gradient(to bottom, transparent 20%, #000 37%, #000 60%, transparent 76%);
}
.gate-rings i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; animation: gate-ring 3.3s cubic-bezier(0.2, 0.5, 0.4, 1) infinite both; }
.gate-rings i:nth-child(1) { animation-delay: 0.7s; }
.gate-rings i:nth-child(2) { animation-delay: 1.8s; }
.gate-rings i:nth-child(3) { animation-delay: 2.9s; }
@keyframes gate-ring { 0% { transform: scale(0.17); opacity: 0; } 12% { opacity: 0.55; } 100% { transform: scale(1); opacity: 0; } }

/* ボタンに触れたとき(答えたあとも、その様子のまま入場へ移る) */
.gate[data-mood="loud"] .gate-figure { animation: gate-cheer 0.56s cubic-bezier(0.3, 0, 0.4, 1) infinite; }
.gate[data-mood="loud"] .pose-home, .gate[data-mood="loud"] .gate-blink { visibility: hidden; }
.gate[data-mood="loud"] .pose-joy { visibility: visible; }
.gate[data-mood="loud"] .gate-eq i { --lo: 0.45; --hi: 1.2; animation-duration: calc(var(--d) * 0.62); }
.gate[data-mood="loud"] .gate-rings { opacity: 1; }
.gate[data-mood="quiet"] .gate-figure { animation: gate-hush 2.6s ease-in-out infinite alternate; }
.gate[data-mood="quiet"] .gate-eq i { animation: none; transform: scaleY(0.07); opacity: calc(var(--a) * 0.6); }
.gate[data-mood="quiet"] .gate-rings { opacity: 0; }

/* 質問とボタン */
.gate-ask { display: grid; justify-items: center; gap: 18px; }
.gate.answered .gate-ask { opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.gate-title { margin: 0; font-size: clamp(18px, 2.1vw, 22px); font-weight: 700; line-height: 1.5; letter-spacing: 0.04em; color: var(--navy); text-wrap: balance; animation: gate-rise 0.6s var(--out) 0.42s both; }
.gate-actions { display: flex; justify-content: center; gap: 12px; padding: 4px 6px 20px; }
.gate .btn { min-height: 52px; min-width: 178px; padding: 0 22px; gap: 10px; font-size: 15px; white-space: nowrap; transition: background-color 0.15s ease, scale 0.16s ease-out, translate 0.2s var(--out); animation: gate-rise 0.6s var(--out) 0.52s both; }
.gate .btn + .btn { animation-delay: 0.6s; }
@media (hover: hover) and (pointer: fine) {
  .gate .btn:hover { translate: 0 -2px; }
}
.gate-note { margin: -10px 0 0; font-size: 12px; line-height: 1.7; color: var(--text-2); text-wrap: balance; animation: gate-fade 0.6s ease 0.8s both; }
/* ボタンの中の 4 本の棒: 「音あり」は上下に動き、「音なし」は低いまま止まっている */
.gate .eq i { background: currentColor; }
.gate [data-sound="on"] .eq i { animation: eq 0.9s ease-in-out infinite alternate; }
.gate [data-sound="on"] .eq i:nth-child(2) { animation-duration: 0.62s; animation-delay: -0.3s; }
.gate [data-sound="on"] .eq i:nth-child(3) { animation-duration: 0.78s; animation-delay: -0.55s; }
.gate [data-sound="on"] .eq i:nth-child(4) { animation-duration: 0.7s; animation-delay: -0.12s; }
.gate [data-sound="off"] .eq i { transform: scaleY(0.2); opacity: 0.75; }

/* 背景を流れる点: 細かい点の柄が、斜めにゆっくり流れる。4 つおきの点は大きく、明るさがゆれる。まん中だけ見せて、ふちは消す */
.gate-dots {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 0.9s ease;
  -webkit-mask-image: radial-gradient(ellipse 64% 64% at 50% 46%, #000 10%, transparent 100%); mask-image: radial-gradient(ellipse 64% 64% at 50% 46%, #000 10%, transparent 100%);
}
#boot.asking .gate-dots { opacity: 1; }
.gate-dots i { position: absolute; inset: -100px; background-image: radial-gradient(circle, var(--dot) 1.3px, transparent 1.8px); background-size: 24px 24px; animation: gate-drift 9s linear infinite; }
.gate-dots i + i { background-image: radial-gradient(circle, var(--dot-far) 2px, transparent 2.6px); background-size: 96px 96px; background-position: -12px -12px; animation: gate-drift-far 36s linear infinite, gate-twinkle 2.6s ease-in-out infinite alternate; }
@keyframes gate-drift { to { transform: translate(24px, -24px); } }
@keyframes gate-drift-far { to { transform: translate(96px, -96px); } }
@keyframes gate-twinkle { from { opacity: 0.25; } to { opacity: 1; } }

/* 尋ねているあいだ、電波バーは小さくして下に置く(場所が変わるので、いったん消えてから現れる) */
#boot.asking .bars { height: 22px; gap: 4px; }
#boot.asking .bars i { width: 6px; border-radius: 2px; }
#boot.asking .bars i:nth-child(1) { height: 7px; }
#boot.asking .bars i:nth-child(2) { height: 12px; }
#boot.asking .bars i:nth-child(3) { height: 17px; }
#boot.asking .bars i:nth-child(4) { height: 22px; }
#boot.asking .boot-line { margin-top: -6px; font-size: 11px; }
#boot.asking .bars, #boot.asking .boot-line { animation: gate-fade 0.5s ease 0.6s both; }

/* スマホの縦: 2 つのボタンを、横に並べたまま幅いっぱいに */
@media (max-width: 440px) {
  .gate-in { padding-left: 16px; padding-right: 16px; }
  .gate-actions { width: 100%; padding-left: 2px; padding-right: 2px; gap: 10px; }
  .gate .btn { flex: 1 1 0; min-width: 0; padding: 0 6px; gap: 7px; font-size: 14px; }
}
@media (max-width: 350px) {
  .gate .btn { font-size: 13px; }
}
/* 高さの低い画面(スマホの横向きなど): 柴犬を左、ロゴ・質問・ボタンを右に並べる */
@media (max-height: 480px) and (orientation: landscape) {
  .gate-in { grid-template-columns: auto auto; align-items: center; gap: 8px 22px; padding: 4px 20px 18px; }
  .gate-body { display: contents; } /* 柴犬と質問を、ロゴと同じ並びの中に置き直す */
  .gate-logo { grid-column: 2; grid-row: 1; height: 28px; }
  .gate-stage { --fig: clamp(110px, 44vh, 176px); grid-column: 1; grid-row: 1 / span 2; gap: 8px; }
  .gate-ask { grid-column: 2; grid-row: 2; gap: 12px; }
  .gate-actions { padding-bottom: 16px; }
}
@media (max-height: 480px) and (orientation: landscape) and (max-width: 700px) {
  .gate .btn { min-width: 150px; padding: 0 14px; }
}

/* ---- 診断(試作用、?check=1 のときだけ出る) ---- */
.check {
  position: fixed; left: 6px; top: 6px; z-index: 40; margin: 0; padding: 7px 9px; max-width: calc(100vw - 12px);
  border-radius: 6px; background: rgba(6, 24, 61, 0.86); color: #fff; font: 500 10.5px/1.55 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none;
}

/* ---- 入場 ---- */
#intro { position: fixed; inset: 0; z-index: 18; width: 100%; height: 100%; display: block; pointer-events: none; transition: opacity 0.35s ease, visibility 0s linear 0.35s; }
#intro.done { opacity: 0; visibility: hidden; }
.intro-line {
  position: fixed; left: 0; right: 0; bottom: 11vh; z-index: 19; margin: 0;
  text-align: center; font-weight: 700; font-size: clamp(14px, 1.5vw, 19px); letter-spacing: 0.1em; color: var(--navy);
  opacity: 0; transform: translateY(6px); transition: opacity 0.6s ease, transform 0.6s var(--out); pointer-events: none;
}
.intro-line.on { opacity: 1; transform: none; }
.intro-skip {
  position: fixed; right: var(--edge); bottom: 20px; z-index: 19;
  appearance: none; border: 0; padding: 8px 12px; border-radius: 8px; background: transparent; cursor: pointer;
  font: 500 12px var(--mono); letter-spacing: 0.12em; color: var(--text-2);
}
.intro-skip:hover, .intro-skip:focus-visible { background: rgba(255, 255, 255, 0.7); color: var(--navy); }
/* 入場のあいだは、帯・メニュー・中身を隠しておく */
.top, .menu, .foot, .lab { transition: opacity 0.7s ease; }
.entering .top, .entering .menu, .entering .foot, .entering .lab, .entering .panels { opacity: 0; pointer-events: none; }
.entering .top > * { pointer-events: none; }

/* ---- 上の帯 ---- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--edge);
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { appearance: none; border: 0; padding: 6px 10px; margin-left: -10px; border-radius: 10px; background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; line-height: 0; }
.brand img { height: 36px; width: auto; display: block; }
.cta { display: flex; gap: 10px; }
/* いまの景色の県と季節。ロゴのすぐ右に、街の上へ直接のせる */
.place { margin: 0 auto 0 14px; display: inline-flex; align-items: center; gap: 7px; font: 700 13px var(--sans); color: var(--navy); text-shadow: var(--halo); white-space: nowrap; }
.place .pin { width: 9px; height: 9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--blue); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }
.place-season { font-weight: 500; font-size: 12px; color: var(--text-2); }
@media (max-width: 900px) { .place-season { display: none; } } /* 幅が狭いときは県名だけ */
@media (max-width: 760px) { .place { display: none; } }

.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border-radius: 8px; border: 1px solid transparent;
  font: 700 14px var(--sans); cursor: pointer;
  transition: background-color 0.15s ease, scale 0.16s ease-out;
}
.btn:active { scale: 0.97; }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 8px 20px -8px rgba(0, 92, 255, 0.7); }
.btn.outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn.ghost { background: rgba(255, 255, 255, 0.82); color: var(--navy); border-color: rgba(6, 24, 61, 0.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@media (hover: hover) and (pointer: fine) {
  .btn.primary:hover { background: var(--blue-hover); }
  .btn.outline:hover, .btn.ghost:hover { background: var(--soft); }
}
:is(.btn, .brand, .sound, .menu button, .tabs button, .lab button):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* BGM のオン・オフ。4 本の棒は、鳴っているあいだ上下に動く(ロゴやメニューと同じ「電波バー」の形) */
.sound {
  appearance: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(6, 24, 61, 0.12);
  background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--navy); font: 500 11px var(--mono); letter-spacing: 0.08em; cursor: pointer;
  transition: background-color 0.15s ease, scale 0.16s ease-out;
}
.sound:active { scale: 0.97; }
.sound-state { min-width: 3ch; text-align: left; color: rgba(6, 24, 61, 0.55); }
.sound[data-state="on"] .sound-state { color: var(--blue); font-weight: 700; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; height: 100%; border-radius: 1px; background: rgba(6, 24, 61, 0.3); transform-origin: 50% 100%; transform: scaleY(0.4); }
.eq i:nth-child(2) { transform: scaleY(0.6); }
.eq i:nth-child(3) { transform: scaleY(0.8); }
.eq i:nth-child(4) { transform: scaleY(1); }
.sound[data-state="on"] .eq i { background: var(--blue); animation: eq 0.9s ease-in-out infinite alternate; }
.sound[data-state="on"] .eq i:nth-child(2) { animation-duration: 0.62s; animation-delay: -0.3s; }
.sound[data-state="on"] .eq i:nth-child(3) { animation-duration: 0.78s; animation-delay: -0.55s; }
.sound[data-state="on"] .eq i:nth-child(4) { animation-duration: 0.7s; animation-delay: -0.12s; }
.sound[data-state="loading"] .eq i { animation: eq-wait 0.8s steps(2) infinite; }
.sound[data-state="loading"] .eq i:nth-child(2) { animation-delay: 0.1s; }
.sound[data-state="loading"] .eq i:nth-child(3) { animation-delay: 0.2s; }
.sound[data-state="loading"] .eq i:nth-child(4) { animation-delay: 0.3s; }
@keyframes eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes eq-wait { from { background: rgba(6, 24, 61, 0.3); } to { background: var(--blue); } }
@media (hover: hover) and (pointer: fine) {
  .sound:hover { background: var(--soft); }
}

/* ---- メニュー ---- */
.menu { position: fixed; left: var(--edge); bottom: 30px; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.menu button {
  appearance: none; border: 0; background: none; padding: 5px 0; cursor: pointer;
  display: inline-flex; align-items: baseline; gap: 0.7ch;
  color: var(--navy); font: 700 15px var(--sans); text-shadow: var(--halo);
  transform-origin: 0 50%;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), scale 0.16s ease-out, opacity 0.4s ease-out;
}
.menu .no { width: 2.6ch; font: 500 12px var(--mono); color: var(--text-2); }
.menu .en { font: 500 9.5px var(--mono); letter-spacing: 0.14em; color: var(--text-2); }
/* 電波バー: 選択中と hover で立つ */
.menu button::after {
  content: ""; width: 14px; height: 11px; margin-left: 0.3ch; opacity: 0; transform: translateY(3px);
  background:
    linear-gradient(var(--blue), var(--blue)) 0 100% / 3px 4px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 5px 100% / 3px 7px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 10px 100% / 3px 11px no-repeat;
  transition: opacity 0.12s steps(2), transform 0.2s var(--out);
}
.menu button[aria-current="true"] .jp { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--blue); }
.menu button[aria-current="true"]::after, .menu button:focus-visible::after { opacity: 1; transform: none; }
.menu button:active { scale: 0.97; }
.menu.busy button:not([aria-current="true"]) { opacity: 0.45; }
@media (hover: hover) and (pointer: fine) {
  .menu button:hover { transform: translate(6px); }
  .menu button:hover::after { opacity: 1; transform: none; }
}

/* ---- 中身 ---- */
.panels { position: fixed; left: var(--edge); top: 92px; z-index: 4; width: min(33rem, 42vw); pointer-events: none; }
.panels:has(.panel.wide:not([hidden])) { width: min(40rem, 46vw); }
.panel {
  --in: 0;
  pointer-events: auto;
  max-height: calc(100dvh - 92px - 204px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  padding: 24px 26px 26px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 50px -22px rgba(6, 24, 61, 0.45), inset 0 1px rgba(255, 255, 255, 0.95);
  opacity: var(--in);
  transform-origin: 0 50%;
  transform: perspective(1300px) rotateY(7deg) translateY(calc((1 - var(--in)) * 16px));
  transition: opacity 0.45s var(--out), transform 0.45s var(--out);
}
.panel[hidden] { display: none; }
/* 開くと、中身が上から順に、少しずつ遅れて現れる(順番 --i は src/panels.js が振る) */
@keyframes part-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel.shown [data-part] { animation: part-in 0.55s var(--out) backwards; animation-delay: calc(var(--i) * 60ms + 90ms); }
.panel.leaving { transition: opacity 0.2s cubic-bezier(0.5, 0, 0.75, 0), transform 0.2s cubic-bezier(0.5, 0, 0.75, 0); }

.label { margin: 0 0 10px; display: flex; align-items: baseline; gap: 1ch; font: 700 12px var(--sans); color: var(--blue); letter-spacing: 0.06em; }
.label .no, .rows .no { font: 500 12px var(--mono); color: var(--blue); }
.label i { font: 500 9.5px var(--mono); font-style: normal; letter-spacing: 0.16em; color: var(--muted); }
h1, h2 { margin: 0 0 14px; font-weight: 800; line-height: 1.42; letter-spacing: 0.01em; color: var(--text); word-break: auto-phrase; }
/* 文節の切れ目でだけ折り返す。切れ目の印(<wbr>)は src/phrase.js が入れ、印を入れた要素に data-phrase を付ける。
   keep-all = 文字の間では折らない(印と、句読点のあとでだけ折れる)。anywhere = 1 つの文節が幅より長いときは、はみ出さずに折る。
   上の auto-phrase は Chrome でしか効かないので、どのブラウザでも同じ折れ方になるよう、こちらを優先する */
[data-phrase] { word-break: keep-all !important; overflow-wrap: anywhere; line-break: strict; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
.lead { margin: 0 0 16px; font-size: 14.5px; line-height: 1.9; color: var(--text-2); }
.chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 5px 10px; border-radius: 6px; background: var(--pale); color: var(--navy); font: 700 12px var(--sans); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .btn { min-height: 52px; padding: 0 26px; font-size: 15px; }

.rows { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.rows li { display: grid; grid-template-columns: 3.2ch 1fr; align-items: baseline; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.rows b { display: block; grid-column: 2; color: var(--text); font-size: 14.5px; }
.rows li:has(b) { grid-template-rows: auto auto; }
.rows li:has(b) .no { grid-row: 1 / 3; }

/* 小見出し、補足、しめくくりの一言 */
.sub { margin: 0 0 8px; font: 700 12px var(--sans); letter-spacing: 0.06em; color: var(--blue); }
.aside { margin: -4px 0 12px; font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.bridge { margin: 0; font-weight: 800; font-size: 16px; line-height: 1.6; color: var(--navy); }

/* 次の項目へ進む案内(板のいちばん下) */
.next {
  appearance: none; display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; width: 100%;
  margin-top: 16px; padding: 12px 2px 0; border: 0; border-top: 1px solid var(--border); background: none; cursor: pointer;
  font: 500 12px var(--sans); color: var(--text-2);
}
.next .no { font: 500 12px var(--mono); color: var(--blue); }
.next b { font-size: 13.5px; color: var(--navy); transition: color 0.15s ease; }
.next i { font-style: normal; color: var(--blue); transition: translate 0.2s var(--out); }
.next:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) {
  .next:hover b { color: var(--blue); }
  .next:hover i { translate: 4px 0; }
}

/* 箇条書きを、1 行ずつ順に目立たせる(課題。src/panels.js の cycleRows) */
.rows.cycle li { margin: -4px -8px; padding: 4px 8px; border-radius: 8px; transition: background-color 0.45s ease, color 0.45s ease; }
.rows.cycle li.on { background: var(--pale); color: var(--text); }

/* 並んだ選択肢(機能のタブ、活用シーン)。何もしなくても数秒ごとに次へ進み、そのあいだ、選ばれている選択肢の下を線が走る */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tabs button { position: relative; overflow: hidden; appearance: none; border: 1px solid var(--border); background: #fff; color: var(--text-2); padding: 7px 12px; border-radius: 8px; font: 700 12.5px var(--sans); cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.tabs button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.tabs button[data-auto]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.8); transform-origin: 0 50%; animation: tab-run var(--auto, 5s) linear both; }
@keyframes tab-run { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tab-text { margin: 0 0 12px; font-size: 13.5px; line-height: 1.8; color: var(--text-2); min-height: 3.6em; }
.tab-text b { display: block; font-size: 14px; color: var(--text); }
/* 切り替えるとき、説明文と絵は、いったん薄れてから入れ替わる */
.tab-text, .shot img { transition: opacity 0.17s ease, transform 0.17s ease; }
.swapping .tab-text, .swapping .shot img { opacity: 0; transform: translateY(4px); }
.scenes { margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--border); }
.scenes .tab-text { min-height: 3.6em; margin-bottom: 0; }

/* ご利用開始までの流れ(料金): 6 つの段階。選ばれている段階が青くなり、済んだ段階は青いふちになる */
.flow { margin: 0 0 16px; }
.steps { position: relative; display: flex; justify-content: space-between; align-items: center; margin: 0 6px 10px; }
.steps::before { content: ""; position: absolute; left: 14px; right: 14px; top: 50%; height: 2px; translate: 0 -50%; background: var(--border); }
.steps button {
  position: relative; appearance: none; flex: none; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 2px solid var(--border); background: #fff; color: var(--text-2); font: 700 12.5px var(--mono); cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, scale 0.25s var(--out);
}
.steps button:has(~ button[aria-selected="true"]) { border-color: var(--blue); color: var(--blue); }
.steps button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; scale: 1.14; box-shadow: 0 6px 14px -6px rgba(0, 92, 255, 0.7); }
.steps button[data-auto]::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(0, 92, 255, 0.45); animation: step-pulse 1.3s ease-out infinite; }
@keyframes step-pulse { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(1.5); opacity: 0; } }
.steps button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.flow .tab-text { min-height: 3.4em; margin: 0; }
[data-panel="pricing"] .notice { margin: 16px 0 0; }
.shot { position: relative; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: 0 12px 32px rgba(6, 24, 61, 0.12); }
/* 動画を止める・再生するボタン(動画の右下。印は、止める = 縦棒 2 本、再生 = 三角) */
.shot-toggle {
  position: absolute; right: 8px; bottom: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 999px; background: rgba(6, 24, 61, 0.74); color: #fff; font: 600 11px/1 var(--sans); letter-spacing: 0.06em;
  cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background-color 0.2s ease;
}
.shot-toggle[hidden] { display: none; }
.shot-toggle::after { content: ''; position: absolute; inset: -8px; } /* 指で押しやすいよう、押せる範囲を広げる */
.shot-toggle i { box-sizing: border-box; width: 8px; height: 9px; border-inline: 3px solid currentColor; }
.shot-toggle[data-state="paused"] i { width: 0; height: 0; border: 0 solid transparent; border-width: 5px 0 5px 8px; border-left-color: currentColor; }
.shot-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) {
  .shot-toggle:hover { background: rgba(0, 76, 210, 0.9); }
}
/* 絵の枠は、いつも同じ大きさにする(自動で切り替わるたびに、板の高さが変わって下の案内が動かないように)。絵は切らずに、枠の中に収める */
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 815; max-height: 36vh; object-fit: contain; object-position: top; }

.price { display: flex; align-items: baseline; gap: 8px; font: 800 60px/1 var(--sans); letter-spacing: -0.01em; color: var(--navy); margin-bottom: 16px; }
.price small { font-size: 16px; font-weight: 700; color: var(--text-2); }
.price .num { display: inline-block; min-width: 4.4ch; text-align: right; font-variant-numeric: tabular-nums; } /* 数え上がるあいだ、幅が変わらないように */
.zeros { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zeros li { padding: 12px 10px; border-radius: 8px; background: var(--soft); border: 1px solid var(--border); text-align: center; }
.zeros span { display: block; font-size: 12px; color: var(--text-2); }
.zeros b { font-size: 20px; color: var(--blue); }
.notice { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; background: #fff7e6; border: 1px solid #f7c96b; font-size: 12px; line-height: 1.8; color: var(--text-2); }

form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
form label { display: block; font: 700 12px var(--sans); color: var(--text-2); }
form label :is(input, select, textarea) { display: block; margin-top: 4px; }
[data-panel="contact"] h2 { font-size: 20px; margin-bottom: 12px; }
form em { font-style: normal; color: var(--blue); }
form .full { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border); background: #fff;
  color: var(--text); font: 500 14px/1.5 var(--sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 4.2em; }
:is(input, select, textarea):focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 92, 255, 0.18); }
.bad :is(input, select, textarea) { border-color: #e2536b; }
.send { display: flex; align-items: center; gap: 14px; }
.btn[disabled] { opacity: 0.6; cursor: progress; box-shadow: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sent { padding: 6px 0 2px; outline: none; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.sent p { margin: 0; }
.sent .sent-title { margin-bottom: 4px; font-weight: 700; font-size: 18px; color: var(--navy); }
.again { appearance: none; margin-top: 14px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.status { margin: 0; font-size: 12px; color: var(--text-2); }

/* ---- 下の注意書き ---- */
.foot { position: fixed; right: var(--edge); bottom: 16px; z-index: 5; text-align: right; font-size: 11px; line-height: 1.7; color: var(--navy); text-shadow: var(--halo); }
.foot p { margin: 0; }
.foot a { color: inherit; text-underline-offset: 3px; }

/* ---- 試作用 ---- */
.lab { position: fixed; right: var(--edge); bottom: 64px; z-index: 6; display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 500 11px var(--mono); color: var(--text-2); }
.lab button { appearance: none; border: 1px solid var(--border); background: #fff; border-radius: 5px; padding: 3px 8px; font: inherit; color: var(--text-2); cursor: pointer; }
.lab button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.lab .sep { width: 1px; height: 14px; background: var(--border); margin: 0 5px; }

.noscript { position: fixed; inset: auto 24px 24px; z-index: 30; margin: 0; padding: 14px; border-radius: 8px; background: #fff; font-size: 14px; line-height: 1.8; }

/* ---- 横長で、高さが低い画面(小さめのノートPC、ウィンドウを低くしたとき) ----
   メニューを横一列にして、縦の場所を中身にゆずる。料金のボタンや送信ボタンが枠の下に隠れないようにする。 */
@media (min-width: 641px) and (orientation: landscape) and (max-height: 760px) {
  .menu { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; bottom: 16px; max-width: 62vw; }
  .menu .en { display: none; }
  .menu button { font-size: 14px; }
  .panels { top: 84px; }
  .panel { max-height: calc(100dvh - 84px - 60px); padding: 20px 24px 22px; }
  h1 { font-size: 30px; margin-bottom: 12px; }
  h2 { font-size: 22px; margin-bottom: 12px; }
  .lead { margin-bottom: 14px; }
  .price { font-size: 52px; margin-bottom: 12px; }
  .zeros, .notice, .rows { margin-bottom: 12px; }
  .zeros li { padding: 9px 10px; }
  .notice { padding: 10px 12px; line-height: 1.7; }
  .actions .btn { min-height: 46px; }
  .shot img { max-height: 32vh; }
  form { gap: 6px 12px; }
  textarea { min-height: 3.4em; }
  .foot { bottom: 12px; }
  .lab { bottom: 52px; }
}

/* ---- スマホの横向きなど、さらに低い画面 ---- */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --edge: 16px; }
  .top { padding: 8px var(--edge); }
  .brand img { height: 26px; }
  .cta .btn { min-height: 36px; padding: 0 14px; font-size: 13px; }
  .sound { min-height: 36px; padding: 0 10px; }
  .panels { top: 52px; width: min(31rem, 54vw); }
  .panels:has(.panel.wide:not([hidden])) { top: 52px; width: min(31rem, 54vw); } /* :has() を知らないブラウザが上の決まりまで捨てないよう、分けて書く */
  .panel { max-height: calc(100dvh - 52px - 44px); padding: 14px 16px 16px; }
  h1 { font-size: 21px; margin-bottom: 8px; }
  h2, [data-panel="contact"] h2 { font-size: 17px; margin-bottom: 8px; }
  .lead { font-size: 12.5px; line-height: 1.7; margin-bottom: 10px; }
  .rows { gap: 6px; margin-bottom: 10px; }
  .rows li { font-size: 12.5px; }
  .rows b { font-size: 13px; }
  .chips { margin-bottom: 10px; }
  .chips li { font-size: 11px; padding: 4px 8px; }
  .actions .btn { min-height: 40px; padding: 0 16px; font-size: 13.5px; }
  .price { font-size: 38px; margin-bottom: 10px; }
  .zeros li { padding: 6px 8px; }
  .zeros b { font-size: 17px; }
  .notice { font-size: 11px; }
  .tab-text { min-height: 0; margin-bottom: 8px; font-size: 12.5px; }
  .shot img { max-height: 34vh; }
  input, select, textarea { padding: 6px 9px; font-size: 16px; } /* 16px: iPhone が入力のときに画面を勝手に拡大しない大きさ */
  .menu { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; bottom: 8px; max-width: 62vw; }
  .menu .en { display: none; }
  .menu button { padding: 3px 0; font-size: 12.5px; }
  .menu .no { width: auto; font-size: 10px; }
  .foot { bottom: 6px; font-size: 9.5px; line-height: 1.5; }
  .lab { display: none; }
}

/* ---- スマホ・縦長(横向きで高さが低いときは、上の「さらに低い画面」のほうを使う) ---- */
/* 横長で、幅も狭い画面(小さく開いたウィンドウ、小さなスマホの横向き):
   メニューを 1 行に並べると、右下の注意書きにぶつかる。番号を省いて短くし、注意書きの手前で止める。 */
@media (min-width: 641px) and (orientation: landscape) and (max-height: 760px) and (max-width: 960px) {
  .menu { gap: 2px 12px; max-width: calc(100vw - var(--edge) * 2 - 340px); }
  .menu .no { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 800px) {
  .menu { gap: 2px 12px; max-width: calc(100vw - var(--edge) * 2 - 290px); }
  .menu .no { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 620px) {
  .menu { max-width: calc(100vw - var(--edge) * 2 - 220px); }
  .foot { max-width: 205px; } /* 注意書きを折り返して、幅を取らないようにする */
}
/* さらに狭いとき: 選択中の印(電波バー)も省く。いまのセクションは、下線で分かる */
@media (min-width: 641px) and (orientation: landscape) and (max-height: 760px) and (max-width: 760px) {
  .menu { gap: 2px 10px; }
  .menu button::after { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 700px) {
  .menu button::after { display: none; }
}
@media (orientation: portrait), (max-width: 640px) and (min-height: 521px) {
  :root { --edge: 14px; }
  .top { padding: 10px var(--edge); }
  .brand img { height: 28px; }
  .cta .ghost { display: none; }
  .place { display: none; } /* スマホ幅では、置く場所がないので出さない */
  .cta .btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
  .sound { min-height: 40px; padding: 0 10px; gap: 6px; }
  .sound-name { display: none; }
  .panels { left: var(--edge); right: var(--edge); top: 64px; width: auto; }
  .panels:has(.panel.wide:not([hidden])) { left: var(--edge); right: var(--edge); top: 64px; width: auto; } /* :has() を知らないブラウザが上の決まりまで捨てないよう、分けて書く */
  .panel { max-height: 46dvh; padding: 16px 16px 18px; transform: translateY(calc((1 - var(--in)) * 14px)); }
  /* 問い合わせは入力が主役。枠を広げて、一度に見える欄を増やす(主役は下に少し隠れる)。
     料金も、いちばん下の「資料請求する」ボタンが隠れないように広げる。 */
  .panel[data-panel="contact"], .panel[data-panel="pricing"] { max-height: 62dvh; }
  h1 { font-size: 24px; }
  h2 { font-size: 19px; margin-bottom: 10px; }
  .lead { font-size: 13px; line-height: 1.75; margin-bottom: 10px; }
  .actions .btn { min-height: 46px; flex: 1 1 0; padding: 0 10px; font-size: 14px; }
  .chips { margin-bottom: 12px; }
  .chips li { font-size: 11px; padding: 4px 8px; }
  .price { font-size: 46px; }
  .shot img { max-height: 22vh; }
  /* 料金: ご利用開始までの流れは詰めて、説明は段階の名前と同じ行に続ける(「資料請求する」ボタンが板の下に隠れないように) */
  .flow { margin-bottom: 12px; }
  .flow .sub { margin-bottom: 6px; }
  .steps { margin-bottom: 6px; }
  .steps button { width: 26px; height: 26px; font-size: 11.5px; }
  .flow .tab-text { min-height: 3.2em; font-size: 12px; line-height: 1.6; }
  .flow .tab-text b { display: inline; margin-right: 0.7em; font-size: 12.5px; }
  .next { margin-top: 12px; padding-top: 10px; }
  form { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px; }
  /* メニューは下のタブに */
  .menu { left: 8px; right: 8px; bottom: calc(42px + env(safe-area-inset-bottom, 0px)); flex-direction: row; align-items: stretch; gap: 0; padding: 5px 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 24px -12px rgba(6, 24, 61, 0.4); }
  .menu button { flex: 1 1 0; flex-direction: column; align-items: center; gap: 1px; font-size: 12px; padding: 4px 0; text-shadow: none; white-space: nowrap; }
  .menu .no { width: auto; font-size: 9.5px; }
  .menu .en { display: none; }
  .menu button::after { display: none; }
  .menu button[aria-current="true"] { color: var(--blue); }
  .menu button[aria-current="true"] .no { color: var(--blue); }
  .foot { left: var(--edge); bottom: calc(5px + env(safe-area-inset-bottom, 0px)); font-size: 10px; line-height: 1.6; text-align: center; }
  .lab { display: none; } /* スマホ幅では URL の ?v= で切り替える */
}

@media (prefers-reduced-motion: reduce) {
  .panel, .menu button, .btn, #boot, .gate-dots, .tab-text, .shot img, .rows.cycle li, .steps button, .tabs button { transition: none; }
  .panel.shown [data-part], .tabs button[data-auto]::after, .steps button[data-auto]::after { animation: none; }
  /* 音の確認: 動きはすべて止めて、出来上がりの形だけ見せる */
  .gate *, .gate-dots i, #boot.asking .bars, #boot.asking .boot-line { animation: none !important; }
  .gate-rings { display: none; }
  .gate-eq i { transform: scaleY(calc(0.55 * var(--s))); }
  .gate [data-sound="on"] .eq i { transform: scaleY(0.8); }
  .gate [data-sound="on"] .eq i:nth-child(odd) { transform: scaleY(0.5); }
  .sound[data-state="on"] .eq i { animation: none; transform: scaleY(0.8); }
  .sound[data-state="on"] .eq i:nth-child(odd) { transform: scaleY(0.5); }
}

/* ---- 夜(見ている人の時計で 18 時〜翌 6 時。index.html の冒頭で <html> に night が付く) ----
   3D の街が夜になるので、街の上に直接のせている文字を、明るい色と暗いふちどりに替える。
   白い板の上の文字(説明のパネル、スマホ幅の下のタブ)は、昼と同じまま。 */
.night:not(.static), .night:not(.static) body { background: #18223f; } /* 3D の霧の色と揃える */
.night:not(.static) { --halo: 0 0 2px rgba(5, 12, 32, 0.95), 0 0 10px rgba(5, 12, 32, 0.8), 0 0 22px rgba(5, 12, 32, 0.6); }
.night:not(.static) .foot, .night:not(.static) .place { color: #eef3ff; }
.night:not(.static) .place-season { color: #b7c7e8; }
.night:not(.static) .place .pin { background: #7fb0ff; box-shadow: 0 0 0 2px rgba(5, 12, 32, 0.9); }
/* 読み込み画面と入場の地図も、夜は濃い紺の地にする(地図の色は src/intro.js) */
.night:not(.static) #boot { background: #0b132d; }
.night:not(.static) .boot-line, .night:not(.static) .intro-skip, .night:not(.static) .gate-note { color: #b7c7e8; }
.night:not(.static) .gate-title { color: #eef3ff; }
/* 夜: ロゴは濃い色なので、上の帯と同じく白い板にのせる(ロゴそのものは変えない)。柴犬は、後ろをほんのり明るくして浮かせる */
.night:not(.static) .gate-logo { box-sizing: content-box; padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.94); }
.night:not(.static) .gate-mascot { filter: drop-shadow(0 0 22px rgba(127, 176, 255, 0.3)); }
.night:not(.static) .gate { --ink: #7fb0ff; }
.night:not(.static) #boot { --dot: rgba(127, 176, 255, 0.15); --dot-far: rgba(160, 196, 255, 0.5); }
.night:not(.static) .gate .btn.outline { background: rgba(255, 255, 255, 0.06); color: #eef3ff; border-color: rgba(183, 199, 232, 0.55); }
.night:not(.static) .gate .btn:focus-visible { outline-color: #7fb0ff; }
@media (hover: hover) and (pointer: fine) {
  .night:not(.static) .gate .btn.outline:hover { background: rgba(255, 255, 255, 0.14); }
}
.night:not(.static) .bars i { background: rgba(127, 176, 255, 0.2); }
.night:not(.static) .bars i.on { background: #7fb0ff; }
.night:not(.static) .intro-line { color: #eef3ff; }
.night:not(.static) .intro-skip:hover, .night:not(.static) .intro-skip:focus-visible { background: rgba(255, 255, 255, 0.14); color: #fff; }
@media (orientation: landscape) and (min-width: 641px), (orientation: landscape) and (max-height: 520px) {
  .night:not(.static) .menu button { color: #f3f7ff; }
  .night:not(.static) .menu .no, .night:not(.static) .menu .en { color: #b7c7e8; }
  .night:not(.static) .menu button::after {
    background:
      linear-gradient(#7fb0ff, #7fb0ff) 0 100% / 3px 4px no-repeat,
      linear-gradient(#7fb0ff, #7fb0ff) 5px 100% / 3px 7px no-repeat,
      linear-gradient(#7fb0ff, #7fb0ff) 10px 100% / 3px 11px no-repeat;
  }
  .night:not(.static) .menu button[aria-current="true"] .jp { text-decoration-color: #7fb0ff; }
}

/* ---- 共有用の画像(assets/og.jpg)を撮るときの表示(?og=1。作り方は tools/make_og.sh) ----
   操作のための部品(右上のボタン、地名、メニュー、「次へ」、下の注記)を隠して、ロゴ・見出し・説明・柴犬だけにする */
.og .top .cta, .og .place, .og .menu, .og .foot, .og .next, .og .lab { display: none !important; }

/* ---- 3D が使えない端末: 同じ内容を普通のページとして見せる ---- */
.static, .static body { overflow: auto; height: auto; background: var(--soft); }
.static #stage, .static .menu, .static .lab, .static #intro, .static .intro-line, .static .intro-skip, .static .sound, .static .place { display: none; }
.static .top { position: sticky; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.static .panels { position: static; width: auto; max-width: 44rem; margin: 0 auto; padding: 24px var(--edge) 120px; display: grid; gap: 16px; }
.static .panel { max-height: none; transform: none; scroll-margin-top: 96px; } /* ボタンでその項目まで送ったとき、上の帯の下に隠れないように */
.static .foot { position: static; padding: 0 var(--edge) 24px; text-align: center; text-shadow: none; }
