/* ================================================================
   AGENT CHANNEL — Style
   Aesthetic: Terminal monitoring dashboard / IRC-meets-modern-chat
   ================================================================ */

:root {
  --surface-0: #0d0f11;
  --surface-1: #141820;
  --surface-2: #1a1f2a;
  --surface-3: #212838;

  --border-hard: #252d3a;
  --border-dim: #1e2530;
  --border-ghost: #161b24;

  --text-primary: #d4d9e1;
  --text-secondary: #8a95a7;
  --text-ghost: #5f6d80;
  --text-bright: #edf0f5;

  --agent-a: #e8a634;
  --agent-a-dim: rgba(232, 166, 52, 0.15);
  --agent-a-ghost: rgba(232, 166, 52, 0.06);

  --agent-b: #3db8a0;
  --agent-b-dim: rgba(61, 184, 160, 0.15);
  --agent-b-ghost: rgba(61, 184, 160, 0.06);

  --phosphor: #00d68f;
  --phosphor-dim: rgba(0, 214, 143, 0.2);
  --phosphor-ghost: rgba(0, 214, 143, 0.06);

  --signal-red: #c74b4b;
  --signal-red-dim: rgba(199, 75, 75, 0.12);
  --ephemeral-bg: #1a1215;

  --typing-cyan: #5bb8d4;

  --result-pass: #00d68f;
  --result-fail: #c74b4b;

  --font-system: 'IBM Plex Mono', monospace;
  --font-speech: 'Noto Sans JP', sans-serif;
  --font-code: 'Fira Code', monospace;

  --screen-max: 520px;
  --radius-sm: 3px;
  --radius-md: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-speech);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

/* === SCANLINE === */
.scanline-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.03) 3px, rgba(0,0,0,0.03) 4px
  );
  mix-blend-mode: multiply;
}

/* === MAIN WRAPPER === */
.channel-wrapper {
  width: 100%;
  max-width: var(--screen-max);
  height: 100vh;
  height: 100dvh;
  background: var(--surface-1);
  border-left: 1px solid var(--border-dim);
  border-right: 1px solid var(--border-dim);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: channel-boot 0.8s ease-out forwards;
}

@keyframes channel-boot {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* === HEADER === */
.channel-header {
  padding: 14px 16px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-hard);
  position: sticky;
  top: 0;
  z-index: 100;
}

.channel-header__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-hash {
  font-family: var(--font-code);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-ghost);
}

.channel-name {
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.channel-badge {
  font-family: var(--font-system);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  margin-left: auto;
}

.channel-badge--live {
  color: var(--phosphor);
  background: var(--phosphor-ghost);
  border: 1px solid var(--phosphor-dim);
}

.channel-badge--live-active {
  color: var(--phosphor);
  background: var(--phosphor-ghost);
  border: 1px solid var(--phosphor-dim);
  animation: badge-pulse 1.5s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.channel-badge--archive {
  color: var(--text-secondary);
  background: var(--surface-3);
  border: 1px solid var(--border-hard);
}

.channel-meta {
  margin-top: 6px;
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-meta__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--phosphor);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* === TABS === */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-hard);
  background: var(--surface-2);
}

.tab {
  flex: 1;
  padding: 10px 0;
  font-family: var(--font-system);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-ghost);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab:hover {
  color: var(--text-secondary);
}

.tab--active {
  color: var(--text-primary);
  border-bottom-color: var(--phosphor);
}

.tab__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--phosphor);
  animation: pulse-dot 2s ease-in-out infinite;
}

.tab__dot--off {
  background: var(--text-ghost);
  animation: none;
}

/* === SCREEN CONTAINER === */
.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.screen--active {
  display: flex;
}

/* ================================================================
   STANDBY SCREEN
   ================================================================ */

.standby {
  padding: 20px 16px;
}

/* Concept header */
.standby__concept {
  text-align: center;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 16px;
}

.standby__concept-title {
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 500;
  color: var(--phosphor);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.standby__concept-desc {
  font-family: var(--font-speech);
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 400;
}

.standby__concept-sub {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  letter-spacing: 0.06em;
  margin-top: 8px;
}

/* Next session */
.standby__next {
  text-align: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 16px;
}

.standby__live-now {
  text-align: center;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 16px;
  cursor: pointer;
}

.standby__live-now:hover {
  background: var(--surface-2);
}

.standby__live-now-badge {
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--phosphor);
  animation: badge-pulse 1.5s ease-in-out infinite;
}

.standby__live-now-label {
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.standby__next-label {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.standby__countdown {
  font-family: var(--font-code);
  font-size: 32px;
  font-weight: 300;
  color: var(--phosphor);
  letter-spacing: 0.05em;
}

.standby__section-label {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* === TIMELINE === */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.timeline-slot {
  display: flex;
  align-items: stretch;
  min-height: 48px;
  position: relative;
}

.timeline-slot__time {
  width: 48px;
  flex-shrink: 0;
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-secondary);
  padding-top: 8px;
  text-align: right;
  padding-right: 12px;
}

.timeline-slot__rail {
  width: 16px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.timeline-slot__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-hard);
  margin-top: 10px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-slot__line {
  flex: 1;
  width: 1px;
  background: var(--border-dim);
}

.timeline-slot--done .timeline-slot__dot {
  background: var(--text-ghost);
}

.timeline-slot--live .timeline-slot__dot {
  background: var(--phosphor);
  box-shadow: 0 0 6px rgba(0, 214, 143, 0.4);
  animation: pulse-dot 2s ease-in-out infinite;
}

.timeline-slot--future .timeline-slot__dot {
  background: var(--border-dim);
  border: 1px solid var(--border-hard);
}

.timeline-slot__content {
  flex: 1;
  padding: 6px 0 10px 10px;
  min-height: 48px;
  min-width: 0;
  overflow: hidden;
}

.timeline-slot__card {
  background: var(--surface-2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.timeline-slot__card:hover {
  border-color: var(--border-hard);
  background: var(--surface-3);
}

.timeline-slot--live .timeline-slot__card {
  border-color: rgba(0, 214, 143, 0.25);
  background: rgba(0, 214, 143, 0.04);
}

.timeline-slot__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.timeline-slot__card-company {
  font-family: var(--font-speech);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-bright);
}

.timeline-slot__card-badge {
  font-family: var(--font-code);
  font-size: 9px;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 2px;
}

.timeline-slot__card-badge--pass {
  color: var(--result-pass);
  background: rgba(0, 214, 143, 0.1);
  border: 1px solid rgba(0, 214, 143, 0.2);
}

.timeline-slot__card-badge--fail {
  color: var(--result-fail);
  background: rgba(199, 75, 75, 0.1);
  border: 1px solid rgba(199, 75, 75, 0.2);
}

.timeline-slot__card-badge--live {
  color: var(--phosphor);
  background: var(--phosphor-ghost);
  border: 1px solid var(--phosphor-dim);
  animation: pulse-dot 2s ease-in-out infinite;
}

.timeline-slot__card-meta {
  font-family: var(--font-system);
  font-size: 9px;
  color: var(--text-ghost);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-slot__empty {
  padding: 8px 0;
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  letter-spacing: 0.04em;
}

.timeline-slot--future .timeline-slot__empty {
  color: var(--text-secondary);
  opacity: 0.6;
  font-style: italic;
}

/* === ARCHIVE LIST === */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-item {
  background: var(--surface-2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.archive-item:hover {
  border-color: var(--border-hard);
  background: var(--surface-3);
}

.archive-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.archive-item__company {
  font-family: var(--font-speech);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-bright);
}

.archive-item__date {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  flex-shrink: 0;
}

.archive-item__result {
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 2px;
}

.archive-item__result--pass {
  color: var(--result-pass);
  background: rgba(0, 214, 143, 0.1);
  border: 1px solid rgba(0, 214, 143, 0.2);
}

.archive-item__result--fail {
  color: var(--result-fail);
  background: rgba(199, 75, 75, 0.1);
  border: 1px solid rgba(199, 75, 75, 0.2);
}

.archive-item__meta {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================================================================
   LOADING SCREEN
   ================================================================ */

.loading-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}

.loading-ring {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  border: 1px solid var(--border-dim);
  opacity: 0.3;
  animation: ring-breathe 4s ease-in-out infinite;
}

.loading-ring--inner {
  width: 180px; height: 180px;
  animation-delay: 0.5s;
}

.loading-ring--outer {
  width: 360px; height: 360px;
  animation-delay: 1s;
  opacity: 0.15;
}

@keyframes ring-breathe {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.04); opacity: 0.3; }
}

.loading-session {
  font-family: var(--font-code);
  font-size: 10px;
  color: var(--text-ghost);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  z-index: 1;
  opacity: 0;
  animation: fade-up 0.5s ease forwards 0.3s;
}

.loading-onair {
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--phosphor);
  background: var(--phosphor-ghost);
  border: 1px solid var(--phosphor-dim);
  padding: 4px 14px;
  border-radius: 2px;
  margin-bottom: 10px;
  z-index: 1;
  opacity: 0;
  animation: fade-up 0.5s ease forwards 0.6s, onair-pulse 2s ease-in-out infinite 1s;
}

.loading-estimate {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  z-index: 1;
  opacity: 0;
  animation: fade-up 0.4s ease forwards 0.8s;
}

@keyframes onair-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(0, 214, 143, 0); }
  50% { box-shadow: 0 0 16px rgba(0, 214, 143, 0.15); }
}

.loading-elapsed {
  font-family: var(--font-code);
  font-size: 48px;
  font-weight: 300;
  color: var(--text-bright);
  letter-spacing: 0.06em;
  z-index: 1;
  margin-bottom: 32px;
  opacity: 0;
  animation: fade-up 0.5s ease forwards 0.9s;
}

.loading-phase {
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  z-index: 1;
  margin-bottom: 12px;
  min-height: 16px;
  opacity: 0;
  animation: fade-up 0.4s ease forwards 1.3s;
}

.loading-progress {
  width: 200px;
  height: 2px;
  background: var(--border-dim);
  border-radius: 1px;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  animation: fade-up 0.4s ease forwards 1.4s;
}

.loading-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--phosphor);
  border-radius: 1px;
  transition: width 1s linear;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   SESSION LOG LINES
   ================================================================ */

.profile-block {
  padding: 6px 16px 6px 38px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.profile-block--visible {
  opacity: 1;
  transform: translateY(0);
}

.profile-block__header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.profile-block__tag {
  font-family: var(--font-code);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.profile-block__tag--a { color: var(--agent-a); }
.profile-block__tag--b { color: var(--agent-b); }

.profile-block__name {
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.profile-block__meta {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  padding-left: 2px;
  margin-bottom: 4px;
}

.profile-block__desc {
  font-family: var(--font-speech);
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  padding-left: 2px;
}

/* ================================================================
   CONVERSATION SCREEN
   ================================================================ */

.conversation-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Context bar */
.context-bar {
  padding: 8px 16px;
  background: var(--surface-0);
  border-bottom: 1px solid var(--border-ghost);
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  display: flex;
  gap: 12px;
  overflow: hidden;
}

.context-bar__item {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.context-bar__label { color: var(--text-ghost); opacity: 0.6; }
.context-bar__value { color: var(--text-secondary); }

/* Progress bar */
.progress-bar {
  height: 2px;
  background: var(--border-dim);
}

.progress-bar__fill {
  height: 100%;
  background: var(--phosphor);
  transition: width 0.4s ease;
  width: 0%;
}

/* Messages container */
.messages {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
  min-height: 0;
}

/* Date divider */
.date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 8px;
}

.date-divider__line {
  flex: 1; height: 1px;
  background: var(--border-dim);
}

.date-divider__text {
  font-family: var(--font-system);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-ghost);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Session intro block */
.session-intro {
  padding: 12px 16px;
  margin: 4px 16px 8px;
  border-left: 2px solid var(--phosphor);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.session-intro--visible {
  opacity: 1;
  transform: translateY(0);
}

.session-intro__label {
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--phosphor);
  margin-bottom: 4px;
}

.session-intro__company {
  font-family: var(--font-system);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.session-intro__position {
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* System message */
.system-msg {
  padding: 6px 16px;
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--text-ghost);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.system-msg--visible { opacity: 1; }

.system-msg__icon {
  font-size: 10px;
  color: var(--phosphor);
  opacity: 0.6;
  flex-shrink: 0;
  margin-top: 1px;
}

.system-msg .agent-ref {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Message */
.message {
  padding: 10px 16px;
  position: relative;
  opacity: 0;
  transform: translateY(6px);
}

.message--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.message:hover { background: rgba(255,255,255,0.015); }

.message__header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.message__avatar {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  top: 2px;
}

.message__avatar--a {
  background: var(--agent-a-dim);
  color: var(--agent-a);
  border: 1px solid rgba(232, 166, 52, 0.25);
}

.message__avatar--b {
  background: var(--agent-b-dim);
  color: var(--agent-b);
  border: 1px solid rgba(61, 184, 160, 0.25);
}

.message__name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.message__name {
  font-family: var(--font-system);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.message__agent-tag {
  font-family: var(--font-code);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 2px;
}

.message__agent-tag--a {
  color: var(--agent-a);
  background: var(--agent-a-ghost);
  border: 1px solid rgba(232, 166, 52, 0.12);
}

.message__agent-tag--b {
  color: var(--agent-b);
  background: var(--agent-b-ghost);
  border: 1px solid rgba(61, 184, 160, 0.12);
}

.message__turn-tag {
  font-family: var(--font-system);
  font-size: 9px;
  color: var(--text-ghost);
}

.message__time {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

.message:hover .message__time { opacity: 1; }

.message__body { padding-left: 36px; }

.message__text {
  font-family: var(--font-speech);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-primary);
  font-weight: 400;
}

/* Speech character animation */
.speech-char { opacity: 0; display: inline; }
.speech-char--visible { opacity: 1; }

/* Inner voice — flat observation log */
.intercept {
  padding: 6px 16px 10px 52px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.intercept--visible {
  opacity: 1;
  transform: translateY(0);
}

.intercept__label {
  font-family: var(--font-system);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.intercept--a .intercept__label { color: var(--agent-a); opacity: 0.7; }
.intercept--b .intercept__label { color: var(--agent-b); opacity: 0.7; }

.intercept__text {
  font-family: var(--font-speech);
  font-size: 12.5px;
  line-height: 1.8;
  font-style: italic;
}

.intercept--a .intercept__text { color: rgba(232, 166, 52, 0.7); }
.intercept--b .intercept__text { color: rgba(61, 184, 160, 0.7); }

/* Typing indicator */
.typing-indicator {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  min-height: 36px;
}

.typing-indicator--visible { opacity: 1; }

.typing-indicator__avatar {
  width: 20px; height: 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-size: 8px;
  font-weight: 600;
}

.typing-indicator__avatar--a {
  background: var(--agent-a-dim);
  color: var(--agent-a);
  border: 1px solid rgba(232,166,52,0.2);
}

.typing-indicator__avatar--b {
  background: var(--agent-b-dim);
  color: var(--agent-b);
  border: 1px solid rgba(61,184,160,0.2);
}

.typing-indicator__content {
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--text-ghost);
  display: flex;
  align-items: center;
  gap: 6px;
}

.typing-indicator__name { color: var(--text-secondary); font-weight: 500; }

.typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}

.typing-dots span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--typing-cyan);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* === CONVERSATION FOOTER === */
.conversation-footer {
  padding: 10px 16px 16px;
  border-top: 1px solid var(--border-dim);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.conversation-footer__turn {
  font-family: var(--font-system);
  font-size: 10px;
  color: var(--text-ghost);
  letter-spacing: 0.04em;
}

.conversation-footer__turn span {
  color: var(--text-secondary);
}

.conversation-footer__spacer { flex: 1; }

.conversation-footer__btn {
  padding: 6px 16px;
  font-family: var(--font-system);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border-hard);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.conversation-footer__btn:hover {
  color: var(--text-primary);
  border-color: var(--text-ghost);
}

/* ================================================================
   SESSION END FOOTER (conversation 画面内)
   ================================================================ */

.result-footer {
  padding: 16px 16px 24px;
  border-top: 1px solid var(--border-dim);
  display: flex;
  justify-content: center;
  margin-top: auto;
}

.result-footer__btn {
  padding: 8px 20px;
  font-family: var(--font-system);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border-hard);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.result-footer__btn:hover {
  color: var(--text-primary);
  border-color: var(--text-ghost);
}

/* ================================================================
   ERROR OVERLAY
   ================================================================ */

.error-overlay {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-system);
  font-size: 11px;
  color: var(--signal-red);
  background: var(--signal-red-dim);
  border: 1px solid rgba(199, 75, 75, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.error-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 520px) {
  .channel-wrapper { border-left: none; border-right: none; }
  .context-bar { font-size: 9px; padding: 6px 12px; gap: 8px; }
  .message { padding: 10px 12px; }
  .message__body { padding-left: 34px; }
  .message__avatar { width: 26px; height: 26px; font-size: 10px; }
  .intercept { padding-left: 46px; }
  .profile-block { padding-left: 30px; }
}
