@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ins-400.ttf") format("truetype");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ins-500.ttf") format("truetype");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ins-600.ttf") format("truetype");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/ins-700.ttf") format("truetype");
}

:root {
  --page: #101114;
  --bg: #090a0c;
  --surface: #14151a;
  --elevated: #1b1c22;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);
  --text: #f3f4f6;
  --muted: #a8abb4;
  --dim: #646872;
  --mint: #3dffc8;
  --sky: #4ea3ff;
  --violet: #9b87ff;
  --coral: #ff5a4a;
  --amber: #ffc14a;
  --grad: linear-gradient(90deg, #3dffd0 0%, #4db8ff 48%, #c59cff 100%);
  --grad-glow: 0 0 8px rgba(77,184,255,0.55), 0 0 16px rgba(61,255,208,0.28);
  --shadow: 0 24px 60px rgba(0,0,0,0.5);
  --phone-w: 390px;
  --phone-h: 844px;
  --radius-phone: 46px;
  --sans: "Instrument Sans", Inter, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}
#app {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
.launch-fallback {
  padding: 48px 24px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}
.launch-fallback a { color: var(--sky); }

.page-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
}

.caption {
  text-align: center;
  max-width: 390px;
}
.caption .kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.caption h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.caption p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.phone-scale {
  width: 100%;
  height: 100%;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.phone {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  outline: none;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
.phone:focus-visible { box-shadow: none; }
.phone.is-active { box-shadow: none; }

.bezel {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 0;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  position: relative;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  padding-top: env(safe-area-inset-top, 0px);
}

.caption, .status-bar, .home-bar, .frame-footer { display: none !important; height: 0 !important; padding: 0 !important; overflow: hidden !important; }

.status-bar {
  height: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 22px 10px;
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
}
.bars span {
  width: 3px;
  background: var(--text);
  border-radius: 0.5px;
  display: block;
}
.bars span:nth-child(1) { height: 3px; }
.bars span:nth-child(2) { height: 5px; }
.bars span:nth-child(3) { height: 7px; }
.bars span:nth-child(4) { height: 10px; }
.wifi {
  width: 14px;
  height: 10px;
  position: relative;
}
.wifi::before,
.wifi::after,
.wifi i {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  border: 1.2px solid var(--text);
  border-radius: 50%;
  border-color: var(--text) var(--text) transparent transparent;
  transform: translateX(-50%) rotate(-45deg);
}
.wifi::before { width: 12px; height: 12px; bottom: -2px; }
.wifi::after { width: 8px; height: 8px; bottom: -1px; }
.wifi i {
  width: 3px;
  height: 3px;
  border: 0;
  background: var(--text);
  border-radius: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: block;
}
.battery {
  width: 24px;
  height: 11px;
  border: 1px solid var(--text);
  border-radius: 3px;
  position: relative;
  padding: 1px;
}
.battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 2px;
  height: 4px;
  background: var(--text);
  border-radius: 0 1px 1px 0;
  opacity: 0.7;
}
.battery i {
  display: block;
  height: 100%;
  width: 72%;
  background: var(--text);
  border-radius: 1px;
}

.switcher {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}
.sw-a { padding: 4px 0 12px; }
.sw-a-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 2px 16px 8px;
}
.carousel {
  flex: 1;
  overflow: hidden;
  touch-action: pan-y;
  overscroll-behavior-x: none;
  container-type: inline-size;
  container-name: carousel;
}
.carousel-track {
  display: flex;
  gap: 8px;
  padding-left: 20px;
  will-change: transform;
  touch-action: pan-y;
}
.car-card {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  color: var(--text);
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  flex: 0 0 calc(100cqw - 92px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px 12px;
  min-height: 64px;
  position: relative;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.2;
  overflow: visible;
}
.car-card.is-current {
  border-color: transparent;
  background:
    linear-gradient(#17181e, #17181e) padding-box,
    var(--grad) border-box;
  border: 2px solid transparent;
  box-shadow: var(--grad-glow);
}
.car-card .year,
.car-card .name,
.car-card .kind {
  margin: 0;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}
.car-card .year {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.car-card .name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}
.car-card.is-current .name {
  text-shadow: 0 0 16px rgba(77,184,255,0.35), 0 0 28px rgba(61,255,208,0.18);
}
.car-card .kind {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.car-card.add-card {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
}
.plus-btn {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--elevated);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  padding: 0;
  font-family: inherit;
}
.plus-btn:hover, .car-card.add-card:hover { border-color: rgba(77,163,255,0.5); }

.stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  overflow-x: hidden;
  position: relative;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}
.stage-track {
  height: 100%;
  display: flex;
  will-change: transform;
  touch-action: pan-y;
}
.panel {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 4px 20px 20px;
  overscroll-behavior: contain;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
}

.iden {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}
.iden .facts {
  min-width: 0;
}
.iden .engine {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.iden .meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 400;
  line-height: 1.4;
}
.badge {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  margin-top: 2px;
}
.badge.owned {
  color: #86f6d8;
  border-color: rgba(61,255,200,0.28);
  background: rgba(61,255,200,0.04);
}
.badge.prospect {
  color: var(--violet);
  border-color: rgba(155,135,255,0.4);
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(61,255,200,0.15);
  flex: 0 0 auto;
}
.status-left.is-live { color: var(--text); font-weight: 500; }
.drive-toggle {
  appearance: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  flex: 0 0 auto;
}
.drive-toggle[aria-pressed="true"] {
  color: var(--text);
  border-color: transparent;
  background:
    linear-gradient(#16171c, #16171c) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  box-shadow: 0 0 10px rgba(77,184,255,0.28);
}

.section { margin-top: 18px; }
.section h3 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.section-head h3 { margin-bottom: 0; }
.section-head .more {
  font-size: 12px;
  font-weight: 500;
  color: var(--sky);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.section-head .more:hover { color: var(--text); }

.next-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px 13px;
  margin-bottom: 8px;
}
.next-card .label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #86f6d8;
  margin-bottom: 6px;
}
.next-card p {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.then-list {
  list-style: none;
  display: grid;
  gap: 8px;
}
.then-list li {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  padding-left: 12px;
  position: relative;
}
.then-list li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
  position: absolute;
  left: 0;
  top: 0.55em;
}

.code-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  align-items: baseline;
}
.code-row:last-child { border-bottom: 0; }
.code-row .code {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.code-row .desc {
  grid-column: 1 / -1;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.code-row .tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
}
.code-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.readings {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.stat:last-child { border-bottom: 0; }
.stat .k {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
}
.stat .val {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.stat .val.warn { color: var(--coral); }
.stat .val.ok { color: var(--mint); }
.stat .val.score-hi { color: var(--mint); }
.stat .val.score-lo { color: var(--coral); }
.stat .val.pending { color: var(--amber); }
.score-line {
  flex: 1 0 100%;
  margin-top: 4px;
  height: 1px;
  background: var(--line);
  position: relative;
}
.score-line > i {
  display: block;
  height: 1px;
  background: var(--grad);
  position: absolute;
  left: 0;
  top: 0;
}

.watch-list, .hist-list, .log-list {
  list-style: none;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.watch-list li,
.hist-list li,
.log-list li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.35;
}
.watch-list li:last-child,
.hist-list li:last-child,
.log-list li:last-child { border-bottom: 0; }
.watch-list .st,
.hist-list .when,
.log-list .when {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 2px;
}
.watch-list .st.on { color: var(--coral); }
.watch-list .st.none { color: var(--mint); }
.watch-list .st.wait { color: var(--amber); }
.watch-list .st.vin { color: var(--muted); }
.facts-grid {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.facts-grid .stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
}
.facts-grid .stat .val {
  max-width: 100%;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
.facts-grid .stat .val.vin {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.actions {
  display: grid;
  gap: 8px;
}
.action {
  appearance: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.action:hover { border-color: var(--line-strong); }
.action.primary {
  background:
    linear-gradient(#17181e, #17181e) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
}
.example-banner {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet);
  border: 1px solid rgba(155,135,255,0.35);
  border-radius: 999px;
  display: inline-flex;
  padding: 4px 9px;
  margin-bottom: 12px;
}

.note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.stub {
  padding-top: 18px;
}
.stub h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.stub .soon {
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(255,193,74,0.35);
  border-radius: 999px;
  padding: 3px 8px;
  margin-bottom: 12px;
}
.stub p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.dock {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  padding: 4px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.dock-row {
  display: grid;
  grid-template-columns: 1fr 44px;
  align-items: center;
  gap: 2px;
  min-height: 48px;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 48px;
  align-items: center;
}
.tab {
  appearance: none;
  background: none;
  border: 0;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  color: var(--dim);
  font: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 0;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: grid;
  place-items: center;
  height: 100%;
}
.tab.is-on {
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.mic-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.mic, .drive-mic {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
.mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  background:
    linear-gradient(#16171c, #16171c) padding-box,
    var(--grad) border-box;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--grad-glow);
  padding: 0;
}
.mic:active, .mic.is-listening { transform: scale(0.96); }
.mic.is-listening {
  box-shadow: 0 0 0 6px rgba(77,184,255,0.18), var(--grad-glow);
}
.mic svg { width: 16px; height: 16px; pointer-events: none; }
.home-bar {
  height: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.home-bar span {
  width: 120px;
  height: 4px;
  border-radius: 4px;
  background: #fff;
  opacity: 0.85;
  margin-top: 4px;
}
.frame-footer {
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  pointer-events: none;
  padding: 0 0 2px;
  height: 14px;
  line-height: 14px;
}

.voice-toast {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 7;
  background: var(--elevated);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.voice-toast.is-on {
  opacity: 1;
  transform: translateY(0);
}

.drive-screen {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: var(--bg);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(40px + env(safe-area-inset-bottom, 0px));
}
.bezel.is-driving .drive-screen { display: flex; }
.bezel.is-driving .switcher,
.bezel.is-driving .stage,
.bezel.is-driving .dock-row,
.bezel.is-driving .frame-footer { visibility: hidden; }
.bezel.is-driving .dock { border-top-color: transparent; }
.drive-screen .car {
  position: absolute;
  top: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.drive-screen .exit {
  position: absolute;
  top: 12px;
  right: 16px;
  appearance: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}
.drive-mic {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 2px solid transparent;
  background:
    linear-gradient(#121318, #121318) padding-box,
    var(--grad) border-box;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--grad-glow);
  padding: 0;
}
.drive-mic.is-listening {
  box-shadow: 0 0 0 14px rgba(77,184,255,0.14), var(--grad-glow);
}
.drive-mic svg { width: 56px; height: 56px; pointer-events: none; }
.drive-state {
  margin-top: 22px;
  min-height: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sheet {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 8;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.sheet.is-open { opacity: 1; pointer-events: auto; }
.sheet-card {
  width: 100%;
  background: #16171c;
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 14px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateY(16px);
  transition: transform 200ms ease;
}
.sheet.is-open .sheet-card { transform: translateY(0); }
.sheet-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 8px 0 14px;
}
.sheet-card button.choice,
.sheet-card .choice {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 14px 14px;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  display: block;
  text-decoration: none;
}
.sheet-card button.choice:hover,
.sheet-card a.choice:hover { border-color: var(--line-strong); }
.sheet-card .cancel {
  width: 100%;
  margin-top: 6px;
  appearance: none;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
}
.sheet-card p.body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 12px;
}


/* Mic placement. Default is raised center (Scott, Dec 2, 2026).
   Swap APP_CONFIG.micPosition: dock-center | dock-right | fab | top */

.bezel.mic-dock-right .dock-row {
  grid-template-columns: 1fr 44px;
}

.bezel.mic-dock-center .dock {
  overflow: visible;
  padding-top: 0;
}
.bezel.mic-dock-center .dock-row {
  grid-template-columns: 1fr;
  overflow: visible;
}
.bezel.mic-dock-center .tabs {
  display: flex;
  align-items: flex-end;
  height: 52px;
  overflow: visible;
}
.bezel.mic-dock-center .tabs-side {
  flex: 1;
  display: flex;
  min-width: 0;
  height: 48px;
  align-items: center;
}
.bezel.mic-dock-center .tabs-side .tab { flex: 1; min-width: 0; }
.bezel.mic-dock-center .mic-wrap {
  flex: 0 0 58px;
  width: 58px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  z-index: 4;
}
.bezel.mic-dock-center .mic {
  width: 52px;
  height: 52px;
  margin-bottom: 8px;
  box-shadow: var(--grad-glow), 0 8px 20px rgba(0,0,0,0.4);
}
.bezel.mic-dock-center .mic svg { width: 22px; height: 22px; }
.bezel.mic-dock-center .voice-toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

.bezel.mic-fab .dock-row,
.bezel.mic-top .dock-row {
  grid-template-columns: 1fr;
}
.bezel.mic-fab .dock { position: relative; overflow: visible; }
.bezel.mic-fab .dock > .mic-wrap {
  position: absolute;
  right: 16px;
  top: -22px;
  z-index: 5;
}
.bezel.mic-fab .mic {
  width: 48px;
  height: 48px;
}
.bezel.mic-fab .mic svg { width: 20px; height: 20px; }
.bezel.mic-fab .voice-toast { bottom: 112px; }

.bezel.mic-top .sw-a-top .mic-wrap { flex: 0 0 auto; }
.bezel.mic-top .sw-a-top .mic {
  width: 32px;
  height: 32px;
}
.bezel.mic-top .sw-a-top .mic svg { width: 15px; height: 15px; }

/* Test tab */
.start-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.test-board {
  margin-top: 18px;
}
.test-board .board-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.test-board .t-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.test-board .t-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.test-state {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  margin-top: 2px;
}
.test-state.finished {
  color: var(--mint);
  border-color: rgba(61,255,200,0.28);
  background: rgba(61,255,200,0.04);
}
.test-state.idle {
  color: var(--muted);
}
.test-state.not-run {
  color: var(--amber);
  border-color: rgba(255,193,74,0.35);
}
.test-board .board-note,
.test-board .board-next {
  font-size: 13px;
  line-height: 1.45;
  margin-top: 10px;
}
.test-board .board-next {
  color: var(--text);
}
.test-board .board-next .label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #86f6d8;
  margin-bottom: 4px;
}
.test-links {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}
.test-links a,
.test-links button.link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--sky);
  text-decoration: none;
  cursor: pointer;
}
.test-links a:hover,
.test-links button.link:hover { color: var(--text); }

.past-list {
  list-style: none;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.past-list button {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 11px 12px;
}
.past-list li:last-child button { border-bottom: 0; }
.past-list button.is-on {
  background: rgba(255,255,255,0.03);
}
.past-list .p-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.past-list .p-when {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.past-list .p-st {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  align-self: center;
}
.past-list .p-st.finished { color: var(--mint); }
.past-list .p-st.not-run { color: var(--amber); }

.empty-test {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}


/* Chat tab */
.panel-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 4px 16px 10px;
}
.chat-sessions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}
.chat-sessions::-webkit-scrollbar { display: none; }
.sess {
  appearance: none;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
}
.sess .s-sub {
  display: block;
  font-size: 10px;
  color: var(--dim);
  margin-top: 1px;
  font-weight: 500;
}
.sess.is-on {
  color: var(--text);
  border-color: transparent;
  background:
    linear-gradient(#17181e, #17181e) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
}
.chat-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0 8px;
  overscroll-behavior: contain;
}
.bubble {
  max-width: 86%;
  font-size: 14px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 14px;
}
.bubble.user {
  align-self: flex-end;
  background: var(--elevated);
  border: 1px solid var(--line);
  border-bottom-right-radius: 4px;
}
.bubble.assistant {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.bubble .who {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}
.bubble.user .who { text-align: right; }
.bubble .spoken-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.play-turn {
  appearance: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.play-turn:hover { color: var(--text); }
.chat-event {
  align-self: stretch;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
  padding: 8px 10px 2px;
}
.chat-event a {
  display: inline-block;
  margin-left: 8px;
  color: var(--sky);
  text-decoration: none;
  font-weight: 500;
}
.chat-event a:hover { color: var(--text); }
.composer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.composer input {
  appearance: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
  outline: none;
}
.composer input::placeholder { color: var(--dim); }
.composer input:focus { border-color: var(--line-strong); }
.composer button[type="submit"] {
  appearance: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--elevated);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}
.composer button[type="submit"]:hover { border-color: rgba(77,163,255,0.5); }


/* Collapsing header. Same peeking cards, slimmer, once the page scrolls. */
.sw-a { transition: padding 180ms ease; }
.sw-a-top {
  max-height: 40px;
  overflow: hidden;
  transition: max-height 180ms ease, padding 180ms ease, opacity 140ms ease;
}
.car-card { transition: min-height 180ms ease, padding 180ms ease; }
.bezel.is-collapsed .sw-a { padding: 4px 0 8px; }
.bezel.is-collapsed .sw-a-top {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}
.bezel.is-collapsed .car-card {
  min-height: 38px;
  padding: 7px 12px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.bezel.is-collapsed .car-card .year { font-size: 11px; }
.bezel.is-collapsed .car-card .name { font-size: 14px; }
.bezel.is-collapsed .car-card .make { display: none; }
.bezel.is-collapsed .car-card.add-card { justify-content: center; }
.bezel.is-collapsed .switcher { border-bottom: 1px solid var(--line); }

/* Chat extras */
.spoken-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-right: auto;
}

/* Flags tab */
.flag-summary {
  margin-top: 4px;
  display: grid;
  gap: 8px;
}
.flag-summary .chips { display: flex; gap: 8px; }
.flag-summary .chip {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.flag-summary .chip.red { color: var(--coral); border-color: rgba(255,90,74,0.4); }
.flag-summary .chip.yellow { color: var(--amber); border-color: rgba(255,193,74,0.4); }
.flag-summary .chip.ok { color: var(--mint); border-color: rgba(61,255,200,0.3); }
.flag-summary p { font-size: 13px; line-height: 1.45; color: var(--text); }
.flag-card {
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 14px 12px 13px;
  margin-bottom: 8px;
}
.flag-card.red { border-left-color: var(--coral); }
.flag-card.yellow { border-left-color: var(--amber); }
.flag-card h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.flag-codes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.flag-codes span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 8px;
}
.flag-card .plain {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 8px;
}
.flag-card .do {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
}
.flag-card .do .label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #86f6d8;
  margin-bottom: 4px;
}
.flag-card .evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.flag-card .evidence a { color: var(--sky); text-decoration: none; font-weight: 500; }
.flag-card .evidence a:hover { color: var(--text); }
.fine-list {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.fine-list li {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
}
.fine-list li:last-child { border-bottom: 0; }
.fine-list li i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint); margin-top: 6px; display: block;
}


/* Parts tab */
.part-card {
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 14px 13px 13px;
  margin-bottom: 8px;
}
.part-card.offered { border-left-color: var(--mint); }
.part-card.needed { border-left-color: var(--sky); }
.part-card.inspect { border-left-color: var(--line-strong); }
.part-card.held { border-left-color: var(--amber); }
.part-card.avoid { border-left-color: var(--dim); }
.part-card h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.part-card .status-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--muted);
}
.part-card.offered .status-tag { color: var(--mint); }
.part-card.held .status-tag { color: var(--amber); }
.part-card p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 6px;
}
.option-list {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.option {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.option:last-child { border-bottom: 0; }
.option .who {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.option .num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.option .price {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.part-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.part-actions a,
.part-actions button {
  appearance: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--sky);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  text-decoration: none;
  cursor: pointer;
}
.part-actions a:hover,
.part-actions button:hover { border-color: var(--line-strong); color: var(--text); }
.part-actions button.is-on {
  color: var(--mint);
  border-color: rgba(61,255,200,0.35);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track, .stage-track, .sheet, .sheet-card, .voice-toast, .sw-a, .car-card, .sw-a-top {
    transition: none !important;
  }
}

/* Flag card tap target */
.flag-card { cursor: pointer; }
.flag-card:focus-visible { outline: 1px solid var(--sky); outline-offset: 2px; }
.flag-card .evidence .ask {
  margin-left: auto;
  color: var(--sky);
  font-weight: 500;
}
.flag-card .evidence .ask::after { content: " \203A"; }

/* Context card in a flag session: starts as a one-line counts row. */
.ctx-block { flex: 0 0 auto; }
.ctx-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  appearance: none;
  font-family: inherit;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
.ctx-row:hover { border-color: var(--line-strong); }
.ctx-row .sum {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.ctx-block.is-open .ctx-row { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ctx-card {
  display: none;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
  padding: 4px 13px 13px;
}
.ctx-block.is-open .ctx-card { display: block; }
.ctx-card .lab {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.ctx-head h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.ctx-head p { font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 4px; }
.ctx-sec { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ctx-list, .ctx-ev, .ctx-parts { list-style: none; padding: 0; margin: 0; }
.ctx-list li, .ctx-ev li, .ctx-parts li {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  padding: 3px 0;
}
.ctx-list li { padding-left: 12px; position: relative; }
.ctx-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
}
.ctx-list.miss li { color: var(--amber); }
.ctx-list.miss li::before { background: var(--amber); }
.ctx-ev li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; }
.ctx-ev .when { color: var(--text); font-weight: 600; }
.ctx-ev a, .ctx-more { color: var(--sky); text-decoration: none; font-weight: 500; white-space: nowrap; }
.ctx-more { display: inline-block; margin-top: 6px; font-size: 12px; }
.ctx-parts li { display: grid; grid-template-columns: 112px 1fr; gap: 8px; color: var(--text); }
.ctx-parts .pt { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.ctx-parts .pt.offered { color: var(--mint); }
.ctx-parts .pt.held { color: var(--amber); }
.ctx-note { font-size: 12px; color: var(--muted); }
.bubble.rich { max-width: 94%; }
.bubble ol.steps { margin: 8px 0 8px 18px; padding: 0; }
.bubble ol.steps li { margin: 5px 0; padding-left: 2px; }
.bubble .tail { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.bubble .bubble-link { color: var(--sky); text-decoration: none; font-weight: 500; }

/* All cars link in the header, and the Cars page */
.all-cars {
  margin-right: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 11px;
}
.all-cars:hover { color: var(--text); border-color: var(--line-strong); }
.cars-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 6px 16px 14px 20px;
}
.cars-head .eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.cars-head h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; margin-top: 2px; }
.cars-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 16px 16px;
}
.car-row {
  appearance: none;
  display: block;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 13px 14px 14px;
}
.car-row:hover { border-color: var(--line-strong); }
.car-row.is-owned {
  border: 1px solid transparent;
  background:
    linear-gradient(#17181e, #17181e) padding-box,
    var(--grad) border-box;
}
.car-row .row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.car-row .year { font-size: 12px; color: var(--muted); }
.car-row .tags { display: flex; gap: 6px; }
.car-row .tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}
.car-row .tag.owned { color: var(--mint); border-color: rgba(61,255,200,0.35); }
.car-row .tag.ex { color: var(--violet); border-color: rgba(155,135,255,0.35); }
.car-row .name { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; margin-top: 4px; }
.car-row .make { font-weight: 500; color: var(--muted); }
.car-row .line { font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 6px; }
.car-row.add-row {
  border-style: dashed;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  padding: 16px;
  background: transparent;
}
.car-row.add-row:hover { color: var(--text); border-color: rgba(77,163,255,0.5); }
a.action { display: inline-block; text-decoration: none; text-align: center; }

/* History page, add entry sheet, back navigation */
.hist-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.hist-top h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.hist-top .action { padding: 8px 14px; }
.hist-note { color: var(--muted); margin-bottom: 4px; }
.by-you {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  border: 1px solid rgba(155,135,255,0.35);
  border-radius: 999px;
  padding: 1px 7px;
  vertical-align: 1px;
  white-space: nowrap;
}
.sheet-card.entry-form { max-height: 100%; overflow-y: auto; }
.fld { display: block; margin: 10px 0 0; }
.fld > span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.fld select, .fld input, .fld textarea {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  color-scheme: dark;
}
.fld textarea { resize: none; line-height: 1.4; }
.fld select:focus, .fld input:focus, .fld textarea:focus { outline: none; border-color: rgba(77,163,255,0.6); }
.form-error { min-height: 18px; margin-top: 8px; font-size: 13px; color: var(--coral); }
.sheet-card .save { margin-top: 4px; }

.nav-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 8px;
  min-height: 40px;
}
.back-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  padding: 0 10px 0 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--sky);
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.back-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.back-btn:hover { color: var(--text); }

/* Context row: one line, chevron instead of Show and Hide */
.ctx-row { font-size: 11px; padding: 8px 9px; gap: 6px; letter-spacing: -0.005em; }
.ctx-row .go {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: -3px 4px 0 2px;
  padding: 0;
  border-right: 1.6px solid var(--sky);
  border-bottom: 1.6px solid var(--sky);
  transform: rotate(45deg);
  font-size: 0;
}
.ctx-block.is-open .ctx-row .go { transform: rotate(-135deg); margin-top: 3px; }

/* Real touch: the panel is its own scroller, so it needs its own pan rule or the browser cancels horizontal gestures. */
.panel { touch-action: pan-y; }
.hist-top .action { flex: 0 0 auto; width: auto; }
