/**
 * 演练场样式
 *
 * 基调：和主站同一套纸感/深红，但更「会议室」——少装饰、多留白、
 * 信息密度高。不放熊猫，不做儿童动画。
 */

.hidden { display: none !important; }

.t-body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.t-body * { box-sizing: border-box; }

/* ── 顶栏 ───────────────────────────────────────────── */
.t-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.t-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.t-brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--brand); color: var(--brand);
  font-family: var(--serif); font-size: 17px; line-height: 1;
}
.t-brand-text { font-family: var(--serif); font-size: 17px; letter-spacing: .04em; }
.t-brand-text small { display: block; font-family: var(--sans); font-size: 10px; color: var(--ink-faint); letter-spacing: .18em; }
.t-top-right { display: flex; align-items: center; gap: 10px; }
.t-account { font-size: 12px; color: var(--ink-faint); }

/* ── 主区 ───────────────────────────────────────────── */
.t-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 18px 64px;
}
.t-screen { animation: t-in .18s ease-out; }
@keyframes t-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.t-hero { padding: 22px 0 18px; border-bottom: 1px solid var(--line-soft); }
.t-hero h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 600;
  line-height: 1.35;
}
.t-hero p { margin: 0 0 16px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; max-width: 640px; }
.t-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.t-kicker { margin: 0 0 6px; font-size: 11px; letter-spacing: .12em; color: var(--brand); text-transform: uppercase; }
.t-muted { color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.t-center { text-align: center; }
.t-summary { color: var(--ink-soft); font-size: 14px; line-height: 1.8; margin: 8px 0 0; max-width: 720px; }
.t-pre { white-space: pre-wrap; font-family: var(--sans); font-size: 13px; line-height: 1.8; color: var(--ink-soft); margin: 0; }

.t-back {
  appearance: none; border: 0; background: transparent; color: var(--ink-soft);
  font-size: 13px; padding: 6px 0; margin-bottom: 14px; cursor: pointer;
}
.t-back:hover { color: var(--brand); }

/* ── 按钮 ───────────────────────────────────────────── */
.t-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 9px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  min-height: 38px;
}
.t-btn:hover { background: var(--paper-sink); border-color: var(--line); }
.t-btn:disabled { opacity: .45; cursor: not-allowed; }
.t-btn-primary { background: var(--brand); border-color: var(--brand); color: #FFFDF6; }
.t-btn-primary:hover { background: var(--seal-press); border-color: var(--seal-press); }
.t-btn-danger { border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand); }
.t-btn-danger:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.t-btn-ghost { border-color: transparent; color: var(--ink-soft); }
.t-btn-ghost:hover { color: var(--brand); background: transparent; }
.t-btn-lg { padding: 12px 22px; font-size: 15px; min-height: 46px; }
.t-btn-sm { padding: 4px 8px; min-height: 26px; font-size: 12px; }
.t-icon {
  appearance: none; border: 1px solid var(--line-soft); background: transparent;
  width: 30px; height: 30px; line-height: 1; font-size: 18px; color: var(--ink-soft);
  cursor: pointer;
}

/* ── 场景卡 ─────────────────────────────────────────── */
.t-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.t-card {
  border: 1px solid var(--line);
  background: var(--paper-raise);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
}
.t-card:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.t-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.t-tag {
  display: inline-block; padding: 2px 7px; border: 1px solid var(--line-soft);
  font-size: 11px; color: var(--ink-soft); white-space: nowrap;
}
.t-tag-hot { border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand); }
.t-card h3 { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.4; }
.t-card .t-person-line { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12px; }
.t-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.t-card-actions { display: flex; gap: 6px; }

.t-avatar {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
}
.t-avatar-sm { width: 34px; height: 34px; flex-basis: 34px; font-size: 14px; background: var(--brand); }

.t-person { display: flex; align-items: center; gap: 10px; }
.t-person strong { display: block; font-size: 14px; }
.t-person span { font-size: 12px; }

/* ── 简报 / 准备 ────────────────────────────────────── */
.t-brief-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; margin-bottom: 18px; flex-wrap: wrap;
}
.t-brief-head h2 { margin: 0 0 6px; font-family: var(--serif); font-size: clamp(20px, 3.4vw, 26px); font-weight: 600; }
.t-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.t-panel {
  border: 1px solid var(--line-soft);
  background: var(--paper-raise);
  padding: 16px;
  margin-bottom: 14px;
}
.t-panel h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .04em; color: var(--ink); }
.t-panel h4 { margin: 14px 0 6px; font-size: 12px; color: var(--ink-soft); }
.t-panel-warn { border-color: color-mix(in srgb, var(--brand) 35%, transparent); background: color-mix(in srgb, var(--brand) 4%, var(--paper)); }
.t-list { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.8; color: var(--ink-soft); }
.t-list-tight { line-height: 1.65; }
.t-stages { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.t-stages li strong { color: var(--ink); font-weight: 500; }
.t-brief-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* ── 通话 ───────────────────────────────────────────── */
.t-call {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
}
.t-call-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.t-call-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.t-call-who strong { display: block; font-size: 14px; }
.t-call-stage { display: block; font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.t-call-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
#call-timer { font-variant-numeric: tabular-nums; font-size: 15px; }
.t-call-status { font-size: 11px; color: var(--ink-faint); }
.t-progress { display: flex; gap: 6px; margin: 12px 0 0; }
.t-progress span {
  height: 3px; flex: 1; background: var(--line-soft);
}
.t-progress span.on { background: var(--brand); }
.t-progress span.done { background: color-mix(in srgb, var(--brand) 55%, var(--line-soft)); }

.t-stage-orb { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 26px 0 18px; }
.t-orb {
  width: 86px; height: 86px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  position: relative;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 65%);
}
.t-orb::after {
  content: ''; position: absolute; inset: 14px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}
.t-orb.talking { animation: orb-pulse 1.1s ease-in-out infinite; }
@keyframes orb-pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 12%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
#call-level { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); opacity: .35; transition: opacity .1s, transform .1s; }

.t-captions {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid var(--line-soft);
  padding: 12px 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
  -webkit-overflow-scrolling: touch;
}
.t-bubble { max-width: 86%; padding: 8px 11px; font-size: 13px; line-height: 1.65; border: 1px solid var(--line-soft); }
.t-bubble-user { align-self: flex-end; background: color-mix(in srgb, var(--ink) 5%, var(--paper)); }
.t-bubble-customer { align-self: flex-start; background: var(--paper); border-left: 2px solid var(--brand); }
.t-bubble-label { display: block; font-size: 10px; color: var(--ink-faint); margin-bottom: 2px; letter-spacing: .06em; }

.t-hint-panel {
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  background: color-mix(in srgb, var(--brand) 4%, var(--paper));
  padding: 10px 12px;
  margin-bottom: 8px;
}
.t-hint-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.t-hint-head strong { font-size: 11px; letter-spacing: .1em; color: var(--brand); }
.t-hint-panel p { margin: 0; font-size: 13px; line-height: 1.65; }

.t-call-actions { display: flex; gap: 10px; padding-top: 8px; }
.t-call-actions .t-btn { flex: 1; min-height: 44px; }

/* ── 复盘 ───────────────────────────────────────────── */
.t-debrief-head { display: flex; gap: 20px; align-items: flex-start; margin: 6px 0 18px; flex-wrap: wrap; }
.t-score {
  flex: 0 0 auto; width: 104px; height: 104px; border: 1px solid var(--line);
  border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--serif);
}
.t-score span { font-size: 34px; line-height: 1; color: var(--brand); }
.t-score small { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.t-dims { display: grid; gap: 10px; margin-bottom: 18px; }
.t-dim { border: 1px solid var(--line-soft); padding: 12px 14px; background: var(--paper-raise); }
.t-dim-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.t-dim-head strong { font-size: 13px; }
.t-dim-head span { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--brand); }
.t-bar { height: 4px; background: var(--line-soft); margin: 8px 0; }
.t-bar i { display: block; height: 100%; background: var(--brand); }
.t-dim p { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.t-quote { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--line); font-size: 12px; color: var(--ink-soft); line-height: 1.65; }
.t-quote em { font-style: normal; color: var(--ink); }

.t-qlist { display: grid; gap: 10px; }
.t-qcard { border: 1px solid var(--line-soft); padding: 10px 12px; background: var(--paper); }
.t-qcard strong { display: block; font-size: 13px; line-height: 1.6; }
.t-qcard .t-a { margin-top: 6px; font-size: 12px; color: var(--ink-soft); line-height: 1.65; }
.t-qcard .t-better { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--ink); border-top: 1px dashed var(--line-soft); padding-top: 6px; }
.t-qcard .t-better b { color: var(--brand); font-weight: 500; }

.t-transcript { max-height: 360px; overflow-y: auto; border-top: 1px solid var(--line-soft); padding-top: 10px; display: grid; gap: 8px; }
.t-transcript .t-qcard { background: transparent; border: 0; border-left: 2px solid var(--line-soft); padding: 2px 0 2px 10px; }
.t-debrief-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.t-spinner {
  width: 26px; height: 26px; margin: 0 auto 12px; border: 2px solid var(--line);
  border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 题库 / 练习 ────────────────────────────────────── */
.t-bank { display: grid; gap: 10px; }
.t-bank-card { border: 1px solid var(--line-soft); padding: 12px; }
.t-bank-card h4 { margin: 0 0 6px; font-size: 13px; line-height: 1.6; }
.t-bank-card .t-ideal { font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.t-bank-card .t-follow { margin-top: 6px; font-size: 12px; color: var(--ink-faint); }
.t-chip { display: inline-block; padding: 1px 6px; border: 1px solid var(--line-soft); font-size: 10px; margin-right: 4px; color: var(--ink-soft); }
.t-drill { display: grid; gap: 8px; }
.t-feedback { border: 1px solid var(--line); padding: 12px; margin-top: 6px; font-size: 13px; line-height: 1.7; }
.t-feedback strong { color: var(--brand); font-weight: 500; }

/* ── 表单 ───────────────────────────────────────────── */
.t-label { display: block; font-size: 12px; color: var(--ink-soft); margin: 10px 0 0; }
.t-input, .t-select, .t-textarea {
  display: block; width: 100%; margin-top: 4px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: 13px; padding: 9px 10px; min-height: 38px;
}
.t-textarea { resize: vertical; line-height: 1.65; }
.t-input:focus, .t-select:focus, .t-textarea:focus { outline: 1px solid var(--brand); outline-offset: 0; }
.t-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.t-form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── 弹层 ───────────────────────────────────────────── */
.t-modal {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  padding: 18px; background: color-mix(in srgb, var(--ink) 45%, transparent);
}
.t-modal-card {
  width: min(520px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); padding: 22px;
}
.t-modal-wide { width: min(760px, 100%); }
.t-modal-card h2 { margin: 0 0 12px; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.t-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.t-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ── toast ──────────────────────────────────────────── */
.t-toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); z-index: 80;
  background: var(--ink); color: var(--paper);
  padding: 9px 14px; font-size: 13px; line-height: 1.5;
  max-width: min(560px, calc(100vw - 32px));
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
.t-toast.show { opacity: 1; transform: translate(-50%, 0); }
.t-toast.error { background: var(--brand); }

/* ── 小屏 ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .t-main { padding: 14px 12px 48px; }
  .t-grid2 { grid-template-columns: 1fr; }
  .t-form-grid, .t-form-grid-3 { grid-template-columns: 1fr; }
  .t-brief-head { gap: 10px; }
  .t-call { padding: max(8px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)); }
  .t-call-who strong { font-size: 13px; }
  .t-orb { width: 72px; height: 72px; }
  .t-captions { flex: 1; }
  .t-score { width: 88px; height: 88px; }
  .t-score span { font-size: 28px; }
  .t-card { min-height: 0; }
}


/* 成人线：钱包入口与时长套餐 */
.t-wallet {
  border: 1px solid rgba(26,26,26,.14);
  background: #FFF9EC;
  color: #8B0000;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.t-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.t-pricing-item {
  border: 1px solid rgba(26,26,26,.12);
  border-radius: 10px;
  padding: 12px;
  background: #FFFDF6;
  text-align: center;
}
.t-pricing-item b { display: block; font-size: 16px; }
.t-pricing-item span { display: block; margin-top: 4px; font-size: 12px; color: #6B6457; }
@media (max-width: 420px) {
  .t-wallet { font-size: 12px; padding: 5px 9px; }
  .t-pricing-grid { grid-template-columns: 1fr; }
}

/* 实体卡徽标 / 激活表单 */
.t-tag-card { background: #8B0000; color: #FFFDF6; }
.t-error { color: #8B0000; font-size: 13px; margin: 8px 0 0; }
