/* Trading floor — page chrome around the three.js canvas.
   No CSS variables elsewhere in the app; these are scoped to #floor-app.
   Two faces: JetBrains Mono for data, Barlow Condensed for titles and labels. */
#floor-app {
  --bg: #0a0c11; --panel-solid: #14171f; --ink: #10131a;
  --line: rgba(255, 255, 255, 0.08); --line-strong: rgba(255, 255, 255, 0.16); --glow: rgba(67, 255, 198, 0.35);
  /* Text on glass: the scene behind decides the contrast, so the greys are lighter than they would be on a solid
     panel. --dim is secondary text people read; --faint is only for things that are genuinely off. */
  --text: #eef0f6; --muted: #b4bccc; --dim: #8e97aa; --faint: #6c7383;
  --accent: #43ffc6; --accent2: #7c7af8; --up: #2fd67b; --down: #ff5c6c; --warn: #ffd166;
  --real: var(--real); --gold: #ffd166; --silver: #cfd6e4; --bronze: #d69a6a;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, monospace;
  --display: 'Barlow Condensed', 'JetBrains Mono', ui-monospace, sans-serif;
  /* One radius scale: chips, controls, panels, modals. */
  --r-xs: 4px; --r-sm: 8px; --r-md: 10px; --r: 14px; --r-lg: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.05) inset;

  /* ── Glass ── one material for everything that floats over the scene: panels, top bar, ticker, pills, hover card.
     --day (0 night … 1 noon) and --dusk (the horizon glow) are set by scene.js _updateDaylight. Clear at night;
     by day it tints and dims what is behind it, so light text keeps its contrast at every hour. */
  --day: 0; --dusk: 0;
  /* How hard the glass works: full daylight, or most of it through dusk, when the sky behind is a bright mid-tone. */
  --glass-k: max(var(--day), calc(0.7 * var(--dusk)));
  /* A floor of tint at every hour (clear glass left secondary text to the scene's mercy even at night), more by day. */
  --panel: rgba(15, 18, 25, calc(0.38 + 0.27 * var(--glass-k)));
  --glass: brightness(calc(1 - 0.45 * var(--glass-k)));
  --glass-filter: blur(16px) saturate(140%) var(--glass);
  --glass-line: rgba(255, 255, 255, calc(0.08 + 0.1 * var(--day)));
  /* The top edge catches the sky: cool moonlight at night, white by day, warm through dusk. */
  --sky-edge: color-mix(in srgb, #ffb070 calc(var(--dusk) * 100%), color-mix(in srgb, #ffffff calc(var(--day) * 100%), #8fb0ff));
  --glass-edge: color-mix(in srgb, var(--sky-edge) calc(22% + 18% * var(--dusk) + 10% * var(--day)), transparent);
  --halo: none; /* was 0 1px 2px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.55) */
  position: fixed; inset: 0; background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 12px; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
#floor-app * { box-sizing: border-box; }
#floor-app button, #floor-app input, #floor-app select, #floor-app textarea { font-family: var(--mono); font-size: 12px; color: var(--text); }
#floor-app ::-webkit-scrollbar { width: 8px; height: 8px; }
#floor-app ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: var(--r-xs); border: 2px solid transparent; background-clip: padding-box; }
#floor-app ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: padding-box; }
#floor-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#floor-canvas.grabbing { cursor: grabbing; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--muted); } .dim { color: var(--dim); } .accent { color: var(--accent); } .warn { color: var(--warn); }
@keyframes fl-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@keyframes fl-rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fl-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.fl-top { position: absolute; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; gap: 18px; padding: 0 16px; z-index: 20; pointer-events: none; text-shadow: var(--halo); }
/* The bar's glass runs 18px past it and fades out, so the bar settles into the scene instead of ending on a line. */
.fl-top::before { content: ""; position: absolute; inset: 0 0 -22px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(15, 18, 25, calc(0.28 * var(--glass-k))), rgba(15, 18, 25, 0)); backdrop-filter: blur(14px) saturate(140%) brightness(calc(1 - 0.3 * var(--glass-k))); -webkit-backdrop-filter: blur(14px) saturate(140%) brightness(calc(1 - 0.3 * var(--glass-k))); -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent); mask-image: linear-gradient(180deg, #000 45%, transparent); }
.fl-top > * { pointer-events: auto; }
.fl-brand { display: flex; align-items: center; gap: 10px; padding-right: 18px; border-right: 1px solid var(--line); height: 34px; flex: none; white-space: nowrap; }
.fl-brand .logo { width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; background: linear-gradient(135deg, rgba(67, 255, 198, 0.25), rgba(124, 122, 248, 0.25)); border: 1px solid rgba(67, 255, 198, 0.35); color: var(--accent); box-shadow: 0 0 18px rgba(67, 255, 198, 0.18); font-size: 13px; }
.fl-brand b { display: block; font-family: var(--display); font-size: 17px; letter-spacing: 0.14em; color: #fff; line-height: 1; font-weight: 700; }
.fl-brand span { display: block; color: var(--dim); font-size: 10px; margin-top: 4px; letter-spacing: 0.02em; }
.fl-stats { display: flex; gap: 22px; }
.fl-stat { display: flex; flex-direction: column; line-height: 1.1; min-width: 0px; gap: 3px; }
.fl-stat small { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--display); font-weight: 600; }
.fl-stat b { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.fl-stat b.up { color: var(--up); } .fl-stat b.down { color: var(--down); } .fl-stat b.accent { color: var(--accent); }
.fl-stat .delta { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); font-weight: 600; }
.fl-stat .delta.up { color: var(--up); background: rgba(47, 214, 123, 0.12); } .fl-stat .delta.down { color: var(--down); background: rgba(255, 92, 108, 0.12); }
.fl-stat .desks { display: inline-flex; gap: 2px; margin-left: 2px; }
.fl-stat .desks i { width: 5px; height: 7px; border-radius: 1.5px; background: rgba(255, 255, 255, 0.1); }
.fl-stat .desks i.on { background: var(--accent); box-shadow: 0 0 6px var(--glow); }
.fl-stat .bar { display: block; width: 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 1px; }
.fl-stat .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 2px; transition: width .4s; }
.fl-stat .bar i.hot { background: linear-gradient(90deg, var(--warn), var(--down)); }
.fl-stat .live { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); animation: fl-pulse 1.6s infinite; }
.fl-top .dim { color: var(--muted); }
.fl-spacer { flex: 1; }
.fl-actions { display: flex; gap: 6px; }
.fl-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); }
.fl-dot.on { background: var(--up); box-shadow: 0 0 8px var(--up); } .fl-dot.off { background: var(--down); box-shadow: 0 0 8px var(--down); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.fl-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-strong); color: var(--text); padding: 7px 12px; border-radius: var(--r-md); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s; display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.fl-btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.fl-btn.active { border-color: rgba(67, 255, 198, 0.6); color: var(--accent); background: rgba(67, 255, 198, 0.08); box-shadow: 0 0 0 1px rgba(67, 255, 198, 0.15) inset; }
.fl-btn.primary { background: linear-gradient(135deg, #43ffc6, #2ed3a5); border-color: transparent; color: #06140f; font-weight: 700; box-shadow: 0 6px 20px rgba(67, 255, 198, 0.25); }
.fl-btn.primary:hover { filter: brightness(1.08); }
.fl-btn.danger { border-color: rgba(255, 92, 108, 0.5); color: var(--down); }
.fl-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.fl-btn.sm { padding: 4px 8px; font-size: 11px; border-radius: var(--r-sm); }

/* ── Panels ──────────────────────────────────────────────────────────── */
.fl-panel { position: absolute; background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 30%), var(--panel); border: 1px solid var(--glass-line); border-top-color: var(--glass-edge); border-radius: var(--r); backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); text-shadow: var(--halo); z-index: 15; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.fl-panel h3 { margin: 0; padding: 10px 14px; font-family: var(--display); font-size: 14px; text-transform: uppercase; letter-spacing: 0.14em; color: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-weight: 600; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.fl-panel h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--accent), var(--accent2)); box-shadow: 0 0 10px var(--glow); flex: none; }
.fl-panel h3 .sub { font-family: var(--mono); font-size: 10px; color: var(--dim); text-transform: none; letter-spacing: 0; font-weight: 400; }
.fl-panel h3 .count { margin-left: auto; color: var(--dim); font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--mono); font-size: 10px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; flex: none; }
.fl-panel .body { overflow: auto; padding: 6px 0; flex: 1; }
/* Panels stop above the narration pill and the ticker (the bottom 84px belong to them). */
.fl-left { top: 66px; left: 14px; width: 340px; max-height: calc(100vh - 150px); }
.fl-right { top: 66px; right: 14px; width: 404px; max-height: calc(100vh - 150px); }
.fl-left.collapsed, .fl-right.collapsed { max-height: 50px; }
.fl-left.collapsed .body, .fl-right.collapsed .body, .fl-right.collapsed .ev-filter { display: none; }
.fl-h-toggle { margin-left: 4px; cursor: pointer; color: var(--dim); font-family: var(--mono); }
.fl-h-toggle:hover { color: var(--text); }

/* Leaderboard rows */
.lb-row { display: grid; grid-template-columns: 16px 34px minmax(0, 1fr) 40px auto; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; cursor: pointer; border-left: 2px solid transparent; transition: background .12s; }
.lb-row:hover { background: rgba(255, 255, 255, 0.035); }
.lb-row.peek { background: rgba(67, 255, 198, 0.06); }
.lb-row.selected { background: linear-gradient(90deg, rgba(67, 255, 198, 0.1), transparent); border-left-color: var(--accent); }
.lb-row .rank { font-family: var(--display); font-size: 13px; font-weight: 700; color: var(--dim); text-align: center; }
.lb-row .rank.r1 { color: var(--gold); } .lb-row .rank.r2 { color: var(--silver); } .lb-row .rank.r3 { color: var(--bronze); }
.face { border-radius: var(--r-sm); background: var(--ink) center / cover no-repeat; border: 1px solid var(--line-strong); position: relative; flex: none; }
.face i { position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink); }
.lb-row .face { width: 34px; height: 30px; }
.lb-row .name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lb-row .name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .name small { color: var(--dim); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row .name small em { font-style: normal; color: var(--accent2); }
.lb-row .mini { width: 40px; height: 20px; display: block; overflow: visible; }
.lb-row .mini path { fill: none; stroke: var(--faint); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lb-row .mini path.up { stroke: var(--up); } .lb-row .mini path.down { stroke: var(--down); }
.lb-row .num { text-align: right; line-height: 1.2; }
.lb-row .num b { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; } .lb-row .num small { display: block; color: var(--dim); font-size: 9.5px; white-space: nowrap; }
.lb-row.manager { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; }
.lb-row .tag { font-family: var(--display); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
/* The leaderboard's window toggle (1h ... 7d, All): one row of chips under each board's heading, a flex item that
   holds its height like .ev-filter. Seven chips fit the narrowest board (260px); past that the row scrolls. */
.lb-windows { display: flex; flex: none; gap: 3px; padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.lb-windows::-webkit-scrollbar { display: none; }
.lb-windows .chip { flex: 1 0 auto; margin: 0; padding: 2px 6px; text-align: center; cursor: pointer; user-select: none; white-space: nowrap; transition: color .12s, background .12s, border-color .12s; }
.lb-windows .chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.lb-windows .chip.on { color: var(--accent); border-color: rgba(67, 255, 198, 0.45); background: rgba(67, 255, 198, 0.1); }
.lb-windows.real .chip.on { color: var(--real, #ffb347); border-color: rgba(255, 179, 71, 0.55); background: rgba(255, 179, 71, 0.12); }
.fl-left.collapsed .lb-windows, .fl-card.collapsed .lb-windows { display: none; }
/* The leaderboard's tabs (Quants | Arms, app.js lbTab): one row above the window chips, on both boards. */
.lb-tabs { display: flex; flex: none; gap: 4px; padding: 6px 8px 0; }
.lb-tabs .chip { flex: 1 1 0; margin: 0; padding: 3px 8px; text-align: center; cursor: pointer; user-select: none; font-family: var(--display); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; transition: color .12s, background .12s, border-color .12s; }
.lb-tabs .chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.lb-tabs .chip.on { color: var(--accent); border-color: rgba(67, 255, 198, 0.45); background: rgba(67, 255, 198, 0.1); }
.fl-left.collapsed .lb-tabs, .fl-card.collapsed .lb-tabs { display: none; }
/* A window that reaches before the quant's first checkpoint (the server's `partial`): its figure dimmed, and since
   when it counts beside it. */
.lb-row .num.partial b { opacity: 0.55; }
.lb-row .num .since { font-style: normal; color: var(--faint); }
.lb-state { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-left: 5px; vertical-align: middle; }
.lb-state.thinking { background: var(--accent); box-shadow: 0 0 6px var(--glow); animation: fl-pulse 1s infinite; }
.lb-state.sleeping { background: var(--faint); }

/* Stat tiles, section titles, whiteboard notes */
.tiles { display: grid; grid-template-columns: 1fr 1fr; padding: 0 12px 2px; }
.tile { padding: 1px 12px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tile:first-child { padding-left: 0; } .tile + .tile { border-left: 1px solid var(--line-strong); }
.tile small { color: var(--dim); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em; font-family: var(--display); font-weight: 600; }
.tile b { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile b .dim { font-size: 13px; }
.mini-title { font-family: var(--display); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--dim); margin: 14px 0 6px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.mini-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.wb-note { position: relative; padding: 6px 8px 6px 10px; margin: 0 12px 6px; border-left: 2px solid var(--warn); background: rgba(255, 209, 102, 0.06); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted); line-height: 1.35; }
.wb-note b { color: var(--warn); font-weight: 600; }
.spark { width: 100%; height: 72px; display: block; }

/* Event feed */
/* flex: none is the fix, not a tidy-up. This row is a flex ITEM of the panel's
   column layout, so with a long body beside it the default flex-shrink: 1 let
   the browser compress it vertically — the pills flattened as the drawer grew.
   The row now holds its height; min-height on the pills holds theirs. */
.ev-filter { display: flex; flex: none; gap: 4px; padding: 8px 9px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ev-filter::-webkit-scrollbar { display: none; }
.ev-filter .fl-btn { padding: 4px 11px; font-size: 10.5px; border-radius: 999px; background: transparent; border-color: transparent; color: var(--muted); flex: none; min-height: 24px; box-sizing: border-box; }
.ev-filter .fl-btn:hover { background: rgba(255, 255, 255, 0.06); transform: none; }
.ev-filter .fl-btn.active { background: rgba(67, 255, 198, 0.1); color: var(--accent); border-color: rgba(67, 255, 198, 0.35); box-shadow: none; }
.ev-row { padding: 7px 12px 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.035); line-height: 1.4; display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; }
.ev-row .k { width: 20px; height: 20px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 9.5px; color: var(--dim); background: rgba(255, 255, 255, 0.04); margin-top: 1px; }
.ev-row .x { color: var(--muted); word-break: break-word; cursor: pointer; }
.ev-row .x .t { color: var(--dim); font-size: 10px; margin-right: 6px; }
.ev-row .x .who { color: var(--text); font-weight: 600; margin-right: 5px; }
.ev-row.trade .k { color: var(--up); background: rgba(47, 214, 123, 0.12); }
.ev-row.sell .k, .ev-row.bad .k { color: var(--down); background: rgba(255, 92, 108, 0.12); }
.ev-row.talk .k { color: var(--accent2); background: rgba(124, 122, 248, 0.14); }
.ev-row.narrate .k { color: var(--accent); background: rgba(67, 255, 198, 0.12); }
.ev-row.floor .k { color: var(--warn); background: rgba(255, 209, 102, 0.12); }
.ev-row.buy .x, .ev-row.deploy .x, .ev-row.adopt .x { color: var(--up); } .ev-row.sell .x { color: #ff8b95; }
.ev-row.say .x, .ev-row.dm .x, .ev-row.share .x, .ev-row.announce .x { color: var(--text); }
.ev-row.narrate .x { color: var(--accent); font-style: italic; }
.ev-row.hire .x, .ev-row.breed .x, .ev-row.tier .x, .ev-row.sponsor .x { color: var(--warn); }
.ev-row.bad .x { color: var(--down); }
.ev-row.work .x { color: var(--dim); }

/* Research board */
.fl-panel h3 .tabs2 { display: inline-flex; gap: 2px; flex: none; }
.fl-panel h3 .tabs2 span { cursor: pointer; padding: 3px 9px; border-radius: 999px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fl-panel h3 .tabs2 span:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.fl-panel h3 .tabs2 span.on { color: #fff; background: rgba(255, 255, 255, 0.08); }
.fl-panel h3 .tabs2 .pip { font-family: var(--mono); font-style: normal; font-size: 9.5px; padding: 1px 6px; border-radius: 999px; background: rgba(67, 255, 198, 0.15); color: var(--accent); letter-spacing: 0; }
.rs .row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rs-rep { display: grid; grid-template-columns: 16px 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 12px 6px 10px; cursor: pointer; }
.rs-rep:hover { background: rgba(255, 255, 255, 0.035); }
.rs-rep .rank { font-family: var(--display); font-weight: 700; color: var(--dim); text-align: center; }
.rs-rep .rank.r1 { color: var(--gold); } .rs-rep .rank.r2 { color: var(--silver); } .rs-rep .rank.r3 { color: var(--bronze); }
.rs-rep .face { width: 34px; height: 30px; }
.rs-rep .name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.rs-rep .name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-rep .name small { color: var(--dim); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-rep .score { font-family: var(--display); font-size: 16px; }
.rs-card { margin: 0 12px 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.03); display: flex; flex-direction: column; gap: 4px; }
.rs-card .row > b { font-family: var(--display); font-size: 14px; letter-spacing: 0.03em; flex: 1; }
.rs-results .row { padding: 2px 0; font-size: 11px; }
.rs-results .rank { width: 16px; font-family: var(--display); font-weight: 700; color: var(--dim); }
.rs-results .rank.r1 { color: var(--gold); } .rs-results .rank.r2 { color: var(--silver); } .rs-results .rank.r3 { color: var(--bronze); }
.rs-results .name { flex: 1; }
.rs-call { margin: 0 12px 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.03); cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.rs-call:hover { border-color: var(--line-strong); }
.rs-call .row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rs-call .face { width: 26px; height: 23px; border-radius: var(--r-sm); }
.rs-call b { font-weight: 700; }
.rs-call .dir { font-weight: 600; font-size: 11px; } .rs-call .dir.up { color: var(--up); } .rs-call .dir.down { color: var(--down); }
.rs-call .x { margin-left: auto; font-weight: 600; }
.rs-call .thesis { color: var(--muted); font-size: 11px; line-height: 1.35; }
.rs-call .bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.rs-call .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.rs-call .votes { display: inline-flex; gap: 6px; font-weight: 600; font-size: 11px; }
.rs-call .badge { font-family: var(--display); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding: 1px 6px; border-radius: var(--r-xs); background: rgba(255, 255, 255, 0.08); color: var(--muted); flex: none; }
.rs-call .badge.hit { background: rgba(47, 214, 123, 0.15); color: var(--up); } .rs-call .badge.miss { background: rgba(255, 92, 108, 0.15); color: var(--down); } .rs-call .badge.open { background: rgba(67, 255, 198, 0.15); color: var(--accent); }
.rs-call.done { padding: 6px 10px; }
.rs-call.done .row .dim { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-note.pb { border-left-color: var(--accent); background: rgba(67, 255, 198, 0.05); } .wb-note.pb b { color: var(--accent); } .wb-note.pb .chip { margin-left: 6px; }
.rs-pm { margin: 0 12px 6px; padding: 6px 10px; border-left: 2px solid var(--accent2); background: rgba(124, 122, 248, 0.06); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.rs-pm .row .dim { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; }
.rs-pm .thesis { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.35; }
.ev-row.research .k { color: var(--warn); background: rgba(255, 209, 102, 0.12); }
.ev-row.resolve .x, .ev-row.challenge\.result .x, .ev-row.payout .x { color: var(--text); }
.ev-row.playbook .x { color: var(--accent); }

/* Narration + ticker */
.fl-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 18; pointer-events: none; }
/* Showreel: the scene alone, for screen recording. Only the header's own button row stays, faded, so it can be stopped. */
.fl-showreel .fl-panel, .fl-showreel .fl-help, .fl-showreel .fl-bottom, .fl-showreel .fl-soundpill, .fl-showreel .fl-hover, .fl-showreel .fl-toast, .fl-showreel .fl-stats, .fl-showreel .fl-ledger, .fl-showreel .fl-viewers { display: none !important; }
.fl-showreel .fl-top::before { display: none; }
.fl-showreel .fl-top { background: none; border-bottom: none; opacity: 0.25; transition: opacity 0.2s; }
.fl-showreel .fl-top:hover { opacity: 1; }
.fl-ticker { height: 30px; background: rgba(15, 18, 25, calc(0.28 * var(--glass-k))); backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); border-top: 1px solid var(--glass-edge); text-shadow: var(--halo); overflow: hidden; white-space: nowrap; display: flex; align-items: center; }
.fl-ticker .track { display: inline-block; padding-left: 100%; animation: fl-scroll 70s linear infinite; }
/* .fl-bottom lets clicks through to the scene; the ticker takes them back so it can pause under the mouse (anywhere on the bar). */
.fl-ticker { pointer-events: auto; }
.fl-ticker:hover .track { animation-play-state: paused; }
.fl-ticker .it { display: inline-flex; align-items: center; gap: 8px; margin-right: 26px; color: var(--muted); }
.fl-ticker .it b { color: var(--text); font-weight: 600; padding: 1px 7px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.06); }
.fl-ticker .it .chg { font-weight: 600; } .fl-ticker .it.up .chg { color: var(--up); } .fl-ticker .it.down .chg { color: var(--down); }
.fl-ticker .it .meta { color: var(--dim); font-size: 10.5px; }

/* Agent drawer */
.fl-drawer { position: absolute; top: 66px; right: 14px; width: 800px; max-width: calc(100vw - 380px); max-height: calc(100vh - 150px); z-index: 25; }
.fl-drawer .head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent); }
.fl-drawer .head .face { width: 64px; height: 56px; border-radius: var(--r); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.fl-drawer .head .face i { width: 12px; height: 12px; right: -4px; bottom: -4px; }
.fl-drawer .head .t { flex: 1; min-width: 0; }
.fl-drawer .head .t b { font-family: var(--display); font-size: 20px; letter-spacing: 0.03em; font-weight: 700; }
.fl-drawer .head .t .sub { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.4; }
.fl-drawer .head .t .mood { color: var(--accent); }
.fl-drawer .close { cursor: pointer; color: var(--dim); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: var(--r-sm); }
.fl-drawer .close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.fl-tabs { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.fl-tabs .tab { padding: 6px 11px; cursor: pointer; color: var(--muted); border-radius: 999px; white-space: nowrap; font-size: 11px; border: 1px solid transparent; }
.fl-tabs .tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.fl-tabs .tab.on { color: var(--accent); background: rgba(67, 255, 198, 0.1); border-color: rgba(67, 255, 198, 0.35); }
.fl-drawer .tabbody { overflow: auto; padding: 12px 16px; flex: 1; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.kv > div { border-bottom: 1px solid var(--line); padding: 5px 2px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv > div span:first-child { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--display); font-weight: 600; }
.kv > div span:last-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; color: var(--dim); font-weight: 600; font-size: 10px; padding: 4px 6px; border-bottom: 1px solid var(--line); font-family: var(--display); letter-spacing: 0.08em; text-transform: uppercase; position: sticky; top: -12px; background: var(--panel-solid); }
.tbl td { padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); white-space: nowrap; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.tbl tr:hover td { background: rgba(255, 255, 255, 0.04); }
/* The leaderboard's Arms tab (app.js armsRows): every arm that closed a trade in the window, one table. It scrolls on
   its own, both ways, so its header stays put and a narrow board (260px, a phone) scrolls the columns under the arm's
   name instead of the page. After .tbl: the sticky name cell needs a solid background over the zebra rows. */
.arms-board { padding: 0 0 4px; }
.arms-board.stale .arms-scroll { opacity: 0.5; transition: opacity .2s; }
.arms-note { padding: 8px 12px; font-size: 11px; }
.arms-scroll { overflow: auto; max-height: min(56vh, 560px); overscroll-behavior: contain; }
.arms-tbl { font-size: 11px; }
.arms-tbl th { top: 0; z-index: 2; padding: 4px 5px; vertical-align: bottom; }
.arms-tbl th small { display: block; font-size: 9px; letter-spacing: 0.06em; }
.arms-tbl .sortable { cursor: pointer; user-select: none; }
.arms-tbl .sortable:hover { color: var(--text); }
.arms-tbl td { padding: 4px 5px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.arms-tbl td small { display: block; font-size: 9.5px; color: var(--dim); }
.arms-tbl td.up small, .arms-tbl td.down small { color: inherit; opacity: 0.8; }
.arms-tbl td small.warn { color: var(--warn); }
.arms-tbl td b { font-weight: 600; }
.arms-tbl th:first-child { position: sticky; left: 0; z-index: 3; }
.arms-tbl tbody tr td.arm { position: sticky; left: 0; z-index: 1; max-width: 118px; background: var(--panel-solid); }
.arms-tbl tbody tr:hover td.arm { background: #1a1e27; }
.arms-tbl td.arm b, .arms-tbl td.arm small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arms-tbl td.arm b { color: var(--text); }
.arm-chain { width: 11px; height: 11px; border-radius: var(--r-xs); vertical-align: -1px; margin-right: 4px; }
.arms-tbl .armdot { width: 6px; height: 6px; margin-right: 4px; }
.arms-tbl tr.clickable { cursor: pointer; }
.arms-tbl tbody tr.selected td { background: rgba(67, 255, 198, 0.08); }
.arms-tbl tbody tr.selected td.arm { background: #15262a; box-shadow: inset 2px 0 0 var(--accent); }
.arms-foot { padding: 6px 12px 2px; font-size: 10px; color: var(--dim); }
.code { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: #cfd6e4; max-height: 420px; overflow: auto; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--muted); font-size: 10px; margin: 0 4px 4px 0; }
.chip.ok { color: var(--up); border-color: rgba(47, 214, 123, 0.4); } .chip.bad { color: var(--down); border-color: rgba(255, 92, 108, 0.4); } .chip.acc { color: var(--accent); border-color: rgba(67, 255, 198, 0.4); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chips .chip { margin: 0; }
.file-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.file-list .chip { cursor: pointer; }
.file-list .chip.on { color: var(--accent); border-color: var(--accent); }
.tx { padding: 8px 10px; border-left: 2px solid var(--line); margin-bottom: 8px; background: rgba(255, 255, 255, 0.025); border-radius: 0 var(--r-md) var(--r-md) 0; }
.tx.assistant { border-left-color: var(--accent2); background: rgba(124, 122, 248, 0.06); } .tx.user { border-left-color: var(--line-strong); }
.tx .role { font-size: 10px; text-transform: uppercase; color: var(--dim); margin-bottom: 3px; letter-spacing: .1em; font-family: var(--display); font-weight: 600; }
.tx .tool { color: var(--warn); }
.tx .res { color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.tx .txt { white-space: pre-wrap; word-break: break-word; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.actions input, .actions textarea, .actions select { background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 7px 10px; min-width: 0; }
.actions textarea { width: 100%; min-height: 58px; resize: vertical; }
.actions input:focus, .actions textarea:focus, .actions select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67, 255, 198, 0.15); }

/* Modal */
.fl-modal-bg { position: absolute; inset: 0; background: rgba(4, 6, 10, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px 0; }
/* Header and footer stay put; only the form scrolls, so the buttons never leave the screen. */
.fl-modal { width: 720px; max-width: 94vw; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%), var(--panel-solid); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.fl-modal .mhead { padding: 18px 22px 8px; flex: none; }
.fl-modal .mbody { overflow: auto; padding: 6px 22px 12px; flex: 1 1 auto; min-height: 0; }
.fl-modal h2 { margin: 0 0 4px; font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.fl-modal .hint { color: var(--dim); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.form label, .form .field { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; }
.form label.wide { grid-column: 1 / -1; }
.form input, .form select, .form textarea { background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 8px 10px; }
.form input[type="color"] { padding: 3px; height: 34px; width: 60px; }
.form textarea { min-height: 72px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67, 255, 198, 0.15); }
.arche-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; grid-column: 1 / -1; }
.arche { padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; background: rgba(255, 255, 255, 0.03); display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, background .12s; }
.arche small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arche:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.arche .ic { width: 26px; height: 26px; border-radius: var(--r-sm); display: grid; place-items: center; background: rgba(124, 122, 248, 0.15); color: var(--accent2); font-size: 11px; margin-bottom: 2px; }
.arche.on { border-color: var(--accent); background: rgba(67, 255, 198, 0.07); box-shadow: 0 0 0 1px rgba(67, 255, 198, 0.2) inset; }
.arche.on .ic { background: rgba(67, 255, 198, 0.15); color: var(--accent); }
.arche b { display: block; font-size: 11.5px; }
.arche small { color: var(--dim); font-size: 10px; line-height: 1.3; display: block; }
.look-preview { display: flex; gap: 12px; align-items: center; }
.look-preview canvas { width: 104px; height: 91px; flex: none; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--ink); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.form textarea { min-height: 60px; }
.look-note { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 10.5px; line-height: 1.4; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 22px 16px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); flex: none; }
.modal-foot .cost { margin-right: auto; color: var(--dim); font-size: 11px; }
.err { color: var(--down); margin-top: 8px; }

/* Toast */
.fl-toast { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); background: var(--panel-solid); border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: var(--r-md); z-index: 50; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: fl-rise .25s ease-out; display: flex; gap: 10px; align-items: center; }
.fl-toast::before { content: "✓"; color: var(--accent); font-weight: 700; }
.fl-toast.err { border-color: rgba(255, 92, 108, 0.5); } .fl-toast.err::before { content: "!"; color: var(--down); }

/* Hover card for agents in the 3D scene */
.fl-hover { position: absolute; z-index: 30; pointer-events: none; background: var(--panel); backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); text-shadow: var(--halo); border: 1px solid var(--glass-line); border-top-color: var(--glass-edge); border-radius: var(--r-md); padding: 10px 12px; min-width: 240px; max-width: 320px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5); display: flex; gap: 10px; align-items: flex-start; }
.fl-hover .face { width: 44px; height: 38px; border-radius: var(--r-md); }
.fl-hover .t { min-width: 0; }
.fl-hover b { font-size: 13px; font-family: var(--display); letter-spacing: 0.03em; font-weight: 700; }
.fl-hover .l { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.35; }
.fl-help { position: absolute; left: 14px; bottom: 50px; z-index: 18; color: var(--dim); font-size: 10px; background: var(--panel); backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); text-shadow: var(--halo); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--glass-line); }

@media (max-width: 1100px) {
  .fl-left { width: 260px; } .fl-right { width: 300px; } .fl-drawer { width: 460px; max-width: calc(100vw - 28px); }
  .fl-stats { gap: 12px; } .fl-stat { min-width: 0px; }
}

/* Equity by window under the floor sparkline */
.fl-frames { display: flex; margin: 6px 12px 0; }
.fl-frames span { flex: 1; display: flex; flex-direction: column-reverse; align-items: center; gap: 1px; padding: 1px 4px; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: 0.02em; }
.fl-frames span + span { border-left: 1px solid var(--line-strong); }
.fl-frames span small { font-size: 9.5px; color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.fl-frames span.up { color: var(--up); }
.fl-frames span.down { color: var(--down); }

/* Review tab: dense tables for the per-source and per-strategy breakdowns.
   Numeric columns are tabular so figures line up down the column — the whole
   point of the panel is comparing one strategy generation against the next. */
.fl-table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }
.fl-table th { text-align: left; font-weight: 600; color: var(--dim); text-transform: lowercase; padding: 3px 6px 3px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fl-table td { padding: 3px 6px 3px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); white-space: nowrap; }
.fl-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.fl-table th:not(:first-child), .fl-table td:not(:nth-child(-n+2)) { text-align: right; }
/* Paper / real ledger switch and real badges */
.fl-stat.ledger b span { cursor: pointer; padding: 3px 9px; border-radius: var(--r-sm); opacity: 0.5; font-size: 12px; letter-spacing: 0.08em; font-family: var(--display); font-weight: 700; }
.fl-stat.ledger b span.on { opacity: 1; background: rgba(67, 255, 198, 0.16); color: var(--accent); }
.fl-stat.ledger b span.on.real { background: rgba(255, 179, 71, 0.2); color: var(--real); }
.chip.real { color: var(--real); border-color: rgba(255, 179, 71, 0.55); background: rgba(255, 179, 71, 0.12); }


/* The ledger switch: one control that flips the whole room between the paper
   ledger and the on-chain one. Deliberately the loudest thing in the top bar —
   every number on screen means something different depending on its position. */
.fl-ledger { display: flex; align-items: stretch; gap: 2px; padding: 3px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); flex: none; align-self: center; }
.fl-ledger span { display: flex; align-items: center; padding: 7px 16px; border-radius: var(--r-sm); cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.1em; color: var(--dim); transition: background 0.12s, color 0.12s; user-select: none; }
.fl-ledger span:hover { color: var(--text); }
.fl-ledger span.on { background: rgba(67, 255, 198, 0.18); color: var(--accent); box-shadow: 0 0 14px rgba(67, 255, 198, 0.18) inset; }
.fl-ledger span:last-child.on { background: rgba(255, 179, 71, 0.2); color: var(--real); box-shadow: 0 0 14px rgba(255, 179, 71, 0.18) inset; }
/* The real desk is off: still shown, still explains itself, visibly inert. */
.fl-ledger span.off { opacity: 0.35; cursor: not-allowed; }
.fl-ledger span.off:hover { color: var(--dim); }
.fl-ledger.realon { border-color: rgba(255, 179, 71, 0.45); }
/* House focus pill: the camera's home. Each name lights in its own house's accent (--hc, set inline). */
.fl-house { display: flex; align-items: stretch; gap: 2px; padding: 3px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); flex: none; align-self: center; }
.fl-house span { display: flex; align-items: center; padding: 7px 12px; border-radius: var(--r-sm); cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.1em; color: var(--dim); transition: background 0.12s, color 0.12s; user-select: none; }
.fl-house span:hover { color: var(--text); }
.fl-house span.on { color: var(--hc, var(--accent)); background: color-mix(in srgb, var(--hc, var(--accent)) 18%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--hc, var(--accent)) 18%, transparent) inset; }

/* Live viewers, top right. The page is public now, so this is the only signal
   on screen that anyone is actually watching the floor. */
.fl-viewers { display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); flex: none; align-self: center; font-size: 12px; }
.fl-viewers i { color: var(--accent); font-size: 11px; }
.fl-viewers b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Phones only (window.FLOOR_PHONE, set by the redirect script in trading-house.html): the way back to the phone
   view. The page lays out 1024 px wide and a phone shows it scaled down, so every size is multiplied by --tap
   (layout px per screen px, app.js _measurePhoneTap) to keep a 44 px target under the thumb. It hangs under the
   header on the left, clear of the rail, the drawer and the canvas's own controls; with the panels UI it moves
   right of the leaderboard (260 px wide at this layout width). */
#floor-app .fl-mobile-view { position: absolute; top: calc(100% + 10px); left: 14px; display: inline-flex; align-items: center; gap: calc(8px * var(--tap, 1));
  min-height: calc(44px * var(--tap, 1)); padding: 0 calc(16px * var(--tap, 1)); border-radius: 999px; font-family: var(--mono); font-size: calc(14px * var(--tap, 1)); font-weight: 600; line-height: 1;
  color: var(--text); background: var(--panel); border: 1px solid var(--glass-line); border-top-color: var(--glass-edge); box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); white-space: nowrap; cursor: pointer; }
#floor-app .fl-mobile-view i { color: var(--accent); }
#floor-app:not(.ui-cards) .fl-mobile-view { left: 286px; }

/* Flex-shrink guards for the panels and the drawer.
   .fl-panel is a flex column whose scroll area carries flex:1. Every other
   child defaults to flex-shrink:1, so once the body overflowed the flex
   algorithm compressed the headers and the action rows to make room — buttons
   lost their vertical padding and collapsed to slivers. Only the scroll area
   may absorb overflow; the chrome around it keeps its intrinsic height. */
.fl-panel > h3,
.fl-panel > .actions,
.fl-drawer .head,
.fl-drawer .fl-tabs { flex: none; }

/* And horizontally: a button in a wrapped .actions row is a flex item, so a
   crowded row squeezed it narrower than its own padding. Buttons and their
   inline labels size to content and wrap instead of shrinking. */
.actions > .fl-btn,
.actions > button,
.actions > span,
.fl-actions > .fl-btn { flex: 0 0 auto; }
.fl-btn { flex: none; }

/* Drafted personas in the hire modal: written characters offered whole. */
.drafts { margin-bottom: 6px; }
.draft-row { display: flex; flex-wrap: wrap; gap: 6px; }
.draft-row .fl-btn { flex: 0 0 auto; background: rgba(255, 255, 255, 0.04); }

/* Sound: a compact pill bottom-right (where the house radio was), opening the sound modal. */
.fl-soundpill { position: absolute; right: 14px; bottom: 32px; z-index: 24; display: flex; align-items: center; gap: 8px; max-width: 460px; padding: 5px 7px 5px 5px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--glass-line); border-top-color: var(--glass-edge); box-shadow: var(--shadow); backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); text-shadow: var(--halo); }
.fl-soundpill.on { border-color: rgba(67, 255, 198, 0.4); }
.fl-soundpill .art-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.05); color: var(--dim); font-size: 12px; flex: none; }
.fl-soundpill.on .art-icon { color: var(--accent); }
.fl-soundpill .txt { display: flex; align-items: baseline; gap: 7px; min-width: 0; cursor: pointer; overflow: hidden; }
.fl-soundpill .txt small { color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--display); font-weight: 600; white-space: nowrap; flex: none; }
.fl-soundpill .txt b { font-size: 12px; white-space: nowrap; }
.fl-soundpill .fl-btn { flex: none; padding: 3px 8px; font-size: 11px; }
/* The welcome (first visit) and the sound modal. */
.fl-welcome { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 9px; }
.fl-welcome li { font-size: 12.5px; line-height: 1.5; color: var(--muted); padding-left: 14px; position: relative; }
.fl-welcome li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.fl-welcome li b { color: var(--text); font-weight: 600; }
.fl-sound-rows { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 12px; background: rgba(255, 255, 255, 0.02); }
.fl-sound-rows .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; font-size: 12.5px; cursor: pointer; }
.fl-sound-rows .row + .row { border-top: 1px solid var(--line); }
.fl-sound-rows .row small { display: block; color: var(--dim); font-size: 10.5px; margin-top: 2px; }
.fl-sound-rows .row.off { opacity: 0.45; }
.fl-sound-rows input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.fl-sound-rows input[type="range"] { width: 180px; accent-color: var(--accent); }
.fl-enter { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* Modal close: an X in the corner of the header, so the footer does not need a
   button just to dismiss. Sits above the header padding, not in the flow. */
.fl-modal .mhead { position: relative; }
.fl-modal .mclose { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; transition: background 0.12s, color 0.12s; }
.fl-modal .mclose:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }

/* ── Boot overlay ──────────────────────────────────────────────────────────
   Covers the black canvas while textures land. Sits above the scene and below
   nothing else; pointer-events off once it starts fading so a fast load never
   swallows the first click. */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 40%, #0d1620 0%, #05080b 70%);
  transition: opacity .55s ease, visibility .55s ease;
}
.boot--out { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; min-width: 260px; }
.boot__house {
  font: 700 26px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .34em; text-indent: .34em; color: var(--house-accent, #43ffc6);
  text-shadow: 0 0 26px rgba(67, 255, 198, .45);
  animation: boot-pulse 2.4s ease-in-out infinite;
}
.boot__bar { width: 260px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.boot__fill {
  height: 100%; border-radius: 2px; background: linear-gradient(90deg, #2b8f74, var(--house-accent, #43ffc6));
  box-shadow: 0 0 14px rgba(67, 255, 198, .6); transition: width .3s ease;
}
.boot__pct { font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; color: #6f7f8c; text-transform: uppercase; }
.boot__hint { color: #47565f; }
@keyframes boot-pulse { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .boot__house { animation: none; }
  .boot, .boot__fill { transition: none; }
}

/* Wide tables scroll inside themselves. `.fl-panel .body` is overflow:auto, so
   a single long cell (a strategy name like ev-nojul8-q1-adapt, with nowrap on
   every cell) used to push the ENTIRE panel body sideways, dragging the
   mini-titles and headings out of view with it. Scoping the scroll to the table
   keeps the panel still. A wrapper rather than `display:block` on the table
   itself: the table keeps width:100% and stretches when it fits, and a table
   never shrinks below min-content, so it overflows into this box when it does
   not. display:block would have made every narrow table shrink-to-fit instead.
   Named -xscroll, NOT -scroll: `fl-scroll` is already an @keyframes used by the
   ticker, and two meanings for one name is how the next person loses an hour. */
.fl-xscroll { overflow-x: auto; max-width: 100%; }
.fl-xscroll::-webkit-scrollbar { height: 6px; }
.fl-xscroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: var(--r-xs); }

/* Token links in both ledgers. The real ledger had none — only paper did — so a
   real position could not be opened on gmgn without copying the address by hand.
   Light green rather than the accent mint: the accent already marks interactive
   chrome (buttons, the logo), and a ticker is a link to a page, not a control. */
.tok { color: #8ef2b4; text-decoration: none; border-bottom: 1px solid rgba(142, 242, 180, 0.28); }
.tok:hover { color: #b6f8cf; border-bottom-color: rgba(182, 248, 207, 0.6); }

/* An active blacklist entry. Warn-coloured rather than red: the token is barred
   from real buys, which is a deliberate operator state, not an error. */
.fl-btn.sm.on { color: var(--warn); border-color: rgba(255, 209, 102, 0.45); background: rgba(255, 209, 102, 0.10); }

/* ── Pulse ────────────────────────────────────────────────────────────────
   Vital signs, not a log. The feed says what happened; this says whether the
   floor is alive — who is still writing things down and who is still reaching
   whom. Every value comes from floor.pulse(); nothing here is computed on the
   page beyond a bar scale. */
.body.pulse { padding: 0 12px 14px; }
.pu-pad { padding: 0 2px; }

.pu-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 0 4px; }
.pu-stat { padding: 1px 6px; text-align: center; }
.pu-stat + .pu-stat { border-left: 1px solid var(--line-strong); }
.pu-stat b { display: block; font-family: var(--display); font-size: 21px; line-height: 1.1; font-weight: 600; }
.pu-stat small { display: block; margin-top: 2px; font-family: var(--display); font-weight: 600; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }

/* A two-column summary line: a label on the left, one number on the right.
   .pu-row is a 4-column AGENT grid (face / name / bar / count) and putting a
   two-span row in it silently pushes the number into the bar column. */
/* Which floor a Pulse row belongs to. Only the non-primary chain is marked:
   tagging every Robinhood row too would be noise on a floor that is mostly
   Robinhood. */
.pu-chain { width: 11px; height: 11px; vertical-align: -1px; margin-left: 5px; opacity: .85; border-radius: 2px; }
.pu-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.035); }
.pu-line b { font-variant-numeric: tabular-nums; }
.pu-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px 0 8px; }
.pu-tag { font-size: 10.5px; letter-spacing: .02em; padding: 2px 7px; border-radius: var(--r-xs); background: rgba(255, 255, 255, 0.07); white-space: nowrap; }
.pu-tag em { font-style: normal; opacity: .6; margin-left: 3px; }
.pu-row { display: grid; grid-template-columns: 22px 1fr 64px auto; gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.035); cursor: pointer; }
.pu-row:hover { background: rgba(255, 255, 255, 0.025); }
.pu-row .face { width: 22px; height: 22px; border-radius: var(--r-sm); position: relative; overflow: hidden; }
.pu-name { min-width: 0; }
.pu-name b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pu-name small { display: block; font-size: 10px; color: var(--dim); }
/* A desk that only ever receives is a real failure mode here, not a style. */
.pu-name small.warn { color: var(--warn); }
.pu-bar { height: 6px; border-radius: var(--r-xs); background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.pu-bar i { display: block; height: 100%; border-radius: var(--r-xs); }
.pu-num { font-family: var(--display); font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Sent above received, same scale, so an imbalance is visible without reading. */
.pu-split { display: grid; gap: 2px; }
.pu-split i { display: block; height: 5px; border-radius: var(--r-xs); min-width: 2px; }
.pu-split i.s { background: var(--acc, #7ad); }
.pu-split i.r { background: rgba(255, 255, 255, 0.18); }

.pu-edge { display: grid; grid-template-columns: 58px 1fr 58px auto; gap: 8px; align-items: center; padding: 5px 2px; font-size: 11px; }
.pu-from, .pu-to { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pu-to { color: var(--muted); }
.pu-arrow { position: relative; height: 6px; border-radius: var(--r-xs); background: rgba(255, 255, 255, 0.06); }
.pu-arrow i { display: block; height: 100%; border-radius: var(--r-xs); background: var(--acc, #7ad); opacity: 0.75; }
.pu-arrow em { position: absolute; right: -2px; top: -7px; font-style: normal; font-size: 10px; color: var(--dim); }
.pu-n { font-size: 10px; color: var(--dim); white-space: nowrap; }
/* The Pulse sections with nothing in them yet, folded into one line (app.js pulseEmpty). */
.pu-quiet { margin: 14px 2px 2px; padding: 8px 10px; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.04); color: var(--dim); font-size: 11px; display: flex; align-items: center; gap: 8px; }
.pu-quiet i { color: var(--accent2); font-size: 10px; }

/* Chains: the per-chain desks in the header, the logo house toggle, the chain mark on a quant's face. */
.fl-chains { display: inline-flex; gap: 10px; align-items: center; }
.fl-chain { display: inline-flex; align-items: center; gap: 4px; }
.fl-chain img { width: 14px; height: 14px; border-radius: var(--r-xs); }
.fl-house span img { width: 18px; height: 18px; border-radius: var(--r-xs); display: block; }
.fl-house span { display: inline-flex; align-items: center; }
.fl-house span:not(.on) img { opacity: 0.55; filter: grayscale(0.4); }
/* Papertrade's button wears its paper beige (the favicon's tile), not the helicopter's mint. The inline --hc is
   the house accent, so the override needs !important. */
.fl-house span[data-chain="papertrade"] { --hc: #f4ecd8 !important; }
.fl-house span.on[data-chain="papertrade"] { background: color-mix(in srgb, #f4ecd8 42%, transparent); box-shadow: 0 0 14px rgba(244, 236, 216, 0.3) inset, 0 0 0 1px rgba(244, 236, 216, 0.55) inset; }
.lb-row .face { position: relative; }
.lb-chain { position: absolute; right: -4px; bottom: -4px; width: 13px; height: 13px; border-radius: var(--r-xs); box-shadow: 0 0 0 2px var(--ink); }
.fl-house.hire-chain { margin: 8px 0 4px; align-self: flex-start; }
.fl-house.hire-chain span { gap: 7px; }
.fl-house.hire-chain small { font-family: var(--mono, inherit); font-weight: 400; letter-spacing: 0; opacity: 0.7; }
/* The header's Hire: the mint gradient read as a blank light slab in the dark bar. */
.fl-btn.primary.hire { background: linear-gradient(135deg, #0f5a47, #0a3f33); border: 1px solid rgba(67, 255, 198, 0.45); color: #c9fff0; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.fl-btn.primary.hire:hover { filter: none; background: linear-gradient(135deg, #137058, #0d4d3e); }
.fl-btn.primary.hire:disabled { opacity: 0.5; }

/* ── Motion and focus ─────────────────────────────────────────────────────
   A figure that changes pulses once (the v-flash directive in app.js). */
/* A glow on the figure itself, not a background: a background needed a radius, and on an element that also draws a
   divider (the 1H/6H row) the radius curved the divider's ends. */
@keyframes fl-flash-up { from { text-shadow: 0 0 10px rgba(47, 214, 123, 0.95), 0 0 2px rgba(47, 214, 123, 0.9); } }
@keyframes fl-flash-down { from { text-shadow: 0 0 10px rgba(255, 92, 108, 0.95), 0 0 2px rgba(255, 92, 108, 0.9); } }
.fl-flash-up { animation: fl-flash-up 0.9s ease-out; }
.fl-flash-down { animation: fl-flash-down 0.9s ease-out; }

/* Keyboard focus: one accent ring, only for keyboard navigation (never on a mouse click). */
#floor-app :focus { outline: none; }
#floor-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }
#floor-app .lb-row:focus-visible { outline-offset: -2px; }

@media (prefers-reduced-motion: reduce) {
  #floor-app *, #floor-app *::before, #floor-app *::after { animation: none !important; transition-duration: 0.01ms !important; }
  /* The ticker stops scrolling and becomes a strip you can scroll by hand. */
  .fl-ticker { overflow-x: auto; scrollbar-width: none; }
  .fl-ticker .track { padding-left: 14px; }
}

/* ── PROTOTYPE: the card UI (?ui=cards) ───────────────────────────────────
   Quant tags ride on the avatars; floor-level cards stack in a rail on the right; a quant opens as a card
   grown out of its tag. Everything here is scoped to .ui-cards / .fl-rail.on / .fl-tag, so the panels UI
   is untouched. */
.fl-rail { display: contents; }
.fl-rail.on { --rail-w: 380px; display: flex; flex-direction: column; gap: 10px; position: absolute; z-index: 15; overflow-y: auto; scrollbar-width: none; pointer-events: none;
  /* The rail scrolls, and a scroller clips whatever paints outside it: the cards' shadows (--shadow, 0 24px 60px)
     were cut at its edges. The padding is room for them to fall into; the offsets undo it, so the cards sit
     exactly where they did (top 66px, right 14px, --rail-w wide). The padding takes no clicks (pointer-events). */
  --sh-x: 48px; --sh-top: 12px; --sh-bottom: 72px;
  padding: var(--sh-top) var(--sh-x) var(--sh-bottom);
  top: calc(66px - var(--sh-top)); right: calc(14px - var(--sh-x)); width: calc(var(--rail-w) + 2 * var(--sh-x));
  max-height: calc(100vh - 150px + var(--sh-top) + var(--sh-bottom)); }
.fl-rail.on::-webkit-scrollbar { display: none; }
.fl-rail.on > * { pointer-events: auto; }
.fl-rail.on .fl-panel { position: relative; inset: auto; width: auto; flex: none; max-height: 70vh; transition: max-height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fl-rail.on .fl-right { max-height: 62vh; }
.fl-rail.on .fl-panel.collapsed { max-height: 44px; }
.fl-rail.on .fl-panel h3 { padding: 11px 14px; }
.fl-card h3 { cursor: pointer; user-select: none; }
.fl-card h3:hover .fl-h-toggle { color: var(--text); }
/* A collapsed card's one-line headline: whatever makes it worth opening. */
.fl-panel h3 .head { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); cursor: pointer; }
.fl-panel h3 .head.up { color: var(--up); } .fl-panel h3 .head.down { color: var(--down); }
.fl-panel h3 .head small { font-size: 10px; opacity: 0.8; }
.ui-cards .fl-right.collapsed h3 .count { display: none; }

/* Tags: a glass pill above each quant, placed every frame by app.js _placeTags. */
.fl-tags { position: absolute; inset: 0; z-index: 12; pointer-events: none; overflow: hidden; }
.fl-tag { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; transform-origin: 50% 100%; will-change: transform; display: flex; flex-direction: column-reverse; align-items: center; }
.fl-tag:hover, .fl-tag.open, .fl-tag.sel { z-index: 2000 !important; }
.fl-tag-pill { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 999px; white-space: nowrap; font-size: 11px;
  background: rgba(12, 15, 21, 0.62); backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid var(--glass-line); border-top-color: color-mix(in srgb, var(--qc, #fff) 60%, transparent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, border-color 0.2s; }
.fl-tag:hover .fl-tag-pill, .fl-tag.open .fl-tag-pill { transform: translateY(-2px) scale(1.06); }
.fl-tag.sel .fl-tag-pill { border-color: color-mix(in srgb, var(--qc, #fff) 85%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--qc, #fff) 35%, transparent), 0 6px 18px rgba(0, 0, 0, 0.35); }
.fl-tag-pill .face { width: 22px; height: 22px; border-radius: 50%; border-color: color-mix(in srgb, var(--qc, #fff) 60%, transparent); }
.fl-tag-pill b { font-family: var(--display); font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; }
.fl-tag-pill .pnl { font-family: var(--display); font-size: 13px; font-weight: 600; }
.fl-tag-pill .tag-mgr { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.fl-tag .lb-state { margin-left: -2px; }
/* The mini card grows out of the pill (a 0fr -> 1fr row, so it animates to its own height). */
.fl-tag-more { display: grid; grid-template-rows: 0fr; opacity: 0; pointer-events: none; margin-bottom: 6px; transition: grid-template-rows 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s; }
.fl-tag:hover .fl-tag-more, .fl-tag.open .fl-tag-more { grid-template-rows: 1fr; opacity: 1; pointer-events: auto; }
.fl-tag-more > div { overflow: hidden; min-height: 0; width: 224px; border-radius: var(--r-md); padding: 0 11px;
  background: rgba(12, 15, 21, 0.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-line); border-top-color: color-mix(in srgb, var(--qc, #fff) 60%, transparent); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.fl-tag-more .l { font-size: 11px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-tag-more .l:first-child { margin-top: 9px; }
.fl-tag-more .l em { font-style: normal; color: var(--accent2); }
.fl-tag-more .kvs { display: flex; gap: 18px; margin-top: 7px; }
.fl-tag-more .kvs span { display: flex; flex-direction: column; font-family: var(--display); font-size: 15px; font-weight: 600; }
.fl-tag-more .kvs small { font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.fl-tag-more .hint { color: var(--faint); font-size: 10px; margin: 6px 0 9px; }

/* A quant opens as a card on the left, where the leaderboard used to sit: 480px instead of the 800px drawer. */
.fl-drawer.as-card { top: 66px; left: 14px; right: auto; width: 480px; max-width: calc(100vw - 430px); border-top-color: color-mix(in srgb, var(--sky-edge) 45%, transparent); view-transition-name: fl-qcard;
  transition: width 0.42s cubic-bezier(0.2, 0.9, 0.25, 1.04); }
/* Review and Positions are wide tables (per arm, per position): the card grows sideways to 800px to hold their
   rows (less only when the screen cannot fit it beside the rail). The tag is picked on pointerdown (app.js), not
   click: a tag rides its avatar every frame, and one that moved between press and release swallowed the click. */
.fl-drawer.as-card.wide { width: min(800px, calc(100vw - 430px)); }
::view-transition-group(fl-qcard) { animation-duration: 0.45s; animation-timing-function: cubic-bezier(0.2, 0.9, 0.25, 1.06); }
::view-transition-old(fl-qcard) { animation: fl-vt-fade-out 0.2s ease both; }
::view-transition-new(fl-qcard) { animation: fl-vt-fade-in 0.3s ease 0.08s both; }
@keyframes fl-vt-fade-out { to { opacity: 0; } }
@keyframes fl-vt-fade-in { from { opacity: 0; } }
@supports not (view-transition-name: none) {
  .fl-drawer.as-card { animation: fl-card-in 0.32s cubic-bezier(0.34, 1.4, 0.64, 1); transform-origin: 20% 0; }
}
@keyframes fl-card-in { from { opacity: 0; transform: scale(0.94) translateY(6px); } }
@media (max-width: 1100px) { .fl-rail.on { --rail-w: 300px; } .fl-drawer.as-card { max-width: calc(100vw - 340px); } }

/* ── Papertrade card (HYPERHOUSE in focus) ─────────────────────────────
   Papertrade's own palette is cream paper, ink and a red underscore (its favicon); on the glass that reads as a
   paper-red accent line and the logo tile, the rest stays the floor's. */
.fl-pt { --pt-red: #c2413a; --pt-paper: #f4ecd8; border-top: 2px solid var(--pt-red); }
.fl-pt h3 { display: flex; align-items: center; gap: 8px; }
.fl-pt .body { max-height: min(72vh, 720px); overflow-y: auto; padding-bottom: 6px; }
.fl-pt .mini-title { margin: 12px 12px 6px; }
.fl-pt .pt-logo { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.fl-pt .tiles.three { grid-template-columns: 1fr 1fr 1fr; }
.fl-pt .tile b.warn { color: var(--warn); }
.pt-note { margin: 2px 12px 8px; padding: 6px 10px; border-radius: var(--r-sm); background: rgba(255, 209, 102, 0.08); border: 1px solid rgba(255, 209, 102, 0.3); color: var(--warn); font-size: 11px; }
.pt-mkt { margin: 10px 12px 0; padding: 8px 10px 6px; border: 1px solid var(--glass-line); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.025); }
.pt-top { display: flex; align-items: baseline; gap: 8px; }
.pt-top b { font-family: var(--display); font-size: 15px; letter-spacing: 0.06em; }
.pt-top .px { font-family: var(--display); font-size: 18px; font-weight: 600; }
.pt-top .dim { font-size: 10px; }
.pt-spark { flex: 1; height: 22px; min-width: 40px; align-self: center; }
.pt-spark polyline { fill: none; stroke-width: 1.5px; stroke: var(--muted); }
.pt-spark.up polyline { stroke: var(--up); } .pt-spark.down polyline { stroke: var(--down); }
.pt-kv { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 2px 8px; margin-top: 6px; font-size: 11px; }
.pt-kv span { color: var(--dim); } .pt-kv b { font-weight: 500; text-align: right; font-family: var(--mono); font-size: 10.5px; }
.pt-depth { margin-top: 7px; display: grid; gap: 3px; }
.pt-depth > div { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 6px; }
.pt-depth small { color: var(--dim); font-size: 9.5px; font-family: var(--mono); }
.pt-depth .bar { position: relative; height: 6px; display: flex; justify-content: center; }
.pt-depth .bar::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
.pt-depth i { display: block; height: 100%; }
.pt-depth i.bid { background: color-mix(in srgb, var(--up) 70%, transparent); border-radius: 3px 0 0 3px; margin-left: auto; }
.pt-depth i.ask { background: color-mix(in srgb, var(--down) 70%, transparent); border-radius: 0 3px 3px 0; margin-right: auto; }
.pt-depth .bar { padding: 0; } .pt-depth .bar i.bid { order: 0; } .pt-depth .bar i.ask { order: 1; }
.pt-flow { width: 100%; margin-top: 7px; border-collapse: collapse; font-size: 10.5px; }
.pt-flow th { color: var(--dim); font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 9.5px; text-align: right; padding: 2px 0; }
.pt-flow th:first-child { text-align: left; color: var(--pt-paper); opacity: 0.75; }
.pt-flow td { padding: 2px 0; text-align: right; font-family: var(--mono); white-space: nowrap; }
.pt-flow td:first-child { text-align: left; color: var(--muted); font-family: inherit; }
.pt-flow tr + tr td { border-top: 1px solid var(--line); }
.pt-liqs { margin: 0 12px; font-size: 11px; display: grid; gap: 2px; }
.pt-liqs > div { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 8px; align-items: baseline; }
.pt-liqs b { font-family: var(--display); letter-spacing: 0.05em; }
.pt-liqs span { font-family: var(--mono); font-size: 10.5px; }
.pt-empty { margin: 0 12px 10px; color: var(--dim); font-size: 11px; line-height: 1.45; }
.pt-q { margin: 0 12px; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 11px; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.pt-q:hover, .pt-q.selected { background: rgba(255,255,255,.06); }
.pt-q .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* A quant's card while floor:agent is in flight (app.js detailStub): who it is from the broadcast, a sweep along the
   top edge and shimmering rows in the overview's shape, so a slow answer reads as loading rather than a dead click. */
.fl-drawer .fl-qload-bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; overflow: hidden; pointer-events: none; z-index: 1; }
.fl-drawer .fl-qload-bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 8px var(--glow); animation: fl-qload-sweep 1.15s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
.fl-drawer .fl-qload-dot { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--glow); vertical-align: 1px; animation: fl-pulse 1.1s ease-in-out infinite; }
.fl-drawer .fl-tabs.idle .tab { cursor: default; opacity: 0.45; }
.fl-drawer .fl-tabs.idle .tab:hover { color: var(--muted); background: none; }
.fl-qload .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.fl-qload .rows > div { border-bottom: 1px solid var(--line); padding: 7px 2px; display: flex; flex-direction: column; gap: 6px; }
.fl-qload .sk { display: block; height: 9px; margin-bottom: 9px; border-radius: var(--r-xs); background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.04) 70%); background-size: 300% 100%; animation: fl-qload-shimmer 1.5s linear infinite; }
.fl-qload .rows .sk { margin: 0; }
.fl-qload .rows .sk:first-child { height: 7px; opacity: 0.6; }
.fl-qload .sk.spark { height: 64px; margin: 4px 0 16px; }
@keyframes fl-qload-sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes fl-qload-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .fl-drawer .fl-qload-bar::before { animation: none; left: 30%; }
  .fl-qload .sk, .fl-drawer .fl-qload-dot { animation: none; }
}
