/* 展示会ブースの大画面（1440〜1920px）で立ち止まって見てもらう前提のレイアウト。
   配色・書体・パーツの作りは Creative Drive CRO のサイトに合わせてある
   （#0e1130 の紺地＋#3559d6→#7b45dd のグラデ、白の900ウェイト、丸ピル、半透明カード）。
   ブースで見た画面と、あとで開くサイトが地続きに見えることを優先している。 */

:root {
  --bg: #0e1130;
  --panel: rgba(255, 255, 255, 0.05);
  --panel2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.12);
  --line2: rgba(255, 255, 255, 0.16);
  --fg: #ffffff;
  --fg2: #c3c9e8;
  --fg3: #8f98c6;
  --kicker: #a9b4e8;
  --grad: linear-gradient(120deg, #3559d6, #7b45dd);
  --gradlite: linear-gradient(120deg, #8fb0ff, #c79bff);
  --on: rgba(147, 110, 255, 0.2);
  --on-line: rgba(170, 140, 255, 0.45);
  --on-dot: #b18cff;
  --live: #7ff0c0;
  --live-bg: rgba(34, 197, 94, 0.16);
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  color: var(--fg);
  font-family: var(--font);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* サイトのヒーローと同じ光の置き方。地の紺の上に紫→青の玉を3つ。 */
body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image:
    radial-gradient(52% 46% at 78% 18%, rgba(123, 69, 221, 0.5), transparent 70%),
    radial-gradient(44% 42% at 14% 82%, rgba(53, 89, 214, 0.4), transparent 72%),
    radial-gradient(70% 60% at 50% 118%, rgba(150, 90, 255, 0.26), transparent 70%);
  background-attachment: fixed;
}

@keyframes blip { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ── ヘッダー ───────────────────────────── */
.top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; gap: 3px; min-width: 250px; }
.logo { font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.logo b {
  font-weight: 900; font-size: 14px; letter-spacing: .12em;
  background: var(--gradlite); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tag { font-size: 11px; color: var(--fg3); }
.top h1 {
  flex: 1; margin: 0;
  font-size: clamp(20px, 1.9vw, 28px); font-weight: 900; letter-spacing: -.035em; line-height: 1.35;
}
.top h1 em {
  font-style: normal;
  background: var(--gradlite); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.topright { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.topright .row { display: flex; align-items: center; gap: 10px; }
.keys { font-size: 10px; color: var(--fg3); letter-spacing: .04em; }

/* 業種の切替。言語とは別軸なので、見た目も分ける（こちらは角丸の四角）。 */
.bizsw { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line2); }
.bizsw button {
  padding: 7px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--fg2);
  font-family: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.bizsw button:hover { color: #fff; }
.bizsw button.on { background: var(--on); color: #fff; box-shadow: inset 0 0 0 1px var(--on-line); }

.langsw { display: flex; border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; }
.langsw button {
  padding: 9px 15px; border: 0; background: rgba(255, 255, 255, 0.06); color: var(--fg2);
  font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.langsw button:hover { background: rgba(255, 255, 255, 0.13); color: #fff; }
.langsw button.on { background: var(--grad); color: #fff; font-weight: 800; }

.autobtn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.06); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.autobtn:hover { background: rgba(255, 255, 255, 0.13); border-color: #fff; }
.autobtn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg3); }
.autobtn.on {
  background: var(--grad); border-color: transparent;
  box-shadow: 0 12px 26px -12px rgba(80, 60, 200, .8);
}
.autobtn.on .dot { background: #fff; animation: blip 1.8s ease-in-out infinite; }

/* ── 3カラム ───────────────────────────── */
.stage {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 370px minmax(420px, 1fr) 420px;
  min-height: 0;
}
.panel { padding: 20px; overflow-y: auto; min-height: 0; }
.panel.left { border-right: 1px solid var(--line); }
.panel.right { border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
/* ルール一覧は常に見えていてほしい（優先順位の説明そのものなので）。
   はみ出すのは判定カードの側だけにする。 */
.panel.right > .flow { flex: 0 0 auto; }
.panel.right > .rules { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.panel.right > .rules ol { overflow-y: auto; min-height: 0; }
.rules li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel h2 {
  margin: 0 0 9px; font-size: 11.5px; font-weight: 900; letter-spacing: .08em; color: var(--kicker);
}

/* ── 操作パネル ─────────────────────────
   条件が7つあるので、選択肢の少ない軸は2列に並べて縦を詰める。
   1画面に収めるのが目的（スクロールさせると読まれない）。 */
/* 条件名を横に出して1行ぶん減らす。7軸あるので、ここを縦に積むと下の情報が画面から落ちる。 */
.field {
  display: grid; grid-template-columns: 68px 1fr; align-items: start; gap: 8px;
  margin-bottom: 8px; min-width: 0;
}
.field > label {
  display: flex; align-items: center; gap: 6px;
  padding-top: 9px; font-size: 11px; font-weight: 700; color: var(--fg2); line-height: 1.3; white-space: nowrap;
}
/* 「いまのルールがこの条件を見ているか」を、操作パネル側にも出す。
   天気を切り替えても変わらない場面で、壊れて見えないようにするため。 */
.uses { width: 7px; height: 7px; border-radius: 50%; display: block; }
.uses.on { background: #4ade80; box-shadow: 0 0 0 3px var(--live-bg); }
.uses.off { background: rgba(255, 255, 255, .14); }

/* 選択肢が5つある行（流入元）は2段に折り返す。1行に詰めると文字が縦積みになって読めない。 */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { --cols: 3; }
.seg button {
  flex: 1 1 calc(100% / var(--cols) - 6px); min-width: 0; padding: 8px 4px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1); background: var(--panel); color: var(--fg2);
  font-family: inherit; cursor: pointer; text-align: center;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.seg button:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.seg button:active { transform: translateY(1px); }
.seg button { font-size: 12px; font-weight: 800; letter-spacing: -.03em; line-height: 1.4; }
.seg button.on { background: var(--on); border-color: var(--on-line); color: #fff; }

/* ── 訪問者の条件 ───────────────────────── */
.fineprint {
  margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 10px; line-height: 1.6; color: var(--fg3);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fineprint code { color: #b6c6ff; }

.notes { margin: 10px 0 0; padding: 0; list-style: none; }
.notes li {
  position: relative; padding: 0 0 0 16px; margin-bottom: 7px;
  font-size: 10.5px; line-height: 1.65; color: var(--fg3);
}
.notes li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gradlite);
}

/* ── スマホ枠 ───────────────────────────── */
.phonewrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 14px 18px; min-height: 0; position: relative; overflow-y: auto;
}
.phonewrap::before {
  content: ""; position: absolute; inset: 6% 4%;
  background: radial-gradient(58% 58% at 50% 40%, rgba(160, 120, 255, .26), rgba(53, 89, 214, .12) 48%, transparent 72%);
}
.phone {
  position: relative; z-index: 1;
  width: 390px; height: min(820px, calc(100vh - 175px)); min-height: 340px;
  border-radius: 42px; padding: 11px;
  background: #05070f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 40px 80px -40px rgba(0, 0, 0, .85);
  transition: box-shadow .35s;
}
.phone.flash {
  box-shadow: 0 0 0 1px rgba(170, 140, 255, .9), 0 0 46px -2px rgba(150, 110, 255, .6), 0 40px 80px -40px rgba(0, 0, 0, .85);
}
.notch {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 24px; border-radius: 0 0 14px 14px; background: #05070f; z-index: 2;
}
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 32px; background: #fff; display: block; }
.loading {
  position: absolute; inset: 11px; border-radius: 32px;
  display: none; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); color: #586278; font-size: 13px; font-weight: 700; letter-spacing: .08em;
}
.loading.on { display: flex; }
.phonenote { margin: 0; position: relative; z-index: 1; font-size: 11px; color: var(--fg3); }


/* ── フロー図（人物 → 同じURL → 判定 → 出たLP） ─────────────
   「誰が来たか」を人の顔に結び付けて、選ばれた線に電気が流れる。
   条件のトグルだけだと何の話か伝わらない、という現場の指摘への答え。 */
.flow {
  padding: 11px 13px 12px;
  border: 1px solid var(--line2); border-radius: 18px; background: var(--panel2);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.flow h3 { margin: 0 0 2px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flow h3 .live { margin: 0; }
.flowhint { margin: 0 0 7px; font-weight: 500; letter-spacing: 0; font-size: 10px; color: var(--fg3); }
.flow .vtone { margin-top: 5px; -webkit-line-clamp: 2; }

.people { display: grid; gap: 6px; }
.person {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 3px 5px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .1); background: var(--panel);
  font-family: inherit; color: var(--fg2); cursor: pointer; min-width: 0;
  transition: background .18s, border-color .18s, color .18s;
}
.person:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.person img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
  filter: grayscale(1) contrast(1.05); opacity: .6; transition: filter .18s, opacity .18s;
}
.person b { font-size: 11.5px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.person span { font-size: 9px; color: var(--fg3); text-align: center; line-height: 1.25; }
.person.other { cursor: default; }
.person.other i {
  width: 30px; height: 30px; border-radius: 50%; display: block;
  background: rgba(255, 255, 255, .07); border: 1px dashed rgba(255, 255, 255, .28);
}
.person.other.on i { border-style: solid; border-color: var(--on-dot); background: rgba(177, 140, 255, .2); }
.person.on { background: var(--on); border-color: var(--on-line); color: #fff; }
.person.on img { filter: none; opacity: 1; box-shadow: 0 0 0 2px var(--on-dot); }
.person.on span { color: #d8cbff; }

.converge { display: block; width: 100%; height: 26px; margin: 1px 0 0; overflow: visible; }
.wire { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1.6; }
/* 通っている線だけ、破線を流して電気が走っているように見せる。 */
.wire.on { stroke: #b18cff; stroke-width: 2.2; stroke-dasharray: 7 10; animation: current .8s linear infinite; }
@keyframes current { to { stroke-dashoffset: -18; } }

/* URLは1つ、という絵にする。枠は固定で、中の板だけが差し替わる。
   3つのノードを矢印でつなぐと「LPが3つある」ように見える、という指摘への答え。 */
.urlbox {
  margin-top: 2px; padding: 9px 10px 10px; border-radius: 13px;
  border: 1px solid rgba(199, 168, 255, .38); background: rgba(255, 255, 255, .04);
}
.urllabel { display: block; font-size: 10px; font-weight: 800; color: var(--kicker); letter-spacing: .02em; }
.inner {
  margin-top: 7px; padding: 9px 11px; border-radius: 10px;
  background: var(--on); border: 1px solid var(--on-line);
}
.inner.swap { animation: swapin .4s ease-out; }
@keyframes swapin { from { opacity: .25; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.innerlabel { display: block; font-size: 9.5px; font-weight: 700; color: #cbb8ff; }
.inner b { display: block; margin-top: 2px; font-size: 14px; font-weight: 900; color: #fff; letter-spacing: -.02em; }
.innerhead {
  display: -webkit-box; margin-top: 2px; font-size: 11px; line-height: 1.4; color: #e5dbff;
  -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.judged {
  margin: 6px 0 0; display: flex; align-items: center; gap: 7px;
  font-size: 10px; color: var(--fg3);
}
.judged em {
  font-style: normal; font-weight: 800; font-size: 10.5px; color: #d8cbff;
  background: rgba(147, 110, 255, .16); border-radius: 999px; padding: 2px 9px;
}


/* 条件のブロックと結果のブロックをつなぐ縦の線。フロー図と同じ「電気が流れる」表現で、
   左カラムが「条件 → その結果」の順に読めるようにする。 */
.linkdown { display: flex; justify-content: center; margin: 4px 0 2px; }
.linkdown svg { width: 26px; height: 34px; overflow: visible; }
.linkdown .wire { stroke-width: 2.4; stroke-dasharray: 6 8; }
.linkdown .head { fill: none; stroke: #c7a8ff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.changesbox {
  padding: 11px 13px 12px; border-radius: 16px;
  border: 1px solid var(--line2); background: var(--panel2);
}
.changesbox h3 { margin: 0 0 4px; font-size: 12.5px; color: #fff; letter-spacing: -.02em; }
.changesbox .changes li { border-top-color: rgba(255, 255, 255, .1); }
.changesbox .changes li:first-child { border-top: 0; padding-top: 2px; }

/* ── 判定パネル ───────────────────────── */
.verdict {
  padding: 13px 14px;
  border: 1px solid var(--line2); border-radius: 20px; background: var(--panel2);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
}
.verdict.enter { animation: pop .38s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.live {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
  font-size: 11px; font-weight: 900; color: var(--live); background: var(--live-bg);
  border-radius: 999px; padding: 4px 11px;
}
.live i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; animation: blip 1.8s ease-in-out infinite; }

.vhead { display: flex; flex-direction: column; gap: 9px; }
.vbadge {
  align-self: flex-start; padding: 5px 12px; border-radius: 999px;
  background: var(--on); border: 1px solid var(--on-line); color: #e5dbff;
  font-size: 11px; font-weight: 800;
}
.verdict h2 { margin: 0; font-size: 17px; font-weight: 900; letter-spacing: -.03em; color: #fff; }
.vwhen { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.vwhen span {
  padding: 4px 10px; border-radius: 7px; background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .1); font-size: 11px; font-weight: 700; color: var(--fg2);
}
.vhead2 { margin-top: 13px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.vzh { font-size: 19px; font-weight: 900; line-height: 1.45; letter-spacing: -.02em; }
.vja { margin-top: 5px; font-size: 12px; color: var(--fg3); font-weight: 700; }
.vtone {
  margin: 9px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--fg2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.verdict h3, .rules h3 {
  margin: 10px 0 5px; font-size: 10.5px; font-weight: 900; letter-spacing: .08em; color: var(--kicker);
}
.changes { margin: 0; padding: 0; list-style: none; }
.changes li {
  display: grid; grid-template-columns: 72px 1fr; gap: 9px;
  padding: 5px 0; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.5; color: var(--fg2);
}
.changes li b {
  font-size: 10.5px; font-weight: 900; padding-top: 1px;
  background: var(--gradlite); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.rules { margin-top: 10px; }
.rules h3 { display: flex; flex-direction: column; gap: 4px; }
.rules h3 span:last-child { font-weight: 500; letter-spacing: 0; font-size: 10.5px; color: var(--fg3); }
.rules ol {
  margin: 0; padding: 0; list-style: none; counter-reset: r;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 6px; align-content: start;
}
.rules li {
  position: relative; counter-increment: r; display: flex; align-items: center; gap: 9px;
  padding: 3px 8px 3px 24px; margin-bottom: 0; border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .1); background: var(--panel);
  font-size: 10.5px; line-height: 1.3; font-weight: 700; color: var(--fg2); transition: background .2s, border-color .2s, color .2s;
}
.rules li::before {
  content: counter(r); position: absolute; left: 8px;
  font-size: 10px; font-weight: 800; color: #5c6597;
}
.rules li.hit { background: var(--on); border-color: var(--on-line); color: #fff; }
.rules li.hit::before { color: var(--on-dot); }
.rules li.skip { opacity: .42; }
.rules li em { font-style: normal; margin-left: auto; font-size: 9px; font-weight: 800; color: #d8cbff; white-space: nowrap; }

.err { color: #ffb4a2; font-size: 12px; line-height: 1.8; }


/* ── タブ（スマホのときだけ出る） ───────────────────────── */
.tabs { display: none; }

/* ── 画面が狭いとき ─────────────────────────────────────
   3カラムのまま詰めると、どの列も読めない幅になる。
   1180px 以下では左右を細くし、900px 以下では縦積み＋タブに切り替える。 */
@media (max-width: 1180px) {
  .stage { grid-template-columns: 320px minmax(360px, 1fr) 360px; }
  .top h1 { font-size: 20px; }
  .brand { min-width: 190px; }
  .phone { width: 340px; }
}

@media (max-width: 900px) {
  /* 高さ100%のflexを外して素直な文書フローに戻す。
     縦に積むだけなので、body自体がスクロール容器でいい。 */
  html, body { height: auto; min-height: 100%; }
  body { display: block; overflow: visible; background-attachment: scroll; }

  /* ヘッダーは畳む。635px しかない画面だと、ここが厚いだけで
     操作パネルが1画面目から消える（実機で起きていた）。 */
  .top {
    flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px;
    border-bottom: 1px solid var(--line);
  }
  /* ブランド名は詰まったら省略する。ここが縮まないと、右の言語と自動デモが次の行に落ちる。 */
  .brand { min-width: 0; flex: 1 1 40px; gap: 0; overflow: hidden; }
  .logo { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tag { display: none; }
  .top h1 { order: 4; flex: 1 0 100%; font-size: 15px; line-height: 1.45; letter-spacing: -.02em; }
  /* 右側の3つ（業種・言語・自動デモ）を1行に詰めると、業種が増えたぶん幅が足りなくなり、
     言語と自動デモが1文字ずつ縦に割れる。入れ子を display:contents で解いて .top の
     直接の子にし、業種だけを2行目の全幅に落とす。業種が5つ6つに増えても横スクロールで済む。 */
  .topright, .topright .row { display: contents; }
  .keys { display: none; }
  .langsw { order: 1; }
  .autobtn { order: 2; margin-left: auto; }
  .langsw button { padding: 7px 9px; font-size: 11.5px; }
  .autobtn { padding: 7px 12px; gap: 6px; font-size: 12px; }
  .autobtn .dot { width: 7px; height: 7px; }

  .bizsw {
    order: 3; flex: 1 0 100%;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  }
  .bizsw::-webkit-scrollbar { display: none; }
  .bizsw button { flex: 1 0 auto; padding: 7px 10px; font-size: 12px; }

  /* LPの直下。ヘッダーは流し、タブだけを上に貼り付ける
     （両方 sticky にすると重なる。前にそれで壊していた）。 */
  .tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    padding: 8px 14px; order: 1;
    position: sticky; top: 0; z-index: 19;
    background: #0e1130; border-bottom: 1px solid var(--line);
  }
  .tabs button {
    padding: 10px 8px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .14);
    background: var(--panel); color: var(--fg2);
    font-family: inherit; font-size: 13px; font-weight: 800; cursor: pointer;
  }
  .tabs button.on { background: var(--on); border-color: var(--on-line); color: #fff; }

  /* 縦積み。LPは常に上に出し、下だけタブで入れ替える。
     flex の既定（縮む・高さ0まで潰れる）が残ると、LPと条件パネルが重なる。
     子は全部 flex: 0 0 auto にして、中身の高さのまま積む。 */
  .stage { display: flex; flex-direction: column; height: auto; }
  .stage > * { flex: 0 0 auto; min-height: auto; }
  .phonewrap { order: 0; padding: 12px 14px 2px; min-height: auto; }
  .phonewrap::before { display: none; }
  .panel { order: 2; padding: 12px 14px 32px; overflow: visible; border: 0 !important; }
  .stage[data-tab="cond"] .panel.right,
  .stage[data-tab="result"] .panel.left { display: none; }

  /* スマホの中にスマホの枠を描いても意味がないので、枠を外して全幅で見せる。
     高さは控えめに。ここを大きくすると、その下のタブと条件が1画面目から落ちる。 */
  .phone {
    width: 100%; height: clamp(230px, 42vh, 460px); min-height: 0; padding: 0;
    border-radius: 16px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 20px 40px -28px rgba(0, 0, 0, .9);
  }
  /* 途中で切れているのが「壊れ」ではなく「続きがある」と分かるように、下端をぼかす。 */
  .phone::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34px;
    border-radius: 0 0 16px 16px; pointer-events: none; z-index: 2;
    background: linear-gradient(transparent, rgba(5, 7, 15, .38));
  }
  .notch { display: none; }
  .phone iframe { border-radius: 16px; }
  .loading { inset: 0; border-radius: 16px; }
  .phonenote { font-size: 10.5px; text-align: center; }

  .panel.right { display: flex; flex-direction: column; overflow: visible; }
  .panel.right > .verdict { overflow: visible; }
  .panel.right > .rules { max-height: none; }
  .panel.right > .rules ol { overflow: visible; }

  /* フロー図：狭いので人物を2列、パイプラインを縦に積む。 */
  .people { grid-template-columns: repeat(3, 1fr) !important; }
  .converge { display: none; }
  .people { gap: 5px; }
  .inner b { font-size: 15px; }

  /* 指で押せる大きさに。文字も一段大きくする。 */
  .field { margin-bottom: 14px; }
  .field { grid-template-columns: 84px 1fr; }
  .linkdown svg { height: 24px; }
  .field > label { font-size: 12px; padding-top: 10px; }
  .seg button { flex: 1 1 calc(33.33% - 6px); padding: 11px 6px; }
  .seg button b { font-size: 14px; }
  .seg button span { font-size: 10px; }
  .ctx { font-size: 13px; }
  .verdict h2 { font-size: 19px; }
  .vzh { font-size: 18px; }
  .vtone, .changes li { font-size: 13px; }
  .rules ol { grid-template-columns: 1fr; }
  .rules li { font-size: 12.5px; padding: 8px 12px 8px 30px; }
  .notes li { font-size: 11.5px; }
}

@media (max-width: 520px) {
  .top h1 { font-size: 14.5px; }
  .seg button { flex: 1 1 calc(50% - 6px); }
  .phone { height: clamp(210px, 38vh, 420px); }
  .changes li { grid-template-columns: 68px 1fr; gap: 8px; }
}
