body.admin-page[data-feature-theme="training"] {
  --feature-primary: #6d4de3;
  --feature-primary-strong: #5537c8;
  --feature-soft: #f2efff;
  --feature-line: #dcd4fa;
}

.admin-page .feature-menu-section[data-feature-theme="training"] {
  --menu-theme: #6d4de3;
  --menu-theme-soft: #f2efff;
  --menu-theme-line: #dcd4fa;
}

.teacher-training-view {
  padding: 0 !important;
  background: #f6f7fb;
}

.teacher-training {
  --tt-workspace-height: clamp(620px, calc(var(--app-viewport-height, 900px) - 180px), 820px);
  min-height: 100%;
  color: #222638;
}

.tt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px 22px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(255,255,255,.2), transparent 24%),
    linear-gradient(128deg, #3c2a88 0%, #6d4de3 52%, #3b88c7 100%);
}

.tt-header h2 { margin: 2px 0 6px; font-size: 28px; }
.tt-header p { margin: 0; opacity: .82; }
.tt-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; }

.tt-connection {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  background: rgba(21,15,59,.28);
  font-size: 13px;
}

.tt-connection span,
.tt-live-dot::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  content: "";
}

.tt-connection.is-online span,
.tt-live-dot.active::before { background: #48e0a4; box-shadow: 0 0 0 4px rgba(72,224,164,.16); }

.tt-tabs {
  display: flex;
  gap: 4px;
  padding: 0 30px;
  border-bottom: 1px solid #e1e4ed;
  background: #fff;
}

.tt-tabs button {
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #686e80;
  font-weight: 700;
}

.tt-tabs button.active { border-bottom-color: #6d4de3; color: #5537c8; }
.tt-content { padding: 22px 26px 32px; }

.tt-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 26px 0;
  padding: 12px 15px;
  border: 1px solid #f3c9c5;
  border-radius: 12px;
  background: #fff5f4;
  color: #8f2f27;
}

.tt-alert span { flex: 1; }
.tt-alert button { background: #fff; }

.tt-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #e0e3ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(35,39,61,.05);
}

.tt-status-strip > div { padding: 15px 18px; border-right: 1px solid #e8eaf0; }
.tt-status-strip > div:last-child { border-right: 0; }
.tt-status-strip span { display: block; margin-bottom: 6px; color: #7a8091; font-size: 12px; }
.tt-status-strip strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tt-status {
  display: inline-flex !important;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
}
.tt-status.is-training { background: #dcf8ea; color: #08764c; }
.tt-status.is-paused { background: #fff2d6; color: #9b5c00; }
.tt-status.is-ready { background: #ebe6ff; color: #5938c5; }
.tt-status.is-ended, .tt-status.is-idle { background: #eef0f4; color: #626a7a; }

.tt-workspace-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "device device device device device device scenario scenario scenario scenario scenario scenario"
    "dialogue dialogue dialogue dialogue dialogue dialogue dialogue dialogue coach coach coach coach";
  gap: 20px;
  align-items: stretch;
}

.tt-card {
  min-width: 0;
  border: 1px solid #e0e3ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(35,39,61,.05);
}

.tt-prep-card, .tt-dialogue-card, .tt-coach-card { padding: 18px; }
.tt-prep-card { display: flex; flex-direction: column; min-height: 0; overflow: visible; }
.tt-device-card { grid-area: device; }
.tt-scenario-card { grid-area: scenario; }
.tt-dialogue-card { position: relative; grid-area: dialogue; }
.tt-coach-card { grid-area: coach; }
.tt-dialogue-card, .tt-coach-card {
  display: flex;
  flex-direction: column;
  height: var(--tt-workspace-height);
  min-height: 0;
  overflow: hidden;
}
.tt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tt-card-head > div { display: flex; align-items: center; gap: 9px; }
.tt-card-head > div > span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #f0edff; color: #6543d3; font-size: 11px; font-weight: 900; }
.tt-card-head h3 { margin: 0; font-size: 17px; }
.tt-card-head > b { color: #5b3bc8; }
.tt-card-count { padding: 5px 8px; border-radius: 999px; background: #eeebff; color: #6543d3 !important; font-size: 10px; white-space: nowrap; }
.tt-text-btn { padding: 0; border: 0; background: transparent; color: #6d4de3; }
.tt-device-actions { display: flex; align-items: center; gap: 10px; }
.tt-prep-subhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -5px 0 12px; padding-bottom: 10px; border-bottom: 1px solid #eceef3; }
.tt-prep-subhead p { margin: 0; color: #7c8497; font-size: 10px; line-height: 1.45; }
.tt-prep-subhead > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: #eeebff; color: #6543d3; font-size: 10px; font-weight: 800; }
.tt-prep-scroll { min-height: 0; overflow: visible; }
.tt-scenario-scroll { flex: 1 0 auto; }
.tt-auto-pairing { margin-bottom: 16px; padding: 14px; border: 1px solid rgba(109, 77, 227, .2); border-radius: 14px; background: linear-gradient(145deg, #fbfaff, #f2f6ff); }
.tt-auto-pairing.is-waiting { display: flex; align-items: center; gap: 12px; }
.tt-auto-pairing strong { color: #2f3150; font-size: 13px; }
.tt-auto-pairing p { margin: 4px 0 0; color: #697188; font-size: 11px; line-height: 1.55; }
.tt-auto-pairing-icon { position: relative; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 5px 14px rgba(73, 92, 151, .12); }
.tt-auto-pairing-icon i { position: absolute; top: 18px; width: 5px; height: 5px; border-radius: 50%; background: #7354dc; animation: tt-pairing-wave 1.25s ease-in-out infinite; }
.tt-auto-pairing-icon i:nth-child(1) { left: 9px; animation-delay: -.22s; }
.tt-auto-pairing-icon i:nth-child(2) { left: 17px; animation-delay: -.11s; }
.tt-auto-pairing-icon i:nth-child(3) { left: 25px; }
.tt-auto-pairing-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.tt-auto-pairing-title::-webkit-details-marker { display: none; }
.tt-auto-pairing-title > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tt-auto-pairing-title > div > span:last-child { display: grid; gap: 2px; min-width: 0; }
.tt-auto-pairing-title small { display: block; color: #697188; line-height: 1.45; }
.tt-auto-pairing-title > b { flex: 0 0 auto; color: #6543d3; font-size: 10px; }
.tt-details-open { display: none; }
.tt-auto-pairing[open] .tt-details-closed, .tt-persona-details[open] .tt-details-closed { display: none; }
.tt-auto-pairing[open] .tt-details-open, .tt-persona-details[open] .tt-details-open { display: inline; }
.tt-auto-pairing[open] .tt-auto-pairing-title { margin-bottom: 11px; padding-bottom: 11px; border-bottom: 1px solid rgba(109,77,227,.12); }
.tt-pairing-pulse { width: 8px; height: 8px; border-radius: 50%; background: #26c991; box-shadow: 0 0 0 5px rgba(38, 201, 145, .12); }
.tt-pairing-request-list { display: grid; gap: 10px; }
.tt-pairing-request { display: grid; gap: 10px; padding: 12px; border: 1px solid #e2e4f1; border-radius: 12px; background: rgba(255,255,255,.92); }
.tt-pairing-device { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tt-pairing-device > span { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(145deg, #7657e5, #4f87cf); color: #fff; font-weight: 900; }
.tt-pairing-device > div { display: grid; min-width: 0; }
.tt-pairing-device small { overflow: hidden; color: #788095; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tt-pairing-code-field, .tt-pairing-school { display: grid; gap: 5px; color: #666e82; font-size: 11px; font-weight: 800; }
.tt-pairing-code-field input, .tt-pairing-school select { width: 100%; min-height: 40px; border: 1px solid #d8dceb; border-radius: 9px; background: #fff; }
.tt-pairing-code-field input { padding: 0 12px; color: #382a78; font-size: 19px; font-weight: 900; letter-spacing: .22em; }
.tt-pairing-code-field input:focus, .tt-pairing-school select:focus { outline: 3px solid rgba(109, 77, 227, .13); border-color: #7559d9; }
.tt-pairing-error { margin: 0 !important; padding: 9px 10px; border-radius: 8px; background: #fff0ed; color: #aa392d !important; font-size: 11px !important; }
.tt-pairing-approve { min-height: 40px; border-radius: 10px; font-weight: 900; }
@keyframes tt-pairing-wave { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-5px); opacity: 1; } }

.tt-field { display: block; margin-bottom: 13px; }
.tt-field > span { display: block; margin-bottom: 7px; color: #606779; font-size: 12px; font-weight: 800; }
.tt-field select { width: 100%; min-height: 42px; }

.tt-device-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: -3px 0 14px;
  overflow: hidden;
  border: 1px solid #e3e6ef;
  border-radius: 11px;
  background: #e3e6ef;
}
.tt-device-detail > div { min-width: 0; padding: 9px 10px; background: #f9fafc; }
.tt-device-detail span, .tt-device-detail strong { display: block; }
.tt-device-detail span { color: #858b9b; font-size: 10px; }
.tt-device-detail strong { margin-top: 3px; overflow: hidden; color: #42485a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.tt-mode-field { margin-bottom: 14px; }
.tt-mode-field > span, .tt-persona-tools label > span { display: block; margin-bottom: 7px; color: #606779; font-size: 12px; font-weight: 800; }
.tt-mode-field > small { display: block; margin-top: 6px; color: #858b9b; font-size: 10px; }
.tt-segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border-radius: 10px; background: #eff1f6; }
.tt-segmented button { min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: #6f7586; font-weight: 800; }
.tt-segmented button.active { background: #fff; color: #5b3bc8; box-shadow: 0 2px 8px rgba(61, 46, 123, .12); }

.tt-persona-tools { margin-bottom: 13px; }
.tt-persona-tools input { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid #d9ddea; border-radius: 10px; background: #fff; }
.tt-persona-field { position: relative; }
.tt-persona-picker { position: relative; }
.tt-persona-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 46px;
  padding: 8px 13px;
  border: 1px solid #d9ddea;
  border-radius: 10px;
  background: #fff;
  color: #252a3b;
  text-align: left;
  box-shadow: 0 1px 2px rgba(42, 45, 68, .02);
}
.tt-persona-trigger:hover { border-color: #c6c9d6; background: #fdfdff; }
.tt-persona-trigger:focus-visible, .tt-persona-picker.is-open .tt-persona-trigger { outline: none; border-color: #795be2; box-shadow: 0 0 0 3px rgba(109, 77, 227, .12); }
.tt-persona-trigger > span { display: flex; align-items: baseline; min-width: 0; gap: 8px; }
.tt-persona-trigger strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.tt-persona-trigger small { flex: 0 0 auto; color: #7b8294; font-size: 10px; }
.tt-persona-trigger i { width: 8px; height: 8px; flex: 0 0 auto; margin: -4px 3px 0 0; border-right: 2px solid #62697b; border-bottom: 2px solid #62697b; transform: rotate(45deg); transition: transform .18s ease, margin .18s ease; }
.tt-persona-picker.is-open .tt-persona-trigger i { margin-top: 4px; transform: rotate(225deg); }
.tt-persona-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: min(320px, 46vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dfe1e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(37, 40, 64, .18), 0 3px 10px rgba(37, 40, 64, .08);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.tt-persona-menu[hidden] { display: none; }
.tt-persona-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2e3344;
  text-align: left;
}
.tt-persona-option:hover, .tt-persona-option:focus-visible { outline: none; background: #f5f3fc; }
.tt-persona-option.is-selected { background: #eee9ff; color: #5537c8; }
.tt-persona-option > span { display: flex; align-items: baseline; min-width: 0; gap: 8px; }
.tt-persona-option strong { flex: 0 0 auto; font-size: 13px; }
.tt-persona-option small { overflow: hidden; color: #72798b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tt-persona-option b { color: #6543d3; font-size: 14px; text-align: center; }
.tt-persona-option-empty { padding: 18px 12px; color: #7a8192; font-size: 12px; text-align: center; }
.tt-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tt-filter-chips button { min-height: 28px; padding: 4px 9px; border: 1px solid #e0e3ec; border-radius: 999px; background: #fff; color: #717789; font-size: 10px; font-weight: 800; }
.tt-filter-chips button.active { border-color: #cbbef6; background: #eee9ff; color: #5b3bc8; }

.tt-persona-card { margin-top: 4px; padding: 15px; border: 1px solid #e4dffa; border-radius: 14px; background: linear-gradient(145deg, #fbfaff, #f3f0ff); }
.tt-persona-title { display: flex; align-items: center; gap: 11px; }
.tt-avatar, .tt-record-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(145deg, #7a5bea, #4a86c7); color: #fff; font-weight: 900; }
.tt-persona-title h4, .tt-persona-title p { margin: 0; }
.tt-persona-title p { color: #747b8d; font-size: 12px; }
.tt-persona-title > b { margin-left: auto; padding: 5px 8px; border-radius: 999px; background: #fff; color: #6543d3; font-size: 10px; white-space: nowrap; }
.tt-persona-card > p { margin: 13px 0; color: #555d70; font-size: 13px; line-height: 1.65; }
.tt-persona-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 12px; }
.tt-persona-tags span { padding: 4px 7px; border-radius: 999px; background: #fff; color: #6750b6; font-size: 10px; font-weight: 800; }
.tt-persona-focus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tt-persona-focus > div { min-width: 0; padding: 10px 11px; border-radius: 10px; background: rgba(255,255,255,.78); }
.tt-persona-focus span { display: block; margin-bottom: 4px; color: #777e90; font-size: 10px; font-weight: 800; }
.tt-persona-focus strong { display: block; color: #444b5e; font-size: 12px; line-height: 1.5; }
.tt-persona-details { margin-top: 10px; overflow: hidden; border: 1px solid rgba(109,77,227,.14); border-radius: 10px; background: rgba(255,255,255,.52); }
.tt-persona-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; cursor: pointer; list-style: none; color: #6042be; font-size: 11px; font-weight: 800; }
.tt-persona-details > summary::-webkit-details-marker { display: none; }
.tt-persona-details > summary b { color: #7c6bb8; font-size: 10px; }
.tt-persona-details[open] > summary { border-bottom: 1px solid rgba(109,77,227,.12); background: rgba(255,255,255,.6); }
.tt-persona-details-body { padding: 2px 10px 10px; }
.tt-persona-judgement, .tt-persona-profile { margin: 10px 0; padding: 10px 11px; border-radius: 10px; background: rgba(255,255,255,.72); }
.tt-persona-judgement > span, .tt-persona-profile > span { color: #755bd4; font-size: 10px; font-weight: 800; }
.tt-persona-judgement p, .tt-persona-profile p { margin: 5px 0 0; color: #555d70; font-size: 12px; line-height: 1.55; }
.tt-persona-card dl { margin: 0; }
.tt-persona-card dl div { margin-top: 9px; }
.tt-persona-card dt { color: #777e90; font-size: 11px; }
.tt-persona-card dd { margin: 3px 0 0; font-size: 13px; font-weight: 700; line-height: 1.5; }
.tt-opening { margin-top: 13px; padding: 11px 12px; border-radius: 10px; background: #fff; }
.tt-opening span { color: #755bd4; font-size: 11px; font-weight: 800; }
.tt-opening p { margin: 5px 0 0; font-size: 13px; line-height: 1.55; }

.tt-setup-footer { display: flex; align-items: stretch; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eceef4; }
.tt-setup-notice { min-width: 0; color: #7b8293; font-size: 11px; }
.tt-setup-notice p { margin: 0; line-height: 1.55; }
.tt-command-row { display: grid; grid-template-columns: 1.35fr .8fr .8fr; flex: 0 0 auto; width: 100%; gap: 8px; margin: 0; }
.tt-command-row button, .tt-section-head button, .tt-empty button { min-height: 40px; border-radius: 10px; font-weight: 800; }
.tt-primary { border-color: transparent !important; background: linear-gradient(135deg, #6e4de2, #4a83cb) !important; color: #fff !important; }
.tt-device-hint { margin: 12px 0 0; color: #a2610d; font-size: 12px; line-height: 1.55; }

.tt-dialogue { flex: 1; height: auto; min-height: 0; overflow-y: auto; padding: 5px 7px 8px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.tt-jump-latest { position: absolute; z-index: 3; right: 50%; bottom: 20px; translate: 50% 0; min-height: 34px; padding: 7px 14px; border: 1px solid #d8d0f5; border-radius: 999px; background: rgba(255,255,255,.96); color: #6042be; box-shadow: 0 6px 18px rgba(63,47,126,.18); font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); }
.tt-jump-latest:hover { border-color: #b9a9ed; background: #f8f6ff; }
.tt-jump-latest[hidden] { display: none; }
.tt-dialogue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 12px; padding-bottom: 10px; border-bottom: 1px solid #eceef3; }
.tt-dialogue-toolbar .tt-filter-chips { margin: 0; }
.tt-live-dot { display: inline-flex; align-items: center; gap: 7px; color: #71788a; font-size: 12px; }
.tt-message { width: 86%; margin-bottom: 13px; padding: 12px 14px; border-radius: 14px; }
.tt-message.teacher { margin-left: auto; border-bottom-right-radius: 4px; background: #ebe6ff; }
.tt-message.student { margin-right: auto; border-bottom-left-radius: 4px; background: #eef5fa; }
.tt-message.is-draft { opacity: .65; }
.tt-message > div { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.tt-message strong { color: #4f3bb0; font-size: 12px; }
.tt-message.student strong { color: #34769c; }
.tt-message time { color: #8990a0; font-size: 10px; }
.tt-message p { margin: 0; line-height: 1.65; white-space: pre-wrap; }
.tt-dialogue-empty { display: grid; min-height: 100%; align-content: center; padding: 24px 20px; text-align: center; color: #737a8c; }
.tt-coach-empty { padding: 54px 20px; text-align: center; color: #737a8c; }
.tt-dialogue-empty strong, .tt-coach-empty strong { display: block; margin-bottom: 6px; color: #454b5d; }
.tt-dialogue-empty p, .tt-coach-empty p { margin: 0; font-size: 13px; line-height: 1.6; }

.tt-coach-score { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 12px; padding: 12px; border-radius: 12px; background: #f0edff; color: #5b3bc8; }
.tt-coach-score strong { font-size: 18px; }
.tt-coach-score span { font-size: 12px; }
.tt-coach-guidance { padding: 0 2px; line-height: 1.7; }
.tt-coach-block { margin-top: 14px; padding: 13px; border-radius: 12px; background: #edf7f5; }
.tt-coach-block span, .tt-coach-list > span { color: #568078; font-size: 11px; font-weight: 800; }
.tt-coach-block p { margin: 6px 0 0; line-height: 1.65; }
.tt-reference-basis { display: block; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(86, 128, 120, .18); color: #687a77; font-size: 10px; line-height: 1.55; }
.tt-reference-basis b { display: block; margin-bottom: 3px; color: #568078; font-size: 10px; }
.tt-coach-list { margin-top: 17px; }
.tt-coach-list ul { margin: 8px 0 0; padding-left: 18px; color: #596173; }
.tt-coach-list li { margin-bottom: 8px; line-height: 1.5; }
.tt-coach-list.good > span { color: #08764c; }
.tt-coach-list.concern > span { color: #a45523; }
.tt-coach-list ol { margin: 8px 0 0; padding-left: 20px; color: #596173; }
.tt-coach-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: -2px 0 14px; padding: 3px; border-radius: 10px; background: #f0f1f6; }
.tt-coach-tabs button { min-height: 32px; padding: 4px; border: 0; border-radius: 8px; background: transparent; color: #72798b; font-size: 10px; font-weight: 800; }
.tt-coach-tabs button.active { background: #fff; color: #5b3bc8; box-shadow: 0 2px 8px rgba(61, 46, 123, .1); }
.tt-coach-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 4px 5px 2px; }
.tt-coach-plan { display: grid; gap: 9px; margin-top: 15px; }
.tt-coach-plan > div { padding: 10px 11px; border: 1px solid #e7e8ef; border-radius: 10px; }
.tt-coach-plan span, .tt-knowledge-grid span { color: #777e90; font-size: 10px; font-weight: 800; }
.tt-coach-plan p { margin: 4px 0 0; line-height: 1.55; }
.tt-phrase-toggle { width: 100%; min-height: 36px; margin-top: 15px; border: 1px solid #d9d1f5; border-radius: 9px; background: #f7f5ff; color: #6042be; font-weight: 800; }
.tt-phrase-bank { display: grid; gap: 7px; margin-top: 8px; }
.tt-phrase-bank button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid #e4e6ed; border-radius: 9px; background: #fff; color: #52596b; text-align: left; }
.tt-phrase-bank button span { line-height: 1.45; }
.tt-phrase-bank button b { flex: 0 0 auto; color: #6543d3; font-size: 10px; }
.tt-knowledge-grid { display: grid; gap: 9px; }
.tt-knowledge-grid > div { padding: 11px; border: 1px solid #e3e6ee; border-radius: 11px; background: #fafbfc; }
.tt-knowledge-grid strong { display: block; margin-top: 5px; color: #5036ad; }
.tt-knowledge-grid p { margin: 5px 0 0; color: #565e71; line-height: 1.6; }
.tt-knowledge-grid ul { margin: 7px 0 0; padding-left: 17px; }

.tt-empty { min-height: 360px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 40px; border: 1px dashed #d5d8e3; border-radius: 16px; background: #fff; text-align: center; }
.tt-empty p { max-width: 480px; margin: 0 0 10px; color: #747b8d; }
.tt-spinner { width: 30px; height: 30px; border: 3px solid #e5e0fa; border-top-color: #6d4de3; border-radius: 50%; animation: tt-spin .8s linear infinite; }
@keyframes tt-spin { to { transform: rotate(360deg); } }

.tt-section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.tt-section-head h3, .tt-section-head p { margin: 0; }
.tt-section-head p { margin-top: 5px; color: #767d8e; font-size: 13px; }
.tt-section-head > div:last-child { display: flex; gap: 8px; }
.tt-record-list { display: grid; gap: 10px; }
.tt-record-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 15px 17px; border: 1px solid #e0e3ec; border-radius: 14px; background: #fff; }
.tt-record-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tt-record-main h4, .tt-record-main p { margin: 0; }
.tt-record-main p { margin-top: 5px; color: #777e8f; font-size: 12px; }
.tt-record-icon { width: 38px; height: 38px; }
.tt-record-item.active { border-color: #c8baf5; background: #faf8ff; box-shadow: 0 0 0 3px rgba(109, 77, 227, .07); }

.tt-report-summary { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 24px; padding: 24px; border: 1px solid #ded8f7; border-radius: 16px; background: linear-gradient(135deg, #faf8ff, #f2f7fc); }
.tt-score-ring { display: grid; place-items: center; width: 105px; height: 105px; border: 8px solid #dcd3ff; border-top-color: #6d4de3; border-radius: 50%; }
.tt-score-ring strong { font-size: 30px; color: #5537c8; }
.tt-score-ring span { margin-top: -14px; color: #777e8f; font-size: 11px; }
.tt-report-quality { display: inline-block; padding: 5px 9px; border-radius: 999px; background: #e9e3ff; color: #5b3bc8; font-size: 12px; font-weight: 800; }
.tt-report-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.tt-report-badges > span { padding: 5px 9px; border-radius: 999px; background: #eef1f7; color: #61697a; font-size: 11px; font-weight: 800; }
.tt-report-badges > .tt-report-quality { background: #e9e3ff; color: #5b3bc8; }
.tt-report-summary h4 { margin: 10px 0 6px; }
.tt-report-summary p { margin: 0; color: #575f72; line-height: 1.7; }
.tt-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.tt-report-grid .tt-card { padding: 18px; }
.tt-report-grid h4 { margin: 0 0 12px; }
.tt-report-grid ol { margin: 0; padding-left: 21px; }
.tt-report-grid li { margin-bottom: 8px; line-height: 1.55; }
.tt-report-grid blockquote { margin: 0; padding: 15px; border-left: 4px solid #6d4de3; border-radius: 8px; background: #f5f2ff; line-height: 1.7; }
.tt-report-grid button { margin-top: 10px; }
.tt-report-knowledge, .tt-persistent-report { margin-top: 16px; padding: 18px; }
.tt-report-knowledge h4, .tt-persistent-report h4 { margin: 0; }
.tt-report-knowledge > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 13px; }
.tt-report-knowledge article { padding: 12px; border: 1px solid #e6e8ef; border-radius: 11px; background: #fafbfc; }
.tt-report-knowledge span { color: #7b8293; font-size: 10px; font-weight: 800; }
.tt-report-knowledge strong { display: block; margin-top: 5px; color: #5036ad; }
.tt-report-knowledge p { margin: 5px 0 0; line-height: 1.6; }
.tt-persistent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tt-persistent-head p { margin: 5px 0 0; color: #7b8293; font-size: 11px; }
.tt-persistent-report pre { max-height: 520px; margin: 15px 0 0; overflow: auto; padding: 16px; border-radius: 11px; background: #f7f7fa; color: #353a48; font: inherit; line-height: 1.75; white-space: pre-wrap; }
.tt-report-error { margin-top: 13px; padding: 11px; border-radius: 9px; background: #fff1ef; color: #9e372d; }
.tt-turns { margin-top: 20px; }
.tt-turns > h4 { margin: 0 0 12px; }
.tt-turn-item { margin-bottom: 12px; overflow: hidden; border: 1px solid #e0e3ec; border-radius: 14px; background: #fff; }
.tt-turn-head { display: flex; justify-content: space-between; padding: 11px 15px; background: #f7f6fb; }
.tt-turn-head span { color: #6543d3; font-weight: 800; }
.tt-turn-columns { display: grid; grid-template-columns: repeat(2, 1fr); }
.tt-turn-columns > div { padding: 15px; border-right: 1px solid #e8eaf0; }
.tt-turn-columns > div:last-child { border-right: 0; }
.tt-turn-columns span { color: #7a8192; font-size: 11px; font-weight: 800; }
.tt-turn-columns p { margin: 7px 0 0; line-height: 1.65; }
.tt-turn-columns small { display: block; margin-top: 8px; color: #7c8394; line-height: 1.5; }
.tt-turn-columns ul { margin: 7px 0 0; padding-left: 18px; }
.tt-turn-columns li { margin-bottom: 5px; line-height: 1.5; }
.tt-turn-columns blockquote { margin: 9px 0 0; padding: 9px 10px; border-left: 3px solid #6d4de3; background: #f7f4ff; line-height: 1.55; }
.tt-muted { color: #7a8192; }

.tt-log-list { display: grid; gap: 9px; }
.tt-log-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) 140px; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid #e0e3ec; border-radius: 13px; background: #fff; }
.tt-log-item time { color: #747c8e; font-size: 11px; }
.tt-log-item strong, .tt-log-item p { margin: 0; }
.tt-log-item p { margin-top: 4px; color: #676f81; font-size: 12px; line-height: 1.5; }
.tt-log-item > div:last-child { display: grid; justify-items: end; }
.tt-log-item > div:last-child span { font-weight: 800; }
.tt-log-item > div:last-child small { margin-top: 3px; color: #858c9c; }

@media (min-width: 901px) and (max-width: 1100px) {
  .tt-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "device scenario" "dialogue coach";
  }
}

@media (max-width: 900px) {
  .tt-header { align-items: flex-start; padding: 22px; }
  .tt-connection { display: none; }
  .tt-tabs, .tt-content { padding-left: 16px; padding-right: 16px; }
  .tt-status-strip { grid-template-columns: 1fr 1fr; }
  .tt-status-strip > div:nth-child(2) { border-right: 0; }
  .tt-workspace-grid { grid-template-areas: "device" "scenario" "dialogue" "coach"; }
  .tt-workspace-grid, .tt-report-grid { grid-template-columns: 1fr; }
  .tt-prep-card, .tt-dialogue-card, .tt-coach-card { height: auto; overflow: visible; }
  .tt-dialogue-card { height: 500px; overflow: hidden; }
  .tt-coach-scroll { overflow: visible; }
  .tt-command-row { flex-basis: auto; width: 100%; }
  .tt-record-item { grid-template-columns: 1fr auto; }
  .tt-record-item > button { grid-column: 1 / -1; }
  .tt-turn-columns { grid-template-columns: 1fr; }
  .tt-turn-columns > div { border-right: 0; border-bottom: 1px solid #e8eaf0; }
  .tt-report-knowledge > div { grid-template-columns: 1fr; }
  .tt-log-item { grid-template-columns: 1fr; gap: 6px; }
  .tt-log-item > div:last-child { justify-items: start; }
}

@media (max-width: 620px) {
  .tt-header { gap: 12px; padding: 20px 16px; }
  .tt-header h2 { font-size: 24px; }
  .tt-header > div:first-child > p:last-child { font-size: 12px; line-height: 1.55; }
  .tt-tabs { overflow-x: auto; }
  .tt-tabs button { flex: 0 0 auto; padding: 0 14px; }
  .tt-content { padding-top: 16px; }
  .tt-status-strip { grid-template-columns: 1fr; }
  .tt-status-strip > div { border-right: 0; border-bottom: 1px solid #e8eaf0; }
  .tt-status-strip > div:last-child { border-bottom: 0; }
  .tt-prep-card, .tt-dialogue-card, .tt-coach-card { padding: 14px; }
  .tt-device-actions { align-items: flex-end; flex-direction: column; gap: 5px; }
  .tt-persona-trigger > span, .tt-persona-option > span { align-items: flex-start; flex-direction: column; gap: 2px; }
  .tt-persona-focus { grid-template-columns: 1fr; }
  .tt-setup-footer { gap: 12px; }
  .tt-command-row { grid-template-columns: 1fr 1fr; }
  .tt-command-row .tt-primary { grid-column: 1 / -1; }
  .tt-dialogue-toolbar { align-items: flex-start; flex-direction: column; }
}
