/* AI 顧客ロールプレイ ポータル — 淡いグレー地・ネイビー・明朝体・英字セリフ見出し */
:root {
  --bg: #f0f2f6;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --ink: #202b46;
  --ink-2: #4a5470;
  --muted: #8a92a8;
  --line: #dde1ea;
  --navy: #202b46;
  --navy-2: #4f6aac;
  --accent: #011976;
  --grad: linear-gradient(100deg, #202b46 0%, #4f6aac 100%);
  --ok: #2f7d62;
  --warn: #b7791f;
  --err: #b23b3b;
  --rank-a: #2f7d62; --rank-b: #3b64b0; --rank-c: #b7791f; --rank-d: #b23b3b;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(32, 43, 70, .06), 0 8px 24px rgba(32, 43, 70, .06);
  --serif-jp: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --serif-en: "Crimson Pro", "Zen Old Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif-jp); font-size: 15px; line-height: 1.8; letter-spacing: .03em; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--navy-2); }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.4; margin: 0; }
p { margin: 0 0 .8em; }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(240, 242, 246, .88); backdrop-filter: blur(10px); }
.site-header .in { max-width: 1240px; margin: 0 auto; padding: 18px 32px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif-en); font-size: 22px; letter-spacing: .02em; color: var(--ink); white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-family: var(--serif-jp); font-size: 11px; color: var(--muted); letter-spacing: .12em; margin-top: -4px; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.nav a { padding: 4px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.nav a.on { border-bottom-color: var(--ink); }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; white-space: nowrap; }
.role-chip { white-space: nowrap; display: inline-block; font-size: 11px; padding: 1px 10px; border-radius: 50px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }
.role-chip.admin { border-color: var(--accent); color: var(--accent); }
.role-chip.trainer { border-color: var(--navy-2); color: var(--navy-2); }
.menu-btn { display: none; background: none; border: 0; padding: 6px; color: var(--ink); cursor: pointer; }

/* ---------- ボタン ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 50px; padding: 11px 30px;
       background: var(--grad); color: #fff; font-family: var(--serif-jp); font-size: 14px; letter-spacing: .08em; cursor: pointer; white-space: nowrap;
       transition: filter .2s, transform .2s; }
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.sm { padding: 6px 18px; font-size: 12.5px; }
.btn.lg { padding: 16px 44px; font-size: 16px; }
.btn.danger { background: var(--err); }
.btn .arrow { font-family: var(--serif-en); font-size: 1.2em; line-height: 1; }
.link-more { font-family: var(--serif-en); font-size: 15px; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 10px; }
.link-more::after { content: ""; width: 34px; height: 1px; background: currentColor; transition: width .2s; }
.link-more:hover::after { width: 48px; }

/* ---------- レイアウト ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 16px 32px 96px; }
.hero { padding: 44px 0 36px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.eyebrow { font-family: var(--serif-en); font-size: 15px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { font-family: var(--serif-en); font-size: clamp(40px, 6vw, 72px); font-weight: 400; letter-spacing: .01em; line-height: 1.05; margin: 6px 0 10px; }
.hero .lead { font-size: 16px; color: var(--ink-2); margin: 0; }
.section { margin-top: 56px; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif-en); font-size: 38px; font-weight: 400; letter-spacing: .02em; line-height: 1; }
.section-head .ja { font-size: 14px; color: var(--ink-2); }
.section-head .right { margin-left: auto; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; }
.card h3 { font-size: 17px; margin-bottom: 10px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* KPI */
.kpi { background: var(--surface); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.kpi .label { font-size: 12.5px; color: var(--ink-2); letter-spacing: .08em; }
.kpi .value { font-family: var(--serif-en); font-size: 46px; line-height: 1.1; margin-top: 6px; font-variant-numeric: lining-nums tabular-nums; }
.kpi .value small { font-family: var(--serif-jp); font-size: 14px; color: var(--muted); margin-left: 4px; }
.kpi.dark { background: var(--grad); color: #fff; }
.kpi.dark .label, .kpi.dark .value small { color: rgba(255, 255, 255, .75); }

/* シナリオカード */
.scenario { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px; align-items: center; }
.scenario .face { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.scenario .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.tag { font-size: 11.5px; padding: 2px 12px; border-radius: 50px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.tag.dark { background: var(--navy); color: #fff; border-color: var(--navy); }

/* 表 */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; transition: background .15s; }
table.list tr.click:hover td { background: var(--surface-2); }
.num { font-family: var(--serif-en); font-size: 20px; font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; }

.rank { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; font-family: var(--serif-en); font-size: 17px; color: #fff; background: var(--muted); }
.rank.rank-a { background: var(--rank-a); } .rank.rank-b { background: var(--rank-b); }
.rank.rank-c { background: var(--rank-c); } .rank.rank-d { background: var(--rank-d); }
.status { font-size: 12px; padding: 2px 10px; border-radius: 50px; border: 1px solid var(--line); white-space: nowrap; }
.status.done { color: var(--ok); border-color: currentColor; }
.status.evaluating, .status.calling { color: var(--navy-2); border-color: currentColor; }
.status.error { color: var(--err); border-color: currentColor; }
.verdict-ok { color: var(--ok); } .verdict-ng { color: var(--err); }

/* 推移グラフ */
.spark { width: 100%; height: auto; }
.spark .axis { stroke: var(--line); }
.spark .line { fill: none; stroke: var(--navy-2); stroke-width: 2; }
.spark .pt { fill: var(--surface); stroke: var(--navy-2); stroke-width: 2; }
.spark .pass { stroke: var(--muted); stroke-dasharray: 3 4; }
.spark text { font-family: var(--serif-en); font-size: 11px; fill: var(--muted); }

/* フォーム */
.form { display: grid; gap: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); letter-spacing: .06em; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=url], input[type=number], select, textarea {
  width: 100%; font: inherit; font-family: var(--sans); font-size: 14.5px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; transition: border-color .2s, box-shadow .2s; }
textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(79, 106, 172, .15); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.flash { max-width: 1240px; margin: 8px auto 0; padding: 0 32px; }
.flash div { padding: 12px 18px; border-radius: 6px; background: var(--surface); border-left: 3px solid var(--ok); box-shadow: var(--shadow); font-size: 14px; }
.flash div.err { border-left-color: var(--err); }
.alert { padding: 14px 18px; border-radius: 6px; background: #fff7e8; border: 1px solid #f0d9a8; font-size: 14px; margin-bottom: 16px; }
.alert.err { background: #fdf0f0; border-color: #efc4c4; }

/* 練習画面 */
.call-stage { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.call-frame { background: #10172b; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); position: relative; min-height: 560px; }
.call-frame iframe { display: block; width: 100%; height: 620px; border: 0; background: #fff; }
.call-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; color: #fff; text-align: center; padding: 32px;
              background: radial-gradient(circle at 50% 35%, #34437a 0%, #10172b 70%); }
.call-cover video { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 0 0 14px rgba(255, 255, 255, .04); }
.call-cover h2 { font-size: 24px; }
.call-cover p { color: rgba(255, 255, 255, .72); font-size: 14px; max-width: 420px; }
.call-cover .btn { background: #fff; color: var(--navy); }
.call-cover .btn:hover { color: var(--navy); }
[hidden] { display: none !important; }
.call-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 16px; flex-wrap: wrap; }
.timer { font-family: var(--serif-en); font-size: 28px; font-variant-numeric: tabular-nums; min-width: 84px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--err); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.checklist li::before { content: ""; width: 14px; height: 14px; border: 1px solid var(--navy-2); border-radius: 3px; margin-top: 5px; }
.overlay { position: fixed; inset: 0; background: rgba(16, 23, 43, .72); display: none; align-items: center; justify-content: center; z-index: 50; color: #fff; text-align: center; padding: 24px; }
.overlay.on { display: flex; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin 1s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 結果画面 */
.score-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: center; }
.score-ring { width: 180px; height: 180px; position: relative; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .v { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring .v b { font-family: var(--serif-en); font-weight: 400; font-size: 58px; line-height: 1; }
.score-ring .v span { font-size: 12px; color: var(--muted); }
.breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.breakdown div { background: var(--surface-2); border-radius: 6px; padding: 10px 14px; }
.breakdown b { font-family: var(--serif-en); font-weight: 400; font-size: 26px; display: block; line-height: 1.2; }
.req-list { list-style: none; margin: 0; padding: 0; }
.req-list li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.req-list li:last-child { border-bottom: 0; }
.pill { font-size: 12px; text-align: center; border-radius: 50px; padding: 2px 0; height: fit-content; border: 1px solid; }
.pill.ok { color: var(--ok); } .pill.ng { color: var(--err); } .pill.na { color: var(--muted); }
.transcript { font-family: var(--sans); font-size: 14px; display: grid; gap: 10px; max-height: 560px; overflow-y: auto; padding-right: 6px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 12px; line-height: 1.7; }
.bubble.op { justify-self: end; background: var(--navy); color: #fff; border-bottom-right-radius: 3px; }
.bubble.cu { justify-self: start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.bubble .who { display: block; font-size: 11px; opacity: .65; margin-bottom: 2px; }
.report { font-family: var(--sans); font-size: 14.5px; }
.report h2, .report h3, .report h4 { font-family: var(--serif-jp); margin: 1.4em 0 .5em; font-size: 17px; }
.report table.md-table { border-collapse: collapse; width: 100%; margin: .6em 0 1em; font-size: 13.5px; }
.report table.md-table th, .report table.md-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.report blockquote { margin: .5em 0; padding: 8px 14px; border-left: 3px solid var(--navy-2); background: var(--surface-2); }
.comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .head { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.comment .body { white-space: pre-wrap; margin-top: 6px; font-family: var(--sans); font-size: 14.5px; }
details.fold summary { cursor: pointer; font-size: 14px; color: var(--ink-2); }

/* ログイン */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth .visual { background: var(--grad); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .visual h1 { font-family: var(--serif-en); font-weight: 400; font-size: clamp(44px, 5.4vw, 80px); line-height: 1.02; }
.auth .visual p { color: rgba(255, 255, 255, .78); max-width: 440px; }
.auth .visual .rings { position: absolute; right: -120px; bottom: -120px; width: 520px; opacity: .18; }
.auth .panel { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.auth .box { width: 100%; max-width: 380px; }
.auth .box h2 { font-family: var(--serif-en); font-size: 38px; font-weight: 400; }

.site-footer { max-width: 1240px; margin: 0 auto; padding: 28px 32px 40px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
.fade-in { animation: fadeUp .6s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .split, .call-stage { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .site-header .in { padding: 14px 16px; gap: 14px; flex-wrap: wrap; }
  .menu-btn { display: block; margin-left: auto; }
  .nav { display: none; width: 100%; flex-direction: column; gap: 4px; margin: 0; }
  .nav.open { display: flex; }
  .who { width: 100%; justify-content: space-between; display: none; }
  .nav.open + .who { display: flex; }
  main { padding: 8px 16px 64px; }
  .flash { padding: 0 16px; }
  .hero { padding: 24px 0 20px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 20px; }
  .scenario { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; }
  .scenario .face { width: 84px; height: 84px; }
  .score-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .breakdown { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth .visual { padding: 36px 24px; min-height: 260px; }
  .call-frame iframe { height: 560px; }
  .section-head h2 { font-size: 30px; }
  .site-footer { padding: 24px 16px; flex-direction: column; gap: 4px; }
}

/* ユーザー管理 */
.member-form summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.member-form summary::-webkit-details-marker { display: none; }
.member-form summary::after { content: "＋"; margin-left: auto; color: var(--muted); font-size: 18px; }
.member-form[open] summary::after { content: "－"; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.role-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.role-tabs button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 50px; padding: 6px 16px; cursor: pointer; }
.role-tabs button span { font-family: var(--serif-en); margin-left: 4px; color: var(--muted); }
.role-tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.role-tabs button.on span { color: rgba(255, 255, 255, .7); }
.member-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.member { display: grid; grid-template-columns: 44px minmax(140px, 1.3fr) 104px minmax(120px, 1fr) 220px 150px; gap: 16px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.member:last-child { border-bottom: 0; }
.member.inactive { opacity: .5; }
.member .name { font-size: 15px; }
.member .ops { display: flex; gap: 8px; justify-content: flex-end; }
.member .ops form { margin: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; color: #fff; background: var(--muted); }
.avatar.trainee { background: linear-gradient(135deg, #8a92a8, #b4bacb); }
.avatar.trainer { background: linear-gradient(135deg, #4f6aac, #7d93c9); }
.avatar.admin { background: var(--grad); }
@media (max-width: 1000px) {
  .member { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 6px; }
  .member > :nth-child(3), .member > :nth-child(4), .member > :nth-child(5) { grid-column: 2 / 3; }
  .member .ops { grid-column: 3; grid-row: 1 / span 2; }
}


/* 練習記録: 絞り込みとページ送り */
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end; margin-bottom: 18px; padding: 20px 24px; }
.filter-bar .field label { margin-bottom: 4px; }
.filter-bar select, .filter-bar input { padding: 8px 10px; font-size: 13.5px; }
.filter-actions { gap: 14px; }
.records-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin: 0 4px 10px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; font-family: var(--serif-en); }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50px; font-size: 15px; }
.pager a { border: 1px solid var(--line); background: var(--surface); }
.pager a:hover { border-color: var(--navy); color: var(--navy); }
.pager .cur { background: var(--grad); color: #fff; }
.pager .off { color: var(--muted); opacity: .5; }
.pager .gap { min-width: 20px; color: var(--muted); }

/* ホーム: トレーナーからのコメントに対象の練習を添える */
.fb-item { display: block; }
.fb-target { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); padding: 6px 10px; background: var(--surface-2); border-radius: 6px; }
.fb-target .rank { width: 22px; height: 22px; font-size: 13px; margin-left: 2px; }
.fb-item .body { margin-top: 8px; }
.fb-item .head { margin-top: 6px; }

/* 結果画面「今回のお客様の裏側」: 見出し＋本文の 2 列、広い画面では 2 段組み */
.disclose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 6px 0 0; }
.disclose > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.6; }
.disclose dt { color: var(--ink-2); font-weight: 500; }
.disclose dd { margin: 0; }
@media (max-width: 1000px) { .disclose { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .disclose > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* 変化の部品（管理者）: 軸ナビ・部品カード・追加フォーム */
.axis-nav { position: sticky; top: 72px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 14px; background: linear-gradient(var(--bg) 85%, transparent); }
.axis-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 50px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); transition: border-color .15s, color .15s; }
.axis-nav a b { font-family: var(--serif-en); font-weight: 400; font-size: 14px; color: var(--ink); }
.axis-nav a:hover, .axis-nav a.on { border-color: var(--navy-2); color: var(--navy-2); }
.axis-nav a.add { margin-left: auto; background: var(--ink); color: #fff; border-color: var(--ink); }
.axis-nav a.add:hover { filter: brightness(1.15); color: #fff; }
.part-form summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 14px; }
.part-form summary::-webkit-details-marker { display: none; }
.part-form summary h3 { margin: 0; font-size: 17px; }
.part-form summary .small { margin-left: auto; }
.part-form summary::after { content: "＋"; color: var(--muted); font-size: 18px; margin-left: 8px; }
.part-form[open] summary::after { content: "－"; }
.part-form .form { margin-top: 18px; }
.howto { margin: 18px 4px 8px; line-height: 1.7; }
.section.axis { margin-top: 40px; }
.section.axis .section-head h2 { font-family: var(--serif-jp); font-size: 24px; }
.section.axis .section-head .ja { max-width: 62ch; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.part { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--navy-2); }
.part.off { border-top-color: var(--line); opacity: .62; }
.part header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.part header strong { font-weight: 500; font-size: 16px; display: block; }
.part header code { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--muted); }
.part header .pill { padding: 2px 12px; flex: none; }
.part .quote { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); padding-left: 12px; border-left: 2px solid var(--line); }
.part .note { margin: 0; font-size: 12.5px; line-height: 1.65; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 8px 12px; }
.part .note span { display: block; font-size: 11px; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 2px; }
.part footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.part footer .meta em { font-style: normal; letter-spacing: -1px; color: var(--navy-2); margin-right: 4px; }
.part footer .acts { margin-left: auto; display: flex; gap: 2px; }
.part footer .acts a, .part footer .acts button { background: none; border: 0; padding: 4px 8px; border-radius: 6px; font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.part footer .acts a:hover, .part footer .acts button:hover { background: var(--surface-2); color: var(--ink); }
.part footer .acts button.danger:hover { color: var(--err); }
.part footer .acts form { display: inline; }
@media (max-width: 760px) { .parts { grid-template-columns: minmax(0, 1fr); } .axis-nav a.add { margin-left: 0; } }

/* ランダム設定: 読みやすさ重視の見直し（2 列まで・文を一文ずつ改行・評価の見方は折りたたみ） */
.parts { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 18px; }
.part { padding: 20px 24px 14px; gap: 12px; }
.part header strong { font-size: 17px; line-height: 1.5; }
.part .quote { font-size: 14.5px; line-height: 1.9; color: var(--ink); padding-left: 14px; }
.part .quote span { display: block; }
.part details.note { background: var(--surface-2); border-radius: 6px; padding: 8px 12px; font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.part details.note summary { cursor: pointer; list-style: none; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.part details.note summary::-webkit-details-marker { display: none; }
.part details.note summary::before { content: "▸ "; }
.part details.note[open] summary::before { content: "▾ "; }
.part details.note p { margin: 6px 0 0; }
.part .scope { display: flex; flex-wrap: wrap; gap: 6px; }
.part .scope span { font-size: 11.5px; padding: 1px 10px; border-radius: 50px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.part .scope span.all { background: transparent; }
.scenario-filter { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); flex-wrap: wrap; }
.scenario-filter select { font: inherit; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.scope-pick { display: grid; gap: 6px; }
.scope-pick label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); letter-spacing: 0; margin: 0; }
@media (max-width: 1000px) { .parts { grid-template-columns: minmax(0, 1fr); } }
.part, .section.axis { scroll-margin-top: 150px; }   /* 固定ヘッダーと項目ナビの下に見出しが隠れないように */

/* 結果画面「声の指標」 */
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.voice-item { background: var(--surface-2); border-radius: 8px; padding: 14px 16px; display: grid; gap: 4px; border-left: 3px solid var(--ok); }
.voice-item.warn { border-left-color: #c98a1a; }
.voice-item .label { font-size: 12px; color: var(--ink-2); letter-spacing: .06em; }
.voice-item b { font-family: var(--serif-en); font-weight: 400; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.voice-item .note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* 練習画面: 擬似 CRM（会員検索）。業務システム風の見た目にする */
dialog.crm { border: 0; border-radius: 14px; padding: 0; width: min(900px, 94vw); max-height: 92vh; overflow: hidden; box-shadow: 0 30px 80px rgba(16, 23, 43, .35); color: var(--ink); font-family: var(--serif-jp); background: var(--bg); }
dialog.crm::backdrop { background: rgba(16, 23, 43, .5); backdrop-filter: blur(2px); }
.crm-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--grad); color: #fff; }
.crm-brand { display: flex; align-items: center; gap: 14px; }
.crm-logo { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); display: grid; place-items: center; font-family: var(--serif-en); font-size: 17px; letter-spacing: .04em; }
.crm-sys { font-size: 11.5px; letter-spacing: .1em; color: rgba(255, 255, 255, .75); }
.crm-sys small { margin-left: 6px; padding: 1px 8px; border-radius: 50px; border: 1px solid rgba(255, 255, 255, .4); font-size: 10.5px; }
.crm-bar h3 { margin: 2px 0 0; font-size: 19px; font-weight: 500; color: #fff; }
.crm-close { background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
.crm-close:hover { background: rgba(255, 255, 255, .25); }
.crm-body { padding: 18px 20px 22px; overflow: auto; max-height: calc(92vh - 68px); display: grid; gap: 16px; }
.crm-search { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 14px; align-items: end; background: var(--surface); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow); }
.crm-field label { display: block; font-size: 11.5px; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 6px; }
.crm-field input, .crm-dob-row select { font: inherit; font-size: 14.5px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); width: 100%; box-sizing: border-box; }
.crm-field input:focus, .crm-dob-row select:focus { outline: 2px solid var(--navy-2); outline-offset: 0; background: #fff; }
.crm-dob-row { display: flex; align-items: center; gap: 4px; }
.crm-dob-row select { width: auto; min-width: 5.4em; padding-right: 6px; }
.crm-dob-row input { width: 3.4em !important; text-align: center; padding-left: 4px !important; padding-right: 4px !important; }
.crm-dob-row input#crmYear { width: 4.8em !important; }
.crm-dob-row span { font-size: 13px; color: var(--ink-2); margin: 0 4px 0 1px; }
.crm-actions { display: flex; gap: 8px; }
.crm-hint { margin: 0; font-size: 13px; color: var(--muted); padding: 4px 2px; }
.crm-count { font-size: 12.5px; color: var(--ink-2); margin: 0 2px 8px; }
.crm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; background: var(--surface); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.crm-table th { text-align: left; font-weight: 500; font-size: 11.5px; letter-spacing: .08em; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.crm-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.crm-table tbody tr { cursor: pointer; transition: background .12s; }
.crm-table tbody tr:hover td { background: #f3f5fa; }
.crm-table tbody tr.on td { background: #e9eef8; }
.crm-table tr:last-child td { border-bottom: 0; }
.crm-table .crm-open { text-align: right; color: var(--navy-2); white-space: nowrap; }
.mono { font-family: var(--serif-en), ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.crm-none { margin: 0; padding: 16px 18px; border-radius: 10px; background: #fdf0f0; color: var(--err); font-size: 13.5px; line-height: 1.7; border: 1px solid #efc4c4; }
.crm-detail { display: grid; gap: 14px; }
.crm-profile { display: flex; align-items: center; gap: 16px; background: var(--surface); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow); flex-wrap: wrap; }
.crm-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 22px; flex: none; }
.crm-who { flex: 1; min-width: 160px; }
.crm-name { font-size: 20px; font-weight: 500; line-height: 1.3; }
.crm-name span { font-size: 14px; color: var(--ink-2); margin-left: 4px; }
.crm-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.crm-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.crm-pill { font-size: 12px; padding: 3px 12px; border-radius: 50px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface-2); }
.crm-pill.ok { color: var(--ok); border-color: #bfe0d2; background: #eef8f3; }
.crm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.crm-card { background: var(--surface); border-radius: 10px; padding: 14px 18px 10px; box-shadow: var(--shadow); }
.crm-card h5 { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
.crm-card dl { margin: 0; }
.crm-card dl > div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.crm-card dl > div:last-child { border-bottom: 0; }
.crm-card dt { color: var(--ink-2); font-size: 13px; } .crm-card dd { margin: 0; }
.crm-card dd small { color: var(--muted); font-size: 12px; margin-left: 6px; }
.crm-timeline { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.crm-timeline::before { content: ""; position: absolute; left: 12%; right: 12%; top: 9px; height: 2px; background: var(--line); }
.crm-timeline li { position: relative; text-align: center; padding-top: 24px; font-size: 13px; }
.crm-timeline .dot { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); box-sizing: border-box; }
.crm-timeline li.done .dot { border-color: var(--navy-2); background: var(--navy-2); }
.crm-timeline li.warn .dot { border-color: var(--err); }
.crm-timeline li.next .dot { border-color: var(--navy-2); }
.crm-timeline b { display: block; font-size: 16px; font-weight: 500; }
.crm-timeline small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.crm-timeline em { font-style: normal; color: var(--err); border: 1px solid #efc4c4; background: #fdf0f0; border-radius: 50px; padding: 0 8px; font-size: 11px; margin-left: 4px; }
.crm-notes { margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }
.crm-notes p { margin: 0; } .crm-notes p + p { margin-top: 4px; }
@media (max-width: 760px) { .crm-search, .crm-cols, .crm-timeline { grid-template-columns: minmax(0, 1fr); } .crm-timeline::before { display: none; } .crm-timeline li { text-align: left; padding: 6px 0 6px 28px; } .crm-timeline .dot { left: 0; transform: none; top: 10px; } }

.crm-more { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px; }
.crm-more summary { cursor: pointer; list-style: none; font-size: 12.5px; color: var(--navy-2); }
.crm-more summary::-webkit-details-marker { display: none; }
.crm-more summary::before { content: "▸ "; }
.crm-more[open] summary::before { content: "▾ "; }
.crm-more-row { display: grid; grid-template-columns: 1fr 1.7fr; gap: 14px; margin-top: 12px; }
@media (max-width: 760px) { .crm-more-row { grid-template-columns: minmax(0, 1fr); } }

/* 言葉づかいレッスン */
.lesson-tabs { margin-bottom: 18px; }
.lesson-pane { margin-top: 6px; }
.lesson-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.lesson-toolbar select { font: inherit; font-size: 13.5px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); margin-left: 8px; }
.lesson-situation { background: var(--surface-2); border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; }
.lesson-situation p { margin: 4px 0 0; font-size: 16px; line-height: 1.7; }
.lesson-ng { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: baseline; margin-bottom: 14px; padding: 0 4px; }
.lesson-ng span { font-size: 11.5px; letter-spacing: .08em; color: var(--err); white-space: nowrap; }
.lesson-ng p { margin: 0; font-size: 15px; color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(178, 59, 59, .5); }
.lesson-q textarea, #prText { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; line-height: 1.8; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); margin: 6px 0 12px; resize: vertical; }
.lesson-q textarea:focus, #prText:focus { outline: 2px solid var(--navy-2); }
.lesson-result { display: grid; gap: 14px; align-content: start; }
.lesson-score { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0%; width: 84px; height: 84px; border-radius: 50%; background: conic-gradient(var(--navy-2) var(--p), var(--line) 0); display: grid; place-items: center; position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.ring b, .ring span { position: relative; }
.ring b { font-family: var(--serif-en); font-size: 28px; font-weight: 400; line-height: 1; }
.ring span { font-size: 10.5px; color: var(--muted); }
.ring.bad { background: conic-gradient(#c98a1a var(--p), var(--line) 0); }
.lesson-verdict { font-size: 20px; font-weight: 500; }
.lesson-verdict.ok { color: var(--ok); } .lesson-verdict.ng { color: #c98a1a; }
.lesson-block h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
.lesson-list { margin: 0; padding-left: 1.2em; font-size: 14px; line-height: 1.75; }
.lesson-list.ok li::marker { color: var(--ok); } .lesson-list.fix li::marker { color: var(--err); }
.lesson-model { margin: 0; padding: 12px 16px; border-left: 3px solid var(--navy-2); background: var(--surface-2); border-radius: 6px; font-size: 15.5px; line-height: 1.8; }
.lesson-issues { width: 100%; border-collapse: collapse; font-size: 14px; }
.lesson-issues th { text-align: left; font-weight: 500; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.lesson-issues td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.lesson-issues td.ng { color: var(--err); text-decoration: line-through; text-decoration-color: rgba(178, 59, 59, .5); }
.lesson-issues td.ok { color: var(--ok); }
.lesson-sheet { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lesson-sheet td { padding: 9px 8px; border-bottom: 1px solid var(--line); line-height: 1.6; vertical-align: top; }
.lesson-sheet td.ng { color: var(--ink-2); width: 40%; } .lesson-sheet td.arrow { color: var(--muted); width: 2em; text-align: center; } .lesson-sheet td.ok { font-weight: 500; }
@media (max-width: 1000px) { .lesson-pane .split { grid-template-columns: minmax(0, 1fr); } }

/* 見出しを日本語に（英字の飾り見出しをやめる） */
.hero h1 { font-family: var(--serif-jp); font-size: clamp(28px, 3.6vw, 44px); letter-spacing: .04em; font-weight: 500; }
.eyebrow { font-family: var(--serif-jp); font-size: 12.5px; letter-spacing: .18em; text-transform: none; }
.section-head h2 { font-family: var(--serif-jp); font-size: 24px; font-weight: 500; letter-spacing: .04em; }
.link-more { font-family: var(--serif-jp); font-size: 14px; letter-spacing: .06em; }
/* 見出しをさらに控えめに */
.hero { padding: 30px 0 24px; }
.hero h1 { font-size: clamp(21px, 2.3vw, 27px); margin: 4px 0 8px; line-height: 1.4; }
.hero .lead { font-size: 14.5px; }
.eyebrow { font-size: 11.5px; }
.section-head h2 { font-size: 18px; }
.section-head .ja { font-size: 13px; }
.kpi .value { font-size: 34px; }

/* 会話練習（声で返す） */
.lesson-modes { display: inline-flex; border: 1px solid var(--line); border-radius: 50px; padding: 3px; background: var(--surface-2); }
.lesson-modes button { font: inherit; font-size: 13px; border: 0; background: none; padding: 5px 14px; border-radius: 50px; color: var(--ink-2); cursor: pointer; }
.lesson-modes button.on { background: var(--ink); color: #fff; }
.lesson-modes button:disabled { opacity: .4; cursor: not-allowed; }
.lesson-customer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 4px 0 16px; }
.lesson-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 15px; }
.lesson-bubble { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); }
.lesson-bubble .who { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.lesson-bubble p { margin: 2px 0 0; font-size: 16px; line-height: 1.7; transition: filter .2s; }
.lesson-bubble p.say-hidden { filter: blur(7px); user-select: none; }
.lesson-link { background: none; border: 0; padding: 0; margin-top: 4px; font: inherit; font-size: 12px; color: var(--navy-2); cursor: pointer; }
.lesson-voice { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; }
.mic { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); min-height: 24px; }
.mic .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); flex: none; }
.mic.speaking .dot { background: var(--navy-2); animation: lsPulse 1s infinite; }
.mic.listening .dot { background: var(--err); animation: lsPulse .8s infinite; }
.mic.listening { color: var(--err); font-weight: 500; }
.mic.done .dot { background: var(--ok); }
@keyframes lsPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .5; } }
.lesson-live { min-height: 2.2em; margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px dashed var(--line); font-size: 15.5px; line-height: 1.7; }
.lesson-live:empty::before { content: "（あなたの声がここに文字で出ます）"; color: var(--muted); font-size: 13px; }
.lesson-yours { margin: 0; padding: 10px 14px; border-radius: 6px; background: var(--surface-2); font-size: 15px; line-height: 1.7; }
.lesson-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 12px; padding: 2px 10px; border-radius: 50px; border: 1px solid var(--line); }
.chip.ok { color: var(--ok); border-color: #bfe0d2; background: #eef8f3; }
.chip.warn { color: #a06a10; border-color: #ecd3a5; background: #fdf6e9; }
.lesson-ngline { margin: 0; color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(178, 59, 59, .5); }
