/* CoachMode website (app.getcoachmode.com). Light theme only. */
:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f0f1f7;
  --border: #e3e5ee;
  --border-strong: #cfd3e0;
  --text: #141621;
  --text-2: #464b5e;
  --muted: #747a8f;
  --accent: #5b52e6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(91, 82, 230, 0.10);
  --accent-softer: rgba(91, 82, 230, 0.05);
  --chart-line: #5b52e6;
  --chart-grid: #e8eaf1;
  --good: #1f8a52; --good-soft: rgba(31, 138, 82, 0.11);
  --warn: #a8660c; --warn-soft: rgba(196, 122, 18, 0.13);
  --bad: #c2362f;  --bad-soft: rgba(194, 54, 47, 0.10);
  --shadow: 0 1px 2px rgba(20, 22, 33, 0.04), 0 4px 16px rgba(20, 22, 33, 0.04);
  --radius: 14px;
  --radius-sm: 9px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hero-from: #4b43d6;
  --hero-to: #7a5cf0;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── shell ── */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.shell > * { min-width: 0; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; color: var(--text); }
.brand img { width: 26px; height: 26px; }
.brand span { color: var(--accent); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: 0 0 auto; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--border); margin-top: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.me-text { min-width: 0; }
.me-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-email { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { min-width: 0; padding: 28px 32px 56px; max-width: 1180px; }
.topbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .side.open { display: flex; position: fixed; inset: 0 30% 0 0; z-index: 50; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
  .main { padding: 18px 16px 48px; }
}

/* ── type & building blocks ── */
h1 { font-size: 24px; line-height: 1.25; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 15px; margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sub { color: var(--muted); margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px 22px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.section { margin-top: 30px; }
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 650; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn svg { width: 16px; height: 16px; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-weight: 650; color: var(--text-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 650; font-size: 13px; color: var(--text-2); }
.input, textarea.input, select.input { width: 100%; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; }
.input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea.input { resize: vertical; line-height: 1.55; }
.search { max-width: 320px; }

.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 8px; font-weight: 800; font-size: 12.5px; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.none { background: var(--surface-2); color: var(--muted); font-weight: 650; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--text); border: 1px solid transparent; }
.alert.error { background: var(--bad-soft); }
.alert.ok { background: var(--good-soft); }

/* ── auth pages ── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(900px 500px at 10% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; padding: 30px 28px; }
.auth-card.wide { max-width: 480px; }
.auth .brand { justify-content: center; padding-bottom: 6px; }
.auth h1 { text-align: center; font-size: 22px; margin: 6px 0 4px; }
.auth .sub { text-align: center; margin-bottom: 22px; }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.offer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-softer); border: 1px solid var(--accent-soft); }
.offer b { font-size: 15px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.check input { margin-top: 3px; }
.legal { max-height: 60vh; overflow: auto; font-size: 13px; color: var(--text-2); }

/* ── dashboard ── */
.dash-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; }
@media (max-width: 980px) { .dash-top { grid-template-columns: 1fr; } }
.hero { position: relative; overflow: hidden; color: #fff; border: 0; padding: 26px 28px; min-height: 230px; display: flex; flex-direction: column;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); }
.hero::after { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; right: -90px; top: -110px; background: rgba(255,255,255,.08); }
.hero .label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; opacity: .85; }
.hero .big { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; }
.hero .num { font-size: 76px; line-height: 1; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hero .letter { font-size: 26px; font-weight: 800; opacity: .95; }
.hero .delta { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.16); font-weight: 700; font-size: 13px; width: fit-content; }
.hero .foot { margin-top: auto; padding-top: 18px; font-size: 13px; opacity: .9; display: flex; gap: 18px; flex-wrap: wrap; }
.hero .foot b { font-weight: 800; }
.chart-card { padding: 18px 20px 12px; min-height: 230px; display: flex; flex-direction: column; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.chart-wrap { position: relative; flex: 1 1 auto; min-height: 170px; margin-top: 8px; }
.chart-wrap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-wrap .axis { fill: var(--muted); font-size: 11px; }
.chart-wrap .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-wrap .line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-wrap .area { fill: var(--chart-line); opacity: .10; }
.chart-wrap .dot { fill: var(--chart-line); stroke: var(--surface); stroke-width: 2; }
.chart-wrap .cross { stroke: var(--border-strong); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--text); color: var(--surface); padding: 7px 10px; border-radius: 8px; font-size: 12px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.tip b { font-variant-numeric: tabular-nums; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 650; font-size: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 700; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.data td { padding: 10px; border-bottom: 1px solid var(--border); }

.recs { display: flex; flex-direction: column; gap: 12px; }
.rec { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; padding: 18px 20px; align-items: start; }
.rec .count { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 15px; }
.rec .why { color: var(--text-2); margin: 3px 0 0; }
.rec .try { margin-top: 12px; padding: 2px 0 2px 14px; border-left: 2px solid var(--accent); }
.rec .try .k { font-size: 12px; font-weight: 700; color: var(--accent); }
.rec .try q { display: block; font-style: italic; color: var(--text); margin-top: 2px; quotes: "\201C" "\201D"; }
.rec .of { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 640px) { .rec { grid-template-columns: 38px 1fr; } .rec .of { grid-column: 2; } }

/* ── calls & contacts lists ── */
.list { overflow: hidden; }
.list-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) 90px 70px 52px; gap: 12px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--border); color: var(--text); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--accent-softer); text-decoration: none; }
.list-head { color: var(--muted); font-size: 12px; font-weight: 700; padding-top: 10px; padding-bottom: 10px; background: var(--surface-2); }
.list-row .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contacts .list-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) minmax(0, 1.6fr) 80px; }
@media (max-width: 760px) {
  .list-row, .contacts .list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .list-row .hide-sm { display: none; }
}

/* ── call page ── */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 650; margin-bottom: 14px; white-space: nowrap; }
.back svg { width: 16px; height: 16px; flex: 0 0 auto; }
.call-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.call-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); margin-top: 6px; font-size: 13px; }
.scorebox { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.scorebox .n { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 22px 0 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; color: var(--text-2); font-weight: 650; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.prose p { margin: 0 0 12px; color: var(--text); line-height: 1.65; }
.callout { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-softer); border: 1px solid var(--accent-soft); }
.callout .k { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .modules { position: static; display: flex; gap: 4px; overflow-x: auto; padding: 6px; }
  .modules a { white-space: nowrap; flex: 0 0 auto; }
}
.modules { padding: 10px; position: sticky; top: 16px; }
.modules a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 650; }
.modules a:hover { background: var(--surface-2); text-decoration: none; }
.modules a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.modules .n { font-size: 12px; color: var(--muted); font-weight: 700; }
ul.points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.points li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.55; }
ul.points .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
ul.points .ic.good { background: var(--good-soft); color: var(--good); }
ul.points .ic.warn { background: var(--warn-soft); color: var(--warn); }
.kv { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 10px 18px; }
.kv dt { color: var(--muted); font-weight: 650; }
.kv dd { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; }
.stat .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 12px; font-weight: 650; }
.ratio { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; gap: 2px; }
.ratio i { display: block; height: 100%; }
.ratio .rep { background: var(--chart-line); }
.ratio .prospect { background: var(--border-strong); }
.transcript { display: flex; flex-direction: column; gap: 10px; }
.turn { display: grid; grid-template-columns: 82px 1fr; gap: 12px; }
.turn .who { font-weight: 700; font-size: 12px; color: var(--muted); padding-top: 2px; }
.turn.rep .who { color: var(--accent); }
.turn .what { line-height: 1.6; }
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; }
.email-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-weight: 650; z-index: 100; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ── get set up ── */
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.steps { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 20px; }
.step-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--text-2); }
.step.next { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.step.next .step-num { background: var(--accent); color: var(--accent-ink); }
.step.done .step-num { background: var(--good-soft); color: var(--good); }
.step.done h3 { color: var(--text-2); }
.step-detail { margin-top: 8px; color: var(--text-2); }
.step-detail p { margin: 0 0 10px; line-height: 1.6; }
.step-detail .row { margin: 4px 0 10px; }
ul.how, ol.how { margin: 6px 0 0; padding-left: 20px; line-height: 1.65; }
ul.how li, ol.how li { margin: 4px 0; }
.setup-banner { display: flex; gap: 18px; align-items: center; padding: 16px 20px; margin-bottom: 22px; border-color: var(--accent-soft); background: linear-gradient(0deg, var(--accent-softer), var(--accent-softer)), var(--surface); flex-wrap: wrap; }
.setup-banner .progress { max-width: 360px; }

/* ── profiles ── */
.narrow { max-width: 820px; }
.stack.tight { gap: 8px; }
.row.tight { gap: 8px; flex-wrap: nowrap; }
.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .hide-sm { display: none; } }
.req { color: var(--bad); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.hint.bad { color: var(--bad); }
.hint.warn { color: var(--warn); }
.hint.count { text-align: right; font-variant-numeric: tabular-nums; }
.input.sm { padding: 7px 10px; font-size: 13px; }
.input.short { width: 92px; }
.input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { color: var(--bad); border-color: var(--bad-soft); }
.btn.danger-ghost:hover { background: var(--bad-soft); }
.linkish.bad { color: var(--bad); }
.linkish.small { font-size: 12px; justify-self: start; text-align: left; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
h4 { margin: 0; font-size: 14px; }

.save-state { font-size: 12.5px; font-weight: 650; color: var(--muted); white-space: nowrap; padding-bottom: 4px; }
.save-state.good { color: var(--good); }
.save-state.bad { color: var(--bad); white-space: normal; }
.tab-n { margin-left: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 1px 7px; border-radius: 999px; }
.tabs a[aria-current="page"] .tab-n { color: var(--accent); background: var(--accent-soft); }

.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pf-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; color: var(--text); }
.pf-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-softer); }
.pf-stats { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.pf-stats b { color: var(--text); }
.pf-next { color: var(--accent); font-weight: 650; font-size: 13px; }
.empty-cta { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-cta p { max-width: 520px; margin: 0 0 6px; line-height: 1.6; }
.big-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.big-ic svg { width: 26px; height: 26px; }
.confirm { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bad-soft); }
.danger-zone { border-color: var(--bad-soft); }

.writer { border-color: var(--accent-soft); background: linear-gradient(0deg, var(--accent-softer), var(--accent-softer)), var(--surface); }
.busy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.preview-steps { margin: 0; padding: 4px 4px 4px 34px; max-height: 440px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.preview-steps li { padding: 8px 6px; border-bottom: 1px solid var(--border); line-height: 1.5; }
.preview-steps li:last-child { border-bottom: 0; }
.preview-steps .sec { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 2px; }
.preview-steps .note { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }
.kind { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; margin-right: 8px; vertical-align: 1px; }
.kind.say { background: var(--surface-2); color: var(--text-2); }
.kind.ask { background: var(--accent-soft); color: var(--accent); }

.steps-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.steps-head > div { flex: 1 1 280px; }
.steps-foot { padding: 14px 20px; }
.steps-edit { list-style: none; margin: 0; padding: 0; }
.step-edit { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 14px 20px 14px 14px; border-bottom: 1px solid var(--border); }
.step-edit.q { background: var(--accent-softer); }
.step-n { font-size: 12px; font-weight: 700; color: var(--muted); text-align: right; padding-top: 6px; font-variant-numeric: tabular-nums; }
.step-main { display: grid; gap: 8px; min-width: 0; }
.step-bar { display: flex; align-items: center; gap: 4px; min-width: 0; }
textarea.input.step-text { resize: none; overflow: hidden; min-height: 44px; }
.nowrap { white-space: nowrap; }
.seg.sm { padding: 2px; }
.seg.sm button { padding: 3px 10px; font-size: 12.5px; }
.pin-label { max-width: 220px; padding: 5px 9px; font-size: 12.5px; margin-left: 6px; }
.note-input { font-style: italic; }
.icon-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: 8px; color: var(--muted); cursor: pointer; flex: 0 0 auto; }
.icon-btn:hover:not([disabled]) { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn[disabled] { opacity: .3; cursor: default; }
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.icon-btn.bad:hover:not([disabled]) { color: var(--bad); background: var(--bad-soft); }
@media (max-width: 640px) {
  .step-edit { grid-template-columns: 1fr; padding: 12px 14px; } .step-n { display: none; }
  .step-bar { flex-wrap: wrap; } .pin-label { order: 9; flex: 1 1 100%; max-width: none; margin: 4px 0 0; }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-softer); }
.chip-btn svg { width: 13px; height: 13px; }
.tchip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 12.5px; color: var(--text-2); }
.tchip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; }
.tchip button:hover { background: var(--border); color: var(--text); }

.obj { overflow: hidden; }
.obj-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border: 0; background: transparent; cursor: pointer; text-align: left; font-weight: 700; }
.obj-head:hover { background: var(--surface-2); }
.obj.open .obj-head { border-bottom: 1px solid var(--border); }
.obj-title { font-size: 14.5px; }
.chev { display: inline-grid; color: var(--muted); transition: transform .15s ease; }
.chev svg { width: 16px; height: 16px; }
.chev.open { transform: rotate(90deg); }
.obj-body { padding: 18px 20px; }
.tree-slot { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); }
.tree-cards { display: flex; flex-direction: column; gap: 10px; }
.tree-node { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tree-node.branch { border-style: dashed; }
.tree-node.unreached { border-style: dashed; border-color: var(--bad); }
.tn-head { font-size: 12.5px; font-weight: 800; color: var(--accent); }
.tree-node.unreached .tn-head { color: var(--bad); }
.branches { display: flex; flex-direction: column; gap: 2px; color: var(--text-2); }
.obj-foot { display: flex; justify-content: flex-end; }
.toast.undo { display: flex; align-items: center; gap: 14px; }
.toast.undo button { border: 0; background: transparent; color: #a9a4ff; font-weight: 800; cursor: pointer; padding: 0; }

/* ── role-play hours ── */
.rp-balance { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rp-balance .v { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rp-history summary { cursor: pointer; color: var(--text-2); font-weight: 650; font-size: 13px; }
.rp-history table { margin-top: 8px; }

/* ── CRM ── */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: 0 0 auto; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.codebox { display: block; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12.5px; word-break: break-all; user-select: all; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; } }

/* profile list actions + role-play history */
.pf-link { color: var(--text); }
.pf-link::after { content: ""; }
.pf-actions { justify-content: space-between; margin-top: 4px; }
.rp-row { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.4fr) 90px 140px; }
@media (max-width: 760px) { .rp-row { grid-template-columns: minmax(0, 1fr) auto; } }
