:root {
  --bg: #0a0a0b;
  --surface: #15151a;
  --surface-2: #1d1d24;
  --border: #2a2a33;
  --text: #f0f0f5;
  --text-dim: #8a8a96;
  --accent: #00ff88;
  --danger: #ff3366;
  --warn: #ffaa00;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  height: 100%;
  overflow-x: hidden;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  font-weight: 800;
  letter-spacing: 0.15em;
  font-size: 14px;
  color: var(--text-dim);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.meters {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meter-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  min-width: 58px;
  text-align: right;
}

.meter {
  position: relative;
  width: 180px;
  height: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.meter-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  transition: width 80ms linear;
  transform-origin: left;
}

.meter-closer .meter-fill {
  background: linear-gradient(to right, #4aa3ff 0%, #4aa3ff 70%, var(--warn) 85%, var(--danger) 100%);
}

.meter-prospect .meter-fill {
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 70%, var(--warn) 85%, var(--danger) 100%);
}

.meter-peak {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 2px;
  background: var(--text);
  opacity: 0.9;
  transition: left 80ms linear;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
}

.status.running .dot {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}

.status.idle .dot { background: var(--text-dim); }
.status.error .dot { background: var(--danger); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 24px;
}

.controls {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn {
  border: none;
  padding: 18px 48px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.15em;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  font-family: inherit;
}

.btn:disabled { opacity: 0.3; cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: translateY(1px); }

.btn-start { background: var(--accent); color: #001a0d; }
.btn-stop { background: var(--danger); color: #fff; }

.suggestion {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.suggestion.empty .placeholder {
  text-align: center;
  color: var(--text-dim);
  font-size: 16px;
  font-style: italic;
}

.suggestion.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, #0d2418 100%);
  animation: flash 0.4s ease-out;
}

@keyframes flash {
  0% { transform: scale(0.98); box-shadow: 0 0 0 var(--accent); }
  50% { box-shadow: 0 0 30px rgba(0, 255, 136, 0.4); }
  100% { transform: scale(1); }
}

.suggestion .obj-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
}

.suggestion .obj-response {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 20px;
}

.suggestion .obj-reframe {
  font-size: 18px;
  font-weight: 500;
  color: var(--warn);
  font-style: italic;
  border-left: 3px solid var(--warn);
  padding-left: 16px;
}

.suggestion .obj-transcript {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
}

.transcripts h2, .log h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-weight: 700;
}

.transcripts ul, .log ul {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.transcripts li, .log li {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.transcripts li:last-child, .log li:last-child { border-bottom: none; }
.transcripts li.fresh .t-text { color: var(--text); }

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
  min-width: 66px;
  text-align: center;
}
.tag-closer { background: #1a2a40; color: #4aa3ff; border: 1px solid #2a4060; }
.tag-prospect { background: #0d2418; color: var(--accent); border: 1px solid #1a4030; }

.t-text { flex: 1; }

.speaker-closer .t-text { opacity: 0.85; }
.speaker-prospect .t-text { font-weight: 500; }

.log li.error { color: var(--danger); }
.log li.info { color: var(--text-dim); }
.log li.interim { color: var(--text-dim); font-style: italic; }
.log li.final { color: var(--text); }
