:root {
  --bg: #070708;
  --card: #121214;
  --line: #232326;
  --text: #f3f3f5;
  --muted: #8d8d95;
  --accent: #d6ff3f;
  --danger: #ff6b6b;
  --safe: env(safe-area-inset-bottom, 16px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif; }
body { min-height: 100dvh; padding: calc(18px + env(safe-area-inset-top)) 16px calc(88px + var(--safe)); }
h1 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }
h2 { margin: 0 0 10px; font-size: 18px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.2em; }
.hidden { display: none !important; }
.top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.voice-wrap { text-align: right; }
.orb {
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--accent); color: #111; font-size: 20px;
}
.orb.rec { background: var(--danger); color: #fff; animation: pulse 1s infinite; }
.orb.busy { opacity: 0.6; }
.voice-status { margin: 6px 0 0; font-size: 11px; color: var(--muted); max-width: 140px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}
.rings { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-bottom: 12px; }
.ring-card, .mini, .card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px;
}
.ring-card { display: flex; gap: 12px; align-items: center; grid-row: span 2; }
.ring { width: 74px; height: 74px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: #262628; stroke-width: 8; }
.ring .progress { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 314; }
.ring-card strong, .mini strong { display: block; font-size: 26px; letter-spacing: -0.04em; }
.ring-card span, .mini p { color: var(--muted); margin: 0; font-size: 13px; }
.card { margin-bottom: 12px; }
.card-h { display: flex; justify-content: space-between; align-items: center; }
.pill { background: #1c1c1f; color: var(--accent); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.plan { margin: 0; padding-left: 18px; }
.plan li { margin: 8px 0; line-height: 1.35; }
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 10px 0; border-bottom: 1px solid var(--line); }
input {
  width: 100%; margin: 0 0 10px; padding: 14px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: #0c0c0e; color: var(--text); font-size: 16px;
}
.primary {
  width: 100%; border: 0; border-radius: 16px; padding: 14px;
  background: var(--accent); color: #111; font-weight: 700; font-size: 16px;
}
.check, .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0; }
.row input { width: 90px; margin: 0; }
.chat-panel:not(.hidden) {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: 0;
}
.chat {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch;
}
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.35;
  white-space: pre-wrap;
  font-size: 16px;
}
.bubble.user { align-self: flex-end; background: #2a2a30; border-bottom-right-radius: 6px; }
.bubble.assistant { align-self: flex-start; background: #171a12; border: 1px solid #2a3318; border-bottom-left-radius: 6px; }
.composer { display: flex; gap: 8px; margin: 0; flex-shrink: 0; }
.composer input { margin: 0; }
.composer button { width: 48px; border: 0; border-radius: 14px; background: var(--accent); }
nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe));
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  background: #101012ee; border: 1px solid var(--line); border-radius: 22px; padding: 8px;
  backdrop-filter: blur(16px);
}
nav button { border: 0; background: transparent; color: var(--muted); padding: 10px 0; font-size: 12px; }
nav button.on { color: #111; background: var(--accent); border-radius: 14px; font-weight: 700; }
.lock {
  position: fixed; inset: 0; background: var(--bg); z-index: 20;
  display: grid; place-items: center; padding: 24px;
}
.lock-card { width: min(420px, 100%); }
.code { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; color: #d6ff3f; }
.how { margin: 0 0 12px; padding-left: 18px; color: var(--muted); }
.how li { margin: 8px 0; }
.memory { display: flex; flex-direction: column; gap: 12px; }
.shelf h3 { margin: 0 0 6px; font-size: 13px; color: var(--accent); text-transform: lowercase; }
.shelf p { margin: 4px 0; font-size: 14px; line-height: 1.35; }
details { margin-top: 8px; }
details summary { color: var(--muted); cursor: pointer; }
.hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.shot-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0 8px; }
.shot {
  border: 1px solid var(--line); background: #0c0c0e; color: var(--text);
  border-radius: 14px; padding: 12px 8px; font-size: 15px; font-weight: 600;
}
.shot.wide { width: 100%; margin-top: 8px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumbs figure { margin: 0; }
.thumbs a { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #0c0c0e; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs figcaption { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
