/* First-batch experience refresh: login, training, history and personal center. */

body {
  background: var(--fd-page-tint);
}

.login-shell {
  min-height: 100svh;
  padding: 24px 18px;
  place-items: center;
  background: var(--fd-brand-jade-soft);
}

.login-panel {
  width: min(400px, 100%);
  padding: 24px 28px;
  gap: 14px;
  border: 1px solid var(--fd-color-line);
  border-radius: var(--fd-radius-lg);
  box-shadow: 0 20px 48px rgb(29 44 56 / 8%);
}

.login-panel .product-heading {
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.login-panel .product-heading h1 {
  font-size: 24px;
  line-height: var(--fd-line-height-title);
}

#loginStatus {
  font-size: var(--fd-font-size-meta);
}

.login-panel .product-heading p {
  display: none;
}

.login-status:empty {
  display: none;
}

.login-status:not(:empty) {
  margin: 0;
  color: var(--fd-color-danger);
  font-size: var(--fd-font-size-meta);
}

.login-panel label,
.phone-auth-panel label,
.legacy-account-panel label {
  gap: 7px;
}

.login-panel input,
.phone-auth-panel input,
.phone-auth-panel button {
  min-height: var(--fd-control-height-lg);
}

.password-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.password-input-row input {
  min-width: 0;
}

.password-visibility-toggle {
  min-width: 58px;
  padding-inline: 12px;
  border-color: var(--fd-color-line);
  background: var(--fd-color-surface);
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-body-sm);
}

.password-visibility-toggle:hover {
  border-color: var(--fd-brand-jade);
  color: var(--fd-brand-jade-deep);
}

.login-panel > button {
  min-height: var(--fd-control-height-lg);
}

.login-panel #loginBtn {
  border-color: var(--fd-brand-jade);
  background: var(--fd-brand-jade);
}

.login-panel #showPhoneAuthBtn,
.login-panel #showPhoneLoginBtn {
  border-color: transparent;
  background: transparent;
  color: var(--fd-color-ink-soft);
}

.login-panel #showPhoneAuthBtn:hover,
.login-panel #showPhoneLoginBtn:hover {
  border-color: var(--fd-color-line);
  background: var(--fd-color-surface-soft);
}

.phone-auth-panel,
.legacy-account-panel {
  display: grid;
  gap: 12px;
}

.phone-auth-panel {
  gap: 12px;
  padding-top: 0;
  border-top: 0;
}

.phone-auth-panel:not([data-mode="register"]) .phone-auth-heading {
  display: none;
}

.phone-auth-heading h2 {
  margin: 0;
  color: var(--fd-color-ink);
  font-size: var(--fd-font-size-card-title);
  font-weight: var(--fd-font-weight-semibold);
}

.phone-auth-heading p {
  margin: 4px 0 0;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-meta);
}

.phone-auth-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 2px;
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface-soft);
}

.phone-auth-modes button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-body-sm);
}

.phone-auth-modes button.is-active {
  background: var(--fd-color-surface);
  box-shadow: 0 1px 3px rgb(29 44 56 / 10%);
  color: var(--fd-color-ink);
}

.phone-auth-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-meta);
}

.phone-auth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-meta);
  line-height: 1;
}

.phone-auth-divider::before,
.phone-auth-divider::after {
  height: 1px;
  background: var(--fd-color-line);
  content: "";
}

.wechat-web-login {
  width: 100%;
  min-height: 44px !important;
  border-color: #b9dcca !important;
  background: #f4fbf7 !important;
  color: #23734a !important;
  font-size: var(--fd-font-size-body) !important;
  font-weight: var(--fd-font-weight-medium);
}

.wechat-web-login::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #36a66d;
  box-shadow: 5px 3px 0 -2px #36a66d;
  content: "";
  vertical-align: 2px;
}

.wechat-web-login:hover:not(:disabled) {
  border-color: #6daf89 !important;
  background: #ebf8f0 !important;
  color: #195d39 !important;
}

.wechat-web-login:disabled {
  cursor: wait;
  opacity: .7;
}

.phone-auth-actions {
  display: block;
}

.phone-auth-actions .primary {
  width: 100%;
  border-color: var(--fd-brand-jade);
  background: var(--fd-brand-jade);
  color: var(--fd-color-surface);
  font-size: var(--fd-font-size-card-title);
  font-weight: var(--fd-font-weight-medium);
}

.phone-auth-register-cta {
  width: 100%;
  min-height: 44px !important;
  border: 1px solid var(--fd-brand-jade) !important;
  background: var(--fd-brand-jade-soft) !important;
  color: var(--fd-brand-jade-deep) !important;
  font-size: var(--fd-font-size-body-sm) !important;
  font-weight: var(--fd-font-weight-semibold);
}

.phone-auth-register-cta:hover:not(:disabled) {
  background: #e5f3ee !important;
}

.phone-auth-links button {
  min-height: auto !important;
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--fd-color-ink-soft);
  font-size: inherit;
}

.phone-auth-links button:hover {
  color: var(--fd-brand-jade-deep);
  text-decoration: underline;
}

.login-panel .phone-privacy-consent,
.phone-auth-panel .phone-privacy-consent,
.legacy-account-panel .phone-privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-meta);
  line-height: 1.5;
}

.login-panel .phone-privacy-consent input,
.phone-auth-panel .phone-privacy-consent input,
.legacy-account-panel .phone-privacy-consent input {
  flex: 0 0 auto;
  width: 15px;
  min-width: 15px;
  height: 15px;
  min-height: 15px;
  max-height: 15px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--fd-brand-jade);
}

.login-panel .phone-privacy-consent > span,
.phone-auth-panel .phone-privacy-consent > span,
.legacy-account-panel .phone-privacy-consent > span {
  min-width: 0;
}

.phone-privacy-consent a,
.phone-privacy-entry a,
.personal-privacy-link,
.personal-cancellation-link {
  color: var(--fd-brand-jade-deep);
  text-decoration: none;
}

.personal-cancellation-link {
  border-color: #e7b8b1;
  color: var(--fd-color-danger);
}

.personal-cancellation-link:hover {
  border-color: var(--fd-color-danger);
  background: var(--fd-color-danger-soft);
}

.phone-privacy-consent a:hover,
.phone-privacy-entry a:hover,
.personal-privacy-link:hover {
  text-decoration: underline;
}

.phone-privacy-entry {
  margin: 0;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-meta);
  line-height: 1.5;
  text-align: center;
}

.legacy-account-panel {
  padding-top: 8px;
  border-top: 1px solid var(--fd-color-line);
}

.legacy-account-panel h2 {
  margin: 0;
  color: var(--fd-color-ink);
  font-size: var(--fd-font-size-card-title);
  font-weight: var(--fd-font-weight-semibold);
}

.legacy-account-panel p {
  margin: 4px 0 0;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-meta);
}


.shell {
  padding: 20px;
  place-items: start center;
  align-content: start;
}

.call {
  position: relative;
  width: min(1440px, 100%);
  min-height: calc(100svh - 40px);
  border-radius: var(--fd-radius-lg);
  box-shadow: var(--fd-shadow-md);
}

.topbar {
  min-height: 80px;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.workspace-brand {
  min-width: 0;
}

.call .product-heading h1 {
  color: var(--fd-color-ink);
  font-size: var(--fd-font-size-workspace-title);
}

.workspace-mode,
#status {
  display: none;
}

.workspace-nav {
  justify-self: center;
  padding: 3px;
  border-color: var(--fd-color-line);
  background: var(--fd-color-surface-soft);
}

.workspace-nav :is(#trainingBtn, #myTasksBtn, #historyBtn, #feedbackBtn, #personalCenterBtn) {
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-body);
  font-weight: var(--fd-font-weight-regular);
  line-height: var(--fd-line-height-body);
}

.workspace-nav button.is-active {
  background: var(--fd-color-surface);
  box-shadow: var(--fd-shadow-sm);
}

.topbar-utility {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  z-index: 3;
}

.workspace-tools[open] {
  z-index: 4;
}

.workspace-tools > div {
  z-index: 5;
}

.account-button {
  max-width: 210px;
  border-color: var(--fd-color-line);
  background: var(--fd-color-surface);
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-body-sm);
}

.admin-console-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--fd-color-line-strong);
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface);
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-body-sm);
  line-height: var(--fd-line-height-body);
  text-decoration: none;
  white-space: nowrap;
}

.admin-console-link:hover {
  border-color: var(--fd-color-primary);
  color: var(--fd-color-primary);
}

.workspace-tools summary {
  min-height: 36px;
  font-size: var(--fd-font-size-body-sm);
}

.meter {
  display: none;
}

.training-workspace {
  grid-template-columns: minmax(0, 1fr) 316px;
  background: var(--fd-color-page);
}

.training-main {
  border-right-color: var(--fd-color-line);
}

.customer {
  min-height: 116px;
  padding: 20px 24px;
  background: var(--fd-color-surface);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--fd-radius-md);
  background: #456274;
}

.customer h2 {
  margin-top: 2px;
  font-size: var(--fd-font-size-workspace-title);
}

.customer p {
  max-width: 76ch;
  color: var(--fd-color-ink-soft);
}

.harness {
  grid-template-columns: minmax(130px, .7fr) minmax(0, 2fr) 96px;
  gap: 0;
  padding: 0 24px;
  background: var(--fd-color-surface);
}

.harness > div {
  min-height: 64px;
  justify-content: center;
  gap: 3px;
}

.harness > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--fd-color-line);
}

.harness span {
  color: var(--fd-color-muted);
}

.harness strong {
  color: var(--fd-color-ink-soft);
}

.actions {
  grid-template-columns: minmax(92px, .55fr) minmax(190px, 1.2fr) minmax(156px, .9fr) auto;
  padding: 14px 24px 16px;
  background: var(--fd-color-surface-soft);
  border-block: 1px solid var(--fd-color-line);
}

.actions:has(.scenario-control:not([hidden])) {
  grid-template-columns: minmax(220px, 1.25fr) minmax(92px, .55fr) minmax(190px, 1.2fr) minmax(156px, .9fr) auto;
}

.persona-control,
.voice-control {
  min-width: 0;
}

.persona-control select,
.voice-control select {
  width: 100%;
  min-width: 0;
}

.actions .call-actions {
  grid-column: 4;
}

.actions:has(.scenario-control:not([hidden])) .call-actions {
  grid-column: 5;
}

.difficulty-control {
  gap: 5px;
  color: var(--fd-color-muted);
}

.difficulty-control select,
#startBtn,
#stopBtn {
  min-height: var(--fd-control-height-md);
  height: var(--fd-control-height-md);
  border-radius: var(--fd-radius-md);
}

#startBtn {
  min-width: 88px;
  border-color: var(--fd-color-primary);
  background: var(--fd-color-primary);
}

#stopBtn:not(:disabled) {
  background: var(--fd-color-danger-soft);
}

.difficulty-experiment-panel {
  padding: 10px 24px;
  background: var(--fd-color-surface-soft);
  border-bottom-color: var(--fd-color-line);
}

.live-session-stage {
  --live-session-stage-top: 80px;
  --live-session-stage-right: 20px;
  --live-session-stage-bottom: 20px;
  --live-session-stage-left: 20px;
  position: fixed;
  z-index: 20;
  inset: var(--live-session-stage-top) var(--live-session-stage-right) var(--live-session-stage-bottom) var(--live-session-stage-left);
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(370px, .72fr);
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: #f5f5f7;
}

.live-session-stage[hidden] { display: none; }
.live-session-stage.is-transcript-hidden { grid-template-columns: minmax(0, 1fr); }
body.live-call-active { overflow: hidden; }

.live-call-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  padding: 28px clamp(28px, 4vw, 64px) 30px;
  overflow: hidden;
  color: #f6f4fb;
  background: linear-gradient(155deg, #222b48 0%, #171522 52%, #2b1c32 100%);
}

.live-call-stage::before,
.live-call-stage::after {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border: 1px solid rgba(255, 236, 246, .07);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.live-call-stage::before { top: 17%; left: 50%; transform: translateX(-50%); }
.live-call-stage::after { top: 26%; left: 50%; width: 30vw; height: 30vw; transform: translateX(-50%); }

.live-call-stage-header,
.live-call-stage-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.live-coaching-tip-panel {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: 0;
  padding: 16px 18px;
  border: 1px solid #f0c7a1;
  border-radius: 8px;
  background: #fffaf3;
  box-shadow: 0 10px 24px rgb(84 55 22 / 10%);
  overflow: auto;
}

.live-coaching-tip-panel header > div,
.live-coaching-tip-panel dl > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
}

.live-coaching-tip-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f4dfc8;
}

.live-coaching-tip-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #8a5a18;
  font-size: 22px;
  font-weight: var(--fd-font-weight-regular);
  line-height: 1;
}

.live-coaching-tip-close:hover { background: #f8ead9; }

.live-coaching-tip-panel header span,
.live-coaching-tip-panel dt {
  color: #8a5a18;
  font-size: 12px;
}

.live-coaching-tip-panel header strong {
  color: #3b2a16;
  font-size: 14px;
}

.live-coaching-tip-panel dl {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
}

.live-coaching-tip-panel dt,
.live-coaching-tip-panel dd,
.live-coaching-tip-panel p {
  margin: 0;
}

.live-coaching-tip-panel dd {
  color: #4a4033;
  font-size: 13px;
  line-height: 1.55;
}

.live-coaching-tip-panel p {
  margin-top: 12px;
  color: #96744c;
  font-size: 12px;
}

.live-call-stage-header > div { display: grid; gap: 4px; }
.live-call-header-status { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.live-call-stage-kicker { color: rgba(245, 242, 250, .6); font-size: 12px; line-height: 1.35; }
.live-call-stage-header strong { color: #fff; font-size: 15px; font-weight: var(--fd-font-weight-medium); }

.live-network-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(163, 220, 191, .28);
  border-radius: 999px;
  background: rgba(42, 113, 79, .22);
  color: #d7f3e2;
  font-size: 12px;
  white-space: nowrap;
}

.live-network-status[hidden] { display: none; }
.live-network-status[data-state="checking"] { color: rgba(245, 242, 250, .68); border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); }
.live-network-status[data-state="unstable"] { color: #ffe0a4; border-color: rgba(243, 186, 91, .5); background: rgba(123, 78, 16, .3); }
.live-network-status[data-state="offline"],
.live-network-status[data-state="disconnected"] { color: #ffd1d1; border-color: rgba(231, 111, 111, .52); background: rgba(133, 39, 39, .34); }

.live-call-timer {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .88);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.live-session-visual {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  align-self: center;
  width: clamp(220px, 24vw, 320px);
  height: clamp(220px, 24vw, 320px);
  margin: 16px auto 2px;
}

.live-session-avatar {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(92px, 9vw, 124px);
  height: clamp(92px, 9vw, 124px);
  color: #fff8fb;
  border-radius: 50%;
  background: linear-gradient(135deg, #f298bd, #ca5f91);
  box-shadow: 0 22px 56px rgba(239, 119, 173, .28), inset 0 1px 0 rgba(255, 255, 255, .24);
  font-size: clamp(34px, 3vw, 46px);
  font-weight: var(--fd-font-weight-medium);
}

.live-session-ring {
  position: absolute;
  border: 1px solid rgba(248, 178, 211, .38);
  border-radius: 50%;
  animation: live-session-pulse 2.2s ease-out infinite;
}

.live-session-ring.ring-one { width: 58%; height: 58%; }
.live-session-ring.ring-two { width: 88%; height: 88%; animation-delay: .75s; }

.live-session-wave {
  position: absolute;
  z-index: 3;
  right: 16%;
  bottom: 25%;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
}

.live-session-wave i {
  display: block;
  width: 4px;
  height: 17px;
  border-radius: 99px;
  background: #ffd0e7;
  animation: live-session-wave 900ms ease-in-out infinite;
}

.live-session-wave i:nth-child(2) { height: 28px; animation-delay: 110ms; }
.live-session-wave i:nth-child(3) { height: 21px; animation-delay: 220ms; }
.live-session-wave i:nth-child(4) { height: 32px; animation-delay: 330ms; }

.live-call-stage-copy {
  position: absolute;
  z-index: 2;
  top: calc(50% + clamp(116px, 12vw, 154px));
  right: 20px;
  left: 20px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.live-session-context,
.live-session-status { margin: 0; }
.live-session-context { color: rgba(247, 244, 250, .64); font-size: 14px; line-height: 1.45; }
.live-session-status { display: block; color: #fff; font-size: clamp(18px, 1.8vw, 24px); font-weight: var(--fd-font-weight-medium); }
.live-session-countdown { position: absolute; z-index: 4; top: 50%; left: 50%; display: grid; place-items: center; width: clamp(136px, 15vw, 176px); aspect-ratio: 1; color: #fff; border: 4px solid rgba(255,255,255,.72); border-radius: 50%; background: #ef4764; box-shadow: 0 16px 48px rgba(14,12,25,.34); font-size: clamp(64px, 7vw, 82px); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; transform: translate(-50%, -50%); }
.live-session-countdown[hidden] { display: none; }

.wecom-desktop-browser-handoff {
  position: absolute;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 17, 34, .62);
}

.wecom-desktop-browser-handoff[hidden] { display: none; }

.wecom-desktop-browser-handoff-dialog {
  display: grid;
  gap: 12px;
  width: min(430px, 100%);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .32);
  text-align: left;
}

.wecom-desktop-browser-handoff-kicker {
  color: #667085;
  font-size: 12px;
}

.wecom-desktop-browser-handoff h2 {
  margin: 0;
  color: #1d2939;
  font-size: 20px;
  font-weight: var(--fd-font-weight-medium);
}

.wecom-desktop-browser-handoff p {
  margin: 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.6;
}

.wecom-desktop-browser-handoff button {
  justify-self: stretch;
  min-height: 42px;
  margin-top: 4px;
  border-color: #315be8;
  background: #315be8;
  color: #fff;
}

.live-call-self { display: flex; align-items: center; gap: 10px; color: rgba(247, 244, 250, .76); font-size: 13px; }
.live-call-self i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-style: normal;
  font-size: 13px;
}

@keyframes live-session-pulse {
  0% { transform: scale(.76); opacity: .82; }
  100% { transform: scale(1); opacity: 0; }
}

@keyframes live-session-wave {
  0%, 100% { transform: scaleY(.55); opacity: .55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.live-call-stage-actions { display: inline-flex; align-items: center; gap: 10px; }
.live-call-secondary-action,
.live-call-stop-action {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 7px;
  font-family: var(--fd-font-sans);
  font-size: 13px;
  font-weight: var(--fd-font-weight-regular);
}
.live-call-secondary-action { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .9); }
.live-call-secondary-action:hover { border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .16); }
.live-call-stop-action { border-color: #e98cac; background: #f3a0bd; color: #3d1324; }
.live-call-stop-action:hover { border-color: #ffc0d5; background: #ffc0d5; }
.live-call-stop-action.is-return { border-color: #d6b0c2; background: #f8e8ef; color: #542536; }

.live-transcript-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  background: #f5f5f7;
}
.live-transcript-panel[hidden] { display: none; }

.live-transcript-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 26px 20px;
  border-bottom: 1px solid #e4e4e8;
}
.live-transcript-heading > div { display: grid; gap: 4px; }
.live-transcript-heading span { color: #89878f; font-size: 12px; }
.live-transcript-heading h2 { margin: 0; color: #292630; font-size: 18px; font-weight: var(--fd-font-weight-medium); }
.live-transcript-heading p { max-width: 154px; margin: 1px 0 0; color: #92909a; font-size: 12px; line-height: 1.5; text-align: right; }

.live-session-stage .transcript {
  min-height: 0;
  padding: 20px 22px 28px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  scrollbar-color: #cbc9d0 transparent;
}
.live-session-stage .transcript:empty::before {
  content: "通话开始后将在此显示文字记录";
  align-self: center;
  margin: auto 0;
  color: #97959d;
  font-size: 13px;
}

.line {
  max-width: min(88%, 390px);
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(31, 25, 39, .03);
  font-size: 14px;
  line-height: 1.62;
}
.line.user { background: #ffeaf2; color: #6d2943; }
.line.ai { border-color: #e3e2e7; background: #fff; color: #34313b; }
.line.system { max-width: 100%; align-self: center; padding: 4px 8px; border: 0; background: transparent; color: #9b98a1; font-size: 12px; }

.training-sidebar {
  padding: 14px;
  gap: 12px;
  background: #f8fbfb;
}

.training-side-section,
.sales-guide,
.active-task-banner {
  border-color: var(--fd-color-line);
  border-radius: var(--fd-radius-md);
  box-shadow: none;
}

/* This component uses flex when active, so preserve the semantic hidden state
 * instead of letting its layout rule reveal an unselected task banner. */
.active-task-banner[hidden] {
  display: none !important;
}

.training-side-heading {
  min-height: 42px;
  padding-inline: 12px;
}

.training-side-heading span {
  color: var(--fd-color-ink-soft);
}

.training-side-heading strong {
  color: var(--fd-color-muted);
}

.training-sidebar .harness-detail {
  padding: 12px;
  gap: 12px;
}

.training-sidebar .harness-detail p {
  color: var(--fd-color-ink-soft);
}

.learn-chip {
  min-height: 32px;
  border-color: var(--fd-color-line);
  background: var(--fd-color-surface-soft);
}

.sales-guide summary {
  min-height: 54px;
}

.sales-guide-layout {
  gap: 16px;
}

.sales-guide-layout h3 {
  margin-bottom: 7px;
}

/* Scenario-first training entry: choose context before configuring a session. */
.call:not(.is-navigation-view) {
  display: flex;
  flex-direction: column;
}

.visitor-preview-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .95fr);
  gap: 28px;
  width: min(calc(100% - 96px), 1160px);
  box-sizing: border-box;
  padding: 30px 34px;
  margin: 32px auto 0;
  border: 1px solid #f3d9de;
  border-radius: 16px;
  background: #fff8f9;
}

.visitor-preview-banner[hidden] { display: none; }

.visitor-preview-copy > span {
  display: block;
  color: var(--fd-brand-coral);
  font-size: 13px;
  font-weight: var(--fd-font-weight-semibold);
  letter-spacing: .06em;
}

.visitor-preview-copy h2 {
  margin: 8px 0 10px;
  color: var(--fd-color-ink);
  font-size: 30px;
  font-weight: var(--fd-font-weight-bold);
  line-height: 1.2;
}

.visitor-preview-copy p {
  max-width: 580px;
  margin: 0;
  color: var(--fd-color-ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.visitor-preview-copy .visitor-preview-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  margin-top: 18px;
  border-color: var(--fd-brand-coral);
  border-radius: 8px;
  background: var(--fd-brand-coral);
  color: #fff;
  font-size: 14px;
  font-weight: var(--fd-font-weight-medium);
  text-decoration: none;
}

.visitor-preview-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.visitor-preview-steps li {
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid #f2e3e6;
  border-radius: 10px;
  background: #fff;
}

.visitor-preview-steps strong,
.visitor-preview-steps span,
.visitor-preview-steps small {
  display: block;
}

.visitor-preview-steps strong { color: var(--fd-brand-coral); font-size: 12px; }
.visitor-preview-steps span { margin-top: 12px; color: var(--fd-color-ink); font-size: 14px; font-weight: var(--fd-font-weight-semibold); }
.visitor-preview-steps small { margin-top: 6px; color: var(--fd-color-muted); font-size: 12px; line-height: 1.45; }

.scenario-catalog-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 40px 48px 56px;
  background: #f5f6fa;
}

.scenario-catalog-heading {
  width: min(100%, 1160px);
  margin: 0 auto 30px;
}

.scenario-catalog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fd-brand-coral);
  font-size: var(--fd-font-size-body-sm);
  font-weight: var(--fd-font-weight-semibold);
  line-height: 20px;
}

.scenario-catalog-kicker::before {
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: var(--fd-brand-coral);
  content: "";
}

.scenario-setup-type {
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-meta);
  font-weight: var(--fd-font-weight-medium);
}

.scenario-catalog-heading h2 {
  margin: 10px 0 8px;
  color: var(--fd-color-ink);
  font-size: 30px;
  font-weight: var(--fd-font-weight-bold);
  line-height: 1.2;
}

.scenario-catalog-heading p {
  color: var(--fd-color-ink-soft);
  font-size: 15px;
}

.scenario-catalog-filters {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 50px;
  margin: 24px 0 0;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid #e2e6ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(32 45 64 / 5%);
}

.scenario-catalog-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7b8494;
  font-size: 14px;
  font-weight: var(--fd-font-weight-medium);
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.scenario-catalog-filter::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7afbc;
  content: "";
}

.scenario-catalog-filter[data-filter="phone_sales"]::before {
  background: var(--fd-brand-coral);
}

.scenario-catalog-filter[data-filter="in_person_meeting"]::before {
  background: #377cf2;
}

.scenario-catalog-filter[data-filter="online_meeting"]::before {
  background: #1aaf66;
}

.scenario-catalog-filter-label {
  line-height: 1;
}

.scenario-catalog-filter-count {
  min-width: 18px;
  color: #a0a8b5;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

.scenario-catalog-filter:hover,
.scenario-catalog-filter:focus-visible {
  color: var(--fd-color-ink);
  background: #f5f7fa;
}

.scenario-catalog-filter.is-active {
  background: var(--fd-brand-coral-soft);
  box-shadow: inset 0 0 0 1px #ffd8e1;
  color: var(--fd-brand-coral);
}

.scenario-catalog-filter.is-active::before {
  background: var(--fd-brand-coral);
}

.scenario-catalog-filter.is-active .scenario-catalog-filter-count {
  color: var(--fd-brand-coral);
}

.scenario-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 1160px);
  margin: 0 auto;
  gap: 16px;
}

.scenario-catalog-card {
  --scenario-card-cover-width: 184px;
  position: relative;
  display: block;
  min-width: 0;
  height: 172px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #ebeef3;
  border-radius: 16px;
  background: var(--fd-color-surface);
  box-shadow: 0 2px 6px rgb(32 45 64 / 4%);
  color: var(--fd-color-ink);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.scenario-catalog-card:hover:not(:disabled),
.scenario-catalog-card:focus-visible {
  border-color: var(--fd-brand-coral-line);
  box-shadow: 0 8px 20px rgb(32 45 64 / 9%);
  transform: translateY(-2px);
}

.scenario-catalog-card:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.scenario-card-cover {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: var(--scenario-card-cover-width);
  height: 100%;
  object-fit: cover;
  background: var(--fd-color-surface-soft);
}

/* Blend the photograph into the content surface, matching the catalog's
   editorial treatment while preserving a clean reading area for copy. */
.scenario-catalog-card::before {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: calc(var(--scenario-card-cover-width) - 80px);
  width: 136px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 72%) 62%, #fff 100%);
  content: "";
  pointer-events: none;
}

.scenario-card-content {
  position: absolute;
  z-index: 2;
  inset: 0 54px 0 calc(var(--scenario-card-cover-width) + 20px);
  display: block;
  min-width: 0;
  padding: 0;
}

.scenario-card-category {
  position: absolute;
  top: 24px;
  left: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 3px 9px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--fd-color-primary-soft);
  color: var(--fd-color-primary);
  font-size: 12px;
  font-weight: var(--fd-font-weight-medium);
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-card-category::before {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.scenario-card-category[data-scenario-type="in_person_meeting"] {
  background: #edf4ff;
  color: #377cf2;
}

.scenario-card-category[data-scenario-type="online_meeting"] {
  background: #ecfaf2;
  color: #1aaf66;
}

.scenario-card-content strong {
  position: absolute;
  top: 58px;
  right: 0;
  left: 0;
  display: block;
  height: 26px;
  min-height: 0;
  overflow: hidden;
  color: var(--fd-color-ink);
  font-size: 20px;
  font-weight: var(--fd-font-weight-bold);
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-card-description {
  position: absolute;
  top: 94px;
  right: 0;
  left: 0;
  display: -webkit-box;
  height: 40px;
  overflow: hidden;
  color: #9099a8;
  font-size: 13px;
  line-height: 20px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.scenario-card-arrow {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #f7f8fa;
  color: #c3c9d3;
  font-size: 19px;
  font-weight: var(--fd-font-weight-medium);
  line-height: 1;
  transition: background-color 160ms ease, color 160ms ease;
}

.scenario-catalog-card:hover:not(:disabled) .scenario-card-arrow,
.scenario-catalog-card:focus-visible .scenario-card-arrow {
  background: var(--fd-brand-coral-soft);
  color: var(--fd-brand-coral);
}

.scenario-setup-panel {
  padding: 20px 28px;
  border-bottom: 1px solid var(--fd-color-line);
  background: var(--fd-page-tint);
}

/* The setup summary already introduces the scenario and roles. Keep the live
   role card for the call stage instead of repeating a generic preview below. */
#scenarioSetupPanel:not(.is-hidden) ~ .training-workspace .customer,
#scenarioSetupPanel:not(.is-hidden) ~ .training-workspace .harness {
  display: none;
}

.scenario-setup-back {
  min-height: 32px;
  padding: 0;
  margin: 0 0 12px;
  border: 0;
  background: transparent;
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-body-sm);
}

.scenario-setup-summary {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 20px;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--fd-color-line);
  border-radius: var(--fd-radius-md);
  background: var(--fd-color-surface);
  box-shadow: var(--fd-shadow-sm);
}

.scenario-setup-cover {
  width: 176px;
  height: 124px;
  object-fit: cover;
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface-soft);
}

.scenario-setup-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.scenario-setup-copy h2 {
  margin: 4px 0 8px;
  color: var(--fd-color-ink);
  font-size: var(--fd-font-size-card-title);
  font-weight: var(--fd-font-weight-semibold);
}

.scenario-setup-copy > p {
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-body-sm);
  line-height: var(--fd-line-height-body);
}

.scenario-setup-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.scenario-setup-roles span {
  padding: 4px 8px;
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface-soft);
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-meta);
}

.scenario-setup-copy .scenario-setup-objective {
  margin-top: 9px;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-meta);
}

.training-workspace {
  flex: 1;
}

@media (max-width: 760px) {
  .visitor-preview-banner {
    grid-template-columns: 1fr;
    width: calc(100% - 32px);
    padding: 24px 20px;
    margin-top: 18px;
  }

  .visitor-preview-copy h2 { font-size: 25px; }
  .visitor-preview-steps { gap: 8px; }
  .visitor-preview-steps li { padding: 12px 9px; }

  .scenario-catalog-view {
    padding: 28px 16px 36px;
  }

  .scenario-catalog-heading {
    margin-bottom: 22px;
  }

  .scenario-catalog-heading h2 {
    font-size: 26px;
  }

  .scenario-catalog-filters {
    width: 100%;
    margin-top: 20px;
  }

  .scenario-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .scenario-catalog-card {
    --scenario-card-cover-width: 116px;
    height: 152px;
  }

  .scenario-card-content {
    inset: 0 46px 0 calc(var(--scenario-card-cover-width) + 16px);
  }

  .scenario-card-category {
    top: 18px;
  }

  .scenario-card-content strong {
    top: 52px;
    font-size: 17px;
    line-height: 24px;
  }

  .scenario-card-description {
    top: 84px;
    height: 40px;
  }

  .scenario-card-arrow {
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  .scenario-setup-panel {
    padding: 16px;
  }

  .scenario-setup-summary {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
  }

  .scenario-setup-cover {
    width: 104px;
    height: 112px;
  }
}

/* Navigation views share the training shell but read as independent work pages. */
.call.is-navigation-view {
  min-height: 80px;
  margin-bottom: 16px;
  overflow: visible;
  position: relative;
  z-index: 4;
}

.management-panel {
  width: min(1440px, 100%);
  min-height: calc(100svh - 136px);
  border-color: var(--fd-color-line);
  border-radius: var(--fd-radius-lg);
  box-shadow: var(--fd-shadow-md);
}

.management-head {
  min-height: 112px;
  padding: 24px 28px;
  background: var(--fd-color-surface);
}

.management-head > div:first-child::before {
  margin-bottom: 7px;
  color: var(--fd-brand-jade);
  font-size: var(--fd-font-size-caption);
  font-weight: var(--fd-font-weight-medium);
  line-height: var(--fd-line-height-meta);
  letter-spacing: 0;
}

.management-head h2 {
  color: var(--fd-color-ink);
  font-size: var(--fd-font-size-page-title);
  font-weight: var(--fd-font-weight-semibold);
  line-height: var(--fd-line-height-title);
}

.management-head p {
  max-width: 76ch;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-body);
  font-weight: var(--fd-font-weight-regular);
  line-height: var(--fd-line-height-body);
}

.management-actions {
  align-items: center;
}

.management-actions :is(button, select) {
  font-family: var(--fd-font-sans);
  font-size: var(--fd-font-size-body-sm);
  font-weight: var(--fd-font-weight-regular);
  line-height: var(--fd-line-height-body);
  letter-spacing: 0;
}

.management-actions button:last-child {
  color: var(--fd-color-muted);
}

/* My tasks: a compact work queue, not a stack of decorative cards. */
.my-task-list {
  max-width: 980px;
  padding: 20px 28px 32px;
}

.my-task-item {
  padding: 20px 0;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--fd-color-line);
  border-radius: 0;
  box-shadow: none;
}

.my-task-item:first-child {
  padding-top: 4px;
}

.my-task-head h3 {
  color: var(--fd-color-ink);
}

.my-task-head p,
.my-task-attempts {
  color: var(--fd-color-muted);
}

.my-task-status {
  align-self: flex-start;
}

.my-task-progress {
  grid-template-columns: minmax(200px, 1fr) auto;
  color: var(--fd-color-ink-soft);
}

.my-task-progress-track {
  height: 6px;
  background: #e3ebeb;
}

.my-task-progress-track i {
  background: var(--fd-color-primary);
}

.my-task-comment {
  max-width: 760px;
  border-left-color: var(--fd-color-primary-line);
  background: var(--fd-color-surface-soft);
}

.my-task-actions {
  justify-content: flex-start;
}

.my-task-actions button {
  border-color: var(--fd-color-primary);
  background: var(--fd-color-primary);
}

/* History: search first, filters second, transcript as the visual focal point. */
.history-toolbar-primary {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Keep history actions at the same secondary-action level. The generic
 * management rule removes the border from each group's final button. */
.history-toolbar-primary #refreshHistoryBtn,
#closeHistoryBtn {
  border: 1px solid var(--fd-color-line-strong);
  background: var(--fd-color-surface);
  color: var(--fd-color-ink-soft);
}

.history-toolbar-primary #refreshHistoryBtn:hover:not(:disabled),
#closeHistoryBtn:hover:not(:disabled) {
  border-color: var(--fd-color-muted);
  background: var(--fd-color-surface-soft);
  color: var(--fd-color-ink);
}

.history-search-control {
  min-width: 260px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fd-color-surface);
}

.history-search-control > span {
  color: var(--fd-color-muted);
}

.history-search-control input {
  min-width: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
}

.history-filters {
  position: relative;
}

.history-filters summary {
  min-height: var(--fd-control-height-md);
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--fd-color-line-strong);
  border-radius: var(--fd-radius-md);
  color: var(--fd-color-ink-soft);
  cursor: pointer;
  list-style: none;
}

.history-filters summary::-webkit-details-marker { display: none; }

.history-filters > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--fd-color-line);
  border-radius: var(--fd-radius-md);
  background: var(--fd-color-surface);
  box-shadow: var(--fd-shadow-md);
}

.history-filters:not([open]) > div { display: none; }

.history-filters select { width: 100%; }

.history-layout {
  min-height: min(720px, calc(100svh - 194px));
  grid-template-columns: 350px minmax(0, 1fr);
  background: var(--fd-color-surface);
}

.history-list {
  max-height: min(720px, calc(100svh - 194px));
  padding: 12px;
  background: var(--fd-color-surface-soft);
}

.history-item {
  min-height: 82px;
  margin-bottom: 6px;
  border-color: transparent;
  border-radius: var(--fd-radius-md);
  box-shadow: none;
}

.history-item:hover { border-color: var(--fd-color-line); }

.history-item.is-active {
  border-color: var(--fd-color-primary-line);
  background: var(--fd-color-primary-soft);
  box-shadow: inset 3px 0 0 var(--fd-color-primary);
}

.history-item-main {
  min-height: 82px;
  padding: 12px 70px 12px 13px;
}

/* The left history column is a dense scanning surface, not a card-heading stack. */
.history-item-main > strong {
  font-size: var(--fd-font-size-body);
  line-height: var(--fd-line-height-body);
  font-weight: var(--fd-font-weight-regular);
}

.history-item .history-trace-id {
  margin-top: 6px;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-caption);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.history-detail {
  max-height: min(720px, calc(100svh - 194px));
  padding: 28px 32px;
}

.history-detail-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--fd-color-line);
}

.history-trace {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 10px;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-caption);
  line-height: 1.4;
}

.history-trace-label {
  flex: 0 0 auto;
}

.history-trace code {
  min-width: 0;
  overflow: hidden;
  color: var(--fd-color-ink-soft);
  font-family: var(--fd-font-mono);
  font-size: inherit;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-trace-copy {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 8px;
  border-color: var(--fd-color-line-strong);
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface);
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-caption);
}

.history-trace-copy:hover:not(:disabled),
.history-trace-copy.is-copied {
  border-color: var(--fd-color-primary-line);
  background: var(--fd-color-primary-soft);
  color: var(--fd-color-primary);
}

.history-summary,
.history-runtime-config,
.history-customer-context,
.history-feedback,
.history-session-audit {
  border-color: var(--fd-color-line);
  background: var(--fd-color-surface-soft);
}

.history-transcript {
  margin-top: 22px;
}

.history-performance-timing {
  margin-top: 14px;
  border: 1px solid var(--fd-color-line);
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface-soft);
  color: var(--fd-color-ink-soft);
  font-size: var(--fd-font-size-caption);
}

.history-performance-timing summary {
  padding: 10px 12px;
  color: var(--fd-color-ink);
  cursor: pointer;
  user-select: none;
}

.history-performance-timing-rows {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}

.history-performance-timing-rows p,
.history-performance-timing > p {
  margin: 0;
  line-height: 1.6;
}

.feedback-turn {
  max-width: min(86%, 860px);
  border-radius: var(--fd-radius-md);
  font-size: var(--fd-font-size-body);
  line-height: var(--fd-line-height-body);
}

/* Personal center: clear identity first, permissions second. */
.personal-center-body {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  padding: 28px;
  gap: 20px;
}

.personal-profile-card {
  min-height: 0;
  padding: 24px;
  border-color: var(--fd-color-line);
  border-radius: var(--fd-radius-md);
  background: var(--fd-color-surface);
  box-shadow: none;
}

.personal-profile-card h3 {
  margin: 7px 0 22px;
  color: var(--fd-color-ink);
}

.personal-details {
  gap: 18px;
}

.personal-details dd {
  color: var(--fd-color-ink-soft);
  font-weight: var(--fd-font-weight-regular);
}

.personal-session-actions {
  display: flex;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--fd-color-line);
}

.personal-session-actions #logoutBtn {
  min-height: var(--fd-control-height-md);
  padding: 0 14px;
  border-color: #e7b8b1;
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface);
  color: var(--fd-color-danger);
  font-family: var(--fd-font-sans);
  font-size: var(--fd-font-size-body-sm);
  font-weight: var(--fd-font-weight-regular);
}

.personal-session-actions #logoutBtn:hover {
  border-color: var(--fd-color-danger);
  background: var(--fd-color-danger-soft);
}

.personal-danger-actions {
  margin-top: 14px;
  border-top: 1px solid var(--fd-color-line);
}

.personal-danger-actions summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: var(--fd-color-muted);
  cursor: pointer;
  font-size: var(--fd-font-size-body-sm);
  list-style: none;
}

.personal-danger-actions summary::-webkit-details-marker { display: none; }
.personal-danger-actions summary::after { margin-left: auto; content: "展开"; color: var(--fd-color-ink-soft); }
.personal-danger-actions[open] summary::after { content: "收起"; }

.personal-danger-actions > div {
  display: grid;
  gap: 12px;
  padding: 4px 0 16px;
}

.personal-danger-actions p {
  max-width: 520px;
  margin: 0;
  color: var(--fd-color-muted);
  font-size: var(--fd-font-size-meta);
  line-height: 1.55;
}

.personal-danger-actions .personal-cancellation-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: var(--fd-control-height-md);
  padding: 0 14px;
  border: 1px solid #e7b8b1;
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface);
  font-size: var(--fd-font-size-body-sm);
}

.personal-privacy-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--fd-control-height-md);
  padding: 0 14px;
  margin-right: 10px;
  border: 1px solid var(--fd-color-line-strong);
  border-radius: var(--fd-radius-sm);
  background: var(--fd-color-surface);
  font-size: var(--fd-font-size-body-sm);
}

.personal-organization-application {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--fd-color-line);
}

.personal-organization-application h3 { margin: 0; }
.personal-organization-application > p { margin: 0; color: var(--fd-color-muted); font-size: var(--fd-font-size-body-sm); }
.personal-application-form { display: grid; gap: 12px; }
.personal-application-form label { display: grid; gap: 6px; color: var(--fd-color-ink-soft); font-size: var(--fd-font-size-body-sm); }
.personal-application-form input,
.personal-application-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--fd-color-line-strong); border-radius: var(--fd-radius-sm); padding: 9px 10px; font: inherit; color: var(--fd-color-ink); background: var(--fd-color-surface); }
.personal-application-form textarea { min-height: 76px; resize: vertical; }
.personal-application-form button { justify-self: start; min-height: var(--fd-control-height-md); padding: 0 14px; border: 0; border-radius: var(--fd-radius-sm); background: var(--fd-color-primary); color: #fff; font: inherit; }
.personal-application-status { padding: 10px 12px; border-left: 3px solid var(--fd-color-primary); background: var(--fd-color-surface-soft); color: var(--fd-color-ink-soft); font-size: var(--fd-font-size-body-sm); line-height: 1.55; }

.personal-permission-list > div {
  padding: 12px 14px;
  border-left-color: var(--fd-color-primary);
  background: var(--fd-color-surface-soft);
}

.personal-permission-list strong {
  color: var(--fd-color-ink-soft);
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .workspace-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: start;
  }

  .topbar-utility { grid-column: 2; }

  .live-session-stage { height: auto; }
}

@media (max-width: 800px) {
  .shell { padding: 0; }
  .call,
  .management-panel { border-radius: 0; }
  .training-workspace { grid-template-columns: 1fr; }
  .training-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-layout { grid-template-columns: 1fr; }
  .history-list,
  .history-detail { max-height: none; }
  .history-list { border-bottom: 1px solid var(--fd-color-line); }
  .personal-center-body { grid-template-columns: 1fr; }

  .live-session-stage {
    inset: var(--live-session-stage-top) var(--live-session-stage-right) var(--live-session-stage-bottom) var(--live-session-stage-left);
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(440px, 1fr) minmax(360px, auto);
    overflow: auto;
  }

  .live-session-stage.is-transcript-hidden { grid-template-rows: minmax(440px, 1fr); }
  .live-call-stage { min-height: 440px; }
  .live-transcript-panel { min-height: 360px; }

  .history-trace { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .login-shell { padding: 16px; }
  .login-panel { padding: 22px 20px; }
  .login-panel .product-heading { flex-wrap: wrap; }
  .topbar { padding: 14px 16px; gap: 12px; }
  .topbar-utility { gap: 5px; }
  .account-button { max-width: 176px; }
  .workspace-tools { display: none; }
  .workspace-nav { width: 100%; overflow-x: auto; }
  .workspace-nav :is(#trainingBtn, #myTasksBtn, #historyBtn, #feedbackBtn, #personalCenterBtn) { flex: 0 0 auto; }
  .customer,
  .actions,
  .transcript { padding-inline: 16px; }
  .harness { padding-inline: 16px; }
  .harness > div + div { padding-left: 12px; }
  .actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenario-control { grid-column: 1 / -1; }
  .actions .call-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .management-head { padding: 20px 16px; }
  .management-actions { width: 100%; }
  .history-toolbar-primary { width: 100%; }
  .history-search-control { min-width: 0; flex: 1; }
  .history-filters > div { position: fixed; top: auto; right: 16px; left: 16px; width: auto; }
  .my-task-list,
  .personal-center-body,
  .history-detail { padding: 18px 16px 24px; }
  .training-sidebar { grid-template-columns: 1fr; }
  .personal-details { grid-template-columns: 1fr; }
  .live-session-stage { height: auto; }
  .live-call-stage { padding: 22px 20px; }
  .live-call-stage-copy { top: calc(50% + 104px); }
  .live-call-stage-footer { align-items: flex-end; }
  .live-call-stage-actions { flex-wrap: wrap; justify-content: flex-end; }
  .live-transcript-heading { padding: 20px; }
  .live-transcript-heading p { display: none; }
}
