:root {
  color-scheme: light;
  --bg: #f4f1e8;
  --paper: #fffdf7;
  --ink: #171717;
  --muted: #66645d;
  --line: #d9d2c4;
  --green: #138a55;
  --green-dark: #0d5e3e;
  --amber: #c07816;
  --red: #b43b3b;
  --blue: #365d8d;
  --shadow: 0 16px 44px rgba(24, 22, 18, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.74), rgba(244, 241, 232, 0.96)),
    repeating-linear-gradient(90deg, rgba(23, 23, 23, 0.035) 0 1px, transparent 1px 76px);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.site-disclaimer {
  width: min(1180px, calc(100% - 32px));
  margin: 12px auto -8px;
  padding: 8px 12px;
  border: 1px solid rgba(192, 120, 22, 0.28);
  border-radius: 6px;
  background: rgba(255, 253, 247, 0.72);
  color: #5f574b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.site-disclaimer strong {
  color: #8a520d;
  letter-spacing: 0.02em;
}

.site-disclaimer a {
  color: #365d8d;
  font-weight: 850;
  text-decoration: none;
}

.site-disclaimer a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.primary {
  background: var(--green);
  color: white;
  box-shadow: 0 8px 18px rgba(19, 138, 85, 0.18);
}

.primary:hover {
  background: var(--green-dark);
}

.wallet-disconnect {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: #d9cfc0;
  background: #fffdf7;
  color: #685d50;
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  box-shadow: none;
}

.wallet-disconnect:hover {
  border-color: #c65c4a;
  background: #fff2ed;
  color: #a23e2e;
}

.secondary {
  background: #1c1b18;
  color: white;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.top-actions,
.button-row,
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ebe4d6;
}

.tab-button {
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tab-button.active {
  background: #171717;
  color: #fffdf7;
  box-shadow: 0 8px 18px rgba(23, 23, 23, 0.12);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 36px;
  display: grid;
  gap: 14px;
}

.tab-page {
  display: grid;
  gap: 14px;
}

.tab-page[hidden] {
  display: none;
}

.panel {
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.public-coming-soon {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.public-coming-soon h2 {
  margin: 0;
  font-size: 28px;
}

.public-coming-soon p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.hero-panel {
  padding: 14px 18px;
}

.floor-hero {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #2c3034;
  border-radius: 8px;
  background: #171b1f;
  box-shadow: var(--shadow);
}

.floor-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 81vh;
  aspect-ratio: 3 / 2;
  background: #171b1f;
}

.floor-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.floor-agent {
  --agent-size: 105px;
  --agent-scale: 1;
  --agent-face: 1;
  position: absolute;
  left: calc(var(--agent-x, 50) * 1%);
  top: calc(var(--agent-y, 80) * 1%);
  z-index: 2;
  width: var(--agent-size);
  height: var(--agent-size);
  pointer-events: none;
  transform: translate(-50%, -100%) scale(var(--agent-scale)) scaleX(var(--agent-face));
  transform-origin: 50% 100%;
  image-rendering: pixelated;
}

.floor-agent[hidden] {
  display: none;
}

.floor-agent-nameplate {
  position: absolute;
  left: 50%;
  top: -12px;
  z-index: 5;
  max-width: 170px;
  color: #ffb24a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  white-space: pre-line;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-text-stroke: 2px #252a2d;
  paint-order: stroke fill;
  text-shadow:
    2px 0 0 #252a2d,
    -2px 0 0 #252a2d,
    0 2px 0 #252a2d,
    0 -2px 0 #252a2d,
    0 0 5px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -100%) scaleX(var(--agent-face));
  transform-origin: 50% 100%;
  image-rendering: pixelated;
}

.floor-agent-bubble {
  position: absolute;
  left: 50%;
  top: -8px;
  z-index: 4;
  max-width: 180px;
  min-width: 92px;
  padding: 8px 10px;
  border: 2px solid #1b2024;
  border-radius: 7px;
  background: #fffdf5;
  color: #101418;
  box-shadow:
    2px 2px 0 rgba(0, 0, 0, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  transform: translate(-50%, -100%) scaleX(var(--agent-face));
  transform-origin: 50% 100%;
  animation: broker-bubble-pop 180ms steps(2) both;
  image-rendering: pixelated;
}

.floor-agent-bubble[hidden] {
  display: none;
}

.floor-broker-walker .floor-agent-bubble {
  top: -34px;
  z-index: 6;
}

.floor-agent-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #1b2024;
  border-bottom: 2px solid #1b2024;
  background: #fffdf5;
  transform: translateX(-50%) rotate(45deg);
}

.floor-agent.is-speaking .floor-agent-sprite {
  filter:
    drop-shadow(1px 0 0 rgba(255, 255, 255, 0.95))
    drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 -3px 0 rgba(255, 253, 245, 0.32))
    drop-shadow(2px 2px 0 rgba(20, 24, 28, 0.18));
}

@keyframes broker-bubble-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -88%) scaleX(var(--agent-face)) scale(0.86);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -100%) scaleX(var(--agent-face)) scale(1);
  }
}

.floor-agent-shadow {
  position: absolute;
  left: 32%;
  right: 32%;
  bottom: 10px;
  height: 9px;
  border-radius: 50%;
  background: rgba(39, 31, 24, 0.26);
  filter: blur(1px);
}

.floor-agent-sprite {
  position: absolute;
  inset: 0;
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: calc(var(--agent-size) * 4) var(--agent-size);
  filter:
    drop-shadow(1px 0 0 rgba(255, 255, 255, 0.95))
    drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.95))
    drop-shadow(2px 2px 0 rgba(20, 24, 28, 0.18));
  image-rendering: pixelated;
}

.floor-broker-walker.is-owned .floor-agent-sprite {
  filter:
    drop-shadow(1px 0 0 rgba(255, 141, 34, 0.98))
    drop-shadow(-1px 0 0 rgba(255, 141, 34, 0.98))
    drop-shadow(0 1px 0 rgba(255, 141, 34, 0.98))
    drop-shadow(0 -1px 0 rgba(255, 141, 34, 0.98))
    drop-shadow(2px 2px 0 rgba(20, 24, 28, 0.18));
}

.floor-agent.is-idle .floor-agent-sprite {
  background-image: url("/assets/rainbow-broker-idle-transparent.png");
  animation: broker-idle 1040ms steps(4) infinite;
}

.floor-agent.is-walk .floor-agent-sprite {
  background-image: url("/assets/rainbow-broker-walk-transparent.png");
  background-size: calc(var(--agent-size) * 3) var(--agent-size);
  animation: broker-walk 420ms steps(3) infinite;
}

.floor-agent.has-sprite-sheet.is-idle .floor-agent-sprite {
  background-image: var(--broker-sheet-url);
  background-size: calc(var(--agent-size) * 4) calc(var(--agent-size) * 2);
  animation: broker-sheet-idle 1040ms steps(4) infinite;
}

.floor-agent.has-sprite-sheet.is-walk .floor-agent-sprite {
  background-image: var(--broker-sheet-url);
  background-size: calc(var(--agent-size) * 4) calc(var(--agent-size) * 2);
  animation: broker-sheet-walk 420ms steps(3) infinite;
}

@keyframes broker-idle {
  to {
    background-position-x: calc(var(--agent-size) * -4);
  }
}

@keyframes broker-walk {
  to {
    background-position-x: calc(var(--agent-size) * -3);
  }
}

@keyframes broker-sheet-idle {
  from {
    background-position: 0 0;
  }
  to {
    background-position: calc(var(--agent-size) * -4) 0;
  }
}

@keyframes broker-sheet-walk {
  from {
    background-position: 0 100%;
  }
  to {
    background-position: calc(var(--agent-size) * -3) 100%;
  }
}

.floor-brain-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: 18px;
  min-height: 520px;
  padding: 20px;
  border: 1px solid #242b2f;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(14, 18, 20, 0.98), rgba(31, 36, 39, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 60px);
  box-shadow: var(--shadow);
}

.floor-agent-controls {
  display: grid;
  gap: 14px;
  margin: 14px auto -4px;
  padding: 10px 14px;
  width: min(100%, 860px);
  border: 1px solid #2e393d;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(16, 22, 24, 0.96), rgba(6, 9, 10, 0.98)),
    #0d1112;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.floor-broker-clock-roster {
  grid-template-columns: 1fr;
  --clock-roster-window-height: 313px;
  align-content: start;
  max-height: var(--clock-roster-window-height);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #56646a #0b1012;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.floor-broker-clock-roster::-webkit-scrollbar {
  width: 10px;
}

.floor-broker-clock-roster::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #0b1012;
}

.floor-broker-clock-roster::-webkit-scrollbar-thumb {
  border: 2px solid #0b1012;
  border-radius: 999px;
  background: #56646a;
}

.clock-roster-head {
  position: sticky;
  top: -10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: -10px -14px 0;
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(72, 86, 91, 0.68);
  border-radius: 8px 8px 0 0;
  background:
    linear-gradient(180deg, rgba(11, 16, 18, 1), rgba(11, 16, 18, 0.98)),
    #0b1012;
  color: #f4f1e8;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.24);
}

.clock-roster-head strong {
  min-width: 0;
  color: #d8f3ea;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.clock-roster-head span {
  flex: 0 0 auto;
  color: #8fa0a5;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 900;
}

.clock-roster-cards {
  display: grid;
  gap: 14px;
}

.clock-broker-card,
.clock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock-broker-card {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 4px;
  border-radius: 7px;
  color: #f4f1e8;
}

.clock-broker-card.active {
  background: rgba(228, 180, 48, 0.08);
}

.clock-broker-card.configured {
  box-shadow: inset 3px 0 0 rgba(71, 201, 119, 0.8);
}

.clock-broker-card.trade-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.92fr) minmax(280px, 1.25fr) minmax(190px, 0.78fr);
  align-items: stretch;
  gap: 18px;
  width: 100%;
  padding: 9px 14px;
  border: 1px solid rgba(65, 76, 81, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 27, 28, 0.96), rgba(22, 29, 20, 0.94)),
    #111718;
  box-shadow: inset 4px 0 0 rgba(255, 185, 57, 0.12);
}

.clock-broker-card.trade-card.needs-setup {
  box-shadow: inset 4px 0 0 rgba(255, 144, 127, 0.35);
}

.clock-broker-card.trade-card.is-ready,
.clock-broker-card.trade-card.is-trading {
  box-shadow: inset 4px 0 0 rgba(83, 208, 128, 0.42);
}

.clock-broker-card.trade-card.is-paused {
  box-shadow: inset 4px 0 0 rgba(255, 185, 57, 0.45);
}

.trade-card-left,
.trade-card-right,
.trade-card-state-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trade-card-left {
  align-content: flex-start;
  flex-wrap: wrap;
  min-width: 0;
}

.trade-card-center {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.trade-card-right {
  align-items: flex-end;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.trade-card-state-row {
  justify-content: flex-end;
  width: 100%;
}

.trade-card-title {
  color: #d8f3ea;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.needs-setup .trade-card-title {
  color: #ffb2ad;
}

.broker-card-balances {
  flex: 1 0 100%;
  display: grid;
  gap: 0;
  padding-left: 2px;
  color: #e8f3e8;
  font-weight: 900;
  font-size: 15.5px;
  line-height: 1.08;
}

.broker-card-balances strong,
.broker-card-balances span {
  white-space: nowrap;
}

.broker-card-balances strong {
  color: #53d080;
}

.broker-card-balances span {
  color: #cbded3;
  font-size: 12px;
  line-height: 1.15;
}

.broker-setup-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  width: 100%;
}

.broker-setup-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 29px;
  border-radius: 7px;
  color: #f7f2e8;
  font-weight: 900;
  letter-spacing: 0;
  font-size: 12px;
}

.broker-setup-step.needs-action {
  padding: 0 10px 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(4, 6, 7, 0.72);
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.2);
}

.broker-setup-step.needs-action:hover {
  background: rgba(255, 255, 255, 0.1);
}

.broker-setup-step.needs-action.auth-needed {
  color: #bde7ff;
}

.broker-setup-step.is-done {
  padding: 0 9px 0 6px;
  border: 1px solid rgba(83, 208, 128, 0.48);
  background: rgba(26, 119, 72, 0.18);
  color: #c7f6d6;
}

.setup-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  color: #d8f3ea;
  font-size: 16px;
  font-weight: 900;
}

.broker-setup-step.is-done .setup-step-index {
  color: #53d080;
  font-size: 16px;
}

.clock-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid #58636a;
  border-radius: 999px;
  color: #f4f1e8;
  font-weight: 900;
  text-align: center;
}

.clock-state-pill.is-clocked-in,
.clock-state-pill.is-ready {
  border-color: rgba(83, 208, 128, 0.45);
  background: rgba(20, 117, 64, 0.22);
  color: #d4f8df;
}

.clock-state-pill.is-paused {
  border-color: rgba(255, 185, 57, 0.7);
  background: rgba(152, 99, 15, 0.22);
  color: #ffe3a8;
}

.clock-state-pill.is-waiting {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.9);
  color: #303334;
}

.broker-auth-count {
  min-width: 78px;
  min-height: 28px;
  padding: 0 10px;
  border-color: rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
}

.animate-broker-btn {
  align-self: center;
  margin-top: 8px;
  min-height: 30px;
  border-color: rgba(250, 213, 92, 0.72);
  background: rgba(250, 213, 92, 0.12);
  color: #ffe98f;
  font-size: 11px;
}

.sprite-card-attention {
  outline: 2px solid rgba(250, 213, 92, 0.9);
  outline-offset: 3px;
}

.clock-broker-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  border: 1px solid #465257;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(47, 58, 63, 0.9), rgba(13, 17, 18, 0.92)),
    #151b1d;
  color: #9bd36b;
  font-size: 18px;
  font-weight: 900;
}

.clock-broker-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.clock-broker-id {
  display: block;
  color: #fffdf7;
  font-size: 14px;
  line-height: 1.05;
}

.clock-broker-main {
  min-width: 150px;
  flex: 1 1 180px;
}

.clock-broker-main small {
  display: block;
  margin-top: 3px;
  color: #8fa0a5;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

.clock-wallet-line,
.broker-wallet-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.clock-copy-btn,
.broker-copy-btn {
  min-height: 22px;
  padding: 3px 6px;
  border-color: #aab4aa;
  background: rgba(255, 255, 255, 0.82);
  color: #263126;
  font-size: 10px;
  line-height: 1;
}

.clock-separator {
  flex: 0 0 auto;
  color: #58636a;
  font-weight: 900;
}

.clock-button,
.clock-stop {
  min-width: 88px;
  min-height: 38px;
}

.floor-agent-controls .fund-usdg {
  border-color: rgba(241, 199, 120, 0.5);
  color: #ffe1a0;
}

.floor-agent-controls .deploy-executor {
  border-color: rgba(255, 119, 95, 0.55);
  color: #ffb3a6;
}

.floor-agent-controls .executor-ready {
  border-color: rgba(83, 208, 128, 0.45);
  color: #bdf4cf;
}

.floor-agent-controls .clock-stop {
  color: #f4f1e8;
  border-color: #58636a;
  background: rgba(255, 255, 255, 0.06);
}

.floor-agent-controls .clock-stop:hover {
  background: rgba(255, 255, 255, 0.12);
}

.floor-agent-controls .clock-stop:disabled {
  color: #758087;
  border-color: #344046;
  background: rgba(255, 255, 255, 0.03);
}

.clock-broker-card.needs-auth {
  background: rgba(151, 55, 42, 0.08);
}

.auth-needed {
  border-color: #a77822;
  background: #ffc93d;
  color: #161106;
  box-shadow: 0 8px 18px rgba(255, 201, 61, 0.16);
}

.auth-needed:hover {
  background: #ffd969;
}

.broker-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 92px;
  min-height: 38px;
  padding: 0 12px 0 40px;
  border-color: #58636a;
  background: rgba(255, 255, 255, 0.06);
  color: #cfd8d2;
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

.broker-activation-btn.broker-toggle {
  display: inline-flex;
  width: 100%;
}

.clock-mini-toggle {
  min-width: 78px;
  min-height: 34px;
}

.broker-toggle::before {
  content: "";
  position: absolute;
  left: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7b858a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.broker-toggle.is-on {
  justify-content: flex-end;
  padding: 0 40px 0 12px;
  border-color: #2b7048;
  background: rgba(26, 119, 72, 0.18);
  color: #c7f6d6;
}

.broker-toggle.is-on::before {
  left: auto;
  right: 10px;
  background: #53d080;
  box-shadow: 0 0 10px rgba(83, 208, 128, 0.4);
}

.clock-state-button {
  min-width: 116px;
  min-height: 38px;
  border-color: #596369;
  background: rgba(255, 255, 255, 0.06);
  color: #cfd8d2;
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
}

.clock-state-button.is-clocked-in {
  border-color: #2b7048;
  background: #138a55;
  color: #fffdf7;
  box-shadow: 0 8px 18px rgba(19, 138, 85, 0.2);
}

.clock-state-button.is-clocked-out {
  border-color: #596369;
  background: #20282c;
  color: #c5ced1;
}

.clock-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #3d484d;
  border-radius: 999px;
  color: #cfd8d2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.clock-empty {
  color: #9aa6aa;
  font-weight: 800;
  text-align: center;
}

.clock-empty.thinking {
  color: #c7d4d8;
}

.thinking-dots::after {
  content: "...";
  display: inline-block;
  min-width: 3ch;
  text-align: left;
  animation: thinkingDots 1.15s steps(1, end) infinite;
}

@keyframes thinkingDots {
  0%,
  50%,
  100% {
    content: "...";
  }

  25%,
  75% {
    content: "..";
  }
}

.clock-status.good {
  color: #c7f6d6;
  border-color: #2b7048;
  background: rgba(26, 119, 72, 0.18);
}

.clock-status.warn {
  color: #f1c778;
  border-color: #756337;
  background: rgba(148, 105, 30, 0.16);
}

.clock-status.bad {
  color: #ffb0a3;
  border-color: #7f4036;
  background: rgba(151, 55, 42, 0.16);
}

.clock-status.muted {
  color: #9aa6aa;
}

@media (max-width: 680px) {
  .floor-agent-controls {
    align-items: stretch;
  }

  .clock-broker-card.trade-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .clock-broker-card {
    justify-content: flex-start;
  }

  .trade-card-center {
    justify-items: start;
  }

  .trade-card-title {
    text-align: left;
    font-size: 22px;
  }

  .trade-card-right {
    align-items: stretch;
  }

  .trade-card-state-row,
  .broker-setup-steps {
    justify-content: flex-start;
  }

  .clock-actions button {
    flex: 1;
  }
}

.portfolio-monitor {
  width: min(100%, 650px);
  justify-self: stretch;
}

.portfolio-monitor.is-refreshing .monitor-bezel {
  animation: monitor-flash 1.2s ease-out;
}

@keyframes monitor-flash {
  0% {
    box-shadow:
      0 0 0 2px rgba(155, 211, 107, 0.95),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 22px 46px rgba(0, 0, 0, 0.3);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(155, 211, 107, 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 22px 46px rgba(0, 0, 0, 0.3);
  }
}

.monitor-bezel {
  padding: 14px;
  border: 1px solid #3c464b;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #212930, #080b0e),
    #11161a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 46px rgba(0, 0, 0, 0.3);
}

.monitor-top,
.monitor-positions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monitor-top {
  margin-bottom: 12px;
  color: #f4f1e8;
}

.monitor-top h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.monitor-top .eyebrow {
  color: #9ea9a0;
}

.monitor-top > strong {
  min-width: 72px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #3d4b43;
  border-radius: 5px;
  background: #0b110d;
  color: #9bd36b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.broker-portfolio-filter {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.broker-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.broker-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.text-button {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--green);
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-button:hover {
  background: transparent;
  color: var(--green-dark);
  transform: none;
}

.broker-filter-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.broker-filter-row {
  display: inline-grid;
  grid-template-columns: 16px auto minmax(0, auto);
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: 12px;
  text-align: left;
}

.broker-filter-row:hover {
  background: transparent;
  color: var(--green-dark);
  transform: none;
}

.broker-filter-row small {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.broker-filter-check {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid #bfcbb8;
  border-radius: 3px;
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.broker-filter-row.selected .broker-filter-check {
  border-color: var(--green);
  background: #dff3d8;
}

.broker-filter-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.floor-filter .broker-filter-head,
.floor-filter .broker-filter-row small,
.floor-filter .broker-filter-empty {
  color: #9ea9a0;
}

.floor-filter .broker-filter-row {
  color: #edf7e8;
}

.floor-filter .broker-filter-row:hover,
.floor-filter .text-button {
  color: #9bd36b;
}

.floor-filter .broker-filter-check {
  border-color: #3d4b43;
  background: #0b110d;
}

.floor-filter .broker-filter-row.selected .broker-filter-check {
  border-color: #5ea862;
  background: #183a20;
}

.pixel-chart {
  position: relative;
  overflow: hidden;
  height: 230px;
  display: flex;
  align-items: stretch;
  gap: 5px;
  padding: 14px 12px 12px;
  border: 1px solid #2e3d32;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(11, 20, 13, 0.95), rgba(4, 8, 6, 0.97)),
    repeating-linear-gradient(0deg, rgba(146, 196, 124, 0.08) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(146, 196, 124, 0.08) 0 1px, transparent 1px 28px);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.45);
}

.pixel-bar {
  position: relative;
  z-index: 1;
  align-self: end;
  flex: 1;
  min-width: 8px;
  border: 1px solid rgba(0, 0, 0, 0.36);
  border-radius: 2px 2px 0 0;
  image-rendering: pixelated;
}

.pixel-bar.up {
  background:
    linear-gradient(180deg, #b6ec77 0 18%, #47a858 18% 64%, #1c5f3c 64%),
    #47a858;
  box-shadow: 0 0 9px rgba(80, 206, 105, 0.28);
}

.pixel-bar.down {
  background:
    linear-gradient(180deg, #f49a78 0 18%, #d64f3f 18% 64%, #70251f 64%),
    #d64f3f;
  box-shadow: 0 0 9px rgba(214, 79, 63, 0.22);
}

.pixel-bar.idle {
  background:
    linear-gradient(180deg, #556268 0 18%, #303a3f 18% 64%, #151b1f 64%),
    #303a3f;
}

.pixel-candle {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 9px;
  height: 100%;
  image-rendering: pixelated;
}

.candle-wick,
.candle-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(0, 0, 0, 0.42);
}

.candle-wick {
  width: 3px;
}

.candle-body {
  width: min(14px, 76%);
  min-height: 4px;
}

.pixel-candle.up .candle-wick,
.pixel-candle.up .candle-body {
  background: #54c765;
  box-shadow: 0 0 8px rgba(84, 199, 101, 0.24);
}

.pixel-candle.down .candle-wick,
.pixel-candle.down .candle-body {
  background: #d95847;
  box-shadow: 0 0 8px rgba(217, 88, 71, 0.2);
}

.pixel-candle.idle .candle-wick,
.pixel-candle.idle .candle-body {
  background: #6c787d;
}

.pixel-zero-line {
  position: absolute;
  z-index: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  background: rgba(207, 216, 210, 0.22);
}

.monitor-positions-head {
  margin: 14px 0 8px;
  color: #cfd8d2;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.monitor-positions-head span:last-child {
  color: #9bd36b;
  text-transform: none;
  overflow-wrap: anywhere;
}

.floor-position-list {
  display: grid;
  gap: 7px;
}

.floor-position {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #2e3d32;
  border-left-width: 4px;
  border-radius: 5px;
  background: rgba(9, 16, 11, 0.9);
  color: #edf7e8;
  overflow: hidden;
}

.floor-position.up {
  border-left-color: #54c765;
}

.floor-position.down {
  border-left-color: #d95847;
}

.floor-position.idle {
  border-left-color: #556268;
}

.floor-position span,
.floor-position small,
.floor-position strong {
  display: block;
  min-width: 0;
}

.floor-position span strong {
  font-size: 14px;
}

.floor-position small {
  margin-top: 2px;
  color: #8fa28f;
  font-size: 11px;
  text-transform: uppercase;
}

.floor-position > strong {
  color: #f4f1e8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.floor-position.has-diff {
  box-shadow: inset 0 0 0 1px rgba(244, 241, 232, 0.08);
}

.position-diff-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  max-width: min(76%, 390px);
  padding: 7px 9px;
  border-radius: 4px;
  color: #f4f1e8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
  transform: translateX(120%);
  animation: position-diff-slide 5s ease both;
  pointer-events: none;
  overflow-wrap: anywhere;
  z-index: 2;
}

.position-diff-badge.buy {
  border: 1px solid rgba(84, 199, 101, 0.95);
  background: rgba(18, 59, 31, 0.98);
  box-shadow: 0 0 18px rgba(84, 199, 101, 0.2);
}

.position-diff-badge.sell {
  border: 1px solid rgba(230, 91, 69, 0.95);
  background: rgba(70, 21, 17, 0.98);
  box-shadow: 0 0 18px rgba(217, 88, 71, 0.2);
}

.position-diff-badge.distribution {
  border: 1px solid rgba(255, 218, 79, 0.96);
  background: rgba(102, 78, 10, 0.98);
  color: #fff7bc;
  box-shadow: 0 0 18px rgba(255, 218, 79, 0.22);
}

@keyframes position-diff-slide {
  0% {
    opacity: 0;
    transform: translateX(120%);
  }
  12%,
  78% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(120%);
  }
}

.empty-monitor-row {
  border-left-color: #556268;
  color: #a8b0aa;
}

.floor-position.is-loading > strong,
.floor-tx-row.is-loading > strong,
.floor-drop-row.is-loading > strong {
  animation: loading-pulse 1.1s ease-in-out infinite;
}

@keyframes loading-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.monitor-stand {
  width: 34%;
  height: 28px;
  margin: 0 auto;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #171d20, #0b0e10);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.floor-transaction-tape {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #2f393d;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 23, 25, 0.96), rgba(7, 10, 11, 0.98)),
    #0d1112;
  box-shadow: var(--shadow);
}

.floor-tape-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #f4f1e8;
}

.floor-tape-head h2 {
  margin: 0;
  font-size: 20px;
}

.floor-tape-head .eyebrow {
  color: #9ea9a0;
}

.floor-tx-list {
  display: grid;
  gap: 8px;
}

.floor-tx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid #263336;
  border-left: 4px solid #54c765;
  border-radius: 6px;
  background: #111819;
  color: #dfe9df;
}

.floor-tx-row.has-broker {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.floor-tx-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border: 1px solid #405057;
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(47, 58, 63, 0.9), rgba(13, 17, 18, 0.92)),
    #151b1d;
  color: #9bd36b;
  font-size: 10px;
  font-weight: 900;
}

.floor-tx-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.floor-tx-avatar-fallback {
  display: block;
  overflow-wrap: anywhere;
  text-align: center;
}

.floor-tx-row.executing {
  border-left-color: #f1c778;
  background: #171a15;
}

.floor-tx-row.pending {
  border-left-color: #f1c778;
  background: #171a15;
}

.floor-tx-row.failed {
  border-left-color: #ff775f;
  background: #1a1212;
}

.floor-tx-row span,
.floor-tx-row strong,
.floor-tx-row small {
  display: block;
  min-width: 0;
}

.floor-tx-row small {
  margin-top: 3px;
  color: #8fa28f;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.floor-tx-row > a,
.floor-tx-row > strong {
  color: #9bd36b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.floor-tx-row.executing > strong {
  color: #f1c778;
}

.floor-tx-row.pending > strong {
  color: #f1c778;
}

.floor-tx-row.failed > strong {
  color: #ff9b8d;
}

.floor-tx-row > a:hover {
  text-decoration: underline;
}

.floor-drop-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #263336;
}

.floor-drop-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #f4f1e8;
}

.floor-drop-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.floor-drop-head .eyebrow {
  color: #c5b36c;
}

.floor-drop-list {
  display: grid;
  gap: 7px;
  max-height: 520px;
  overflow: auto;
}

.floor-drop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #3e3518;
  border-left: 4px solid #ffda4f;
  border-radius: 6px;
  background: #17150d;
  color: #fff7bc;
}

.floor-drop-row.latest {
  box-shadow:
    inset 0 0 0 1px rgba(255, 218, 79, 0.14),
    0 0 18px rgba(255, 218, 79, 0.08);
}

.floor-drop-row span,
.floor-drop-row strong,
.floor-drop-row small {
  display: block;
  min-width: 0;
}

.floor-drop-row small {
  margin-top: 3px;
  color: #d5c982;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.floor-drop-row a {
  color: #ffda4f;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.floor-drop-row a:hover {
  text-decoration: underline;
}

.blackberry-shell {
  width: min(430px, 100%);
  justify-self: center;
  padding: 12px;
  border: 1px solid #30383d;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #1c2328, #080a0c 74%),
    #11161a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 22px 50px rgba(0, 0, 0, 0.28);
}

.phone-top {
  display: grid;
  grid-template-columns: 14px minmax(60px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 4px 10px;
}

.phone-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9bd36b;
  box-shadow: 0 0 10px rgba(155, 211, 107, 0.85);
}

.phone-speaker {
  height: 6px;
  border-radius: 999px;
  background: #07090a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #3d484d;
  border-radius: 999px;
  color: #cfd8d2;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.phone-state.good {
  color: #c7f6d6;
  border-color: #2b7048;
}

.phone-state.warn {
  color: #f1c778;
  border-color: #756337;
}

.phone-screen {
  padding: 10px;
  border: 1px solid #344036;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(19, 31, 22, 0.96), rgba(8, 13, 10, 0.98)),
    #0c120e;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.48),
    0 1px 0 rgba(255, 255, 255, 0.05);
}

.phone-screen-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #eef7e7;
}

.phone-screen-head strong,
.phone-screen-head small {
  display: block;
}

.phone-screen-head small {
  margin-top: 2px;
  color: #9fb39b;
  overflow-wrap: anywhere;
}

.phone-chat-log {
  min-height: 300px;
  max-height: 340px;
  border-color: #2c3a2d;
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(14, 21, 14, 0.92), rgba(5, 9, 7, 0.95)),
    repeating-linear-gradient(0deg, rgba(130, 180, 115, 0.08) 0 1px, transparent 1px 25px);
}

.phone-chat-log .chat-bubble {
  max-width: none;
  border: 1px solid #40523f;
  border-radius: 5px;
  background: #202a22;
  color: #e7f2df;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 13px;
  line-height: 1.28;
  white-space: pre-line;
}

.phone-chat-log .chat-avatar {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  border-color: #40523f;
  background: #132017;
}

.phone-chat-log .chat-speaker {
  color: #9fb39b;
}

.phone-chat-log .chat-row.has-speaker .chat-stack {
  max-width: min(78%, 292px);
}

.phone-chat-log .chat-row.agent .chat-bubble,
.phone-chat-log .chat-row.user .chat-bubble {
  border-radius: 5px;
}

.phone-chat-log .chat-row.user .chat-bubble {
  border-color: #1f7a56;
  background: #10392d;
  color: #e3fff0;
}

.phone-chat-log .chat-row.alert .chat-bubble {
  border-color: #b08a1a;
  background: #ffe86b;
  color: #151108;
}

.phone-compose {
  grid-template-columns: minmax(0, 1fr) 58px;
  margin-top: 10px;
}

.phone-compose input {
  min-height: 34px;
  border-color: #3b4a3b;
  border-radius: 5px;
  background: #0c130e;
  color: #edf7e8;
}

.phone-compose button {
  min-height: 34px;
  border-radius: 5px;
  padding: 0 8px;
  background: #4d5c52;
  box-shadow: none;
}

.blackberry-nav {
  display: grid;
  grid-template-columns: 1fr 42px 1fr;
  gap: 8px;
  margin: 10px 18px 8px;
}

.blackberry-nav span {
  min-height: 24px;
  border: 1px solid #30383d;
  border-radius: 5px;
  background: linear-gradient(180deg, #242c31, #12171a);
}

.blackberry-nav .trackpad {
  border-color: #4e5c63;
  background: linear-gradient(180deg, #78858b, #3d474d);
}

.blackberry-keyboard {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}

.blackberry-keyboard span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid #30383d;
  border-radius: 4px;
  background: linear-gradient(180deg, #252c31, #101417);
  color: #d7dedc;
  font-size: 10px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.section-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
}

.eyebrow,
.label {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #faf7ee;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.good {
  color: var(--green-dark);
  border-color: rgba(19, 138, 85, 0.35);
}

.pill.warn {
  color: var(--amber);
  border-color: rgba(192, 120, 22, 0.42);
}

.pill.bad {
  color: var(--red);
  border-color: rgba(180, 59, 59, 0.42);
}

.good-text {
  color: var(--green-dark);
}

.bad-text {
  color: var(--red);
}

.muted {
  color: var(--muted);
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1.7fr) repeat(3, minmax(0, 0.8fr));
  gap: 12px;
}

.status-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.address-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.address-link {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.address-link:hover {
  text-decoration: underline;
}

.mini-button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.memory-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.balance-line {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 12px;
  background: #fbf8ef;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.right {
  text-align: right;
}

.muted-cell,
.empty {
  color: var(--muted);
}

.broker-wallet-source {
  display: block;
  margin: -6px 0 10px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.broker-grid {
  min-height: 154px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 10px;
}

.broker {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #faf7ee;
}

.broker img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #e7dfd0;
}

.broker.configured {
  border-color: #7fcf74;
  box-shadow: inset 0 0 0 1px rgba(127, 207, 116, 0.28);
}

.broker.active {
  border-color: #e3b63b;
  background: #fff8df;
  box-shadow: inset 0 0 0 1px rgba(227, 182, 59, 0.34), 0 8px 18px rgba(163, 124, 24, 0.12);
}

.broker.needs-auth {
  border-color: #d1a541;
  background: #fff7d6;
}

.broker-image-fallback {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  background: #e7dfd0;
  color: #44624a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 38px;
  font-weight: 800;
}

.broker div {
  padding: 9px;
  font-size: 13px;
}

.broker-status {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e6efdf;
  color: #36583f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.broker-status.good,
.broker.active .broker-status.good {
  background: #d7f6cc;
  color: #1f6234;
}

.broker-status.warn,
.broker.active .broker-status.warn {
  background: #ffe08a;
  color: #5e4200;
}

.broker-status.bad,
.broker.active .broker-status.bad {
  background: #ffe0d8;
  color: #823124;
}

.broker-activation-btn {
  display: block;
  width: 100%;
  min-height: 30px;
  margin-top: 8px;
  padding: 6px 8px;
  border-color: #d8ccb9;
  background: #fffdf7;
  color: var(--ink);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
}

.broker-activation-btn:hover {
  border-color: #b89e63;
  background: #fff3c7;
}

.broker-activation-btn.fund-usdg {
  border-color: #d2b257;
  background: #fff4c9;
  color: #4f3900;
}

.broker-activation-btn.fund-usdg:hover {
  background: #ffe58e;
}

.broker-activation-btn.deploy-executor {
  border-color: #c47b5f;
  background: #ffe3d7;
  color: #73301f;
}

.broker-activation-btn.executor-ready {
  border-color: #8fbd75;
  background: #edf9e9;
  color: #2f6a37;
}

.spritesheet-panel {
  min-height: 360px;
}

.spritesheet-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sprite-card {
  display: grid;
  min-height: 442px;
  grid-template-rows: auto auto auto 1fr;
}

.sprite-card-top {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
}

.sprite-source-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8ccb9;
  border-radius: 6px;
  background: #e7dfd0;
  color: #44624a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 900;
}

.broker .sprite-source-avatar img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  image-rendering: pixelated;
}

.sprite-card-meta {
  min-width: 0;
}

.sprite-card-meta strong,
.sprite-card-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sprite-status.good {
  background: #e6efdf;
  color: #36583f;
}

.sprite-status.warn {
  background: #fff0bd;
  color: #684d04;
}

.sprite-status.bad {
  background: #ffe1d6;
  color: #8d2f1f;
}

.sprite-sheet-frame {
  display: grid;
  min-height: 132px;
  margin: 0 9px;
  place-items: center;
  border: 1px dashed #d8ccb9;
  border-radius: 6px;
  background:
    linear-gradient(45deg, rgba(141, 129, 107, 0.11) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(141, 129, 107, 0.11) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(141, 129, 107, 0.11) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(141, 129, 107, 0.11) 75%);
  background-color: #f8f2e4;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.sprite-sheet-frame.has-sheet {
  border-style: solid;
}

.broker .sprite-sheet-preview {
  width: 100%;
  max-height: 148px;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
}

.sprite-anim-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 9px;
}

.sprite-anim-panel {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 8px;
  border: 1px solid #d8ccb9;
  border-radius: 6px;
  background: #fffaf0;
}

.sprite-anim-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.sprite-anim-stage {
  display: grid;
  min-height: 74px;
  place-items: center;
  border: 1px dashed rgba(141, 129, 107, 0.45);
  border-radius: 5px;
  background:
    linear-gradient(45deg, rgba(141, 129, 107, 0.11) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(141, 129, 107, 0.11) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(141, 129, 107, 0.11) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(141, 129, 107, 0.11) 75%);
  background-color: #f8f2e4;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.sprite-anim-frame {
  width: 72px;
  height: 72px;
  background-image: var(--sprite-sheet-url);
  background-repeat: no-repeat;
  background-size: 400% 200%;
  image-rendering: pixelated;
}

.sprite-anim-frame.idle {
  animation: sprite-idle-preview 1.2s infinite;
}

.sprite-anim-frame.walk {
  animation: sprite-walk-preview 0.72s infinite;
}

@keyframes sprite-idle-preview {
  0%,
  24.99% {
    background-position: 0% 0%;
  }
  25%,
  49.99% {
    background-position: 33.333% 0%;
  }
  50%,
  74.99% {
    background-position: 66.666% 0%;
  }
  75%,
  100% {
    background-position: 100% 0%;
  }
}

@keyframes sprite-walk-preview {
  0%,
  32.99% {
    background-position: 0% 100%;
  }
  33%,
  65.99% {
    background-position: 33.333% 100%;
  }
  66%,
  100% {
    background-position: 66.666% 100%;
  }
}

.sprite-card-actions {
  display: grid;
  align-content: end;
  gap: 8px;
}

.sprite-card-actions small {
  color: var(--muted);
}

.sprite-error {
  color: #8d2f1f;
}

.spritesheet-admin-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.spritesheet-admin-head {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.spritesheet-admin-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

.spritesheet-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.admin-sprite-card {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.admin-sprite-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-sprite-card-head .admin-sprite-title {
  min-width: 0;
}

.admin-sprite-card .admin-sprite-avatar {
  width: 42px;
  height: 42px;
}

.admin-sprite-card-head strong,
.admin-sprite-card-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sprite-card > small {
  color: var(--muted);
}

.admin-sprite-card .sprite-anim-strip {
  margin: 0;
}

.admin-sprite-card .sprite-anim-panel {
  min-height: 96px;
}

.admin-sprite-empty {
  grid-column: 1 / -1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 16, 14, 0.62);
}

.modal-backdrop[hidden] {
  display: none;
}

.broker-auth-modal {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal-head,
.modal-actions,
.broker-auth-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-head {
  justify-content: space-between;
}

.modal-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.1;
}

.modal-subline {
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.broker-auth-rows {
  display: grid;
  gap: 8px;
}

.broker-auth-row {
  justify-content: space-between;
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid #dacfbf;
  border-left: 4px solid #d0a53d;
  border-radius: 6px;
  background: #fffaf0;
}

.broker-auth-row.ready {
  border-left-color: var(--green);
  background: #f1faef;
}

.broker-auth-row.ready .broker-auth-symbol strong {
  color: var(--green-dark);
}

.broker-auth-row.ready .broker-auth-symbol small {
  color: #2f6a37;
}

.broker-auth-row.is-disabled {
  opacity: 0.72;
}

.broker-auth-symbol {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.broker-auth-symbol strong,
.broker-auth-symbol small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.broker-auth-symbol small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-loading {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  animation: loading-pulse 1.1s ease-in-out infinite;
}

.broker-auth-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.token-switch {
  min-width: 48px;
  border-color: #d2c7b8;
  background: #eee9df;
  color: #625a50;
  box-shadow: none;
  font-weight: 900;
}

.token-switch.is-on {
  border-color: rgba(19, 138, 85, 0.35);
  background: #e5f6e7;
  color: var(--green-dark);
}

.modal-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 14px;
  margin-bottom: 12px;
}

.broker-fund-modal {
  width: min(620px, 100%);
}

.fund-balance-box,
.fund-address-box {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #dacfbf;
  border-radius: 6px;
  background: #fffaf0;
}

.fund-balance-box strong {
  color: var(--green-dark);
  font-size: 24px;
  line-height: 1.05;
}

.fund-address-box input {
  width: 100%;
  min-width: 0;
  border-color: #d8ccb9;
  background: #fbf8ef;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.link-button.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.brain-panel {
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
}

.brain-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.brain-profile strong,
.brain-profile small {
  display: block;
}

.brain-profile small {
  color: var(--muted);
  margin-top: 3px;
}

.chat-log {
  min-height: 260px;
  max-height: 390px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f6f2;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-row.user {
  justify-content: flex-end;
}

.chat-row.alert {
  justify-content: center;
}

.chat-stack {
  display: grid;
  gap: 3px;
  max-width: min(78%, 360px);
}

.chat-row.has-speaker .chat-stack {
  max-width: min(72%, 330px);
}

.chat-row.user .chat-stack {
  justify-items: end;
}

.chat-row.alert .chat-stack {
  max-width: min(92%, 420px);
}

.chat-speaker {
  padding-left: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.chat-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  overflow: hidden;
  align-self: flex-end;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ece5d6;
}

.chat-avatar img,
.chat-avatar-sprite,
.chat-avatar-fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.chat-avatar img {
  object-fit: cover;
  image-rendering: pixelated;
}

.chat-avatar-sprite {
  background-position: 0 0;
  background-repeat: no-repeat;
  background-size: 400% 200%;
  image-rendering: pixelated;
}

.chat-avatar-fallback {
  display: grid;
  place-items: center;
  color: #44624a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 900;
}

.chat-bubble {
  max-width: none;
  padding: 9px 12px;
  border-radius: 18px;
  background: #e5e5ea;
  color: #171717;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-row.agent .chat-bubble {
  border-bottom-left-radius: 6px;
}

.chat-row.user .chat-bubble {
  background: #0a84ff;
  color: white;
  border-bottom-right-radius: 6px;
}

.chat-row.alert .chat-bubble {
  max-width: min(92%, 420px);
  border: 1px solid rgba(171, 126, 11, 0.42);
  border-radius: 6px;
  background: #ffe86b;
  color: #17140a;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(171, 126, 11, 0.14);
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.form-row {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
}

input.saved-key {
  background: #fbf8ef;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 800;
}

input:disabled {
  background: #f3eee3;
  color: var(--muted);
}

.button-row {
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.agent-box {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  margin: 12px 0;
  background: #fbf8ef;
}

.compact-box {
  margin: 4px 0 12px;
}

.admin-divider {
  height: 1px;
  margin: 14px 0;
  background: var(--line);
}

.mini-lines {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.trade-universe-box {
  gap: 9px;
}

.trade-universe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 8px;
}

.trade-token-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid #c8beb0;
  border-radius: 6px;
  background: #fffdf7;
}

.trade-token-row.cash {
  grid-template-columns: minmax(0, 1fr) auto;
}

.trade-token-row.approved.is-on,
.trade-token-row.cash.approved {
  border-left-color: #149561;
}

.trade-token-row.approved.is-off {
  border-left-color: #b7a56d;
}

.trade-token-row.needs-auth {
  border-left-color: #d95847;
}

.trade-token-row strong,
.trade-token-row small {
  display: block;
  min-width: 0;
}

.trade-token-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.token-toggle.is-on {
  border-color: #149561;
  color: #096543;
  background: #e9f8ef;
}

.agent-balances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}

.agent-balances span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.key-panel {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.admin-panel {
  width: min(760px, 100%);
}

.admin-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbf8ef;
}

.admin-settings {
  max-width: 720px;
}

.admin-section {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.admin-section:first-child {
  padding-top: 0;
}

.admin-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.admin-section-head strong {
  display: block;
  font-size: 18px;
}

.legacy-admin {
  margin-top: 14px;
  opacity: 0.5;
}

.legacy-admin[open] {
  opacity: 0.72;
}

.legacy-admin summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legacy-admin-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.installed-box {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(19, 138, 85, 0.28);
  border-radius: 8px;
  background: #f1fbf5;
}

.installed-box[hidden] {
  display: none;
}

.installed-box strong {
  color: var(--green-dark);
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.broker-swap-grid {
  margin-top: 4px;
}

.full {
  width: 100%;
}

.mode-toggle {
  width: 100%;
  border-color: rgba(192, 120, 22, 0.36);
  background: #fff7e6;
  color: #7a430c;
  font-weight: 900;
}

.mode-toggle.live {
  border-color: rgba(19, 138, 85, 0.38);
  background: #eaf8ef;
  color: var(--green-dark);
}

.live-admin-section {
  padding-top: 0;
}

.admin-live-toggle {
  min-height: 44px;
  border-color: rgba(194, 57, 52, 0.42);
  background: #fff1ed;
  color: #9f271f;
  font-size: 15px;
}

.admin-live-toggle.live {
  border-color: rgba(19, 138, 85, 0.48);
  background: #e5f8ed;
  color: #0f6d43;
}

.admin-worker-actions {
  margin-bottom: 0;
}

.admin-worker-actions button {
  flex: 1 1 150px;
}

.output,
.quote-output {
  min-height: 146px;
  max-height: 300px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #161714;
  color: #f2f0e8;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.compact-output {
  min-height: 126px;
  overflow-wrap: anywhere;
}

.swap-status {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.swap-status[data-tone="ok"] {
  border-color: rgba(19, 138, 85, 0.28);
  background: #eff9f2;
  color: var(--green-dark);
}

.swap-status[data-tone="error"] {
  border-color: rgba(192, 57, 43, 0.25);
  background: #fff2ef;
  color: #973326;
}

.decision {
  border-left: 4px solid var(--blue);
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #f7f7f4;
  border-radius: 0 8px 8px 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  background: #171717;
  color: white;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  z-index: 11000;
}

.toast.toast-alert {
  border: 1px solid #9c7410;
  background: #ffe86b;
  color: #151108;
  font-weight: 900;
}

.hidden {
  display: none;
}

@media (max-width: 860px) {
  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .grid.two,
  .status-grid,
  .admin-gate {
    grid-template-columns: 1fr;
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }

  .floor-brain-wrap {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .monitor-top h2 {
    font-size: 20px;
  }

  .pixel-chart {
    height: 190px;
  }

  .floor-stage {
    max-width: 69vh;
  }
}
