:root {
  --sidebar-bg: #1b2a52;
  --sidebar-fg: #e9edf7;
  --sidebar-muted: #a3b1d6;
  --accent: #f6d33a;
  --primary: #2b4af0;
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --border: #e3e7f1;
  --text: #1f2a44;
  --text-muted: #6c7793;
  --danger: #c0392b;
  --danger-bg: #fdeeec;
  --success: #1b8f4a;
  --warn: #a65b00;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(27, 42, 82, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }

.app-header {
  display: grid;
  grid-template-columns: 320px 1fr 240px;
  align-items: center;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 32px; height: 32px; }
.brand-text { line-height: 1.1; }
.brand-title { font-weight: 700; color: var(--sidebar-bg); font-size: 18px; }
.brand-sub { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; }
.header-catch { color: var(--text-muted); font-size: 13px; text-align: center; padding: 0 20px; }
.header-company { text-align: right; }
.hc-name { font-weight: 700; }
.hc-dept { font-size: 12px; color: var(--text-muted); }

.app-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 400px;
  gap: 12px;
  padding: 10px 16px;
  align-items: start;
}

/* サイドバー */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  border-radius: var(--radius);
  padding: 16px 10px;
  /* v6: chat-area と 揃えて、viewport 内に 収まる 高さ */
  height: calc(100vh - 90px);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  position: sticky; top: 76px;
  /* v10: flex column 化。.side-qr を margin-top: auto で 最下端 に 寄せる */
  display: flex;
  flex-direction: column;
}
/* v9: 1280x800 で QR を 追加しても サイドバー 内 スクロール が 発生 しないよう、
   既存の 余白・フォント を 少しずつ 圧縮 (トータル 約 60px 短縮)。
   1920×1080 では 元々 十分な 余裕 が あった ので 影響なし。 */
.side-nav { display: flex; flex-direction: column; gap: 1px; margin-bottom: 10px; }
.side-item {
  padding: 7px 12px;
  color: var(--sidebar-muted);
  cursor: pointer;
  border-radius: 6px;
  font-size: 12px;
}
.side-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.side-item.active {
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}
.side-pitch {
  background: rgba(255,255,255,0.07);
  border-left: 3px solid var(--accent);
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}
.side-pitch-title { font-weight: 700; font-size: 12px; color: #fff; margin-bottom: 3px; }
.side-pitch-body { font-size: 11px; color: var(--sidebar-muted); line-height: 1.4; }
.side-scenario-title { font-size: 11px; color: var(--sidebar-muted); margin-bottom: 6px; letter-spacing: 1px; }
.scenario-steps { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.scenario-steps li {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--sidebar-muted);
}
.step-num {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--sidebar-muted);
  font-size: 11px;
}
.scenario-steps li.active { color: #fff; }
.scenario-steps li.active .step-num { background: var(--accent); color: var(--sidebar-bg); }
.scenario-steps li.done { color: #cfe3ff; }
.scenario-steps li.done .step-num { background: var(--success); color: #fff; }
.scenario-steps li.done .step-num::before { content: "✓"; font-size: 12px; }
.scenario-steps li.done .step-num span { display: none; }

.side-end {
  width: 100%;
  background: #e94545;
  color: #fff;
  border: 0;
  padding: 8px;
  border-radius: 6px;
  font-weight: 600;
  margin-top: 6px;
  font-size: 13px;
}
.side-end:hover { background: #cc3838; }

/* v9: サイドバー左下の アンケート QR コード
   v10: 「シミュレーションを終了」ボタン との 間隔 を 広げる ため、
        サイドバー を flex column 化 して margin-top: auto で 下部 (padding の 内側) へ 寄せる。
        既存 margin-top: 10px は 除去（flex context の margin-top: auto に 統一）。 */
.side-qr {
  margin-top: auto;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.side-qr-caption {
  font-size: 10px;
  color: var(--sidebar-fg);
  text-align: center;
  line-height: 1.3;
}
.side-qr-link {
  display: inline-block;
  line-height: 0;
  background: #fff;    /* QR の 周囲 (quiet zone) 用 の 白地 */
  padding: 5px;
  border-radius: 4px;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.side-qr-link:hover,
.side-qr-link:focus-visible { transform: scale(1.03); outline: 2px solid var(--accent); outline-offset: 2px; }
.side-qr-img {
  display: block;
  width: 80px; height: 80px;
  image-rendering: pixelated;     /* 1480×1480 → 縮小で ぼやけない */
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* チャット */
.chat-area {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  /* v6: min-height を height に変更し、content で膨張しないよう固定。
     入力エリアが chip 行数で伸びても、chat-messages 側が flex: 1 で縮むだけで、
     chat-area 全体の 高さは viewport 内に収まる。 */
  height: calc(100vh - 90px);
  max-height: calc(100vh - 90px);
  overflow: hidden;
}
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chat-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.chat-title { margin: 0; font-size: 16px; }
.chat-badge-live { background: #d7f0dc; color: var(--success); padding: 3px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.chat-badge-tone { background: #eef1fb; color: var(--primary); padding: 3px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.chat-controls { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); }
.chat-controls select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); padding: 5px 10px; border-radius: 4px; font-size: 12px; }
.btn-ghost:hover { background: var(--bg); }

.chat-messages {
  flex: 1 1 auto;
  min-height: 0;              /* v6: flex子でoverflowを効かせる */
  padding: 18px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  background: #fafbfe;
}
.msg { display: flex; gap: 10px; max-width: 85%; min-width: 0; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #e3e7f1; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.msg.ai .avatar.gentle { background: #ffe6b5; }
.msg.ai .avatar.normal { background: #cfe3ff; }
.msg.ai .avatar.strict { background: #f6c6c6; }
.msg .bubble {
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  white-space: pre-wrap;
  line-height: 1.6;
  /* v6: 長文・長単語・URL 等でも横に あふれない */
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  min-width: 0;
}
.msg.user .bubble { background: #e9efff; border-color: #cfdcff; }
.msg.ai.strict .bubble { background: #fff5f5; border-color: #f5c6c6; }
.msg.ai.gentle .bubble { background: #fff9ec; border-color: #f4e2b7; }
.msg .ts { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.msg.user .ts { text-align: right; }
.msg.nag .bubble { font-style: italic; color: #a73131; }

.chat-input-area {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  flex: 0 0 auto;  /* v6: content に 関わらず auto サイズ、chat-messages 側が flex で 縮む */
  background: #fff;
}
.quick-replies {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
  max-height: 72px;      /* v6: チップ 2 行までで打ち止め。それ以上は スクロール */
  overflow-y: auto;
}
.chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  /* v6: チップ が 際限なく 広がらない よう に max-width と 省略 */
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.chip:hover { background: #eef1fb; border-color: var(--primary); }

.input-row { display: flex; gap: 8px; align-items: flex-end; }
.input-row textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 44px;
  max-height: 140px;
}
.input-row textarea:focus { outline: 2px solid var(--primary); outline-offset: -2px; }
.btn-send {
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 0 24px;
  height: 44px;
  border-radius: 8px;
  font-weight: 600;
}
.btn-send:disabled { background: #a3b1d6; cursor: not-allowed; }
.input-meta {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 11px; color: var(--text-muted);
}
.offline-badge-top {
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 50;
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.hidden { display: none !important; }

/* 右ペイン (v5: 1920x1080 で 5 カードを縦スクロール無しに収めるため、パディングと余白を圧縮)
   v7: サイドバー・chat-area と 下端 を 揃えるため、固定 height を 指定。
       最後のカード (AI部長 面談結果) を flex: 1 で push し、残り空間を埋める。 */
.right-pane {
  display: flex; flex-direction: column; gap: 8px;
  height: calc(100vh - 90px);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  min-height: 0;
}
.right-pane .card { flex: 0 0 auto; }
/* v10: flex-grow を :last-child (面談結果) から :nth-child(4) (不足データ) に 移動。
   面談結果 は content size に 戻り、1920 で 発生していた 下部 の 大きな 空白 を 不足データ へ 配分する。
   1280 では 元々 余り が ほぼ 無い ため、両カード とも 実質 content size の まま。 */
.right-pane .card:nth-child(4) { flex: 1 1 auto; min-height: 0; }
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.card-head h3 { margin: 0; font-size: 12px; color: var(--text); }
.card-sub { font-size: 10px; color: var(--text-muted); }

.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.summary-cell {
  background: #f8fafd;
  border-radius: 5px;
  padding: 6px 8px;
}
.sc-label { font-size: 10px; color: var(--text-muted); margin-bottom: 2px; }
.sc-main { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.1; }
.sc-main .unit { font-size: 10px; font-weight: 400; color: var(--text-muted); margin-left: 3px; }
.sc-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.achievement-donut {
  width: 38px; height: 38px; border-radius: 50%;
  background: conic-gradient(var(--primary) 0deg, #e3e7f1 0deg);
  position: relative; margin-top: 4px;
}
.achievement-donut::after {
  content: attr(data-pct) "%";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 50%;
  width: 70%; height: 70%; margin: 15%;
  font-size: 9px; font-weight: 700;
}

.bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 50px 1fr 120px; align-items: center; gap: 8px; font-size: 11px; }
.bar-row .b-name { font-weight: 600; }
.bar-row .b-bar { display: block; height: 14px; background: #eef1f8; border-radius: 4px; overflow: hidden; position: relative; min-width: 0; }
.bar-row .b-bar-fill { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 0.4s ease; background: var(--primary); }
.bar-row .b-bar-fill.up { background: linear-gradient(90deg, #22a06b, #1b8f4a); }
.bar-row .b-bar-fill.down { background: linear-gradient(90deg, #e07167, #c0392b); }
.bar-row .b-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-row .b-mom { font-size: 10px; margin-left: 4px; }
.bar-row .b-mom.up { color: var(--success); font-weight: 600; }
.bar-row .b-mom.down { color: var(--danger); font-weight: 600; }

.alert-card { background: #fff6f6; border-color: #f5c6c6; }
.alert-card h3 { color: var(--danger); }
.alert-body { font-size: 11px; color: #6b1b1b; line-height: 1.4; }

.missing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.missing-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px;
  background: #f8fafd;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.3;
}
.importance { font-size: 9px; padding: 1px 5px; border-radius: 9px; font-weight: 600; flex-shrink: 0; margin-left: 6px; }
.importance.high { background: #fde0e0; color: var(--danger); }
.importance.mid { background: #fff2d6; color: var(--warn); }
.importance.low { background: #dfeaff; color: var(--primary); }
.btn-more { width: 100%; margin-top: 4px; font-size: 10px; padding: 3px 6px; }
/* v11: v10 の `@media (min-height: 950px)` 固定閾値 ハック は 撤去。
   不足データ の 「全項目 表示 / 2件+もっと見る ページネーション」切替 は、
   app.js の applyMissingListFit() が 右ペイン の 実際 の 利用可能 高さ を 動的 に 判定 する。 */

.result-total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.rt-label { font-size: 10px; color: var(--text-muted); }
.rt-score { font-size: 24px; font-weight: 700; color: var(--primary); line-height: 1; }
.rt-score.big { font-size: 44px; }
.result-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 11px; }
.result-items li { display: grid; grid-template-columns: 80px 1fr 32px; gap: 6px; align-items: center; }
.score-bar { height: 6px; background: #f0f3fa; border-radius: 3px; overflow: hidden; }
.score-bar-fill { display: block; height: 100%; background: var(--primary); width: 0%; transition: width 0.4s; }
.result-items b { text-align: right; font-variant-numeric: tabular-nums; font-size: 11px; }
.result-note { font-size: 10px; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }

/* モーダル */
.modal {
  position: fixed; inset: 0;
  background: rgba(27, 42, 82, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  max-width: 760px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.modal-wide { max-width: 900px; }
.modal-title { margin: 0 0 6px; font-size: 20px; }
.modal-sub { margin: 0 0 20px; color: var(--text-muted); font-size: 13px; }
.tone-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tone-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  transition: all 0.2s;
}
.tone-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tone-card.tone-gentle:hover { border-color: #f6a95a; }
.tone-card.tone-normal:hover { border-color: var(--primary); }
.tone-card.tone-strict:hover { border-color: var(--danger); }
.tone-face svg { width: 80px; height: 80px; }
.tone-name { font-size: 18px; font-weight: 700; margin: 10px 0 6px; }
.tone-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.tone-desc .warn { color: var(--danger); font-weight: 600; display: inline-block; margin-top: 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; font-size: 12px; align-items: center; }
.btn-primary {
  background: var(--primary); color: #fff; border: 0;
  padding: 10px 24px; border-radius: 6px; font-weight: 600;
}
.settings-row { margin-bottom: 14px; font-size: 13px; }
.settings-row label { display: flex; align-items: center; gap: 10px; }
.settings-row input[type=number] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; width: 100px; }

.final-top { display: flex; gap: 20px; margin-bottom: 20px; align-items: center; background: #f8fafd; padding: 16px; border-radius: var(--radius); }
.final-score-box { text-align: center; min-width: 150px; }
.final-body h3 { font-size: 13px; margin: 12px 0 6px; color: var(--primary); }
.final-body ul { margin: 0; padding-left: 22px; font-size: 13px; line-height: 1.6; }

/* 1280px以下向け微調整 */
@media (max-width: 1400px) {
  .app-body { grid-template-columns: 220px minmax(0, 1fr) 360px; }
  .app-header { grid-template-columns: 260px 1fr 200px; }
}

/* ─────────────────────────────────────────────────────────────
   v8: ハンバーガーボタン (デスクトップでは非表示、モバイルで表示) と
       サイドバー 用の バックドロップ
   ───────────────────────────────────────────────────────────── */
.hamburger {
  display: none;
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  margin-right: 6px;
}
.hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--sidebar-bg);
  border-radius: 1px;
}
.sidebar-backdrop {
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   v8: モバイル (スマートフォン幅 760px 以下) 向けレイアウト。
       既存のデスクトップ用 CSS を override する。
       既存の挙動（1920×1080・1280×800）は 760px 超では 変化なし。
   ───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  /* ヘッダー: 3カラム Grid を 単行の Flex に。キャッチと会社情報は 非表示 */
  .app-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }
  .header-catch { display: none; }
  .header-company { display: none; }
  .brand-title { font-size: 15px; }
  .brand-sub { font-size: 10px; }
  .hamburger { display: inline-flex; }

  /* app-body: 3カラム Grid を 単カラムに。padding も 圧縮 */
  .app-body {
    display: block;
    padding: 8px;
  }

  /* サイドバー: 既存の sticky + height を 無効化し、画面左から スライドイン する drawer */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px; max-width: 85vw;
    height: 100vh;        /* v6/v7 の calc(100vh - 90px) を override */
    max-height: 100vh;
    overflow-y: auto;
    z-index: 200;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 199;
  }
  .sidebar-backdrop.hidden { display: none; }

  /* chat-area: v6/v7 の calc(100vh - 90px) 固定高さ を 解除し、幅いっぱい・自然な高さに */
  .chat-area {
    height: auto;
    max-height: none;
    min-height: 60vh;
    overflow: visible;
    margin-bottom: 10px;
  }
  .chat-head { padding: 10px 12px; }
  .chat-title-row { flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
  .chat-title { font-size: 14px; }
  .chat-controls { flex-wrap: wrap; gap: 6px; font-size: 11px; }
  .chat-controls select { font-size: 11px; }
  .chat-messages {
    max-height: 50vh;   /* スマホでは メッセージ領域を 画面の半分 以内に 制限、以降 内部スクロール */
    padding: 12px;
    gap: 10px;
  }
  .msg { max-width: 92%; }
  .msg .bubble { padding: 8px 10px; font-size: 13px; line-height: 1.5; }
  .msg .avatar { width: 28px; height: 28px; }

  /* 入力エリア */
  .chat-input-area { padding: 10px 12px; }
  .quick-replies { max-height: 90px; }
  .chip { max-width: 100%; font-size: 11px; padding: 5px 10px; }
  .input-row textarea { font-size: 13px; min-height: 40px; }
  .btn-send { padding: 0 16px; height: 40px; }

  /* 右ペイン: v6/v7 の calc(100vh - 90px) 固定高さ を 解除し、
     チャットの下 に 自然な高さで 縦積み。カード は 全て content size */
  .right-pane {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: auto;
    max-height: none;
    overflow: visible;
    min-height: 0;
  }
  .right-pane .card,
  .right-pane .card:last-child { flex: 0 0 auto; min-height: 0; }
  .card { padding: 10px 12px; }

  /* 顧客別棒グラフ: name 列 を 少し広く、val 列 を 少し短く */
  .bar-row { grid-template-columns: 50px 1fr 110px; font-size: 11px; }
  .bar-row .b-val { font-size: 10px; }

  /* オフラインバッジ: ハンバーガー と 重ならない位置 (ヘッダー 右上) */
  .offline-badge-top { top: 8px; right: 12px; font-size: 10px; padding: 3px 8px; }

  /* モーダル: 性格選択 の 3 カード を 縦積み に */
  .modal-box { padding: 18px; width: 94%; max-height: 92vh; }
  .tone-cards { grid-template-columns: 1fr; gap: 10px; }
  .tone-card { padding: 12px; display: flex; align-items: center; gap: 12px; text-align: left; }
  .tone-card .tone-face svg { width: 48px; height: 48px; }
  .tone-name { font-size: 15px; margin: 0 0 2px; }
  .tone-desc { font-size: 11px; }

  /* 最終評価モーダル も モバイルで 縦積み */
  .modal-wide { max-width: 100%; }
  .final-top { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .rt-score.big { font-size: 34px; }
}
