@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&display=swap');@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&display=swap');@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');


:root {
  --brand-500: #006bb7;
  --brand-600: #005a9c;
  --brand-700: #004a82;
  --brand-400: #2589cf;
  --brand-300: #6cb1e0;
  --brand-200: #b3d6ee;
  --brand-100: #e0eef8;
  --brand-50:  #f1f7fc;

  --ink-950: #0b1620;
  --ink-900: #14222e;
  --ink-800: #1f3140;
  --ink-700: #324859;
  --ink-600: #4b6275;
  --ink-500: #6b8093;
  --ink-400: #94a6b6;
  --ink-300: #b9c6d2;
  --ink-200: #d8e0e7;
  --ink-100: #ecf0f3;
  --ink-50:  #f6f8fa;

  --paper:    #fbfaf6;
  --paper-2:  #f3f1ea;

  --acc-discovery: #c46b1f;
  --acc-life:      #2f8f6b;
  --acc-physical:  #7a4cc8;
  --acc-data:      #c9a227;

  --success:    #2f8f6b;
  --success-bg: #e7f3ee;
  --warning:    #c08a16;
  --warning-bg: #fbf1d6;
  --danger:     #c0392b;
  --danger-bg:  #fbe6e3;
  --info:       var(--brand-500);
  --info-bg:    var(--brand-100);

  --bg:         #ffffff;
  --bg-muted:   var(--ink-50);
  --bg-tinted:  var(--brand-50);
  --bg-paper:   var(--paper);
  --bg-inverse: var(--ink-950);

  --fg:           var(--ink-900);
  --fg-muted:     var(--ink-600);
  --fg-subtle:    var(--ink-500);
  --fg-faint:     var(--ink-400);
  --fg-on-brand:  #ffffff;
  --fg-link:      var(--brand-600);
  --fg-link-hover: var(--brand-700);

  --border:        var(--ink-200);
  --border-strong: var(--ink-300);
  --border-focus:  var(--brand-500);

  --font-sans:  'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-serif: 'Source Serif 4', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  22px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(11, 22, 32, 0.04);
  --shadow-sm: 0 1px 2px rgba(11, 22, 32, 0.05), 0 1px 3px rgba(11, 22, 32, 0.05);
  --shadow-md: 0 4px 8px -2px rgba(11, 22, 32, 0.06), 0 2px 4px -2px rgba(11, 22, 32, 0.05);
  --shadow-lg: 0 12px 24px -8px rgba(11, 22, 32, 0.10), 0 4px 8px -4px rgba(11, 22, 32, 0.05);
  --shadow-focus: 0 0 0 3px rgba(0, 107, 183, 0.25);

  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emph:     cubic-bezier(0.3, 0, 0, 1);
  --ease-out:      cubic-bezier(0.2, 0.6, 0.2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--ink-50);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overflow: hidden;
}
body { display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
#root { height: 100vh; display: flex; flex-direction: column; padding: 0; max-width: none; width: 100%; }
/* ============== HEADER ============== */
.app-header {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 24px;
  background: white; border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
  position: relative; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 42px; display: block; }
.exp-name-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
.exp-name-display {
  font: 600 18px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--ink-900);
  padding: 4px 0;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exp-edit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  color: var(--ink-500);
  flex: 0 0 auto;
  transition: all 100ms var(--ease-standard);
}
.exp-edit-btn:hover:not(:disabled) { background: var(--ink-100); color: var(--ink-800); }
.exp-edit-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.exp-status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--ink-100); color: var(--ink-600);
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.exp-status-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.exp-status-chip.recording { background: #fbe6e3; color: #c0392b; }
.exp-status-chip.recording .dot { background: #c0392b; animation: pulse 1.4s ease-in-out infinite; }
.exp-status-chip.paused { background: var(--warning-bg); color: #8c6510; }
.exp-status-chip.ready { background: var(--success-bg); color: #1f6e51; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.header-spacer { flex: 1; }
.bt-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 12px;
  background: white; border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ink-800);
  transition: all 120ms var(--ease-standard);
  position: relative;
}
.bt-trigger:hover { background: var(--ink-50); border-color: var(--border-strong); }
.bt-trigger.has-devices { border-color: var(--brand-300); color: var(--brand-700); background: var(--brand-50); }
.bt-trigger.has-devices:hover { background: var(--brand-100); }
.bt-trigger .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--brand-500); color: white;
  border-radius: 999px; font-size: 11px; font-weight: 600;
  font-family: var(--font-mono);
}
.bt-trigger .sensor-dots { display: inline-flex; gap: 3px; align-items: center; }
.bt-trigger .sensor-dots span { width: 7px; height: 7px; border-radius: 50%; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-600);
  transition: background 120ms;
}
.icon-btn:hover { background: var(--ink-100); color: var(--ink-900); }
/* ============== POPOVER ============== */
.popover-overlay { position: fixed; inset: 0; z-index: 40; }
.popover {
  position: absolute; top: 60px; right: 24px;
  width: 420px; max-height: calc(100vh - 80px);
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: popoverIn 160ms var(--ease-standard);
}
@keyframes popoverIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.popover-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.popover-head h3 { font-size: 15px; font-weight: 600; color: var(--ink-900); }
.popover-head .sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.popover-head-actions { display: inline-flex; align-items: center; gap: 6px; }
.popover-body { overflow: auto; padding: 4px 0; flex: 1 1 auto; }
.popover-section-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-400);
  padding: 14px 18px 6px;
}
.popover-empty {
  padding: 14px 18px;
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.5;
}
.popover-foot {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--ink-50);
  display: flex; justify-content: center;
}
.show-all-btn {
  font-size: 12px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  color: var(--ink-700);
  background: white;
  border: 1px solid var(--border);
  transition: all 120ms var(--ease-standard);
}
.show-all-btn:hover { background: var(--ink-100); color: var(--ink-900); border-color: var(--border-strong); }
.show-all-btn[aria-pressed='true'] {
  background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-300);
}
.scan-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  color: var(--ink-700);
  background: white;
  border: 1px solid var(--border);
  transition: all 120ms var(--ease-standard);
}
.scan-btn:hover:not(:disabled) {
  background: var(--ink-100); color: var(--ink-900); border-color: var(--border-strong);
}
.scan-btn:disabled { cursor: wait; color: var(--ink-500); }
.scan-btn.scanning { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.scan-btn-spinner {
  width: 12px; height: 12px;
  border: 1.5px solid var(--brand-200);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
/* ============== DEVICE ROW ============== */
.device-row {
  padding: 12px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  transition: background 120ms;
}
.device-row + .device-row { border-top: 1px solid var(--ink-100); }
.device-row:hover { background: var(--ink-50); }
.device-row.connected { background: var(--brand-50); }
.device-row.connected:hover { background: var(--brand-100); }
.device-row.unsupported .device-name,
.device-row.unsupported .device-id { color: var(--ink-500); }
.device-row.unsupported .device-icon { color: var(--ink-400); border-color: var(--ink-200); background: var(--ink-50); }
.device-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: white; border: 1px solid var(--border);
  color: var(--ink-600);
}
.device-row.connected .device-icon {
  background: white; border-color: var(--brand-300); color: var(--brand-600);
}
.device-meta { min-width: 0; }
.device-name {
  font-size: 14px; font-weight: 600; color: var(--ink-900);
  display: flex; align-items: center; gap: 8px;
}
.device-name .swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.device-id {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-500);
  margin-top: 2px;
}
.device-id .sep { margin: 0 6px; color: var(--ink-300); }
.device-strength { display: inline-flex; align-items: center; gap: 4px; }
.device-strength span { width: 3px; background: var(--ink-300); border-radius: 1px; }
.device-strength span:nth-child(1) { height: 4px; }
.device-strength span:nth-child(2) { height: 7px; }
.device-strength span:nth-child(3) { height: 10px; }
.device-strength span:nth-child(4) { height: 13px; }
.device-strength.s4 span { background: var(--brand-500); }
.device-strength.s3 span:nth-child(-n+3) { background: var(--brand-500); }
.device-strength.s2 span:nth-child(-n+2) { background: var(--brand-500); }
.device-strength.s1 span:nth-child(1) { background: var(--brand-500); }
.device-actions { display: flex; align-items: center; gap: 8px; }
.freq-control {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--ink-200);
  display: flex; align-items: center; gap: 8px;
  grid-column: 1 / -1;
}
.freq-label {
  font-size: 11px; color: var(--ink-500);
  font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: auto;
}
.freq-segment {
  display: inline-flex;
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 2px;
  font-family: var(--font-mono);
}
.freq-segment button {
  padding: 4px 10px;
  font-size: 11px; font-weight: 500;
  color: var(--ink-600);
  border-radius: 5px;
  transition: all 100ms;
}
.freq-segment button:hover { color: var(--ink-900); }
.freq-segment button.active { background: var(--brand-500); color: white; }
.freq-unit { font-size: 11px; color: var(--ink-500); font-family: var(--font-mono); }
/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: all 120ms var(--ease-standard);
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.99); }
.btn.primary { background: var(--brand-500); color: white; }
.btn.primary:hover { background: var(--brand-600); }
.btn.primary:disabled { background: var(--ink-200); color: var(--ink-400); cursor: not-allowed; }
.btn.secondary { background: white; color: var(--ink-800); border-color: var(--border); }
.btn.secondary:hover { background: var(--ink-50); border-color: var(--border-strong); }
.btn.ghost { color: var(--ink-700); }
.btn.ghost:hover { background: var(--ink-100); }
.btn.danger { background: #c0392b; color: white; }
.btn.danger:hover { background: #a3322a; }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn.lg { padding: 14px 28px; font-size: 15px; border-radius: 12px; }
/* ============== STAGE ============== */
.stage {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  position: relative;
  background: var(--ink-50);
}
/* ============== EMPTY STATE ============== */
.empty-stage {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px;
  text-align: center;
}
.empty-icon {
  width: 80px; height: 80px; border-radius: 22px;
  background: white; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-500);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.empty-stage h2 {
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 600;
  color: var(--ink-950);
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 580px;
  line-height: 1.1;
}
.empty-stage p {
  font-size: 16px; line-height: 1.6; color: var(--ink-600);
  max-width: 480px; margin-top: 14px;
  text-wrap: pretty;
}
.empty-stage .actions { display: flex; gap: 10px; margin-top: 28px; }
/* ============== SETUP ============== */
.setup-screen {
  flex: 1; display: flex; flex-direction: column;
  overflow: auto;
  padding: 48px 32px 64px;
  align-items: center;
}
.setup-card {
  width: 100%; max-width: 680px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 36px 44px 32px;
  box-shadow: var(--shadow-sm);
}
.setup-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-600);
}
.setup-card h1 {
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 600;
  color: var(--ink-950);
  letter-spacing: -0.02em;
  margin-top: 8px;
}
.setup-card p.lede {
  color: var(--ink-600); font-size: 15px; line-height: 1.6;
  margin-top: 8px;
}
.field { margin-top: 22px; }
.field-label {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--ink-800);
  margin-bottom: 6px;
}
.field-hint { font-size: 12px; color: var(--ink-500); margin-top: 6px; }
.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font: 14px var(--font-sans); color: var(--ink-900);
  background: white;
  border: 1px solid var(--border); border-radius: 10px;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-focus);
}
.setup-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink-100);
}
.setup-actions .left { color: var(--ink-500); font-size: 13px; }
.mode-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px;
}
.mode-card {
  text-align: left; padding: 22px 22px 24px; border-radius: 16px;
  background: white; border: 1px solid var(--border); cursor: pointer;
  transition: all 120ms; display: flex; flex-direction: column; gap: 8px;
}
.mode-card:hover { border-color: var(--brand-300); background: var(--brand-50); }
.mode-card .mc-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--ink-100); display: flex; align-items: center; justify-content: center;
  color: var(--ink-700);
}
.mode-card.brand .mc-icon { background: var(--brand-100); color: var(--brand-600); }
.mode-card .mc-title { font-size: 16px; font-weight: 600; color: var(--ink-900); margin-top: 4px; }
.mode-card .mc-desc { font-size: 13px; color: var(--ink-600); line-height: 1.5; }
.search-input-wrap { position: relative; }
.search-input-wrap .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ink-400); pointer-events: none;
}
.search-input-wrap input { padding-left: 38px; }
.catalog-list {
  margin-top: 8px; max-height: 360px; overflow: auto;
  border-radius: 12px; border: 1px solid var(--border);
}
.catalog-item {
  width: 100%; text-align: left;
  padding: 12px 16px; background: white;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  cursor: pointer;
}
.catalog-item + .catalog-item { border-top: 1px solid var(--ink-100); }
.catalog-item.active { background: var(--brand-50); }
.catalog-name { font-size: 14px; font-weight: 600; color: var(--ink-900); display: flex; align-items: center; gap: 8px; }
.catalog-meta { display: flex; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--ink-500); align-items: center; }
.catalog-meta .dot { width: 6px; height: 6px; border-radius: 50%; }
.catalog-sensors { display: flex; gap: 4px; }
.catalog-sensors span { width: 10px; height: 10px; border-radius: 50%; }
/* ============== READY / RECORDING ============== */
.canvas-wrap {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 20px 24px 0;
  gap: 16px;
}
.readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  flex: 0 0 auto;
}
.readout {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
}
.readout::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--swatch);
}
.readout-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-600);
}
.readout-head .swatch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--swatch); }
.readout-head .name { font-weight: 600; color: var(--ink-800); display: flex; align-items: center; gap: 8px; }
.readout-head .freq { font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); }
.readout-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink-950);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 6px;
}
.readout-value .unit { font-size: 14px; color: var(--ink-500); font-weight: 400; }
.readout-trend {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-500);
}
/* ============== GRAPH ============== */
.graph-card {
  flex: 1; min-height: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.graph-toolbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ink-100);
  flex: 0 0 auto;
}
.graph-toolbar .ttl {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-500);
}
.graph-toolbar .legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-700);
  font-family: var(--font-mono);
}
.legend-item .swatch { width: 14px; height: 3px; border-radius: 1px; }
.legend-item .label { font-family: var(--font-sans); font-weight: 500; color: var(--ink-800); }
.graph-toolbar .right { margin-left: auto; display: flex; gap: 12px; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--ink-500); }
.graph-toolbar .timer { color: var(--ink-900); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.graph-body { flex: 1; min-height: 0; position: relative; }
.graph-body > svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.graph-no-data {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  color: var(--ink-400);
  font-size: 13px;
  pointer-events: none;
  text-align: center;
  padding: 0 24px;
}
.graph-no-data svg { flex: 0 0 auto; }
.graph-no-data .lab-icon { color: var(--ink-300); }
.view-seg {
  display: inline-flex; gap: 2px;
  background: var(--ink-50);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.view-seg button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 24px;
  border-radius: 6px;
  color: var(--ink-500);
  transition: all 100ms var(--ease-standard);
}
.view-seg button:hover { color: var(--ink-800); }
.view-seg button.active { background: white; color: var(--brand-600); box-shadow: var(--shadow-xs); }
.graph-split {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 6px 4px;
}
.split-graph { flex: 1 1 0; min-height: 0; position: relative; }
.split-graph > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* ============== CONTROLS BAR ============== */
.controls-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 16px 24px 20px;
  flex: 0 0 auto;
}
.controls-bar .left,
.controls-bar .right {
  flex: 1; display: flex; align-items: center;
}
.controls-bar .right { justify-content: flex-end; gap: 8px; }
.controls-bar .left { gap: 8px; }
.controls-bar .center { display: flex; gap: 10px; align-items: center; }
.rec-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-size: 15px; font-weight: 600;
  background: #c0392b; color: white;
  box-shadow: 0 1px 2px rgba(192,57,43,0.3), 0 4px 8px -2px rgba(192,57,43,0.25);
  transition: all 120ms;
}
.rec-btn:hover { background: #a3322a; }
.rec-btn:active { transform: scale(0.98); }
.rec-btn.stop { background: var(--ink-900); box-shadow: var(--shadow-md); }
.rec-btn.stop:hover { background: black; }
.rec-btn .rec-dot { width: 12px; height: 12px; border-radius: 50%; background: white; }
.rec-btn.recording .rec-dot { animation: pulse 1.4s ease-in-out infinite; }
.rec-btn.stop .rec-dot { width: 12px; height: 12px; border-radius: 2px; }
.timer-display {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 500;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  min-width: 100px; text-align: center;
}
.timer-display .ms { color: var(--ink-400); font-size: 16px; }
/* ============== SUMMARY ============== */
.summary-screen {
  flex: 1; display: flex; flex-direction: column;
  overflow: auto;
  padding: 32px;
  align-items: center;
}
.summary-card {
  width: 100%; max-width: 960px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px 36px;
  box-shadow: var(--shadow-sm);
}
.summary-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px; border-bottom: 1px solid var(--ink-100);
}
.summary-head .eyebrow { color: #1f6e51; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.summary-head h2 {
  font-family: var(--font-serif);
  font-size: 32px; font-weight: 600;
  color: var(--ink-950);
  letter-spacing: -0.02em;
  margin-top: 6px;
  text-wrap: balance;
}
.summary-head .meta {
  display: flex; gap: 16px;
  font-size: 13px; color: var(--ink-500);
  margin-top: 10px;
}
.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 24px;
}
.summary-stat {
  padding: 14px 18px 14px 0;
  border-right: 1px solid var(--ink-100);
}
.summary-stat:last-child { border-right: 0; }
.summary-stat .lbl {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-500);
}
.summary-stat .val {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 500;
  color: var(--ink-950);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.summary-stat .val .unit { color: var(--ink-500); font-size: 13px; margin-left: 3px; font-weight: 400; }
.summary-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid var(--ink-100);
}
.sensor-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.sensor-summary {
  padding: 14px 16px;
  background: var(--ink-50);
  border-radius: 12px;
  border-left: 3px solid var(--swatch);
}
.sensor-summary .name { font-size: 13px; font-weight: 600; color: var(--ink-900); display: flex; justify-content: space-between; }
.sensor-summary .name .freq { font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); font-weight: 400; }
.sensor-summary .stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 10px;
  font-family: var(--font-mono); font-size: 12px;
}
.sensor-summary .stats > div .l { color: var(--ink-500); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-sans); }
.sensor-summary .stats > div .v { color: var(--ink-900); font-weight: 500; font-variant-numeric: tabular-nums; }
.summary-graph-toolbar {
  margin-top: 24px; display: flex; justify-content: flex-end;
}
.summary-graph-toolbar + .summary-graph-wrap { margin-top: 8px; }
.summary-graph-wrap {
  margin-top: 24px; height: 320px; border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; background: white; position: relative;
}
.summary-graph-wrap > svg {
  width: 100%; height: 100%; display: block;
}
/* ============== RECENT ============== */
.recent-strip {
  padding: 24px 32px;
  width: 100%; max-width: 960px;
  margin-top: 8px;
}
.recent-strip h4 {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-500);
  margin-bottom: 12px;
}
.recent-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.recent-card {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  transition: all 120ms;
}
.recent-card:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.recent-card:disabled { cursor: default; opacity: 0.55; }
.recent-card .name { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.recent-card .when { font-size: 11px; color: var(--ink-500); margin-top: 2px; font-family: var(--font-mono); }
.recent-card .sensors-row { display: flex; gap: 4px; margin-top: 10px; align-items: center; }
.recent-card .sensors-row .s { width: 8px; height: 8px; border-radius: 50%; }
.recent-card .sensors-row .duration { margin-left: auto; font-size: 11px; color: var(--ink-500); font-family: var(--font-mono); }
/* ============== AI ASSISTANT — expanded chat ============== */
.mini-fab {
  position: fixed;
  right: 28px; bottom: 28px;
  z-index: 80;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--brand-500);
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -8px rgba(0,107,183,0.5), 0 4px 8px rgba(11,22,32,0.1);
  font-family: var(--font-mono);
  font-weight: 700; font-size: 18px;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.mini-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px rgba(0,107,183,0.55), 0 6px 12px rgba(11,22,32,0.12);
}
.scrim {
  position: fixed; inset: 0;
  background: rgba(11, 22, 32, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 90;
  animation: scrimIn var(--dur-base) var(--ease-standard);
}
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
.shell {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  z-index: 91;
}
.panel {
  width: min(1440px, 100%);
  height: min(880px, calc(100vh - 64px));
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow:
    0 32px 64px -16px rgba(11,22,32,0.22),
    0 12px 24px -8px rgba(11,22,32,0.12),
    0 0 0 1px rgba(11,22,32,0.04);
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
  position: relative;
  animation: panelIn var(--dur-slow) var(--ease-out);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
/* ---- left rail ---- */
.rail { background: #fafbfc; border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.rail-head { padding: 22px 20px 14px; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 32px; height: 32px; background: var(--brand-500); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; color: white;
  font-family: var(--font-mono); font-weight: 700; font-size: 16px; letter-spacing: -0.02em;
  box-shadow: 0 2px 4px rgba(0,107,183,0.25);
}
.brand-name { font-family: var(--font-mono); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; color: var(--ink-950); }
.brand-sub { font-size: 11px; color: var(--ink-500); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 1px; }
.rail-actions { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.search-row {
  display: flex; align-items: center; gap: 8px;
  padding: 0 6px 0 12px; background: white;
  border: 1px solid var(--border); border-radius: 11px; height: 40px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.search-row:focus-within { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.search-row > svg:first-child { color: var(--ink-400); flex: 0 0 auto; }
.search-row input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 13.5px; color: var(--ink-900); }
.search-row input::placeholder { color: var(--ink-400); }
.search-kbd {
  font-family: var(--font-mono); font-size: 10.5px; padding: 2px 6px;
  background: var(--ink-50); border: 1px solid var(--border); border-radius: 5px;
  color: var(--ink-500); letter-spacing: 0.04em; flex: 0 0 auto;
}
.search-row:focus-within .search-kbd { opacity: 0; pointer-events: none; }
.new-chat-icon {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand-500); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), transform var(--dur-fast);
  box-shadow: 0 1px 2px rgba(0,107,183,0.3);
}
.new-chat-icon:hover { background: var(--brand-600); }
.new-chat-icon:active { transform: scale(0.94); }
.threads-scroll { flex: 1; overflow-y: auto; padding: 6px 8px 14px; scrollbar-width: thin; scrollbar-color: var(--ink-200) transparent; }
.threads-scroll::-webkit-scrollbar { width: 6px; }
.threads-scroll::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 3px; }
.threads-empty { padding: 28px 16px; font-size: 13px; color: var(--ink-500); text-align: center; line-height: 1.5; }
.thread-group { margin-top: 14px; }
.thread-group:first-child { margin-top: 4px; }
.thread-group-label { padding: 6px 12px 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-400); }
.thread-item { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px 12px; border-radius: 10px; cursor: pointer; transition: background var(--dur-fast); position: relative; }
.thread-item:hover { background: rgba(11,22,32,0.04); }
.thread-item.active { background: var(--brand-50); }
.thread-item.active::before { content: ''; position: absolute; left: 4px; top: 14px; bottom: 14px; width: 2px; background: var(--brand-500); border-radius: 2px; }
.thread-row { display: flex; align-items: baseline; gap: 10px; }
.thread-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; color: var(--ink-900); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-item.active .thread-title { color: var(--brand-700); font-weight: 600; }
.thread-time { flex: 0 0 auto; font-size: 11px; color: var(--ink-400); font-variant-numeric: tabular-nums; }
.thread-item.active .thread-time { color: var(--brand-600); }
.thread-preview { font-size: 12px; color: var(--ink-500); line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.thread-item.active .thread-preview { color: var(--ink-600); }
/* ---- right chat ---- */
.chat { display: flex; flex-direction: column; min-height: 0; background: white; position: relative; }
.chat-head { display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-bottom: 1px solid var(--border); }
.chat-title { font-size: 15px; font-weight: 600; color: var(--ink-900); letter-spacing: -0.005em; }
.chat-subtitle { font-size: 12px; color: var(--ink-500); margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.chat-head-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.chat-head-actions .icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: white;
  color: var(--ink-600);
  transition: all var(--dur-fast);
}
.chat-head-actions .icon-btn:hover { background: var(--ink-50); color: var(--ink-900); border-color: var(--border-strong); }
.chat-head-actions .icon-btn:active { transform: scale(0.97); }
.messages-scroll { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--ink-200) transparent; }
.messages-scroll::-webkit-scrollbar { width: 8px; }
.messages-scroll::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 4px; }
.messages { max-width: 760px; margin: 0 auto; padding: 32px 32px 24px; display: flex; flex-direction: column; gap: 22px; }
.day-divider { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; color: var(--ink-400); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.day-divider::before, .day-divider::after { content: ''; flex: 1; height: 1px; background: var(--ink-200); }
.msg-row { display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.msg-row.user { align-items: flex-end; }
.msg-row.assistant { align-items: flex-start; }
.bubble { padding: 13px 18px; font-size: 14.5px; line-height: 1.55; border-radius: 18px; max-width: 80%; word-wrap: break-word; white-space: pre-wrap; animation: bubbleIn var(--dur-slow) var(--ease-out) both; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bubble.user { background: var(--brand-500); color: white; border-bottom-right-radius: 6px; font-weight: 500; }
.bubble.assistant { background: var(--ink-100); color: var(--ink-900); border-bottom-left-radius: 6px; }
.bubble p + p { margin-top: 10px; }
.assistant-html { white-space: normal; }
.assistant-html > :first-child { margin-top: 0; }
.assistant-html > :last-child { margin-bottom: 0; }
.assistant-html p { margin: 0 0 10px; }
.assistant-html h1, .assistant-html h2, .assistant-html h3, .assistant-html h4 { margin: 14px 0 8px; line-height: 1.3; font-weight: 650; }
.assistant-html h1 { font-size: 19px; }
.assistant-html h2 { font-size: 17px; }
.assistant-html h3 { font-size: 15.5px; }
.assistant-html h4 { font-size: 14.5px; }
.assistant-html ul, .assistant-html ol { margin: 8px 0; padding-left: 22px; }
.assistant-html ul { list-style: disc; }
.assistant-html ol { list-style: decimal; }
.assistant-html li { margin: 4px 0; }
.assistant-html li::marker { color: var(--ink-500); }
.assistant-html a { color: var(--brand-500); text-decoration: underline; }
.assistant-html code { font-family: var(--font-mono); font-size: 12.5px; background: rgba(0, 0, 0, 0.05); padding: 1px 5px; border-radius: 5px; }
.assistant-html pre { margin: 8px 0; padding: 10px 14px; background: rgba(0, 0, 0, 0.05); border-radius: 10px; overflow-x: auto; }
.assistant-html pre code { background: none; padding: 0; }
.assistant-html blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--ink-100); color: var(--ink-500); }
.assistant-html table { border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.assistant-html th, .assistant-html td { border: 1px solid var(--ink-100); padding: 5px 10px; text-align: left; }
.bubble .data-card { margin-top: 10px; background: white; border: 1px solid var(--ink-100); border-radius: 10px; padding: 10px 14px; font-family: var(--font-mono); font-size: 12px; }
.bubble .data-card .row { display: flex; gap: 16px; }
.bubble .data-card .row + .row { margin-top: 4px; }
.bubble .data-card .l { color: var(--ink-500); width: 90px; }
.bubble .data-card .v { color: var(--ink-900); }
.msg-actions { display: flex; gap: 4px; padding: 0 4px; }
.msg-action-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; color: var(--ink-500); transition: background var(--dur-fast), color var(--dur-fast); }
.msg-action-btn:hover { background: var(--ink-100); color: var(--brand-600); }
.msg-action-btn.copied { color: var(--success); }
.assistant-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-500); padding-left: 4px; }
.assistant-meta .ai-dot { width: 20px; height: 20px; border-radius: 6px; background: var(--brand-500); color: white; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 10px; }
.typing { display: inline-flex; align-items: center; gap: 5px; padding: 16px 20px; background: var(--ink-100); border-radius: 18px 18px 18px 6px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-400); animation: typing 1.2s var(--ease-standard) infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }
.empty-state { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px; }
.empty-state-inner { max-width: 540px; text-align: center; }
.empty-state-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-500); color: white; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 28px; letter-spacing: -0.04em; margin: 0 auto 22px; box-shadow: 0 8px 16px -4px rgba(0,107,183,0.3); }
.empty-state h2 { font-family: var(--font-serif); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; color: var(--ink-950); margin-bottom: 10px; }
.empty-state p { font-size: 15px; color: var(--ink-600); line-height: 1.55; max-width: 460px; margin: 0 auto; }
.suggestion-cards { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; text-align: left; }
.suggestion-card { padding: 16px 18px; background: white; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; transition: all var(--dur-fast); display: flex; flex-direction: column; gap: 4px; }
.suggestion-card:hover { border-color: var(--brand-300); background: var(--brand-50); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.suggestion-card .sc-eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-600); }
.suggestion-card .sc-text { font-size: 13.5px; color: var(--ink-800); line-height: 1.45; }
.composer-wrap { padding: 14px 32px 22px; background: linear-gradient(to top, white 60%, rgba(255,255,255,0)); }
.composer-inner { max-width: 760px; margin: 0 auto; }
.composer-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: white; border: 1px solid var(--border); border-radius: 999px; font-size: 12.5px; color: var(--ink-700); cursor: pointer; transition: all var(--dur-fast); }
.chip:hover { background: var(--ink-50); border-color: var(--border-strong); }
.chip.primary { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.chip.primary:hover { background: var(--brand-100); border-color: var(--brand-300); }
.composer { display: flex; align-items: flex-end; background: white; border: 1px solid var(--border); border-radius: 18px; padding: 6px 6px 6px 14px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.composer:focus-within { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.composer textarea { flex: 1; resize: none; border: 0; outline: none; background: none; padding: 10px 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-900); min-height: 24px; max-height: 200px; font-family: inherit; }
.composer textarea::placeholder { color: var(--ink-400); }
.composer-tools { display: flex; align-items: center; gap: 4px; padding-bottom: 2px; }
.composer-icon { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-500); transition: all var(--dur-fast); }
.composer-icon:hover { background: var(--ink-100); color: var(--ink-900); }
.send-btn { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-500); color: white; transition: all var(--dur-fast); box-shadow: 0 1px 2px rgba(0,107,183,0.3); }
.send-btn:hover { background: var(--brand-600); transform: translateY(-1px); }
.send-btn:active { transform: translateY(0) scale(0.97); }
.send-btn:disabled { background: var(--ink-200); color: var(--ink-400); cursor: not-allowed; box-shadow: none; transform: none; }
.composer-foot { display: flex; justify-content: space-between; margin-top: 10px; padding: 0 6px; }
.composer-hint { font-size: 11.5px; color: var(--ink-400); display: flex; align-items: center; gap: 6px; }
.composer-hint kbd { font-family: var(--font-mono); font-size: 10px; padding: 1px 5px; background: var(--ink-50); border: 1px solid var(--border); border-radius: 4px; color: var(--ink-600); }
@media (max-width: 860px) {
  .shell { padding: 0; }
  .panel { grid-template-columns: 1fr; height: 100vh; border-radius: 0; }
  .rail { display: none; }
}
/* ============== UTIL ============== */
.divider { height: 1px; background: var(--ink-100); margin: 8px 0; }
.disc-btn {
  font-size: 11px; padding: 4px 8px;
  border-radius: 6px; color: var(--ink-500);
}
.disc-btn:hover { background: var(--ink-100); color: var(--danger); }
.connect-btn {
  font-size: 12px; padding: 6px 12px; border-radius: 8px;
  background: var(--brand-500); color: white;
  font-weight: 500;
  transition: background 120ms;
}
.connect-btn:hover { background: var(--brand-600); }
.connect-btn.connecting {
  background: var(--ink-100); color: var(--ink-600);
  cursor: wait;
  display: inline-flex; align-items: center; gap: 6px;
}
.connect-btn.connecting::before {
  content: '';
  width: 10px; height: 10px;
  border: 1.5px solid var(--ink-300);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.connect-btn.unsupported {
  background: var(--ink-100); color: var(--ink-500);
  cursor: not-allowed;
}
.connect-btn.unsupported:hover { background: var(--ink-100); }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-row {
  padding: 12px 18px;
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--ink-500);
}
.scan-row .scan-pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-500); position: relative;
}
.scan-row .scan-pulse::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--brand-500);
  animation: ping 1.4s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.live-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px;
  background: #fbe6e3; color: #c0392b;
  font-family: var(--font-sans);
}
.live-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.sensor-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: white; border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--ink-800);
}
.sensor-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.sensor-chip .freq { font-family: var(--font-mono); font-size: 11px; color: var(--ink-500); }
