:root {
  --bg: #0e1116;
  --panel: #161b22;
  --line: #262d36;
  --text: #e9edf2;
  --muted: #8b96a5;
  --accent: #19c3ff;        /* light-ring cyan */
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --screen: #0b1420;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
button { font: inherit; color: inherit; cursor: pointer; }

.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 28px; border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 12px; align-items: center; }
.logo { width: 38px; height: 38px; color: var(--text); display: grid; place-items: center; }
.logo svg { width: 38px; height: 38px; }
.brand h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.status { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 12px; color: var(--muted); }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill.bad { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.mono { font-family: var(--mono); }

.stage {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr); gap: 36px;
  padding: 32px 28px 110px; max-width: 1280px; margin: 0 auto; align-items: start;
}
@media (max-width: 900px) { .stage { grid-template-columns: 1fr; padding: 20px 16px 140px; } }

/* ---------- device ---------- */
.device { position: relative; background: #1b1f25; border-radius: 28px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); }
.device-label { position: absolute; top: -26px; left: 6px; color: var(--muted); font-size: 12px; }
.screen {
  background: radial-gradient(120% 90% at 10% 0%, #13263a 0%, var(--screen) 60%);
  border-radius: 16px; min-height: 470px; padding: 28px 32px; display: flex; flex-direction: column; gap: 22px;
}
.screen-top { display: flex; justify-content: space-between; align-items: flex-start; }
.clock { font-size: 64px; font-weight: 300; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.date { color: var(--muted); margin-top: 6px; font-size: 15px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { background: none; border: 0; padding: 6px 12px; font-size: 12px; color: var(--muted); }
.lang button.on { background: rgba(255,255,255,.08); color: var(--text); }

.now-card { border-radius: 14px; padding: 18px 20px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.now-card.due { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.now-card.late { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.now-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.now-title { font-size: 28px; font-weight: 600; margin-top: 6px; }
.now-sub { color: var(--muted); margin-top: 4px; font-size: 16px; }

.caption { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 96px; }
.caption-user { color: var(--muted); font-size: 16px; min-height: 1.2em; }
.caption-user:not(:empty)::before { content: "“"; }
.caption-user:not(:empty)::after { content: "”"; }
.caption-reply { font-size: 22px; line-height: 1.35; }

.mic-row { display: flex; gap: 14px; align-items: center; }
.mic {
  width: 64px; height: 64px; border-radius: 50%; border: 0; flex: none;
  background: var(--accent); color: #00202c; display: grid; place-items: center;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: transform .15s ease;
}
.mic svg { width: 28px; height: 28px; }
.mic:active { transform: scale(.96); }
.mic.listening { animation: pulse 1.1s ease-in-out infinite; }
.type-form { flex: 1; }
.type-form input {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: var(--text);
  border-radius: 12px; padding: 14px 16px; font-size: 16px; outline: none;
}
.type-form input:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }

/* Alexa-style light bar at the bottom of the device */
.ring { height: 6px; margin: 14px auto 0; width: 40%; border-radius: 6px; background: rgba(255,255,255,.06); transition: all .3s ease; }
.ring.listening { background: linear-gradient(90deg, #0a6cff, var(--accent), #0a6cff); background-size: 200% 100%; animation: flow 1.2s linear infinite; width: 70%; }
.ring.thinking { background: linear-gradient(90deg, #0a6cff, var(--accent), #0a6cff); background-size: 200% 100%; animation: flow .6s linear infinite; width: 55%; opacity: .8; }
.ring.speaking { background: var(--accent); width: 90%; box-shadow: 0 0 24px var(--accent); }
.ring.reminder { background: var(--warn); width: 90%; box-shadow: 0 0 24px var(--warn); animation: blink 1.4s ease-in-out infinite; }

@keyframes pulse { 0%,100% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); } 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--accent) 6%, transparent); } }
@keyframes flow { to { background-position: -200% 0; } }
@keyframes blink { 50% { opacity: .45; } }

/* ---------- phone ---------- */
.phone { position: relative; background: #05070a; border-radius: 40px; padding: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); max-width: 380px; width: 100%; justify-self: center; }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; border-radius: 14px; background: #000; z-index: 2; }
.phone-screen { background: #f5f6f8; color: #11161d; border-radius: 30px; padding: 54px 18px 22px; min-height: 620px; position: relative; overflow: hidden; }
.phone-head { margin-bottom: 14px; }
.phone-title { font-weight: 700; font-size: 18px; }
.phone-sub { color: #6b7380; font-size: 13px; margin-top: 2px; }
.phone h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #6b7380; margin: 18px 0 8px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.stat-num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 12px; color: #6b7380; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.timeline li { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 9px 12px; font-size: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.timeline .t { color: #6b7380; font-variant-numeric: tabular-nums; font-size: 13px; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #eef0f3; color: #4b5563; }
.badge.taken { background: #d1fae5; color: #065f46; }
.badge.missed { background: #fee2e2; color: #991b1b; }
.badge.reminded { background: #dff5ff; color: #075985; }
.badge.skipped { background: #fef3c7; color: #92400e; }

.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts li { background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.4; border-left: 4px solid #cbd5e1; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.alerts li.warning { border-left-color: var(--warn); }
.alerts li.urgent { border-left-color: var(--bad); }
.alerts li.done { opacity: .5; }
.alerts .when { color: #6b7380; font-size: 11px; margin-top: 4px; }
.alerts .empty { color: #6b7380; background: none; box-shadow: none; border: 0; padding: 0; }

.toast {
  position: absolute; top: 46px; left: 10px; right: 10px; z-index: 3;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13px; line-height: 1.4;
  animation: drop .35s ease-out;
}
.toast b { display: block; margin-bottom: 2px; }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } }

/* ---------- demo bar ---------- */
.demo-bar {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 12px 28px; background: rgba(14,17,22,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.demo-title { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-right: 6px; }
.demo-bar button { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 13px; }
.demo-bar button:hover { border-color: var(--accent); }
.demo-bar button.ghost { background: none; color: var(--muted); }
@media (max-width: 600px) { .demo-bar { padding: 10px 16px; } .clock { font-size: 48px; } .screen { padding: 20px; } }
