    .ai-staff-room {
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr);
      gap: 10px;
      min-width: 0;
      min-height: min(720px, calc(100vh - 176px));
      color: var(--text-main);
    }

    .ai-staff-status-band {
      min-height: 68px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 12px 14px;
      border: 1px solid color-mix(in srgb, var(--room-accent) 32%, var(--line));
      border-radius: 8px;
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--room-accent) 9%, transparent), transparent 42%),
        rgba(8, 17, 27, .92);
    }

    .ai-staff-status-band h2 {
      margin: 0 0 3px;
      font-size: 18px;
      line-height: 1.2;
      letter-spacing: 0;
    }

    .ai-staff-status-band > div:first-child {
      min-width: 0;
    }

    .ai-staff-status-band > div:first-child > span {
      display: block;
      color: var(--text-muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .ai-staff-layout {
      display: grid;
      grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
      gap: 10px;
      min-height: 0;
    }

    .ai-staff-roster-panel,
    .ai-staff-detail-panel {
      min-width: 0;
      min-height: 620px;
      overflow: hidden;
      border-radius: 8px;
      background: rgba(9, 18, 28, .94);
    }

    .ai-staff-roster-panel {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
    }

    .ai-staff-roster-toolbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px 10px;
      align-items: end;
      padding: 11px;
      border-bottom: 1px solid var(--line);
      background: rgba(16, 29, 42, .9);
    }

    .ai-staff-search-field {
      grid-column: 1 / -1;
      display: grid;
      gap: 5px;
    }

    .ai-staff-roster-toolbar label > span,
    .ai-staff-inline-field > span {
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .ai-staff-search-field input,
    .ai-staff-filter-grid select,
    .ai-staff-inline-field select {
      min-width: 0;
      min-height: 34px;
      border-radius: 6px;
      background: rgba(5, 13, 21, .86);
    }

    .ai-staff-filter-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      min-width: 0;
    }

    .ai-staff-filter-grid label {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .ai-staff-filter-grid select {
      padding: 0 7px;
      font-size: 11px;
    }

    .ai-staff-roster-count {
      width: 44px;
      min-height: 34px;
      display: grid;
      place-content: center;
      text-align: center;
      border-left: 1px solid var(--line);
    }

    .ai-staff-roster-count strong {
      font-size: 15px;
      line-height: 1;
    }

    .ai-staff-roster-count span {
      margin-top: 3px;
      color: var(--text-muted);
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .ai-staff-roster-rows {
      min-height: 0;
      overflow: auto;
      scrollbar-gutter: stable;
    }

    .ai-staff-roster-item {
      min-width: 0;
    }

    button.ai-staff-roster-row {
      width: 100%;
      min-height: 82px;
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr) 112px;
      gap: 9px;
      align-items: center;
      padding: 9px 10px;
      border: 0;
      border-bottom: 1px solid rgba(121, 141, 163, .18);
      border-radius: 0;
      color: var(--text-main);
      background: transparent;
      text-align: left;
    }

    button.ai-staff-roster-row:hover {
      background: rgba(255, 255, 255, .045);
    }

    button.ai-staff-roster-row.selected {
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--room-accent) 18%, transparent), transparent 86%),
        rgba(255, 255, 255, .035);
      box-shadow: inset 3px 0 0 var(--room-accent);
    }

    button.ai-staff-roster-row.protected {
      box-shadow: inset 3px 0 0 color-mix(in srgb, var(--authority-protected-mirror) 65%, transparent);
    }

    button.ai-staff-roster-row.protected.selected {
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--authority-protected-mirror) 14%, transparent), transparent 86%),
        rgba(255, 255, 255, .035);
    }

    .ai-staff-roster-mark,
    .ai-staff-classification-mark {
      display: inline-grid;
      place-items: center;
      flex: 0 0 auto;
      border: 1px solid color-mix(in srgb, var(--jinger-teal) 48%, transparent);
      border-radius: 6px;
      color: var(--jinger-teal);
      background: color-mix(in srgb, var(--jinger-teal) 10%, transparent);
      font-size: 11px;
      font-weight: 800;
    }

    .ai-staff-roster-mark {
      width: 30px;
      height: 30px;
    }

    .ai-staff-classification-mark {
      width: 38px;
      height: 38px;
      font-size: 13px;
    }

    .ai-staff-classification-mark.protected,
    button.ai-staff-roster-row.protected .ai-staff-roster-mark {
      border-color: color-mix(in srgb, var(--authority-protected-mirror) 52%, transparent);
      color: var(--authority-protected-mirror);
      background: color-mix(in srgb, var(--authority-protected-mirror) 9%, transparent);
    }

    .ai-staff-roster-copy {
      min-width: 0;
      display: grid;
      gap: 2px;
    }

    .ai-staff-roster-copy strong,
    .ai-staff-roster-copy span,
    .ai-staff-roster-copy small {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .ai-staff-roster-copy strong {
      font-size: 12px;
    }

    .ai-staff-roster-copy span {
      color: var(--text-soft);
      font-size: 11px;
    }

    .ai-staff-roster-copy small {
      color: var(--text-muted);
      font-size: 10px;
    }

    .ai-staff-roster-state {
      width: 112px;
      display: grid;
      justify-items: end;
      gap: 5px;
    }

    .ai-staff-roster-state .tag {
      width: 100%;
      max-width: 112px;
      min-height: 20px;
      justify-content: center;
      overflow-wrap: anywhere;
      line-height: 1.15;
      text-align: center;
      white-space: normal;
    }

    .ai-staff-detail-panel {
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr);
    }

    .ai-staff-detail-header {
      min-height: 78px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      background: rgba(15, 29, 42, .86);
    }

    .ai-staff-detail-title {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .ai-staff-detail-title > div {
      min-width: 0;
    }

    .ai-staff-detail-title h3 {
      margin: 0 0 3px;
      overflow-wrap: anywhere;
      font-size: 16px;
      line-height: 1.2;
      letter-spacing: 0;
    }

    .ai-staff-detail-title span {
      display: block;
      overflow: hidden;
      color: var(--text-muted);
      font-size: 11px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .ai-staff-tabs {
      display: flex;
      min-width: 0;
      overflow-x: auto;
      border-bottom: 1px solid var(--line);
      background: rgba(7, 15, 24, .9);
      scrollbar-width: thin;
    }

    .ai-staff-tabs button {
      min-width: max-content;
      min-height: 38px;
      padding: 0 12px;
      border: 0;
      border-right: 1px solid rgba(121, 141, 163, .13);
      border-radius: 0;
      color: var(--text-muted);
      background: transparent;
      font-size: 11px;
    }

    .ai-staff-tabs button.active {
      color: var(--text-main);
      background: color-mix(in srgb, var(--room-accent) 12%, transparent);
      box-shadow: inset 0 -2px 0 var(--room-accent);
    }

    .ai-staff-tab-panel {
      min-height: 0;
      overflow: auto;
      scrollbar-gutter: stable;
    }

    .ai-staff-tab-section {
      display: grid;
      gap: 14px;
      padding: 14px;
    }

    .ai-staff-facts {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0;
      margin: 0;
      border-top: 1px solid var(--line);
      border-left: 1px solid var(--line);
    }

    .ai-staff-fact {
      min-width: 0;
      min-height: 66px;
      display: grid;
      align-content: center;
      gap: 5px;
      padding: 9px 11px;
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: rgba(255, 255, 255, .018);
    }

    .ai-staff-fact.wide {
      grid-column: 1 / -1;
    }

    .ai-staff-fact dt {
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .ai-staff-fact dd {
      min-width: 0;
      margin: 0;
      overflow-wrap: anywhere;
      color: var(--text-main);
      font-size: 12px;
      line-height: 1.35;
    }

    .ai-staff-command-row {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      align-items: center;
    }

    .ai-staff-command-row button,
    .ai-staff-control-band > button,
    .ai-staff-grant-state button,
    .ai-staff-mobile-back {
      width: auto;
      min-height: 34px;
      padding: 0 10px;
      border-radius: 6px;
      font-size: 11px;
    }

    button.ai-staff-danger {
      color: #ffd4d4;
      border-color: color-mix(in srgb, var(--status-danger) 52%, transparent);
      background: color-mix(in srgb, var(--status-danger) 13%, transparent);
    }

    button.ai-staff-danger:hover {
      background: color-mix(in srgb, var(--status-danger) 22%, transparent);
    }

    .ai-staff-human-only,
    .ai-staff-boundary-note {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 46px;
      padding: 9px 11px;
      border: 1px solid color-mix(in srgb, var(--authority-protected-mirror) 35%, transparent);
      border-radius: 6px;
      background: color-mix(in srgb, var(--authority-protected-mirror) 7%, transparent);
    }

    .ai-staff-human-only strong {
      flex: 0 0 auto;
      color: var(--authority-protected-mirror);
      font-size: 11px;
    }

    .ai-staff-human-only span,
    .ai-staff-boundary-note {
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.35;
    }

    .ai-staff-boundary-note {
      border-color: color-mix(in srgb, var(--jinger-teal) 28%, transparent);
      background: color-mix(in srgb, var(--jinger-teal) 6%, transparent);
    }

    .ai-staff-binding-status {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 7px;
      min-width: 0;
    }

    .ai-staff-binding-warning,
    .ai-staff-manual-import {
      display: grid;
      gap: 4px;
      min-width: 0;
      padding: 9px 11px;
      border-left: 3px solid var(--status-warning);
      background: color-mix(in srgb, var(--status-warning) 7%, transparent);
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }

    .ai-staff-manual-import {
      border-left-color: var(--jinger-teal);
      background: color-mix(in srgb, var(--jinger-teal) 6%, transparent);
    }

    .ai-staff-manual-import strong {
      color: var(--text-main);
      font-size: 11px;
    }

    .ai-staff-packet-preview {
      display: grid;
      gap: 7px;
      min-width: 0;
      max-height: 280px;
      padding: 10px;
      overflow-y: auto;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(6, 13, 20, .78);
    }

    .ai-staff-packet-preview strong,
    .ai-staff-packet-preview p {
      margin: 0;
      font-size: 11px;
    }

    .ai-staff-packet-preview p {
      color: var(--text-muted);
      line-height: 1.4;
    }

    .ai-staff-packet-preview pre {
      min-width: 0;
      margin: 0;
      padding: 9px;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      border: 1px solid color-mix(in srgb, var(--jinger-teal) 24%, transparent);
      background: rgba(0, 0, 0, .22);
      color: var(--text-main);
      font-family: var(--font-mono);
      font-size: 10px;
      line-height: 1.45;
    }

    .ai-staff-binding-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 7px;
      min-width: 0;
    }

    .ai-staff-binding-actions button {
      width: auto;
      min-height: 34px;
      padding: 0 10px;
      border-radius: 6px;
      font-size: 11px;
    }

    .ai-staff-control-band {
      display: flex;
      flex-wrap: wrap;
      align-items: end;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(12, 23, 35, .72);
    }

    .ai-staff-control-grid {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .ai-staff-inline-field {
      min-width: min(100%, 240px);
      flex: 1 1 220px;
      display: grid;
      gap: 5px;
    }

    .ai-staff-assign-band {
      border-color: color-mix(in srgb, var(--jinger-teal) 30%, var(--line));
    }

    .ai-staff-record-list {
      display: grid;
      border-top: 1px solid var(--line);
    }

    .ai-staff-grant-row {
      min-height: 58px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-top: 0;
      background: rgba(255, 255, 255, .018);
    }

    .ai-staff-grant-row > div:first-child {
      min-width: 0;
      display: grid;
      gap: 3px;
    }

    .ai-staff-grant-row strong,
    .ai-staff-grant-row span {
      overflow-wrap: anywhere;
      font-size: 11px;
    }

    .ai-staff-grant-row > div:first-child span {
      color: var(--text-muted);
    }

    .ai-staff-grant-state {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .ai-staff-inline-empty {
      padding: 14px 10px;
      border: 1px dashed var(--line);
      color: var(--text-muted);
      font-size: 11px;
    }

    .ai-staff-event-list {
      display: grid;
      border-top: 1px solid var(--line);
    }

    .ai-staff-event-row {
      min-height: 70px;
      display: grid;
      grid-template-columns: 12px minmax(0, 1fr);
      gap: 9px;
      align-items: start;
      padding: 10px;
      border: 1px solid var(--line);
      border-top: 0;
      background: rgba(255, 255, 255, .015);
    }

    .ai-staff-event-mark {
      width: 8px;
      height: 8px;
      margin-top: 4px;
      border: 2px solid var(--room-accent);
      border-radius: 50%;
      background: rgba(7, 15, 24, .95);
    }

    .ai-staff-event-row > div {
      min-width: 0;
      display: grid;
      gap: 3px;
    }

    .ai-staff-event-row strong {
      font-size: 11px;
    }

    .ai-staff-event-row span,
    .ai-staff-event-row small {
      overflow-wrap: anywhere;
      color: var(--text-muted);
      font-size: 10px;
      line-height: 1.35;
    }

    .ai-staff-loading .panel-body {
      min-height: 180px;
      display: grid;
      place-content: center;
      gap: 6px;
      text-align: center;
    }

    .ai-staff-loading span {
      color: var(--text-muted);
      font-size: 12px;
    }

    .ai-staff-error .panel-body {
      min-height: 180px;
      display: grid;
      place-content: center;
      justify-items: start;
      gap: 9px;
    }

    .ai-staff-error h2,
    .ai-staff-error p {
      margin: 0;
    }

    .ai-staff-error h2 {
      font-size: 16px;
      letter-spacing: 0;
    }

    .ai-staff-error p {
      color: var(--text-muted);
      font-size: 12px;
    }

    .ai-staff-error button {
      width: auto;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 6px;
    }

    .ai-staff-mobile-back {
      display: none;
    }

    .ai-staff-surface-tabs {
      min-width: 0;
      min-height: 40px;
      display: flex;
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(8, 17, 27, .94);
      scrollbar-width: thin;
    }

    .ai-staff-surface-tabs button {
      min-width: max-content;
      min-height: 38px;
      padding: 0 16px;
      border: 0;
      border-right: 1px solid rgba(121, 141, 163, .16);
      border-radius: 0;
      color: var(--text-muted);
      background: transparent;
      font-size: 11px;
      font-weight: 700;
    }

    .ai-staff-surface-tabs button.active {
      color: var(--text-main);
      background: color-mix(in srgb, var(--room-accent) 12%, transparent);
      box-shadow: inset 0 -2px 0 var(--room-accent);
    }

    .ai-staff-surface-tabs button:disabled {
      color: color-mix(in srgb, var(--text-muted) 58%, transparent);
      cursor: not-allowed;
      opacity: 1;
    }

    .ai-staff-surface-panel {
      min-width: 0;
      min-height: 0;
    }

    .ai-staff-bus-layout {
      min-width: 0;
      min-height: 620px;
      display: grid;
      grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
      gap: 10px;
    }

    .ai-staff-queue-shell {
      min-width: 0;
      min-height: 0;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      gap: 10px;
    }

    .ai-staff-queue-lanes {
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(12, minmax(108px, 1fr));
      gap: 6px;
      overflow-x: auto;
      padding: 1px 1px 5px;
      scrollbar-width: thin;
    }

    .ai-staff-lane {
      min-width: 108px;
      min-height: 52px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 6px;
      align-items: center;
      padding: 8px 9px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(11, 22, 33, .9);
    }

    .ai-staff-lane span {
      min-width: 0;
      overflow-wrap: anywhere;
      color: var(--text-muted);
      font-size: 9px;
      font-weight: 700;
      line-height: 1.25;
      text-transform: uppercase;
    }

    .ai-staff-lane strong {
      min-width: 24px;
      color: var(--text-main);
      font-size: 15px;
      line-height: 1;
      text-align: right;
    }

    .ai-staff-bus-list-panel,
    .ai-staff-bus-detail-panel {
      min-width: 0;
      min-height: 620px;
      overflow: hidden;
      border-radius: 8px;
      background: rgba(9, 18, 28, .94);
    }

    .ai-staff-bus-list-panel {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .ai-staff-bus-detail-panel {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
    }

    .ai-staff-bus-toolbar {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 8px;
      padding: 11px;
      border-bottom: 1px solid var(--line);
      background: rgba(16, 29, 42, .9);
    }

    .ai-staff-bus-toolbar .ai-staff-search-field {
      grid-column: auto;
    }

    .ai-staff-bus-toolbar .ai-staff-command-row {
      padding-top: 1px;
    }

    .ai-staff-bus-toolbar label > span,
    .ai-staff-bus-array > strong,
    .ai-staff-message-body > strong,
    .ai-staff-task-objective > strong {
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .ai-staff-segmented {
      width: 100%;
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      border: 1px solid var(--line);
      border-radius: 6px;
      overflow: hidden;
    }

    .ai-staff-segmented button {
      min-width: 0;
      min-height: 32px;
      padding: 0 8px;
      border: 0;
      border-radius: 0;
      color: var(--text-muted);
      background: rgba(5, 13, 21, .72);
      font-size: 11px;
    }

    .ai-staff-segmented button + button {
      border-left: 1px solid var(--line);
    }

    .ai-staff-segmented button.active {
      color: var(--text-main);
      background: color-mix(in srgb, var(--room-accent) 13%, rgba(5, 13, 21, .72));
      box-shadow: inset 0 -2px 0 var(--room-accent);
    }

    .ai-staff-bus-toolbar input,
    .ai-staff-bus-toolbar select {
      width: 100%;
      min-width: 0;
      min-height: 34px;
      border-radius: 6px;
      background: rgba(5, 13, 21, .86);
    }

    .ai-staff-bus-rows {
      min-width: 0;
      min-height: 0;
      overflow: auto;
      scrollbar-gutter: stable;
    }

    button.ai-staff-bus-row {
      width: 100%;
      min-width: 0;
      min-height: 78px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 116px;
      gap: 9px;
      align-items: center;
      padding: 9px 10px;
      border: 0;
      border-bottom: 1px solid rgba(121, 141, 163, .18);
      border-radius: 0;
      color: var(--text-main);
      background: transparent;
      text-align: left;
    }

    button.ai-staff-bus-row:has(.ai-staff-priority) {
      grid-template-columns: 30px minmax(0, 1fr) 116px;
    }

    button.ai-staff-bus-row:hover {
      background: rgba(255, 255, 255, .045);
    }

    button.ai-staff-bus-row.selected {
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--room-accent) 17%, transparent), transparent 86%),
        rgba(255, 255, 255, .03);
      box-shadow: inset 3px 0 0 var(--room-accent);
    }

    button.ai-staff-bus-row.protected {
      box-shadow: inset 3px 0 0 color-mix(in srgb, var(--authority-protected-mirror) 66%, transparent);
    }

    button.ai-staff-bus-row.protected.selected {
      background:
        linear-gradient(90deg, color-mix(in srgb, var(--authority-protected-mirror) 13%, transparent), transparent 86%),
        rgba(255, 255, 255, .03);
    }

    .ai-staff-priority {
      width: 30px;
      height: 30px;
      display: inline-grid;
      place-items: center;
      border: 1px solid color-mix(in srgb, var(--jinger-teal) 42%, transparent);
      border-radius: 6px;
      color: var(--jinger-teal);
      background: color-mix(in srgb, var(--jinger-teal) 8%, transparent);
      font-size: 11px;
      font-weight: 800;
    }

    .ai-staff-bus-row-copy {
      min-width: 0;
      display: grid;
      gap: 3px;
    }

    .ai-staff-bus-row-copy strong,
    .ai-staff-bus-row-copy span,
    .ai-staff-bus-row-copy small {
      min-width: 0;
      overflow-wrap: anywhere;
      line-height: 1.25;
    }

    .ai-staff-bus-row-copy strong {
      font-size: 12px;
    }

    .ai-staff-bus-row-copy span {
      color: var(--text-soft);
      font-size: 10px;
    }

    .ai-staff-bus-row-copy small {
      color: var(--text-muted);
      font-size: 10px;
    }

    .ai-staff-bus-row-state {
      width: 116px;
      min-width: 0;
      display: grid;
      justify-items: stretch;
      gap: 5px;
    }

    .ai-staff-bus-row-state .tag {
      width: 100%;
      min-width: 0;
      min-height: 20px;
      justify-content: center;
      overflow-wrap: anywhere;
      line-height: 1.15;
      text-align: center;
      white-space: normal;
    }

    .ai-staff-load-more {
      width: 100%;
      min-height: 38px;
      border: 0;
      border-top: 1px solid var(--line);
      border-radius: 0;
      color: var(--text-soft);
      background: rgba(11, 23, 35, .9);
      font-size: 11px;
    }

    .ai-staff-bus-detail-header {
      min-width: 0;
      min-height: 78px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px 12px;
      align-items: center;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      background: rgba(15, 29, 42, .86);
    }

    .ai-staff-bus-detail-header > div:first-of-type {
      min-width: 0;
    }

    .ai-staff-bus-detail-header h3 {
      margin: 0 0 3px;
      overflow-wrap: anywhere;
      font-size: 15px;
      line-height: 1.25;
    }

    .ai-staff-bus-detail-header > div:first-of-type > span {
      display: block;
      overflow-wrap: anywhere;
      color: var(--text-muted);
      font-size: 10px;
      line-height: 1.3;
    }

    .ai-staff-bus-detail-header > .tag-row {
      justify-content: flex-end;
    }

    .ai-staff-bus-detail-scroll {
      min-width: 0;
      min-height: 0;
      display: grid;
      align-content: start;
      gap: 14px;
      overflow: auto;
      padding: 14px;
      scrollbar-gutter: stable;
    }

    .ai-staff-bus-mobile-back {
      display: none;
      width: auto;
      min-height: 34px;
      padding: 0 10px;
      border-radius: 6px;
      font-size: 11px;
    }

    .ai-staff-bus-state-shell {
      min-width: 0;
      min-height: 0;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      gap: 8px;
      padding: 12px;
    }

    .ai-staff-bus-state-shell .ai-staff-inline-state {
      min-height: 100%;
    }

    .ai-staff-message-body,
    .ai-staff-task-objective {
      min-width: 0;
      display: grid;
      gap: 7px;
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(255, 255, 255, .018);
    }

    .ai-staff-message-body p,
    .ai-staff-task-objective p {
      min-width: 0;
      margin: 0;
      overflow-wrap: anywhere;
      color: var(--text-soft);
      font-size: 12px;
      line-height: 1.5;
      white-space: pre-wrap;
    }

    .ai-staff-bus-grid {
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .ai-staff-bus-array {
      min-width: 0;
      display: grid;
      align-content: start;
      gap: 7px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(255, 255, 255, .015);
    }

    .ai-staff-bus-array > span {
      color: var(--text-muted);
      font-size: 11px;
    }

    .ai-staff-bus-array ul {
      min-width: 0;
      display: grid;
      gap: 5px;
      margin: 0;
      padding: 0 0 0 16px;
    }

    .ai-staff-bus-array li {
      overflow-wrap: anywhere;
      color: var(--text-soft);
      font-size: 10px;
      line-height: 1.35;
    }

    .ai-staff-bus-subsection {
      min-width: 0;
      display: grid;
      gap: 8px;
    }

    .ai-staff-bus-subsection h4 {
      margin: 0;
      font-size: 12px;
      line-height: 1.3;
    }

    .ai-staff-artifact-list {
      display: grid;
      border-top: 1px solid var(--line);
    }

    .ai-staff-artifact-row {
      min-width: 0;
      min-height: 66px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-top: 0;
      background: rgba(255, 255, 255, .015);
    }

    .ai-staff-artifact-row > div:first-child {
      min-width: 0;
      display: grid;
      gap: 3px;
    }

    .ai-staff-artifact-row strong,
    .ai-staff-artifact-row span,
    .ai-staff-artifact-row small {
      overflow-wrap: anywhere;
      font-size: 10px;
      line-height: 1.3;
    }

    .ai-staff-artifact-row span,
    .ai-staff-artifact-row small {
      color: var(--text-muted);
    }

    .ai-staff-inline-state,
    .ai-staff-bus-loading {
      min-width: 0;
      min-height: 180px;
      display: grid;
      place-content: center;
      justify-items: start;
      gap: 7px;
      padding: 18px;
      border: 1px dashed var(--line);
      border-radius: 8px;
      background: rgba(8, 17, 27, .8);
    }

    .ai-staff-inline-state.danger {
      border-color: color-mix(in srgb, var(--status-danger) 48%, var(--line));
      background: color-mix(in srgb, var(--status-danger) 6%, rgba(8, 17, 27, .8));
    }

    .ai-staff-inline-state strong,
    .ai-staff-bus-loading strong {
      overflow-wrap: anywhere;
      font-size: 13px;
    }

    .ai-staff-inline-state span,
    .ai-staff-bus-loading span {
      max-width: 580px;
      overflow-wrap: anywhere;
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .ai-staff-inline-state button {
      width: auto;
      min-height: 34px;
      padding: 0 11px;
      border-radius: 6px;
      font-size: 11px;
    }

    body.ai-staff-dialog-open {
      overflow: hidden;
    }

    .ai-staff-dialog-overlay {
      position: fixed;
      z-index: 2200;
      inset: 0;
      min-width: 0;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(2, 7, 12, .78);
    }

    .ai-staff-dialog {
      width: min(760px, 100%);
      max-height: min(88vh, 820px);
      min-width: 0;
      overflow: hidden;
      border: 1px solid color-mix(in srgb, var(--room-accent) 35%, var(--line));
      border-radius: 8px;
      background: rgba(9, 18, 28, .99);
      box-shadow: 0 18px 60px rgba(0, 0, 0, .48);
    }

    .ai-staff-dialog.danger {
      border-color: color-mix(in srgb, var(--status-danger) 50%, var(--line));
    }

    .ai-staff-dialog-form {
      max-height: min(88vh, 820px);
      min-width: 0;
      display: grid;
      grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .ai-staff-dialog-header {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
      padding: 14px 15px;
      border-bottom: 1px solid var(--line);
      background: rgba(16, 29, 42, .96);
    }

    .ai-staff-dialog-header > div {
      min-width: 0;
    }

    .ai-staff-dialog-header h3,
    .ai-staff-dialog-header p {
      margin: 0;
      overflow-wrap: anywhere;
      letter-spacing: 0;
    }

    .ai-staff-dialog-header h3 {
      font-size: 16px;
      line-height: 1.3;
    }

    .ai-staff-dialog-header p {
      margin-top: 4px;
      color: var(--text-muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .ai-staff-dialog-close {
      width: 34px;
      height: 34px;
      min-height: 34px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      border-radius: 6px;
      font-size: 12px;
      font-weight: 800;
    }

    .ai-staff-dialog-body {
      min-width: 0;
      min-height: 0;
      display: grid;
      align-content: start;
      gap: 12px;
      overflow: auto;
      padding: 14px 15px;
      scrollbar-gutter: stable;
    }

    .ai-staff-dialog-fields {
      min-width: 0;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 11px;
    }

    .ai-staff-dialog-fields > label {
      min-width: 0;
      display: grid;
      align-content: start;
      gap: 5px;
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .ai-staff-dialog-fields > label.ai-staff-dialog-wide {
      grid-column: 1 / -1;
    }

    .ai-staff-dialog-fields input,
    .ai-staff-dialog-fields select,
    .ai-staff-dialog-fields textarea {
      width: 100%;
      min-width: 0;
      min-height: 36px;
      border-radius: 6px;
      color: var(--text-main);
      background: rgba(5, 13, 21, .9);
      font-size: 12px;
      font-weight: 400;
      line-height: 1.4;
      text-transform: none;
    }

    .ai-staff-dialog-fields textarea {
      min-height: 78px;
      resize: vertical;
    }

    .ai-staff-dialog-fields [aria-invalid="true"] {
      border-color: var(--status-danger);
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--status-danger) 42%, transparent);
    }

    .ai-staff-dialog-fields small {
      overflow-wrap: anywhere;
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 400;
      line-height: 1.35;
      text-transform: none;
    }

    .ai-staff-dialog-fields > label.ai-staff-dialog-check {
      grid-template-columns: 20px minmax(0, 1fr);
      align-items: start;
      gap: 7px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      color: var(--text-soft);
      background: rgba(255, 255, 255, .018);
      font-size: 11px;
      line-height: 1.4;
      text-transform: none;
    }

    .ai-staff-dialog-check input {
      width: 18px;
      height: 18px;
      min-height: 18px;
      margin: 0;
    }

    .ai-staff-dialog-check small {
      grid-column: 2;
    }

    .ai-staff-dialog-error {
      min-height: 18px;
      overflow-wrap: anywhere;
      color: #ffd4d4;
      font-size: 11px;
      line-height: 1.4;
    }

    .ai-staff-dialog-actions {
      min-width: 0;
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 11px 15px;
      border-top: 1px solid var(--line);
      background: rgba(11, 23, 35, .98);
    }

    .ai-staff-dialog-actions button {
      width: auto;
      min-width: 92px;
      min-height: 36px;
      padding: 0 12px;
      border-radius: 6px;
      font-size: 11px;
    }

    @media (max-width: 980px) {
      .ai-staff-layout {
        grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
      }

      .ai-staff-bus-layout {
        grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
      }

      .ai-staff-filter-grid {
        grid-template-columns: 1fr;
      }

      .ai-staff-roster-state {
        width: 104px;
      }

      .ai-staff-roster-state .tag {
        max-width: 104px;
      }

      .ai-staff-facts {
        grid-template-columns: 1fr;
      }

      .ai-staff-fact.wide {
        grid-column: auto;
      }

      .ai-staff-bus-grid {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 720px) {
      .ai-staff-room {
        min-height: calc(100vh - 144px);
      }

      .ai-staff-status-band {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
      }

      .ai-staff-layout {
        grid-template-columns: minmax(0, 1fr);
      }

      .ai-staff-roster-panel,
      .ai-staff-detail-panel,
      .ai-staff-bus-list-panel,
      .ai-staff-bus-detail-panel {
        min-height: calc(100vh - 252px);
      }

      .ai-staff-detail-panel {
        display: none;
      }

      .ai-staff-room.mobile-detail-open .ai-staff-roster-panel {
        display: none;
      }

      .ai-staff-room.mobile-detail-open .ai-staff-detail-panel {
        display: grid;
      }

      .ai-staff-mobile-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      .ai-staff-surface-tabs {
        min-height: 38px;
      }

      .ai-staff-surface-tabs button {
        min-height: 36px;
        padding: 0 12px;
      }

      .ai-staff-binding-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .ai-staff-binding-actions button {
        width: 100%;
        min-width: 0;
        white-space: normal;
      }

      .ai-staff-packet-preview {
        max-height: 220px;
      }

      .ai-staff-bus-layout {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
      }

      .ai-staff-bus-detail-panel {
        display: none;
      }

      .ai-staff-bus-layout.mobile-detail-open .ai-staff-bus-list-panel {
        display: none;
      }

      .ai-staff-bus-layout.mobile-detail-open .ai-staff-bus-detail-panel {
        display: grid;
      }

      .ai-staff-bus-mobile-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      .ai-staff-bus-detail-header {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
      }

      .ai-staff-bus-detail-header > .tag-row {
        grid-column: 1 / -1;
        justify-content: flex-start;
      }

      button.ai-staff-bus-row {
        grid-template-columns: minmax(0, 1fr) 108px;
      }

      button.ai-staff-bus-row:has(.ai-staff-priority) {
        grid-template-columns: 30px minmax(0, 1fr) 108px;
      }

      .ai-staff-bus-row-state {
        width: 108px;
      }

      .ai-staff-queue-lanes {
        grid-template-columns: repeat(12, 108px);
      }

      .ai-staff-detail-header {
        align-items: flex-start;
        flex-wrap: wrap;
      }

      .ai-staff-detail-title {
        order: 2;
        width: calc(100% - 82px);
      }

      .ai-staff-detail-header > .tag-row {
        order: 3;
        width: 100%;
      }

      .ai-staff-control-grid {
        grid-template-columns: 1fr;
      }

      .ai-staff-grant-row {
        align-items: flex-start;
        flex-direction: column;
      }

      .ai-staff-grant-state {
        width: 100%;
        justify-content: space-between;
      }

      .ai-staff-artifact-row {
        align-items: flex-start;
        flex-direction: column;
      }

      .ai-staff-artifact-row > .tag-row {
        justify-content: flex-start;
      }

      .ai-staff-dialog-overlay {
        place-items: end center;
        padding: 10px;
      }

      .ai-staff-dialog {
        max-height: calc(100vh - 20px);
      }

      .ai-staff-dialog-form {
        max-height: calc(100vh - 20px);
      }

      .ai-staff-dialog-fields {
        grid-template-columns: minmax(0, 1fr);
      }

      .ai-staff-dialog-fields > label.ai-staff-dialog-wide {
        grid-column: auto;
      }
    }

    @media (max-width: 420px) {
      button.ai-staff-bus-row,
      button.ai-staff-bus-row:has(.ai-staff-priority) {
        grid-template-columns: minmax(0, 1fr);
      }

      .ai-staff-priority {
        width: 26px;
        height: 26px;
      }

      .ai-staff-bus-row-state {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .ai-staff-bus-detail-scroll {
        padding: 10px;
      }

      .ai-staff-bus-detail-header {
        padding: 10px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .ai-staff-room *,
      .ai-staff-room *::before,
      .ai-staff-room *::after {
        scroll-behavior: auto !important;
        transition-duration: 0ms !important;
        animation-duration: 0ms !important;
      }
    }
