:root {
  color-scheme: dark light;
  --bg: #0d0f12;
  --surface: #15181d;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eceef0;
  --muted: #8d959e;
  --accent: #d97757;
  --accent-soft: rgba(217, 119, 87, 0.16);
  --good: #5fe0b7;
  --warn: #f2b85b;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5f2;
    --surface: #ffffff;
    --line: rgba(20, 24, 28, 0.09);
    --text: #14181c;
    --muted: #5f6770;
    --accent: #c4622d;
    --accent-soft: rgba(196, 98, 45, 0.12);
    --good: #0f9d76;
    --warn: #b7791f;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 9px 14px;
}
[hidden] {
  display: none !important;
}
#login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
#login-form {
  width: min(340px, 100%);
  display: grid;
  gap: 12px;
  text-align: center;
}
#login-form h1 {
  margin: 0;
  font-size: 26px;
}
#login-form p {
  margin: 0;
  color: var(--muted);
}
#login-form input {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
#login-form button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 13px;
}
.mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3b39a, var(--accent));
}
.error {
  color: #ff7a7a !important;
  min-height: 1.4em;
}
#app {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  max-width: 760px;
  margin: 0 auto;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 18px 10px;
}
.title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.title b {
  font-size: 19px;
}
#where {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  align-self: center;
}
#dot[data-on="1"] {
  background: var(--good);
}
#dot[data-on="busy"] {
  background: var(--warn);
  animation: pulse 1.2s ease-in-out infinite;
}
.icon {
  border: 0;
  background: none;
  font-size: 22px;
  padding: 2px 8px;
}
#settings {
  margin: 0 16px 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: grid;
  gap: 10px;
}
#settings label {
  display: grid;
  gap: 5px;
  font-size: 14px;
  color: var(--muted);
}
#settings input,
#settings select {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.row-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.muted {
  color: var(--muted);
}
#log {
  overflow-y: auto;
  padding: 6px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.line p {
  margin: 0;
}
.line.you p {
  color: var(--muted);
}
.line.you p::before {
  content: "Du: ";
}
.line.claude p {
  font-size: 17px;
}
.line.note p {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
}
.line details {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}
.line pre {
  white-space: pre-wrap;
  font: 12.5px/1.45 ui-monospace, Menlo, monospace;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin: 6px 0 0;
  max-height: 320px;
  overflow: auto;
}
#approvals {
  display: grid;
  gap: 8px;
  padding: 0 16px;
}
.approval {
  border: 1px solid var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.approval code {
  font: 13px/1.4 ui-monospace, Menlo, monospace;
  word-break: break-word;
}
.approval .yes {
  background: var(--good);
  color: #062a20;
  border: 0;
}
footer {
  padding: 8px 18px max(16px, env(safe-area-inset-bottom));
  display: grid;
  gap: 6px;
  justify-items: center;
}
#activity,
#partial,
#hint {
  margin: 0;
  min-height: 1.3em;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}
#partial {
  color: var(--text);
}
.controls {
  display: flex;
  align-items: center;
  gap: 18px;
}
.pill {
  border-radius: 999px;
  min-width: 74px;
}
#orb {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--surface);
}
#orb span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s, background 0.2s;
}
#orb[data-state="listening"] span {
  background: var(--accent);
}
#orb[data-state="hearing"] span {
  background: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 0 0 10px var(--accent-soft);
}
#type-form {
  display: flex;
  gap: 8px;
  width: 100%;
}
#type-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
