/* app.builds.one — the Remote, on builds.one's design system (the marketing site's own tokens,
   https://builds.one/assets/css/site.css). Dark-first; every colour has one meaning:
   amber = the one action / needs you · violet = the worker working · cyan = live, ready
   lime = additions, plan · coral = stop, failed. One motion means "something is happening".
   Phone first (iPhone 17 Pro, 402 pt): the frame is fixed to the visible viewport, so the page
   can never scroll sideways (the owner's first report, 2026-09-23); type is dense, as DispatChai's. */

@font-face {
  font-family: "Space Grotesk";
  src: url(/fonts/space-grotesk-latin-wght-normal.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #07080c;
  --surface: #0e1118;
  --surface-2: #141925;
  --surface-3: #1a2030;
  --rule: #1a2030;
  --rule-2: #252d40;
  --paper: #eef1f6;
  --mute: #8a93a6;
  --faint: #5c6477;
  --violet: #8b7cff;
  --cyan: #4de1d2;
  --lime: #a6f25c;
  --amber: #ffb547;
  --coral: #ff6b5a;
  --f-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --vv-height: 100dvh;
  --vv-top: 0px;
  --col: 720px;
  --gut: 14px;
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--ink);
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  color: var(--paper);
  font: 400 14px / 20px var(--f-body);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}
a {
  color: var(--cyan);
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  margin: 0;
}
button {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 8px;
}
.mono {
  font-family: var(--f-mono);
  font-size: 11.5px;
}
.mute {
  color: var(--mute);
}
.grow {
  flex: 1;
}
.mt {
  margin-top: 10px;
}
.mb {
  margin-bottom: 8px;
}
[hidden] {
  display: none !important;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes slide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: none;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes shimmer {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.85;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.breathe {
  animation: breathe 1.5s ease-in-out infinite;
}

/* ── the frame: fixed to the visible viewport; only `main` scrolls, and only vertically ──── */
#app {
  height: 100%;
}
/* Keyboard down: the frame is simply the whole screen (an installed app's visualViewport already
   stops above the home indicator, and sizing by it AND padding for the inset left a gap — the
   owner's iPhone, 2026-09-23). Keyboard up: the frame follows the visible viewport, so the
   composer rides on the keyboard. */
.app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ink);
}
.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: calc(4px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 4px
    max(10px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.mark {
  width: 22px;
  height: 22px;
  flex: none;
}
.title {
  font: 600 16px / 1 var(--f-display);
  letter-spacing: -.015em;
  white-space: nowrap;
}
.title em {
  font-style: normal;
  color: var(--amber);
}
.sub-title {
  font: 500 11px / 1 var(--f-mono);
  color: var(--mute);
}
.back {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -6px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--paper);
  flex: none;
}
.back:active {
  background: var(--surface-2);
}
.vchip {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  background: none;
  color: var(--mute);
  font: 500 11px / 1 var(--f-mono);
  flex: none;
  transition: color .2s, border-color .2s;
}
.vchip:hover {
  color: var(--paper);
}
.vchip.stale {
  border-color: transparent;
  background: rgba(255, 181, 71, 0.16);
  color: var(--amber);
}
.vchip-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 2px var(--ink);
}
.strip {
  flex: none;
  padding: 8px var(--gut);
  font-size: 12.5px;
  line-height: 18px;
  color: var(--mute);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.strip b {
  color: var(--paper);
  font-weight: 600;
}
.main {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.main.fixed {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.foot {
  flex: none;
}
.foot:empty {
  display: none;
}
.pull {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--rule-2);
  font: 500 11.5px / 1 var(--f-mono);
  color: var(--mute);
  transform: translate(-50%, -60px);
  transition: transform .2s var(--ease);
  pointer-events: none;
}
.pull .mark {
  width: 16px;
  height: 16px;
}
.pull[data-state="pulling"] {
  transition: none;
}
.pull[data-state="refreshing"] .mark {
  animation: spin 1s linear infinite;
}

/* ── atoms ────────────────────────────────────────────────────────────────────────────── */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule-2);
  flex: none;
  display: inline-block;
}
.dot.cyan {
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(77, 225, 210, 0.14);
}
.dot.violet {
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.18);
}
.dot.amber {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.2);
}
.dot.mute,
.dot.done {
  background: var(--faint);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 13.5px / 1 var(--f-body);
  background: none;
  transition: transform .15s var(--ease), border-color .2s, background-color .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.97);
}
.btn.sm {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
}
.btn-amber {
  background: var(--amber);
  color: var(--ink);
}
.btn-ghost {
  border-color: var(--rule-2);
  color: var(--paper);
}
.btn-coral {
  border-color: rgba(255, 107, 90, 0.5);
  color: var(--coral);
}
.btn-lg {
  min-height: 48px;
  padding: 0 22px;
  font-size: 15px;
}
.btn[disabled] {
  opacity: 0.4;
  cursor: default;
}
.btn.chosen {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px currentColor;
}
@media (hover: hover) {
  .btn-amber:hover {
    background: #ffc56e;
  }
  .btn-ghost:hover {
    border-color: var(--mute);
  }
  .btn-coral:hover {
    background: rgba(255, 107, 90, 0.08);
  }
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: none;
  color: var(--paper);
  flex: none;
}
.icon-btn:active {
  background: var(--surface-2);
}
.link {
  border: 0;
  background: none;
  color: var(--cyan);
  padding: 0 4px;
  font: inherit;
}
.chip {
  font: 500 11px / 1 var(--f-mono);
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  color: var(--mute);
  white-space: nowrap;
  flex: none;
}
.chip.cyan {
  color: var(--cyan);
  border-color: rgba(77, 225, 210, 0.35);
}
.chip.violet {
  color: var(--violet);
  border-color: rgba(139, 124, 255, 0.45);
}
.chip.amber {
  color: var(--amber);
  border-color: rgba(255, 181, 71, 0.5);
}
.badge {
  font: 500 10.5px / 1 var(--f-mono);
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  color: var(--mute);
  white-space: nowrap;
}
.badge.plan {
  color: var(--lime);
  border-color: rgba(166, 242, 92, 0.35);
}
.badge.key {
  color: var(--amber);
  border-color: rgba(255, 181, 71, 0.4);
}
.badge.local {
  color: var(--cyan);
  border-color: rgba(77, 225, 210, 0.35);
}
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 14px;
}
.empty {
  padding: 14px;
  border: 1px dashed var(--rule-2);
  border-radius: 14px;
  color: var(--mute);
  font-size: 13px;
  line-height: 19px;
}
.code {
  display: block;
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--ink);
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  font: 500 14px / 20px var(--f-mono);
  color: var(--lime);
  overflow-x: auto;
  white-space: pre;
  -webkit-user-select: all;
  user-select: all;
}
.note-bar {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--rule-2);
  background: var(--surface);
  font-size: 13px;
  animation: rise .3s var(--ease);
}
.note-bar.bad {
  border-color: rgba(255, 107, 90, 0.4);
  color: var(--coral);
}
.select {
  min-height: 34px;
  max-width: 52vw;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  background: var(--surface-2);
  color: var(--paper);
  font-size: 16px;
}

/* ── the list ─────────────────────────────────────────────────────────────────────────── */
.page {
  max-width: var(--col);
  margin: 0 auto;
  padding: 4px var(--gut) calc(28px + env(safe-area-inset-bottom));
}
.sec {
  margin: 18px 0;
}
.sec-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
.sec-h h2 {
  margin: 0;
  font: 600 11px / 1 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
}
.list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 12px 13px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  transition: border-color .2s, transform .12s var(--ease);
}
.row:active {
  transform: scale(0.99);
}
.row .dot {
  margin-top: 6px;
}
.row.asking {
  border-color: rgba(255, 181, 71, 0.5);
  background: linear-gradient(0deg, rgba(255, 181, 71, 0.05), rgba(255, 181, 71, 0.05)),
    var(--surface);
}
.row.dim {
  opacity: 0.7;
}
.row.current {
  border-color: var(--cyan);
}
.row.compact {
  padding: 10px 11px;
  border-radius: 12px;
}
.row-main {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.row-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.row .t {
  font: 600 14.5px / 20px var(--f-display);
  letter-spacing: -.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.word {
  font: 500 11px / 1 var(--f-mono);
  white-space: nowrap;
}
.word.cyan {
  color: var(--cyan);
}
.word.violet {
  color: var(--violet);
}
.word.amber {
  color: var(--amber);
}
.word.mute {
  color: var(--mute);
}
.age {
  font: 400 11px / 1 var(--f-mono);
  color: var(--faint);
  flex: none;
}
.row .s {
  font: 400 12px / 17px var(--f-mono);
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.flag {
  font: 500 10.5px / 1 var(--f-mono);
  color: var(--faint);
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--surface-2);
}
.set-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 2px 14px;
}
.set {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.set:last-child {
  border-bottom: 0;
}
.set > div:first-child {
  min-width: 0;
}
.set .mute {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.set-t {
  font: 600 13.5px / 19px var(--f-display);
}
.pair {
  animation: rise .3s var(--ease);
  margin-top: 12px;
  font-size: 13px;
}

/* ── signed out ───────────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 16px;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
}
.hero-mark {
  width: 52px;
  height: 52px;
  animation: rise .5s var(--ease);
}
.hero h1 {
  margin: 0;
  font: 600 clamp(32px, 9vw, 52px) / 1.04 var(--f-display);
  letter-spacing: -.035em;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber);
}
.hero p {
  margin: 0 auto;
  max-width: 440px;
  color: var(--mute);
  font-size: 15px;
  line-height: 23px;
}

/* ── the session ──────────────────────────────────────────────────────────────────────── */
.sb-text {
  flex: 1;
  min-width: 0;
}
.sb-title {
  font: 600 15px / 19px var(--f-display);
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-sub {
  font: 400 11px / 15px var(--f-mono);
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctl-row {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 7px var(--gut);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  border-bottom: 1px solid var(--rule);
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.ctl-row::-webkit-scrollbar {
  display: none;
}
.ctl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  background: var(--surface);
  color: var(--paper);
  font: 500 12px / 1 var(--f-body);
  white-space: nowrap;
  flex: none;
}
.ctl:active {
  border-color: var(--mute);
}
.ctl.on {
  border-color: rgba(255, 181, 71, 0.55);
  color: var(--amber);
}
.ctl.icon {
  padding: 0 9px;
}
.ctl svg {
  flex: none;
}
.banner {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px var(--gut);
  font: 400 11.5px / 16px var(--f-mono);
  color: var(--cyan);
  background: rgba(77, 225, 210, 0.06);
  border-bottom: 1px solid var(--rule);
}
.sb-slot {
  flex: none;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 10px;
}
.sb-slot:empty {
  display: none;
}
.scroll-box {
  position: relative;
  flex: 1;
  min-height: 0;
}
.scroller {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.thread-wrap {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px var(--gut) 6px;
}
.thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}
.jump {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  background: var(--surface-2);
  color: var(--paper);
  font: 500 11.5px / 1 var(--f-mono);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  animation: rise .2s var(--ease);
}

.now {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(139, 124, 255, 0.35);
  border-radius: 14px;
  background: linear-gradient(0deg, rgba(139, 124, 255, 0.06), rgba(139, 124, 255, 0.06)),
    var(--surface);
  animation: rise .2s var(--ease);
}
.now-t {
  flex: 1;
  min-width: 0;
  font: 500 13px / 18px var(--f-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.now-c {
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.ask {
  margin: 8px 0 0;
  padding: 12px 13px;
  border: 1px solid rgba(255, 181, 71, 0.5);
  border-radius: 16px;
  background: linear-gradient(0deg, rgba(255, 181, 71, 0.06), rgba(255, 181, 71, 0.06)),
    var(--surface);
  animation: rise .2s var(--ease);
  max-height: 46vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.ask-h {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 600 10.5px / 1 var(--f-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--amber);
}
.ask-t {
  margin-top: 7px;
  font: 600 14.5px / 20px var(--f-display);
  overflow-wrap: anywhere;
}
.ask-q {
  margin-top: 2px;
  color: var(--mute);
  font-size: 13px;
  line-height: 18px;
}
.ask-d {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font: 400 11.5px / 17px var(--f-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 8rem;
  overflow: auto;
}
.ask .diff {
  border: 1px solid var(--rule);
  border-radius: 10px;
  margin-top: 6px;
  max-height: 9rem;
}
.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.opts .btn {
  min-height: 40px;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 17px;
  padding: 8px 14px;
}
.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 4px;
  font: 500 10px / 1 var(--f-mono);
  background: rgba(0, 0, 0, 0.18);
  opacity: 0.75;
}
.btn-ghost .kbd,
.btn-coral .kbd {
  background: var(--surface-3);
}
@media (pointer: coarse) {
  .kbd {
    display: none;
  }
}
.plan {
  margin: 8px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  font-size: 12.5px;
}
.plan summary {
  display: flex;
  align-items: center;
  gap: 9px;
  list-style: none;
  min-width: 0;
}
.plan summary > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan summary::-webkit-details-marker {
  display: none;
}
.bar {
  flex: none;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--rule-2);
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--lime);
  transition: width .4s var(--ease);
}
.plan ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.plan li.done {
  color: var(--faint);
  text-decoration: line-through;
}
.plan li.next {
  color: var(--mute);
}

/* messages: every block may shrink to the column, never push it wider */
.msg {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  min-width: 0;
  animation: fade .2s ease;
}
.msg.you {
  justify-items: end;
}
.bubble {
  max-width: 85%;
  background: var(--surface-2);
  border: 1px solid var(--rule-2);
  border-radius: 16px 16px 5px 16px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg.queued .bubble,
.msg.pending .bubble {
  opacity: 0.6;
}
.msg.pending.failed .bubble {
  border-color: rgba(255, 107, 90, 0.5);
  opacity: 1;
}
.stamp {
  font: 400 10.5px / 14px var(--f-mono);
  color: var(--faint);
}
.msg.failed .stamp {
  color: var(--coral);
}
.stamp-acts {
  margin-left: 4px;
}
.prose {
  min-width: 0;
  font-size: 14px;
  line-height: 21px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.prose p {
  margin: 0 0 8px;
}
.prose p:last-child {
  margin-bottom: 0;
}
.prose ul,
.prose ol {
  margin: 0 0 8px;
  padding-left: 20px;
}
.prose li {
  margin: 2px 0;
}
.prose li::marker {
  color: var(--faint);
}
.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose strong {
  font-weight: 600;
}
.prose .md-h {
  margin-top: 12px;
}
.prose.live {
  white-space: pre-wrap;
}
.prose.live::after {
  content: "▍";
  color: var(--violet);
  margin-left: 1px;
  animation: breathe 1s steps(2) infinite;
}
.ic {
  font-family: var(--f-mono);
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.cb {
  margin: 4px 0 8px;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--rule-2);
  border-radius: 12px;
  background: var(--ink);
  overflow: hidden;
}
.cb-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 2px 10px;
  font: 500 10.5px / 1 var(--f-mono);
  color: var(--mute);
  border-bottom: 1px solid var(--rule);
}
.cb-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--mute);
}
.cb-pre {
  margin: 0;
  padding: 9px 10px;
  overflow-x: auto;
  font: 400 11.5px / 17px var(--f-mono);
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}
.cb-more {
  display: block;
  width: 100%;
  padding: 7px;
  border: 0;
  border-top: 1px solid var(--rule);
  background: var(--surface);
  color: var(--cyan);
  font: 500 11px / 1 var(--f-mono);
}
.hl-k {
  color: var(--violet);
}
.hl-s {
  color: var(--lime);
}
.hl-n {
  color: var(--amber);
}
.hl-c {
  color: var(--faint);
  font-style: italic;
}
.think summary,
.tools summary,
.tcard summary {
  list-style: none;
  cursor: pointer;
  min-width: 0;
}
.think summary::-webkit-details-marker,
.tools summary::-webkit-details-marker,
.tcard summary::-webkit-details-marker {
  display: none;
}
.think summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--mute);
  font-size: 12.5px;
}
.think-body {
  margin-top: 5px;
  color: var(--mute);
  font-size: 12.5px;
  line-height: 18px;
  font-style: italic;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tools summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--rule);
  border-radius: 11px;
  background: var(--surface);
  font-size: 12.5px;
}
.tl-sum {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-list {
  display: grid;
  gap: 1px;
  margin: 5px 0 0 10px;
  padding-left: 10px;
  border-left: 2px solid var(--rule-2);
  min-width: 0;
}
.tl-row {
  font: 400 11.5px / 17px var(--f-mono);
  overflow-wrap: anywhere;
  color: var(--mute);
}
.tl-row b {
  color: var(--violet);
  font-weight: 500;
}
.tcard {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.tcard summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  font: 400 11.5px / 17px var(--f-mono);
}
.tcard summary b {
  color: var(--violet);
  font-weight: 500;
  flex: none;
}
.tcard.failed {
  border-color: rgba(255, 107, 90, 0.4);
}
.card-d {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--mute);
}
.tag {
  font: 500 10.5px / 1 var(--f-mono);
  flex: none;
}
.tag.bad {
  color: var(--coral);
}
.diff {
  margin: 0;
  padding: 8px 10px;
  max-height: 16rem;
  overflow: auto;
  background: var(--ink);
  border-top: 1px solid var(--rule);
  font: 400 11.5px / 17px var(--f-mono);
  white-space: pre;
}
.diff .add,
.add {
  color: var(--lime);
}
.diff .del,
.del {
  color: var(--coral);
}
.out {
  margin: 0;
  padding: 8px 10px;
  max-height: 12rem;
  overflow: auto;
  border-top: 1px solid var(--rule);
  font: 400 11px / 16px var(--f-mono);
  color: var(--mute);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.out.bad {
  color: var(--coral);
}
.turn {
  font: 400 10.5px / 14px var(--f-mono);
  color: var(--faint);
  text-align: right;
  padding-top: 5px;
  border-top: 1px solid var(--rule);
  overflow-wrap: anywhere;
}
.note {
  font: 400 11px / 16px var(--f-mono);
  color: var(--faint);
  text-align: center;
  overflow-wrap: anywhere;
}
.note-box {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  font: 400 11px / 16px var(--f-mono);
  color: var(--mute);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.away {
  padding: 10px 12px;
  border: 1px dashed var(--rule-2);
  border-radius: 12px;
  color: var(--mute);
  font-size: 13px;
  line-height: 19px;
}
.away-h {
  font: 600 10px / 1 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 5px;
  color: var(--cyan);
}
.tail {
  width: 100%;
  max-width: var(--col);
  margin: 4px auto 0;
  padding: 0 var(--gut);
  font: 400 11.5px / 16px var(--f-mono);
  color: var(--violet);
}
.skel {
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
  animation: shimmer 1.4s ease-in-out infinite;
}
.skel.short {
  width: 60%;
  justify-self: end;
}
.pics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pic {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 56px;
  min-height: 56px;
  max-width: 200px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rule-2);
  background: var(--surface);
  padding: 0;
  font: 400 10.5px / 1.3 var(--f-mono);
  color: var(--faint);
}
.pic img {
  display: block;
  max-width: 200px;
  max-height: 10rem;
  object-fit: cover;
}
.pic.loading {
  animation: shimmer 1.2s infinite;
}
.pic.sm {
  width: 48px;
  height: 48px;
  min-width: 0;
  min-height: 0;
}
.pic.sm img {
  width: 48px;
  height: 48px;
}
.pic .x {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(7, 8, 12, 0.8);
  color: var(--paper);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom));
  background: rgba(7, 8, 12, 0.95);
  animation: fade .15s ease;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
}
.lb-x {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: 10px;
}

/* composer: rides on top of the keyboard (the frame follows visualViewport) */
.composer {
  border-top: 1px solid var(--rule);
  background: var(--ink);
  padding: 7px max(10px, env(safe-area-inset-right))
    max(8px, calc(env(safe-area-inset-bottom) - 14px)) max(10px, env(safe-area-inset-left));
}
:root[data-kb="up"] .app {
  top: var(--vv-top);
  bottom: auto;
  height: var(--vv-height);
}
:root[data-kb="up"] .composer {
  padding-bottom: 7px;
}
.tray {
  display: flex;
  gap: 6px;
  max-width: var(--col);
  margin: 0 auto 7px;
}
.comp-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: var(--col);
  margin: 0 auto;
}
.comp-row .icon-btn {
  width: 38px;
  height: 40px;
  color: var(--mute);
}
/* 16 px: anything smaller and iOS zooms the page when the field is focused */
.comp-row textarea {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 140px;
  resize: none;
  padding: 9px 13px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  font-size: 16px;
  line-height: 20px;
}
.comp-row textarea:focus {
  outline: none;
  border-color: var(--cyan);
}
.comp-row textarea::placeholder {
  color: var(--faint);
}
.send {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--amber);
  color: var(--ink);
  flex: none;
  transition: transform .12s var(--ease), background-color .2s;
}
.send:active {
  transform: scale(0.9);
}
.send.stop {
  background: var(--coral);
}

/* the controls sheet and the drawer */
.sheet-bg,
.drawer-bg {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(7, 8, 12, 0.62);
  animation: fade .18s ease;
}
.sheet-bg.leaving,
.drawer-bg.leaving {
  opacity: 0;
  transition: opacity .18s;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  animation: rise .22s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 700px) {
  .sheet {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 20px;
    border-bottom: 1px solid var(--rule-2);
    animation: fade .2s ease;
  }
}
.sheet-grip {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: var(--rule-2);
  margin: 7px auto 0;
  flex: none;
}
@media (min-width: 700px) {
  .sheet-grip {
    display: none;
  }
}
.sheet-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 0 16px;
  flex: none;
}
.sheet-t {
  font: 600 15px / 20px var(--f-display);
}
.sheet-body {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 14px 8px;
  overscroll-behavior: contain;
}
.sheet-sec {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.sheet-sec h3 {
  margin: 0 0 8px;
  font: 600 10.5px / 1 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
}
.opt-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}
.opt {
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--ink);
  transition: border-color .15s;
}
.opt.on {
  border-color: var(--amber);
  background: linear-gradient(0deg, rgba(255, 181, 71, 0.05), rgba(255, 181, 71, 0.05)), var(--ink);
}
.opt.off {
  opacity: 0.5;
  cursor: default;
}
.opt-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.opt-l {
  font: 600 13.5px / 19px var(--f-display);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opt-s {
  font-size: 12px;
  line-height: 17px;
  color: var(--mute);
}
.opt-later {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 17px;
  color: var(--faint);
}
.opt-later b {
  color: var(--mute);
  font-weight: 500;
}
.seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.seg-b {
  display: grid;
  gap: 1px;
  justify-items: center;
  padding: 8px 4px;
  border-radius: 11px;
  border: 1px solid var(--rule);
  background: var(--ink);
  font: 600 12.5px / 1.2 var(--f-body);
}
.seg-b small {
  font: 400 10.5px / 1.2 var(--f-body);
  color: var(--mute);
}
.seg-b.on {
  border-color: var(--amber);
  color: var(--amber);
}
.sheet-foot {
  padding: 12px 0 4px;
  display: flex;
  justify-content: center;
}
.drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(84vw, 340px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--rule-2);
  animation: slide .22s var(--ease);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.drawer-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px 8px 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 15px / 1 var(--f-display);
}
.brand img {
  width: 22px;
  height: 22px;
}
.drawer-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 5px;
  padding: 4px 8px;
}
.drawer-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--rule);
}

@media (min-width: 700px) {
  :root {
    --gut: 20px;
  }
  .bubble {
    max-width: 75%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.mini-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  background: var(--ink);
  flex: none;
}
.mini-seg-b {
  min-width: 44px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--mute);
  font: 600 12px / 1 var(--f-body);
}
.mini-seg-b.on {
  background: var(--surface-3);
  color: var(--paper);
}
.foot .sb-slot {
  padding: 0 10px 8px;
  background: var(--ink);
}
.foot .ask,
.foot .now {
  margin: 8px 0 0;
  box-shadow: 0 -8px 24px rgba(7, 8, 12, 0.7);
}
.ctl.set {
  border-color: rgba(139, 124, 255, 0.5);
  color: var(--violet);
}

.vp-probe {
  position: fixed;
  visibility: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
.vp-panel {
  position: fixed;
  left: 8px;
  right: 8px;
  top: 45%;
  z-index: 99;
  margin: 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(20, 25, 37, 0.95);
  border: 1px solid var(--amber);
  color: var(--amber);
  font: 500 12px / 18px var(--f-mono);
  white-space: pre-wrap;
  pointer-events: none;
}
.pair-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pair .code {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 12px;
  line-height: 18px;
}
