:root {
  --bg: #fff8f0;
  --surface: #ffffff;
  --text: #1d1a2b;
  --muted: #6c6880;
  --line: #ece4da;
  --accent: #ff5a36;
  --accent-ink: #ffffff;
  --accent-soft: #ffe6dd;
  --ok: #1f9d6b;
  --warn: #c98a00;
  --radius: 18px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15131d;
    --surface: #1f1c2a;
    --text: #f3f0fa;
    --muted: #9c97b0;
    --line: #2f2b3d;
    --accent-soft: #3a2420;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 16px; }
.logo { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; }
.logo span { width: 14px; height: 14px; background: var(--accent); border-radius: 50% 50% 50% 4px; display: inline-block; }
.btn { border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 650; background: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .75rem; padding: 1px 7px; margin-left: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
textarea, input[type=text], input[type=password] {
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); resize: vertical;
}
textarea:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

/* mic */
.recorder { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.mic {
  width: 132px; height: 132px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: 0 10px 30px -8px var(--accent); transition: transform .15s;
}
.mic:active { transform: scale(.96); }
.mic svg { width: 54px; height: 54px; }
.mic.live { animation: pulse 1.4s infinite; }
.mic.small { width: 56px; height: 56px; box-shadow: none; flex: none; }
.mic.small svg { width: 24px; height: 24px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 28px transparent; }
}
.hint { text-align: center; font-size: 1.35rem; font-weight: 700; margin: 8px 0 0; letter-spacing: -0.01em; }

/* threads & status */
.chip { display: inline-block; font-size: .78rem; font-weight: 650; border-radius: 999px; padding: 3px 10px; background: var(--line); }
.chip.new { background: #e3ecff; color: #2b4fb5; }
.chip.needs_input { background: var(--accent-soft); color: var(--accent); }
.chip.ready { background: #dcf5ea; color: var(--ok); }
.chip.building { background: #fff1cc; color: var(--warn); }
.chip.shipped { background: #1f9d6b; color: #fff; }
.chip.rejected { background: var(--line); color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .chip.new { background: #22305a; color: #a9c1ff; }
  .chip.ready { background: #173a2c; color: #6fe0b1; }
  .chip.building { background: #3d3214; color: #f2c94c; }
}
.msg { padding: 10px 14px; border-radius: 14px; margin: 8px 0; white-space: pre-wrap; }
.msg.user { background: var(--bg); }
.msg.admin { background: var(--accent-soft); }
.msg .who { font-size: .75rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 12px 20px; border-radius: 999px; font-weight: 600; z-index: 10; max-width: calc(100% - 32px);
}
