:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1c2b36;
  --muted: #6b7c8a;
  --line: #e3e9ef;
  --teal: #1f9c92;
  --teal-dark: #16766e;
  --blue: #2d6cdf;
  --rec: #e0564f;
  --good: #1f9c92;
  --bad: #d97706;
  --crit: #d64545;
  --shadow: 0 1px 3px rgba(28, 43, 54, 0.08), 0 6px 24px rgba(28, 43, 54, 0.06);
  font-size: 15px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 1.15rem; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.brand .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}
.tabs { display: flex; gap: 4px; }
.tab {
  border: none; background: none; padding: 8px 14px; border-radius: 8px;
  font-size: 0.95rem; color: var(--muted); cursor: pointer; font-weight: 550;
}
.tab.active { background: #eef4ff; color: var(--blue); }
.privacy { margin-left: auto; font-size: 0.85rem; color: var(--muted); }

.view { max-width: 920px; margin: 0 auto; padding: 24px; display: grid; gap: 20px; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 620; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.hidden { display: none !important; }

/* Scenario picker */
.scenario-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.scenario {
  text-align: left; border: 1.5px solid var(--line); background: #fbfdff;
  border-radius: 12px; padding: 14px; cursor: pointer; transition: all .12s ease;
}
.scenario:hover { border-color: var(--teal); transform: translateY(-1px); }
.scenario.selected { border-color: var(--teal); background: #effaf8; box-shadow: 0 0 0 3px rgba(31,156,146,.12); }
.scenario.read-cold { border-style: dashed; border-color: var(--blue); background: #f4f7ff; }
.scenario.read-cold:hover { border-color: var(--blue); }
.scenario .name { font-weight: 600; display: block; margin-bottom: 6px; }
.scenario .persona { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.badge { display: inline-block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 20px; font-weight: 700; margin-bottom: 8px; }
.badge.easy { background: #e6f6ee; color: #18794e; }
.badge.medium { background: #fff3e0; color: #b45309; }
.badge.hard { background: #fde8e8; color: #c0392b; }

/* Skill picker (role -> skill) */
.skill-list { margin-top: 8px; }
.role-head { font-size: 0.74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--teal-dark); font-weight: 700; margin: 16px 0 8px; }
.role-head:first-child { margin-top: 4px; }
.skill-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.skill-card { text-align: left; border: 1.5px solid var(--line); background: #fbfdff;
  border-radius: 12px; padding: 14px; cursor: pointer; transition: all .12s ease; }
.skill-card:hover { border-color: var(--blue); transform: translateY(-1px); }
.skill-card.selected { border-color: var(--blue); background: #eef4ff; box-shadow: 0 0 0 3px rgba(45,108,223,.12); }
.skill-card .name { font-weight: 620; display: block; margin-bottom: 5px; }
.skill-card .persona { font-size: 0.8rem; color: var(--muted); }

/* Record */
.record-area { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 0; }
.record-btn {
  width: 130px; height: 130px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark)); color: white;
  font-weight: 600; font-size: 0.95rem; box-shadow: 0 8px 24px rgba(31,156,146,.35);
  transition: transform .1s ease, background .2s ease;
}
.record-btn:disabled { background: #c4ced6; box-shadow: none; cursor: not-allowed; }
.record-btn:not(:disabled):hover { transform: scale(1.04); }
.record-btn.recording { background: linear-gradient(135deg, #e0564f, #c0392b);
  box-shadow: 0 8px 24px rgba(224,86,79,.4); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 8px 24px rgba(224,86,79,.4);} 50% { box-shadow: 0 8px 34px rgba(224,86,79,.6);} }

/* Results */
.score-head { display: flex; align-items: center; gap: 18px; margin: 8px 0 18px; }
.score-ring { width: 76px; height: 76px; flex: none; }
.score-summary { font-size: 0.98rem; line-height: 1.5; }
.section-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; font-weight: 700; }

.beat { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.beat .mark { font-size: 1.2rem; flex: none; line-height: 1.4; }
.beat.hit { background: #f3fbf9; border-color: #cdeae6; }
.beat.miss { background: #fff8f1; border-color: #f3e2cf; }
.beat .b-title { font-weight: 600; }
.beat .b-why { color: var(--muted); font-size: 0.88rem; margin-top: 3px; line-height: 1.45; }
.b-evidence { font-size: 0.85rem; color: #5a6b78; font-style: italic; margin-top: 6px;
  border-left: 3px solid var(--line); padding-left: 9px; }
.model-answer { margin-top: 9px; background: #eff7ff; border: 1px solid #d6e6fb;
  border-radius: 9px; padding: 9px 11px; }
.ma-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; color: var(--blue); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.ma-text { font-size: 0.92rem; color: var(--ink); line-height: 1.5; }
.play-btn { border: none; background: var(--blue); color: white; border-radius: 20px;
  padding: 2px 10px; font-size: 0.72rem; font-weight: 600; cursor: pointer; letter-spacing: 0; text-transform: none; }
.play-btn:hover { background: #1f56c0; }

.flag { padding: 10px 12px; border-radius: 9px; margin-bottom: 7px; font-size: 0.9rem; border: 1px solid var(--line); }
.flag.on { background: #fdecec; border-color: #f3cccc; }
.flag.on.critical { background: #fbe0e0; border-color: #e9b3b3; }
.flag .f-title { font-weight: 600; }
.flag.off { opacity: .55; }

.priority { background: #eef4ff; border: 1px solid #d6e2fb; border-radius: 10px; padding: 14px; margin-top: 14px; }
.priority b { color: var(--blue); }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 10px; margin-top: 8px; }
.metric { background: #fbfdff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; }
.metric .v { font-size: 1.4rem; font-weight: 680; }
.metric .l { font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.metric .v.warn { color: var(--bad); }
.metric .v.ok { color: var(--good); }

.transcript { background: #fbfdff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 0.92rem; line-height: 1.55; }
.transcript.dialogue { white-space: pre-wrap; }
.patient-reply { background: #f4f0ff; border: 1px solid #e2daf7; border-radius: 10px; padding: 14px; margin-top: 8px; }
.patient-reply .who { font-weight: 650; color: #6b46c1; margin-bottom: 6px; }
audio { width: 100%; margin-top: 8px; }

/* History */
.history-list { display: grid; gap: 10px; margin-top: 16px; }
.hrow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.hrow .hscore { font-weight: 700; font-size: 1.1rem; width: 42px; }
.hrow .hmeta { flex: 1; }
.hrow .hmeta .hname { font-weight: 580; }
.hrow .hmeta .hdate { font-size: 0.8rem; color: var(--muted); }
.hrow.clickable { cursor: pointer; transition: border-color .12s ease, transform .08s ease; }
.hrow.clickable:hover { border-color: var(--teal); transform: translateX(2px); }
.hrow .hchev { color: var(--muted); font-size: 1.3rem; font-weight: 300; }
.detail-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; }
.chart { padding: 10px 0; }

/* Mode picker */
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.mode-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 22px 16px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fbfdff; cursor: pointer; font-size: 1.6rem; transition: all .12s ease;
}
.mode-btn span { font-size: 1.02rem; font-weight: 650; color: var(--ink); }
.mode-btn small { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.mode-btn:not(:disabled):hover { border-color: var(--teal); transform: translateY(-1px); }
.mode-btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 0.88rem; margin-top: 6px; }

/* Conversation mic toggle (hands-free vs hold-to-talk) */
.convo-input-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.seg-toggle { display: inline-flex; border: 1.5px solid var(--line); border-radius: 20px; overflow: hidden; }
.seg-btn {
  border: none; background: #fbfdff; padding: 7px 14px; font-size: 0.86rem;
  font-weight: 600; color: var(--muted); cursor: pointer; transition: all .12s ease;
}
.seg-btn.active { background: var(--teal); color: white; }
.seg-btn:not(.active):hover { color: var(--ink); }

/* Conversation */
.convo-status { text-align: center; color: var(--muted); font-weight: 550; padding: 8px; min-height: 22px; }
.convo-log { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 8px 2px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; line-height: 1.45; font-size: 0.95rem; }
.bubble.you { align-self: flex-end; background: var(--teal); color: white; border-bottom-right-radius: 4px; }
.bubble.patient { align-self: flex-start; background: #f1eafe; color: #3b2a64; border-bottom-left-radius: 4px; }
.bubble.nudge { align-self: flex-start; background: #f0f3f7; color: var(--muted); font-style: italic; padding: 6px 12px; font-size: 0.88rem; }
.end-btn {
  display: block; margin: 16px auto 4px; padding: 12px 26px; border: none; border-radius: 30px;
  background: var(--rec); color: white; font-weight: 650; font-size: 0.98rem; cursor: pointer;
  box-shadow: 0 6px 18px rgba(224,86,79,.32);
}
.end-btn:disabled { background: #c4ced6; box-shadow: none; cursor: default; }

/* Push-to-talk hold button */
.ptt-btn {
  display: block; margin: 14px auto 0; padding: 16px 34px; border: none; border-radius: 34px;
  background: var(--teal); color: white; font-weight: 650; font-size: 1.02rem; cursor: pointer;
  box-shadow: 0 6px 18px rgba(31,156,146,.32); user-select: none; -webkit-user-select: none;
  touch-action: none; transition: all .1s ease;
}
.ptt-btn small { display: block; font-weight: 400; font-size: 0.78rem; opacity: .85; margin-top: 2px; }
.ptt-btn.holding { background: var(--rec); box-shadow: 0 6px 22px rgba(224,86,79,.45); transform: scale(1.04); }

/* Outcome banner */
.outcome-banner { padding: 11px 14px; border-radius: 10px; font-weight: 650; font-size: 0.95rem; margin-bottom: 14px; }
.outcome-banner.win { background: #e6f6ee; color: #18794e; border: 1px solid #bfe6cf; }
.outcome-banner.lose { background: #fdecec; color: #c0392b; border: 1px solid #f3cccc; }

/* Debrief lists */
ul.ptr { margin: 4px 0 0; padding-left: 20px; }
ul.ptr li { margin-bottom: 6px; line-height: 1.5; }
ul.ptr.good li::marker { color: var(--good); }
ul.ptr.work li::marker { color: var(--bad); }
.again-btn { display: block; margin: 20px auto 0; padding: 10px 22px; border: 1.5px solid var(--teal);
  background: white; color: var(--teal-dark); border-radius: 30px; font-weight: 600; cursor: pointer; }
.again-btn:hover { background: #effaf8; }

/* Coaching cards */
#coaching-cards { display: grid; gap: 14px; margin-top: 12px; }
.coach-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fbfdff; }
.cc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cc-name { font-weight: 650; font-size: 1.02rem; }
.cc-sub { font-size: 0.82rem; color: var(--muted); }
.cc-beats { display: grid; gap: 7px; margin-bottom: 10px; }
.beatbar { display: grid; grid-template-columns: 1fr 120px 38px; align-items: center; gap: 10px; }
.bb-label { font-size: 0.85rem; }
.bb-track { background: #e9eef3; border-radius: 6px; height: 9px; overflow: hidden; }
.bb-fill { height: 100%; border-radius: 6px; }
.bb-fill.hi { background: var(--good); }
.bb-fill.mid { background: var(--bad); }
.bb-fill.lo { background: var(--crit); }
.bb-pct { font-size: 0.8rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.cc-flag { font-size: 0.85rem; color: #b45309; background: #fff6e9; border-radius: 8px; padding: 7px 10px; margin-bottom: 8px; }
.cc-deliv { font-size: 0.82rem; color: var(--muted); }
.cc-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mini-btn { border: 1.5px solid var(--line); background: white; border-radius: 20px; padding: 6px 14px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; color: var(--ink); }
.mini-btn:hover { border-color: var(--teal); }
.mini-btn.primary { background: var(--teal); color: white; border-color: var(--teal); }
.mini-btn.primary:hover { background: var(--teal-dark); }
.cc-insight { margin-top: 12px; background: #eef4ff; border: 1px solid #d6e2fb; border-radius: 10px; padding: 12px; }
.ins-summary { line-height: 1.5; }
.ins-focus { margin-top: 7px; }
.ins-focus b { color: var(--blue); }
.ins-why { margin-top: 5px; font-size: 0.88rem; color: var(--muted); }

/* Login gate */
.gate { position: fixed; inset: 0; z-index: 60; background: linear-gradient(160deg, #eef4ff, #f5f7fa);
  display: flex; align-items: center; justify-content: center; }
.gate-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 32px; width: 360px; max-width: 92vw; }
.gate-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 18px; }
.gate-brand h1 { font-size: 1.3rem; margin: 0; font-weight: 680; }
.dot.big { width: 16px; height: 16px; }
.gate-lead { text-align: center; color: var(--muted); margin: 0 0 16px; }
.gate-input { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 0.95rem; margin-bottom: 10px; font-family: inherit; }
.gate-input:focus { outline: none; border-color: var(--teal); }
.gate-btn { width: 100%; padding: 11px; border: none; border-radius: 10px; background: var(--teal);
  color: white; font-weight: 650; font-size: 0.95rem; cursor: pointer; }
.gate-btn:hover { background: var(--teal-dark); }
.gate-users { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.gate-user { text-align: left; padding: 11px 14px; border: 1.5px solid var(--line); background: #fbfdff;
  border-radius: 10px; cursor: pointer; font-size: 0.95rem; font-weight: 550; }
.gate-user:hover { border-color: var(--teal); }
.gate-user.selected { border-color: var(--teal); background: #effaf8; }
.gate-err { color: var(--crit); font-size: 0.85rem; margin-top: 8px; min-height: 18px; text-align: center; }

/* Topbar user chip */
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; }
.logout-btn { border: 1px solid var(--line); background: white; border-radius: 16px; padding: 4px 12px;
  font-size: 0.8rem; cursor: pointer; color: var(--muted); font-weight: 600; }
.logout-btn:hover { border-color: var(--rec); color: var(--rec); }

/* Add-person form + DISC dots */
.add-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.add-form .gate-input { width: auto; margin-bottom: 0; flex: 1; min-width: 120px; }
.disc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.disc-dot.red { background: #e0564f; } .disc-dot.yellow { background: #e6b800; }
.disc-dot.green { background: #1f9c92; } .disc-dot.blue { background: #2d6cdf; }

/* DISC cards */
.disc-card { background: #fbfbff; border-left: 4px solid var(--blue); }
.comms-tip { margin-top: 10px; background: #eef4ff; border: 1px solid #d6e2fb; border-radius: 8px;
  padding: 9px 11px; font-size: 0.88rem; line-height: 1.45; }
.comms-tip b { color: var(--blue); }
.disc-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; font-size: 0.92rem; }
.disc-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
  color: var(--muted); background: #eef2f6; border-radius: 12px; padding: 2px 8px; }
.disc-tag.perf { background: #effaf8; color: var(--teal-dark); }
.disc-note { font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.disc-plus { font-weight: 500; color: var(--muted); }
.disc-dot.small { width: 8px; height: 8px; }
.disc-reason { font-size: 0.85rem; color: #5a6b78; line-height: 1.45; margin: 3px 0 4px 4px;
  border-left: 3px solid var(--line); padding-left: 9px; }

/* Core drivers (what motivates a person) — distinct accent from DISC */
.drivers-card { background: #fffdf7; border-left: 4px solid #e0a93b; }
.drv-name { font-weight: 700; }
/* The synopsis line tying the self-check and the reps read together. */
.drivers-card .drives-read { margin-top: 14px; background: #fdf3df; border-color: #ecd49a; }
.drivers-card .drives-read b { color: #b07d14; }

/* Quiz */
.gate-card.wide { width: 540px; }
.quiz-q { margin: 14px 0; text-align: left; }
.quiz-prompt { font-weight: 600; margin-bottom: 8px; }
.quiz-opts { display: grid; gap: 7px; }
.quiz-opt { text-align: left; padding: 9px 12px; border: 1.5px solid var(--line); background: #fbfdff;
  border-radius: 9px; cursor: pointer; font-size: 0.9rem; }
.quiz-opt:hover { border-color: var(--teal); }
.quiz-opt.selected { border-color: var(--teal); background: #effaf8; font-weight: 600; }
#quiz-questions, #dquiz-questions { max-height: 52vh; overflow-y: auto; padding-right: 6px; margin-bottom: 14px; }

/* Calibration + team analytics */
.cal-chip { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 11px;
  border-radius: 14px; margin: 6px 0 4px; }
.cal-chip.calibrated { background: #e6f6ee; color: #18794e; }
.cal-chip.overconfident { background: #eef4ff; color: #2d6cdf; }
.cal-chip.too_hard { background: #f4f0ff; color: #6b46c1; }
.cal-buckets { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 0.85rem; }
.cal-b { color: var(--ink); }
.trend { font-size: 0.78rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.trend.up { background: #e6f6ee; color: #18794e; }
.trend.down { background: #fdecec; color: #c0392b; }
.trend.flat { background: #eef2f6; color: var(--muted); }
.team-weakspot { background: #fff6e9; border: 1px solid #f3e2cf; color: #92400e; border-radius: 10px;
  padding: 11px 13px; font-size: 0.9rem; margin-bottom: 6px; }

/* Self-rating */
.rate-row { display: flex; gap: 10px; margin-top: 6px; }
.rate-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfdff;
  cursor: pointer; font-size: 1.7rem; transition: all .12s ease; }
.rate-btn span { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.rate-btn:hover { transform: translateY(-1px); }
.rate-btn.good:hover { border-color: var(--good); background: #effaf8; }
.rate-btn.neutral:hover { border-color: var(--bad); background: #fff6e9; }
.rate-btn.bad:hover { border-color: var(--crit); background: #fdecec; }
.rating-badge { display: inline-block; font-size: 0.82rem; font-weight: 600; padding: 4px 12px;
  border-radius: 16px; margin-bottom: 12px; }
.rating-badge.good { background: #e6f6ee; color: #18794e; }
.rating-badge.neutral { background: #fff3e0; color: #b45309; }
.rating-badge.bad { background: #fdecec; color: #c0392b; }

/* Busy overlay */
.busy { position: fixed; inset: 0; background: rgba(245,247,250,.8); display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px; z-index: 50; }
.spinner { width: 42px; height: 42px; border: 4px solid #d6e0e8; border-top-color: var(--teal);
  border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#busy-text { color: var(--muted); font-weight: 550; }

/* ---------- Playbook (owner) ---------- */
.pb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pb-voice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-voice-badge { font-weight: 600; color: var(--teal); background: #e8f5f3;
  border-radius: 20px; padding: 3px 12px; font-size: 0.85rem; }
.playbook-list { margin-top: 10px; }
.pb-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 8px 0; box-shadow: var(--shadow); }
.pb-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pb-title { font-weight: 600; color: var(--ink); }
.pb-beats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.pb-beat { font-size: 0.72rem; color: var(--muted); background: var(--bg);
  border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; }
.pb-script { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  color: var(--ink); line-height: 1.55; white-space: pre-wrap; }

/* ---------- Voice questionnaire (Tier 1) ---------- */
.voice-q { text-align: left; margin: 14px 0; }
.voice-q > label { display: block; font-weight: 550; color: var(--ink); margin-bottom: 6px; font-size: 0.92rem; }
.voice-scale { display: flex; align-items: center; gap: 10px; }
.voice-scale input[type=range] { flex: 1; accent-color: var(--teal); }
.voice-q textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font: inherit; color: var(--ink); resize: vertical; box-sizing: border-box; }
.voice-progress { text-align: center; margin-top: 12px; padding: 10px; border-radius: 8px;
  background: #e8f5f3; color: var(--teal); font-weight: 550; font-size: 0.9rem; }
.voice-quota { text-align: center; font-size: 0.85rem; font-weight: 550; color: var(--teal);
  background: #e8f5f3; border-radius: 8px; padding: 7px 10px; margin: 4px 0 8px; }
.voice-quota.none-left { color: var(--bad); background: #fdf3e7; }

/* b2c email gate */
.gate-alt { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 12px; }
.gate-alt a { color: var(--accent); text-decoration: none; }

/* settings view (b2c) */
.settings-wrap { max-width: 460px; margin: 24px auto; display: flex; flex-direction: column; gap: 20px; padding: 0 16px; }
.settings-card { background: var(--card, #fff); border: 1px solid var(--border, #e3e3e3); border-radius: 14px; padding: 20px; }
.settings-card h2 { margin: 0 0 8px; font-size: 1.05rem; }
.settings-card .gate-btn { margin-top: 4px; }

/* role/track pills + danger zone */
.track-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.track-row.big { flex-direction: column; margin: 16px 0 4px; }
.track-pill { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border, #d8d8d8); background: transparent; color: inherit; font-size: 0.95rem; cursor: pointer; }
.track-row.big .track-pill { padding: 14px; font-size: 1.05rem; }
.track-pill.selected { border-color: var(--accent, #0a8f8f); background: var(--accent, #0a8f8f); color: #fff; }
.settings-card.danger { border-color: #d9534f55; }
.danger-btn { background: #b8433f; }
