  :root {
    --bg: #15181c; --surface: #1e2329; --surface-2: #262c33; --border: #333a42;
    --fg: #eef1f3; --fg-muted: #9aa3ac;
    --amber: #e8a13a; --amber-dim: #e8a13a24;
    --teal: #3fb3a9; --teal-dim: #3fb3a924;
    --lavender: #9291e8; --lavender-dim: #9291e824;
    --rec: #d9704f; --rec-dim: #d9704f24;
    --jabee-gold: #f0b429;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.35), 0 3px 8px rgba(0,0,0,0.28);
    --shadow-md: 0 3px 6px rgba(0,0,0,0.4), 0 10px 22px rgba(0,0,0,0.32);
    --shadow-lift: 0 6px 14px rgba(0,0,0,0.45), 0 16px 34px rgba(0,0,0,0.38);
    --inset-hi: inset 0 1px 0 rgba(255,255,255,0.05);
  }
  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      --bg: #faf8f5; --surface: #ffffff; --surface-2: #f1eee8; --border: #e2ddd3;
      --fg: #1c1a17; --fg-muted: #6b655b;
      --amber-dim: #e8a13a1a; --teal-dim: #3fb3a91a; --lavender-dim: #9291e81a; --rec-dim: #d9704f1a;
      --shadow-sm: 0 1px 2px rgba(28,26,23,0.06), 0 3px 7px rgba(28,26,23,0.05);
      --shadow-md: 0 3px 6px rgba(28,26,23,0.08), 0 10px 20px rgba(28,26,23,0.07);
      --shadow-lift: 0 8px 16px rgba(28,26,23,0.12), 0 18px 32px rgba(28,26,23,0.1);
      --inset-hi: inset 0 1px 0 rgba(255,255,255,0.8);
    }
  }
  :root[data-theme="light"] {
    --bg: #faf8f5; --surface: #ffffff; --surface-2: #f1eee8; --border: #e2ddd3;
    --fg: #1c1a17; --fg-muted: #6b655b;
    --amber-dim: #e8a13a1a; --teal-dim: #3fb3a91a; --lavender-dim: #9291e81a; --rec-dim: #d9704f1a;
    --shadow-sm: 0 1px 2px rgba(28,26,23,0.06), 0 3px 7px rgba(28,26,23,0.05);
    --shadow-md: 0 3px 6px rgba(28,26,23,0.08), 0 10px 20px rgba(28,26,23,0.07);
    --shadow-lift: 0 8px 16px rgba(28,26,23,0.12), 0 18px 32px rgba(28,26,23,0.1);
    --inset-hi: inset 0 1px 0 rgba(255,255,255,0.8);
  }
  * { box-sizing: border-box; }
  body {
    margin: 0; background: transparent; color: var(--fg); font-family: 'Manrope', system-ui, sans-serif;
    height: 100vh; display: flex; flex-direction: column; overflow: hidden;
  }
  html { background: var(--bg); } /* fallback shown only before the JVW canvas paints its first frame */

  #jvw-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }

  /* ---- Dashboard Transparency toggle (Preferences \u2192 Toggles) \u2014 lets the JVW behind show through the main surfaces ---- */
  body.gahpi-transparent .title-line,
  body.gahpi-transparent .dock-top,
  body.gahpi-transparent .group-box,
  body.gahpi-transparent .dock-bottom,
  body.gahpi-transparent .panel,
  body.gahpi-transparent .proj-workspace,
  body.gahpi-transparent .review-doc {
    background: color-mix(in srgb, var(--surface) 55%, transparent) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  body.gahpi-transparent .group-box.middle { background: color-mix(in srgb, var(--surface-2) 55%, transparent) !important; }

  #jvwModeBadge {
    position: fixed; top: 56px; right: 12px; z-index: 15; /* below the title line */
    font-family: 'Space Grotesk', sans-serif; font-size: 0.68rem; font-weight: 600;
    color: var(--fg-muted); background: color-mix(in srgb, var(--surface) 70%, transparent);
    border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
  }

  /* ---- Title line: Jabee mark and name, then Referral Code, tally, Share (GAHPI Section 10) ---- */
  .title-line { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 46px; padding: 0 10px 0 14px; background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 16; }
  .tl-brand { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
  .tl-brand .jabee-mark { width: 18px; height: 18px; vertical-align: 0; }
  .tl-name { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: 0.01em; }
  .tl-referral { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .tl-code { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; color: var(--jabee-gold); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; cursor: pointer; flex-shrink: 0; }
  .tl-tally { font-family: inherit; font-size: 0.74rem; font-weight: 600; color: var(--fg-muted); background: none; border: none; padding: 5px 2px; cursor: pointer; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tl-tally:hover, .tl-code:hover { color: var(--fg); }
  .tl-share { flex-shrink: 0; cursor: pointer; }
  .share-list { position: fixed; left: auto; z-index: 200; max-height: 65vh; overflow-y: auto; }
  .menu-item.dots svg { fill: currentColor; stroke: none; }
  .gahpi-toast { position: fixed; top: 54px; left: 50%; transform: translate(-50%, -6px); z-index: 210; max-width: min(92vw, 420px); background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lift); padding: 9px 14px; font-size: 0.82rem; line-height: 1.3; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
  .gahpi-toast.show { opacity: 1; transform: translate(-50%, 0); }

  /* ---- Anchored top dock: Preferences (left, collapsible) / Persistent (fills) / Capabilities (right, collapsible) ---- */
  .dock-top { flex-shrink: 0; display: flex; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
  .group-box { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm), var(--inset-hi); transition: box-shadow 0.2s ease, transform 0.2s ease; }
  .group-box:hover { box-shadow: var(--shadow-md), var(--inset-hi); transform: translateY(-2px); }
  .group-box.middle { border-color: var(--teal); }

  .gb-header { flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 9px 10px; font-family: 'Space Grotesk', sans-serif; font-size: 0.75rem; font-weight: 600; color: var(--fg-muted); text-align: center; }
  .group-box.middle .gb-header { color: var(--teal); }
  /* Fixed to exactly three item rows (38px each + 4px gaps); any extra items scroll. */
  .gb-items { height: 122px; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 4px; }

  .item-btn {
    display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent; color: var(--fg-muted);
    height: 38px; flex-shrink: 0; padding: 0 10px; border-radius: 9px; font-family: inherit; font-size: 0.83rem; font-weight: 600; cursor: pointer; text-align: left; width: 100%;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  }
  .item-btn:hover { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
  .item-btn:active { transform: translateY(0); box-shadow: none; }
  .item-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; flex-shrink: 0; }
  .item-btn.active.cap { background: var(--amber-dim); color: var(--amber); border-color: var(--amber); }
  .item-btn.active.per { background: var(--teal-dim); color: var(--teal); border-color: var(--teal); }
  .item-btn.active.pref { background: var(--lavender-dim); color: var(--lavender); border-color: var(--lavender); }

  /* ---- Middle: scrollable detail area ---- */
  .viewport { flex: 1; overflow-y: auto; padding: 20px 24px; }
  .wrap { max-width: 780px; margin: 0 auto; }
  .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; min-height: 100px; box-shadow: var(--shadow-md), var(--inset-hi); }
  .panel-empty { color: var(--fg-muted); font-size: 0.85rem; display: flex; align-items: center; justify-content: center; min-height: 80px; text-align: center; }
  .panel h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.02rem; margin: 0 0 8px; line-height: 1.2; }

  .demo-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 5px; font-size: 0.82rem; }
  .demo-row:last-child { margin-bottom: 0; }
  .demo-row .label { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
  .demo-row .label .sub { color: var(--fg-muted); font-size: 0.72rem; }
  .demo-row .amount { font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
  .demo-row .amount.pos { color: var(--teal); }
  .demo-row .amount.neg { color: var(--rec); }
  .delta { font-size: 0.68rem; font-weight: 700; margin-left: 8px; flex-shrink: 0; }
  .delta.up { color: var(--teal); }
  .delta.down { color: var(--rec); }
  .switch { width: 34px; height: 19px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); position: relative; cursor: pointer; flex-shrink: 0; }
  .switch .knob { position: absolute; top: 1px; left: 1px; width: 15px; height: 15px; border-radius: 50%; background: var(--fg-muted); transition: transform .15s ease, background .15s ease; }
  .switch.on { background: var(--lavender-dim); border-color: var(--lavender); }
  .switch.on .knob { transform: translateX(15px); background: var(--lavender); }
  .new-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--teal); color: #06231f; border: none; border-radius: 9px; padding: 8px 15px; font-family: inherit; font-weight: 700; font-size: 0.82rem; cursor: pointer; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: transform 0.12s ease, box-shadow 0.12s ease; }
  .new-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
  .new-btn:active { transform: translateY(1px); box-shadow: none; }
  .list-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 4px; font-size: 0.85rem; line-height: 1.25; transition: transform 0.12s ease, box-shadow 0.12s ease; }
  .list-row.clickable, button.list-row { cursor: pointer; }
  .list-row.clickable:hover, button.list-row:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
  .list-row.clickable:active, button.list-row:active { transform: translateY(0); box-shadow: none; }
  .list-row .pname { font-weight: 600; }
  .list-row .pdate { font-size: 0.72rem; color: var(--fg-muted); }

  .proj-crumb { font-size: 0.75rem; color: var(--fg-muted); cursor: pointer; margin-bottom: 4px; }
  .proj-crumb:hover { color: var(--fg); text-decoration: underline; }
  .proj-view-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
  .proj-view-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 700; margin: 0; }
  .icon-cluster { display: flex; align-items: center; gap: 2px; position: relative; flex-shrink: 0; }
  .icon-btn { width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--fg-muted); transition: transform 0.12s ease, box-shadow 0.12s ease; }
  .icon-btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
  .icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
  .icon-btn:hover { background: var(--surface-2); color: var(--fg); }
  .icon-btn.pinned { color: var(--teal); }
  .icon-btn.dots svg { fill: currentColor; stroke: none; }
  .menu { position: absolute; top: 38px; right: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lift); min-width: 170px; padding: 6px; display: none; }
  .menu.open { display: block; }
  .menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 6px; font-size: 0.83rem; font-family: inherit; color: var(--fg); background: none; border: none; }
  .menu-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
  .menu-item:hover { background: var(--surface-2); }
  .menu-item.danger { color: var(--rec); }
  .proj-workspace { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; color: var(--fg-muted); font-size: 0.85rem; min-height: 100px; display: flex; align-items: center; justify-content: center; text-align: center; }

  /* ---- Anchored bottom dock: Main Chat / Chat Selector / Message Thread, in that order ---- */
  .dock-bottom { flex-shrink: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); background: var(--surface); box-shadow: 0 -6px 16px rgba(0,0,0,0.25); z-index: 5; position: relative; }

  .dock-section { border-bottom: 1px solid var(--border); }
  .dock-section:last-child { border-bottom: none; }
  .dock-section-inner { max-width: 900px; margin: 0 auto; padding: 10px 14px; }

  .composer { display: flex; align-items: center; gap: 8px; position: relative; }
  .round-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--fg); font-size: 1.1rem; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm), var(--inset-hi); transition: transform 0.12s ease, box-shadow 0.12s ease; }
  .round-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-md), var(--inset-hi); }
  .round-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
  .round-btn:disabled { opacity: 0.25; cursor: default; box-shadow: none; }
  .round-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; }
  .mic-btn.listening { background: var(--rec); border-color: var(--rec); color: #fff; animation: pulse 1.1s infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--rec-dim); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
  .composer input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; color: var(--fg); font-family: inherit; font-size: 0.86rem; }
  .send-btn { background: var(--teal); color: #06231f; border: none; border-radius: 999px; padding: 10px 18px; font-family: inherit; font-weight: 700; font-size: 0.82rem; cursor: pointer; flex-shrink: 0; box-shadow: var(--shadow-sm); transition: transform 0.12s ease, box-shadow 0.12s ease; }
  .send-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-md); }
  .send-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
  .send-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
  .plus-menu { position: absolute; bottom: 44px; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; width: 210px; box-shadow: 0 8px 24px rgba(0,0,0,0.3); display: none; }
  .plus-menu.open { display: block; }
  .plus-menu button { display: flex; align-items: center; gap: 8px; width: 100%; background: transparent; border: none; color: var(--fg); font-family: inherit; font-size: 0.82rem; padding: 8px 9px; border-radius: 8px; cursor: pointer; text-align: left; }
  .plus-menu button:hover { background: var(--surface-2); }
  .plus-menu svg { width: 15px; height: 15px; stroke: var(--fg-muted); fill: none; stroke-width: 1.7; }

  .channels { display: flex; gap: 6px; overflow-x: auto; }
  .chan-chip { display: flex; align-items: center; gap: 5px; flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); color: var(--fg-muted); padding: 6px 11px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform 0.12s ease, box-shadow 0.12s ease; }
  .chan-chip .who { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
  .chan-chip .who.partner { background: var(--amber); }
  .chan-chip .who.jabee { width: auto; height: auto; background: none; border-radius: 0; }
  .chan-chip.active { color: var(--fg); border-color: var(--fg-muted); background: var(--surface); box-shadow: var(--shadow-sm); }
  .chan-chip:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
  .chan-divider { width: 1px; background: var(--border); flex-shrink: 0; margin: 4px 2px; }

  .thread-section .dock-section-inner { padding-top: 8px; padding-bottom: 10px; }
  .thread { min-height: 60px; max-height: 160px; overflow-y: auto; font-size: 0.82rem; }
  .msg { padding: 5px 0; display: flex; gap: 6px; }
  .msg .who { font-weight: 700; flex-shrink: 0; }
  .msg .who.partner { color: var(--amber); }
  .msg .who.jabee { color: var(--teal); }
  .msg .who.system { color: var(--amber); }
  .msg .txt { color: var(--fg-muted); }
  .msg .img-thumb { max-width: 180px; border-radius: 8px; display: block; margin-top: 2px; }

  .composer-note { max-width: 900px; margin: 0 auto 6px; font-size: 0.74rem; color: var(--rec); }

  .notif-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 0.82rem; cursor: pointer; border-bottom: 1px dashed var(--border); line-height: 1.25; }
  .notif-row:last-child { border-bottom: none; }
  .notif-row:hover { color: var(--fg); }
  .notif-row .txt { color: var(--fg-muted); flex: 1; }
  .notif-row.actionable .txt { color: var(--fg); }
  .notif-tag { font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
  .notif-tag.new { background: var(--rec-dim); color: var(--rec); }
  .notif-tag.unfinished { background: var(--amber-dim); color: var(--amber); }
  .notif-tag.submitted { background: var(--lavender-dim); color: var(--lavender); }
  .notif-tag.resolved { background: var(--teal-dim); color: var(--teal); }
  .notif-row.urgent { animation: notif-pulse 1.1s ease-in-out infinite; border-radius: 8px; padding-left: 6px; padding-right: 6px; margin: 0 -6px; }
  @keyframes notif-pulse { 0%, 100% { background: var(--rec-dim); } 50% { background: transparent; } }

  .adv-round { font-size: 0.72rem; color: var(--fg-muted); text-transform: none; margin-bottom: 1px; }
  .adv-context { color: var(--fg-muted); font-size: 0.85rem; line-height: 1.35; margin: 0 0 12px; }
  .adv-stance-row { display: flex; gap: 8px; margin-bottom: 10px; }
  .adv-stance-btn { flex: 1; padding: 9px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); color: var(--fg-muted); font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.82rem; cursor: pointer; }
  .adv-stance-btn.active { background: var(--teal-dim); color: var(--teal); border-color: var(--teal); }
  .adv-reason { width: 100%; min-height: 100px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; color: var(--fg); font-family: inherit; font-size: 0.85rem; line-height: 1.35; resize: vertical; margin-bottom: 10px; }
  .adv-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .adv-save-note { font-size: 0.72rem; color: var(--fg-muted); line-height: 1.25; }
  .adv-resolution { background: var(--teal-dim); color: var(--teal); border-radius: 10px; padding: 10px 12px; font-size: 0.85rem; font-weight: 600; line-height: 1.3; }

  .review-layout { display: flex; gap: 16px; align-items: flex-start; }
  .review-form { flex: 1 1 0; min-width: 0; }
  .review-doc { flex: 1 1 0; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; max-height: 420px; overflow-y: auto; font-size: 0.83rem; line-height: 1.4; white-space: pre-wrap; color: var(--fg-muted); }
  .review-doc-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--fg); margin-bottom: 1px; line-height: 1.25; }
  .review-doc-date { font-size: 0.72rem; color: var(--fg-muted); margin-bottom: 10px; }
  @media (max-width: 760px) { .review-layout { flex-direction: column; } }

  .bell-btn { position: relative; }
  .bell-btn.urgent-blink { animation: bell-blink 0.8s steps(1, end) infinite; border-radius: 50%; }
  @keyframes bell-blink { 0%, 100% { background: var(--rec); color: #fff; } 50% { background: transparent; color: var(--fg-muted); } }
  .bell-badge { position: absolute; top: -3px; right: -3px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: var(--rec); color: #fff; font-size: 9.5px; font-weight: 700; display: none; align-items: center; justify-content: center; line-height: 1; }

  .camera-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 100; }
  .camera-modal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
  .camera-modal video { width: 320px; max-width: 78vw; border-radius: 10px; background: #000; }
  .camera-modal-actions { display: flex; gap: 10px; }
  .camera-modal-actions button { font-family: inherit; font-size: 0.82rem; font-weight: 700; border-radius: 999px; padding: 8px 18px; cursor: pointer; border: 1px solid var(--border); background: var(--surface-2); color: var(--fg); }
  .camera-modal-actions button.capture { background: var(--teal); color: #06231f; border: none; }

  button.list-row { background: none; border: 1px solid var(--border); cursor: pointer; text-align: left; font-family: inherit; color: inherit; display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .biz-section-label { font-size: 0.72rem; font-weight: 700; color: var(--fg-muted); margin: 0 0 6px 2px; text-transform: uppercase; letter-spacing: 0.03em; }
  .always-on-tag { font-size: 0.68rem; font-weight: 700; color: var(--fg-muted); background: var(--surface); border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; flex-shrink: 0; }

  .jabee-mark { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; flex-shrink: 0; animation: jabee-spin 7s linear infinite; transform-origin: 50% 50%; }
  .jabee-mark ellipse { fill: var(--jabee-gold); }
  @keyframes jabee-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
  .biz-class-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--lavender-dim); color: var(--lavender); margin-top: 4px; }
  .freq-group { display: flex; gap: 6px; flex-shrink: 0; }
  .freq-chip { font-size: 0.72rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--fg-muted); cursor: pointer; }
  .freq-chip:hover { color: var(--fg); border-color: var(--teal); }
  .stock-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
  .stock-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; padding: 9px 12px; font-size: 0.82rem; border-bottom: 1px solid var(--border); }
  .stock-row:last-child { border-bottom: none; }
  .stock-head { background: var(--surface-2); font-weight: 700; color: var(--fg-muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.03em; }

  /* ---- Walk-around movement joystick, new this update ----
     Placeholder position: fixed bottom-left, high enough to clear the
     dock-bottom chat controls. Exact offset is a guess — likely needs a
     real on-device look, not just a code review, before it's right. */
  #move-joystick-base {
    position: fixed; left: 20px; bottom: 190px; z-index: 12;
    width: 96px; height: 96px; border-radius: 50%;
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    border: 1px solid var(--border);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    touch-action: none; /* this element owns its own drag gesture, same reasoning as the canvas */
  }
  #move-joystick-knob {
    position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
    border-radius: 50%; background: var(--teal); opacity: 0.85;
    box-shadow: var(--shadow-sm);
    transition: transform 0.05s linear; /* smooths knob follow without adding input lag */
  }
