:root {
  --page: #e8eef7;
  --page-deep: #dde6f2;
  --navy: #0e1d33;
  --navy-2: #122541;
  --surface: #17283f;
  --surface-2: #1b2e49;
  --surface-3: #203654;
  --line: #2b405f;
  --line-soft: rgba(135, 164, 207, .18);
  --text: #f5f8fd;
  --text-soft: #c4d0e2;
  --muted: #91a7c8;
  --muted-2: #6f87ab;
  --blue: #5c8df0;
  --blue-strong: #4479e6;
  --blue-soft: rgba(92, 141, 240, .13);
  --mint: #68dcc2;
  --green: #54d2a7;
  --amber: #f0bd63;
  --danger: #ff6e7b;
  --emotion: #79a4ef;
  --bar: linear-gradient(90deg, #4e7fe8, #69dec3);
  --shadow: 0 22px 58px rgba(12, 28, 53, .14);
  color-scheme: dark;
  font-family: Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 5%, rgba(102, 144, 212, .18), transparent 28rem),
    linear-gradient(180deg, var(--page) 0%, #f2f5fa 52%, var(--page) 100%);
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 16px auto 0;
}
.app-shell main { min-width: 0; }
.topbar > *, .top-actions > *, .hero > *, .hero-copy, .hero-pipeline,
.pipeline-step > *, .status-strip > *, .section-heading > *, .section-heading > div,
.section-heading > div > div, .capture-meta, .session-actions > *, .session-guide > div,
.live-workspace > *, .live-detail-grid > *, .subsection-title > *, .timeline-heading > *,
.final-hero > *, .final-grid > *, .final-stat-grid > *, .conversation-heading > *,
.stage-title > *, .chat-row > *, .conversation-actions > *, .response-controls > *,
.response-footer > *, .notes > *, footer > * { min-width: 0; }
.status-strip strong, .session-guide strong, .session-guide span,
.live-emotion-main small, .live-emotion-main h3, .mini-metrics strong,
.event-chip, .integration-settings > p, .final-emotion-block p,
.conversation-intro, .conversation-actions > span, .response-footer > span,
.notes p, footer span { overflow-wrap: anywhere; }

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 22px;
  border: 1px solid rgba(137, 169, 217, .2);
  border-radius: 20px;
  background: linear-gradient(135deg, #101f37, #132945);
  box-shadow: 0 14px 34px rgba(14, 31, 57, .13);
}
.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand > span:last-child { min-width: 0; display: grid; gap: 3px; }
.brand small {
  color: #76a2f6;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .14em;
}
.brand strong { color: #fff; font-size: 18px; letter-spacing: -.025em; }
.brand-wave {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(116, 159, 237, .46);
  border-radius: 13px;
  background: linear-gradient(145deg, #315eae, #4f83e4);
  box-shadow: 0 9px 25px rgba(44, 99, 194, .26);
}
.brand-wave i { display: block; width: 3px; border-radius: 4px; background: #fff; }
.brand-wave i:nth-child(1), .brand-wave i:nth-child(5) { height: 10px; opacity: .7; }
.brand-wave i:nth-child(2), .brand-wave i:nth-child(4) { height: 20px; }
.brand-wave i:nth-child(3) { height: 28px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.header-status, .version-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid rgba(145, 174, 217, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  font-size: 9px;
  line-height: 1.25;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
.header-status { gap: 7px; color: var(--text-soft); }
.header-status i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #7184a2; box-shadow: 0 0 0 4px rgba(113, 132, 162, .13); }
.header-status i.connected { background: var(--mint); box-shadow: 0 0 0 4px rgba(104, 220, 194, .12); }
.header-status i.connecting { background: var(--amber); }
.header-status b, .version-pill { font-weight: 800; }
.version-pill { color: #b8d0ff; border-color: rgba(92, 141, 240, .34); background: rgba(92, 141, 240, .11); }

main { padding-top: 18px; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  align-items: center;
  gap: clamp(28px, 3vw, 44px);
  min-height: 350px;
  margin-bottom: 16px;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid rgba(133, 164, 211, .22);
  border-radius: 28px;
  background:
    radial-gradient(circle at 98% -15%, rgba(86, 132, 220, .18) 0 16%, transparent 16.2%),
    radial-gradient(circle at 98% -15%, transparent 0 22%, rgba(87, 136, 229, .14) 22.2% 22.7%, transparent 23%),
    linear-gradient(135deg, #0d1b30 0%, #122643 70%, #183252 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -80px;
  bottom: -170px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(106, 149, 228, .16);
  border-radius: 50%;
}
.hero-copy { max-width: 760px; }
.eyebrow { margin: 0 0 13px; color: #79a5f8; font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.hero h1 { margin: 0; color: #fff; font-size: clamp(37px, 3.7vw, 50px); line-height: 1.08; letter-spacing: -.052em; word-break: keep-all; overflow-wrap: normal; }
.hero h1 > span { display: block; white-space: nowrap; }
.hero-title-main { color: #fff; }
.hero h1 .hero-title-accent { margin-top: .08em; color: #76a0fa; font-size: .92em; }
.hero-copy > p:last-child { max-width: 720px; margin: 22px 0 0; color: #b6c6dc; font-size: 13px; line-height: 1.82; word-break: keep-all; }
.hero-pipeline { display: grid; gap: 12px; align-content: center; }
.hero-pipeline > i { display: none; }
.pipeline-step {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  border: 1px solid rgba(142, 171, 214, .22);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
  transition: border-color .2s, background .2s, transform .2s;
}
.pipeline-step b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #91b4f5;
  border-radius: 11px;
  background: rgba(87, 133, 219, .18);
  font-size: 10px;
}
.pipeline-step span { min-width: 0; display: grid; gap: 3px; color: #f7f9fe; font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.pipeline-step span, .pipeline-step small { word-break: keep-all; overflow-wrap: normal; }
.pipeline-step small { color: #9cafca; font-size: 9px; font-weight: 600; letter-spacing: 0; }
.pipeline-step.active { border-color: rgba(94, 145, 242, .78); background: linear-gradient(100deg, rgba(74, 122, 220, .27), rgba(90, 201, 190, .11)); transform: translateX(-3px); }
.pipeline-step.active b { color: #eaf2ff; background: #315caa; }
.pipeline-step.done { border-color: rgba(95, 213, 183, .46); background: rgba(73, 188, 156, .09); }
.pipeline-step.done b { color: #d9fff4; background: rgba(62, 185, 151, .28); }

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--navy);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.status-strip > div { min-width: 0; padding: 16px 19px; border-right: 1px solid var(--line); }
.status-strip > div:last-child { border-right: 0; }
.status-strip small { display: block; margin-bottom: 5px; color: #6882aa; font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.status-strip strong { display: block; max-width: 100%; color: #dce6f5; font-size: 10px; line-height: 1.45; word-break: break-word; }

.panel, .conversation-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  box-shadow: var(--shadow);
}
.session-panel { margin-bottom: 16px; padding: clamp(19px, 2.5vw, 29px); }
.section-heading { margin-bottom: 20px; }
.section-heading.inline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; }
.section-heading > div { display: flex; align-items: center; gap: 12px; }
.section-heading > div > span, .stage-title > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  color: #90b5fa;
  border-radius: 10px;
  background: rgba(83, 130, 218, .19);
  font-size: 9px;
  font-weight: 850;
}
.section-heading p { margin: 0 0 3px; color: #6f8fbe; font-size: 8px; font-weight: 850; letter-spacing: .15em; }
.section-heading h2 { margin: 0; color: #fff; font-size: 17px; line-height: 1.35; letter-spacing: -.025em; word-break: keep-all; overflow-wrap: normal; }
.section-heading.compact { margin-bottom: 20px; }
.capture-meta { min-width: 220px; flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 12px; }
.capture-meta > strong { min-width: 92px; color: #fff; text-align: right; font-size: 22px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.memory-pill, .event-pill, .final-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 8px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: .09em;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  flex: 0 0 auto;
}
.memory-pill { min-width: 96px; color: #7fe5c6; border: 1px solid rgba(98, 220, 188, .28); background: rgba(73, 194, 162, .09); }

.session-actions { display: grid; grid-template-columns: minmax(145px, 1.1fr) minmax(110px, .72fr) minmax(190px, 1.45fr) minmax(88px, .6fr); gap: 10px; }
.button {
  min-width: 0;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  transition: transform .16s, filter .16s, opacity .16s, border-color .16s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.07); }
.button:disabled { cursor: not-allowed; opacity: .34; }
.button.primary, .button.stop, .button.analyze { display: flex; align-items: center; justify-content: center; gap: 9px; }
.button.primary { color: #fff; background: linear-gradient(135deg, #4779df, #5c8ff2); box-shadow: 0 10px 27px rgba(51, 101, 199, .24); }
.record-dot { width: 10px; height: 10px; flex: 0 0 10px; border: 2px solid #fff; border-radius: 50%; }
.button.stop { color: #cad6e9; border-color: var(--line); background: rgba(255, 255, 255, .045); }
.button.stop i { width: 8px; height: 8px; flex: 0 0 8px; background: currentColor; }
.button.analyze { justify-content: space-between; color: #eef4ff; border-color: rgba(100, 145, 231, .2); background: #213959; }
.button.analyze b { flex: 0 0 auto; font-size: 15px; }
.button.secondary { color: #b8c7dc; border-color: var(--line); background: rgba(255, 255, 255, .035); }
.session-panel[data-phase="live"] .button.primary { background: #50627d; box-shadow: none; }
.session-panel[data-phase="ended"] .button.analyze { background: linear-gradient(135deg, #4779df, #5c8ff2); box-shadow: 0 10px 27px rgba(51, 101, 199, .22); }

.session-guide {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 17px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
}
.session-guide > i { width: 9px; height: 9px; flex: 0 0 9px; border: 2px solid #dce6f5; border-radius: 50%; background: #7185a5; box-shadow: 0 0 0 4px rgba(113, 133, 165, .12); }
.session-guide > div { display: grid; gap: 3px; }
.session-guide strong { color: #dce6f5; font-size: 10px; line-height: 1.45; }
.session-guide span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.session-panel[data-phase="live"] .session-guide { border-color: rgba(91, 143, 240, .45); background: rgba(70, 119, 214, .09); }
.session-panel[data-phase="live"] .session-guide > i { background: var(--blue); box-shadow: 0 0 0 4px rgba(92, 141, 240, .13); animation: pulse 1.4s ease-out infinite; }
.session-panel[data-phase="ended"] .session-guide > i,
.session-panel[data-phase="complete"] .session-guide > i { background: var(--mint); box-shadow: 0 0 0 4px rgba(104, 220, 194, .11); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(92, 141, 240, .36); } 100% { box-shadow: 0 0 0 10px rgba(92, 141, 240, 0); } }

.live-workspace { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .5fr); gap: 15px; }
.waveform-column { min-width: 0; }
.waveform-stage {
  position: relative;
  height: 324px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    linear-gradient(rgba(122, 153, 198, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 153, 198, .035) 1px, transparent 1px),
    #122138;
  background-size: 32px 32px;
  overflow: hidden;
}
.waveform-stage.recording { border-color: rgba(94, 145, 242, .62); background-color: #132743; }
#waveform-canvas { display: block; width: 100%; height: 100%; }
.waveform-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 22px; color: var(--muted); text-align: center; pointer-events: none; }
.waveform-empty strong { color: #dce6f4; font-size: 13px; }
.waveform-empty small { font-size: 9px; line-height: 1.55; }
.empty-mic { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 5px; color: #83aafb; border: 1px solid rgba(110, 153, 233, .26); border-radius: 50%; background: #1a2d49; box-shadow: 0 8px 24px rgba(4, 14, 30, .24); font-size: 0; }
.empty-mic::after { content: ""; width: 12px; height: 18px; border: 2px solid currentColor; border-radius: 8px; }
.playhead { position: absolute; z-index: 2; left: 74%; top: 42px; bottom: 45px; width: 1px; background: rgba(103, 218, 194, .72); pointer-events: none; opacity: 0; transition: left .15s ease; }
.waveform-stage.has-audio .playhead { opacity: 1; }
.playhead i, .playhead::after { content: ""; position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }
.playhead i { top: -4px; }
.playhead::after { bottom: -4px; }
.wave-status { position: absolute; z-index: 3; left: 17px; right: 17px; bottom: 12px; display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 8px; }
.wave-status span { min-width: 0; font-weight: 800; line-height: 1.35; letter-spacing: .06em; }
.wave-status b { flex: 0 0 auto; color: #b7c7dc; font-weight: 700; font-variant-numeric: tabular-nums; }
.level-line { height: 4px; margin: 8px 9px 0; border-radius: 5px; background: #243955; overflow: hidden; }
.level-line i { display: block; width: 0; height: 100%; background: var(--bar); transition: width 60ms linear; }

.live-emotion-card { position: relative; min-height: 324px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, #182a43, #13223a); overflow: hidden; }
.live-emotion-card::after { content: ""; position: absolute; right: -80px; bottom: -100px; width: 210px; height: 210px; border-radius: 50%; background: color-mix(in srgb, var(--emotion) 13%, transparent); pointer-events: none; }
.live-card-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.live-card-head > span { display: inline-flex; align-items: center; gap: 7px; color: #c5d2e4; font-size: 8px; font-weight: 850; letter-spacing: .1em; }
.live-card-head > span i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--emotion); }
.event-pill { color: var(--muted); border: 1px solid var(--line); background: rgba(255, 255, 255, .035); }
.event-pill.provisional { color: var(--amber); border-color: rgba(240, 189, 99, .32); background: rgba(240, 189, 99, .08); }
.event-pill.final { color: #86e5c8; border-color: rgba(98, 220, 188, .3); background: rgba(73, 194, 162, .08); }
.live-emotion-main { position: relative; z-index: 1; min-height: 124px; display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 15px; padding: 12px 0 5px; }
.emotion-orb { position: relative; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--emotion) 18%, #15263e); }
.emotion-orb::before, .emotion-orb::after { content: ""; position: absolute; border: 1px solid color-mix(in srgb, var(--emotion) 38%, transparent); border-radius: 50%; inset: 9px; }
.emotion-orb::after { inset: 19px; }
.emotion-orb i { width: 10px; height: 10px; border-radius: 50%; background: var(--emotion); box-shadow: 0 0 18px color-mix(in srgb, var(--emotion) 60%, transparent); }
.live-emotion-main small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.live-emotion-main h3 { margin: 5px 0 4px; color: #fff; font-size: 27px; line-height: 1.1; letter-spacing: -.05em; }
.live-emotion-main p { margin: 0; color: var(--muted); font-size: 9px; }
.live-emotion-main p strong { color: #c8d5e7; }
.live-confidence { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; }
.live-confidence span { color: var(--muted); font-size: 8px; }
.live-confidence strong { color: #fff; font-size: 18px; }
.live-confidence > i { grid-column: 1 / -1; height: 5px; border-radius: 8px; background: #283c58; overflow: hidden; }
.live-confidence > i b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--emotion); transition: width .25s ease; }
.mini-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 15px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.mini-metrics div { min-width: 0; padding: 10px; border-right: 1px solid var(--line); }
.mini-metrics div:last-child { border-right: 0; }
.mini-metrics small { display: block; margin-bottom: 4px; color: var(--muted-2); font-size: 7px; line-height: 1.35; }
.mini-metrics strong { display: block; color: #dce6f5; font-size: 9px; line-height: 1.35; }

.live-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-top: 15px; }
.subpanel { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .028); }
.subsection-title { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }
.subsection-title h3 { margin: 0; color: #f4f7fc; font-size: 11px; line-height: 1.4; }
.subsection-title span { color: var(--muted); font-size: 8px; line-height: 1.4; }
.emotion-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.emotion-bar { min-width: 0; }
.emotion-bar header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.emotion-bar header span { min-width: 0; }
.emotion-bar header b { flex: 0 0 auto; color: #c0cee1; }
.emotion-bar > i { display: block; height: 5px; border-radius: 8px; background: #263a56; overflow: hidden; }
.emotion-bar > i b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--bar); transition: width .24s ease; }
.emotion-bar.active header { color: color-mix(in srgb, var(--emotion) 78%, white); font-weight: 800; }
.emotion-bar.active > i b { background: var(--emotion); }
.axis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.axis-card { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #15263e; }
.axis-card > span { min-width: 0; color: var(--muted); font-size: 8px; line-height: 1.35; }
.axis-card > strong { color: #dbe5f4; font-size: 9px; line-height: 1.35; }
.axis-card > i { grid-column: 1 / -1; display: block; height: 5px; margin-top: 5px; border-radius: 7px; background: #283c58; overflow: hidden; }
.axis-card > i b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--bar); transition: width .24s ease; }

.timeline-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 9px 24px; margin: 26px 2px 12px; }
.timeline-heading > div { display: grid; gap: 6px; }
.timeline-heading h3 { margin: 0; color: #f2f6fc; font-size: 13px; line-height: 1.4; }
.timeline-heading p { max-width: 460px; margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; text-align: right; }
.live-indicator { display: inline-flex; align-items: center; gap: 6px; color: #83acf9; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.live-indicator i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(104, 220, 194, .1); }
.timeline-wrap { height: 260px; border: 1px solid var(--line); border-radius: 14px; background: #122138; overflow: hidden; }
#emotion-timeline-canvas { display: block; width: 100%; height: 100%; }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 13px 2px; }
.timeline-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.timeline-legend i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.event-list { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 6px; scrollbar-color: #415776 #16263e; scrollbar-width: thin; }
.empty-result { color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.event-chip { min-width: 126px; max-width: 185px; flex: 0 0 auto; display: grid; gap: 3px; padding: 9px 11px; border-left: 3px solid var(--chip); border-radius: 8px; background: #172941; }
.event-chip time { color: var(--muted); font-size: 8px; }
.event-chip strong { color: #e5edf8; font-size: 9px; }
.event-chip small { color: var(--muted); font-size: 8px; }

.analysis-progress, .ai-progress { min-height: 42px; display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 10px 13px; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 10px; background: rgba(255, 255, 255, .035); font-size: 9px; line-height: 1.4; }
.analysis-progress i, .ai-progress i { width: 12px; height: 12px; flex: 0 0 12px; border: 2px solid #40526d; border-top-color: var(--mint); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.integration-settings { margin-top: 18px; border-top: 1px solid var(--line); }
.integration-settings summary { padding-top: 17px; color: #b9c9df; cursor: pointer; font-size: 10px; font-weight: 800; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.settings-grid label { min-width: 0; }
.settings-grid label > span { display: block; margin: 0 0 6px 2px; color: var(--muted); font-size: 9px; font-weight: 700; }
input, textarea, select { width: 100%; min-width: 0; color: #eef4fd; border: 1px solid #354b69; border-radius: 10px; outline: none; background: #14253d; }
input { height: 40px; padding: 0 11px; font-size: 11px; }
textarea { padding: 11px 12px; resize: vertical; line-height: 1.6; font-size: 11px; }
select { height: 42px; padding: 0 10px; font-size: 10px; }
input:focus, textarea:focus, select:focus { border-color: rgba(92, 141, 240, .8); box-shadow: 0 0 0 3px rgba(92, 141, 240, .11); }
.integration-settings > p { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.65; }

.final-panel { margin-bottom: 16px; padding: clamp(19px, 2.5vw, 29px); scroll-margin-top: 20px; }
.final-badge { color: #7fe5c6; border: 1px solid rgba(98, 220, 188, .28); background: rgba(73, 194, 162, .09); }
.final-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 16px; }
.final-emotion-block { min-height: 190px; display: flex; flex-direction: column; justify-content: center; padding: 28px; border: 1px solid color-mix(in srgb, var(--emotion) 30%, #2b405f); border-radius: 17px; background: linear-gradient(135deg, color-mix(in srgb, var(--emotion) 15%, #17283f), #14243b); }
.final-emotion-block small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.final-emotion-block > strong { margin: 10px 0 12px; color: color-mix(in srgb, var(--emotion) 82%, white); font-size: clamp(34px, 4vw, 52px); line-height: 1.05; letter-spacing: -.06em; }
.final-emotion-block p { max-width: 600px; margin: 0; color: #bfccdf; font-size: 10px; line-height: 1.75; }
.final-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.final-stat-grid > div { min-height: 90px; display: grid; align-content: center; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .032); }
.final-stat-grid small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.final-stat-grid strong { color: #f3f7fd; font-size: 19px; line-height: 1.25; letter-spacing: -.035em; }
.final-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.final-card { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .027); }
.final-card > p { margin: 0 0 4px; color: #6f8fbe; font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.final-card > h3 { margin: 0 0 18px; color: #f1f5fb; font-size: 13px; }
.emotion-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.emotion-path span { padding: 8px 10px; color: #d5e0ee; border-left: 3px solid var(--path-color); border-radius: 8px; background: #172a43; font-size: 9px; font-weight: 750; }
.emotion-path i { color: #657c9e; font-size: 11px; font-style: normal; }
.final-axis-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 18px; }
.final-axis-list > div { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
.final-axis-list span, .final-axis-list strong { font-size: 8px; line-height: 1.35; }
.final-axis-list span { color: var(--muted); }
.final-axis-list strong { color: #d7e2f0; }
.final-axis-list > div > i { grid-column: 1 / -1; height: 5px; border-radius: 8px; background: #283c58; overflow: hidden; }
.final-axis-list > div > i b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--bar); }

.conversation-panel { margin-bottom: 16px; padding: clamp(19px, 2.6vw, 30px); background: radial-gradient(circle at 90% 5%, rgba(72, 115, 199, .18), transparent 32%), linear-gradient(145deg, #0e1c32, #132845); }
.conversation-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; }
.stage-title { min-width: 0; display: flex; align-items: center; gap: 12px; }
.stage-title.light > span { color: #a7c2f8; background: rgba(84, 132, 222, .2); }
.stage-title > div { min-width: 0; }
.stage-title small { display: block; margin-bottom: 4px; color: #7392be; font-size: 8px; font-weight: 850; line-height: 1.45; letter-spacing: .13em; }
.stage-title h2 { margin: 0; color: #fff; font-size: 17px; line-height: 1.4; letter-spacing: -.025em; }
.conversation-ai-badge, .speech-output-badge { min-height: 29px; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; color: #b8c6df; border: 1px solid rgba(145, 174, 217, .2); border-radius: 999px; background: rgba(255, 255, 255, .045); font-size: 8px; font-weight: 800; line-height: 1.35; letter-spacing: .06em; }
.conversation-ai-badge i, .speech-output-badge i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #7888a8; }
.conversation-ai-badge.ready { color: #9ce9d0; border-color: rgba(68, 203, 155, .28); }
.conversation-ai-badge.ready i, .speech-output-badge i { background: #5bd5b2; }
.conversation-ai-badge.offline, .speech-output-badge.offline { color: #aab4c6; }
.conversation-ai-badge.offline i, .speech-output-badge.offline i { background: #7c889f; }
.conversation-intro { max-width: 930px; margin: 15px 0 26px; color: #9dacc7; font-size: 9px; line-height: 1.75; }
.conversation-thread { max-width: 1080px; margin: 0 auto; padding: 5px 0; }
.chat-row { min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.chat-row.user-row { flex-direction: row-reverse; }
.chat-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 13px; font-size: 8px; font-weight: 850; letter-spacing: .07em; }
.user-avatar { color: #fff; background: linear-gradient(145deg, #315da9, #294b86); }
.ese-avatar { grid-template-columns: 17px 1fr; gap: 3px; color: #fff; background: linear-gradient(145deg, #4d7fe5, #3565c2); box-shadow: 0 8px 22px rgba(49, 99, 191, .25); }
.ese-avatar b { font-size: 16px; }
.ese-avatar span { display: flex; align-items: center; gap: 1px; }
.ese-avatar i { display: block; width: 2px; border-radius: 3px; background: #fff; }
.ese-avatar i:nth-child(1), .ese-avatar i:nth-child(3) { height: 7px; }
.ese-avatar i:nth-child(2) { height: 13px; }
.chat-message { width: min(78%, 780px); min-width: 0; padding: 14px 16px 15px; border: 1px solid rgba(139, 170, 215, .15); border-radius: 17px; }
.chat-message > span { display: block; margin-bottom: 7px; font-size: 7px; font-weight: 850; line-height: 1.4; letter-spacing: .12em; }
.user-message { border-top-right-radius: 4px; background: linear-gradient(135deg, #3e71d3, #4f82e7); }
.user-message > span { color: #d3e2ff; text-align: right; }
.assistant-message { border-top-left-radius: 4px; background: #21344f; box-shadow: 0 13px 30px rgba(2, 7, 17, .16); }
.assistant-message > span { color: #80a8f5; }
.chat-message textarea { min-height: 85px; padding: 0; color: #f7faff; border: 0; border-radius: 0; background: transparent; box-shadow: none; resize: vertical; font-size: 12px; line-height: 1.7; }
.user-message textarea { text-align: right; }
.user-message textarea::placeholder { color: #d3e0f8; }
.assistant-message textarea::placeholder { color: #9fb0c9; }
.conversation-emotion-context { width: fit-content; max-width: 100%; display: grid; justify-items: center; gap: 4px; margin: 18px auto; padding: 8px 15px; color: #d5dff1; border: 1px solid rgba(89, 205, 181, .22); border-radius: 999px; background: rgba(78, 190, 166, .07); text-align: center; overflow-wrap: anywhere; }
.conversation-emotion-context span { max-width: 100%; color: #71d8c0; font-size: 7px; font-weight: 850; letter-spacing: .12em; }
.conversation-emotion-context strong { max-width: 100%; font-size: 9px; line-height: 1.5; }
.conversation-actions { max-width: 1080px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 19px auto 0; }
.conversation-secondary-button { min-height: 35px; max-width: 100%; padding: 8px 12px; color: #c6d3e5; border: 1px solid rgba(145, 174, 217, .2); border-radius: 9px; background: rgba(255, 255, 255, .045); cursor: pointer; font-size: 8px; font-weight: 750; line-height: 1.4; white-space: normal; }
.conversation-secondary-button:hover:not(:disabled) { background: rgba(255, 255, 255, .09); }
.conversation-secondary-button:disabled { cursor: not-allowed; opacity: .36; }
.conversation-actions > span { flex: 1 1 260px; color: #8fa0be; font-size: 8px; line-height: 1.55; text-align: right; }
.voice-response-divider { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin: 27px 0 15px; color: #7890b6; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.voice-response-divider::before { content: ""; height: 1px; flex: 1 1 120px; background: rgba(145, 174, 217, .15); }
.voice-response-divider > span:first-child { order: -1; }
.voice-response-divider .speech-output-badge { margin-left: auto; letter-spacing: .04em; }
.response-controls { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(100px, .55fr) minmax(260px, 1fr); gap: 10px; align-items: end; }
.play-response-button, .response-stop-button { min-width: 0; min-height: 44px; padding: 9px 13px; border-radius: 11px; cursor: pointer; font-size: 9px; font-weight: 800; line-height: 1.4; white-space: normal; }
.play-response-button { color: #fff; border: 0; background: linear-gradient(135deg, #4779df, #5c8ff2); box-shadow: 0 10px 24px rgba(48, 98, 193, .22); }
.play-response-button span { margin-right: 6px; }
.response-stop-button { color: #c3cee1; border: 1px solid rgba(145, 174, 217, .2); background: rgba(255, 255, 255, .045); }
.play-response-button:disabled, .response-stop-button:disabled { cursor: not-allowed; opacity: .34; }
.voice-select-label { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 10px; color: #93a6c4; font-size: 8px; line-height: 1.35; }
.voice-select-label select { min-width: 0; color: #e5edf8; border-color: #354b69; background: #172941; }
.conversation-panel .ai-progress { color: #aab8cf; background: rgba(255, 255, 255, .035); }
.expressive-response-player { width: 100%; height: 42px; margin-top: 12px; }
.response-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px 20px; margin-top: 12px; color: #8595b2; font-size: 8px; line-height: 1.55; }
.response-footer > span:first-child { flex: 1 1 280px; }
.response-style { max-width: 100%; padding: 6px 9px; color: #ced9e9; border: 1px solid rgba(145, 174, 217, .18); border-radius: 8px; background: rgba(255, 255, 255, .04); }

.api-panel { margin-bottom: 16px; padding: clamp(19px, 2.4vw, 26px); }
.text-button { max-width: 100%; padding: 7px 9px; color: #b5c5dc; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .035); cursor: pointer; font-size: 9px; line-height: 1.4; white-space: normal; }
.text-button:disabled { cursor: not-allowed; opacity: .4; }
.api-panel pre { max-height: 360px; margin: 0; padding: 18px; overflow: auto; color: #dce8f7; border: 1px solid #263c59; border-radius: 13px; background: #091526; font: 10px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.api-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.api-tags span { max-width: 100%; padding: 6px 8px; color: #91a9cd; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .025); font-size: 8px; font-weight: 750; line-height: 1.35; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.notes > div { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #11223a, #172c49); box-shadow: 0 12px 30px rgba(14, 31, 57, .09); }
.notes strong { color: #edf3fc; font-size: 10px; line-height: 1.4; }
.notes p { margin: 7px 0 0; color: #9aacc7; font-size: 9px; line-height: 1.65; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px 20px; padding: 30px 2px 34px; color: #5f7597; font-size: 8px; line-height: 1.5; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; max-width: min(460px, calc(100% - 32px)); padding: 12px 16px; color: #fff; border: 1px solid #355175; border-radius: 10px; background: #142944; box-shadow: 0 14px 36px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .18s, transform .18s; font-size: 10px; line-height: 1.45; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255, 110, 123, .45); background: #7f2d3a; }

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 28px; padding: 42px; }
  .hero-pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipeline-step { grid-template-columns: 34px minmax(0, 1fr); padding: 11px; }
  .pipeline-step b { width: 32px; height: 32px; }
  .pipeline-step.active { transform: translateY(-2px); }
}

@media (max-width: 1080px) {
  .session-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .button.analyze { grid-column: 1 / -1; order: 3; }
  .new-session { order: 4; }
  .live-workspace { grid-template-columns: 1fr; }
  .live-emotion-card { min-height: 260px; }
  .response-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice-select-label { grid-column: 1 / -1; grid-template-columns: 105px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .app-shell { width: min(100% - 24px, 1280px); margin-top: 12px; }
  .topbar { border-radius: 17px; }
  .hero { padding: 38px 32px; border-radius: 23px; }
  .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-strip > div:nth-child(2) { border-right: 0; }
  .status-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .live-detail-grid, .final-hero, .final-grid { grid-template-columns: 1fr; }
  .notes { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .app-shell { width: min(100% - 18px, 1280px); margin-top: 9px; }
  .topbar { min-height: 66px; gap: 10px; padding: 12px 14px; }
  .brand small { display: none; }
  .brand strong { font-size: 15px; }
  .brand-wave { width: 38px; height: 38px; flex-basis: 38px; }
  .header-status { display: none; }
  main { padding-top: 10px; }
  .hero { gap: 25px; margin-bottom: 10px; padding: 31px 21px; border-radius: 19px; }
  .hero h1 { font-size: clamp(31px, 9vw, 40px); }
  .hero h1 > span { white-space: normal; word-break: keep-all; }
  .hero-copy > p:last-child { margin-top: 17px; font-size: 11px; }
  .hero-pipeline { grid-template-columns: 1fr; gap: 8px; }
  .pipeline-step { min-height: 58px; }
  .status-strip { margin-bottom: 10px; }
  .status-strip > div { padding: 13px 14px; }
  .session-panel, .final-panel, .api-panel, .conversation-panel { margin-bottom: 10px; padding: 17px 14px; border-radius: 17px; }
  .section-heading.inline { align-items: flex-start; }
  .section-heading > div { align-items: flex-start; }
  .capture-meta { min-width: 0; width: 100%; justify-content: space-between; }
  .capture-meta > strong { min-width: 0; text-align: left; font-size: 18px; }
  .session-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .button { min-height: 46px; padding: 9px 10px; font-size: 9px; }
  .button.analyze, .new-session { grid-column: 1 / -1; }
  .session-guide { align-items: flex-start; }
  .waveform-stage { height: 275px; }
  .wave-status { left: 12px; right: 12px; }
  .live-emotion-card { min-height: 270px; }
  .emotion-bars, .axis-grid, .settings-grid, .final-axis-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-heading { align-items: flex-start; }
  .timeline-heading p { text-align: left; }
  .timeline-wrap { height: 235px; }
  .final-emotion-block { min-height: 165px; padding: 21px; }
  .final-emotion-block > strong { font-size: 38px; }
  .stage-title { align-items: flex-start; }
  .stage-title h2 { font-size: 14px; }
  .conversation-intro { margin-bottom: 22px; }
  .chat-avatar { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
  .ese-avatar { grid-template-columns: 1fr; }
  .ese-avatar span { display: none; }
  .chat-row { gap: 8px; }
  .chat-message { width: calc(100% - 42px); padding: 12px 13px; }
  .chat-message textarea { min-height: 92px; font-size: 11px; }
  .conversation-emotion-context { border-radius: 13px; }
  .conversation-actions > span { flex-basis: 100%; text-align: left; }
  .voice-response-divider::before { display: none; }
  .voice-response-divider .speech-output-badge { margin-left: 0; }
  .response-controls { grid-template-columns: 1fr; }
  .voice-select-label { grid-column: auto; grid-template-columns: 1fr; }
  .response-footer { align-items: flex-start; flex-direction: column; }
  footer { display: grid; }
}

@media (max-width: 460px) {
  .version-pill { min-height: 29px; padding: 5px 8px; font-size: 8px; }
  .brand strong { font-size: 13px; }
  .status-strip { grid-template-columns: 1fr; }
  .status-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .status-strip > div:last-child { border-bottom: 0; }
  .section-heading h2 { font-size: 14px; }
  .session-actions { grid-template-columns: 1fr; }
  .button.analyze, .new-session { grid-column: auto; }
  .wave-status { align-items: flex-start; flex-direction: column; gap: 4px; }
  .mini-metrics { grid-template-columns: 1fr; }
  .mini-metrics div { border-right: 0; border-bottom: 1px solid var(--line); }
  .mini-metrics div:last-child { border-bottom: 0; }
  .emotion-bars, .axis-grid, .final-stat-grid, .final-axis-list { grid-template-columns: 1fr; }
  .final-stat-grid > div { min-height: 72px; }
  .conversation-ai-badge { width: 100%; justify-content: center; }
  .chat-message { width: calc(100% - 40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
