.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 860px;
  margin: 0 auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* ── Topbar ── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-r { background: #3a1a1a; }

.dot-y { background: #2e2a14; }

.dot-g {
  background: var(--green-dim);
  box-shadow: 0 0 6px var(--green-dim);
}

.title {
  margin: 0 4px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  flex: 1;
}

.model-badge {
  font-size: 11px;
  color: var(--green-dim);
  border: 1px solid var(--green-dark);
  padding: 5px 10px;
  border-radius: 3px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  line-height: 1;
}

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.12s, color 0.12s;
  position: relative;
  line-height: 1;
}

.icon-btn:hover,
.icon-btn.active {
  border-color: var(--green-dim);
  color: var(--green-dim);
}

/* ── Input bar ── */
.inputbar {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 56px;
  cursor: text;
}

.prompt-sym {
  color: var(--green);
  font-size: 15px;
  flex-shrink: 0;
}

.input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  color: var(--green);
  caret-color: var(--green);
  padding: 10px 0;
  cursor: text;
  align-self: stretch;
}

.input-field::placeholder { color: var(--text-muted); }

.send-btn {
  background: var(--green-dark);
  border: 1px solid var(--green-dim);
  color: var(--green);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: background 0.15s;
}

.send-btn:hover { background: #005018; }

.stop-btn {
  background: #3a0a0a;
  border: 1px solid #ff4444;
  color: #ff4444;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: background 0.15s;
  display: none;
}

.stop-btn:hover { background: #550000; }

/* ── Status bar ── */
.status-bar {
  background: var(--green-dark);
  border-top: 1px solid var(--green-dim);
  padding: 6px 14px;
  font-size: 11px;
  color: var(--green-dim);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#status-right { margin-left: auto; }

#ctx-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

#ctx-bar-wrap {
  flex: 0 0 72px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 6px;
  overflow: hidden;
}

@media (max-width: 600px) {
  #ctx-bar-wrap { flex-basis: 48px; }
}

#ctx-bar {
  height: 100%;
  width: 0%;
  background: var(--green-dim);
  border-radius: 6px;
  transition: width 0.4s ease, background 0.4s ease;
}

#zip-btn {
  background: none;
  border: 1px solid currentColor;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 3px;
  opacity: 0.5;
  transition: color 0.25s, opacity 0.25s;
}

#zip-btn.hidden { display: none; }

#zip-btn:hover:not(:disabled) { opacity: 1; }

#zip-btn.ctx-hot {
  color: #cc4444;
  opacity: 1;
}

#zip-btn:disabled {
  cursor: default;
  opacity: 0.3;
}

#zip-btn.zipping {
  animation: fadeloop 1s ease-in-out infinite;
  opacity: 1;
}
