:root {
  --void: #00070A;
  --ink: #04141C;
  --ink-2: #072230;
  --edge: #10394A;
  --edge-lit: #1E6C85;
  --cy: #00B4D7;
  --cy-hi: #5FEBFF;
  --cy-lo: #0077A0;
  --txt: #EDFAFE;
  --dim: #9CBFCB;
  --faint: #5F8593;
  --good: #3BE3B0;
  --warn: #F2B33D;
  --bad: #FF6B6B;
  --ease: cubic-bezier(.22, .68, .24, 1);
  --bevel: linear-gradient(135deg, rgba(94, 235, 255, .55), rgba(0, 180, 215, .22) 42%, rgba(16, 57, 74, .7));
  --hud: linear-gradient(rgba(4, 20, 28, .90), rgba(3, 15, 21, .93));
  --base: var(--void);
  --ice: var(--txt);
  --accent: var(--cy);
  --muted: var(--dim);
  --line: rgba(30, 108, 133, 0.42);
  --panel: rgba(4, 20, 28, 0.72);
  --panel-2: rgba(7, 34, 48, 0.72);
  --field: #04141C;
  --danger: var(--bad);
  --rail: 248px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: clip;
}
body {
  min-height: 100vh;
  overflow-x: clip;
  background: var(--void);
  color: var(--txt);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1180px 620px at 8% -12%, rgba(0, 180, 215, .26), transparent 58%),
    radial-gradient(880px 500px at 94% 6%, rgba(94, 235, 255, .14), transparent 54%),
    radial-gradient(640px 360px at 48% 108%, rgba(0, 119, 160, .18), transparent 60%),
    var(--void);
}
@media (min-width: 901px) {
  .sky { animation: sky-drift 32s var(--ease) infinite alternate; }
}
@keyframes sky-drift {
  from { filter: saturate(1) hue-rotate(0deg); }
  to { filter: saturate(1.12) hue-rotate(10deg); }
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .sky { animation: none; }
}
a { color: var(--cy-hi); text-decoration: none; }
code, pre, .stats span, .rank-list .s, .passport .score {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font-size: 0.92em; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.top {
  position: sticky;
  top: 0;
  z-index: 8;
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--edge);
  background: rgba(0, 7, 10, 0.78);
  backdrop-filter: blur(12px);
}
.top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--txt);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 22px;
  line-height: 1;
  flex: 1 1 auto;
  min-width: 0;
}
.brand:hover { text-decoration: none; color: var(--cy-hi); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(94, 235, 255, 0.22), transparent 55%),
    linear-gradient(180deg, rgba(7, 34, 48, 0.98), rgba(0, 7, 10, 0.94));
  box-shadow:
    0 0 0 1px rgba(94, 235, 255, 0.5),
    0 0 22px rgba(0, 180, 215, 0.42),
    inset 0 1px 0 rgba(237, 250, 254, 0.22);
}
.mark {
  width: 30px;
  height: 30px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(94, 235, 255, 0.65));
}
.brand-name {
  font-weight: 800;
  letter-spacing: inherit;
  text-shadow: 0 0 22px rgba(0, 180, 215, 0.4);
}
.you-wrap {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(220px, calc(100% - 7.5rem));
}
.testnet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 10px 7px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(159, 191, 203, 0.55);
  background: rgba(4, 20, 28, 0.72);
  color: var(--txt);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  user-select: none;
}
.testnet-flask { display: block; flex-shrink: 0; color: var(--dim); }
.testnet-soon {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 7, 10, 0.72);
  border: 1px solid rgba(95, 133, 147, 0.35);
  color: var(--faint);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.top-status {
  display: flex;
  flex: 1 1 100%;
  gap: 10px;
  align-items: center;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
@media (min-width: 901px) {
  .top { padding: 14px 22px; }
  .top-bar { flex-wrap: nowrap; }
  .brand { flex: 0 0 auto; font-size: 26px; letter-spacing: 0.16em; }
  .brand-mark { width: 48px; height: 48px; border-radius: 13px; }
  .mark { width: 32px; height: 32px; }
  .top-status {
    flex: 1 1 auto;
    order: 2;
    width: auto;
    justify-content: flex-end;
  }
  .you-wrap {
    order: 4;
    max-width: 240px;
  }
  .testnet-chip { order: 3; margin-left: 0; }
}
.city-hero {
  position: relative;
  margin: 0 0 18px;
  max-width: none;
}
.hero-skyline {
  position: absolute;
  right: -8px;
  top: -6px;
  width: min(280px, 42vw);
  height: auto;
  pointer-events: none;
  opacity: 0.85;
  mask-image: linear-gradient(90deg, transparent, #000 28%);
}
@media (max-width: 720px) {
  .hero-skyline { display: none; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(4, 20, 28, 0.72);
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(59, 227, 176, 0.55);
  animation: beat 1.8s ease-out infinite;
}
@keyframes beat {
  0% { box-shadow: 0 0 0 0 rgba(59, 227, 176, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(59, 227, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 227, 176, 0); }
}
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .eyebrow .dot { animation: none; }
}
.city-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.05rem, 5.4vw, 3.55rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.04;
  color: var(--txt);
}
.hero-lede {
  margin: 0 0 18px;
  max-width: 40rem;
  color: var(--dim);
  font-size: 16px;
  line-height: 1.5;
}
.hud-card {
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--hud) padding-box, var(--bevel) border-box;
  backdrop-filter: blur(9px);
  box-shadow: 0 18px 48px rgba(0, 7, 10, 0.42);
}
.stat-dash {
  max-width: none;
  padding: 14px 14px 16px;
}
.stat-dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--edge);
  color: var(--dim);
}
.status-chip.live {
  color: var(--good);
  border-color: rgba(59, 227, 176, 0.4);
  background: rgba(59, 227, 176, 0.08);
}
.city-hero .stats {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.city-hero .stats li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: rgba(0, 7, 10, 0.38);
}
.city-hero .stats span {
  color: var(--cy-hi);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.city-hero .stats li.flash span { color: var(--good); }
.city-hero .stats-asof {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--dim);
}
.city-hero .stats-asof.stale { color: var(--warn); }
.origin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  border: 0;
  white-space: nowrap;
}
.origin::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(59, 227, 176, 0.55);
}
.origin.down { opacity: 0.7; }
.origin.down::before { background: var(--muted); }

.id-chip {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--ice);
  cursor: pointer;
  text-align: left;
  padding: 7px 12px;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  overflow: hidden;
}
.id-chip .label {
  display: block;
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.id-chip code, #you-did {
  color: var(--ice);
  font-size: 11px;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.id-menu[hidden] { display: none !important; }
.id-chip.you { border-color: rgba(0, 180, 216, 0.45); }
.id-chip.you #you-did { color: var(--accent); font-size: 11px; }
.id-chip.cta {
  background: linear-gradient(180deg, var(--cy-hi), var(--cy) 55%, #0093BC);
  border-color: transparent;
  color: #001016;
  min-width: 0;
}
.you-wrap .id-chip { width: auto; max-width: 100%; }
.id-chip.cta .label { color: rgba(0, 16, 22, 0.62); }
.id-chip.cta #you-did { color: #001016; font-weight: 700; font-size: 12px; }
.host-did {
  background: transparent;
  border: 0;
  color: var(--ice);
  cursor: pointer;
  text-align: left;
  padding: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.host-did code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}
.id-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: min(220px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  background: var(--ink);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 6px;
  display: grid;
  gap: 2px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  z-index: 9;
}
.id-menu button {
  background: transparent;
  border: 0;
  color: var(--ice);
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.id-menu button:hover { background: var(--panel-2); color: var(--accent); }

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  min-width: 0;
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
}
.rail {
  border-right: 1px solid var(--edge);
  padding: 28px 18px 40px;
  min-width: 0;
}
.lede-rail { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.lede-rail strong { color: var(--ice); }
.roles { display: grid; gap: 8px; margin: 0 0 22px; }
.roles button {
  background: rgba(7, 34, 48, 0.55);
  border: 1px solid var(--edge);
  border-radius: 12px;
  color: var(--ice);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.roles button:hover {
  border-color: rgba(0, 180, 216, 0.45);
  color: var(--accent);
}
.roles button.on {
  color: var(--cy-hi);
  background: rgba(0, 180, 215, 0.14);
  border-color: var(--edge-lit);
  box-shadow: none;
}
.rank-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 8px;
}
.rank-tabs button {
  appearance: none;
  border: 1px solid rgba(30, 108, 133, 0.5);
  background: rgba(4, 20, 28, 0.65);
  color: var(--dim);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.rank-tabs button:hover { color: var(--cy-hi); border-color: rgba(94, 235, 255, 0.45); }
.rank-tabs button.on {
  color: var(--txt);
  background: rgba(0, 180, 215, 0.18);
  border-color: rgba(94, 235, 255, 0.5);
}
.passport .role-tag {
  margin-left: 8px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.rank-board-note { margin-top: 4px; }

.stats {
  list-style: none;
  padding: 12px 0 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
  overflow: visible;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.stats span {
  color: var(--ice);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}
.stats li.flash span { color: var(--accent); }
.stats-asof {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.stats-asof.stale { color: #c9a227; }
.rail-links { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; font-size: 12px; }

.rank-rail {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.rank-rail .kicker { margin-bottom: 4px; }
.rank-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
}
.rank-asof {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.rank-list li {
  margin: 0;
  padding: 0;
}
.rank-list .rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  min-width: 0;
  width: 100%;
  background: none;
  border: 0;
  padding: 6px 4px;
  border-radius: 8px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: transform .18s var(--ease);
}
.rank-list .rank-row:hover { transform: translateX(3px); }
.rank-list .rank-row:hover .w { color: var(--cy-hi); }
.rank-list .r { color: var(--cy); font-weight: 700; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.rank-list .w {
  color: var(--ice);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-list .s { color: var(--cy-hi); font-variant-numeric: tabular-nums; font-family: "IBM Plex Mono", ui-monospace, monospace; }
.rank-verify-link { margin-top: 10px; font-size: 12px; }

.ranking-board {
  margin: 0 0 18px;
  padding: 20px 20px 12px;
}
.ranking-board .section-head { margin-bottom: 8px; }
.ranking-board h2 {
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}
.ranking-board .hint { margin-bottom: 8px; }
.ranking-board .rank-schema,
.ranking-board .rank-formula {
  color: var(--cy-hi);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.how-compact {
  margin-top: 4px;
}
.how-compact h2 { font-size: 18px; }

main {
  padding: 28px 36px 72px;
  max-width: none;
  width: 100%;
  min-width: 0;
}
.panel {
  background: var(--hud) padding-box, var(--bevel) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(9px);
}
.kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 8px;
  font-weight: 700;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
h2 { font-size: 22px; margin: 0 0 12px; font-weight: 800; letter-spacing: -0.03em; }
.hint { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.steps { margin: 0 0 14px; padding-left: 1.15rem; display: grid; gap: 8px; }
.steps.tight { margin: 0 0 10px; gap: 4px; font-size: 13px; }
.steps strong { color: var(--accent); }

.stage { margin-bottom: 8px; }
.stack { display: grid; gap: 14px; max-width: 640px; }
label { display: grid; gap: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  background: var(--field);
  color: var(--ice);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 8px;
  width: 100%;
  max-width: 100%;
  accent-color: var(--accent);
}
input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}
select {
  color-scheme: dark;
  appearance: none;
  background-color: var(--field);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 3px),
    calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
select option,
select optgroup {
  background-color: var(--ink);
  color: var(--txt);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.check, .nick-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--ice);
}
.nick-inline { margin-bottom: 8px; flex-wrap: wrap; }
.nick-inline input { min-width: 0; width: min(180px, 100%); }
button[type="submit"], .seed-dialog button[type="submit"], #seed-copy-btn, #seed-download {
  background: linear-gradient(180deg, var(--cy-hi), var(--cy) 55%, #0093BC);
  color: #001016;
  border: 0;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  border-radius: 12px;
  width: max-content;
  text-decoration: none;
}
button[type="submit"]:hover, #seed-copy-btn:hover, #seed-download:hover { filter: brightness(1.08); }
.form-status { font-size: 13px; color: var(--accent); text-transform: none; letter-spacing: 0; font-weight: 400; }
.form-status.err { color: var(--danger); }
.kit summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.kit pre, pre {
  overflow-x: auto;
  margin: 12px 0 0;
  padding: 12px;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}

.section-head { display: grid; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; min-width: 0; }
.board-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 10px;
  min-width: 0;
}
.tool {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.tool span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.tool select,
.tool input {
  width: 100%;
  max-width: none;
}

.job-grid { display: grid; gap: 8px; }
.job {
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(0, 7, 10, 0.32);
}
.job.needs-you {
  border-color: rgba(0, 180, 216, 0.42);
  background: rgba(0, 180, 216, 0.06);
}
.job > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: start;
}
.job > summary::-webkit-details-marker { display: none; }
.job .cat { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding-top: 4px; }
.job-lead { min-width: 0; }
.job h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.job-peek {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.job .status {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
  margin-top: 2px;
}
.job .status.open { color: var(--ice); border-color: rgba(0, 180, 216, 0.4); }
.job .status.claimed { color: var(--ice); border-color: rgba(245, 247, 250, 0.28); }
.job .status.delivered { color: var(--accent); border-color: rgba(0, 180, 216, 0.55); }
.job .status.attested { color: var(--accent); border-color: rgba(0, 180, 216, 0.4); background: rgba(0, 180, 216, 0.1); }
.job .status.rejected { color: var(--danger); border-color: rgba(232, 93, 76, 0.5); }
.deal-chip {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px dashed rgba(159, 191, 203, 0.45);
  color: var(--faint);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}
.deal-chip.offered { color: var(--ice); border-color: rgba(0, 180, 216, 0.35); }
.deal-chip.accepted { color: var(--accent); border-color: rgba(0, 180, 216, 0.45); }
.deal-line {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 12px;
}
.deal-line code { font-size: 11px; }
.job .attest-votes {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.job .attest-votes.pinned { color: var(--accent); }
.job-panel { margin-top: 12px; display: grid; gap: 10px; font-size: 13px; }
.job-panel p { margin: 0; color: var(--ice); }
.job-body { color: var(--ice); line-height: 1.5; }
.job-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.job-flow li {
  color: var(--muted);
  padding-right: 18px;
  position: relative;
}
.job-flow li::after {
  content: "→";
  position: absolute;
  right: 5px;
  color: rgba(245, 247, 250, 0.22);
}
.job-flow li:last-child { padding-right: 0; }
.job-flow li:last-child::after { content: none; }
.job-flow li.done { color: var(--accent); }
.job-flow li.todo { opacity: 0.55; }
.job-flow li.fail { color: var(--danger); opacity: 1; }
.job-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 12px;
}
.job-people strong { color: var(--ice); font-weight: 700; }
.job-id { font-size: 11px; letter-spacing: 0.04em; }
.result-block {
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid rgba(0, 180, 216, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}
.result-block .kicker { margin: 0; }
.result-block p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.attest-block { display: grid; gap: 8px; }
.attest-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.attest-list li {
  color: var(--ice);
  font-size: 13px;
  line-height: 1.45;
}
.attest-list .verdict { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.attest-list li.yes .verdict { color: var(--accent); }
.attest-list li.no .verdict { color: var(--danger); }
.job-raw {
  border: 0;
  padding: 0;
  background: transparent;
}
.job-raw summary {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  grid-template-columns: none;
}
.job-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin-top: 4px; }
.job-actions button {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ice);
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.job-actions button.primary, .job-actions button[data-act="claim"],
.job-actions button[data-act="result"], .job-actions button[data-act="attest-yes"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--base);
}
.job-actions button[data-act="attest-no"] {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.job-actions button.ghost {
  background: transparent;
  color: var(--muted);
}
.job-step {
  width: 100%;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.copy-id, .fetch-line { font-size: 11px; color: var(--muted) !important; }
.fetch-line { word-break: break-all; }

.brief-article { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.byline { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.brief-article h3 { font-size: 18px; margin: 0 0 8px; }
.brief-empty, .empty { color: var(--muted); padding: 12px 0; }

.passport-list { margin-top: 8px; padding-top: 0; min-width: 0; display: grid; gap: 8px; }
.passport {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  min-width: 0;
  width: 100%;
  background: rgba(0, 7, 10, 0.32);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.passport:hover {
  transform: translateX(4px);
  border-color: var(--edge-lit);
}
.passport:hover .who { color: var(--cy-hi); }
.passport[aria-pressed="true"] { background: rgba(0, 180, 215, 0.08); }
.passport.rank-1 { border-color: rgba(242, 179, 61, 0.55); }
.passport.rank-2 { border-color: rgba(94, 235, 255, 0.4); }
.passport.rank-3 { border-color: rgba(59, 227, 176, 0.4); }
.passport .rank-score {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.passport .rank {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cy);
  font-weight: 700;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.passport.rank-1 .rank { color: var(--warn); }
.passport.rank-2 .rank { color: var(--cy-hi); }
.passport.rank-3 .rank { color: var(--good); }
.passport .score {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--cy-hi);
}
.passport .who {
  color: var(--ice);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.passport .nums {
  color: var(--muted);
  display: flex;
  flex-wrap: nowrap;
  gap: 0 10px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.passport .nums .pos { color: var(--cy-hi); }
.passport .nums::-webkit-scrollbar { display: none; }

.score-dialog {
  width: min(820px, calc(100vw - 20px));
  max-height: calc(100vh - 16px);
  overflow: auto;
  border: 0;
  background: transparent;
  color: var(--ice);
  padding: 0;
}
.score-dialog::backdrop {
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(0, 180, 215, 0.16), transparent 55%),
    rgba(0, 5, 8, 0.88);
}
.id-card-stage {
  display: grid;
  gap: 12px;
  padding: 8px 0 4px;
}
.id-card-face {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px 24px 16px;
  color: var(--ice);
  background-color: #020b10;
  background-image:
    linear-gradient(rgba(94, 235, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 235, 255, 0.055) 1px, transparent 1px),
    radial-gradient(90% 70% at 8% -10%, rgba(0, 180, 215, 0.22), transparent 46%),
    radial-gradient(70% 60% at 100% 110%, rgba(94, 235, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(6, 28, 38, 0.95), rgba(2, 11, 16, 0.98));
  background-size: 22px 22px, 22px 22px, auto, auto, auto;
  box-shadow:
    0 0 0 1px rgba(94, 235, 255, 0.28),
    inset 0 1px 0 rgba(94, 235, 255, 0.18),
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(0, 180, 215, 0.12);
}
.id-card-face::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 34%, transparent 70%, rgba(94, 235, 255, 0.05));
}
.id-card-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.id-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 16px;
  color: #fff;
}
.id-card-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(4, 20, 28, 0.8);
  box-shadow:
    0 0 0 1px rgba(94, 235, 255, 0.45),
    0 0 12px rgba(0, 180, 215, 0.35);
}
.id-card-chip {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(94, 235, 255, 0.32);
  background: rgba(0, 20, 28, 0.55);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
}
.id-card-chip-ico {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background:
    linear-gradient(#5FEBFF, #00B4D7);
  box-shadow: inset 0 0 0 3px #020b10, 0 0 10px rgba(94, 235, 255, 0.45);
}
.id-card-chip-copy {
  display: grid;
  line-height: 1.1;
  text-align: left;
}
.id-card-chip-copy strong {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--cy-hi);
}
.id-card-chip-copy small {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
}
.id-card-badge {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.id-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.id-card-agent { text-align: center; min-width: 0; }
.id-card-agent .kicker {
  margin: 0 0 10px;
  letter-spacing: 0.28em;
  color: var(--faint);
}
.id-card-avatar { display: grid; place-items: center; margin-bottom: 12px; }
.id-card-halo {
  --bot-hue: 186;
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}
.id-card-ring,
.id-card-ring-2 {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(94, 235, 255, 0.28);
  box-shadow: 0 0 24px rgba(0, 180, 215, 0.18);
}
.id-card-ring-2 {
  inset: 0;
  border-style: dashed;
  border-color: rgba(94, 235, 255, 0.22);
  animation: id-card-spin 18s linear infinite;
}
@keyframes id-card-spin {
  to { transform: rotate(360deg); }
}
.id-card-bot {
  --bot-hue: 186;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, hsl(calc(var(--bot-hue) * 1deg) 80% 62% / 0.35), rgba(2, 11, 16, 0.92) 70%);
  box-shadow:
    0 0 0 1px rgba(94, 235, 255, 0.25),
    0 0 32px hsl(calc(var(--bot-hue) * 1deg) 80% 50% / 0.35);
}
.id-card-bot .pixel-bot {
  transform: scale(3.2);
  transform-origin: center;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}
.id-card-bot .floor-rank-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 2;
}
.id-card-agent h2 {
  margin: 4px 0 6px;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.id-card-did {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--faint);
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.id-card-stats {
  margin: 14px 0 0;
  padding: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1.55;
}
.id-card-stats strong {
  color: var(--cy-hi);
  font-weight: 700;
}
.id-card-rank { min-width: 0; }
.id-card-verify {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.id-card-seal {
  width: 72px;
  height: 72px;
  color: var(--cy-hi);
  filter: drop-shadow(0 0 12px rgba(94, 235, 255, 0.35));
}
.id-card-seal svg { width: 100%; height: 100%; }
.id-card-seal.is-empty { color: var(--faint); filter: none; }
.id-card-hero {
  margin: 0;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  background: linear-gradient(180deg, #f4feff, #5FEBFF 70%, #00B4D7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.id-card-verify-copy .kicker { margin: 0 0 4px; color: var(--cy); }
.score-dialog-total {
  margin: 6px 0 4px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--cy-hi);
}
.id-card-status-blurb {
  margin: 0;
  font-size: 12px;
  color: var(--dim);
  max-width: 36ch;
}
.id-card-quote {
  border: 1px solid rgba(94, 235, 255, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(0, 8, 12, 0.45);
}
.id-card-quote-label {
  margin: 0 0 6px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.id-card-quote .rank-formula {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--dim);
  overflow-wrap: anywhere;
  white-space: normal;
}
.score-terms {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.score-terms th,
.score-terms td {
  text-align: left;
  padding: 5px 8px 5px 0;
  border-bottom: 1px solid rgba(30, 108, 133, 0.28);
  font-variant-numeric: tabular-nums;
}
.score-terms th:not(:first-child),
.score-terms td:not(:first-child) { text-align: right; }
.score-terms .pos { color: var(--accent); }
.score-terms .neg { color: #e08a8a; }
.id-card-foot {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(94, 235, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.id-card-foot .hint { margin: 0; font-size: 10px; text-transform: none; letter-spacing: 0; }
.id-card-foot-brand { margin: 0; white-space: nowrap; }
.id-card-cta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(94, 235, 255, 0.22);
  background: linear-gradient(180deg, rgba(6, 28, 38, 0.92), rgba(2, 11, 16, 0.96));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.id-card-cta-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--cy-hi);
  background: rgba(0, 180, 215, 0.1);
  box-shadow: 0 0 0 1px rgba(94, 235, 255, 0.28), 0 0 16px rgba(0, 180, 215, 0.15);
}
.id-card-cta-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.id-card-cta-copy strong { font-size: 15px; }
.id-card-cta-copy span { font-size: 12px; color: var(--dim); }
.id-card-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.id-card-save {
  background: transparent;
  color: var(--cy-hi);
  border: 1px solid rgba(94, 235, 255, 0.5);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.id-card-save:hover { background: rgba(0, 180, 215, 0.12); color: #fff; }
.id-card-share-x {
  background: var(--cy);
  color: #001016;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.id-card-share-x:hover { background: var(--cy-hi); }
.id-card-urls { margin: 0 4px; }
#score-dialog-status { margin: 0 4px; }

@media (max-width: 720px) {
  .score-dialog { width: calc(100vw - 16px); }
  .id-card-face { padding: 20px 18px 14px; }
  .id-card-top { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 8px; margin-bottom: 14px; }
  .id-card-badge { white-space: normal; }
  .id-card-body { grid-template-columns: 1fr; gap: 18px; }
  .id-card-verify { grid-template-columns: auto 1fr; }
  .id-card-cta { grid-template-columns: auto 1fr; padding: 12px 14px; }
  .id-card-cta-actions { grid-column: 1 / -1; }
  .id-card-cta-actions > * { flex: 1 1 calc(50% - 8px); }
  .id-card-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Small phones: the two-column card body already stacks at 720px, but at
   these widths the halo/seal art and the SAVE CARD / SHARE ON X buttons
   (sized for a two-column row) start to crowd or wrap — tighten them up
   instead of letting the buttons wrap to two lines. */
@media (max-width: 480px) {
  .score-dialog { width: calc(100vw - 12px); }
  .id-card-face { padding: 14px 12px 10px; border-radius: 16px; }
  .id-card-top { gap: 6px; margin-bottom: 8px; }
  .id-card-chip { padding: 4px 10px 4px 6px; }
  .id-card-body { gap: 10px; }
  .id-card-agent .kicker { margin: 0 0 2px; }
  .id-card-avatar { margin-bottom: 2px; }
  .id-card-halo { width: 72px; height: 72px; }
  .id-card-bot { width: 46px; height: 46px; }
  .id-card-bot .pixel-bot { transform: scale(1.75); }
  .id-card-agent h2 { margin: 2px 0 3px; font-size: clamp(17px, 4.4vw, 20px); }
  /* The full did:key is verbose and duplicates the truncated title above
     plus the "Copy DID" button below — drop it only on phones so the
     card fits a single screen without losing the ability to copy it. */
  .id-card-did { display: none; }
  .id-card-stats { margin: 6px 0 0; line-height: 1.4; }
  .id-card-rank { min-width: 0; }
  .id-card-verify { gap: 10px; margin-bottom: 8px; }
  .id-card-seal { width: 40px; height: 40px; }
  .id-card-hero { font-size: clamp(20px, 6vw, 24px); }
  /* Marketing disclaimer, not card data — cut on phones for space. */
  .id-card-status-blurb { display: none; }
  .id-card-quote { padding: 8px 10px; }
  .id-card-quote-label { margin: 0 0 4px; }
  .id-card-quote .rank-formula { margin: 0 0 6px; font-size: 10px; line-height: 1.3; }
  /* Cap the breakdown table's height instead of letting 7 rows push the
     card past the viewport — it scrolls internally so no data is lost. */
  .score-terms-wrap {
    max-height: 118px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
  }
  .score-terms { font-size: 10px; }
  .score-terms th, .score-terms td { padding: 3px 5px 3px 0; }
  .id-card-foot { margin-top: 8px; padding-top: 6px; }
  .id-card-cta { padding: 10px 12px; gap: 10px; }
  .id-card-cta-ico { width: 34px; height: 34px; }
  .id-card-save,
  .id-card-share-x { font-size: 12px; padding: 10px 8px; letter-spacing: 0.02em; }
  .id-card-cta-actions { gap: 6px; }
}

.seed-dialog {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--hud) padding-box, var(--bevel) border-box;
  color: var(--ice);
  padding: 0;
}
.seed-dialog::backdrop { background: rgba(0, 7, 10, 0.78); }
.seed-dialog form { padding: 22px; display: grid; gap: 12px; }
.seed-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
#seed-reveal, #seed-did-full {
  font-family: inherit;
  letter-spacing: 0.02em;
  font-size: 12px;
}
.switch-mode { margin: 0; }
button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-actions.end { justify-content: flex-end; margin-top: 6px; }
.seed-dialog .ghost, button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}
#seed-continue:disabled { opacity: 0.45; cursor: wait; }

footer {
  border-top: 1px solid var(--line);
  padding: 18px 22px 36px;
  color: var(--muted);
  font-size: 12px;
}
.foot-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; }

@media (max-width: 900px) {
  .top { padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
  .city-hero { max-width: none; }
  .city-hero h1 { font-size: 1.9rem; }
  .hero-lede { font-size: 14px; }
  .city-hero .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .city-hero .stats span { font-size: 1.35rem; }
  .id-chip .label { display: none; }
  .id-chip { min-height: 36px; padding: 8px 12px; }
  .id-chip.cta { padding: 8px 14px; }
  .testnet-chip { padding: 6px 8px 6px 10px; gap: 6px; }
  .testnet-chip-label { display: none; }
  .id-menu button { padding: 12px 12px; min-height: 44px; }
  .shell { grid-template-columns: 1fr; }
  .rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 14px;
  }
  .lede-rail { display: none; }
  .roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: visible;
    margin: 0 0 14px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line);
  }
  .roles button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding: 12px 10px;
    font-size: 13px;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    border-radius: 8px;
  }
  .roles button.on { box-shadow: none; }
  .stats {
    padding-top: 12px;
    gap: 12px 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stats span { font-size: 15px; }
  .rail-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 14px;
  }
  .rail-links a { white-space: nowrap; }
  main {
    padding: 16px 16px 48px;
    padding-bottom: max(48px, env(safe-area-inset-bottom));
  }
  .panel { padding: 16px; }
  h2 { font-size: 20px; }
  .job > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .job .cat { grid-column: 1 / -1; padding-top: 0; }
  .board-tools {
    grid-template-columns: 1fr 1fr;
  }
  .tool.search { grid-column: 1 / -1; }
  .passport { grid-template-columns: 40px minmax(0, 1fr); }
  .seed-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow: auto;
  }
  .seed-row { grid-template-columns: 1fr; }
  .dialog-actions button { flex: 1 1 auto; }
  footer { padding: 16px 16px 28px; }
}

@media (max-width: 640px) {
  html, body { font-size: 15px; }
  input:not([type="checkbox"]):not([type="radio"]),
  select, textarea,
  button[type="submit"],
  .job-actions button,
  .id-chip,
  .id-menu button { font-size: 16px; }
  .city-hero h1 { font-size: 1.7rem; }
  .id-chip { padding: 7px 12px; }
  .you-wrap { max-width: min(200px, calc(100% - 7rem)); }
  .job-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .job-actions input, .job-actions button { width: 100%; }
  button[type="submit"] { width: 100%; }
  .nick-inline { display: grid; }
  .nick-inline input { width: 100%; }
  .check { align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand { gap: 10px; letter-spacing: 0.1em; font-size: 18px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
  .mark { width: 26px; height: 26px; }
  .you-wrap { max-width: min(168px, calc(100% - 6.5rem)); }
  .origin { padding: 0; letter-spacing: 0.08em; }
  .roles button { font-size: 13px; padding: 12px 10px; }
}

/* Room tape — newest at top; only .term-scroll scrolls */
html.tape-mode,
body.tape-mode {
  height: 100%;
  overflow: hidden;
}
body.tape-mode {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
}
body.tape-mode .top {
  flex: 0 0 auto;
}
body.tape-mode footer,
body.tape-mode .city-hero,
body.tape-mode #ranking-board,
body.tape-mode .how-compact {
  display: none !important;
}
body.tape-mode .shell {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  align-items: stretch;
  overflow: hidden;
  width: 100%;
  max-width: 1360px;
}
body.tape-mode .rail {
  overflow: auto;
  max-height: 100%;
  min-height: 0;
}
body.tape-mode main {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding-top: 12px;
  padding-bottom: 12px;
  overflow: hidden;
}
body.tape-mode #stage-tape,
body.tape-mode #stage-floor {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
#stage-tape,
#stage-floor { margin-bottom: 0; }

/* Floor fullscreen — hide chrome and fill viewport */
html.floor-fullscreen,
body.floor-fullscreen,
html.role-floor,
body.role-floor {
  height: 100%;
  overflow: hidden;
}
body.floor-fullscreen,
body.role-floor {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
}
body.floor-fullscreen .top,
body.role-floor .top,
body.floor-fullscreen .city-hero,
body.role-floor .city-hero,
body.floor-fullscreen #ranking-board,
body.role-floor #ranking-board,
body.floor-fullscreen footer,
body.role-floor footer {
  display: none !important;
}
/* Beat tape-mode's 1360px shell so Floor is edge-to-edge */
body.tape-mode.floor-fullscreen .shell,
body.tape-mode.role-floor .shell,
body.floor-fullscreen .shell,
body.role-floor .shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  height: 100%;
  max-height: none;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) !important;
}
body.floor-fullscreen .rail,
body.role-floor .rail {
  display: none !important;
}
body.floor-fullscreen main,
body.role-floor main {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  padding: 0 !important;
  overflow: hidden;
  width: 100%;
  max-width: none;
}
body.floor-fullscreen #stage-floor,
body.role-floor #stage-floor {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: none;
}
body.floor-fullscreen .floor,
body.role-floor .floor {
  height: 100%;
  min-height: 0;
  width: 100%;
  max-width: none;
  border-radius: 0;
  border: none;
}
body.floor-fullscreen .floor-fullscreen-btn,
body.role-floor .floor-fullscreen-btn {
  border-color: rgba(94, 234, 212, 0.45);
  color: var(--c-job, #5eead4);
}
.floor-leave-btn {
  flex-shrink: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
}
#floor:fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  border: none;
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(0, 180, 216, 0.08), transparent 60%),
    linear-gradient(180deg, #07111c 0%, #050b12 100%);
}
.floor-fullscreen-btn {
  flex-shrink: 0;
  min-width: 1.75rem;
  padding-inline: 6px;
  font-size: 13px;
  line-height: 1.2;
}

.term {
  --term-fg: #d7f5e3;
  --term-dim: rgba(215, 245, 227, 0.62);
  --term-mute: rgba(215, 245, 227, 0.34);
  --c-job: #5eead4;
  --c-claim: #7dd3fc;
  --c-result: #fbbf24;
  --c-attest: #4ade80;
  --c-attest-not: #fb7185;
  --c-brief: #c4b5fd;
  --c-hello: #94a3b8;
  --c-witness: #a8b4c4;
  --c-chat: #cbd5e1;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(0, 180, 216, 0.08), transparent 60%),
    linear-gradient(180deg, #07111c 0%, #050b12 100%);
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 8, 16, 0.72);
  color: var(--term-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.term-dots { display: inline-flex; gap: 5px; }
.term-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}
.term-dots i:nth-child(1) { background: #fb7185; }
.term-dots i:nth-child(2) { background: #fbbf24; }
.term-dots i:nth-child(3) { background: #4ade80; }
.term-title {
  color: var(--c-job);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.term-meta {
  margin-left: auto;
  color: var(--term-mute);
  font-size: 11px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 55%;
}
.term-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  display: block;
  padding: 12px 12px 16px;
  scroll-behavior: smooth;
  outline: none;
  scrollbar-gutter: stable;
}
.term-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.term-empty {
  margin: 24px 0;
  color: var(--term-mute);
  font-size: 13px;
  text-align: center;
}
.chat-thread {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-left: 3px solid var(--c-job);
  border-radius: 12px;
  background: rgba(6, 14, 24, 0.92);
  overflow: hidden;
  animation: chat-in 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.chat-thread.lone {
  border-style: solid;
  border-left-color: var(--c-brief);
  border-color: rgba(196, 181, 253, 0.22);
  background: rgba(8, 12, 24, 0.78);
}
.chat-thread-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 10px 12px;
  background: rgba(0, 180, 216, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.chat-thread.lone .chat-thread-head {
  background: rgba(196, 181, 253, 0.08);
}
.chat-thread-id {
  color: var(--c-job);
  font-weight: 700;
}
.chat-thread-id.lone { color: var(--c-brief); }
.chat-thread-cat {
  color: var(--term-mute);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.chat-thread-title {
  color: var(--term-dim);
  overflow-wrap: anywhere;
}
.chat-thread-msgs {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.chat-msg {
  --msg-accent: var(--c-chat);
  position: relative;
  padding: 9px 12px 10px 14px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  border-left: 3px solid var(--msg-accent);
  background: transparent;
  margin-left: 0;
  animation: chat-bubble 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--in-delay, 0ms);
}
.chat-msg:last-child { border-bottom: 0; }
.chat-msg.kind-job { --msg-accent: var(--c-job); background: color-mix(in srgb, var(--c-job) 6%, transparent); }
.chat-msg.kind-claim { --msg-accent: var(--c-claim); }
.chat-msg.kind-result { --msg-accent: var(--c-result); background: color-mix(in srgb, var(--c-result) 5%, transparent); }
.chat-msg.kind-attest { --msg-accent: var(--c-attest); background: color-mix(in srgb, var(--c-attest) 6%, transparent); }
.chat-msg.kind-attest.tone-not { --msg-accent: var(--c-attest-not); background: color-mix(in srgb, var(--c-attest-not) 6%, transparent); }
.chat-msg.kind-brief { --msg-accent: var(--c-brief); }
.chat-msg.kind-hello { --msg-accent: var(--c-hello); }
.chat-msg.kind-witness { --msg-accent: var(--c-witness); }
.chat-msg.kind-chat { --msg-accent: var(--c-chat); }
.chat-msg.dim {
  opacity: 0.46;
}
.chat-msg.dim .chat-text {
  color: var(--term-mute);
}
.chat-flag {
  margin-left: auto;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--term-mute);
  opacity: 0.9;
}
.chat-msg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
}
.chat-kind {
  color: var(--msg-accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 10px;
}
.chat-who {
  color: var(--term-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
}
.chat-seq {
  margin-left: auto;
  color: rgba(148, 163, 184, 0.45);
  font-variant-numeric: tabular-nums;
}
.chat-text {
  margin: 0;
  color: var(--term-fg);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
@keyframes chat-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes chat-bubble {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  /* Mobile tape: keep viewport lock, but give the terminal the remaining height.
     Desktop (≥901px) keeps the side-rail + term-scroll split unchanged. */
  body.tape-mode {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
  }
body.tape-mode .city-hero,
body.tape-mode #ranking-board,
body.tape-mode .how-compact {
  display: none !important;
}
  body.tape-mode .shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
    grid-template-columns: unset;
    grid-template-rows: unset;
  }
  body.tape-mode.role-floor .shell,
  body.tape-mode.floor-fullscreen .shell {
    max-width: none !important;
    width: 100% !important;
    margin-inline: 0 !important;
  }
  body.tape-mode .rail {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--line);
  }
  body.tape-mode.role-floor .rail,
  body.tape-mode.floor-fullscreen .rail {
    display: none !important;
  }
  body.tape-mode .rail .lede-rail,
  body.tape-mode .rail .stats,
  body.tape-mode .rail .rank-rail,
  body.tape-mode .rail .rail-links {
    display: none;
  }
  body.tape-mode .rail .roles {
    margin: 0;
    padding: 0;
    border-bottom: 0;
    gap: 6px;
  }
  body.tape-mode .rail .roles button {
    flex: 1 1 calc(33.33% - 6px);
    padding: 8px 6px;
    font-size: 12px;
    min-height: 40px;
  }
  body.tape-mode main {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 6px 10px max(8px, env(safe-area-inset-bottom));
  }
  /* Floor full-bleed must win over tape-mode mobile padding */
  body.tape-mode.role-floor main,
  body.tape-mode.floor-fullscreen main,
  body.tape-mode.floor-immersive main {
    padding: 0 !important;
  }
  body.tape-mode #stage-tape,
  body.tape-mode #stage-floor {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }
  body.tape-mode.role-floor #stage-floor,
  body.tape-mode.floor-fullscreen #stage-floor,
  body.tape-mode.floor-immersive #stage-floor {
    height: 100% !important;
  }
  body.tape-mode .term,
  body.tape-mode .floor {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }
  body.tape-mode.role-floor .floor,
  body.tape-mode.floor-fullscreen .floor,
  body.tape-mode.floor-immersive .floor {
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 0 !important;
  }
  /* Immersive overlay must keep fixed inset sizing — do not force height:100% on #floor */
  body.tape-mode #floor.floor-immersive,
  #floor.floor-immersive {
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
  }
  .floor-fullscreen-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 16px;
  }
  body.tape-mode .term-scroll,
  body.tape-mode .floor-scroll {
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
}
@media (max-width: 700px) {
  .term { border-radius: 10px; }
  .term-scroll { padding: 8px 8px 12px; }
  .chat-thread { border-radius: 10px; }
  .chat-who { max-width: 9rem; }
  .term-meta { max-width: 42%; font-size: 10px; }
  .floor-meta { max-width: 42%; font-size: 10px; }
}

/* Room floor — cocktail-party robot simulation (real tape replay) */
.floor {
  --term-fg: #d7f5e3;
  --term-dim: rgba(215, 245, 227, 0.62);
  --term-mute: rgba(215, 245, 227, 0.34);
  --c-job: #5eead4;
  --c-claim: #7dd3fc;
  --c-result: #fbbf24;
  --c-attest: #4ade80;
  --c-attest-not: #fb7185;
  --c-brief: #c4b5fd;
  --c-hello: #94a3b8;
  --c-human: #e879f9;
  --c-agent: #5eead4;
  --c-worker: #7dd3fc;
  --c-validator: #4ade80;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 12px;
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(0, 180, 216, 0.08), transparent 60%),
    linear-gradient(180deg, #07111c 0%, #050b12 100%);
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.floor-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 8, 16, 0.72);
  color: var(--term-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.floor-title {
  color: var(--c-job);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}
.floor-meta {
  margin-left: auto;
  color: var(--term-mute);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.floor-stats {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 8, 16, 0.72);
  color: var(--term-mute);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.floor-stats li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  text-align: center;
}
.floor-stats span {
  color: var(--term-fg);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}
.floor-stats li.flash span { color: var(--accent); }
.floor-scroll {
  flex: 1 1 auto;
  min-height: 280px;
  overflow: hidden;
  padding: 0;
  position: relative;
}
.floor-layout {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  min-height: 280px;
}
.floor-chat {
  flex: 0 0 20%;
  width: 20%;
  max-width: 20%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 8, 16, 0.88);
}
.floor-chat-head {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--c-job);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}
.floor-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.floor-chat-msg {
  --msg-accent: var(--c-agent);
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 8px;
  border-left: 2px solid var(--msg-accent);
  background: color-mix(in srgb, var(--msg-accent) 6%, rgba(2, 8, 16, 0.72));
  font-size: 10px;
  line-height: 1.35;
  animation: floor-chat-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.floor-chat-msg.tone-human { --msg-accent: var(--c-human); }
.floor-chat-msg.tone-agent { --msg-accent: var(--c-agent); }
.floor-chat-msg.tone-worker { --msg-accent: var(--c-worker); }
.floor-chat-msg.tone-result { --msg-accent: var(--c-result); }
.floor-chat-msg.tone-validator { --msg-accent: var(--c-validator); }
.floor-chat-msg-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 3px;
  min-width: 0;
}
.floor-chat-kind {
  flex: 0 0 auto;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--msg-accent);
  font-weight: 700;
}
.floor-chat-who {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  color: color-mix(in srgb, var(--msg-accent) 30%, var(--term-fg));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.floor-chat-text {
  margin: 0;
  color: color-mix(in srgb, var(--msg-accent) 10%, var(--term-fg));
  word-break: break-word;
}
@keyframes floor-chat-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.floor-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 280px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
.floor-viewport {
  flex: 1 1 auto;
  min-height: 360px;
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: grab;
  display: flex;
  flex-direction: column;
}
.floor-viewport.floor-viewport-dragging {
  cursor: grabbing;
}
.floor-viewport:has(.floor-bot:hover) {
  cursor: default;
}
.floor-room-pan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.floor-rail {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 12;
  width: min(220px, 42vw);
  max-height: min(280px, 46vh);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  background: linear-gradient(rgba(4, 16, 24, 0.92), rgba(3, 10, 18, 0.94));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  overflow: hidden;
}
.floor-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--term-mute);
}
.floor-rail-live {
  color: var(--c-job);
  font-size: 9px;
  letter-spacing: 0.06em;
}
.floor-rail-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  overflow: auto;
  flex: 1 1 auto;
}
.floor-rail-item,
.floor-rail-empty {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.floor-rail-empty {
  padding: 10px;
  color: var(--term-mute);
  font-size: 11px;
}
.floor-rail-item {
  display: grid;
  grid-template-columns: 16px 36px 1fr auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.floor-rail-item:hover {
  background: rgba(94, 234, 212, 0.08);
}
.floor-rail-item-selected {
  background: rgba(94, 234, 212, 0.14);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.28);
}
.floor-rail-n {
  color: var(--term-mute);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.floor-rail-tag {
  font-size: 9px;
  font-weight: 700;
  color: hsl(calc(var(--bot-hue, 180) * 1deg) 72% 72%);
}
.floor-rail-role {
  font-size: 9px;
  color: var(--term-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.floor-rail-rank {
  font-size: 8px;
  color: #fbbf24;
}
.floor-rail-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-job);
  font-variant-numeric: tabular-nums;
}
.floor-detail {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 13;
  width: min(320px, 88vw);
  max-height: min(360px, 52vh);
  overflow: auto;
  padding: 12px 12px 10px;
  border-radius: 10px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  background: linear-gradient(rgba(4, 16, 24, 0.95), rgba(3, 10, 18, 0.97));
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
}
.floor-detail-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--term-mute);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.floor-detail-close:hover { color: var(--term-dim); }
.floor-detail-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  padding-right: 20px;
}
.floor-detail-tag {
  font-size: 11px;
  font-weight: 800;
  color: hsl(calc(var(--bot-hue, 180) * 1deg) 72% 72%);
}
.floor-detail-role {
  font-size: 10px;
  color: var(--term-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.floor-detail-did {
  display: block;
  margin-bottom: 10px;
  font-size: 9px;
  color: var(--term-mute);
  word-break: break-all;
}
.floor-detail-msgs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.floor-detail-msg {
  padding: 8px;
  border-radius: 8px;
  border-left: 2px solid var(--msg-accent, var(--c-agent));
  background: rgba(2, 8, 16, 0.72);
}
.floor-detail-msg p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--term-dim);
}
.floor-detail-kind {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--msg-accent, var(--c-agent));
}
.floor-detail-empty {
  font-size: 11px;
  color: var(--term-mute);
}
.floor-ctl-on {
  border-color: rgba(94, 234, 212, 0.55);
  color: var(--c-job);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.18);
}
.floor-clean-view .floor-bar > :not(.floor-title):not(.term-dots):not(#floor-fullscreen):not(#floor-leave),
.floor-clean-view .floor-stats,
.floor-clean-view .floor-chat,
.floor-clean-view .floor-rail,
.floor-clean-view .floor-detail,
.floor-clean-view .floor-ticker {
  opacity: 0;
  pointer-events: none;
}
.floor-clean-view .floor-bar {
  background: transparent;
  border-color: transparent;
}
/* Immersive Floor — CSS fullscreen for iOS / when Fullscreen API is unavailable */
html.floor-immersive,
body.floor-immersive {
  overflow: hidden !important;
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overscroll-behavior: none;
  background: #050b12 !important;
}
body.floor-immersive .shell,
body.floor-immersive .rail {
  /* Floor is a fixed overlay; keep shell from painting around it */
  visibility: hidden !important;
}
body.floor-immersive #stage-floor,
body.floor-immersive #floor,
body.floor-immersive .floor.floor-immersive {
  visibility: visible !important;
}
#floor.floor-immersive,
.floor.floor-immersive {
  position: fixed !important;
  inset: 0 !important;
  top: var(--floor-vv-top, 0px) !important;
  right: var(--floor-vv-right, 0px) !important;
  bottom: var(--floor-vv-bottom, 0px) !important;
  left: var(--floor-vv-left, 0px) !important;
  z-index: 10000 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(0, 180, 216, 0.08), transparent 60%),
    linear-gradient(180deg, #07111c 0%, #050b12 100%);
}
#floor.floor-immersive .floor-scroll,
#floor.floor-immersive .floor-layout,
#floor.floor-immersive .floor-main,
#floor.floor-immersive .floor-viewport,
#floor.floor-immersive .floor-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
}
#floor.floor-immersive .floor-viewport {
  min-height: 0 !important;
}
#floor.floor-immersive #floor-fullscreen,
#floor.floor-immersive #floor-leave {
  opacity: 1 !important;
  pointer-events: auto !important;
}
.floor-body {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 360px;
}
.floor-ctl {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(8, 18, 32, 0.9);
  color: var(--term-dim, #d7f5e3);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.4;
}
.floor-ctl:hover { border-color: rgba(94, 234, 212, 0.45); }
.floor-agents-ctl {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.floor-agents-ctl select.floor-ctl {
  padding: 2px 6px;
  font-size: 10px;
  max-width: 7.5rem;
}
.floor-empty {
  margin: 24px 0;
  color: var(--term-mute);
  font-size: 13px;
  text-align: center;
}
.floor-party {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.floor-wait {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(2, 8, 16, 0.72);
  border: 1px solid rgba(94, 234, 212, 0.22);
  color: var(--term-mute);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  pointer-events: none;
}
.floor-room {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 360px;
  margin: 0;
  border-radius: 0;
  border: none;
  background:
    radial-gradient(640px 240px at 12% 0%, rgba(0, 180, 216, 0.07), transparent 58%),
    radial-gradient(520px 220px at 88% 100%, rgba(94, 234, 212, 0.05), transparent 55%),
    linear-gradient(180deg, #07111c 0%, #050b12 100%);
  overflow: hidden;
  image-rendering: pixelated;
}
.floor-room-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(148, 163, 184, 0.14) 0,
      rgba(148, 163, 184, 0.14) 1px,
      transparent 1px,
      transparent 12px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(148, 163, 184, 0.1) 0,
      rgba(148, 163, 184, 0.1) 1px,
      transparent 1px,
      transparent 12px
    );
}
.floor-room-center {
  display: none;
}
.floor-room-brand {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 1;
  pointer-events: none;
  color: var(--term-mute);
  opacity: 0.36;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  user-select: none;
}
.floor-job-city {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.floor-job-building {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  cursor: default;
  z-index: 5;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  transition: filter 0.25s ease, transform 0.25s ease;
}
.floor-job-building-roof {
  width: 32px;
  height: 10px;
  margin: 0 auto -1px;
  background: linear-gradient(180deg, rgba(94, 234, 212, 0.72), rgba(45, 212, 191, 0.45));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.floor-job-building-body {
  width: 28px;
  height: 22px;
  margin: 0 auto;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #2a4a5c 0%, #142a38 100%);
  border: 1px solid rgba(94, 234, 212, 0.42);
  box-shadow:
    inset 0 -5px 0 rgba(0, 180, 216, 0.18),
    0 0 10px rgba(94, 234, 212, 0.12);
}
.floor-job-building.status-open .floor-job-building-body {
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow:
    inset 0 -4px 0 rgba(94, 234, 212, 0.2),
    0 0 8px rgba(94, 234, 212, 0.15);
}
.floor-job-building.status-claimed .floor-job-building-body {
  border-color: rgba(125, 211, 252, 0.4);
}
.floor-job-building.cat-research .floor-job-building-roof { filter: hue-rotate(40deg); }
.floor-job-building.cat-review .floor-job-building-roof { filter: hue-rotate(90deg); }
.floor-job-building.cat-build .floor-job-building-roof { filter: hue-rotate(-30deg); }
.floor-job-building.cat-coordinate .floor-job-building-roof { filter: hue-rotate(160deg); }
.floor-job-building-tag {
  display: block;
  margin-top: 2px;
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--term-mute);
  opacity: 0.85;
}
.floor-job-building-live .floor-job-building-body,
.floor-job-building-live .floor-job-building-roof {
  animation: floor-building-pulse 1.2s ease-in-out infinite alternate;
}
.floor-job-building-live {
  z-index: 8;
  transform: translate(-50%, -100%) scale(1.08);
}
@keyframes floor-building-pulse {
  from {
    filter: brightness(1);
    box-shadow: inset 0 -4px 0 rgba(94, 234, 212, 0.15), 0 0 6px rgba(94, 234, 212, 0.2);
  }
  to {
    filter: brightness(1.35);
    box-shadow: inset 0 -4px 0 rgba(94, 234, 212, 0.35), 0 0 16px rgba(94, 234, 212, 0.55);
  }
}
.floor-lanes {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 65fr 20fr 15fr;
  pointer-events: none;
  z-index: 0;
}
.floor-lane {
  position: relative;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
}
.floor-lane[data-lane="agents"] {
  background: color-mix(in srgb, var(--c-agent) 3%, transparent);
}
.floor-lane[data-lane="workers"] {
  background: color-mix(in srgb, var(--c-worker) 4%, transparent);
}
.floor-lane[data-lane="validators"] {
  background: color-mix(in srgb, var(--c-validator) 4%, transparent);
}
.floor-lane:last-child {
  border-right: none;
}
.floor-lane-label {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--term-mute);
  opacity: 0.42;
  user-select: none;
  white-space: nowrap;
}
.floor-lane[data-lane="agents"] .floor-lane-label {
  color: color-mix(in srgb, var(--c-agent) 42%, var(--term-mute));
}
.floor-lane[data-lane="workers"] .floor-lane-label {
  color: color-mix(in srgb, var(--c-worker) 42%, var(--term-mute));
}
.floor-lane[data-lane="validators"] .floor-lane-label {
  color: color-mix(in srgb, var(--c-validator) 42%, var(--term-mute));
}
.floor-room-lanes .floor-bot {
  z-index: 8;
}
.floor-flow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  overflow: hidden;
}
.floor-shooting-star {
  --star-color: var(--c-agent, #5eead4);
  --star-glow: rgba(94, 234, 212, 0.55);
  position: absolute;
  width: 34px;
  height: 3px;
  margin-left: 0;
  margin-top: -1px;
  transform-origin: left center;
  transform: rotate(var(--star-angle, 0deg));
  background: linear-gradient(90deg, transparent 0%, var(--star-color) 42%, #fff 88%, transparent 100%);
  border-radius: 999px;
  box-shadow: 0 0 10px var(--star-glow);
  opacity: 0;
  animation: floor-shooting-star var(--star-ms, 760ms) cubic-bezier(0.18, 0.82, 0.28, 1) forwards;
}
.floor-shooting-star::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #fff;
  box-shadow: 0 0 12px var(--star-glow), 0 0 4px #fff;
}
.floor-shooting-star.tone-human {
  --star-color: var(--c-human, #e879f9);
  --star-glow: rgba(232, 121, 249, 0.55);
}
.floor-shooting-star.tone-agent {
  --star-color: var(--c-agent, #5eead4);
  --star-glow: rgba(94, 234, 212, 0.55);
}
.floor-shooting-star.tone-worker {
  --star-color: var(--c-worker, #7dd3fc);
  --star-glow: rgba(125, 211, 252, 0.55);
}
.floor-shooting-star.tone-result {
  --star-color: var(--c-result, #fbbf24);
  --star-glow: rgba(251, 191, 36, 0.55);
}
.floor-shooting-star.tone-validator {
  --star-color: var(--c-validator, #4ade80);
  --star-glow: rgba(74, 222, 128, 0.55);
}
@keyframes floor-shooting-star {
  0% {
    opacity: 0;
    transform: rotate(var(--star-angle, 0deg)) translateX(0);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--star-angle, 0deg)) translateX(var(--star-dist, 80px));
  }
}
.floor-room-crowded .pixel-bot {
  transform: scale(0.72);
}
.floor-room-crowded .floor-bot[data-facing="left"] .pixel-bot {
  transform: scaleX(-1) scale(0.72);
}
.floor-room-crowded .floor-bot:not(.speaking) .floor-agent-tag {
  opacity: 0.28;
  font-size: 6px;
}
.floor-room-crowded .floor-bot:not(.speaking) .pixel-bot {
  opacity: 0.42;
}
.floor-room-crowded .floor-bot.speaking {
  z-index: 30;
}
.floor-room-crowded .floor-bot.speaking .floor-agent-tag {
  opacity: 1;
  font-size: 8px;
}
.floor-bot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  z-index: 1;
  transition: z-index 0s;
  cursor: pointer;
}
.floor-bot.focused {
  z-index: 40;
}
.floor-bot.focused .pixel-bot {
  opacity: 1;
  filter:
    drop-shadow(0 0 10px hsl(calc(var(--bot-hue, 180) * 1deg) 88% 58% / 0.75))
    drop-shadow(0 0 22px hsl(calc(var(--bot-hue, 180) * 1deg) 90% 52% / 0.35))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}
.floor-bot.focused .floor-agent-tag {
  opacity: 1;
  color: hsl(calc(var(--bot-hue, 180) * 1deg) 78% 78%);
}
.floor-bot .pixel-bot,
.floor-bot .floor-agent-tag {
  transition: opacity 0.35s ease, filter 0.35s ease;
}
.floor-bot:not(.speaking) .pixel-bot {
  opacity: 0.58;
  filter: saturate(0.85) brightness(0.92) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.floor-bot:not(.speaking) .floor-agent-tag {
  opacity: 0.42;
}
.floor-bot.speaking {
  z-index: 20;
}
.floor-bot.speaking .pixel-bot {
  opacity: 1;
  filter:
    drop-shadow(0 0 8px hsl(calc(var(--bot-hue, 180) * 1deg) 90% 55% / 0.65))
    drop-shadow(0 0 18px hsl(calc(var(--bot-hue, 180) * 1deg) 85% 50% / 0.28))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  animation: floor-bot-glow 1.6s ease-in-out infinite alternate;
}
@keyframes floor-bot-glow {
  from {
    filter:
      drop-shadow(0 0 6px hsl(calc(var(--bot-hue, 180) * 1deg) 88% 52% / 0.5))
      drop-shadow(0 0 14px hsl(calc(var(--bot-hue, 180) * 1deg) 80% 48% / 0.22))
      drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  }
  to {
    filter:
      drop-shadow(0 0 12px hsl(calc(var(--bot-hue, 180) * 1deg) 92% 62% / 0.82))
      drop-shadow(0 0 24px hsl(calc(var(--bot-hue, 180) * 1deg) 88% 54% / 0.38))
      drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
  }
}
.floor-bot.speaking .floor-agent-tag {
  opacity: 1;
}
.floor-bot[data-facing="left"] .pixel-bot {
  transform: scaleX(-1);
}
.floor-bot-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.floor-rank-badge {
  position: absolute;
  top: -7px;
  right: -10px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgba(2, 8, 16, 0.94);
  border: 1px solid rgba(94, 234, 212, 0.5);
  color: var(--c-job);
  font-size: 8px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  z-index: 4;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.floor-rank-badge.tier-gold {
  border-color: #fbbf24;
  color: #fef3c7;
  background: rgba(28, 20, 4, 0.95);
}
.floor-rank-badge.tier-podium {
  border-color: #fcd34d;
  color: #fde68a;
  background: rgba(24, 20, 8, 0.94);
}
.floor-rank-badge.tier-silver {
  border-color: #94a3b8;
  color: #e2e8f0;
  background: rgba(12, 16, 24, 0.94);
}
.floor-rank-badge.tier-bronze {
  border-color: #d97706;
  color: #fdba74;
  background: rgba(24, 14, 6, 0.94);
}
.floor-bot-ranked:not(.speaking) .floor-rank-badge {
  opacity: 1;
}
.floor-bot.speaking .floor-rank-badge {
  box-shadow:
    0 0 0 1px rgba(94, 234, 212, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.6);
}
.floor-room-crowded .floor-rank-badge {
  min-width: 12px;
  height: 12px;
  font-size: 7px;
  line-height: 12px;
  top: -5px;
  right: -8px;
}
.floor-bot.walking .pixel-leg {
  animation: pixel-step 0.34s steps(2) infinite;
}
.floor-bot.walking .pixel-leg:last-child {
  animation-delay: 0.17s;
}
.floor-bot.speaking .pixel-bot-head .pixel-bot-eye {
  animation: bot-blink 0.42s ease-in-out infinite alternate;
}
.bot-bubble {
  --msg-accent: var(--c-agent);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 15rem;
  padding: 8px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--msg-accent) 9%, rgba(4, 10, 18, 0.98));
  border: 1px solid color-mix(in srgb, var(--msg-accent) 48%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--msg-accent) 12%, transparent),
    0 6px 18px rgba(0, 0, 0, 0.72),
    0 0 20px color-mix(in srgb, var(--msg-accent) 10%, transparent);
  animation: bubble-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: none;
  z-index: 2;
}
.bot-bubble.tone-human { --msg-accent: var(--c-human); }
.bot-bubble.tone-agent { --msg-accent: var(--c-agent); }
.bot-bubble.tone-worker { --msg-accent: var(--c-worker); }
.bot-bubble.tone-result { --msg-accent: var(--c-result); }
.bot-bubble.tone-validator { --msg-accent: var(--c-validator); }
.bot-bubble.fade { opacity: 0.88; }
.bot-bubble.speaking {
  border-color: color-mix(in srgb, var(--msg-accent) 68%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--msg-accent) 22%, transparent),
    0 8px 22px rgba(0, 0, 0, 0.78),
    0 0 24px color-mix(in srgb, var(--msg-accent) 16%, transparent);
}
.bot-bubble-kind {
  display: block;
  margin: 0 0 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--msg-accent);
}
.bot-bubble-text {
  margin: 0;
  font-size: 11px;
  line-height: 1.42;
  color: color-mix(in srgb, var(--msg-accent) 16%, var(--term-fg));
  overflow-wrap: anywhere;
}
.pixel-bot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 16px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}
.pixel-bot-antenna {
  width: 2px;
  height: 4px;
  background: hsl(calc(var(--bot-hue) * 1deg) 55% 62%);
  position: relative;
}
.pixel-bot-antenna::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: hsl(calc(var(--bot-hue) * 1deg) 75% 68%);
}
.floor-bot.speaking .pixel-bot-antenna::after {
  animation: bot-blink 0.5s ease-in-out infinite alternate;
}
.pixel-bot-head {
  width: 11px;
  height: 9px;
  margin-top: 1px;
  border-radius: 2px 2px 1px 1px;
  background: hsl(calc(var(--bot-hue) * 1deg) 22% 78%);
  border: 1px solid hsl(calc(var(--bot-hue) * 1deg) 28% 52%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.pixel-bot-eye {
  width: 2px;
  height: 2px;
  border-radius: 1px;
  background: #1a1a1a;
}
.pixel-bot-torso {
  width: 13px;
  height: 9px;
  margin-top: 1px;
  border-radius: 1px;
  background: hsl(calc(var(--bot-hue) * 1deg) 42% 46%);
  border: 1px solid hsl(calc(var(--bot-hue) * 1deg) 48% 36%);
}
.floor-bot.role-host .pixel-bot-torso {
  border-color: rgba(94, 234, 212, 0.65);
  box-shadow: 0 0 6px rgba(94, 234, 212, 0.25);
}

.floor-bot.role-orchestrator .pixel-bot-torso {
  border-color: rgba(125, 234, 255, 0.75);
  box-shadow: 0 0 8px rgba(240, 188, 95, 0.35), 0 0 2px rgba(125, 234, 255, 0.5);
  background: linear-gradient(180deg, hsl(188 55% 42%), hsl(42 60% 40%));
}
.floor-bot.role-orchestrator .floor-agent-tag {
  color: #7deaff;
  letter-spacing: 0.12em;
}
.floor-bot.role-orchestrator.speaking .pixel-bot-torso {
  box-shadow: 0 0 12px rgba(125, 234, 255, 0.55), 0 0 4px rgba(240, 188, 95, 0.45);
}

.pixel-bot-legs {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 1px;
}
.pixel-leg {
  width: 4px;
  height: 5px;
  border-radius: 0 0 1px 1px;
  background: hsl(calc(var(--bot-hue) * 1deg) 32% 30%);
  border: 1px solid hsl(calc(var(--bot-hue) * 1deg) 28% 22%);
}
.floor-bot.speaking .pixel-bot-torso {
  animation: bot-talk-torso 0.3s ease-in-out infinite alternate;
}
.floor-agent-tag {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--term-dim);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  line-height: 1;
}
.floor-bot.speaking .floor-agent-tag {
  color: var(--c-job);
}
@keyframes bubble-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(4px) scale(0.95); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes bot-blink {
  from { opacity: 0.5; }
  to { opacity: 1; }
}
@keyframes bot-talk-torso {
  from { transform: scaleY(1); }
  to { transform: scaleY(1.06); }
}
@keyframes pixel-step {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@media (max-width: 700px) {
  .floor-chat {
    flex-basis: 28%;
    width: 28%;
    max-width: 28%;
  }
  .floor-room { min-height: 0; }
  .bot-bubble { max-width: 11rem; font-size: 10px; }
  .floor-chat-msg { font-size: 9px; }
  /* Free vertical space for the brain on phones */
  .floor-stats {
    display: none !important;
  }
}

/* —— Flybrain radar HUD (FOMO-radar–inspired lobes) —— */
.floor-ticker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.28rem 0.7rem;
  border-bottom: 1px solid rgba(125, 234, 255, 0.14);
  background: linear-gradient(90deg, rgba(6, 14, 18, 0.95), rgba(10, 18, 22, 0.72));
  overflow: hidden;
  min-height: 1.7rem;
}
.floor-ticker-label {
  flex: 0 0 auto;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: #7deaff;
  opacity: 0.85;
}
.floor-ticker-track {
  flex: 1 1 auto;
  display: flex;
  gap: 1.4rem;
  white-space: nowrap;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.floor-ticker-item {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(215, 245, 227, 0.72);
  animation: floor-ticker-drift 28s linear infinite;
}
.floor-ticker-item strong {
  color: #f0bc5f;
  font-weight: 600;
}
.floor-ticker-item.tone-job { color: #7deaff; }
.floor-ticker-item.tone-claim { color: #9dffb0; }
.floor-ticker-item.tone-result { color: #f0bc5f; }
.floor-ticker-item.tone-attest { color: #ff9dce; }
@keyframes floor-ticker-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-35%); }
}
.floor-viewport {
  position: relative;
}
.floor-brain {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 12;
  --brain-cyan: #7deaff;
  --brain-amber: #f0bc5f;
  --brain-pink: #ff9dce;
  --brain-mint: #9dffb0;
}
.floor-brain[hidden] { display: none !important; }
.floor-brain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.floor-brain-neurons {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}
.floor-brain-neurons .floor-bot {
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(0.55);
  z-index: 5;
}
.floor-brain-neurons .floor-bot.speaking {
  z-index: 8;
  transform: translate(-50%, -50%) scale(0.72);
}
.floor-brain-neurons .floor-bot .floor-agent-tag {
  font-size: 0.42rem;
  letter-spacing: 0.03em;
  opacity: 0.65;
  max-width: 3.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.floor-brain-neurons .floor-bot:not(.speaking) .floor-agent-tag {
  opacity: 0.28;
}
.floor-brain-neurons .floor-bot.floor-neuron .neuron-bot {
  width: 14px;
  height: 14px;
}
.floor-brain-neurons .floor-bot.floor-neuron .neuron-soma {
  width: 8px;
  height: 8px;
}
.floor-brain .floor-flow-layer {
  z-index: 6;
}
.floor-brain-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 2;
}
.floor-brain-wires line {
  stroke: rgba(125, 234, 255, 0.28);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.floor-brain-wires circle.pulse-dot {
  fill: var(--brain-cyan);
  opacity: 0.9;
}
.floor-brain-core {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  border: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  z-index: 3;
  pointer-events: none;
}
.floor-brain-core-tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: rgba(232, 251, 255, 0.92);
  text-shadow: 0 0 12px rgba(125, 234, 255, 0.55);
}
.floor-brain-core-role {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 188, 95, 0.85);
  text-shadow: 0 0 8px rgba(240, 188, 95, 0.35);
}
.floor-brain.firing .floor-brain-core-tag {
  color: #fff;
  text-shadow: 0 0 18px rgba(125, 234, 255, 0.9), 0 0 8px rgba(240, 188, 95, 0.6);
}
.floor-brain-lobes {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}
.floor-brain-lobe {
  position: absolute;
  width: min(11.5rem, 28%);
  padding: 0.4rem 0.55rem 0.45rem;
  border: 1px solid rgba(125, 234, 255, 0.22);
  background: rgba(5, 10, 14, 0.72);
  backdrop-filter: blur(2px);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: rgba(215, 245, 227, 0.82);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}
.floor-brain-lobe[data-slot="tl"] { left: 2%; top: 6%; }
.floor-brain-lobe[data-slot="ml"] { left: 1.5%; top: 42%; }
.floor-brain-lobe[data-slot="bl"] { left: 2%; bottom: 8%; }
.floor-brain-lobe[data-slot="tr"] { right: 2%; top: 6%; }
.floor-brain-lobe[data-slot="mr"] { right: 1.5%; top: 42%; }
.floor-brain-lobe[data-slot="br"] { right: 2%; bottom: 8%; }
.floor-brain-lobe-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.floor-brain-lobe-name {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--brain-cyan);
}
.floor-brain-lobe-stat {
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: var(--brain-amber);
}
.floor-brain-lobe-body {
  font-size: 0.6rem;
  line-height: 1.35;
  color: rgba(215, 245, 227, 0.55);
  min-height: 1.6em;
}
.floor-brain-lobe-meter {
  margin-top: 0.35rem;
  height: 3px;
  background: rgba(215, 245, 227, 0.08);
  overflow: hidden;
}
.floor-brain-lobe-meter > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brain-cyan), var(--brain-amber));
  transition: width 0.35s ease;
}
.floor-brain-lobe.firing {
  border-color: rgba(255, 157, 206, 0.7);
  box-shadow: 0 0 14px rgba(255, 157, 206, 0.25);
}
.floor-brain-lobe.firing .floor-brain-lobe-name { color: var(--brain-pink); }
.floor-brain-lobe[data-lobe="dispatch"] .floor-brain-lobe-name { color: #7deaff; }
.floor-brain-lobe[data-lobe="claim"] .floor-brain-lobe-name { color: #9dffb0; }
.floor-brain-lobe[data-lobe="result"] .floor-brain-lobe-name { color: #f0bc5f; }
.floor-brain-lobe[data-lobe="attest"] .floor-brain-lobe-name { color: #ff9dce; }
.floor-brain-lobe[data-lobe="ingest"] .floor-brain-lobe-name { color: #b8c4ff; }
.floor-brain-lobe[data-lobe="score"] .floor-brain-lobe-name { color: #ffe08a; }

.floor-clean-view .floor-ticker,
.floor-clean-view .floor-brain {
  display: none !important;
}

@media (max-width: 820px) {
  .floor-brain-lobe {
    width: min(7.2rem, 38%);
    padding: 0.28rem 0.35rem;
    font-size: 0.65rem;
  }
  .floor-brain-lobe-body { display: none; }
  .floor-brain-lobe[data-slot="tl"] { left: 1%; top: 4%; }
  .floor-brain-lobe[data-slot="ml"] { left: 0.5%; top: 40%; }
  .floor-brain-lobe[data-slot="bl"] { left: 1%; bottom: 6%; }
  .floor-brain-lobe[data-slot="tr"] { right: 1%; top: 4%; }
  .floor-brain-lobe[data-slot="mr"] { right: 0.5%; top: 40%; }
  .floor-brain-lobe[data-slot="br"] { right: 1%; bottom: 6%; }
}

/* Flybrain full-bleed radar mode */
body.floor-fullscreen .floor-chat,
body.role-floor .floor-chat,
body.floor-fullscreen .floor-rail,
body.role-floor .floor-rail {
  display: none !important;
}
body.floor-fullscreen .floor-layout,
body.role-floor .floor-layout {
  grid-template-columns: 1fr !important;
}
body.floor-fullscreen .floor-main,
body.role-floor .floor-main {
  min-height: 0;
  height: 100%;
}
body.floor-fullscreen .floor-viewport,
body.role-floor .floor-viewport {
  min-height: calc(100dvh - 5.5rem);
  height: 100%;
}
body.floor-fullscreen .floor-ticker,
body.role-floor .floor-ticker {
  font-size: 0.75rem;
}
.floor-brain {
  z-index: 12 !important;
}
.floor-brain-particles {
  display: none !important;
}
.floor-brain-lobe {
  width: min(13rem, 30%) !important;
  background: rgba(4, 8, 12, 0.82) !important;
  border-color: rgba(125, 234, 255, 0.35) !important;
  box-shadow: 0 0 18px rgba(0,0,0,0.45), inset 0 0 12px rgba(125,234,255,0.05);
  z-index: 4;
}
.floor-brain-core {
  width: auto !important;
  height: auto !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.floor-bot.role-orchestrator {
  z-index: 8 !important;
  filter: drop-shadow(0 0 8px rgba(125, 234, 255, 0.65));
}
.floor-bot.role-orchestrator .floor-agent-tag {
  color: #7deaff !important;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.floor-bot.role-orchestrator .pixel-bot-torso {
  background: linear-gradient(180deg, #7deaff, #f0bc5f) !important;
  border-color: rgba(255,255,255,0.45) !important;
}



/* Floor houses + role lanes removed */
.floor-job-city,
.floor-job-building,
.floor-lanes,
.floor-lane,
.floor-lane-label {
  display: none !important;
}
.floor-room-lanes .floor-bot {
  /* lanes gone — keep bot styles via base .floor-bot */
}


/* Floor neuron agents + synapse message flights */
.floor-bot.floor-neuron .neuron-bot {
  position: relative;
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 6px hsl(calc(var(--bot-hue, 180) * 1deg) 90% 55% / 0.45));
}
.floor-bot.floor-neuron .neuron-soma {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff8, transparent 45%),
    radial-gradient(circle at 50% 50%, hsl(calc(var(--bot-hue, 180) * 1deg) 85% 62%), hsl(calc(var(--bot-hue, 180) * 1deg) 70% 38%));
  box-shadow: 0 0 10px hsl(calc(var(--bot-hue, 180) * 1deg) 90% 55% / 0.55);
}
.floor-bot.floor-neuron .neuron-nucleus {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}
.floor-bot.floor-neuron .neuron-dendrite {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 1.5px;
  border-radius: 1px;
  background: hsl(calc(var(--bot-hue, 180) * 1deg) 70% 58% / 0.75);
  transform-origin: left center;
}
.floor-bot.floor-neuron .neuron-dendrite.d1 { transform: rotate(-35deg); }
.floor-bot.floor-neuron .neuron-dendrite.d2 { transform: rotate(25deg); }
.floor-bot.floor-neuron .neuron-dendrite.d3 { transform: rotate(145deg); }
.floor-bot.floor-neuron .neuron-dendrite.d4 { transform: rotate(-140deg); }
.floor-bot.floor-neuron .neuron-axon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, hsl(calc(var(--bot-hue, 180) * 1deg) 80% 60%), transparent);
  transform: translate(0, -50%) rotate(18deg);
  transform-origin: left center;
  opacity: 0.85;
}
.floor-bot.floor-neuron.speaking .neuron-soma {
  animation: neuron-pulse 0.9s ease-in-out infinite alternate;
}
.floor-bot.floor-neuron.speaking .neuron-axon {
  animation: neuron-axon-fire 0.7s linear infinite;
}
@keyframes neuron-pulse {
  from { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
  to { transform: translate(-50%, -50%) scale(1.18); filter: brightness(1.25); }
}
@keyframes neuron-axon-fire {
  from { opacity: 0.35; filter: brightness(1); }
  to { opacity: 1; filter: brightness(1.6); }
}
.floor-bot.floor-neuron:not(.speaking) .neuron-bot {
  opacity: 0.72;
}
.floor-msg-flight {
  position: absolute;
  z-index: 30;
  transform: translate(-50%, -120%);
  pointer-events: none;
  display: flex;
  gap: 0.28rem;
  align-items: center;
  max-width: 14rem;
  padding: 0.18rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 234, 255, 0.35);
  background: rgba(4, 10, 16, 0.88);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: #d7f5e3;
  white-space: nowrap;
  overflow: hidden;
  animation: floor-msg-flight var(--flight-ms, 900ms) cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  box-shadow: 0 0 12px rgba(125, 234, 255, 0.25);
}
.floor-msg-flight-kind {
  color: #7deaff;
  font-weight: 700;
}
.floor-msg-flight-tag { color: #f0bc5f; }
.floor-msg-flight-text {
  color: rgba(215, 245, 227, 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
}
.floor-msg-flight.tone-worker { border-color: rgba(157, 255, 176, 0.45); }
.floor-msg-flight.tone-result { border-color: rgba(240, 188, 95, 0.5); }
.floor-msg-flight.tone-validator { border-color: rgba(255, 157, 206, 0.5); }
@keyframes floor-msg-flight {
  from { opacity: 0; transform: translate(-50%, -120%) translate(0, 0) scale(0.85); }
  12% { opacity: 1; }
  to { opacity: 0.15; transform: translate(-50%, -120%) translate(var(--flight-x), var(--flight-y)) scale(0.95); }
}
.floor-shooting-star.floor-synapse-fire {
  height: 2px;
  opacity: 0.95;
  box-shadow: 0 0 8px rgba(125, 234, 255, 0.65);
}
.floor-brain-lobe.firing {
  animation: lobe-receive 0.55s ease-out;
}
@keyframes lobe-receive {
  0% { box-shadow: 0 0 0 0 rgba(125, 234, 255, 0.0); }
  40% { box-shadow: 0 0 22px rgba(125, 234, 255, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(125, 234, 255, 0.0); }
}
