/* style.css — voice frontend. Mobile-first (Android Chrome). */

:root {
  --bg: #0b0b12;
  --fg: #e8e8f0;
  --muted: #8a8aa0;
  --accent: #6c8cff;
  --accent-active: #ff5c7c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Noto Sans KR", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.voice-shell,
.login-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 640px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.status {
  font-size: 13px;
  color: var(--muted);
}
.status[data-state="listening"] { color: var(--accent-active); }
.status[data-state="thinking"] { color: var(--accent); }

.transcript {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.turn {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.45;
  word-break: break-word;
}
.turn.user { align-self: flex-end; background: #1d2233; }
.turn.assistant { align-self: flex-start; background: #15151f; }
.turn.interim { opacity: 0.55; font-style: italic; }

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0 24px;
}

.mic-btn {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 34px;
  display: grid;
  place-items: center;
  transition: transform 0.1s ease, background 0.2s ease;
}
.mic-btn:active { transform: scale(0.94); }
.mic-btn[data-listening="true"] { background: var(--accent-active); }

.mic-btn:disabled { opacity: 0.4; }

.hint { color: var(--muted); font-size: 13px; margin: 0; }

/* Toast — transient mic/network error notices. */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(120px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  max-width: 88vw;
  padding: 11px 16px;
  border-radius: 12px;
  background: #1a1a26;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  border: 1px solid #2a2a3a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Login */
.login-shell { justify-content: center; gap: 24px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.login-form input {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #2a2a3a;
  background: #12121b;
  color: var(--fg);
  font-size: 16px;
}
.login-form button {
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.error { color: var(--accent-active); font-size: 13px; }
