/*
 * GBR Quiet Orbit — Alpha 0.5b chat-surface candidate.
 *
 * QO-CANONICAL-ADOPTION (2026-08-22): this stylesheet is the styling layer
 * for the canonical React port living alongside it in this directory
 * (QuietOrbitShell.jsx, and the additive Sidebar.jsx/StatCards.jsx changes)
 * and is intended to be linked by the canonical index.html as part of this
 * adoption, next to webapp.css. Wiring index.html and build_precompiled.mjs
 * for that link is owned by a different lane of this same adoption effort —
 * check those two files directly for the current linked/unlinked state
 * rather than assuming it from this comment alone.
 * - Still carries no query, storage, env, window, API, or runtime activation
 *   path of its own: pure presentation, gated by the ui-v05b root class.
 * - Selecting the Quiet Orbit variant (shell.variant 'quiet-orbit' over
 *   'legacy') stays a build-time decision, expressed only as the one root
 *   class already used throughout this file:
 *     <div class="ch-shell ui-v05b ...">
 *
 * This layer changes presentation only. Existing React handlers, routes,
 * normal/admin/Alpha modes, attachments, share/export, history, and separate
 * admin surfaces remain outside this file.
 */

.ch-shell.ui-v05b {
  --g05-canvas: #171719;
  --g05-rail: #111214;
  --g05-surface: #202125;
  --g05-elevated: #292a2f;
  --g05-hover: #25262a;
  --g05-line: rgba(255, 255, 255, 0.075);
  --g05-line-strong: rgba(255, 255, 255, 0.13);
  --g05-text: #f1f1f2;
  --g05-body: #dddddf;
  --g05-muted: #a8a8ad;
  --g05-faint: #898a90;
  --g05-gold: #caab29;
  --g05-gold-soft: rgba(202, 171, 41, 0.12);
  --g05-gold-edge: rgba(202, 171, 41, 0.32);
  --g05-danger: #df7767;
  /* Canon-inspired proportional discipline; not the engine Canon formula. */
  /* r = local block height h × shared dimensionless curvature ratio rho. */
  --g05-curve-ratio: var(--ratio-curve-ui, 0.28);
  --g05-thread-block: 44px;
  --g05-composer-block: 60px;
  --g05-thread-curve: calc(var(--g05-thread-block) * var(--g05-curve-ratio));
  --g05-composer-curve: calc(var(--g05-composer-block) * var(--g05-curve-ratio));
  --g05-radius-control: var(--g05-thread-curve);
  --g05-radius-card: var(--g05-composer-curve);
  --g05-radius-composer: var(--g05-composer-curve);
  --g05-reading: 780px;
  --g05-rail-width: clamp(240px, 18vw, 276px);
  --g05-motion-fast: 90ms;
  --g05-motion-panel: 130ms;
  --g05-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --shell-rail: var(--g05-rail-width);
  --bg-canvas: var(--g05-canvas);
  --bg-surface: var(--g05-surface);
  --bg-elevated: var(--g05-elevated);
  --bg-hover: var(--g05-hover);
  --fg-1: var(--g05-text);
  --fg-2: var(--g05-body);
  --fg-3: var(--g05-muted);
  --fg-4: var(--g05-muted);
  --fg-5: var(--g05-faint);
  --border-1: var(--g05-line);
  --border-2: var(--g05-line-strong);
  --accent: var(--g05-gold);
  --accent-tint: var(--g05-gold-soft);
  --accent-edge: var(--g05-gold-edge);
  --r-2: var(--g05-radius-control);
  --r-3: var(--g05-radius-card);
  --r-4: var(--g05-radius-composer);

  grid-template-columns: var(--g05-rail-width) minmax(0, 1fr);
  background: var(--g05-canvas);
  color: var(--g05-text);
  font-family: var(--font-sans);
  letter-spacing: -0.008em;
}

.ch-shell.ui-v05b.dev {
  grid-template-columns: var(--g05-rail-width) minmax(0, 1fr) var(--shell-side);
}

.ch-shell.ui-v05b button,
.ch-shell.ui-v05b textarea,
.ch-shell.ui-v05b input {
  font: inherit;
}

.ch-shell.ui-v05b button {
  -webkit-tap-highlight-color: transparent;
}

.ch-shell.ui-v05b .g05-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.ch-shell.ui-v05b .g05-icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.ch-shell.ui-v05b button:focus-visible,
.ch-shell.ui-v05b textarea:focus-visible,
.ch-shell.ui-v05b [tabindex]:focus-visible,
.ch-shell.ui-v05b a:focus-visible {
  outline: 2px solid var(--g05-gold);
  outline-offset: 3px;
}

.ch-shell.ui-v05b .g05-skip {
  position: fixed;
  z-index: 200;
  top: -64px;
  left: 16px;
  display: flex;
  min-height: 44px;
  box-sizing: border-box;
  align-items: center;
  padding: 10px 14px;
  border-radius: calc(44px * var(--g05-curve-ratio));
  background: var(--g05-text);
  color: var(--g05-canvas);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: top 160ms ease;
}

.ch-shell.ui-v05b .g05-skip:focus {
  top: 14px;
}

.ch-shell.ui-v05b .g05-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ch-shell.ui-v05b .ch-rail {
  border-right: 0;
  background: var(--g05-rail);
  padding: 8px;
}

.ch-shell.ui-v05b .ch-rail-brand {
  min-height: 52px;
  gap: 9px;
  padding: 6px 10px 8px;
  border-bottom: 0;
}

.ch-shell.ui-v05b .ch-rail-brand img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  filter: saturate(0.9);
}

.ch-shell.ui-v05b .ch-rail-brand .wm {
  color: var(--g05-text);
  font-size: 14px;
  font-weight: 670;
  letter-spacing: 0.04em;
}

.ch-shell.ui-v05b .ch-rail-brand .ver {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid var(--g05-line);
  border-radius: 999px;
  color: var(--g05-faint);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.ch-shell.ui-v05b .ch-new,
.ch-shell.ui-v05b .ch-search {
  width: calc(100% - 8px);
  min-height: 44px;
  margin: 3px 4px;
  padding: 0 11px;
  justify-content: flex-start;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--g05-body);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.ch-shell.ui-v05b .ch-new {
  color: var(--g05-text);
}

.ch-shell.ui-v05b .ch-new:hover,
.ch-shell.ui-v05b .ch-search:hover {
  background: var(--g05-hover);
}

.ch-shell.ui-v05b .ch-new .g05-nav-icon,
.ch-shell.ui-v05b .ch-search .g05-nav-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--g05-muted);
  font-size: 18px;
}

.ch-shell.ui-v05b .ch-search kbd {
  margin-left: auto;
  border: 0;
  color: var(--g05-faint);
  font-family: inherit;
  font-size: 10px;
}

.ch-shell.ui-v05b .ch-rail-section {
  margin: 0;
  padding: 18px 12px 7px;
  color: var(--g05-faint);
  font-size: 11px;
  font-weight: 570;
  letter-spacing: 0;
  text-transform: none;
}

.ch-shell.ui-v05b .ch-threads {
  gap: 2px;
  padding: 0 2px 8px;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.ch-shell.ui-v05b .ch-thread {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.ch-shell.ui-v05b .ch-thread:hover {
  background: rgba(255, 255, 255, 0.045);
}

.ch-shell.ui-v05b .ch-thread.active {
  background: var(--g05-hover);
}

.ch-shell.ui-v05b .ch-thread.active::before {
  top: 14px;
  bottom: 14px;
  left: 2px;
  width: 2px;
  background: var(--g05-gold);
  opacity: 0.88;
}

.ch-shell.ui-v05b .ch-thread .t {
  margin: 0;
  color: var(--g05-body);
  font-size: 13px;
  font-weight: 490;
  line-height: 1.35;
}

.ch-shell.ui-v05b .ch-thread.active .t {
  color: var(--g05-text);
  font-weight: 580;
}

.ch-shell.ui-v05b .ch-thread .m {
  margin-top: 4px;
  color: var(--g05-faint);
  font-family: inherit;
  font-size: 10.5px;
}

.ch-shell.ui-v05b .ch-rail-foot {
  margin: 0 2px;
  padding: 10px 8px 5px;
  border-top: 1px solid var(--g05-line);
  gap: 9px;
}

.ch-shell.ui-v05b .g05-account {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 4px 5px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-account:hover {
  background: var(--g05-hover);
}

.ch-shell.ui-v05b .ch-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(145deg, #6d5d1f, var(--g05-gold));
  color: #141414;
  font-size: 11px;
  font-weight: 750;
}

.ch-shell.ui-v05b .ch-rail-foot .who {
  color: var(--g05-body);
  font-size: 12.5px;
  font-weight: 570;
}

.ch-shell.ui-v05b .ch-rail-foot .sub {
  margin-top: 2px;
  color: var(--g05-faint);
  font-family: inherit;
  font-size: 10.5px;
}

.ch-shell.ui-v05b .ch-main {
  position: relative;
  background:
    radial-gradient(circle at 50% -18%, rgba(202, 171, 41, 0.055), transparent 32%),
    var(--g05-canvas);
}

.ch-shell.ui-v05b .ch-header {
  z-index: 4;
  min-height: 62px;
  height: 62px;
  padding: 0 24px;
  border-bottom: 0;
  background: rgba(23, 23, 25, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.ch-shell.ui-v05b .ch-title {
  min-width: 0;
  gap: 9px;
  color: var(--g05-text);
  font-size: 14px;
  font-weight: 610;
  letter-spacing: -0.012em;
}

.ch-shell.ui-v05b .ch-title > span:first-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-shell.ui-v05b .ch-title .tag,
.ch-shell.ui-v05b .g05-concept {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--g05-muted);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 520;
  letter-spacing: 0;
}

.ch-shell.ui-v05b .g05-concept {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: #d9ca88;
  background: var(--g05-gold-soft);
}

.ch-shell.ui-v05b .g05-concept::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g05-gold);
}

.ch-shell.ui-v05b .ch-header-actions {
  gap: 4px;
}

.ch-shell.ui-v05b .ch-icon-btn,
.ch-shell.ui-v05b .ch-rail-close {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--g05-muted);
  cursor: pointer;
}

.ch-shell.ui-v05b .ch-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--g05-muted);
  cursor: pointer;
}

.ch-shell.ui-v05b .ch-icon-btn:hover,
.ch-shell.ui-v05b .ch-hamburger:hover,
.ch-shell.ui-v05b .ch-rail-close:hover {
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .ch-rail-close {
  display: none;
}

.ch-shell.ui-v05b .ch-thread-view {
  padding: 34px 0 18px;
  scroll-padding-bottom: 24px;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.ch-shell.ui-v05b .ch-thread-inner {
  width: min(calc(100% - 48px), var(--g05-reading));
  max-width: none;
  padding: 0;
  gap: 34px;
}

.ch-shell.ui-v05b .ch-msg {
  gap: 12px;
  align-items: flex-start;
}

.ch-shell.ui-v05b .ch-msg .ava {
  width: 30px;
  height: 30px;
  margin-top: 2px;
  border: 0;
  background: transparent;
}

.ch-shell.ui-v05b .ch-msg.asst .ava {
  padding: 0;
  border: 0;
  opacity: 0.94;
}

.ch-shell.ui-v05b .ch-msg.asst .ava img {
  width: 28px;
  height: 28px;
}

.ch-shell.ui-v05b .ch-msg.user {
  justify-content: flex-end;
}

.ch-shell.ui-v05b .ch-msg.user .ava {
  display: none;
}

.ch-shell.ui-v05b .ch-msg.user .body {
  flex: 0 1 auto;
  max-width: min(78%, 620px);
}

.ch-shell.ui-v05b .ch-msg .role {
  margin-bottom: 7px;
  gap: 8px;
  color: var(--g05-muted);
  font-size: 11.5px;
  font-weight: 590;
  letter-spacing: 0;
  text-transform: none;
}

.ch-shell.ui-v05b .ch-msg.asst .role {
  color: var(--g05-body);
}

.ch-shell.ui-v05b .ch-msg.user .role {
  justify-content: flex-end;
}

.ch-shell.ui-v05b .ch-msg .role .time {
  color: var(--g05-faint);
  font-family: inherit;
  font-size: 10.5px;
}

.ch-shell.ui-v05b .ch-msg .content {
  color: var(--g05-body);
  font-size: 15.75px;
  line-height: 1.72;
  letter-spacing: -0.012em;
}

.ch-shell.ui-v05b .ch-msg .content p {
  max-width: 72ch;
  margin: 0 0 14px;
}

.ch-shell.ui-v05b .ch-msg.user .content {
  padding: 11px 15px;
  border-radius: 18px;
  border-bottom-right-radius: 6px;
  background: var(--g05-elevated);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .ch-msg .content code {
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #e2cc72;
}

.ch-shell.ui-v05b .ch-msg-actions {
  margin-top: 9px;
  gap: 2px;
  opacity: 0.7;
}

.ch-shell.ui-v05b .ch-msg:hover .ch-msg-actions,
.ch-shell.ui-v05b .ch-msg:focus-within .ch-msg-actions {
  opacity: 1;
}

.ch-shell.ui-v05b .ch-msg-actions button {
  min-height: 44px;
  min-width: 44px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--g05-muted);
  font-size: 11.5px;
}

.ch-shell.ui-v05b .ch-msg-actions button:hover {
  border: 0;
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .ch-codeblock {
  border: 1px solid var(--g05-line);
  border-radius: 14px;
  background: #101113;
}

.ch-shell.ui-v05b .ch-codeblock .cb-head {
  border-bottom-color: var(--g05-line);
  background: rgba(255, 255, 255, 0.025);
}

.ch-shell.ui-v05b .g05-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.ch-shell.ui-v05b .g05-proof-item {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--g05-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.ch-shell.ui-v05b .g05-proof-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--g05-faint);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-proof-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--g05-body);
  font-size: 12px;
  font-weight: 570;
}

.ch-shell.ui-v05b .ch-composer-wrap {
  padding: 10px 24px max(20px, env(safe-area-inset-bottom));
  border-top: 0;
  background:
    linear-gradient(to bottom, rgba(23, 23, 25, 0), var(--g05-canvas) 22%);
}

.ch-shell.ui-v05b .ch-composer {
  position: relative;
  display: block;
  max-width: var(--g05-reading);
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: var(--g05-radius-composer);
  background:
    linear-gradient(108deg, rgba(202, 171, 41, 0.025), transparent 24%),
    #202125;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 12px 34px rgba(0, 0, 0, 0.24);
  overflow: visible;
  transition:
    border-color var(--g05-motion-fast) var(--g05-ease),
    box-shadow 110ms var(--g05-ease),
    background-color var(--g05-motion-fast) var(--g05-ease);
}

.ch-shell.ui-v05b .ch-composer::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -1px;
  right: 20px;
  left: 20px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(202, 171, 41, 0.5),
    transparent
  );
  opacity: 0;
  transform: scaleX(0.72);
  transition:
    opacity 110ms var(--g05-ease),
    transform 130ms var(--g05-ease);
  pointer-events: none;
}

.ch-shell.ui-v05b .ch-composer:focus-within {
  border-color: rgba(202, 171, 41, 0.38);
  box-shadow:
    0 0 0 2px rgba(202, 171, 41, 0.07),
    0 14px 38px rgba(0, 0, 0, 0.28);
}

.ch-shell.ui-v05b .ch-composer:focus-within::before {
  opacity: 0.68;
  transform: scaleX(1);
}

.ch-shell.ui-v05b .g05-flyout {
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 10px);
  left: 0;
  width: min(560px, calc(100vw - 28px));
  max-height: min(60dvh, 360px);
  box-sizing: border-box;
  overflow-y: auto;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(202, 171, 41, 0.035), transparent 34%),
    rgba(27, 28, 32, 0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.045) inset,
    0 18px 54px rgba(0, 0, 0, 0.42);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--g05-motion-panel) var(--g05-ease),
    transform var(--g05-motion-panel) var(--g05-ease),
    border-color var(--g05-motion-fast) var(--g05-ease);
}

.ch-shell.ui-v05b .g05-flyout[hidden] {
  display: none;
}

.ch-shell.ui-v05b .g05-flyout.g05-enter,
.ch-shell.ui-v05b .g05-flyout.g05-leave {
  opacity: 0;
  transform: translateY(4px);
}

.ch-shell.ui-v05b .g05-flyout.g05-leave {
  pointer-events: none;
  transition-duration: var(--g05-motion-fast);
}

.ch-shell.ui-v05b .g05-panel-head {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 5px 7px;
  color: var(--g05-body);
  font-size: 11.5px;
  font-weight: 620;
}

.ch-shell.ui-v05b .g05-panel-head span:last-child {
  min-width: 0;
  overflow: hidden;
  color: var(--g05-faint);
  font-size: 10.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-shell.ui-v05b .ch-composer-modes {
  right: auto;
}

.ch-shell.ui-v05b .g05-mode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.ch-shell.ui-v05b .ch-composer-modes button {
  min-width: 0;
  min-height: 42px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--g05-muted);
  font-size: 11.5px;
  cursor: pointer;
  transition:
    color var(--g05-motion-fast) var(--g05-ease),
    background-color var(--g05-motion-fast) var(--g05-ease),
    border-color var(--g05-motion-fast) var(--g05-ease);
}

.ch-shell.ui-v05b .ch-composer-modes button:hover {
  border-color: var(--g05-line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .ch-composer-modes button.on {
  border-color: rgba(202, 171, 41, 0.2);
  background: var(--g05-gold-soft);
  color: #e4d38a;
}

.ch-shell.ui-v05b .ch-composer-tray {
  display: flex;
  gap: 6px;
  padding: 7px 8px 0;
  max-height: none;
  flex-wrap: wrap;
  overflow: visible;
}

.ch-shell.ui-v05b .ch-composer-tray[hidden] {
  display: none;
}

.ch-shell.ui-v05b .ch-attach-chip {
  box-sizing: border-box;
  min-height: 30px;
  padding: 4px 9px 4px 5px;
  border-color: var(--g05-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--g05-muted);
  font-size: 11.5px;
}

.ch-shell.ui-v05b .ch-attach-chip .nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-shell.ui-v05b .ch-attach-chip .ico {
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 9px;
}

.ch-shell.ui-v05b .ch-attach-chip .meta {
  color: var(--g05-faint);
  font-family: inherit;
  font-size: 10px;
}

.ch-shell.ui-v05b .ch-attach-chip .x {
  position: relative;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  margin: -5px -8px -5px 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--g05-muted);
  cursor: pointer;
}

.ch-shell.ui-v05b .ch-attach-chip .x::before,
.ch-shell.ui-v05b .ch-attach-chip .x::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.ch-shell.ui-v05b .ch-attach-chip .x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ch-shell.ui-v05b .ch-attach-chip .x:hover {
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .ch-composer textarea {
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: min(30dvh, 160px);
  padding: 10px 6px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--g05-text);
  font-size: 16px;
  line-height: 24px;
  overflow-y: hidden;
  resize: none;
}

.ch-shell.ui-v05b .ch-composer textarea::placeholder {
  color: #8f9096;
}

.ch-shell.ui-v05b .g05-tool-panel {
  width: min(520px, calc(100vw - 28px));
}

.ch-shell.ui-v05b .g05-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.ch-shell.ui-v05b .g05-tool-grid button {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--g05-muted);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition:
    color var(--g05-motion-fast) var(--g05-ease),
    background-color var(--g05-motion-fast) var(--g05-ease),
    border-color var(--g05-motion-fast) var(--g05-ease);
}

.ch-shell.ui-v05b .g05-tool-grid button:hover {
  border-color: var(--g05-line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-tool-icon {
  display: inline-grid;
  width: 28px;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--g05-body);
  font-size: 13px;
}

.ch-shell.ui-v05b .g05-guidance-action strong,
.ch-shell.ui-v05b .g05-guidance-action small {
  display: block;
}

.ch-shell.ui-v05b .g05-guidance-action strong {
  color: #d9ca88;
  font-size: 11px;
  font-weight: 620;
}

.ch-shell.ui-v05b .g05-guidance-action small {
  margin-top: 2px;
  color: var(--g05-faint);
  font-size: 9.5px;
}

.ch-shell.ui-v05b .g05-compose-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px auto minmax(0, 1fr) 44px;
  box-sizing: border-box;
  min-height: 56px;
  align-items: center;
  gap: 4px;
  padding: 6px;
}

.ch-shell.ui-v05b .g05-tool-toggle,
.ch-shell.ui-v05b .g05-mode-toggle,
.ch-shell.ui-v05b .ch-send {
  height: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    color var(--g05-motion-fast) var(--g05-ease),
    background-color var(--g05-motion-fast) var(--g05-ease),
    border-color var(--g05-motion-fast) var(--g05-ease),
    transform var(--g05-motion-fast) var(--g05-ease);
}

.ch-shell.ui-v05b .g05-tool-toggle {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--g05-muted);
  font-size: 21px;
}

.ch-shell.ui-v05b .g05-tool-toggle:hover,
.ch-shell.ui-v05b .g05-mode-toggle:hover {
  border-color: var(--g05-line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-tool-toggle > span {
  display: inline-block;
  transition: transform var(--g05-motion-fast) var(--g05-ease);
}

.ch-shell.ui-v05b .g05-tool-toggle[aria-expanded="true"] {
  border-color: rgba(202, 171, 41, 0.18);
  background: var(--g05-gold-soft);
  color: #e4d38a;
}

.ch-shell.ui-v05b .g05-tool-toggle:disabled {
  border-color: transparent;
  background: transparent;
  color: var(--g05-faint);
  cursor: not-allowed;
  opacity: 0.52;
}

.ch-shell.ui-v05b .g05-tool-toggle[aria-expanded="true"] > span {
  transform: rotate(45deg);
}

.ch-shell.ui-v05b .g05-mode-toggle {
  display: inline-flex;
  min-width: 0;
  max-width: 104px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--g05-muted);
  font-size: 11px;
  white-space: nowrap;
}

.ch-shell.ui-v05b .g05-mode-toggle[aria-expanded="true"] {
  border-color: rgba(202, 171, 41, 0.18);
  background: var(--g05-gold-soft);
  color: #e4d38a;
}

.ch-shell.ui-v05b .g05-mode-dot {
  width: 5px;
  min-width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g05-gold);
  box-shadow: 0 0 9px rgba(202, 171, 41, 0.34);
}

.ch-shell.ui-v05b .g05-mode-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-shell.ui-v05b .g05-mode-chevron {
  color: var(--g05-faint);
  font-size: 10px;
  transform: translateY(-1px);
}

.ch-shell.ui-v05b .ch-send {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  padding: 0;
  place-items: center;
  border-radius: 14px;
  background: var(--g05-gold);
  color: #171719;
  font-size: 18px;
  font-weight: 720;
}

.ch-shell.ui-v05b .ch-send:hover {
  background: #d5b638;
  transform: translateY(-1px);
}

.ch-shell.ui-v05b .ch-send.disabled,
.ch-shell.ui-v05b .ch-send:disabled {
  border-color: rgba(255, 255, 255, 0.045);
  background: rgba(255, 255, 255, 0.055);
  color: var(--g05-faint);
  cursor: not-allowed;
  transform: none;
}

.ch-shell.ui-v05b .g05-alpha-boundary {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-top: 1px solid rgba(202, 171, 41, 0.14);
  color: #c9bd82;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.045em;
}

.ch-shell.ui-v05b .g05-alpha-boundary[hidden] {
  display: none;
}

.ch-shell.ui-v05b .g05-toast {
  position: fixed;
  z-index: 160;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid var(--g05-line);
  border-radius: 12px;
  background: #2a2b30;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
  color: var(--g05-body);
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.ch-shell.ui-v05b .g05-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ch-shell.ui-v05b .alpha01-surface-bar {
  min-height: 38px;
  padding: 5px 24px;
  border-bottom: 0;
  background: rgba(111, 158, 92, 0.08);
  color: var(--g05-muted);
  font-family: inherit;
  font-size: 10.5px;
}

.ch-shell.ui-v05b .alpha01-turn-card {
  border-color: var(--g05-line);
  border-left-color: var(--zg-success);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.ch-shell.ui-v05b .ch-side {
  border-left-color: var(--g05-line);
  background: var(--g05-rail);
}

.ch-shell.ui-v05b .ch-side-head,
.ch-shell.ui-v05b .ch-side-section,
.ch-shell.ui-v05b .ch-insp-tabs {
  border-color: var(--g05-line);
}

.ch-shell.ui-v05b .ch-inspector-close {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1199px) {
  .ch-shell.ui-v05b.dev {
    grid-template-columns: var(--g05-rail-width) minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .ch-shell.ui-v05b,
  .ch-shell.ui-v05b.dev {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .ch-rail {
    width: min(86vw, 304px);
    padding: 8px;
    box-shadow: 10px 0 48px rgba(0, 0, 0, 0.44);
  }

  .ch-shell.ui-v05b .ch-rail-backdrop {
    background: rgba(0, 0, 0, 0.58);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  .ch-shell.ui-v05b .ch-header {
    min-height: 58px;
    height: 58px;
    padding: 0 10px 0 6px;
  }

  .ch-shell.ui-v05b .ch-hamburger {
    display: inline-grid;
    flex: 0 0 40px;
    margin-right: 0;
  }

  .ch-shell.ui-v05b .ch-rail-close {
    display: inline-grid;
  }

  .ch-shell.ui-v05b .ch-title {
    overflow: hidden;
    gap: 7px;
  }

  .ch-shell.ui-v05b .ch-title > * {
    flex-shrink: 1;
  }

  .ch-shell.ui-v05b .ch-title > span:first-of-type {
    flex: 1 1 auto;
  }

  .ch-shell.ui-v05b .ch-title .tag {
    flex: 0 1 auto;
    max-width: 116px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ch-shell.ui-v05b .g05-concept {
    display: none;
  }

  .ch-shell.ui-v05b .ch-thread-view {
    padding: 22px 0 12px;
  }

  .ch-shell.ui-v05b .ch-thread-inner {
    width: min(calc(100% - 24px), var(--g05-reading));
    gap: 28px;
  }

  .ch-shell.ui-v05b .ch-msg .content {
    font-size: 15.5px;
  }

  .ch-shell.ui-v05b .ch-msg.user .body {
    max-width: 88%;
  }

  .ch-shell.ui-v05b .g05-proof {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .ch-composer-wrap {
    padding: 8px 12px max(12px, env(safe-area-inset-bottom));
  }

  .ch-shell.ui-v05b .ch-composer {
    max-width: 100%;
    border-radius: 18px;
  }

  .ch-shell.ui-v05b .g05-flyout {
    width: min(520px, calc(100vw - 24px));
  }

  .ch-shell.ui-v05b .ch-composer textarea {
    font-size: 16px;
  }

  .ch-shell.ui-v05b .g05-tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ch-shell.ui-v05b .g05-compose-row {
    grid-template-columns: 44px auto minmax(0, 1fr) 44px;
  }

  .ch-shell.ui-v05b .g05-toast {
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: none;
  }
}

@media (max-width: 480px) {
  .ch-shell.ui-v05b .ch-thread-inner {
    width: min(calc(100% - 20px), var(--g05-reading));
  }

  .ch-shell.ui-v05b .ch-msg {
    gap: 9px;
  }

  .ch-shell.ui-v05b .ch-msg.asst .ava {
    width: 25px;
    height: 25px;
  }

  .ch-shell.ui-v05b .ch-msg.asst .ava img {
    width: 24px;
    height: 24px;
  }

  .ch-shell.ui-v05b .ch-msg .role .time {
    display: none;
  }

  .ch-shell.ui-v05b .ch-msg-actions {
    opacity: 1;
  }

  .ch-shell.ui-v05b .ch-msg-actions button {
    min-width: 40px;
    min-height: 40px;
  }

  .ch-shell.ui-v05b .g05-mode-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ch-shell.ui-v05b .ch-composer-tray .ch-attach-chip .meta {
    display: none;
  }

  .ch-shell.ui-v05b .ch-composer-tray {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ch-shell.ui-v05b .ch-composer-tray .ch-attach-chip {
    width: 100%;
    max-width: none;
  }

  .ch-shell.ui-v05b .g05-panel-head span:last-child {
    max-width: 170px;
  }
}

@media (max-width: 360px) {
  .ch-shell.ui-v05b .ch-header {
    padding-right: 6px;
  }

  .ch-shell.ui-v05b .ch-title .tag {
    display: none;
  }

  .ch-shell.ui-v05b .ch-header-actions {
    gap: 0;
  }

  .ch-shell.ui-v05b .ch-thread-inner {
    width: calc(100% - 18px);
  }

  .ch-shell.ui-v05b .ch-msg.asst {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
  }

  .ch-shell.ui-v05b .ch-msg.user .body {
    max-width: 94%;
  }

  .ch-shell.ui-v05b .ch-composer-wrap {
    padding-inline: 9px;
  }

  .ch-shell.ui-v05b .g05-flyout {
    width: calc(100vw - 18px);
  }

  .ch-shell.ui-v05b .g05-panel-head span:last-child {
    display: none;
  }

  .ch-shell.ui-v05b .g05-mode-toggle {
    max-width: 78px;
    padding-inline: 8px;
    gap: 5px;
  }

  .ch-shell.ui-v05b .g05-mode-name {
    font-size: 10.5px;
  }
}

@media (hover: none), (pointer: coarse) {
  .ch-shell.ui-v05b .ch-msg-actions {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ch-shell.ui-v05b *,
  .ch-shell.ui-v05b *::before,
  .ch-shell.ui-v05b *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .ch-shell.ui-v05b .g05-flyout,
  .ch-shell.ui-v05b .g05-tool-toggle > span,
  .ch-shell.ui-v05b .ch-send {
    transform: none !important;
  }
}

@media (forced-colors: active) {
  .ch-shell.ui-v05b .ch-composer,
  .ch-shell.ui-v05b .g05-flyout,
  .ch-shell.ui-v05b .g05-tool-toggle,
  .ch-shell.ui-v05b .g05-mode-toggle,
  .ch-shell.ui-v05b .ch-send {
    border-color: ButtonText;
  }

  .ch-shell.ui-v05b :focus-visible {
    outline-color: Highlight;
  }
}

/* --------------------------------------------------------------------- */
/* Quiet Orbit V2 — single chat + public/admin/settings/workbench map.   */
/* Dormant preview only. All selectors remain root-scoped.               */

.ch-shell.ui-v05b {
  --g05-workbench-width: clamp(360px, 28vw, 420px);
  --g05-composer-offset: 82px;
}

.ch-shell.ui-v05b [hidden] {
  display: none !important;
}

.ch-shell.ui-v05b .ch-rail {
  min-width: 0;
}

.ch-shell.ui-v05b .g05-rail-context {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.ch-shell.ui-v05b .ch-thread {
  display: flex;
  height: var(--g05-thread-block);
  min-height: var(--g05-thread-block);
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 12px;
  border-radius: var(--g05-thread-curve);
}

.ch-shell.ui-v05b .ch-thread .t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-shell.ui-v05b .ch-thread .m {
  flex: none;
  margin-top: 0;
  white-space: nowrap;
}

.ch-shell.ui-v05b .g05-admin-nav {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 2px 18px;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.ch-shell.ui-v05b .g05-admin-nav .ch-rail-section {
  padding-top: 14px;
}

.ch-shell.ui-v05b .g05-admin-nav-item {
  display: flex;
  width: 100%;
  min-height: var(--g05-thread-block);
  align-items: center;
  padding: 0 11px;
  border: 0;
  border-radius: calc(var(--g05-thread-block) * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-muted);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-admin-nav-item:hover,
.ch-shell.ui-v05b .g05-admin-nav-item.active {
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-admin-nav-item.active {
  box-shadow: 2px 0 0 var(--g05-gold) inset;
}

.ch-shell.ui-v05b .ch-rail-foot {
  position: relative;
  display: flex;
  flex-direction: column;
}

.ch-shell.ui-v05b .g05-admin-entry {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 5px;
  border: 0;
  border-radius: var(--g05-thread-curve);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-admin-entry:hover {
  background: var(--g05-hover);
}

.ch-shell.ui-v05b .g05-admin-mark {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--g05-line-strong);
  border-radius: calc(var(--g05-thread-block) * var(--g05-curve-ratio));
  color: #d9ca88;
  font-size: 15px;
}

.ch-shell.ui-v05b .g05-row-arrow {
  margin-left: auto;
  color: var(--g05-faint);
}

.ch-shell.ui-v05b .g05-account-wrap {
  position: relative;
}

.ch-shell.ui-v05b .g05-account-menu {
  position: absolute;
  z-index: 52;
  right: -1px;
  bottom: calc(100% + 9px);
  left: -1px;
  padding: 7px;
  border: 1px solid var(--g05-line-strong);
  border-radius: var(--g05-composer-curve);
  background: rgba(32, 33, 37, 0.98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.ch-shell.ui-v05b .g05-menu-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 2px 7px;
  padding: 8px;
  border-bottom: 1px solid var(--g05-line);
}

.ch-shell.ui-v05b .g05-menu-identity strong,
.ch-shell.ui-v05b .g05-menu-identity small {
  display: block;
}

.ch-shell.ui-v05b .g05-menu-identity strong {
  color: var(--g05-text);
  font-size: 12.5px;
  font-weight: 620;
}

.ch-shell.ui-v05b .g05-menu-identity small {
  margin-top: 2px;
  color: var(--g05-faint);
  font-size: 10px;
}

.ch-shell.ui-v05b .g05-account-menu > button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: calc(var(--g05-thread-block) * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-body);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-account-menu > button:hover,
.ch-shell.ui-v05b .g05-account-menu > button:focus-visible {
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-account-menu > button.danger {
  color: #e19a8d;
}

.ch-shell.ui-v05b .g05-menu-separator {
  height: 1px;
  margin: 6px 8px;
  background: var(--g05-line);
}

.ch-shell.ui-v05b .g05-account {
  border-radius: var(--g05-thread-curve);
}

.ch-shell.ui-v05b .ch-main {
  min-width: 0;
  transition: margin-right var(--g05-motion-panel) var(--g05-ease);
}

.ch-shell.ui-v05b .ch-title h1 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-shell.ui-v05b .ch-title h1:focus {
  outline: 0;
}

.ch-shell.ui-v05b .ch-title #g05-header-context {
  width: auto;
  max-width: 116px;
  flex: 0 0 auto;
}

.ch-shell.ui-v05b .g05-workbench-toggle {
  display: inline-flex;
  min-width: 76px;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--g05-line);
  border-radius: calc(40px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-muted);
  font-size: 11.5px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-workbench-toggle:hover,
.ch-shell.ui-v05b .g05-workbench-toggle[aria-expanded="true"] {
  border-color: var(--g05-line-strong);
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-alpha-surface {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 12px;
  padding: 4px 24px;
  border-bottom: 1px solid rgba(202, 171, 41, 0.15);
  background: rgba(202, 171, 41, 0.065);
  color: #c9bd82;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.035em;
}

.ch-shell.ui-v05b .g05-alpha-surface .g05-alpha-name {
  font-weight: 700;
}

.ch-shell.ui-v05b .g05-alpha-surface button {
  min-height: 30px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid var(--g05-line-strong);
  border-radius: calc(30px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-body);
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-route-view {
  min-height: 0;
}

.ch-shell.ui-v05b .g05-page {
  flex: 1;
  overflow: auto;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.ch-shell.ui-v05b .g05-page-shell {
  display: grid;
  width: min(calc(100% - 48px), 1040px);
  min-height: 100%;
  margin: 0 auto;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 52px;
  padding: 42px 0 72px;
  box-sizing: border-box;
}

.ch-shell.ui-v05b .g05-page-nav {
  position: sticky;
  top: 22px;
  align-self: start;
}

.ch-shell.ui-v05b .g05-page-nav > p {
  margin: 0 0 12px;
  padding: 0 10px;
  color: var(--g05-faint);
  font-size: 10.5px;
  font-weight: 630;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ch-shell.ui-v05b .g05-page-nav button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: calc(42px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-muted);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-page-nav button:hover,
.ch-shell.ui-v05b .g05-page-nav button.active {
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-page-nav button.active {
  box-shadow: 2px 0 0 var(--g05-gold) inset;
}

.ch-shell.ui-v05b .g05-settings-content {
  min-width: 0;
}

.ch-shell.ui-v05b .g05-detail-stack {
  display: grid;
  gap: 14px;
}

.ch-shell.ui-v05b .g05-detail-group {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background: rgba(255, 255, 255, 0.018);
}

.ch-shell.ui-v05b .g05-detail-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ch-shell.ui-v05b .g05-detail-head h3 {
  margin: 0;
  color: var(--g05-body);
  font-size: 13.5px;
  font-weight: 610;
}

.ch-shell.ui-v05b .g05-detail-head p {
  margin: 5px 0 0;
  color: var(--g05-faint);
  font-size: 11px;
  line-height: 1.55;
}

.ch-shell.ui-v05b .g05-state-chip {
  display: inline-flex;
  min-height: 26px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(202, 171, 41, 0.28);
  border-radius: calc(26px * var(--g05-curve-ratio));
  background: var(--g05-gold-soft);
  color: #d9cb91;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.055em;
}

.ch-shell.ui-v05b .g05-state-chip.quiet {
  border-color: var(--g05-line);
  background: transparent;
  color: var(--g05-faint);
}

.ch-shell.ui-v05b .g05-state-chip.warn {
  border-color: rgba(168, 134, 93, 0.38);
  background: rgba(168, 134, 93, 0.08);
  color: #c6a37b;
}

.ch-shell.ui-v05b .g05-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ch-shell.ui-v05b .g05-inline-value {
  flex: 0 1 auto;
  margin-left: auto;
  color: var(--g05-faint);
  font-family: var(--mono);
  font-size: 10px;
  overflow-wrap: anywhere;
  text-align: right;
}

.ch-shell.ui-v05b .g05-key-values {
  display: grid;
  margin: 14px 0 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ch-shell.ui-v05b .g05-key-values div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--g05-line);
  border-radius: calc(44px * var(--g05-curve-ratio));
  background: rgba(255, 255, 255, 0.015);
}

.ch-shell.ui-v05b .g05-key-values dt,
.ch-shell.ui-v05b .g05-key-values dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ch-shell.ui-v05b .g05-key-values dt {
  color: var(--g05-faint);
  font-size: 9.5px;
}

.ch-shell.ui-v05b .g05-key-values dd {
  margin-top: 5px;
  color: var(--g05-body);
  font-family: var(--mono);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-key-values.compact {
  grid-template-columns: minmax(0, 1fr);
}

.ch-shell.ui-v05b .g05-page-kicker {
  color: #c9bd82;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.085em;
}

.ch-shell.ui-v05b .g05-settings-content h2,
.ch-shell.ui-v05b .g05-admin-heading h2,
.ch-shell.ui-v05b .g05-map-content h2,
.ch-shell.ui-v05b .g05-workbench-head h2 {
  margin: 8px 0 0;
  color: var(--g05-text);
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -0.025em;
}

.ch-shell.ui-v05b .g05-page-lead,
.ch-shell.ui-v05b .g05-admin-heading p {
  margin: 9px 0 30px;
  color: var(--g05-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.ch-shell.ui-v05b .g05-settings-card,
.ch-shell.ui-v05b .g05-setting-row,
.ch-shell.ui-v05b .g05-session-card {
  border-bottom: 1px solid var(--g05-line);
}

.ch-shell.ui-v05b .g05-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 22px;
}

.ch-shell.ui-v05b .g05-profile-card .ch-avatar {
  width: 44px;
  height: 44px;
}

.ch-shell.ui-v05b .g05-profile-card strong,
.ch-shell.ui-v05b .g05-profile-card span,
.ch-shell.ui-v05b .g05-setting-row strong,
.ch-shell.ui-v05b .g05-setting-row small,
.ch-shell.ui-v05b .g05-session-card strong,
.ch-shell.ui-v05b .g05-session-card small {
  display: block;
}

.ch-shell.ui-v05b .g05-profile-card strong,
.ch-shell.ui-v05b .g05-setting-row strong,
.ch-shell.ui-v05b .g05-session-card strong {
  color: var(--g05-body);
  font-size: 13px;
  font-weight: 580;
}

.ch-shell.ui-v05b .g05-profile-card span,
.ch-shell.ui-v05b .g05-setting-row small,
.ch-shell.ui-v05b .g05-session-card small {
  margin-top: 4px;
  color: var(--g05-faint);
  font-size: 11px;
}

.ch-shell.ui-v05b .g05-profile-card button,
.ch-shell.ui-v05b .g05-setting-row button,
.ch-shell.ui-v05b .g05-session-card button,
.ch-shell.ui-v05b .g05-settings-actions button {
  min-height: 44px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--g05-line-strong);
  border-radius: calc(44px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-body);
  font-size: 11.5px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-field {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  color: var(--g05-muted);
  font-size: 11.5px;
}

.ch-shell.ui-v05b .g05-field-grid .g05-field,
.ch-shell.ui-v05b .g05-detail-group > .g05-field:first-of-type {
  margin-top: 12px;
}

.ch-shell.ui-v05b .g05-field input,
.ch-shell.ui-v05b .g05-field select {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid var(--g05-line-strong);
  border-radius: calc(44px * var(--g05-curve-ratio));
  background: var(--g05-surface);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-field input:disabled {
  color: var(--g05-faint);
  opacity: 0.72;
}

.ch-shell.ui-v05b .g05-settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.ch-shell.ui-v05b .g05-settings-actions button {
  border-color: rgba(202, 171, 41, 0.3);
  background: var(--g05-gold-soft);
  color: #dfd099;
}

.ch-shell.ui-v05b .g05-setting-row,
.ch-shell.ui-v05b .g05-session-card {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 16px;
}

.ch-shell.ui-v05b .g05-setting-row.danger strong {
  color: #e19a8d;
}

.ch-shell.ui-v05b .g05-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #78a56d;
}

.ch-shell.ui-v05b .g05-empty-state {
  display: grid;
  gap: 5px;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.ch-shell.ui-v05b .g05-empty-state strong {
  color: var(--g05-body);
  font-size: 12.5px;
}

.ch-shell.ui-v05b .g05-empty-state span {
  color: var(--g05-faint);
  font-size: 11px;
}

.ch-shell.ui-v05b .g05-choice-grid {
  display: grid;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ch-shell.ui-v05b .g05-choice-grid legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: var(--g05-muted);
  font-size: 11.5px;
}

.ch-shell.ui-v05b .g05-choice-grid label {
  position: relative;
}

.ch-shell.ui-v05b .g05-choice-grid input {
  position: absolute;
  opacity: 0;
}

.ch-shell.ui-v05b .g05-choice-grid span {
  display: grid;
  min-height: 72px;
  place-items: center;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background: var(--g05-surface);
  color: var(--g05-muted);
  font-size: 12px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-choice-grid input:checked + span {
  border-color: var(--g05-gold-edge);
  color: #dfd099;
  box-shadow: 0 0 0 1px rgba(202, 171, 41, 0.08) inset;
}

.ch-shell.ui-v05b .g05-choice-grid.compact span {
  min-height: 52px;
}

.ch-shell.ui-v05b .g05-choice-grid input:focus-visible + span {
  outline: 2px solid var(--g05-gold);
  outline-offset: 3px;
}

.ch-shell.ui-v05b .g05-switch {
  margin-left: auto;
}

.ch-shell.ui-v05b .g05-switch input {
  position: absolute;
  opacity: 0;
}

.ch-shell.ui-v05b .g05-switch span {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  border: 1px solid var(--g05-line-strong);
  border-radius: 999px;
  background: var(--g05-elevated);
}

.ch-shell.ui-v05b .g05-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--g05-muted);
  transition: transform var(--g05-motion-fast) var(--g05-ease), background-color var(--g05-motion-fast) var(--g05-ease);
}

.ch-shell.ui-v05b .g05-switch input:checked + span {
  border-color: var(--g05-gold-edge);
  background: var(--g05-gold-soft);
}

.ch-shell.ui-v05b .g05-switch input:checked + span::after {
  background: var(--g05-gold);
  transform: translateX(18px);
}

.ch-shell.ui-v05b .g05-switch input:focus-visible + span {
  outline: 2px solid var(--g05-gold);
  outline-offset: 3px;
}

.ch-shell.ui-v05b .g05-admin-content,
.ch-shell.ui-v05b .g05-map-content {
  width: min(calc(100% - 48px), 1080px);
  margin: 0 auto;
  padding: 42px 0 72px;
  box-sizing: border-box;
}

.ch-shell.ui-v05b .g05-admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.ch-shell.ui-v05b .g05-admin-heading p {
  margin-bottom: 26px;
}

.ch-shell.ui-v05b .g05-admin-scopebar {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid var(--g05-line);
  border-radius: calc(38px * var(--g05-curve-ratio));
  background: rgba(255, 255, 255, 0.015);
  color: var(--g05-faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.045em;
}

.ch-shell.ui-v05b .g05-admin-scopebar span,
.ch-shell.ui-v05b .g05-admin-scopebar strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ch-shell.ui-v05b .g05-admin-scopebar span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ch-shell.ui-v05b .g05-admin-scopebar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8865d;
}

.ch-shell.ui-v05b .g05-admin-scopebar strong {
  margin-left: auto;
  color: #c6a37b;
  font-weight: 650;
}

.ch-shell.ui-v05b .g05-connection-state,
.ch-shell.ui-v05b .g05-workbench-state {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--g05-line);
  border-radius: 999px;
  color: var(--g05-faint);
  font-family: var(--mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.ch-shell.ui-v05b .g05-connection-state i,
.ch-shell.ui-v05b .g05-workbench-state i,
.ch-shell.ui-v05b .g05-web-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8865d;
}

.ch-shell.ui-v05b .g05-admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.ch-shell.ui-v05b .g05-admin-metrics article {
  display: grid;
  min-height: 108px;
  align-content: space-between;
  padding: 14px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background: rgba(255, 255, 255, 0.022);
}

.ch-shell.ui-v05b .g05-admin-metrics span,
.ch-shell.ui-v05b .g05-admin-metrics small {
  color: var(--g05-faint);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-admin-metrics strong {
  color: var(--g05-body);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 590;
}

.ch-shell.ui-v05b .g05-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ch-shell.ui-v05b .g05-admin-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background: rgba(255, 255, 255, 0.022);
}

.ch-shell.ui-v05b .g05-admin-card.wide {
  grid-column: 1 / -1;
}

.ch-shell.ui-v05b .g05-card-head {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  color: var(--g05-body);
  font-size: 12px;
  font-weight: 590;
}

.ch-shell.ui-v05b .g05-card-head button,
.ch-shell.ui-v05b .g05-admin-card > button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--g05-line);
  border-radius: calc(34px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-muted);
  font-size: 10.5px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-admin-card > button {
  width: 100%;
  margin-top: 6px;
  text-align: left;
}

.ch-shell.ui-v05b .g05-admin-card p {
  color: var(--g05-muted);
  font-size: 12px;
  line-height: 1.65;
}

.ch-shell.ui-v05b .g05-admin-list {
  min-width: 0;
}

.ch-shell.ui-v05b .g05-admin-safe-state {
  display: grid;
  gap: 5px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(168, 134, 93, 0.24);
  border-radius: calc(44px * var(--g05-curve-ratio));
  background: rgba(168, 134, 93, 0.055);
}

.ch-shell.ui-v05b .g05-admin-safe-state strong {
  color: #c6a37b;
  font-family: var(--mono);
  font-size: 9.5px;
}

.ch-shell.ui-v05b .g05-admin-safe-state span {
  color: var(--g05-faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.ch-shell.ui-v05b .g05-admin-timeline {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 2px;
  border-top: 1px solid var(--g05-line);
}

.ch-shell.ui-v05b .g05-admin-timeline > span {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--g05-gold);
}

.ch-shell.ui-v05b .g05-admin-timeline.muted > span {
  background: var(--g05-faint);
}

.ch-shell.ui-v05b .g05-admin-timeline strong,
.ch-shell.ui-v05b .g05-admin-timeline small {
  display: block;
  overflow-wrap: anywhere;
}

.ch-shell.ui-v05b .g05-admin-timeline strong {
  color: var(--g05-body);
  font-size: 11.5px;
}

.ch-shell.ui-v05b .g05-admin-timeline small {
  margin-top: 4px;
  color: var(--g05-faint);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-map-content {
  max-width: 980px;
}

.ch-shell.ui-v05b .g05-map-flow {
  padding: 28px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    rgba(255, 255, 255, 0.012);
  background-size: 36px 36px;
}

.ch-shell.ui-v05b .g05-map-level {
  display: grid;
  justify-content: center;
  gap: 12px;
}

.ch-shell.ui-v05b .g05-map-level.single {
  grid-template-columns: minmax(240px, 360px);
}

.ch-shell.ui-v05b .g05-map-level.triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ch-shell.ui-v05b .g05-map-level article {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--g05-line-strong);
  border-radius: var(--g05-composer-curve);
  background: rgba(23, 23, 25, 0.94);
  text-align: center;
}

.ch-shell.ui-v05b .g05-map-level article.primary {
  border-color: var(--g05-gold-edge);
  box-shadow: 0 0 0 1px rgba(202, 171, 41, 0.06) inset;
}

.ch-shell.ui-v05b .g05-map-level small {
  color: #c9bd82;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.ch-shell.ui-v05b .g05-map-level strong {
  color: var(--g05-text);
  font-size: 13px;
  font-weight: 600;
}

.ch-shell.ui-v05b .g05-map-level span {
  color: var(--g05-faint);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-map-line {
  width: 1px;
  height: 20px;
  margin: 0 auto;
  background: var(--g05-line-strong);
}

.ch-shell.ui-v05b .g05-map-branch {
  display: grid;
  width: 67%;
  height: 28px;
  margin: 0 auto;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--g05-line-strong);
}

.ch-shell.ui-v05b .g05-map-branch span {
  width: 1px;
  height: 28px;
  margin: 0 auto;
  background: var(--g05-line-strong);
}

.ch-shell.ui-v05b .g05-map-note {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 560px);
  margin: 22px auto 0;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid rgba(202, 171, 41, 0.2);
  border-radius: var(--g05-composer-curve);
  background: rgba(202, 171, 41, 0.055);
}

.ch-shell.ui-v05b .g05-map-note > span {
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--g05-gold-edge);
  border-radius: calc(32px * var(--g05-curve-ratio));
  color: #d9ca88;
}

.ch-shell.ui-v05b .g05-map-note strong,
.ch-shell.ui-v05b .g05-map-note small {
  display: block;
}

.ch-shell.ui-v05b .g05-map-note strong {
  color: var(--g05-body);
  font-size: 11.5px;
}

.ch-shell.ui-v05b .g05-map-note small {
  margin-top: 4px;
  color: var(--g05-faint);
  font-size: 10px;
}

.ch-shell.ui-v05b .g05-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  color: var(--g05-faint);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ch-shell.ui-v05b .g05-map-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--g05-muted);
}

.ch-shell.ui-v05b .g05-map-legend i.core {
  background: var(--g05-gold);
}

.ch-shell.ui-v05b .g05-map-legend i.context {
  background: #718a9c;
}

.ch-shell.ui-v05b .g05-map-legend i.gated {
  background: #a8865d;
}

.ch-shell.ui-v05b .ch-composer {
  box-sizing: border-box;
  min-height: var(--g05-composer-block);
  border-radius: 17px;
  border-radius: var(--g05-composer-curve);
}

.ch-shell.ui-v05b .g05-compose-row {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  /* 60px outer block minus the two 1px hairline borders. */
  min-height: calc(var(--g05-composer-block) - 2px);
}

.ch-shell.ui-v05b .ch-composer textarea:focus-visible {
  outline: 2px solid var(--g05-gold);
  outline-offset: -2px;
  border-radius: calc(44px * var(--g05-curve-ratio));
}

.ch-shell.ui-v05b .g05-tool-panel {
  width: min(560px, calc(100vw - 28px));
  max-height: min(72dvh, 560px);
}

.ch-shell.ui-v05b .g05-tool-section {
  padding: 7px 3px 9px;
  border-top: 1px solid var(--g05-line);
}

.ch-shell.ui-v05b .g05-tool-section > span {
  display: block;
  padding: 2px 7px 7px;
  color: var(--g05-faint);
  font-size: 9.5px;
  font-weight: 620;
  letter-spacing: 0.05em;
}

.ch-shell.ui-v05b .g05-tool-section:first-of-type {
  border-top: 0;
}

.ch-shell.ui-v05b .g05-tool-grid button {
  border-radius: calc(48px * var(--g05-curve-ratio));
}

.ch-shell.ui-v05b .g05-tool-grid button span strong,
.ch-shell.ui-v05b .g05-tool-grid button span small {
  display: block;
}

.ch-shell.ui-v05b .g05-tool-grid button span small {
  margin-top: 2px;
  color: var(--g05-faint);
  font-size: 9px;
}

.ch-shell.ui-v05b .g05-experiment-section button:first-child {
  border-color: rgba(202, 171, 41, 0.14);
  color: #d8cb91;
}

.ch-shell.ui-v05b .g05-alpha-boundary {
  min-height: 30px;
}

.ch-shell.ui-v05b .g05-workbench-backdrop {
  position: fixed;
  z-index: 118;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--g05-motion-panel) var(--g05-ease);
}

.ch-shell.ui-v05b.workbench-open .g05-workbench-backdrop:not(:disabled) {
  opacity: 1;
  pointer-events: auto;
}

.ch-shell.ui-v05b .g05-workbench {
  position: fixed;
  z-index: 120;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: var(--g05-workbench-width);
  max-width: 100vw;
  box-sizing: border-box;
  flex-direction: column;
  border-left: 1px solid var(--g05-line-strong);
  background: #151619;
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform var(--g05-motion-panel) var(--g05-ease),
    opacity var(--g05-motion-fast) var(--g05-ease),
    visibility 0s linear var(--g05-motion-panel);
}

.ch-shell.ui-v05b.workbench-open .g05-workbench {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.ch-shell.ui-v05b .g05-workbench-head {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  padding: 0 13px 0 17px;
  border-bottom: 1px solid var(--g05-line);
}

.ch-shell.ui-v05b .g05-workbench-head > div:first-child {
  min-width: 0;
  flex: 1;
}

.ch-shell.ui-v05b .g05-workbench-head h2 {
  margin-top: 4px;
  font-size: 16px;
}

.ch-shell.ui-v05b .g05-workbench-head > button {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: calc(40px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-muted);
  font-size: 20px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-workbench-head > button:hover {
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-workbench-tabs {
  display: flex;
  gap: 3px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--g05-line);
}

.ch-shell.ui-v05b .g05-workbench-tabs button {
  min-width: 0;
  min-height: 38px;
  flex: 1;
  border: 0;
  border-radius: calc(38px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-muted);
  font-size: 11.5px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-workbench-tabs button:hover,
.ch-shell.ui-v05b .g05-workbench-tabs button[aria-selected="true"] {
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-workbench-tabs button[aria-selected="true"] {
  box-shadow: 0 -2px 0 var(--g05-gold) inset;
}

.ch-shell.ui-v05b .g05-workbench-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 16px;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.ch-shell.ui-v05b .g05-workbench-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.ch-shell.ui-v05b .g05-workbench-summary > span {
  color: #c9bd82;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.ch-shell.ui-v05b .g05-workbench-summary strong {
  color: var(--g05-text);
  font-size: 13px;
  font-weight: 600;
}

.ch-shell.ui-v05b .g05-workbench-summary small {
  color: var(--g05-faint);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-workbench pre {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background: #0f1012;
  color: #d7d7da;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.65;
  tab-size: 2;
}

.ch-shell.ui-v05b .g05-workbench-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.ch-shell.ui-v05b .g05-workbench-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--g05-line);
  border-radius: calc(38px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-muted);
  font-size: 10.5px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-sim-stage {
  position: relative;
  height: 210px;
  overflow: hidden;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #111214;
  background-size: 28px 28px;
}

.ch-shell.ui-v05b .g05-sim-stage .orbit {
  position: absolute;
  border: 1px solid rgba(202, 171, 41, 0.22);
  border-radius: 50%;
}

.ch-shell.ui-v05b .g05-sim-stage .orbit.one {
  inset: 35px 78px;
}

.ch-shell.ui-v05b .g05-sim-stage .orbit.two {
  inset: 60px 38px;
  transform: rotate(28deg);
}

.ch-shell.ui-v05b .g05-sim-stage .node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g05-gold);
  box-shadow: 0 0 14px rgba(202, 171, 41, 0.32);
}

.ch-shell.ui-v05b .g05-sim-stage .node.a {
  top: 48px;
  left: 48%;
}

.ch-shell.ui-v05b .g05-sim-stage .node.b {
  right: 58px;
  bottom: 62px;
}

.ch-shell.ui-v05b .g05-sim-stage .node.c {
  bottom: 38px;
  left: 78px;
}

.ch-shell.ui-v05b .g05-range {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.ch-shell.ui-v05b .g05-range > span {
  display: flex;
  justify-content: space-between;
  color: var(--g05-muted);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-range output {
  color: #d8ca91;
  font-family: var(--mono);
}

.ch-shell.ui-v05b .g05-range input {
  width: 100%;
  accent-color: var(--g05-gold);
}

.ch-shell.ui-v05b .g05-sim-summary {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
}

.ch-shell.ui-v05b .g05-sim-summary strong {
  color: var(--g05-body);
  font-size: 10.5px;
}

.ch-shell.ui-v05b .g05-sim-summary p {
  margin: 6px 0 0;
  color: var(--g05-faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.ch-shell.ui-v05b .g05-web-address {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.ch-shell.ui-v05b .g05-web-address input,
.ch-shell.ui-v05b .g05-web-address button {
  min-height: 42px;
  border: 1px solid var(--g05-line-strong);
  border-radius: calc(42px * var(--g05-curve-ratio));
  background: var(--g05-surface);
  color: var(--g05-text);
  font-size: 11.5px;
}

.ch-shell.ui-v05b .g05-web-address input {
  min-width: 0;
  padding: 0 11px;
}

.ch-shell.ui-v05b .g05-web-address button {
  padding: 0 12px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-web-preview {
  display: grid;
  min-height: 250px;
  margin-top: 12px;
  place-content: center;
  gap: 7px;
  padding: 20px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-composer-curve);
  background: #111214;
  text-align: center;
}

.ch-shell.ui-v05b .g05-web-preview > span {
  color: #c9bd82;
  font-size: 26px;
}

.ch-shell.ui-v05b .g05-web-preview strong {
  color: var(--g05-body);
  font-size: 12px;
}

.ch-shell.ui-v05b .g05-web-preview small {
  max-width: 260px;
  color: var(--g05-faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.ch-shell.ui-v05b .g05-web-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--g05-faint);
  font-family: var(--mono);
  font-size: 9px;
}

.ch-shell.ui-v05b .g05-workbench-foot {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-top: 1px solid var(--g05-line);
  color: var(--g05-faint);
  font-size: 9.5px;
}

.ch-shell.ui-v05b .g05-workbench-foot strong {
  color: #c2ab81;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
}

.ch-shell.ui-v05b .g05-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 1280px) {
  .ch-shell.ui-v05b.workbench-open .ch-main {
    margin-right: var(--g05-workbench-width);
  }

  .ch-shell.ui-v05b .g05-workbench {
    box-shadow: none;
  }
}

@media (max-width: 1279px) {
  .ch-shell.ui-v05b .g05-workbench {
    width: min(420px, 92vw);
  }
}

@media (max-width: 820px) {
  .ch-shell.ui-v05b button {
    min-height: 44px;
  }

  .ch-shell.ui-v05b .ch-icon-btn,
  .ch-shell.ui-v05b .ch-rail-close,
  .ch-shell.ui-v05b .ch-hamburger,
  .ch-shell.ui-v05b .g05-workbench-toggle,
  .ch-shell.ui-v05b .ch-attach-chip .x {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .ch-shell.ui-v05b .ch-msg-actions button {
    min-width: 44px;
    min-height: 44px;
  }

  .ch-shell.ui-v05b .g05-switch {
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    place-items: center;
  }

  .ch-shell.ui-v05b input[type="range"] {
    min-height: 44px;
  }

  .ch-shell.ui-v05b .ch-title h1 {
    flex: 1 1 auto;
  }

  .ch-shell.ui-v05b .ch-title .tag {
    flex: 0 0 auto;
    max-width: 116px;
  }

  .ch-shell.ui-v05b .g05-workbench-toggle {
    padding: 0;
  }

  .ch-shell.ui-v05b .g05-workbench-toggle span:last-child {
    display: none;
  }

  .ch-shell.ui-v05b .g05-account-menu {
    position: fixed;
    right: 10px;
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 66px));
    left: 10px;
  }

  .ch-shell.ui-v05b .g05-page-shell {
    display: block;
    width: 100%;
    padding: 0 12px 48px;
  }

  .ch-shell.ui-v05b .g05-page-nav {
    position: sticky;
    z-index: 5;
    top: 0;
    display: flex;
    margin: 0 -12px 28px;
    overflow-x: auto;
    padding: 8px 12px;
    border-bottom: 1px solid var(--g05-line);
    background: rgba(23, 23, 25, 0.96);
    scrollbar-width: none;
  }

  .ch-shell.ui-v05b .g05-page-nav > p {
    display: none;
  }

  .ch-shell.ui-v05b .g05-page-nav button {
    flex: 0 0 auto;
    width: auto;
    min-width: 44px;
    min-height: 44px;
    white-space: nowrap;
  }

  .ch-shell.ui-v05b .g05-page-nav button.active {
    box-shadow: 0 -2px 0 var(--g05-gold) inset;
  }

  .ch-shell.ui-v05b .g05-detail-group {
    padding: 14px;
  }

  .ch-shell.ui-v05b .g05-field-grid,
  .ch-shell.ui-v05b .g05-key-values {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .g05-field input,
  .ch-shell.ui-v05b .g05-field select {
    font-size: 16px;
  }

  .ch-shell.ui-v05b .g05-admin-scopebar {
    min-height: 44px;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 8px 10px;
  }

  .ch-shell.ui-v05b .g05-admin-scopebar strong {
    margin-left: 0;
  }

  .ch-shell.ui-v05b .g05-card-head button,
  .ch-shell.ui-v05b .g05-admin-card > button {
    min-height: 44px;
  }

  .ch-shell.ui-v05b .g05-admin-content,
  .ch-shell.ui-v05b .g05-map-content {
    width: 100%;
    padding: 28px 12px 48px;
  }

  .ch-shell.ui-v05b .g05-admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ch-shell.ui-v05b .g05-admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .g05-admin-card.wide {
    grid-column: auto;
  }

  .ch-shell.ui-v05b .g05-map-flow {
    padding: 18px 12px;
    background-size: 28px 28px;
  }

  .ch-shell.ui-v05b .g05-map-level.triple {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .g05-map-branch {
    display: none;
  }

  .ch-shell.ui-v05b .g05-map-level.triple article + article {
    margin-top: 12px;
  }

  .ch-shell.ui-v05b .g05-workbench {
    width: 100vw;
    max-width: 100vw;
  }

  .ch-shell.ui-v05b .g05-workbench-head {
    padding-top: env(safe-area-inset-top);
  }

  .ch-shell.ui-v05b .g05-compose-row {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .ch-shell.ui-v05b .g05-toast {
    top: auto;
    right: 12px;
    bottom: calc(var(--g05-composer-offset) + max(14px, env(safe-area-inset-bottom)));
    left: 12px;
    max-width: none;
  }

  .ch-shell.ui-v05b[data-view]:not([data-view="chat"]) .g05-toast {
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .ch-shell.ui-v05b .g05-alpha-surface {
    flex-wrap: wrap;
    padding: 7px 12px;
  }

  .ch-shell.ui-v05b .g05-alpha-surface button {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .ch-shell.ui-v05b .g05-tool-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .g05-admin-heading {
    display: block;
  }

  .ch-shell.ui-v05b .g05-connection-state {
    margin-bottom: 18px;
  }

  .ch-shell.ui-v05b .g05-page-lead {
    margin-bottom: 24px;
  }

  .ch-shell.ui-v05b .g05-choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .g05-setting-row,
  .ch-shell.ui-v05b .g05-session-card {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .ch-shell.ui-v05b .g05-detail-head {
    flex-wrap: wrap;
  }

  .ch-shell.ui-v05b .g05-inline-value {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .ch-shell.ui-v05b .g05-workbench-state {
    display: none;
  }
}

@media (pointer: coarse) {
  .ch-shell.ui-v05b button:not([hidden]) {
    min-width: 44px;
    min-height: 44px;
  }

  .ch-shell.ui-v05b button,
  .ch-shell.ui-v05b select,
  .ch-shell.ui-v05b input {
    min-height: 44px;
  }
}

@media (max-width: 820px) {
  .ch-shell.ui-v05b button:not([hidden]) {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 360px) {
  .ch-shell.ui-v05b .g05-tool-panel {
    width: calc(100vw - 18px);
  }

  .ch-shell.ui-v05b .g05-tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .g05-admin-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .g05-map-level.single {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-shell.ui-v05b .g05-workbench-foot {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ch-shell.ui-v05b .ch-main,
  .ch-shell.ui-v05b .g05-workbench,
  .ch-shell.ui-v05b .g05-workbench-backdrop,
  .ch-shell.ui-v05b .g05-switch span::after {
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .ch-shell.ui-v05b .ch-composer textarea:focus-visible,
  .ch-shell.ui-v05b .g05-choice-grid input:focus-visible + span,
  .ch-shell.ui-v05b .g05-switch input:focus-visible + span {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }

  .ch-shell.ui-v05b .g05-choice-grid input:checked + span,
  .ch-shell.ui-v05b .g05-switch input:checked + span {
    outline: 2px solid Highlight;
    outline-offset: -4px;
  }

  .ch-shell.ui-v05b .g05-workbench,
  .ch-shell.ui-v05b .g05-account-menu,
  .ch-shell.ui-v05b .g05-map-flow,
  .ch-shell.ui-v05b .g05-admin-card,
  .ch-shell.ui-v05b .g05-admin-metrics article {
    border-color: ButtonText;
  }

  .ch-shell.ui-v05b .g05-workbench-tabs button[aria-selected="true"],
  .ch-shell.ui-v05b .g05-page-nav button.active,
  .ch-shell.ui-v05b .g05-admin-nav-item.active {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

/* ---------------------------------------------------------------------
 * QO-CANONICAL-ADOPTION additions (QuietOrbitShell.jsx).
 * Every new selector below is scoped under .ch-shell.ui-v05b, matching the
 * rest of this file's discipline. Rules above this comment are unchanged.
 * ------------------------------------------------------------------- */

/* Slot wrappers: QuietOrbitShell decorates every <div data-qo-slot="..."> it
   receives with "qo-slot qo-slot-<name>". display:contents keeps the
   wrapper out of the .ch-shell grid/flow entirely, so the actual product
   element inside it (.ch-rail, .ch-side, etc.) is what participates in
   layout — exactly as if QuietOrbitShell had rendered that element itself. */
.ch-shell.ui-v05b .qo-slot {
  display: contents;
}

/* Quiet Orbit's public (member) chat is one conversation with no visible
   mode switcher — CBTE/AEL/MM/etc. routing happens inside the composer's
   own intent handling, not a user-facing pill row. Admin retains it (e.g.
   for the AEL/admin workbench composer), so this is public-only. */
.ch-shell.ui-v05b.public .ch-composer-modes {
  display: none;
}

/* Composer bar's left attach cluster — restyle the small square buttons
   already defined in webapp.css into the same rounded/muted pill language
   as the rest of this file's controls, and give the eventual QoPlusMenu
   toggle (see .g05-plus-wrap below) a matching home if it lands here. */
.ch-shell.ui-v05b .ch-composer-bar .left {
  align-items: center;
  gap: 4px;
}

.ch-shell.ui-v05b .ch-composer-bar .left button {
  box-sizing: border-box;
  width: auto;
  min-width: 44px;
  height: 44px;
  padding-inline: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
  border-radius: 12px;
  color: var(--g05-muted);
  transition:
    color var(--g05-motion-fast) var(--g05-ease),
    background-color var(--g05-motion-fast) var(--g05-ease);
}

.ch-shell.ui-v05b .ch-composer-bar .left button:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .ch-composer-bar .left .g05-tool-toggle {
  width: 44px;
  height: 44px;
}

/* Admin inspector / DevPanel dock (data-qo-slot="side"). webapp.css already
   gives .ch-side its grid column via .ch-shell.dev and the border/scroll
   behavior; these are QO-specific spacing deltas layered on top, matching
   the minimal-delta pattern the rest of this file already uses for .ch-side. */
.ch-shell.ui-v05b .ch-side {
  box-sizing: border-box;
  width: var(--shell-side);
}

.ch-shell.ui-v05b .ch-side-head {
  padding: 16px 18px 12px;
}

.ch-shell.ui-v05b .ch-side-section {
  padding: 14px 18px;
}

/* QoRouteHeading — the shell's one route <h1 id="qo-main-title"> plus its
   breadcrumb, rendered inside <main> above the header slot. */
.ch-shell.ui-v05b .g05-route-heading {
  padding: 10px 18px 0;
}

.ch-shell.ui-v05b .g05-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  color: var(--g05-faint);
  font-size: 11px;
}

.ch-shell.ui-v05b .g05-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ch-shell.ui-v05b .g05-breadcrumb-link {
  color: var(--g05-muted);
  text-decoration: none;
}

.ch-shell.ui-v05b .g05-breadcrumb-link:hover {
  color: var(--g05-text);
  text-decoration: underline;
}

.ch-shell.ui-v05b .g05-breadcrumb-current {
  color: var(--g05-body);
}

.ch-shell.ui-v05b .g05-breadcrumb-sep {
  color: var(--g05-faint);
}

/* QoMapView's grouped admin section listing (six ADMIN_PAGE_GROUPS-mirrored
   groups, each with its section ids) — supplements the g05-map-flow "triple"
   card (group labels only) with the full per-group page id list. */
.ch-shell.ui-v05b .g05-admin-map-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ch-shell.ui-v05b .g05-admin-map-group {
  padding: 12px 14px;
  border: 1px solid var(--g05-line);
  border-radius: var(--g05-radius-card);
  background: rgba(255, 255, 255, 0.02);
}

.ch-shell.ui-v05b .g05-admin-map-group h3 {
  margin: 0 0 6px;
  color: var(--g05-body);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.ch-shell.ui-v05b .g05-admin-map-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ch-shell.ui-v05b .g05-admin-map-group li {
  padding: 2px 7px;
  border: 1px solid var(--g05-line);
  border-radius: 999px;
  color: var(--g05-faint);
  font-family: var(--mono);
  font-size: 9.5px;
}

/* QoPlusMenu's anchor lives in the compact composer row. */
.ch-shell.ui-v05b .g05-plus-wrap {
  position: relative;
  display: inline-flex;
}

/* QoWorkbench's disabled-tab UNKNOWN/DENY capability badge. */
.ch-shell.ui-v05b .g05-workbench-tabs button[aria-disabled="true"] {
  color: var(--g05-faint);
  cursor: not-allowed;
}

.ch-shell.ui-v05b .g05-tab-capability {
  display: block;
  margin-top: 2px;
  color: var(--g05-faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------
 * Founder visual correction — compact conversation-first Quiet Orbit.
 * Existing routes, handlers, AnswerPacket regions and role gates remain
 * unchanged; this block only binds their presentation to the real shell.
 * ------------------------------------------------------------------- */

.ch-shell.ui-v05b .g05-welcome {
  display: grid;
  max-width: 62ch;
  gap: 5px;
  padding: 2px 0;
}

.ch-shell.ui-v05b .g05-welcome strong {
  color: var(--g05-text);
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.ch-shell.ui-v05b .g05-welcome span {
  color: var(--g05-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.ch-shell.ui-v05b .g05-route-heading {
  flex: none;
  padding: 14px 24px 0;
}

.ch-shell.ui-v05b .g05-route-heading h1 {
  margin: 0;
  color: var(--g05-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.ch-shell.ui-v05b .ch-rail-foot {
  padding: 8px 6px 4px;
}

.ch-shell.ui-v05b .g05-account-compact {
  width: 100%;
  min-width: 0;
}

.ch-shell.ui-v05b .g05-account-compact .g05-account {
  min-height: 44px;
  gap: 9px;
  padding: 4px 6px;
  border-radius: var(--g05-thread-curve);
}

.ch-shell.ui-v05b .g05-account-compact .g05-account > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
}

.ch-shell.ui-v05b .g05-account-compact .who {
  display: block;
  overflow: hidden;
  color: var(--g05-muted);
  font-size: 12px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-shell.ui-v05b .g05-account-menu > button {
  min-height: 44px;
}

.ch-shell.ui-v05b .qo-composer-wrap {
  padding-top: 8px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(23, 23, 25, 0), var(--g05-canvas) 30%);
}

.ch-shell.ui-v05b .qo-composer {
  min-height: 56px;
  border-color: rgba(255, 255, 255, 0.095);
  background: rgba(32, 33, 37, 0.96);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 10px 28px rgba(0, 0, 0, 0.22);
}

.ch-shell.ui-v05b .qo-composer .g05-compose-row {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: 56px;
  gap: 4px;
  padding: 5px;
}

.ch-shell.ui-v05b .qo-composer textarea {
  height: 44px;
  min-height: 44px;
  padding: 10px 4px;
  line-height: 24px;
}

.ch-shell.ui-v05b .qo-composer .ch-send {
  border-radius: calc(44px * var(--g05-curve-ratio));
  font-size: 19px;
}

.ch-shell.ui-v05b .qo-composer .ch-send.stopping {
  background: rgba(201, 92, 74, 0.88);
  color: #fff;
  font-size: 12px;
}

.ch-shell.ui-v05b .qo-composer .ch-composer-tray {
  padding: 8px 8px 0;
}

.ch-shell.ui-v05b .qo-composer .g05-tool-panel {
  width: min(520px, calc(100vw - 32px));
  max-height: min(68dvh, 520px);
}

.ch-shell.ui-v05b .g05-mode-grid button {
  min-width: 0;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: calc(40px * var(--g05-curve-ratio));
  background: transparent;
  color: var(--g05-muted);
  font-size: 11px;
  cursor: pointer;
}

.ch-shell.ui-v05b .g05-mode-grid button:hover {
  border-color: var(--g05-line);
  background: var(--g05-hover);
  color: var(--g05-text);
}

.ch-shell.ui-v05b .g05-mode-grid button.on {
  border-color: var(--g05-gold-edge);
  background: var(--g05-gold-soft);
  color: #dfd099;
}

.ch-shell.ui-v05b .g05-workbench {
  border-left: 1px solid var(--g05-line-strong);
  background: rgba(24, 25, 28, 0.985);
  box-shadow: -18px 0 54px rgba(0, 0, 0, 0.32);
}

.ch-shell.ui-v05b .g05-workbench-tabs {
  background: rgba(255, 255, 255, 0.012);
}

.ch-shell.ui-v05b .g05-workbench-body {
  padding: 18px;
}

@media (max-width: 820px) {
  .ch-shell.ui-v05b .qo-composer-wrap {
    padding: 7px 10px max(10px, env(safe-area-inset-bottom));
  }

  .ch-shell.ui-v05b .qo-composer {
    border-radius: var(--g05-radius-composer);
  }

  .ch-shell.ui-v05b .g05-mode-grid button {
    min-height: 44px;
  }

  .ch-shell.ui-v05b .g05-route-heading {
    padding: 12px 14px 0;
  }
}

/* Explicit source controls live off the composer. Ratios reuse QO radii;
   44px is the existing interactive-target floor, not a spacing constant. */
.ch-shell.ui-v05b .qo-lexical-dialog {
  box-sizing: border-box;
  width: min(38rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  overflow: auto;
  border: 1px solid var(--g05-line-strong, #47484c);
  border-radius: var(--g05-radius-composer, 1rem);
  background: var(--bg-2, #202124);
  color: var(--fg-1, #f1f2f4);
  font: inherit;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.ch-shell.ui-v05b .qo-lexical-dialog:not([open]) { display: none; }
.ch-shell.ui-v05b .qo-lexical-dialog::backdrop { background: rgb(0 0 0 / 55%); }
.ch-shell.ui-v05b .qo-lexical-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.ch-shell.ui-v05b .qo-lexical-dialog h2 { margin: 0; font: inherit; font-weight: 600; font-size: 1.1em; }
.ch-shell.ui-v05b .qo-lexical-dialog button, .ch-shell.ui-v05b .qo-lexical-dialog summary, .ch-shell.ui-v05b .qo-lexical-consent,
.ch-shell.ui-v05b .qo-lexical-chip button { min-height: 44px; min-width: 44px; }
.ch-shell.ui-v05b .qo-lexical-dialog button, .ch-shell.ui-v05b .qo-lexical-chip button {
  font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--g05-line-strong, #47484c);
  border-radius: calc(var(--g05-radius-composer, 1rem) / 2);
  padding: .5em .85em; cursor: pointer;
}
.ch-shell.ui-v05b .qo-lexical-dialog button:disabled { opacity: .5; cursor: not-allowed; }
.ch-shell.ui-v05b .qo-lexical-dialog :focus-visible, .ch-shell.ui-v05b .qo-lexical-chip :focus-visible {
  outline: 2px solid var(--accent, #d5b270); outline-offset: 2px;
}
.ch-shell.ui-v05b .qo-lexical-dialog p { color: var(--fg-3, #c4c5c9); }
.ch-shell.ui-v05b .qo-lexical-consent { display: flex; align-items: center; gap: .65em; margin: .7em 0; cursor: pointer; }
.ch-shell.ui-v05b .qo-lexical-consent input { flex: 0 0 auto; width: 1.2em; height: 1.2em; accent-color: var(--accent, #d5b270); }
.ch-shell.ui-v05b .qo-lexical-actions, .ch-shell.ui-v05b .qo-lexical-chip { display: flex; flex-wrap: wrap; gap: .5em; }
.ch-shell.ui-v05b .qo-lexical-status, .ch-shell.ui-v05b .qo-lexical-publish { border-block: 1px solid var(--g05-line-strong, #47484c); padding: .8em 0; margin-block: .8em; }
.ch-shell.ui-v05b .qo-lexical-dialog summary { display: flex; align-items: center; cursor: pointer; }
.ch-shell.ui-v05b .qo-lexical-dialog dd { margin: 0 0 .7em; }
.ch-shell.ui-v05b .qo-lexical-dialog dt { color: var(--fg-3, #c4c5c9); }
.ch-shell.ui-v05b .qo-lexical-dialog code, .ch-shell.ui-v05b .ael-native-decision[data-lexical-evidence] code { overflow-wrap: anywhere; white-space: normal; }
.ch-shell.ui-v05b .qo-lexical-dialog footer { display: flex; justify-content: flex-end; padding-top: 1em; }
.ch-shell.ui-v05b .qo-lexical-chip { padding: .25em 1em; font-size: .85em; }
.ch-shell.ui-v05b .ael-native-decision summary { min-height: 44px; display: flex; align-items: center; }
.ch-shell.ui-v05b .ael-native-decision[data-lexical-evidence] code { display: block; }
.ch-shell.ui-v05b .ch-msg-actions button:disabled { cursor: not-allowed; opacity: .45; }
