:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050b14;
  color: #f4f8ff;
  --panel: rgba(14, 27, 46, .78);
  --border: rgba(148, 180, 222, .15);
  --cyan: #54d5ff;
  --blue: #3977ff;
  --muted: #a9bad0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% -15%, rgba(45, 119, 255, .30), transparent 42%),
    linear-gradient(180deg, #08111f 0%, #050a12 100%);
}
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100%, 680px); margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); }
.card, .transcript-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  backdrop-filter: blur(20px);
}
.auth-card { margin-top: 10vh; padding: 30px; }
.brand-mark {
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 18px; background: linear-gradient(145deg, var(--cyan), var(--blue));
  color: #04101d; font-weight: 900; font-size: 27px; box-shadow: 0 12px 34px rgba(56,119,255,.28);
}
.eyebrow { margin: 22px 0 6px; color: var(--cyan); letter-spacing: .16em; font-size: 11px; font-weight: 800; }
h1 { margin: 0; font-size: clamp(26px, 8vw, 38px); letter-spacing: -.035em; }
h2 { margin: 0; font-size: 16px; }
.muted { color: var(--muted); line-height: 1.5; }
.small { font-size: 13px; }
label { display: block; margin: 24px 0 8px; color: #c7d5e7; font-size: 13px; font-weight: 700; }
input { width: 100%; padding: 15px 16px; border-radius: 14px; border: 1px solid #2a3d57; color: white; background: #081321; outline: none; }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(84,213,255,.12); }
button { border: 0; color: white; font-weight: 750; }
.primary, .call-button { width: 100%; margin-top: 14px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #438dff, #2461ee); box-shadow: 0 12px 30px rgba(36,97,238,.27); }
.error { min-height: 20px; color: #ff8f9a; font-size: 13px; }
.voice-app header { display: flex; justify-content: space-between; align-items: center; }
.voice-app header .eyebrow { margin-top: 0; }
.icon-button { min-width: 70px; height: 43px; padding: 0 14px; border-radius: 14px; background: #111d2d; border: 1px solid var(--border); color: var(--muted); }
.orb-zone { display: grid; justify-items: center; padding: 46px 0 30px; text-align: center; }
.orb {
  width: 174px; height: 174px; display: grid; place-items: center; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 28%, #74e6ff, #2778f7 45%, #19325f 75%);
  box-shadow: 0 0 0 18px rgba(57,119,255,.06), 0 0 80px rgba(65,153,255,.28), inset 0 0 38px rgba(255,255,255,.2);
  transition: transform .25s ease, filter .25s ease;
}
.orb::after { content: ""; position: absolute; inset: -13px; border: 1px solid rgba(84,213,255,.25); border-radius: inherit; }
.orb span { font-size: 54px; font-weight: 900; text-shadow: 0 4px 18px rgba(0,0,0,.25); }
.orb.connecting { animation: pulse 1.2s infinite; filter: hue-rotate(25deg); }
.orb.live { animation: breathe 2.2s infinite ease-in-out; }
.orb.thinking { animation: pulse .8s infinite; filter: saturate(.65); }
@keyframes pulse { 50% { transform: scale(.94); opacity: .75; } }
@keyframes breathe { 50% { transform: scale(1.045); box-shadow: 0 0 0 23px rgba(57,119,255,.07), 0 0 100px rgba(84,213,255,.4); } }
.status { margin: 27px 0 0; font-size: 19px; font-weight: 800; }
.controls { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.controls .call-button { grid-column: 1 / -1; margin: 0; }
.secondary, .danger { padding: 14px; border-radius: 14px; background: #132138; border: 1px solid var(--border); }
.danger { background: rgba(184,45,64,.18); color: #ff9ca8; border-color: rgba(255,100,120,.2); }
.continuity-card { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(17,29,45,.72); border: 1px solid var(--border); color: #c7d5e7; font-size: 13px; line-height: 1.45; }
.continuity-card p { margin: 0; }
.continuity-card p + p { margin-top: 6px; }
.wake-lock-status { font-weight: 800; color: var(--muted); }
.wake-lock-status[data-state="active"] { color: #75e6b5; }
.wake-lock-status[data-state="warning"] { color: #ffd27a; }
.continuity-note { color: var(--muted); }
.transcript-card { margin-top: 20px; padding: 18px; min-height: 190px; }
.transcript-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.text-button { padding: 5px; color: var(--muted); background: transparent; font-size: 12px; }
.transcript { max-height: 310px; overflow: auto; display: grid; gap: 10px; }
.empty { color: #677b95; font-size: 13px; text-align: center; padding: 34px 0; }
.message { max-width: 86%; padding: 11px 13px; border-radius: 16px; line-height: 1.42; font-size: 14px; white-space: pre-wrap; }
.message.user { justify-self: end; background: #2764e6; border-bottom-right-radius: 5px; }
.message.assistant { justify-self: start; background: #132238; color: #deebfb; border-bottom-left-radius: 5px; }
.privacy { margin: 16px 8px 0; color: #647992; text-align: center; font-size: 11px; line-height: 1.5; }
[hidden] { display: none !important; }
@media (max-width: 420px) { .orb { width: 150px; height: 150px; } .orb-zone { padding-top: 37px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
