/* 説明パネルの新しい見た目(2026-11-20)。styles.css のあとに読み込み、3D で見せているとき(.static でないとき)だけ効く。
   3D が動かない端末向けの普通のページ(.static)は、styles.css の白い板のまま。

   もとのデザインは art/panel-design にある(ChatGPT の画像生成で作った案。round1 の b-glass-* と round2 の b2-*)。
   ユーザーの指示: 「パネルのデザインがダサい」「どの項目でも同じ場所にあるのが捻りがない」→ B 案(濃紺のガラス)を採用、
   「通信系の雰囲気が大事」「動的要素多めに」「パネル内は実際の画面を使えるところは使用して」。

   作り:
   ・濃紺の半透明のガラス。ふちが青く光り、角を落としてある(corner-shape が使えないブラウザでは、丸い角になる)
   ・広い横長の画面(下の「舞台の配置」)では、板 1 枚にまとめず、見出し・札・帯を項目ごとに違う場所へ置く。
     柴犬の立ち位置も項目ごとに変える(src/rig.js の SIDE)。札と柴犬は「通信の線」で結ぶ(src/links.js)
   ・それより狭い画面(スマホ、小さな窓)では、ガラスの板 1 枚にまとめて、これまでと同じ場所に出す
   ・通信らしい動き: 線を走る光、電波バー、波形、ふちを走る光、ゆっくり浮く札。「動きを減らす」設定では止める */

/* ---------------------------------------------------------------------------
   共通: 色と、ガラスの板
   --------------------------------------------------------------------------- */
html:not(.static) {
  --g-ink: #f3f7ff; /* 文字 */
  --g-ink2: #c3d2f3; /* 説明の文字 */
  --g-dim: #8db4ff; /* 小さな見出し、番号 */
  --g-edge: rgba(142, 188, 255, 0.8); /* ふちの線 */
  --g-fill: linear-gradient(165deg, rgba(18, 42, 104, 0.74), rgba(6, 15, 44, 0.74));
  --g-hot: linear-gradient(165deg, rgba(0, 100, 255, 0.94), rgba(0, 62, 206, 0.9)); /* 選ばれている・目立たせている札 */
  --g-glow: 0 0 0 1px rgba(0, 70, 220, 0.3), 0 0 22px rgba(44, 122, 255, 0.5), inset 0 0 20px rgba(70, 140, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --g-cut: 14px; /* 角を落とす大きさ */
}
/* 街を少し沈めて、白い文字と青い光が映えるようにする幕(3D の上、文字の下) */
.scrim { display: none; }
html:not(.static) .scrim {
  display: block; position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 14, 44, 0.46) 0%, rgba(5, 14, 44, 0.14) 38%, rgba(5, 14, 44, 0.1) 62%, rgba(5, 14, 44, 0.4) 100%);
  transition: opacity 0.7s ease;
}
html:not(.static).night .scrim { opacity: 0.55; } /* 夜は街がもう暗いので、薄く */
html: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); }
html:not(.static) :is(.foot, .place) { color: #eef3ff; }
html:not(.static) .place-season { color: #b7c7e8; }
html:not(.static) .place .pin { background: #7fb0ff; box-shadow: 0 0 0 2px rgba(5, 12, 32, 0.9); }
@media (orientation: landscape) and (min-width: 641px), (orientation: landscape) and (max-height: 520px) {
  html:not(.static) .menu button { color: #f3f7ff; }
  html:not(.static) .menu :is(.no, .en) { color: #b7c7e8; }
  html: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;
  }
  html:not(.static) .menu button[aria-current="true"] .jp { text-decoration-color: #7fb0ff; }
}
html:not(.static).entering .scrim { opacity: 0; } /* 入場のあいだは、幕を出さない(夜の決まりより後ろに、同じ強さで書く。弱いと、夜だけ幕が残る) */

html:not(.static) .panel {
  border: 1px solid var(--g-edge); border-radius: var(--g-cut); corner-shape: bevel;
  background: var(--g-fill); box-shadow: var(--g-glow), 0 30px 60px -30px rgba(0, 8, 30, 0.85);
  -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  color: var(--g-ink);
  transform: translateY(calc((1 - var(--in)) * 16px));
}
/* 板の中の文字と部品 */
html:not(.static) .panel :is(h1, h2) { color: #fff; text-shadow: 0 2px 22px rgba(4, 12, 44, 0.7); }
html:not(.static) .panel .label { color: var(--g-dim); }
html:not(.static) .panel :is(.label .no, .rows .no, .next .no) { color: var(--g-dim); }
html:not(.static) .panel .label i { color: rgba(190, 212, 255, 0.62); }
html:not(.static) .panel :is(.lead, .rows li, .tab-text, .aside, .gate-note) { color: var(--g-ink2); }
html:not(.static) .panel :is(.rows b, .tab-text b, .bridge) { color: #fff; }
html:not(.static) .panel .sub { color: var(--g-dim); }
html:not(.static) .panel .chips li { background: rgba(120, 172, 255, 0.14); border: 1px solid rgba(142, 188, 255, 0.5); color: #e6eeff; }
html:not(.static) .panel .rows.cycle li.on { background: rgba(0, 98, 255, 0.4); color: #fff; }
/* ボタン: 主なボタンは青く光り、もう一方は濃紺のガラス */
html:not(.static) .panel .btn.primary { background: linear-gradient(180deg, #1470ff, #0052f0); border-color: #9cc3ff; box-shadow: 0 0 0 1px rgba(0, 70, 220, 0.5), 0 0 26px rgba(44, 122, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
html:not(.static) .panel .btn.outline { background: rgba(8, 20, 60, 0.72); color: #fff; border-color: var(--g-edge); box-shadow: 0 0 18px rgba(44, 122, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16); }
@media (hover: hover) and (pointer: fine) {
  html:not(.static) .panel .btn.primary:hover { background: linear-gradient(180deg, #2a80ff, #0a5cff); }
  html:not(.static) .panel .btn.outline:hover { background: rgba(20, 44, 110, 0.8); }
}
html:not(.static) .panel :is(.btn, .next, .tabs button, .steps button):focus-visible { outline-color: #b9d4ff; }
/* 選択肢(機能、活用シーン) */
html:not(.static) .panel .tabs button { background: rgba(8, 20, 60, 0.6); border-color: rgba(142, 188, 255, 0.5); color: #dbe6ff; }
html:not(.static) .panel .tabs button[aria-selected="true"] { background: var(--g-hot); border-color: #bcd6ff; color: #fff; box-shadow: 0 0 20px rgba(44, 122, 255, 0.7); }
html:not(.static) .panel .scenes { border-top-color: rgba(142, 188, 255, 0.3); }
/* 実際の画面を見せる枠 */
html:not(.static) .panel .shot { border-color: var(--g-edge); background: #f4f8ff; box-shadow: 0 0 24px rgba(44, 122, 255, 0.45); }
.shot video { display: block; width: 100%; height: auto; aspect-ratio: 1400 / 815; max-height: 36vh; object-fit: contain; object-position: top; background: #fff; }
/* 料金 */
html:not(.static) .panel .price { color: #fff; text-shadow: 0 0 34px rgba(60, 132, 255, 0.6); }
html:not(.static) .panel .price small { color: #dbe6ff; }
html:not(.static) .panel .zeros li { background: rgba(8, 20, 60, 0.5); border-color: rgba(142, 188, 255, 0.4); }
html:not(.static) .panel .zeros span { color: var(--g-ink2); }
html:not(.static) .panel .zeros b { color: #fff; }
.zeros b small { font-size: 0.6em; margin-left: 0.1em; }
html:not(.static) .panel .steps::before { background: rgba(142, 188, 255, 0.4); }
html:not(.static) .panel .steps button { background: #0a1a4c; border-color: rgba(142, 188, 255, 0.6); color: #dbe6ff; }
html:not(.static) .panel .steps button:has(~ button[aria-selected="true"]) { border-color: #8db4ff; color: #cfe0ff; }
html:not(.static) .panel .steps button[aria-selected="true"] { background: var(--g-hot); border-color: #cfe0ff; color: #fff; box-shadow: 0 0 20px rgba(44, 122, 255, 0.9); }
html:not(.static) .panel .steps button[data-auto]::after { border-color: rgba(150, 195, 255, 0.7); }
html:not(.static) .panel .notice { background: rgba(8, 20, 60, 0.45); border-color: rgba(142, 188, 255, 0.3); color: var(--g-ink2); }
/* 入力欄 */
html:not(.static) .panel form label { color: #e6eeff; }
html:not(.static) .panel form em { color: var(--g-dim); }
html:not(.static) .panel :is(input, select, textarea) { background: rgba(4, 12, 40, 0.62); border-color: rgba(160, 200, 255, 0.62); color: #fff; color-scheme: dark; }
html:not(.static) .panel :is(input, textarea)::placeholder { color: rgba(190, 212, 255, 0.5); }
html:not(.static) .panel :is(input, select, textarea):focus { border-color: #bcd6ff; box-shadow: 0 0 0 3px rgba(60, 132, 255, 0.4), 0 0 18px rgba(60, 132, 255, 0.55); }
html:not(.static) .panel .bad :is(input, select, textarea) { border-color: #ff8fa3; }
html:not(.static) .panel .sent { color: var(--g-ink2); }
html:not(.static) .panel .status { color: #ffd3da; font-size: 13px; font-weight: 600; } /* 入力の不足や、送れなかった知らせ。暗い板の上でも読めるように */
html:not(.static) .panel .shot-toggle { border-color: rgba(170, 206, 255, 0.7); background: rgba(4, 14, 46, 0.78); }
html:not(.static) .panel .shot-toggle:focus-visible { outline-color: #bcd6ff; }
html:not(.static) .panel .sent .sent-title { color: #fff; }
html:not(.static) .panel .again { color: var(--g-dim); }
/* 次の項目へ */
html:not(.static) .panel .next { border-top-color: rgba(142, 188, 255, 0.3); color: var(--g-ink2); }
html:not(.static) .panel .next b { color: #fff; }
html:not(.static) .panel .next i { color: var(--g-dim); }
/* 値札の飾り(広い画面のときだけ使う) */
.tag-glass, .tag-edge { display: none; }
.tag-foot { display: contents; }
/* トップの見出しの 2 行(1 行ずつ、行を分ける) */
.line { display: block; }

/* ---- 通信らしい小物 ---- */
/* 電波バー: 4 本が順にともる。見出しや札の端に置く(疑似要素で描く。使う側で ::after などに .sig の中身を指定) */
@keyframes sig-run { 0%, 100% { opacity: 0.3; } 30%, 60% { opacity: 1; } }
.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 1em; flex: none; }
.sig i { width: 0.2em; border-radius: 1px; background: var(--g-dim, #8db4ff); opacity: 0.3; animation: sig-run 2.2s ease-in-out infinite; }
.sig i:nth-child(1) { height: 30%; }
.sig i:nth-child(2) { height: 53%; animation-delay: 0.18s; }
.sig i:nth-child(3) { height: 76%; animation-delay: 0.36s; }
.sig i:nth-child(4) { height: 100%; animation-delay: 0.54s; }
/* 波形: 細い棒が、音声や電波の強さのように上下する */
@keyframes wave-run { from { transform: scaleY(0.18); } to { transform: scaleY(1); } }
.wave { display: none; align-items: center; gap: 3px; height: 28px; pointer-events: none; }
.wave i { width: 2px; height: 100%; border-radius: 1px; background: linear-gradient(180deg, #cfe0ff, #4d8dff); animation: wave-run var(--d, 0.7s) ease-in-out var(--o, 0s) infinite alternate; }
/* 棒ごとに、高さ・速さ・ずれを変えて、そろって動かないようにする */
.wave i:nth-child(3n) { --d: 0.52s; --o: -0.2s; }
.wave i:nth-child(3n + 1) { --d: 0.88s; --o: -0.45s; }
.wave i:nth-child(5n) { --d: 0.63s; --o: -0.6s; }
.wave i:nth-child(7n) { --d: 1.05s; --o: -0.15s; }
.wave i:nth-child(4n) { height: 62%; }
.wave i:nth-child(6n + 1) { height: 36%; }
.wave i:nth-child(9n + 2) { height: 80%; }
/* 電波バーと波形は、札や帯として見せるときの飾り。箇条書きの中や、普通のページ(.static)では出さない */
.rows .sig, .static .sig, .static .wave { display: none; }

/* ---- 通信の線(src/links.js が、札と柴犬を結ぶ線を描く) ---- */
.links { display: none; }
html:not(.static) .links { display: block; position: fixed; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.links g { opacity: 0; transition: opacity 0.45s ease; }
.links g.on { opacity: 1; }
.links .wire { fill: none; stroke: rgba(160, 202, 255, 0.75); stroke-width: 1.4; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.25s, stroke 0.3s ease; }
.links g.on .wire { stroke-dashoffset: 0; }
/* 線の上を、光の粒が柴犬へ向かって走る */
@keyframes link-flow { from { stroke-dashoffset: 104; } to { stroke-dashoffset: 0; } }
.links .pulse { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 4 100; stroke-dashoffset: 104; filter: drop-shadow(0 0 5px #6fa8ff); opacity: 0; }
.links g.on .pulse { opacity: 1; animation: link-flow var(--t, 2.6s) linear var(--o, 0s) infinite; }
.links .dot { fill: #dbe9ff; filter: drop-shadow(0 0 6px #4d8dff); }
@keyframes ring-run { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.4); opacity: 0; } }
.links .ring { fill: none; stroke: #a8ccff; stroke-width: 1.2; transform-box: fill-box; transform-origin: center; animation: ring-run 2.2s ease-out var(--o, 0s) infinite; }
.links g.hot .wire { stroke: #fff; }
.links g.hot .pulse { animation-duration: 1.1s; }
/* 電波の弧(スマホや封筒の横で、3 本が順に広がる) */
@keyframes arc-run { 0%, 100% { opacity: 0.15; } 40% { opacity: 1; } }
.links .arc { fill: none; stroke: #cfe2ff; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 5px #4d8dff); animation: arc-run 1.8s ease-in-out infinite; }
.links .arc:nth-of-type(2) { animation-delay: 0.22s; }
.links .arc:nth-of-type(3) { animation-delay: 0.44s; }

/* ---------------------------------------------------------------------------
   舞台の配置: 広い横長の画面。板 1 枚にまとめず、項目ごとに違う場所へ置く
   (位置は、画面に対する割合。もとのデザインの絵から拾った)
   --------------------------------------------------------------------------- */
/* ここから: 項目ごとの配置にするとき(広い横長の画面と、スマホの縦長の画面)に共通の決まり */
@media (orientation: landscape) and (min-width: 1100px) and (min-height: 600px), (orientation: portrait) and (max-width: 520px) and (min-height: 600px) {
  html:not(.static) .panels { left: 0; top: 0; width: 100%; height: 100%; }
  html:not(.static) .panels:has(.panel.wide:not([hidden])) { left: 0; top: 0; width: 100%; height: 100%; } /* :has() を知らないブラウザが上の決まりまで捨てないよう、分けて書く */
  html:not(.static) .panel.stage {
    position: absolute; inset: 0; max-height: none; overflow: visible; padding: 0; pointer-events: none;
    border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    transform: none; opacity: 1; transition: none;
  }
  /* 板そのものは透明なので、出入りは中の部品でつける(現れるときは styles.css の part-in、去るときはここ) */
  html:not(.static) .panel.stage > * { pointer-events: auto; transition: opacity 0.2s ease; }
  html:not(.static) .panel.stage:not(.shown) > *, html:not(.static) .panel.stage.leaving > * { opacity: 0; }
  html:not(.static) .panel.stage.shown [data-part] { animation-duration: 0.6s; animation-delay: calc(var(--i) * 70ms + 60ms); }

  html:not(.static) .panel.stage :where(.rows > li, .lead, .tab-text, .aside) { word-break: auto-phrase; }
  /* ガラスの部品 */
  html:not(.static) .panel.stage :where(.bar.glass, .rows > li, .bridge, .next, .flow, .intro, .line, .scenes, form, .sent, .shot, .tabs button) {
    border: 1px solid var(--g-edge); border-radius: var(--g-cut); corner-shape: bevel;
    background: var(--g-fill); box-shadow: var(--g-glow);
    -webkit-backdrop-filter: blur(10px) saturate(1.5); backdrop-filter: blur(10px) saturate(1.5);
    color: var(--g-ink);
  }
  /* ふちを、光がときどき走る */
  @keyframes edge-run { 0%, 78% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
  html:not(.static) .panel.stage :where(.rows > li, .bar.glass, .bridge, .intro, .flow, .scenes)::before {
    content: ""; position: absolute; left: 0; top: 0; width: 38%; height: 100%; pointer-events: none;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(190, 220, 255, 0.16) 50%, rgba(255, 255, 255, 0) 100%);
    animation: edge-run 5.5s ease-in-out calc(var(--i, 0) * 0.5s) infinite;
  }
  html:not(.static) .panel.stage :where(.rows > li, .bar.glass, .bridge, .intro, .flow, .scenes) { overflow: hidden; }
  /* 札は、ゆっくり浮き沈みする(札ごとに、ずらして) */
  @keyframes float { from { translate: 0 -3px; } to { translate: 0 3px; } }
  html:not(.static) .panel.stage :where(.rows > li) { animation: float 3.4s ease-in-out calc(var(--i, 0) * -0.7s) infinite alternate; }
  html:not(.static) .panel.stage.shown .rows > li[data-part] { animation: part-in 0.6s var(--out) calc(var(--i) * 70ms + 60ms) backwards, float 3.4s ease-in-out calc(var(--i, 0) * -0.7s) infinite alternate; }

  /* 小さな見出し(01 課題 PROBLEM ————— 電波バー) */
  html:not(.static) .panel.stage .label { align-items: center; gap: 1.1ch; margin: 0; font-size: clamp(12px, calc(1.12 * var(--u, 1px)), 19px); letter-spacing: 0.1em; color: #e6eeff; }
  html:not(.static) .panel.stage .label .no { font: 500 1em var(--mono); color: #e6eeff; }
  html:not(.static) .panel.stage .label i { font-size: 0.72em; letter-spacing: 0.24em; }
  html:not(.static) .panel.stage .label::after { content: ""; order: 1; flex: 1; height: 1px; min-width: 40px; background: linear-gradient(90deg, rgba(170, 206, 255, 0.85), rgba(170, 206, 255, 0.15)); }
  html:not(.static) .panel.stage .label .sig { order: 2; font-size: 1.15em; }
  html:not(.static) .panel.stage .label .sig i { background: #cfe0ff; }
}

/* ここから: 広い横長の画面だけの決まり(部品を、画面に対する割合で決めた場所に置く) */
@media (orientation: landscape) and (min-width: 1100px) and (min-height: 600px) {
  /* 文字の大きさの単位: 画面の幅の 1% と、高さの 1.838%(= 16:8.7 の画面で幅の 1% と同じ)の、小さいほう */
  html:not(.static) .panels { --u: min(1vw, 1.838vh); }
  html:not(.static) .panel.stage :where(.bar, .rows > li, .bridge, .next, .flow, .intro, .line, .scenes, form, .sent, .shot, .tabs, .tab-text, .actions, .label, .tag, .notice) { position: absolute; margin: 0; }
  html:not(.static) .panel.stage :where(.bar, .tag) :where(.label, .aside) { position: static; }
  /* 次の項目へ: 右下の小さな札 */
  html:not(.static) .panel.stage .next { right: 2.2%; bottom: 11.5vh; left: auto; width: auto; padding: 1.2vh 1.5vw; border-top: 1px solid var(--g-edge); gap: 0.8ch; font-size: clamp(12px, calc(1 * var(--u)), 16px); color: #e6eeff; }
  html:not(.static) .panel.stage .next b { font-size: 1.05em; }

  /* ===== トップ ===== */
  html:not(.static) [data-panel="home"].stage .label { left: 9%; top: 15.2vh; width: 26%; }
  html:not(.static) [data-panel="home"].stage h1 { margin: 0; }
  html:not(.static) [data-panel="home"].stage .line { display: block; padding: 0.5vh 2.6vw 1vh; font-size: clamp(30px, calc(4.3 * var(--u)), 78px); line-height: 1.3; font-weight: 800; white-space: nowrap; letter-spacing: 0.02em; color: #fff; text-shadow: 0 0 30px rgba(60, 132, 255, 0.55); }
  html:not(.static) [data-panel="home"].stage .line:nth-child(1) { left: 6.8%; top: 19.4vh; }
  html:not(.static) [data-panel="home"].stage .line:nth-child(2) { left: 9.8%; top: 33.4vh; }
  html:not(.static) [data-panel="home"].stage .intro { left: 8.6%; top: 48.4vh; width: 51%; padding: 2.2vh 2.8vw 2vh; }
  html:not(.static) [data-panel="home"].stage .lead { margin: 0 0 1.6vh; font-size: clamp(13px, calc(1.22 * var(--u)), 20px); line-height: 1.75; color: #f3f7ff; }
  html:not(.static) [data-panel="home"].stage .chips { margin: 0; gap: 0.9vw; }
  html:not(.static) [data-panel="home"].stage .chips li { padding: 0.5vh 1.2vw; border-radius: 8px; font-size: clamp(11.5px, calc(0.98 * var(--u)), 16px); }
  html:not(.static) [data-panel="home"].stage .intro .wave { display: flex; position: absolute; right: 2.2vw; bottom: 2vh; }
  html:not(.static) [data-panel="home"].stage .actions { left: 12%; top: 70vh; gap: 1.1vw; flex-wrap: nowrap; }
  html:not(.static) [data-panel="home"].stage .actions .btn { min-height: 0; height: 7.4vh; padding: 0 3.4vw; border-radius: 10px; font-size: clamp(15px, calc(1.5 * var(--u)), 25px); white-space: nowrap; }

  /* ===== 課題: 5 つの課題が、柴犬のまわりに浮かぶ札になる ===== */
  html:not(.static) [data-panel="problem"].stage .bar { left: 15.2%; right: 13.2%; top: 11.4vh; padding: 1.7vh 3.4vw 2.5vh; }
  html:not(.static) [data-panel="problem"].stage .bar .label { margin-bottom: 0.8vh; }
  html:not(.static) [data-panel="problem"].stage .bar h2 { margin: 0; font-size: clamp(24px, calc(3.1 * var(--u)), 56px); white-space: nowrap; letter-spacing: 0.02em; }
  html:not(.static) [data-panel="problem"].stage .rows { display: block; margin: 0; }
  html:not(.static) [data-panel="problem"].stage .rows > li {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 1.3vw; padding: 1.5vh 1.3vw 1.5vh 1.7vw; border-radius: var(--g-cut);
    font-size: clamp(13px, calc(1.28 * var(--u)), 21px); font-weight: 700; line-height: 1.5; color: #fff; text-wrap: balance;
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  }
  html:not(.static) [data-panel="problem"].stage .rows > li .no { padding-right: 1.3vw; border-right: 1px solid rgba(170, 206, 255, 0.6); font: 700 clamp(18px, calc(1.9 * var(--u)), 32px) / 1.6 var(--sans); color: #fff; }
  html:not(.static) [data-panel="problem"].stage .rows > li .sig { display: inline-flex; font-size: clamp(13px, calc(1.2 * var(--u)), 20px); }
  html:not(.static) [data-panel="problem"].stage .rows > li.on .sig i { background: #fff; }
  html:not(.static) [data-panel="problem"].stage .rows > li.on { background: var(--g-hot); border-color: #cfe0ff; box-shadow: 0 0 0 1px rgba(0, 70, 220, 0.5), 0 0 34px rgba(44, 122, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  html:not(.static) [data-panel="problem"].stage .rows > li:nth-child(1) { left: 13.7%; top: 35.4vh; width: 31.6%; }
  html:not(.static) [data-panel="problem"].stage .rows > li:nth-child(2) { left: 10.5%; top: 49vh; width: 34.2%; }
  html:not(.static) [data-panel="problem"].stage .rows > li:nth-child(3) { left: 14.3%; top: 62.8vh; width: 33%; }
  html:not(.static) [data-panel="problem"].stage .rows > li:nth-child(4) { right: 2.8%; top: 40vh; width: 28.6%; }
  html:not(.static) [data-panel="problem"].stage .rows > li:nth-child(5) { right: 3.8%; top: 56.5vh; width: 27.6%; }
  html:not(.static) [data-panel="problem"].stage .bridge { left: 50%; translate: -50% 0; bottom: 6.6vh; padding: 1.2vh 4vw 1.5vh; font-size: clamp(17px, calc(2 * var(--u)), 34px); letter-spacing: 0.06em; white-space: nowrap; }

  /* ===== 機能: 実際の画面を大きな枠に。左に 4 つの機能が縦に並ぶ ===== */
  html:not(.static) [data-panel="features"].stage .bar { left: 8%; right: 30%; top: 11.4vh; }
  html:not(.static) [data-panel="features"].stage .bar .label { margin-bottom: 1vh; }
  html:not(.static) [data-panel="features"].stage .bar h2 { margin: 0; font-size: clamp(26px, calc(3.2 * var(--u)), 58px); white-space: nowrap; letter-spacing: 0.02em; }
  html:not(.static) [data-panel="features"].stage .tab-text { left: 8%; top: 24.6vh; width: 64%; min-height: 0; font-size: clamp(14px, calc(1.45 * var(--u)), 24px); line-height: 1.5; color: #fff; text-shadow: 0 2px 16px rgba(4, 12, 44, 0.8); }
  html:not(.static) [data-panel="features"].stage .tabs { left: 7.4%; top: 37.4vh; width: 18.4%; flex-direction: column; flex-wrap: nowrap; gap: 1.5vh; counter-reset: tab; }
  html:not(.static) [data-panel="features"].stage .tabs button {
    position: relative; overflow: visible; counter-increment: tab; display: flex; align-items: center; gap: 1vw; width: 100%; padding: 0 1.2vw; height: 7vh; border-radius: 10px;
    font-size: clamp(13px, calc(1.3 * var(--u)), 22px); white-space: nowrap; text-align: left; color: #fff;
  }
  html:not(.static) [data-panel="features"].stage .tabs button::before { content: counter(tab, decimal-leading-zero); padding-right: 1vw; border-right: 1px solid rgba(170, 206, 255, 0.6); font: 500 0.95em var(--mono); }
  html:not(.static) [data-panel="features"].stage .tabs button[aria-selected="true"] { background: var(--g-hot); border-color: #cfe0ff; box-shadow: 0 0 0 1px rgba(0, 70, 220, 0.5), 0 0 30px rgba(44, 122, 255, 0.95); }
  /* 選ばれている機能から、画面の枠へ線がつながる */
  html:not(.static) [data-panel="features"].stage .tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 100%; top: 50%; bottom: auto; width: 1.9vw; height: 2px; background: #cfe0ff; box-shadow: 0 0 10px #4d8dff; transform: none; animation: none; }
  html:not(.static) [data-panel="features"].stage .shot { left: 27.6%; top: 31.6vh; width: 46%; height: 47.4vh; padding: 2.2vh 1.3vw; overflow: visible; background: var(--g-fill); }
  html:not(.static) [data-panel="features"].stage .shot :is(img, video) { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: contain; object-position: center; border-radius: 8px; background: #f4f8ff; }
  html:not(.static) [data-panel="features"].stage .shot .wave { display: flex; position: absolute; left: 2.4vw; bottom: -0.4vh; height: 14px; }
  html:not(.static) [data-panel="features"].stage .shot-toggle { right: calc(1.3vw + 10px); bottom: calc(2.2vh + 10px); } /* 枠の内側の、動画の右下に */

  /* ===== 利用対象: 柴犬を中心に、4 つの法人が四方に並ぶ ===== */
  html:not(.static) [data-panel="audience"].stage .bar { left: 20%; right: 20%; top: 9.4vh; text-align: center; }
  html:not(.static) [data-panel="audience"].stage .bar .label { justify-content: center; margin-bottom: 0.9vh; }
  html:not(.static) [data-panel="audience"].stage .bar .label::before { content: ""; flex: 1; height: 1px; min-width: 40px; background: linear-gradient(270deg, rgba(170, 206, 255, 0.85), rgba(170, 206, 255, 0.15)); }
  html:not(.static) [data-panel="audience"].stage .bar h2 { margin: 0; font-size: clamp(24px, calc(3 * var(--u)), 54px); white-space: nowrap; letter-spacing: 0.03em; }
  html:not(.static) [data-panel="audience"].stage .rows { display: block; margin: 0; }
  html:not(.static) [data-panel="audience"].stage .rows > li {
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 1.2vw; padding: 1.8vh 1.6vw 2vh; width: 31%;
    font-size: clamp(12.5px, calc(1.16 * var(--u)), 19px); line-height: 1.6; color: #eef4ff; text-wrap: balance;
  }
  html:not(.static) [data-panel="audience"].stage .rows > li .no { grid-row: 1; padding-right: 1.2vw; border-right: 1px solid rgba(170, 206, 255, 0.6); font: 700 clamp(18px, calc(1.9 * var(--u)), 32px) / 1.5 var(--sans); color: #fff; }
  html:not(.static) [data-panel="audience"].stage .rows > li b { grid-column: 2; grid-row: 1; font-size: clamp(15px, calc(1.52 * var(--u)), 26px); line-height: 1.35; color: #fff; }
  html:not(.static) [data-panel="audience"].stage .rows > li .t { grid-column: 1 / -1; margin-top: 1.3vh; padding-top: 1.3vh; border-top: 1px solid rgba(170, 206, 255, 0.4); }
  html:not(.static) [data-panel="audience"].stage .rows > li:nth-child(1) { left: 8%; top: 27.8vh; }
  html:not(.static) [data-panel="audience"].stage .rows > li:nth-child(2) { right: 7%; top: 27.8vh; }
  html:not(.static) [data-panel="audience"].stage .rows > li:nth-child(3) { left: 8%; top: 50.4vh; }
  html:not(.static) [data-panel="audience"].stage .rows > li:nth-child(4) { right: 7%; top: 50.4vh; }
  html:not(.static) [data-panel="audience"].stage .scenes { left: 15%; right: 15%; top: 75.2vh; padding: 1.7vh 2vw 1.6vh; border-top: 1px solid var(--g-edge); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.2vh 1.6vw; }
  html:not(.static) [data-panel="audience"].stage .scenes .sub { margin: 0; padding-left: 0.9vw; border-left: 3px solid #cfe0ff; font-size: clamp(15px, calc(1.6 * var(--u)), 27px); letter-spacing: 0.06em; color: #fff; }
  html:not(.static) [data-panel="audience"].stage .scenes .tabs { position: static; margin: 0; gap: 0.8vw; flex-wrap: nowrap; }
  html:not(.static) [data-panel="audience"].stage .scenes .tabs button { position: relative; flex: 1 1 0; padding: 0.8vh 0.6vw; border-radius: 8px; font-size: clamp(12px, calc(1.08 * var(--u)), 18px); white-space: nowrap; color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html:not(.static) [data-panel="audience"].stage .scenes .tab-text { position: static; grid-column: 1 / -1; min-height: 0; margin: 0; padding-top: 1.1vh; border-top: 1px solid rgba(170, 206, 255, 0.35); font-size: clamp(13px, calc(1.2 * var(--u)), 20px); text-align: center; color: #f3f7ff; }
  html:not(.static) [data-panel="audience"].stage .scenes .wave { display: flex; position: absolute; right: 1.6vw; bottom: 1.2vh; height: 20px; }

  /* ===== 料金: 金額が、値札の形の大きなガラスに入る ===== */
  html:not(.static) [data-panel="pricing"].stage .tag { left: 3.6%; top: 13.4vh; width: 74%; height: 51vh; padding: 4.2vh 13% 0 7%; }
  html:not(.static) [data-panel="pricing"].stage .tag-glass { display: block; position: absolute; inset: 0; clip-path: polygon(2.5% 0, 80% 0, 100% 62%, 86% 100%, 2.5% 100%, 0 93%, 0 7%); background: linear-gradient(160deg, rgba(20, 50, 124, 0.86), rgba(6, 15, 46, 0.86)); } /* 後ろをぼかす指定は使わない(ぼかす範囲は、この形に切り抜かれず、値札の外に四角く残る) */
  html:not(.static) [data-panel="pricing"].stage .tag-edge { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 8px rgba(60, 132, 255, 0.95)); }
  html:not(.static) [data-panel="pricing"].stage .tag-edge path { fill: none; stroke: rgba(170, 206, 255, 0.95); stroke-width: 1.6; }
  html:not(.static) [data-panel="pricing"].stage .tag > :not(.tag-glass, .tag-edge) { position: relative; }
  html:not(.static) [data-panel="pricing"].stage .tag .label { width: 52%; padding-bottom: 1vh; }
  html:not(.static) [data-panel="pricing"].stage .price { margin: 1.2vh 0 0; gap: 1vw; font-size: min(23vh, 11.4vw); line-height: 1.02; letter-spacing: -0.02em; white-space: nowrap; }
  html:not(.static) [data-panel="pricing"].stage .price small { font-size: 0.2em; letter-spacing: 0.04em; color: #fff; white-space: nowrap; }
  html:not(.static) [data-panel="pricing"].stage .price small:first-child { align-self: flex-start; margin-top: 0.5em; }
  html:not(.static) [data-panel="pricing"].stage .price .num { min-width: 3.1ch; }
  html:not(.static) [data-panel="pricing"].stage .tag-foot { display: flex; align-items: center; gap: 1.6vw; margin-top: 2vh; }
  html:not(.static) [data-panel="pricing"].stage .zeros { display: flex; margin: 0; gap: 0; }
  html:not(.static) [data-panel="pricing"].stage .zeros li { display: flex; align-items: baseline; gap: 0.6vw; padding: 0 1.5vw; border: 0; border-right: 1px solid rgba(170, 206, 255, 0.55); border-radius: 0; background: none; white-space: nowrap; }
  html:not(.static) [data-panel="pricing"].stage .zeros li:first-child { padding-left: 0; }
  html:not(.static) [data-panel="pricing"].stage .zeros span { font-size: clamp(13px, calc(1.4 * var(--u)), 23px); font-weight: 700; color: #fff; }
  html:not(.static) [data-panel="pricing"].stage .zeros b { font-size: clamp(24px, calc(3 * var(--u)), 52px); line-height: 1; }
  html:not(.static) [data-panel="pricing"].stage .actions { position: static; flex: none; }
  html:not(.static) [data-panel="pricing"].stage .actions .btn { min-height: 0; height: 6.6vh; padding: 0 2.6vw; border-radius: 10px; font-size: clamp(14px, calc(1.45 * var(--u)), 24px); white-space: nowrap; }
  html:not(.static) [data-panel="pricing"].stage .flow { left: 13.7%; top: 72.4vh; width: 76%; padding: 1.5vh 2.4vw 1.3vh; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 1.6vw; }
  html:not(.static) [data-panel="pricing"].stage .flow .sub { margin: 0; padding-left: 0.9vw; border-left: 3px solid #cfe0ff; font-size: clamp(14px, calc(1.45 * var(--u)), 24px); letter-spacing: 0.06em; color: #fff; }
  html:not(.static) [data-panel="pricing"].stage .flow .tab-text { position: static; grid-row: 1; grid-column: 2; min-height: 0; margin: 0; font-size: clamp(12px, calc(1.05 * var(--u)), 17px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html:not(.static) [data-panel="pricing"].stage .flow .tab-text b { display: none; }
  html:not(.static) [data-panel="pricing"].stage .steps { grid-row: 2; grid-column: 1 / -1; margin: 1.6vh 4% 4.8vh; }
  html:not(.static) [data-panel="pricing"].stage .steps::before { left: 2%; right: 2%; background: rgba(170, 206, 255, 0.55); }
  html:not(.static) [data-panel="pricing"].stage .steps button { width: 3.6vh; height: 3.6vh; font-size: clamp(12px, 1.9vh, 18px); }
  /* 段階の名前を、丸の下に出す */
  html:not(.static) [data-panel="pricing"].stage .steps button::before { content: attr(data-title); position: absolute; top: calc(100% + 0.9vh); left: 50%; translate: -50% 0; padding: 0.2vh 0.7vw; border-radius: 6px; font: 700 clamp(11px, calc(1.02 * var(--u)), 17px) / 1.5 var(--sans); white-space: nowrap; color: #e6eeff; transition: background 0.25s ease, color 0.25s ease; }
  html:not(.static) [data-panel="pricing"].stage .steps button[aria-selected="true"]::before { background: rgba(0, 98, 255, 0.85); color: #fff; box-shadow: 0 0 14px rgba(44, 122, 255, 0.8); }
  html:not(.static) [data-panel="pricing"].stage .notice { left: 15%; top: 92vh; max-width: 54%; padding: 0; border: 0; background: none; font-size: clamp(10.5px, calc(0.92 * var(--u)), 15px); line-height: 1.6; color: #f3f7ff; text-shadow: 0 1px 10px rgba(4, 12, 44, 0.9); }

  /* ===== お問い合わせ: 入力欄が、ガラスの操作盤になる ===== */
  html:not(.static) [data-panel="contact"].stage .bar { left: 14.5%; right: 30%; top: 9.6vh; }
  html:not(.static) [data-panel="contact"].stage .bar .label { margin-bottom: 1vh; width: 62%; }
  html:not(.static) [data-panel="contact"].stage .bar h2 { margin: 0 0 0.8vh; max-width: 46vw; font-size: clamp(24px, calc(2.9 * var(--u)), 52px); line-height: 1.3; letter-spacing: 0.02em; }
  html:not(.static) [data-panel="contact"].stage .bar .aside { margin: 0; font-size: clamp(12px, calc(1.14 * var(--u)), 19px); color: #f3f7ff; text-shadow: 0 2px 14px rgba(4, 12, 44, 0.85); }
  html:not(.static) [data-panel="contact"].stage form { left: 14.5%; width: 53.5%; top: 32.6vh; max-height: 56.5vh; overflow-y: auto; scrollbar-width: thin; padding: 2.6vh 2.4vw 2.2vh; grid-template-columns: 1fr 1fr; gap: 1.6vh 2.2vw; }
  html:not(.static) [data-panel="contact"].stage form label { font-size: clamp(12px, calc(1.06 * var(--u)), 17px); }
  html:not(.static) [data-panel="contact"].stage form :is(input, select, textarea) { margin-top: 0.7vh; padding: 1vh 0.9vw; font-size: clamp(13px, calc(1.06 * var(--u)), 17px); border-radius: 8px; }
  html:not(.static) [data-panel="contact"].stage form .full { grid-column: auto; }
  html:not(.static) [data-panel="contact"].stage form textarea { min-height: 9vh; }
  html:not(.static) [data-panel="contact"].stage form .send { grid-column: 1 / -1; justify-content: flex-end; gap: 1.4vw; margin-top: 0.4vh; }
  html:not(.static) [data-panel="contact"].stage form .send .wave { display: flex; margin-right: auto; }
  html:not(.static) [data-panel="contact"].stage form .send .btn { order: 2; min-height: 0; height: 6.4vh; padding: 0 4.4vw; border-radius: 10px; font-size: clamp(15px, calc(1.5 * var(--u)), 25px); }
  html:not(.static) [data-panel="contact"].stage .sent { left: 14.5%; width: 53.5%; top: 32.6vh; padding: 4vh 3vw; font-size: clamp(14px, calc(1.2 * var(--u)), 20px); }
  html:not(.static) [data-panel="contact"].stage .sent .sent-title { font-size: clamp(20px, calc(2 * var(--u)), 34px); }
}

/* ---------------------------------------------------------------------------
   スマホの配置: 縦長のスマホ(幅 520 以下、高さ 600 以上)。ここでも、板 1 枚にまとめず、項目ごとに並べ方を変える。
   広い画面と違って、部品は上から順に流して並べる(画面の大きさがまちまちなので、割合で置き場所を決めない)。
   柴犬の立ち位置は、項目ごとに 2 通り(src/main.js の STANCE と aim):
     ・中身の下に立つ(トップ・機能・料金・お問い合わせ) … 中身のいちばん下を測って、その下に立たせる。
       場所が足りなければ、下のメニューの後ろへ沈んで、顔だけのぞく
     ・画面の上に立つ(課題・利用対象) … 上の帯のすぐ下に立ち、中身はその足元(--zone)より下から並ぶ
   中身が画面に収まらないときは、板ごと縦に動かせる(部品はガラスのまま)
   --------------------------------------------------------------------------- */
@media (orientation: portrait) and (max-width: 520px) and (min-height: 600px) {
  html:not(.static) .panels { left: 0; right: 0; top: 0; bottom: 0; width: auto; height: auto; }
  html:not(.static) .panels:has(.panel.wide:not([hidden])) { left: 0; right: 0; top: 0; bottom: 0; width: auto; height: auto; } /* :has() を知らないブラウザが上の決まりまで捨てないよう、分けて書く */
  html:not(.static) .panel.stage {
    inset: 60px 0 calc(92px + env(safe-area-inset-bottom, 0px)) 0;
    display: flex; flex-direction: column; gap: 8px; padding: 6px 14px 8px;
    overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: none;
  }
  html:not(.static) .panel.stage::-webkit-scrollbar { display: none; }
  html:not(.static) .panel.stage > * { flex: none; margin: 0; }
  html:not(.static) .panel.stage :where(.bar, .rows > li, .bridge, .flow, .intro, .line, .scenes, form, .sent, .shot, .tabs, .tab-text, .actions, .label, .tag, .notice) { position: relative; }
  /* 画面の上に柴犬が立つ項目: 足元より下から並べる */
  html:not(.static) .panel.stage:is([data-panel="problem"], [data-panel="audience"]) { padding-top: var(--zone, calc(29dvh + 16px)); }
  /* 次の項目へ: 柴犬の横に置く小さな札 */
  html:not(.static) .panel.stage .next { position: fixed; right: 12px; bottom: calc(102px + env(safe-area-inset-bottom, 0px)); left: auto; width: auto; padding: 8px 12px; border-top: 1px solid var(--g-edge); gap: 0.7ch; font-size: 12px; color: #e6eeff; }
  html:not(.static) .panel.stage:is([data-panel="problem"], [data-panel="audience"]) .next { position: absolute; top: calc(var(--zone, 29dvh) - 54px); bottom: auto; }
  html:not(.static) [data-panel="features"].stage .next { left: 12px; right: auto; }
  html:not(.static) .panel.stage.tight .next { display: none; }

  /* ===== トップ: 見出し 2 行がガラスの帯。柴犬は下に立ち、スマホから左右の拠点へ線が広がる ===== */
  html:not(.static) [data-panel="home"].stage .label { margin: 2px 2px 0; }
  html:not(.static) [data-panel="home"].stage h1 { display: grid; justify-items: start; gap: 6px; font-size: clamp(21px, 7.3vw, 31px); }
  html:not(.static) [data-panel="home"].stage .line { padding: 4px 13px 6px; line-height: 1.32; font-weight: 800; white-space: nowrap; letter-spacing: 0.01em; color: #fff; text-shadow: 0 0 22px rgba(60, 132, 255, 0.55); }
  html:not(.static) [data-panel="home"].stage .line:nth-child(2) { margin-left: 5vw; }
  html:not(.static) [data-panel="home"].stage .intro { padding: 11px 13px 12px; }
  html:not(.static) [data-panel="home"].stage .lead { margin: 0 0 8px; font-size: 12.5px; line-height: 1.7; color: #f3f7ff; }
  html:not(.static) [data-panel="home"].stage .chips { margin: 0; gap: 6px; }
  html:not(.static) [data-panel="home"].stage .chips li { padding: 3px 8px; font-size: 11px; }
  html:not(.static) [data-panel="home"].stage .actions { gap: 8px; flex-wrap: nowrap; }
  html:not(.static) [data-panel="home"].stage .actions .btn { flex: 1 1 0; min-height: 46px; padding: 0 8px; border-radius: 10px; font-size: 14.5px; white-space: nowrap; }

  /* ===== 課題: 考えこむ柴犬が上。下に 5 つの課題が互い違いに並び、順に 1 つずつ開いて、柴犬と線で結ばれる ===== */
  html:not(.static) [data-panel="problem"].stage .bar { padding: 9px 13px 11px; }
  html:not(.static) [data-panel="problem"].stage .bar .label { margin: 0 0 4px; }
  html:not(.static) [data-panel="problem"].stage .bar h2 { margin: 0; font-size: clamp(16px, 4.9vw, 20px); line-height: 1.4; }
  html:not(.static) [data-panel="problem"].stage .rows { display: grid; gap: 5px; }
  html:not(.static) [data-panel="problem"].stage .rows > li {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 9px; margin: 0; padding: 5px 11px; border-radius: 10px;
    font-size: 12.5px; line-height: 1.5; color: #dbe6ff; transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  }
  html:not(.static) [data-panel="problem"].stage .rows > li:nth-child(odd) { margin-right: 9%; }
  html:not(.static) [data-panel="problem"].stage .rows > li:nth-child(even) { margin-left: 9%; }
  html:not(.static) [data-panel="problem"].stage .rows > li .no { padding-right: 9px; border-right: 1px solid rgba(170, 206, 255, 0.5); font: 700 13px/1.5 var(--sans); color: #fff; }
  /* 順に目立たせているあいだは、目立っている 1 つだけを全文で見せ、ほかは 1 行に詰める(触れば、その行が開く) */
  html:not(.static) [data-panel="problem"].stage .rows.cycle > li:not(.on) .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html:not(.static) [data-panel="problem"].stage .rows > li.on { padding-block: 8px; background: var(--g-hot); border-color: #cfe0ff; color: #fff; font-weight: 700; box-shadow: 0 0 0 1px rgba(0, 70, 220, 0.5), 0 0 24px rgba(44, 122, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
  html:not(.static) [data-panel="problem"].stage .rows > li.on .sig { display: inline-flex; font-size: 13px; }
  html:not(.static) [data-panel="problem"].stage .rows > li.on .sig i { background: #fff; }
  html:not(.static) [data-panel="problem"].stage .bridge { padding: 7px 12px 8px; text-align: center; font-size: 14px; letter-spacing: 0.04em; }

  /* ===== 機能: 実際の画面が主役。柴犬は右下からのぞいて、スマホと画面が線で結ばれる ===== */
  html:not(.static) [data-panel="features"].stage .bar .label { margin: 2px 0 4px; }
  html:not(.static) [data-panel="features"].stage .bar h2 { margin: 0; font-size: clamp(17px, 5.3vw, 22px); line-height: 1.38; }
  html:not(.static) [data-panel="features"].stage .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; counter-reset: tab; }
  html:not(.static) [data-panel="features"].stage .tabs button { counter-increment: tab; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; font-size: 12px; white-space: nowrap; text-align: left; color: #fff; }
  html:not(.static) [data-panel="features"].stage .tabs button::before { content: counter(tab, decimal-leading-zero); font: 500 10.5px var(--mono); opacity: 0.85; }
  html:not(.static) [data-panel="features"].stage .tab-text { min-height: 3.2em; font-size: 12.5px; line-height: 1.6; color: #fff; text-shadow: 0 2px 12px rgba(4, 12, 44, 0.85); }
  html:not(.static) [data-panel="features"].stage .shot { padding: 6px; background: var(--g-fill); }
  html:not(.static) [data-panel="features"].stage .shot :is(img, video) { width: 100%; height: auto; max-height: none; aspect-ratio: 16 / 9; object-fit: contain; object-position: center; border-radius: 6px; background: #f4f8ff; }
  html:not(.static) [data-panel="features"].stage .shot-toggle { right: 12px; bottom: 12px; }

  /* ===== 利用対象: 両手を広げた柴犬が上。4 つの法人は、横に送って見る札(自動でも進む)。下に活用シーン ===== */
  html:not(.static) [data-panel="audience"].stage { gap: 6px; }
  html:not(.static) [data-panel="audience"].stage .bar { text-align: center; }
  html:not(.static) [data-panel="audience"].stage .bar .label { justify-content: center; margin: 0 0 3px; }
  html:not(.static) [data-panel="audience"].stage .bar .label::before { content: ""; flex: 1; height: 1px; min-width: 20px; background: linear-gradient(270deg, rgba(170, 206, 255, 0.85), rgba(170, 206, 255, 0.15)); }
  html:not(.static) [data-panel="audience"].stage .bar h2 { margin: 0; font-size: clamp(16px, 4.9vw, 20px); line-height: 1.4; text-wrap: balance; }
  html:not(.static) [data-panel="audience"].stage .rows { display: flex; gap: 8px; margin: 0 -14px; padding: 4px 14px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  html:not(.static) [data-panel="audience"].stage .rows::-webkit-scrollbar { display: none; }
  html:not(.static) [data-panel="audience"].stage .rows > li { flex: 0 0 80%; scroll-snap-align: center; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 10px; padding: 8px 12px 9px; font-size: 12px; line-height: 1.6; color: #eef4ff; }
  html:not(.static) [data-panel="audience"].stage .rows > li .no { grid-row: 1; padding-right: 10px; border-right: 1px solid rgba(170, 206, 255, 0.5); font: 700 17px/1.4 var(--sans); color: #fff; }
  html:not(.static) [data-panel="audience"].stage .rows > li b { grid-column: 2; grid-row: 1; font-size: 14px; line-height: 1.35; color: #fff; }
  html:not(.static) [data-panel="audience"].stage .rows > li .t { grid-column: 1 / -1; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(170, 206, 255, 0.35); }
  html:not(.static) [data-panel="audience"].stage .scenes { padding: 8px 12px 8px; border-top: 1px solid var(--g-edge); }
  html:not(.static) [data-panel="audience"].stage .scenes .sub { margin: 0 0 6px; font-size: 12px; color: #fff; }
  html:not(.static) [data-panel="audience"].stage .scenes .tabs { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0 -12px; padding: 0 12px 2px; overflow-x: auto; scrollbar-width: none; }
  html:not(.static) [data-panel="audience"].stage .scenes .tabs::-webkit-scrollbar { display: none; }
  html:not(.static) [data-panel="audience"].stage .scenes .tabs button { flex: none; padding: 6px 10px; border-radius: 8px; font-size: 11.5px; white-space: nowrap; color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html:not(.static) [data-panel="audience"].stage .scenes .tab-text { margin: 6px 0 0; min-height: 3.2em; font-size: 12px; line-height: 1.6; color: #f3f7ff; }

  /* ===== 料金: 値札の形のガラスに、大きな金額。下に、ご利用開始までの流れ。柴犬は下で跳ねる ===== */
  html:not(.static) [data-panel="pricing"].stage .tag { padding: 11px 19% 13px 15px; }
  html:not(.static) [data-panel="pricing"].stage .tag-glass { display: block; position: absolute; inset: 0; clip-path: polygon(2.5% 0, 80% 0, 100% 62%, 86% 100%, 2.5% 100%, 0 93%, 0 7%); background: linear-gradient(160deg, rgba(20, 50, 124, 0.86), rgba(6, 15, 46, 0.86)); } /* 後ろをぼかす指定は使わない(ぼかす範囲は、この形に切り抜かれず、値札の外に四角く残る) */
  html:not(.static) [data-panel="pricing"].stage .tag-edge { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgba(60, 132, 255, 0.95)); }
  html:not(.static) [data-panel="pricing"].stage .tag-edge path { fill: none; stroke: rgba(170, 206, 255, 0.95); stroke-width: 1.4; }
  html:not(.static) [data-panel="pricing"].stage .tag > :not(.tag-glass, .tag-edge) { position: relative; }
  html:not(.static) [data-panel="pricing"].stage .tag .label { margin: 0 0 2px; white-space: nowrap; }
  html:not(.static) [data-panel="pricing"].stage .price { margin: 0; gap: 6px; font-size: clamp(42px, 14.6vw, 66px); line-height: 1.05; white-space: nowrap; letter-spacing: -0.02em; }
  html:not(.static) [data-panel="pricing"].stage .price small { font-size: 0.22em; letter-spacing: 0.02em; color: #fff; }
  html:not(.static) [data-panel="pricing"].stage .price .num { min-width: 0; }
  html:not(.static) [data-panel="pricing"].stage .tag-foot { display: block; }
  html:not(.static) [data-panel="pricing"].stage .zeros { display: flex; gap: 0; margin: 6px 0 10px; }
  html:not(.static) [data-panel="pricing"].stage .zeros li { display: flex; align-items: baseline; gap: 4px; padding: 0 9px; border: 0; border-right: 1px solid rgba(170, 206, 255, 0.5); border-radius: 0; background: none; white-space: nowrap; }
  html:not(.static) [data-panel="pricing"].stage .zeros li:first-child { padding-left: 0; }
  html:not(.static) [data-panel="pricing"].stage .zeros li:last-child { border-right: 0; }
  html:not(.static) [data-panel="pricing"].stage .zeros span { font-size: 10.5px; font-weight: 700; color: #fff; }
  html:not(.static) [data-panel="pricing"].stage .zeros b { font-size: 19px; line-height: 1; }
  html:not(.static) [data-panel="pricing"].stage .actions .btn { flex: 1 1 auto; min-height: 44px; border-radius: 10px; font-size: 14.5px; }
  html:not(.static) [data-panel="pricing"].stage .flow { padding: 9px 12px 10px; }
  html:not(.static) [data-panel="pricing"].stage .flow .sub { margin: 0 0 7px; font-size: 12px; color: #fff; }
  html:not(.static) [data-panel="pricing"].stage .steps { margin: 0 4px 7px; }
  html:not(.static) [data-panel="pricing"].stage .steps button { width: 26px; height: 26px; font-size: 11.5px; }
  html:not(.static) [data-panel="pricing"].stage .flow .tab-text { margin: 0; min-height: 3.2em; font-size: 12px; line-height: 1.6; }
  html:not(.static) [data-panel="pricing"].stage .flow .tab-text b { display: inline; margin-right: 0.6em; font-size: 12.5px; }
  html:not(.static) [data-panel="pricing"].stage .notice { margin: 0 2px; padding: 0; border: 0; background: none; font-size: 10.5px; line-height: 1.6; color: #e6eeff; text-shadow: 0 1px 8px rgba(4, 12, 44, 0.9); }

  /* ===== お問い合わせ: 入力欄がガラスの操作盤。欄の中だけが縦に動き、送信するボタンはいつも見える。柴犬は下から顔をのぞかせる ===== */
  html:not(.static) [data-panel="contact"].stage { overflow: hidden; }
  html:not(.static) [data-panel="contact"].stage::after { content: ""; flex: 0 0 12dvh; } /* 柴犬が顔を出す場所を空けておく */
  html:not(.static) [data-panel="contact"].stage .bar .label { margin: 2px 0 4px; }
  html:not(.static) [data-panel="contact"].stage .bar h2 { margin: 0; font-size: clamp(16px, 4.9vw, 20px); line-height: 1.4; }
  html:not(.static) [data-panel="contact"].stage .bar .aside { margin: 4px 0 0; font-size: 11.5px; line-height: 1.6; color: #f3f7ff; text-shadow: 0 2px 12px rgba(4, 12, 44, 0.85); }
  html:not(.static) [data-panel="contact"].stage form { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(160, 200, 255, 0.5) transparent; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 12px 0; }
  html:not(.static) [data-panel="contact"].stage form label { min-width: 0; font-size: 11.5px; }
  html:not(.static) [data-panel="contact"].stage form :is(input, select, textarea) { margin-top: 3px; padding: 8px 9px; border-radius: 8px; font-size: 16px; } /* 16px より小さいと、iPhone が入力のときに画面を拡大する */
  html:not(.static) [data-panel="contact"].stage form label:has([name="email"]) { grid-column: 1 / -1; }
  html:not(.static) [data-panel="contact"].stage form textarea { min-height: 4.6em; }
  html:not(.static) [data-panel="contact"].stage form .send { position: sticky; bottom: 0; grid-column: 1 / -1; justify-content: flex-end; gap: 10px; margin: 0 -12px; padding: 8px 12px 10px; background: linear-gradient(180deg, rgba(8, 20, 58, 0), rgba(8, 20, 58, 0.94) 32%); }
  html:not(.static) [data-panel="contact"].stage form .send .status { order: -1; flex: 1 1 auto; font-size: 12px; }
  html:not(.static) [data-panel="contact"].stage form .send .btn { flex: none; min-height: 44px; padding: 0 28px; border-radius: 10px; font-size: 14.5px; }
  html:not(.static) [data-panel="contact"].stage .sent { padding: 18px 14px; }
}
@media (orientation: portrait) and (max-width: 350px) and (min-height: 600px) {
  /* 幅の狭いスマホ: 文字と余白を少し詰める */
  html:not(.static) [data-panel="features"].stage .tabs button { gap: 5px; padding: 0 7px; font-size: 11px; }
  html:not(.static) [data-panel="pricing"].stage .zeros li { padding: 0 6px; }
  html:not(.static) [data-panel="pricing"].stage .zeros span { font-size: 10px; }
  html:not(.static) [data-panel="contact"].stage form .send .btn { padding: 0 20px; }
}
@media (orientation: portrait) and (max-width: 520px) and (min-height: 600px) and (max-height: 700px) {
  /* 背の低いスマホ: 場所を取る飾りの文を省く */
  html:not(.static) [data-panel="problem"].stage .bridge, html:not(.static) [data-panel="contact"].stage .bar .aside { display: none; }
}

/* ---- 動きを減らす設定: 線を走る光・電波バー・波形・浮き沈み・ふちの光を止める ---- */
@media (prefers-reduced-motion: reduce) {
  .sig i, .wave i, .links .pulse, .links .ring, .links .arc, html:not(.static) .panel.stage .rows > li, html:not(.static) .panel.stage :is(.rows > li, .bar.glass, .bridge, .intro, .flow, .scenes)::before { animation: none !important; }
  .sig i { opacity: 1; }
  .links .pulse, .links .ring { display: none; }
  .links .wire { transition: none; }
}
