:root {
  --bg: #0c1016;
  --panel: #171e28;
  --panel-strong: #243140;
  --text: #f7fbff;
  --muted: #b4c1cf;
  --accent: #53d9ff;
  --accent-deep: #087c9e;
  --warning: #ffc65c;
  --danger: #ff7382;
  --success: #6ee6aa;
  --focus: 0 0 0 3px #ffffff, 0 0 18px rgba(83, 217, 255, .92);
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 600px; height: 600px; margin: 0; overflow: hidden; background: #000; color: var(--text); font-size: 16px; }
body { position: relative; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

#app { position: relative; width: 600px; height: 600px; overflow: hidden; background: radial-gradient(circle at 85% 3%, rgba(83, 217, 255, .13), transparent 36%), var(--bg); }
.screen { position: absolute; inset: 0; display: none; width: 600px; height: 600px; padding: 20px 24px 18px; overflow: hidden; }
.screen.active { display: flex; flex-direction: column; }
.screen[hidden] { display: none; }
h1, h2, p { margin: 0; } h1 { font-size: 28px; line-height: 1.1; letter-spacing: -.025em; } h2 { font-size: 20px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .15em; margin-bottom: 4px; }.muted { color: var(--muted); }.danger-text { color: var(--danger); }
.hero-header, .app-header, .screen-header { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }.hero-header { min-height: 122px; padding-top: 10px; }.screen-header { min-height: 86px; }.screen-header.compact { min-height: 62px; }.app-header { min-height: 64px; justify-content: space-between; }
.mark { display: grid; width: 92px; height: 92px; place-items: center; flex: 0 0 auto; border: 4px solid var(--accent); border-radius: 28% 72% 68% 32% / 34% 38% 62% 66%; font-size: 50px; font-weight: 900; text-shadow: 0 0 18px var(--accent); transform: rotate(-7deg); }.mark.small { width: 68px; height: 68px; border-width: 3px; font-size: 36px; }
.centered { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }.centered.confirm { justify-content: center; }.lead { max-width: 510px; margin: 22px 0; color: #dce6ee; font-size: 19px; line-height: 1.36; text-align: center; }.hero-header + .lead { text-align: left; }
.spinner { width: 42px; height: 42px; border: 4px solid rgba(255,255,255,.16); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; }.spinner.small { width: 24px; height: 24px; border-width: 3px; }.loading-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; color: var(--muted); } @keyframes spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.8s; } }
.pairing-code { display: block; padding: 24px 14px; border: 2px solid var(--accent); border-radius: 18px; background: rgba(83,217,255,.08); color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 36px; font-weight: 900; letter-spacing: .12em; line-height: 1; text-align: center; }.countdown { margin: 14px 0; text-align: center; }.status-line { min-height: 1.3em; margin: 10px 0; color: var(--muted); }.status-line.error { color: var(--danger); }.status-line.success { color: var(--success); }
.connection-strip { margin: 5px 0 10px; padding: 9px 12px; border-left: 4px solid var(--accent); border-radius: 6px; background: rgba(83,217,255,.1); color: #e5f9ff; font-weight: 700; }.connection-strip.warning { border-color: var(--warning); background: rgba(255,198,92,.12); }.connection-strip.error { border-color: var(--danger); background: rgba(255,115,130,.12); }
.session-list, .compact-history { display: grid; gap: 10px; min-height: 0; flex: 1 1 auto; padding: 2px 3px; overflow-y: auto; }.session-card { width: 100%; min-height: 84px; padding: 13px; border: 2px solid transparent; border-radius: 14px; background: var(--panel); color: inherit; cursor: pointer; text-align: left; }.session-card.working { border-color: rgba(83,217,255,.5); }.session-card h2 { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }.session-meta, .session-message { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }.session-message { color: #dbe8f1; }.empty { margin: auto 0; color: var(--muted); text-align: center; }
.button, .icon-button, .select, .text-area { border: 2px solid transparent; border-radius: 13px; background: var(--panel); color: var(--text); }.button { min-height: 55px; padding: 10px 14px; cursor: pointer; font-weight: 800; }.button.primary { background: var(--accent); color: #031217; }.button.warning { background: var(--warning); color: #241700; }.button.danger { background: var(--danger); color: #2b050a; }.button.secondary { background: var(--panel-strong); }.icon-button { display: grid; width: 48px; height: 48px; place-items: center; cursor: pointer; font-size: 24px; }.button:focus-visible, .icon-button:focus-visible, .select:focus-visible, .text-area:focus-visible, .session-card:focus-visible { border-color: var(--accent); box-shadow: var(--focus); outline: 0; }
.action-row { display: flex; gap: 10px; }.action-row > * { flex: 1; }.bottom-actions { flex: 0 0 auto; margin-top: auto; padding-top: 12px; }.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.action-grid .button { min-height: 48px; padding: 8px; font-size: 14px; }
.form-stack { display: flex; min-height: 0; flex: 1; flex-direction: column; }.form-stack label { margin: 10px 0 6px; font-weight: 700; }.select { width: 100%; min-height: 48px; padding: 8px; }.text-area { width: 100%; min-height: 98px; padding: 11px; resize: none; line-height: 1.35; }.composer { min-height: 190px; flex: 1; }.activity { margin: 6px 0 10px; color: var(--muted); }.pill { padding: 6px 9px; border-radius: 999px; background: var(--panel-strong); font-size: 12px; font-weight: 800; text-transform: uppercase; }.pill.working { background: rgba(83,217,255,.25); }.pill.interrupted { background: rgba(255,198,92,.25); }.pill.archived { background: rgba(180,193,207,.22); }.message-card { min-height: 78px; padding: 13px; border-left: 4px solid var(--accent); border-radius: 9px; background: var(--panel); color: #e8f4fb; line-height: 1.36; white-space: pre-wrap; }.history-item { padding: 9px 10px; border-radius: 8px; background: rgba(36,49,64,.6); color: var(--muted); font-size: 14px; line-height: 1.3; white-space: pre-wrap; }.history-item.agent { color: #eefaff; }.detail-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; flex: 0 0 auto; padding-top: 10px; }.detail-actions .button { min-height: 47px; padding: 8px; font-size: 14px; }
.capture-panel { display: flex; min-height: 240px; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }.record-indicator { width: 74px; height: 74px; border: 5px solid var(--muted); border-radius: 50%; }.record-indicator.recording { border-color: var(--danger); box-shadow: 0 0 0 12px rgba(255,115,130,.14); animation: pulse 1.1s ease-in-out infinite; }.capture-copy { max-width: 380px; color: #d9e4ed; font-size: 18px; line-height: 1.35; } @keyframes pulse { 50% { transform: scale(1.07); } }
.ink-canvas { width: 544px; height: 330px; border: 2px dashed rgba(83,217,255,.68); border-radius: 14px; background: #071018; touch-action: none; }.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px), (max-height: 600px) { html, body, #app, .screen { width: 100vw; height: 100vh; }.screen { padding: 18px; }.ink-canvas { width: 100%; height: min(55vh, 330px); }.pairing-code { font-size: min(7vw, 36px); }.action-grid { grid-template-columns: 1fr; }.action-grid .button { min-height: 42px; }.detail-actions { grid-template-columns: 1fr 1fr; } }
