/* Nuvio Remit simulator. Visual design: "Voice stage concept v6" (Claude Design project
   "Simulator build complete"). Fonts: Geist / Geist Mono, SIL OFL 1.1 (fonts/OFL.txt). */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --ink: #f3f6f8;
  --ink2: rgba(236, 242, 247, 0.76);
  --ink3: rgba(236, 242, 247, 0.58);
  --line: rgba(255, 255, 255, 0.11);
  --glass: rgba(10, 12, 16, 0.58);
  --warn: #ffc56b;
  --bad: #ff8f8f;
  --ok: #8ff0c2;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --r-card: 20px;
}
body.blue {
  --cy: #6fd6ff;
  --kon: #a8e2ff;
  --nowbg: rgba(111, 214, 255, 0.16);
  --sel: rgba(111, 214, 255, 0.34);
  --base: #06080e;
}
body.mono {
  --cy: #ffffff;
  --kon: #ffffff;
  --nowbg: rgba(255, 255, 255, 0.14);
  --sel: rgba(255, 255, 255, 0.3);
  --base: #000;
}

/* ---------- base ---------- */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a {
  color: var(--cy);
}
a:hover {
  color: #fff;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
::selection {
  background: var(--sel);
  color: var(--ink);
}
input,
select {
  caret-color: var(--cy);
}
:root {
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
:focus-visible {
  outline: 2px solid var(--cy);
  outline-offset: 3px;
  border-radius: 8px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
#bg {
  width: 100%;
  height: 100%;
  filter: blur(28px) saturate(1.15);
  transform: scale(1.08);
}
body.mono #bg {
  filter: blur(28px) grayscale(1);
}
.shade {
  background:
    radial-gradient(42% 55% at 44% 38%, rgba(0, 0, 0, 0.6), transparent 80%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.6));
}
.grain {
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.disc,
.top,
.chrome,
.main,
.demobar {
  position: relative;
  z-index: 1;
}

/* ---------- banner + top bar ---------- */
.disc {
  flex: none;
  min-height: 30px;
  padding: 4px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink3);
  border-bottom: 1px solid var(--line);
}
.top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  /* The toolbar scrolls inside; on a phone its full width must not widen the page. */
  overflow-x: clip;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand canvas {
  width: 22px;
  height: 22px;
}
.ctrl {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.seg {
  display: flex;
  padding: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  flex: none;
}
.seg button {
  border: 0;
  background: transparent;
  height: 30px;
  padding: 0 13px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink2);
  white-space: nowrap;
}
.seg button[aria-pressed="true"] {
  background: #f3f6f8;
  color: #000;
}
.seg button:not([aria-pressed="true"]):hover {
  color: var(--ink);
}
.tb {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink2);
  white-space: nowrap;
  transition:
    color 0.2s,
    border-color 0.2s,
    background-color 0.2s;
}
.tb:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.3);
}
.tb svg {
  width: 14px;
  height: 14px;
  transition: transform 0.4s var(--ease);
}
.tb[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}
body.focus #hideBar svg {
  transform: rotate(180deg);
}

/* demo player */
.demobar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 28px 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}
.d-count {
  font: 600 12px var(--mono);
  color: var(--cy);
  white-space: nowrap;
}
.d-line {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

/* ---------- ledger strip ---------- */
.chrome {
  flex: none;
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows 0.55s var(--ease),
    opacity 0.4s;
}
.chrome > div {
  min-height: 0;
  overflow: hidden;
}
body.focus .chrome {
  grid-template-rows: 0fr;
  opacity: 0;
}
.ledger {
  display: flex;
  gap: 28px;
  padding: 0 28px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ledger div {
  display: grid;
  gap: 1px;
  white-space: nowrap;
  padding-left: 14px;
  position: relative;
}
.ledger div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cy);
}
.ledger div.warn::before {
  background: var(--warn);
}
.ledger small {
  font-size: 12px;
  color: var(--ink3);
  font-weight: 500;
}
.ledger b {
  font-size: 14.5px;
  font-weight: 550;
}
.ledger .sep {
  width: 1px;
  background: var(--line);
}

/* ---------- layout ---------- */
.main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  transition: grid-template-columns 0.55s var(--ease);
}
body.noproto .main {
  grid-template-columns: minmax(0, 1fr) 0px;
}
.convo {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 28px 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: none;
}
.log > * {
  width: min(720px, 100%);
  margin-inline: auto;
  flex-shrink: 0;
}
.you {
  display: flex;
  justify-content: flex-end;
}
.you p {
  margin: 0;
  max-width: 70%;
  padding: 10px 15px;
  border-radius: 18px 18px 5px 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.bot {
  color: var(--ink);
  font-size: 16px;
  margin-block: 0;
}
.bot.err {
  color: var(--warn);
}

/* ---------- cards ---------- */
.card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 22px 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 20px 50px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 14px;
}
.card p {
  margin: 0;
}

/* An MCP Apps view from the server (ui://nuvio-remit/transfer) in its sandboxed iframe. */
.card.appview {
  padding: 10px 8px 6px;
  gap: 2px;
}
.card.appview:not(.bordered) {
  border-color: transparent;
}
.appview-head {
  padding: 0 12px;
  font: 12px/1.4 var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink3);
}
.appframe {
  display: block;
  width: 100%;
  height: 120px;
  border: 0;
  /* Matches the view's dark theme, so its transparent page shows the glass card behind it. */
  color-scheme: dark;
  background: transparent;
  transition: height 0.2s var(--ease);
}
.eyebrow {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
}
.foot {
  font-size: 12.5px;
  color: var(--ink3);
}
.fig {
  font-weight: 300;
  letter-spacing: -0.035em;
  color: #fff;
  font-feature-settings: "tnum";
}
.fig.sm {
  font-size: 24px !important;
}
.mini {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.mini .fig {
  font-size: 36px;
}
.mini span:last-child {
  color: var(--ink2);
}
.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 18px;
  margin: 0;
}
.kv div {
  display: grid;
  gap: 1px;
}
.kv dt {
  font-size: 12px;
  color: var(--ink3);
}
.kv dd {
  margin: 0;
  font-weight: 550;
}
.rise {
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  filter: blur(8px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease),
    filter 0.6s var(--ease);
}
.rise.in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* consequential cards */
.consent {
  padding: 26px 28px;
  gap: 18px;
  border-color: rgba(255, 255, 255, 0.16);
}
.consent::before,
.receipt::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--cy) 35%,
    #fff 50%,
    var(--cy) 65%,
    transparent
  );
}
.consent.cancel::before {
  background: linear-gradient(
    90deg,
    transparent,
    var(--warn) 35%,
    #fff 50%,
    var(--warn) 65%,
    transparent
  );
}
.consent.cancel .c-tag {
  color: var(--warn);
}
.c-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.c-tag {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cy);
}
.c-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.ring {
  width: 22px;
  height: 22px;
}
.ring .arc {
  stroke: var(--cy);
}
.consent.expired,
.consent.settled {
  opacity: 0.6;
}
.consent.expired .c-tag {
  color: var(--ink3);
}
.say {
  margin: 0;
  font-size: 23px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.say .w {
  color: rgba(236, 242, 247, 0.5);
  transition:
    color 0.25s,
    background 0.25s;
}
.say .w.on {
  color: var(--ink);
}
.say .k {
  font-weight: 600;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  cursor: help;
}
.say .k.on {
  color: var(--kon);
}
body.mono .say .k.on {
  border-bottom: 1px solid #fff;
}
.say .w.now {
  background: var(--nowbg);
  box-shadow: 0 0 0 3px var(--nowbg);
  border-radius: 4px;
}
.acts {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.acts small {
  margin-left: auto;
  color: var(--ink3);
}
.guard {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--ink2);
}
.guard svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--cy);
}
.btn {
  height: 48px;
  padding: 0 24px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  white-space: nowrap;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    transform 0.15s var(--ease);
}
.btn:not(:disabled):hover {
  border-color: rgba(255, 255, 255, 0.3);
}
.btn:not(:disabled):active,
.tb:active,
.chip:active {
  transform: scale(0.97);
}
.btn.sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}
.btn.ghost {
  background: transparent;
}
.btn.yes {
  position: relative;
  overflow: hidden;
  background: #f3f6f8;
  border-color: #f3f6f8;
  color: #000;
  user-select: none;
  touch-action: none;
}
.btn.yes::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.btn.yes.holding::before {
  transform: scaleX(1);
  transition: transform 1.4s linear;
}
.btn.yes span {
  position: relative;
}

/* receipt / status */
.receipt {
  gap: 18px;
}
.r-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.r-head > div {
  min-width: 0;
}
.r-tick {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f3f6f8;
  color: #000;
  display: grid;
  place-items: center;
}
.r-tick svg {
  width: 18px;
  height: 18px;
}
.r-tick.x,
.r-tick.warn {
  background: transparent;
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 60%, transparent);
}
.r-tick.bell {
  background: transparent;
  color: var(--cy);
  border: 1px solid var(--line);
}
.r-head b {
  display: block;
  font-weight: 600;
}
.r-head small {
  color: var(--ink3);
}
.r-head .fig {
  margin-left: auto;
  font-size: 32px;
}
.steps {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  color: var(--ink3);
  flex-wrap: wrap;
}
.steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: color 0.4s;
}
.steps span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--ink3);
  transition:
    background 0.4s,
    border-color 0.4s;
}
.steps span.on {
  color: var(--ink);
}
.steps span.on::before {
  background: var(--cy);
  border-color: var(--cy);
}
.steps span.end {
  color: var(--warn);
}
.steps span.end::before {
  background: var(--warn);
  border-color: var(--warn);
}
.steps span.end-cancelled {
  color: var(--ink2);
}
.steps span.end-returned {
  color: var(--bad);
}
.steps span.end-returned::before {
  background: var(--bad);
  border-color: var(--bad);
}
.steps i {
  flex: 1;
  height: 1px;
  background: var(--line);
  min-width: 14px;
}
.r-cancel {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink2);
}
.r-cancel span {
  flex: 1;
}
.utr {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink3);
  flex-wrap: wrap;
}
.utr code {
  font: 600 13px var(--mono);
  color: var(--ink);
}
.icon {
  border: 1px solid var(--line);
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink2);
}
.icon svg {
  width: 14px;
  height: 14px;
}
.action {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 197, 107, 0.08);
  border: 1px solid rgba(255, 197, 107, 0.25);
}
.st-returned .action {
  background: rgba(255, 143, 143, 0.08);
  border-color: rgba(255, 143, 143, 0.25);
}
.st-cancelled .action,
.st-paid_out .action {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}
.action b {
  font-weight: 600;
}
.action span {
  color: var(--ink2);
}

/* compare, lists */
.opts,
.list,
.hist,
.warns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.opts li,
.list li,
.hist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.opts li:last-child,
.list li:last-child,
.hist li:last-child {
  border-bottom: 0;
}
.opts li > div,
.list li > div {
  flex: 1;
  min-width: 0;
  display: grid;
}
.opts small,
.list small {
  color: var(--ink3);
}
.opts .amt,
.bench .amt,
.hist .amt {
  margin-left: auto;
  font-weight: 300;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.opts li.off b,
.opts li.off .amt {
  color: var(--ink3);
}
.opts em,
.bench em {
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 1px 7px;
  margin-left: 6px;
}
.bench {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink2);
  font-size: 13px;
}
.av {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}
.list .last {
  margin-left: auto;
  white-space: nowrap;
}
.hist li {
  font-size: 14px;
}
.hist .d {
  width: 52px;
  color: var(--ink3);
}
.hist .amt {
  font-size: 15px;
  font-weight: 450;
}
.lbl {
  font-size: 12px;
  color: var(--ink3);
}
.lbl-on_hold {
  color: var(--warn);
}
.lbl-returned {
  color: var(--bad);
}
.picks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pick {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}
.pick:hover {
  border-color: rgba(255, 255, 255, 0.3);
}
.pick.picked {
  border-color: var(--cy);
  background: var(--nowbg);
}
.pick small {
  color: var(--ink3);
}
.warns li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--warn);
}
.warns svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.meters > div {
  display: grid;
  gap: 6px;
}
.meters span,
.meters small {
  font-size: 12px;
  color: var(--ink3);
}
.meter {
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--cy);
  border-radius: 4px;
}
.meter.low i {
  background: var(--warn);
}
.explain {
  color: var(--ink2);
}
.refusal {
  border-color: rgba(255, 197, 107, 0.28);
}
.resolution {
  font-size: 17px;
}
.note p:last-child {
  color: var(--ink2);
}

/* ---------- voice stage ---------- */
.veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  pointer-events: none;
}
.convo.big .veil {
  opacity: 1;
}
.stage {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  justify-items: center;
  padding: 70px 28px 20px;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--base) 88%, transparent) 25%,
    transparent
  );
  pointer-events: none;
  transition: padding 0.8s var(--ease);
}
.stage > * {
  pointer-events: auto;
}
.stage.big {
  padding-bottom: 14vh;
  background: transparent;
}
.orbwrap {
  position: relative;
  width: var(--orb, 132px);
  height: var(--orb, 132px);
  transition:
    width 0.8s var(--ease),
    height 0.8s var(--ease);
}
.stage.big .orbwrap {
  --orb: 300px;
}
.orbwrap canvas {
  position: absolute;
  inset: -45%;
  width: 190%;
  height: 190%;
  pointer-events: none;
}
.orbbtn {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 0;
  background: transparent;
  touch-action: none;
}
.hring {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  transform: rotate(-90deg);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.hring circle {
  fill: none;
  stroke: var(--cy);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.3s;
}
.orbwrap.hold .hring {
  opacity: 1;
}
.orbwrap.hold .hring circle {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 15s linear;
}
.caption {
  width: 100%;
  margin: 6px 0 0;
  min-height: 2.9em;
  max-width: 720px;
  text-align: center;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-shadow: 0 2px 20px #000;
  transition: font-size 0.6s var(--ease);
}
.stage.big .caption {
  font-size: 28px;
}
.caption .who {
  display: block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 2px;
}
.caption .dim,
.caption .interim {
  color: var(--ink3);
}
.caption .interim {
  filter: blur(0.4px);
}
.chipwrap {
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows 0.5s var(--ease),
    opacity 0.4s;
  width: min(720px, 100%);
}
.chipwrap.off {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}
.chips {
  min-height: 0;
  overflow: hidden;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.chip {
  height: 34px;
  padding: 0 14px;
  margin: 6px 0 2px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  font-size: 13px;
  color: var(--ink2);
  transition:
    color 0.2s,
    border-color 0.2s;
}
.chip:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.3);
}
.bar {
  position: relative;
  width: min(720px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 6px 6px 6px 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}
.bar:focus-within {
  border-color: var(--cy);
  box-shadow: 0 0 0 3px var(--nowbg);
}
.bar input {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: inherit;
}
.bar input::placeholder {
  color: var(--ink3);
}
.bar kbd {
  font: 500 12px var(--mono);
  color: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}
.bar .mic {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #f3f6f8;
  color: #000;
  display: grid;
  place-items: center;
  touch-action: none;
}
.bar .mic svg {
  width: 18px;
  height: 18px;
}
body.busy .bar .mic {
  opacity: 0.6;
}

/* ---------- protocol panel ---------- */
.proto {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2));
  backdrop-filter: blur(12px);
  border-left: 1px solid var(--line);
  scrollbar-width: none;
  padding: 18px 20px;
  font: 12px/1.5 var(--mono);
  color: var(--ink2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  transition:
    opacity 0.35s,
    padding 0.55s var(--ease);
}
body.noproto .proto {
  opacity: 0;
  padding-inline: 0;
  border-left-color: transparent;
  pointer-events: none;
}
.proto h3 {
  margin: 0;
  font: 600 14px var(--sans);
  color: var(--ink);
  display: flex;
  gap: 8px;
  align-items: center;
}
.proto h3 i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cy);
}
.proto.down h3 i {
  background: var(--bad);
}
.p-meta {
  margin: 0 0 6px;
}
.p-feed {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.p-turn {
  margin: 10px 0 2px;
  font: 600 12px var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  display: flex;
  justify-content: space-between;
}
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 8px;
  padding: 8px 10px;
  margin-inline: -10px;
  border-radius: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.35s,
    transform 0.35s,
    background 0.3s,
    box-shadow 0.3s;
}
.row.in {
  opacity: 1;
  transform: none;
}
.row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.row.hl {
  background: var(--nowbg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cy) 50%, transparent);
}
.row b {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row .d {
  grid-column: 1 / -1;
  color: var(--ink3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row .m {
  color: var(--cy);
  font-weight: 600;
}
.row .rf {
  color: var(--warn);
  font-weight: 600;
}
.row .bl {
  color: var(--ok);
  font-weight: 600;
}
.row pre {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink2);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 320px;
  overflow: auto;
  font-size: 11px;
}

/* ---------- toasts, gate, dev drawer ---------- */
.toasts {
  position: fixed;
  top: 104px;
  right: 24px;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}
.toast {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(16, 20, 28, 0.86);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.toast svg {
  width: 18px;
  height: 18px;
  color: var(--cy);
  flex: none;
}
.toast small {
  display: block;
  color: var(--ink3);
}
.gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
}
.gate-card {
  width: min(420px, calc(100vw - 32px));
  gap: 16px;
}
.gate-card h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.gate-card p {
  color: var(--ink2);
}
.gate-card .err {
  color: var(--warn);
}
.field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--ink3);
}
.field input {
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font: inherit;
  outline: 0;
}
.field input:focus {
  border-color: var(--cy);
  box-shadow: 0 0 0 3px var(--nowbg);
}
.devdrawer {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 25;
  width: 300px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(12, 14, 20, 0.9);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.dev-head {
  justify-self: start;
  min-height: 32px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
}
.devdrawer.min {
  width: auto;
  padding: 10px 14px;
}
.devdrawer.min > :not(.dev-head) {
  display: none;
}
.dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dev-grid .btn {
  padding: 0 8px;
}
.devdrawer .seg button {
  padding: 0 9px;
}
.devdrawer .seg {
  justify-self: start;
}
.dev-out {
  margin: 0;
  overflow-wrap: anywhere;
  max-height: 6em;
  overflow: auto;
  font: 11px var(--mono);
  color: var(--ink3);
  min-height: 1em;
}

/* ---------- responsive / motion ---------- */
@media (max-width: 1100px) {
  .main {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .proto {
    display: none;
  }
  .stage.big .orbwrap {
    --orb: 220px;
  }
  .stage.big .caption {
    font-size: 22px;
  }
  .bar kbd {
    display: none;
  }
}
@media (max-width: 640px) {
  .top {
    padding: 12px 16px;
  }
  .ledger {
    padding: 0 16px 12px;
    gap: 18px;
  }
  .log {
    padding: 12px 16px 320px;
  }
  .stage {
    padding: 60px 16px 16px;
  }
  .say {
    font-size: 19px;
  }
  .meters {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
  .demobar {
    margin: 0 16px 10px;
  }
  .ctrl,
  .ledger {
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  }
  .toasts {
    right: 16px;
    top: 88px;
  }
}
@media (max-height: 820px) {
  .stage.big .orbwrap {
    --orb: 210px;
  }
  .orbwrap {
    --orb: 104px;
  }
  .log {
    padding-bottom: 300px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
  .rise {
    filter: none;
    transform: none;
  }
}

/* tap to talk: a steady ring that breathes until the pause ends the turn */
.orbwrap.tap .hring {
  opacity: 1;
  animation: tapring 1.6s ease-in-out infinite;
}
.orbwrap.tap .hring circle {
  stroke-dashoffset: 0;
  transition: none;
}
@keyframes tapring {
  50% {
    opacity: 0.45;
  }
}

/* voice picker */
.tb.sel {
  padding: 0 6px 0 12px;
}
.tb.sel:has(select:focus-visible) {
  outline: 2px solid var(--cy);
  outline-offset: 3px;
}
.tb.sel select {
  max-width: 190px;
  height: 34px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: 0;
  /* A dark native popup: otherwise Windows Chrome shows a white margin around the dark options,
     since it often sizes the popup larger than the list (more so at page zoom above 100%). */
  color-scheme: dark;
}
.tb.sel select option,
.tb.sel select optgroup {
  background: #10141c;
  color: #f3f6f8;
}

/* help answers */
.points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: var(--ink2);
  font-size: 14px;
}

/* scripted mode: why free text is limited, flashed when a line falls outside the script */
.mode-note {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 6px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--warn);
  background: rgba(255, 197, 107, 0.08);
  border-bottom: 1px solid rgba(255, 197, 107, 0.25);
}
.mode-note.flash {
  animation: noteflash 1.2s ease-out;
}
@keyframes noteflash {
  0% {
    background: rgba(255, 197, 107, 0.35);
  }
}

/* Touch screens: 44px targets. Last in the file so it wins over each control's base size. */
@media (pointer: coarse) {
  .tb,
  .chip,
  .btn.sm {
    height: 44px;
  }
  .seg button {
    height: 38px;
  }
  .tb.sel select {
    height: 42px;
  }
  .bar .mic {
    width: 44px;
    height: 44px;
  }
}
