:root {
  --bg: #eef2ef;
  --panel: #fcfcf8;
  --ink: #182127;
  --muted: #58636f;
  --line: #c8d3d1;
  --accent: #184e5a;
  --accent-soft: #d8e9e7;
  --warning: #995f22;
  --shadow: 0 16px 36px rgba(24, 33, 39, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Palatino Linotype", Georgia, serif;
  color: var(--ink);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(24, 78, 90, 0.12), transparent 24%),
    radial-gradient(circle at left 20%, rgba(153, 95, 34, 0.08), transparent 26%),
    linear-gradient(180deg, #f7fbfa 0%, var(--bg) 100%);
}

.workspace-shell {
  height: 100vh;
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.panel h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(252, 252, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand-block {
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.05rem, 1.5vw, 1.45rem);
  line-height: 1.1;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(24, 78, 90, 0.22);
  background: linear-gradient(135deg, rgba(24, 78, 90, 0.08), rgba(24, 78, 90, 0.02));
  font-family: "Segoe UI Variable Display", "Trebuchet MS", "Aptos", sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 5px 14px rgba(24, 33, 39, 0.08);
}

.brand-wordmark-core {
  color: #163e47;
}

.brand-wordmark-ai {
  background: linear-gradient(135deg, #0d7e90 0%, #1b99a8 35%, #2b5ea7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 12px rgba(27, 153, 168, 0.2);
}

.topbar p,
.panel-copy {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.analysis-bar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.analysis-bar::-webkit-scrollbar {
  display: none;
}

.analysis-tab {
  width: auto;
  padding: 10px 14px;
  background: #e6eeec;
  color: var(--accent);
  border: 1px solid #bfd1cd;
  font-size: 0.95rem;
  white-space: nowrap;
}

.analysis-tab.is-active {
  background: var(--accent);
  color: #fff;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.panel-head-stack {
  align-items: start;
}

.tab-panel {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

#tab-hybrid {
  grid-template-rows: auto auto 1fr;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

#tab-hybrid[hidden] {
  display: none;
}

.hybrid-subnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  flex: 0 0 auto;
}

.hybrid-subtab {
  width: auto;
  padding: 9px 14px;
  border: 1px solid #bfd1cd;
  background: #edf3f1;
  color: var(--accent);
}

.hybrid-subtab.is-active {
  background: var(--accent);
  color: #fff;
}

.hybrid-subpanel {
  display: none;
  min-height: 0;
  overflow: auto;
  flex: 1 1 auto;
}

.hybrid-subpanel.is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

.vector-subnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 6px;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(252, 252, 248, 0.98) 0%, rgba(252, 252, 248, 0.9) 100%);
}

.vector-subtab {
  width: auto;
  padding: 9px 14px;
  border: 1px solid #bfd1cd;
  background: #edf3f1;
  color: var(--accent);
}

.vector-subtab.is-active {
  background: var(--accent);
  color: #fff;
}

.vector-subpanel {
  display: none;
  min-height: 0;
  overflow: auto;
  flex: 1 1 auto;
}

.vector-subpanel.is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

#vector-panel-query.vector-subpanel.is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

#vector-panel-query .analysis-form {
  min-height: 0;
  overflow: hidden;
  gap: 6px;
  flex-shrink: 0;
}

#vector-panel-query .results-container {
  min-height: 0;
  height: auto;
}

#vector-panel-query #ragQuery {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 8px 10px;
  overflow: hidden;
}

#vector-panel-query .form-toolbar {
  gap: 8px;
}

#vector-panel-query .form-toolbar button {
  padding: 8px 12px;
}

#vector-panel-query .result-meta {
  margin-top: 0;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.vector-subpanel[hidden] {
  display: none;
}

.source-page {
  min-height: 0;
}

.source-page.is-active {
  display: grid;
  gap: 12px;
  align-content: start;
}

.source-catalog-panel,
.source-detail-panel {
  height: 100%;
}

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

.tab-panel[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#tab-agent {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
}

#tab-agent .analysis-form,
#tab-agent #agentDashboard,
#tab-agent #agentTrace,
#tab-agent #agentResults {
  position: static;
  z-index: auto;
}

.structural-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.structural-subnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 6px;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(252, 252, 248, 0.98) 0%, rgba(252, 252, 248, 0.9) 100%);
}

.structural-subtab {
  width: auto;
  padding: 9px 14px;
  border: 1px solid #bfd1cd;
  background: #edf3f1;
  color: var(--accent);
  white-space: nowrap;
}

.structural-subtab.is-active {
  background: var(--accent);
  color: #fff;
}

.structural-subpanel {
  display: none;
  min-height: 0;
  overflow: auto;
  flex: 1 1 auto;
}

.structural-subpanel.is-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.structural-guide-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.structural-guide-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 6px;
}

.structural-guide-card h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent);
}

.structural-guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.89rem;
  line-height: 1.45;
}

#structural-panel-neo4j {
  overflow: hidden;
}

#structural-panel-neo4j.structural-subpanel.is-active {
  overflow: hidden;
}

#structural-panel-neo4j #graphCanvas {
  flex: 1 1 auto;
}

.structural-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.structural-title-row h2 {
  margin: 0;
}

.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
}

.graph-toolbar button {
  width: auto;
}

.graph-toolbar select {
  width: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
}

.graph-toolbar input[type="range"] {
  width: 104px;
}

#graphCanvas {
  height: 100%;
  min-height: 320px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top, rgba(24, 78, 90, 0.08), transparent 36%),
    linear-gradient(180deg, #fdfefb 0%, #edf3f1 100%);
}

.langgraph-canvas {
  height: 360px;
  min-height: 300px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(24, 78, 90, 0.08), transparent 32%),
    linear-gradient(180deg, #fdfefb 0%, #edf3f1 100%);
}

.jsonl-canvas {
  height: 360px;
  min-height: 300px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(153, 95, 34, 0.08), transparent 32%),
    linear-gradient(180deg, #fdfefb 0%, #edf3f1 100%);
}

.analysis-form {
  display: grid;
  gap: 12px;
  flex-shrink: 0;
}

.subpanel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.subpanel-wide {
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
}

.subpanel.subpanel-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-template-rows: none;
  overflow: visible;
  height: auto;
}

.subpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.subpanel-head h3 {
  margin: 0;
  font-size: 1rem;
}

.subpanel-head button {
  width: auto;
}

.secondary-button {
  background: #e6eeec;
  color: var(--accent);
  border: 1px solid #bfd1cd;
}

.source-list,
.source-detail {
  min-height: 0;
  overflow: auto;
}

.source-detail {
  padding-right: 2px;
}

.agent-page {
  min-height: 0;
}

.agent-page.is-active {
  display: grid;
  gap: 12px;
  align-content: start;
}

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

.agent-detail {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.agent-file-table-wrap {
  overflow: auto;
}

.agent-file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.agent-file-table th,
.agent-file-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.agent-file-table th {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.agent-file-table td:last-child {
  width: 132px;
}

.agent-file-detail-button {
  width: auto;
  padding: 6px 10px;
  border-radius: 10px;
  background: #e6eeec;
  color: var(--accent);
  border: 1px solid #bfd1cd;
}

.agent-graph-card {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.agent-graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.agent-graph-toolbar label {
  font-size: 0.84rem;
  color: #2f3f48;
}

.agent-graph-toolbar select {
  width: auto;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid #bfd1cd;
  background: #fff;
}

.agent-graph-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 2px;
}

.agent-graph-check input[type="checkbox"] {
  accent-color: var(--accent);
}

.agent-graph-toolbar .secondary-button {
  margin-left: auto;
  width: auto;
  padding: 6px 10px;
  border-radius: 10px;
}

.agent-graph-canvas {
  min-height: 420px;
  height: 56vh;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fcfcf8 0%, #f3f7f6 100%);
  overflow: hidden;
}

.source-list {
  display: grid;
  gap: 10px;
}

.source-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.source-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 10px 18px rgba(24, 78, 90, 0.1);
  transform: translateY(-1px);
}

.source-card strong {
  display: block;
  margin-bottom: 6px;
}

.source-action-button {
  width: auto;
  margin-top: 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f0ee;
  color: var(--accent);
  font-size: 0.84rem;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-card + .detail-card {
  margin-top: 10px;
}

.explanation-box {
  margin-top: 10px;
  border-radius: 12px;
  padding: 12px;
  background: #eef5f3;
  color: #24323a;
  line-height: 1.45;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.chunk-section-label {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.help-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #184e5a;
  color: #f7fbfa;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
}

.inline-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e8f0ee;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: help;
}

.help-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, 70vw);
  padding: 10px 12px;
  border-radius: 12px;
  background: #182127;
  color: #f7fbfa;
  box-shadow: 0 10px 24px rgba(24, 33, 39, 0.22);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 5;
}

.help-badge:hover .help-tooltip,
.help-badge:focus-visible .help-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.detail-metric {
  border-radius: 12px;
  padding: 10px;
  background: #eef5f3;
}

.detail-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-metric strong {
  display: block;
  margin-top: 4px;
}

.embedding-preview,
.chunk-text {
  margin-top: 8px;
  border-radius: 12px;
  padding: 10px;
  background: #f4f7f6;
  color: #24323a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.inspect-embedding-button {
  width: auto;
  margin-top: 10px;
}

.embedding-modal {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
  max-height: calc(100vh - 40px);
  border: none;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.embedding-modal::backdrop {
  background: rgba(24, 33, 39, 0.48);
  backdrop-filter: blur(2px);
}

.embedding-modal-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.embedding-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.modal-close-button {
  width: auto;
}

.embedding-modal-content {
  margin: 0;
  max-height: min(60vh, 560px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f4f7f6;
  padding: 14px;
  color: #24323a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.agent-file-modal {
  width: min(1020px, calc(100vw - 32px));
  max-width: 1020px;
  max-height: calc(100vh - 40px);
  border: none;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.agent-file-modal::backdrop {
  background: rgba(24, 33, 39, 0.48);
  backdrop-filter: blur(2px);
}

.agent-file-modal-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.agent-file-modal-content {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.agent-file-modal-section {
  display: grid;
  gap: 8px;
}

.agent-file-modal-section h4 {
  margin: 0;
  color: var(--accent);
}

.agent-file-modal-pre {
  margin: 0;
  max-height: min(36vh, 360px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f4f7f6;
  padding: 14px;
  color: #24323a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.graphic-source-modal-content {
  display: grid;
  gap: 12px;
}

.graphic-source-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.graphic-source-modal-actions button {
  width: auto;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(244, 247, 246, 0.8);
}

.form-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.form-toolbar label {
  color: var(--muted);
}

.form-toolbar input {
  width: 88px;
}

.form-toolbar button {
  width: auto;
}

.agent-catalog-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 10px;
}

.agent-catalog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.agent-catalog-head strong {
  font-size: 0.95rem;
}

.agent-selected-label {
  color: var(--muted);
  font-size: 0.84rem;
}

.agent-catalog-table-wrap {
  overflow-x: auto;
}

.agent-catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.agent-catalog-table th,
.agent-catalog-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.agent-catalog-table td:last-child {
  width: 170px;
}

.agent-catalog-table th {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.agent-catalog-table tbody tr.is-active {
  background: rgba(24, 78, 90, 0.07);
}

.agent-select-button {
  width: auto;
  padding: 6px 10px;
  border-radius: 10px;
  background: #e6eeec;
  color: var(--accent);
  border: 1px solid #bfd1cd;
}

.agent-detail-button {
  width: auto;
  padding: 6px 10px;
  border-radius: 10px;
  background: #f0ece1;
  color: var(--warning);
  border: 1px solid #dfc69b;
}

.agent-select-button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.agent-action-stack {
  display: grid;
  gap: 6px;
}

.agent-knowledge-files {
  display: grid;
  gap: 12px;
}

.agent-knowledge-file {
  display: grid;
  gap: 8px;
}

.agent-file-content {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #f4f7f6;
  color: #24323a;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
}

.agent-graph-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.agent-graph-node-list,
.agent-graph-edge-list {
  max-height: 280px;
  overflow: auto;
}

.agent-graph-node,
.agent-graph-edge {
  display: grid;
  gap: 4px;
}

.result-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  min-height: 0;
  overflow: auto;
  align-content: start;
  flex: 1;
}

.architecture-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  align-content: start;
}

.architecture-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 247, 245, 0.92) 100%);
  box-shadow: 0 8px 18px rgba(24, 33, 39, 0.06);
  display: grid;
  gap: 10px;
}

.architecture-card h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--accent);
}

.architecture-card-wide {
  grid-column: 1 / -1;
}

.architecture-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #2b3840;
  line-height: 1.45;
  font-size: 0.9rem;
}

.architecture-kv {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.architecture-kv div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  background: #fff;
  display: grid;
  gap: 4px;
}

.architecture-kv span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.architecture-kv strong {
  font-size: 0.88rem;
  color: var(--ink);
}

.architecture-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.flow-step {
  border: 1px solid #bfd1cd;
  border-radius: 999px;
  padding: 7px 12px;
  background: #edf3f1;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
}

.flow-arrow {
  color: var(--muted);
  font-size: 1rem;
}

.architecture-adr-list {
  display: grid;
  gap: 10px;
}

.architecture-adr {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.architecture-adr strong {
  color: var(--accent);
  font-size: 0.9rem;
}

.architecture-adr p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #fff 0%, #fafbf9 100%);
  box-shadow: 0 8px 20px rgba(24, 33, 39, 0.06);
  display: flex;
  flex-direction: column;
  min-height: auto;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(24, 33, 39, 0.12);
  border-color: var(--accent-soft);
}

.result-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--ink);
}

.result-card p {
  margin: 10px 0 0;
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-header {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  align-items: start;
}

.result-header strong {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
}

.result-badge {
  display: inline-block;
  padding: 6px 11px;
  background: linear-gradient(135deg, #d8e9e7 0%, #c8dcd9 100%);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.02em;
  width: fit-content;
}

.result-scores {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(24, 78, 90, 0.05);
  border-radius: 12px;
  margin-bottom: 12px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.score-row span {
  color: var(--muted);
  font-weight: 500;
}

.score-row strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  font-family: "Courier New", monospace;
}

.result-details {
  margin-top: 12px;
}

.result-details summary {
  cursor: pointer;
  padding: 8px 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  user-select: none;
  outline: none;
}

.result-details summary:hover {
  color: var(--accent);
  filter: brightness(1.1);
}

.details-content {
  margin-top: 8px;
  padding: 10px;
  background: rgba(24, 78, 90, 0.03);
  border-radius: 8px;
  border-left: 3px solid var(--accent-soft);
}

.details-content .meta-row {
  margin-bottom: 6px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.result-card-wide {
  grid-column: 1 / -1;
}

.graphic-results {
  display: grid;
  gap: 14px;
  min-height: 0;
  align-content: start;
}

.agent-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.agent-dashboard-card {
  display: grid;
  gap: 12px;
}

.agent-dashboard-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.workflow-trace-card {
  display: grid;
  gap: 12px;
}

.workflow-trace-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.workflow-trace-kv,
.workflow-policy-list {
  display: grid;
  gap: 10px;
}

.workflow-trace-kv div,
.workflow-policy-list div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.workflow-trace-kv span,
.workflow-policy-list span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.workflow-trace-kv strong,
.workflow-policy-list strong {
  word-break: break-word;
  font-size: 0.86rem;
  color: var(--ink);
}

.dashboard-memory-list {
  display: grid;
  gap: 10px;
}

.dashboard-memory-list div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.dashboard-memory-list span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-memory-list strong {
  word-break: break-all;
  font-size: 0.85rem;
  color: var(--ink);
}

.agent-results {
  overflow: visible;
}

.graphic-results {
  overflow: auto;
}

.agent-evidence-grid {
  display: grid;
  width: 100%;
  max-height: none;
  overflow: visible;
  flex: 0 0 auto;
  clear: both;
}

#agentResults .evidence-title {
  margin: 4px 0 0;
}

#agentResults details.observability-card {
  clear: both;
  width: 100%;
}

.evidence-title {
  margin: 0;
  font-size: 1.1rem;
}

.graphic-stage {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
}

.graphic-library-panel,
.graphic-study-panel {
  min-height: 0;
}

.graphic-sector {
  position: relative;
}

.sector-kicker {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.graphic-library-panel {
  background:
    linear-gradient(180deg, rgba(252, 252, 248, 0.96) 0%, rgba(243, 238, 226, 0.95) 100%);
}

.dormitory-sector {
  background:
    radial-gradient(circle at top right, rgba(55, 93, 138, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(249, 251, 255, 0.96) 0%, rgba(236, 242, 248, 0.98) 100%);
}

.graphic-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.graphic-toolbar button {
  width: auto;
}

.graphic-agent-marker {
  position: absolute;
  left: 22px;
  top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  transition: left 0.28s ease, top 0.28s ease, right 0.28s ease, bottom 0.28s ease;
}

.graphic-agent-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #f7fbfa 0 16%, transparent 17%),
    radial-gradient(circle at 65% 35%, #f7fbfa 0 16%, transparent 17%),
    radial-gradient(circle at 50% 68%, #f7fbfa 0 13%, transparent 14%),
    linear-gradient(180deg, #184e5a 0%, #2f6a63 100%);
  box-shadow: 0 8px 18px rgba(24, 33, 39, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.graphic-agent-bubble {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(24, 78, 90, 0.14);
  box-shadow: 0 8px 16px rgba(24, 33, 39, 0.1);
}

.graphic-agent-bubble strong {
  margin: 0;
  font-size: 0.82rem;
}

.graphic-agent-bubble span {
  color: var(--muted);
  font-size: 0.76rem;
}

.graphic-agent-marker.is-loading .graphic-agent-avatar {
  box-shadow: 0 0 0 6px rgba(153, 95, 34, 0.12), 0 8px 18px rgba(24, 33, 39, 0.18);
}

.graphic-agent-marker.is-loading,
.graphic-agent-marker.is-ready,
.graphic-agent-marker.is-success {
  left: auto;
  right: 22px;
  top: 22px;
}

.graphic-agent-marker.is-success .graphic-agent-avatar {
  box-shadow: 0 0 0 6px rgba(47, 106, 99, 0.12), 0 8px 18px rgba(24, 33, 39, 0.18);
}

.graphic-agent-marker.is-warning .graphic-agent-avatar {
  box-shadow: 0 0 0 6px rgba(153, 95, 34, 0.12), 0 8px 18px rgba(24, 33, 39, 0.18);
}

.library-shelves {
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: auto;
  padding: 4px;
}

.library-mini-map {
  display: grid;
  gap: 12px;
  width: min(360px, 100%);
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #d6e0dc;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(243, 248, 246, 0.96) 100%),
    linear-gradient(90deg, rgba(24, 78, 90, 0.04) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, rgba(24, 78, 90, 0.04) 0 1px, transparent 1px 28px);
}

.library-map-agent {
  position: absolute;
  left: 26px;
  top: 84px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(24, 78, 90, 0.14);
  box-shadow: 0 8px 14px rgba(24, 33, 39, 0.08);
  z-index: 2;
  transition: left 0.32s ease, top 0.32s ease, right 0.32s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.library-map-agent-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #184e5a 0%, #2f6a63 100%);
}

.library-map-agent span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.library-map-agent.is-loading,
.library-map-agent.is-success {
  box-shadow: 0 0 0 4px rgba(24, 78, 90, 0.08), 0 8px 14px rgba(24, 33, 39, 0.08);
}

.library-map-agent.is-loading {
  animation: irisRun 0.48s ease-in-out infinite;
}

.library-map-agent.is-dormitory {
  left: 26px;
  top: 84px;
}

.library-map-agent.is-shelf-0 {
  left: 22px;
  top: 172px;
}

.library-map-agent.is-shelf-1 {
  right: 22px;
  left: auto;
  top: 172px;
}

.library-map-agent.is-shelf-2 {
  left: 22px;
  top: 268px;
}

.library-map-agent.is-shelf-3 {
  right: 22px;
  left: auto;
  top: 268px;
}

.library-map-dormitory {
  position: absolute;
  left: 16px;
  top: 48px;
  width: 118px;
  height: 92px;
  border-radius: 14px;
  border: 1px solid rgba(28, 46, 63, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(240, 246, 250, 0.98) 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
}

.library-map-dormitory-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #184e5a 0%, #2f6a63 100%);
}

.library-map-dormitory-copy {
  display: grid;
  gap: 2px;
}

.library-map-dormitory-copy strong {
  margin: 0;
  font-size: 0.78rem;
}

.library-map-dormitory-copy span {
  color: var(--muted);
  font-size: 0.7rem;
}

.library-map-dormitory-zz {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  gap: 2px;
  color: #5c809d;
  font-size: 0.7rem;
  font-weight: 700;
}

.library-map-dormitory-zz span {
  animation: sleepFloat 1.8s ease-in-out infinite;
}

.library-map-dormitory-zz span:nth-child(2) {
  animation-delay: 0.3s;
}

.library-map-dormitory-zz span:nth-child(3) {
  animation-delay: 0.6s;
}

.library-floorplan-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.library-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 0;
}

.library-mini-shelf {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 29, 0.08);
  background: rgba(255, 255, 255, 0.65);
}

.library-mini-shelf-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.library-mini-shelf-head strong {
  color: var(--ink);
  font-size: 0.76rem;
}

.library-mini-books {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
}

.library-book-tile {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 29, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(246, 248, 247, 0.92) 100%);
  text-align: left;
  box-shadow: 0 10px 18px rgba(24, 33, 39, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.library-book-tile.is-compact {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  grid-template-columns: 1fr;
  border-radius: 6px;
  box-shadow: none;
}

.library-book-tile:hover,
.library-book-tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 22px rgba(24, 33, 39, 0.12);
}

.library-book-tile.is-compact:hover,
.library-book-tile.is-compact:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(24, 33, 39, 0.12);
}

.library-book-tile.is-selected {
  border-color: color-mix(in srgb, var(--book-accent) 60%, #184e5a 40%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--book-accent) 18%, transparent 82%), 0 14px 22px rgba(24, 33, 39, 0.12);
}

.library-book-tile.is-compact.is-selected {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--book-accent) 28%, transparent 72%);
}

.library-shelf-rim {
  display: block;
  width: 18px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #8d6945 0%, #6f4d30 100%);
}

.library-book-top {
  display: block;
  height: 22px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--book-accent) 82%, white 18%) 0%, color-mix(in srgb, var(--book-accent) 62%, #273137 38%) 100%);
  box-shadow: inset 0 -6px 0 rgba(255, 255, 255, 0.14);
}

.library-book-tile.is-compact .library-book-top {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.library-book-dot {
  display: none;
}

.library-book-tile.is-compact .library-book-dot {
  display: block;
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.library-book-info {
  display: grid;
  gap: 6px;
}

.library-book-tile.is-compact .library-book-info,
.library-book-tile.is-compact .library-shelf-rim {
  display: none;
}

.library-book-info strong,
.library-book-info span {
  min-width: 0;
}

.library-book-info strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.2;
}

.library-book-info span {
  color: var(--muted);
  font-size: 0.78rem;
}

@keyframes sleepFloat {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-6px);
  }
}

@keyframes irisRun {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.selected-sources {
  display: grid;
  gap: 12px;
}

.selected-sources-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.selected-sources-grid {
  display: grid;
  gap: 10px;
}

.selected-source-card {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.selected-source-spine {
  border-radius: 999px;
  background: var(--source-accent);
}

.study-status {
  border-radius: 14px;
  padding: 12px;
  background: #eef5f3;
  color: #24323a;
  border: 1px solid #d3dfdb;
}

.study-status.is-ready {
  background: #edf5ea;
  border-color: #bdd4b8;
}

.study-status.is-loading {
  background: #f7f0e6;
  border-color: #dcc7aa;
}

.study-status.is-success {
  background: #e7f2ef;
  border-color: #b9d3cb;
}

.study-status.is-warning {
  background: #f9eee8;
  border-color: #dfc1ad;
}

.study-hero-card {
  background:
    radial-gradient(circle at top right, rgba(24, 78, 90, 0.12), transparent 35%),
    linear-gradient(180deg, #fbfcf8 0%, #f1f5f2 100%);
}

.study-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.study-avatar-stage {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.study-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #f7fbfa 0 16%, transparent 17%),
    radial-gradient(circle at 65% 35%, #f7fbfa 0 16%, transparent 17%),
    radial-gradient(circle at 50% 68%, #f7fbfa 0 13%, transparent 14%),
    linear-gradient(180deg, #184e5a 0%, #2f6a63 100%);
  box-shadow: 0 10px 18px rgba(24, 33, 39, 0.14);
}

.study-source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.study-source-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e7f0ed;
  color: var(--accent);
  font-size: 0.84rem;
}

.study-trace {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.trace-step {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px;
  background: #fff;
}

.trace-step.is-done {
  border-color: #bcd1ca;
  background: #f8fbfa;
}

.observability-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #f8fbfa;
}

.observability-card summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
}

.observability-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.candidate-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.candidate-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.candidate-item.is-selected {
  border-color: var(--accent);
  background: #eef5f3;
}

.meta-row {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  line-height: 1.45;
}

.result-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0;
  padding: 10px 12px;
  background: rgba(24, 78, 90, 0.05);
  border-radius: 12px;
  line-height: 1.45;
}

.structural-head {
  align-items: start;
  gap: 16px;
}

textarea,
input,
button {
  width: 100%;
  font: inherit;
}

textarea,
input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.05);
}

button:focus,
textarea:focus,
input:focus,
select:focus {
  outline: 2px solid rgba(24, 78, 90, 0.18);
  outline-offset: 2px;
}

#graphStatus,
#scoreThresholdValue {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .workspace-shell {
    padding: 10px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .analysis-bar {
    justify-content: flex-start;
  }

  .graph-toolbar {
    align-items: start;
    justify-content: flex-start;
  }

  .panel-head,
  .structural-head {
    flex-direction: column;
  }

  .structural-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .form-toolbar {
    align-items: stretch;
  }

  .form-toolbar input,
  .form-toolbar button,
  .analysis-tab,
  .hybrid-subtab,
  .vector-subtab,
  .structural-subtab {
    width: 100%;
  }

  .hybrid-subnav,
  .vector-subnav,
  .structural-subnav {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  #tab-hybrid {
    overflow: auto;
  }

  #vector-panel-query.vector-subpanel.is-active {
    display: flex;
    overflow: auto;
  }

  .subpanel,
  .subpanel-wide {
    display: block;
    overflow: visible;
  }

  .subpanel.subpanel-flow {
    display: flex;
  }

  .subpanel-wide {
    margin-top: 12px;
  }

  .graphic-stage {
    grid-template-columns: 1fr;
  }

  .dormitory-scene {
    grid-template-columns: 1fr;
  }

  .library-shelf {
    min-height: 180px;
  }

  .selected-sources-head,
  .study-hero-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .source-list {
    max-height: 280px;
    min-height: 220px;
  }

  .source-detail {
    max-height: none;
  }

  .architecture-grid {
    grid-template-columns: 1fr;
  }

  .architecture-flow {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .flow-arrow {
    display: none;
  }
}

@media (max-height: 760px) {
  .topbar p {
    display: none;
  }
}
/* ===================================================
   2D Game Panel � Analise Grafica
   =================================================== */

.game-panel {
  padding: 0;
  overflow: hidden;
  height: 100%;
}

.game-viewport {
  display: grid;
  grid-template-columns: 1fr 360px;
  height: 100%;
  overflow: hidden;
}

/* ---------- Game Scene (left) ---------- */

.game-scene {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0d0f18;
  border-right: 1px solid #1e2233;
}

.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #0a0b12;
  border-bottom: 1px solid #1e2233;
  flex-shrink: 0;
}

.game-hud-meta {
  flex: 1;
  font-family: monospace;
  font-size: 0.68rem;
  color: #4b5563;
}

.game-hud-refresh {
  background: none;
  border: 1px solid #2a2d3a;
  color: #6b7280;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
}

.game-hud-refresh:hover { border-color: #5e81f4; color: #5e81f4; }

#libraryShelves {
  flex: 1;
  overflow: auto;
  padding: 12px;
}

/* ---------- Agent Picker Bar (bottom of scene) ---------- */

.game-agent-picker-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #090b14;
  border-top: 1px solid #1e2233;
  flex-wrap: wrap;
}

.gap-info {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}

.gap-info strong {
  font-size: 0.72rem;
  color: #e2e8f0;
}

.gap-info .meta-row {
  font-size: 0.62rem;
  color: #4b5563;
}

.gap-query-input {
  flex: 1;
  min-width: 170px;
  background: #12141f;
  border: 1px solid #2a2d3a;
  color: #e2e8f0;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
}

.gap-query-input:focus { outline: none; border-color: #5e81f4; }

.gap-agent-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gap-agent-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--agent-color, #5e81f4);
  background: color-mix(in srgb, var(--agent-color, #5e81f4) 10%, transparent);
  color: var(--agent-color, #5e81f4);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  gap: 1px;
}

.gap-agent-btn:hover {
  background: color-mix(in srgb, var(--agent-color, #5e81f4) 22%, transparent);
}

.gap-agent-name {
  font-size: 0.78rem;
  font-weight: 700;
}

.gap-agent-sub {
  font-size: 0.62rem;
  opacity: 0.72;
}

.gap-clear-btn {
  background: none;
  border: 1px solid #374151;
  color: #6b7280;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
}

.gap-clear-btn:hover { border-color: #bf616a; color: #bf616a; }

/* ---------- Chat Panel (right) ---------- */

.game-chat-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0b0d16;
}

.game-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #1e2233;
  flex-shrink: 0;
}

.game-chat-header strong {
  font-size: 0.78rem;
  color: #e2e8f0;
  letter-spacing: 0.04em;
}

.game-agent-badge {
  font-size: 0.68rem;
  padding: 2px 10px;
  border-radius: 100px;
  font-family: monospace;
}

/* Minimal top-down office map */

.office-map {
  display: grid;
  gap: 14px;
  min-height: 100%;
}

.office-map-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.office-map-head strong {
  color: #eef2f5;
  font-size: 0.96rem;
}

.office-map-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.office-map-legend .chip {
  background: rgba(255, 255, 255, 0.08);
  color: #ced8df;
}

.office-agent-tracker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.office-agent-tracker-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 11, 18, 0.38);
}

.office-agent-tracker-item strong {
  color: #f3f6f8;
  font-size: 0.78rem;
}

.office-agent-tracker-item span {
  color: #b5c2cb;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.office-agent-tracker-item.is-selected {
  border-color: rgba(238, 210, 164, 0.45);
  background: rgba(238, 210, 164, 0.12);
}

.office-map-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 2fr 1.2fr;
  gap: 14px;
}

@media (max-width: 1480px) {
  .office-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .office-room-meeting {
    grid-column: span 2;
  }
}


@media (max-width: 960px) {
  .office-map-grid {
    grid-template-columns: 1fr;
  }
}

.office-room {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-height: 340px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.office-room-dormitory {
  background: linear-gradient(180deg, #111827 0%, #0d1420 100%);
}

.office-room-library {
  background: linear-gradient(180deg, #1b1713 0%, #13100d 100%);
  min-height: 580px;
}

.office-room-meeting {
  background: linear-gradient(180deg, #0f1819 0%, #0b1213 100%);
  align-self: start;
}

.office-room-cognitive-core {
  background:
    radial-gradient(circle at 50% 34%, rgba(94, 234, 255, 0.16), transparent 34%),
    radial-gradient(circle at 12% 12%, rgba(130, 90, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #080b16 0%, #05070d 100%);
  border-color: rgba(94, 234, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 36px rgba(94, 234, 255, 0.08);
}

.office-room-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.office-room-head strong {
  color: #f7f6f2;
  font-size: 0.9rem;
}

.office-room-head span {
  color: #8fa0ac;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.office-room-body {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}
.office-room-body-dormitory {
  place-items: center !important;
  position: relative !important;
  min-height: 520px !important;
}

.office-room-body-meeting {
  place-items: center !important;
  position: relative !important;
  padding-bottom: 70px !important;
  min-height: 520px !important;
}





.office-room-body-cognitive-core {
  overflow: hidden;
  align-content: stretch;
  background:
    linear-gradient(90deg, rgba(94, 234, 255, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(94, 234, 255, 0.05) 1px, transparent 1px),
    rgba(2, 6, 18, 0.68);
  background-size: 22px 22px;
}

.office-bed {
  width: 92px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(180deg, #8fa4c7 0%, #64789d 100%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.office-meeting-table {
  position: relative;
  width: 480px;
  height: 380px;
  background: none !important;
  box-shadow: none !important;
  display: grid;
  place-items: center;
  margin: auto !important;
  filter: drop-shadow(0 0 45px rgba(0, 240, 255, 0.45)) !important;
}

.office-decentralized-chamber {
  width: 100%;
  height: 100%;
}

.office-decentralized-chamber svg {
  width: 100%;
  height: 100%;
}

/* Hide all top-down operators in the chamber by default */
.office-decentralized-chamber svg .chamber-operator {
  display: none !important;
}

/* Dynamically display each agent sitting in their chair only if they are active in the meeting room */
.office-decentralized-chamber.meeting-friday svg .chamber-operator.is-friday {
  display: block !important;
}
.office-decentralized-chamber.meeting-jarvis svg .chamber-operator.is-jarvis {
  display: block !important;
}
.office-decentralized-chamber.meeting-socrates svg .chamber-operator.is-socrates {
  display: block !important;
}
.office-decentralized-chamber.meeting-gemini svg .chamber-operator.is-gemini {
  display: block !important;
}

.office-agents-lane-meeting {
  position: absolute !important;
  bottom: 12px !important;
  left: 0 !important;
  right: 0 !important;
  display: flex !important;
  justify-content: center !important;
  gap: 12px !important;
  z-index: 10 !important;
}

.cognitive-core-door {
  justify-self: start;
  width: 72px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 12px 12px 6px 6px;
  border: 1px solid rgba(94, 234, 255, 0.36);
  background:
    linear-gradient(90deg, transparent 47%, rgba(94, 234, 255, 0.34) 48% 52%, transparent 53%),
    linear-gradient(180deg, rgba(94, 234, 255, 0.16) 0%, rgba(24, 38, 82, 0.28) 100%);
  color: #aefaff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-shadow: 0 0 10px rgba(94, 234, 255, 0.85);
  box-shadow: 0 0 22px rgba(94, 234, 255, 0.12);
}

.cognitive-core-stage {
  position: relative;
  display: grid;
  min-height: 148px;
  place-items: center;
}

.cognitive-core-energy {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  border: 1px solid rgba(174, 250, 255, 0.38);
  background:
    radial-gradient(circle, rgba(174, 250, 255, 0.45) 0 12%, rgba(94, 234, 255, 0.18) 13% 42%, transparent 43%),
    radial-gradient(circle, rgba(130, 90, 255, 0.22), transparent 68%);
  filter: drop-shadow(0 0 14px rgba(94, 234, 255, 0.52));
  animation: cognitive-core-pulse 2.8s ease-in-out infinite;
}

.cognitive-core-terminal {
  position: absolute;
  width: 58px;
  height: 38px;
  border: 1px solid rgba(94, 234, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(174, 250, 255, 0.16), rgba(39, 61, 130, 0.1)),
    repeating-linear-gradient(180deg, rgba(174, 250, 255, 0.22) 0 2px, transparent 2px 7px);
  box-shadow: 0 0 16px rgba(94, 234, 255, 0.1);
}

.cognitive-core-terminal-left {
  left: 10px;
  bottom: 18px;
  transform: skewY(5deg);
}

.cognitive-core-terminal-right {
  right: 10px;
  top: 22px;
  transform: skewY(-5deg);
}

.cognitive-core-server-stack {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  gap: 5px;
}

.cognitive-core-server-stack span {
  width: 52px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(94, 234, 255, 0.22);
  background: linear-gradient(90deg, rgba(94, 234, 255, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: inset 8px 0 0 rgba(94, 234, 255, 0.32);
}

.office-agents-lane-cognitive-core {
  position: relative;
  z-index: 2;
}

.cognitive-core-expansion {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cognitive-core-future-slot {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  border: 1px dashed rgba(174, 250, 255, 0.22);
  background: rgba(5, 9, 22, 0.72);
}

.cognitive-core-future-slot strong {
  color: #dffbff;
  font-size: 0.68rem;
}

.cognitive-core-future-slot span {
  color: #6f8fa0;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.office-books-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.office-books-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-content: start;
}

.office-library-group {
  display: grid;
  gap: 0;
}

.office-library-group-head {
  display: none;
}

.office-shelf-square {
  position: relative;
  width: 40px;
  height: 120px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.office-shelf-square:hover,
.office-shelf-square:focus-visible {
  transform: translateY(-2px) scale(1.06);
  filter: brightness(1.25) drop-shadow(0 0 8px rgba(0, 240, 255, 0.45));
  z-index: 10;
}

.office-shelf-square.is-selected {
  outline: 1.5px solid rgba(236, 210, 165, 0.75);
  outline-offset: 2px;
  border-radius: 4px;
  filter: drop-shadow(0 0 10px rgba(236, 210, 165, 0.5));
}

.office-datacenter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 24px 12px 28px 12px; /* Extra bottom padding for the metallic floor reflection */
  background: 
    /* Core glowing neural field backdrop */
    radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.08) 0%, rgba(168, 85, 247, 0.04) 40%, transparent 72%),
    /* Micro sci-fi pixel coordinates grid */
    linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px),
    /* Delicate circuit board linear guides */
    repeating-linear-gradient(45deg, rgba(168, 85, 247, 0.012) 0px, rgba(168, 85, 247, 0.012) 2px, transparent 2px, transparent 12px),
    /* Deep space base dashboard gradient */
    linear-gradient(180deg, #090a10 0%, #030407 100%);
  background-size: 100% 100%, 20px 20px, 20px 20px, 120px 120px, 100% 100%;
  border-radius: 20px;
  border: 1.5px solid rgba(0, 240, 255, 0.12);
  box-shadow: 
    inset 0 0 35px rgba(0, 240, 255, 0.04),
    inset 0 0 20px rgba(0, 0, 0, 0.95),
    0 12px 36px rgba(0, 0, 0, 0.65);
  margin-bottom: 12px;
  overflow: hidden;
}

/* Background Layer: Holographic CRT scanline vignette overlay (Subtle Sci-Fi observability) */
.office-datacenter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(rgba(255, 255, 255, 0.015) 50%, rgba(0, 0, 0, 0.15) 50%),
    radial-gradient(circle at 50% 50%, transparent 20%, rgba(0, 0, 0, 0.45) 85%);
  background-size: 100% 4px, 100% 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}

/* Floor Layer: Polished black glass sci-fi floor mirror reflection base at the bottom */
.office-datacenter::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 22px;
  background: linear-gradient(to top, rgba(0, 240, 255, 0.16) 0%, rgba(168, 85, 247, 0.04) 50%, transparent 100%);
  border-top: 1px solid rgba(0, 240, 255, 0.22);
  box-shadow: 0 -6px 14px rgba(0, 240, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}

.datacenter-row {
  display: flex;
  justify-content: center;
  gap: 5px; /* denser column layout */
  width: 100%;
  z-index: 2;
}

.office-server-cabinet {
  position: relative;
  width: 32px;
  height: 75px;
  box-sizing: border-box;
}

/* Glowing LED antenna bulb at 45.8% left (top antenna of cognitive_shelf) in the foreground */
.office-server-cabinet::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 45.8%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  z-index: 10;
  pointer-events: none;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Deactivated states (offline ONLY) get a glowing RED LED */
.office-server-cabinet.state-offline::after {
  background-color: #ef4444;
  box-shadow: 
    0 0 6px #ef4444, 
    0 0 12px #ef4444, 
    0 0 20px rgba(239, 68, 68, 0.9);
  animation: led-blink-red 2.5s infinite alternate ease-in-out;
}

/* Activated states (idle, thinking & overclock) get a glowing GREEN LED */
.office-server-cabinet.state-idle::after,
.office-server-cabinet.state-thinking::after,
.office-server-cabinet.state-overclock::after {
  background-color: #10b981;
  box-shadow: 
    0 0 6px #10b981, 
    0 0 12px #10b981, 
    0 0 20px rgba(16, 185, 129, 0.9);
  animation: led-blink-green 1.5s infinite alternate ease-in-out;
}

/* Sweeping ciano/purple technological laser line for active processing servers */
.office-server-cabinet.state-thinking::before,
.office-server-cabinet.state-overclock::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00f0ff, #ffffff, #00f0ff, transparent);
  box-shadow: 
    0 0 8px #00f0ff,
    0 0 16px rgba(0, 240, 255, 0.8);
  z-index: 2;
  pointer-events: none;
  animation: srv-laser-sweep 2.2s infinite linear;
}

@keyframes srv-laser-sweep {
  0% { top: 4px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: calc(100% - 6px); opacity: 0; }
}

/* Deactivated server outline border (offline ONLY) */
.office-server-cabinet.state-offline {
  border: 1.5px solid rgba(239, 68, 68, 0.22);
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.03);
  box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Activated server outline border (idle, thinking & overclock) */
.office-server-cabinet.state-idle,
.office-server-cabinet.state-thinking,
.office-server-cabinet.state-overclock {
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.04);
  box-shadow: inset 0 0 8px rgba(16, 185, 129, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.office-server-sprite {
  width: 100%;
  height: 100%;
  background-image: url("/static/sprites/library/cognitive_shelf.svg");
  background-repeat: no-repeat;
  background-size: 160px 120px; /* 4 frames of 40px wide, 120px high */
  background-position: 0px 0px;
  image-rendering: pixelated;
  z-index: 1;
}

/* Server States mapping to 40px width frames */
.state-offline .office-server-sprite {
  background-position: 0px 0px;
}
.state-idle .office-server-sprite {
  background-position: -40px 0px;
}
.state-thinking .office-server-sprite {
  background-position: -80px 0px;
}
.state-overclock .office-server-sprite {
  background-position: -120px 0px;
}

/* Highly visible glowing red-metallic sepia outline silhouette filters for deactivated sprites (offline ONLY) */
.office-server-cabinet.state-offline .office-server-sprite {
  filter: grayscale(100%) brightness(0.55) sepia(100%) hue-rotate(-50deg) saturate(3.5) contrast(1.15) drop-shadow(0 0 1px rgba(239, 68, 68, 0.45));
  opacity: 0.95;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

/* Fully saturated colorful look for activated sprites (idle, thinking & overclock) */
.office-server-cabinet.state-idle .office-server-sprite,
.office-server-cabinet.state-thinking .office-server-sprite,
.office-server-cabinet.state-overclock .office-server-sprite {
  filter: brightness(1.05) contrast(1.05) saturate(1.1);
  opacity: 1;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

/* Reveal full colors and lights on hover */
.office-shelf-square:hover .office-server-sprite,
.office-shelf-square:focus-visible .office-server-sprite {
  filter: none !important;
  opacity: 1 !important;
}

/* Chunks do not appear if the reactor is turned off/offline */
.office-datacenter.state-offline .floating-chunk {
  display: none !important;
}

@keyframes led-blink-red {
  0% { opacity: 0.45; filter: brightness(0.85); }
  100% { opacity: 1; filter: brightness(1.3) drop-shadow(0 0 3px #ef4444); }
}

@keyframes led-blink-green {
  0% { opacity: 0.55; filter: brightness(0.85); }
  100% { opacity: 1; filter: brightness(1.4) drop-shadow(0 0 3px #10b981); }
}

/* Glow effects for active servers */
.office-server-cabinet.state-thinking::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
  pointer-events: none;
  opacity: 0.85;
  animation: srv-glow-cyan 2s infinite alternate;
}

.office-server-cabinet.state-overclock::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 4px;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.7);
  pointer-events: none;
  opacity: 0.95;
  animation: srv-glow-purple 1.5s infinite alternate;
}

.office-reactor-cabinet {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 6px 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform 0.3s ease;
  z-index: 3;
  /* Multi-layered concentric mechanical hatch platform base */
  background: 
    radial-gradient(circle, rgba(13, 16, 28, 0.95) 0%, rgba(20, 30, 48, 0.5) 45%, rgba(15, 23, 42, 0.9) 62%, rgba(0, 240, 255, 0.16) 66%, rgba(2, 6, 23, 0.98) 69%, transparent 73%);
  box-shadow: 
    inset 0 0 18px rgba(0, 240, 255, 0.22),
    0 4px 20px rgba(0, 0, 0, 0.88);
}

.office-reactor-cabinet:hover {
  transform: scale(1.04);
}

/* Socrates as Neural core Reactor Operator positioning and entry animations */
.office-reactor-cabinet .office-agent-token[data-agent-id="socrates"] {
  position: absolute;
  left: -76px; /* Placed directly next to the reactor's left status panel */
  top: 50%;
  transform: translateY(-50%);
  width: 88px;
  height: 88px;
  z-index: 10;
  pointer-events: auto;
  animation: socrates-walk-to-reactor 1.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* Flipped orientation for Socrates sprite to face the reactor console on his right, and stop walk cycle animation so he stands still */
.office-reactor-cabinet .office-agent-token[data-agent-id="socrates"] .office-agent-sprite {
  transform: scaleX(-1);
  animation: none !important;
  background-position: 0 0 !important;
}

/* Socrates' operating terminal holographic screen console */
.office-reactor-cabinet .office-agent-token[data-agent-id="socrates"]::before {
  content: "";
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 32px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.4) 0%, rgba(168, 85, 247, 0.2) 100%);
  border: 1px solid rgba(0, 240, 255, 0.6);
  box-shadow: 
    0 0 10px rgba(0, 240, 255, 0.5),
    inset 0 0 4px rgba(0, 240, 255, 0.3);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Screen lights up and pulses when Socrates is actively processing in the library */
.office-reactor-cabinet.state-thinking .office-agent-token[data-agent-id="socrates"]::before,
.office-reactor-cabinet.state-overclock .office-agent-token[data-agent-id="socrates"]::before {
  opacity: 1;
  animation: terminal-screen-pulse 2s infinite alternate ease-in-out;
}

@keyframes terminal-screen-pulse {
  0% { transform: translateY(-50%) scale(0.95); filter: brightness(0.9) drop-shadow(0 0 4px rgba(0, 240, 255, 0.4)); }
  100% { transform: translateY(-50%) scale(1.05); filter: brightness(1.2) drop-shadow(0 0 12px rgba(0, 240, 255, 0.8)); }
}

@keyframes socrates-walk-to-reactor {
  0% { 
    transform: translate3d(120px, 260px, 0) scale(0.8);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% { 
    transform: translate3d(0, -50%, 0) scale(1);
    opacity: 1;
  }
}

.office-reactor-cabinet::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px double rgba(168, 85, 247, 0.3);
  border-left-color: transparent;
  border-right-color: transparent;
  pointer-events: none;
  z-index: 1;
  animation: spin-clockwise 32s linear infinite;
  box-shadow: inset 0 0 8px rgba(168, 85, 247, 0.1);
}

.office-reactor-cabinet::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 0.8px dashed rgba(0, 240, 255, 0.2);
  border-top-color: transparent;
  border-bottom-color: transparent;
  pointer-events: none;
  z-index: 1;
  animation: spin-counter-clockwise 48s linear infinite;
}

.office-reactor-sprite {
  position: relative;
  width: 100%;
  height: 100%;
  background-image: url("/static/sprites/library/cognitive_reactor.svg");
  background-repeat: no-repeat;
  background-size: 352px 88px; /* 4 frames of 88px wide, 88px high */
  background-position: 0px 0px;
  image-rendering: auto;
  z-index: 5;
}

/* Reactor States */
.office-reactor-cabinet.state-offline .office-reactor-sprite {
  background-position: 0px 0px;
  filter: brightness(0.5) saturate(0.3);
}
.office-reactor-cabinet.state-idle .office-reactor-sprite {
  background-position: -88px 0px;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}
.office-reactor-cabinet.state-thinking .office-reactor-sprite {
  background-position: -176px 0px;
  filter: drop-shadow(0 0 16px rgba(192, 132, 252, 0.8));
}
.office-reactor-cabinet.state-overclock .office-reactor-sprite {
  background-position: -264px 0px;
  filter: drop-shadow(0 0 22px rgba(239, 68, 68, 0.95)) brightness(1.1);
}

/* Concentric Sci-Fi Holographic Rings */
.reactor-ring-tech {
  position: absolute;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  border: 1.2px dashed rgba(0, 240, 255, 0.55);
  border-top-color: transparent;
  border-bottom-color: transparent;
  pointer-events: none;
  z-index: 2;
  animation: spin-clockwise 24s linear infinite;
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.4));
}

.reactor-ring-inner {
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1.5px dotted rgba(168, 85, 247, 0.6);
  border-left-color: transparent;
  border-right-color: transparent;
  pointer-events: none;
  z-index: 3;
  animation: spin-counter-clockwise 16s linear infinite;
  filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.4));
}

.reactor-halo-outer {
  position: absolute;
  width: 114px;
  height: 114px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.16) 0%, rgba(168, 85, 247, 0.08) 50%, transparent 75%);
  pointer-events: none;
  z-index: 1;
  animation: reactor-breath 4s ease-in-out infinite alternate;
}

/* Volumetric Data Chunk Floating Fields (neural particle simulation) */
.datacenter-particle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.floating-chunk {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #00f0ff;
  box-shadow: 0 0 6px #00f0ff, 0 0 12px rgba(0, 240, 255, 0.5);
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
}

.floating-chunk.purple {
  background: #a855f7;
  box-shadow: 0 0 6px #a855f7, 0 0 12px rgba(168, 85, 247, 0.5);
}

.floating-chunk.white {
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff, 0 0 12px rgba(255, 255, 255, 0.5);
}

/* Floating paths with customized delays and 3D drifting */
.floating-chunk.p1 {
  left: 20%;
  bottom: 12%;
  animation: float-path-left 9s ease-in-out infinite;
}

.floating-chunk.p2 {
  right: 22%;
  bottom: 8%;
  animation: float-path-right 11s ease-in-out infinite;
  animation-delay: 2.5s;
}

.floating-chunk.p3 {
  left: 12%;
  top: 42%;
  animation: float-path-diagonal 8s ease-in-out infinite;
  animation-delay: 4.5s;
}

.floating-chunk.p4 {
  right: 18%;
  top: 32%;
  animation: float-path-diagonal-reverse 10s ease-in-out infinite;
  animation-delay: 1.5s;
}

.floating-chunk.p5 {
  left: 50%;
  bottom: 6%;
  animation: float-path-center-rise 7s ease-in-out infinite;
  animation-delay: 3.2s;
}

.office-room-body-library {
  background:
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.9) 0%, #05060b 100%),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
  background-size: auto, 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: 520px !important;
  overflow: hidden;
  border-color: rgba(0, 240, 255, 0.18);
  box-shadow: 
    inset 0 0 40px rgba(0, 0, 0, 0.98),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Interactive Animations */
@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-counter-clockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes reactor-breath {
  0% { transform: scale(0.94); opacity: 0.65; }
  100% { transform: scale(1.06); opacity: 1; }
}

@keyframes srv-glow-cyan {
  0% { opacity: 0.45; box-shadow: 0 0 6px rgba(0, 240, 255, 0.35); }
  100% { opacity: 0.95; box-shadow: 0 0 16px rgba(0, 240, 255, 0.65); }
}

@keyframes srv-glow-purple {
  0% { opacity: 0.55; box-shadow: 0 0 8px rgba(168, 85, 247, 0.45); }
  100% { opacity: 1; box-shadow: 0 0 20px rgba(168, 85, 247, 0.85); }
}

/* Volumetric drift paths */
@keyframes float-path-left {
  0% { transform: translate3d(0, 0, 0) scale(0.3) rotate(0deg); opacity: 0; }
  15% { opacity: 0.85; }
  50% { transform: translate3d(80px, -80px, 0) scale(1.1) rotate(180deg); opacity: 0.95; }
  85% { opacity: 0.6; }
  100% { transform: translate3d(-30px, -220px, 0) scale(0.4) rotate(360deg); opacity: 0; }
}

@keyframes float-path-right {
  0% { transform: translate3d(0, 0, 0) scale(0.3) rotate(360deg); opacity: 0; }
  20% { opacity: 0.85; }
  50% { transform: translate3d(-90px, -90px, 0) scale(1.1) rotate(180deg); opacity: 0.95; }
  80% { opacity: 0.65; }
  100% { transform: translate3d(30px, -230px, 0) scale(0.4) rotate(0deg); opacity: 0; }
}

@keyframes float-path-diagonal {
  0% { transform: translate3d(0, 0, 0) scale(0.3) rotate(0deg); opacity: 0; }
  25% { opacity: 0.85; }
  60% { transform: translate3d(110px, 60px, 0) scale(1.05) rotate(-180deg); opacity: 0.95; }
  80% { opacity: 0.55; }
  100% { transform: translate3d(180px, 130px, 0) scale(0.4) rotate(-360deg); opacity: 0; }
}

@keyframes float-path-diagonal-reverse {
  0% { transform: translate3d(0, 0, 0) scale(0.3) rotate(-360deg); opacity: 0; }
  25% { opacity: 0.9; }
  60% { transform: translate3d(-120px, 70px, 0) scale(1.05) rotate(-180deg); opacity: 0.95; }
  80% { opacity: 0.6; }
  100% { transform: translate3d(-190px, 140px, 0) scale(0.4) rotate(0deg); opacity: 0; }
}

@keyframes float-path-center-rise {
  0% { transform: translate3d(0, 0, 0) scale(0.3) rotate(0deg); opacity: 0; }
  20% { opacity: 0.9; }
  50% { transform: translate3d(25px, -110px, 0) scale(1.2) rotate(180deg); opacity: 0.95; }
  75% { opacity: 0.65; }
  100% { transform: translate3d(-25px, -210px, 0) scale(0.4) rotate(360deg); opacity: 0; }
}

.office-book-tile {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.office-book-tile:hover,
.office-book-tile:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--book-accent) 52%, #ffffff 20%);
}

.office-book-tile.is-selected {
  border-color: color-mix(in srgb, var(--book-accent) 70%, #ffffff 14%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--book-accent) 22%, transparent 78%);
}

.office-book-spine {
  width: 10px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--book-accent) 82%, white 18%) 0%, color-mix(in srgb, var(--book-accent) 65%, #1f2328 35%) 100%);
}

.office-book-label {
  color: #e4ddd1;
  font-size: 0.74rem;
  line-height: 1.35;
}

.office-agents-lane {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.office-agents-lane-library {
  justify-content: flex-start;
}

.office-agents-lane-meeting {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.office-agents-lane-meeting .office-agent-token:first-child {
  position: absolute;
  left: 28px;
  top: 28px;
}

.office-agents-lane-meeting .office-agent-token:last-child {
  position: absolute;
  right: 28px;
  bottom: 86px;
}

.office-agent-token {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 88px;
  height: 88px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.14s ease;
}

.office-agent-token:hover,
.office-agent-token:focus-visible {
  transform: none;
}

.graphic-shelf-items {
  display: grid;
  gap: 10px;
}

.graphic-shelf-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 29, 0.08);
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.graphic-shelf-item strong {
  color: #223039;
}

.graphic-shelf-item span {
  color: #586973;
  font-size: 0.8rem;
}

.graphic-shelf-item.is-selected {
  border-color: color-mix(in srgb, var(--book-accent, #184e5a) 40%, #184e5a 60%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--book-accent, #184e5a) 16%, transparent 84%);
}

.office-agent-sprite {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  background-repeat: no-repeat;
  background-size: auto 100%;
  image-rendering: pixelated;
  animation: office-agent-walk 0.82s steps(4, end) infinite;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  filter: contrast(1.18) saturate(1.14);
}

.office-agent-sprite.is-friday {
  background-image: url("/static/sprites/friday_sheet.svg?v=56");
}

.office-agent-sprite.is-jarvis_ceo {
  background-image: url("/static/sprites/jarvis_sheet.svg?v=58");
}

.office-agent-sprite.is-socrates {
  background-image: url("/static/sprites/socrates_sheet.svg?v=1");
  filter: contrast(1.12) saturate(0.96) brightness(1);
}

.office-agent-sprite.is-deepseek {
  background-image: url("/static/sprites/deepseek/ai_brain_capsule_sprite.svg?v=2");
  background-size: 336px 84px;
  background-position: 0 0;
  image-rendering: auto;
  filter: contrast(1.08) saturate(1.12);
}

.office-agent-token.is-sleeping .office-agent-sprite.is-friday {
  background-image: url("/static/sprites/friday_sleep_sheet.svg?v=2");
}

.office-agent-token.is-sleeping .office-agent-sprite.is-jarvis_ceo {
  background-image: url("/static/sprites/jarvis_sleep_sheet.svg?v=2");
}

.office-agent-token.is-sleeping .office-agent-sprite.is-socrates {
  background-image: url("/static/sprites/socrates_sleep_sheet.svg?v=2");
}

.office-agent-token.is-thinking .office-agent-sprite.is-friday {
  background-image: url("/static/sprites/friday_think_sheet.svg?v=1");
}

.office-agent-token.is-thinking .office-agent-sprite.is-jarvis_ceo {
  background-image: url("/static/sprites/jarvis_think_sheet.svg?v=1");
}

.office-agent-token.is-thinking .office-agent-sprite.is-socrates {
  background-image: url("/static/sprites/socrates_think_sheet.svg?v=1");
}

.office-agent-token.is-brain-ai-off .office-agent-sprite.is-deepseek {
  animation: none;
  background-position: 0 0;
  filter: saturate(0.68) brightness(0.86);
}

.office-agent-token.is-brain-ai-idle .office-agent-sprite.is-deepseek {
  animation: brain-ai-idle-pulse 2.1s ease-in-out infinite;
  background-position: -84px 0;
  filter: contrast(1.1) saturate(1.08);
}

.office-agent-token.is-brain-ai-processing .office-agent-sprite.is-deepseek {
  animation: brain-ai-processing 0.7s steps(1, end) infinite;
  filter: contrast(1.16) saturate(1.18) brightness(1.04);
}

.office-agent-token.is-brain-ai-processing::before,
.office-agent-token.is-brain-ai-processing::after {
  background: radial-gradient(circle, rgba(174, 250, 255, 0.82) 0 22%, rgba(94, 234, 255, 0.3) 23% 52%, transparent 54%);
  filter: drop-shadow(0 0 8px rgba(94, 234, 255, 0.9));
}

.office-agent-token.is-sleeping .office-agent-sprite {
  animation: none;
  background-position: -84px 0;
  filter: saturate(0.72) brightness(0.92);
}

.office-agent-token.is-thinking .office-agent-sprite {
  animation: none;
  background-position: 0 0;
  filter: contrast(1.1) saturate(1.05);
}

.office-agent-token.is-brain-ai-processing .office-agent-sprite.is-deepseek {
  animation: brain-ai-processing 0.7s steps(1, end) infinite;
  filter: contrast(1.16) saturate(1.18) brightness(1.04);
}

.office-agent-token.is-thinking::before,
.office-agent-token.is-thinking::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(246, 250, 255, 0.98) 0 36%, rgba(246, 250, 255, 0.72) 37%, rgba(246, 250, 255, 0.08) 68%, transparent 70%);
  filter: drop-shadow(0 1px 2px rgba(8, 12, 20, 0.35));
  opacity: 0.95;
}

.office-agent-token.is-thinking::before {
  top: -18px;
  right: 14px;
  width: 20px;
  height: 20px;
  animation: office-think-cloud-1 1.9s ease-in-out infinite;
}

.office-agent-token.is-thinking::after {
  top: -30px;
  right: 0;
  width: 34px;
  height: 22px;
  animation: office-think-cloud-2 2.2s ease-in-out infinite;
}

.office-agent-token.is-sleeping::after {
  content: "Zzzzzz";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #a9b7d1;
  text-shadow: 0 1px 2px rgba(8, 12, 20, 0.8);
  pointer-events: none;
  white-space: nowrap;
  animation: office-zzz-float 1.8s ease-in-out infinite;
}

.office-agent-token.is-selected .office-agent-sprite {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--agent-color) 72%, white 28%), 0 0 16px color-mix(in srgb, var(--agent-color) 35%, transparent 65%);
}

.office-agent-token.is-sleeping {
  opacity: 0.92;
}

@keyframes office-agent-walk {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -252px 0;
  }
}

@keyframes office-agent-sleep {
  from {
    background-position: 0 0;
    transform: translateY(0);
  }
  to {
    background-position: -46px 0;
    transform: translateY(2px);
  }
}

@keyframes office-agent-breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(1px);
  }
}

@keyframes office-agent-sleeping {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -84px 0;
  }
}

@keyframes cognitive-core-pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.76;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes brain-ai-idle-pulse {
  0%,
  100% {
    transform: translateY(0);
    filter: contrast(1.1) saturate(1.08);
  }
  50% {
    transform: translateY(-1px);
    filter: contrast(1.14) saturate(1.18) brightness(1.04);
  }
}

@keyframes brain-ai-processing {
  0%,
  49.999% {
    background-position: -168px 0;
  }
  50%,
  100% {
    background-position: -252px 0;
  }
}

@keyframes office-zzz-float {
  0% {
    transform: translate(-50%, 0);
    opacity: 0.55;
  }
  50% {
    transform: translate(-46%, -4px);
    opacity: 1;
  }
  100% {
    transform: translate(-42%, -8px);
    opacity: 0.65;
  }
}

@keyframes office-think-cloud-1 {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.58;
  }

  50% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

@keyframes office-think-cloud-2 {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.48;
  }

  50% {
    transform: translateY(-8px);
    opacity: 0.96;
  }
}

.office-room-empty {
  color: #71808b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.office-meeting-note {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d8e1e6;
  font-size: 0.74rem;
  line-height: 1.45;
}

@media (max-width: 1200px) {
  .office-map-grid {
    grid-template-columns: 1fr;
  }

  .office-books-groups {
    grid-template-columns: 1fr;
  }

  .office-room {
    min-height: 280px;
  }
}

.game-agent-badge.is-idle { background: #1a1d2a; color: #4b5563; }
.game-agent-badge.is-running { background: #141830; color: #818cf8; animation: badge-pulse 1.4s ease-in-out infinite; }
.game-agent-badge.is-done { background: #101a10; color: #a3be8c; }
.game-agent-badge.is-error { background: #1a0a0a; color: #bf616a; }

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.game-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  scroll-behavior: smooth;
}

.game-chat-hint {
  color: #2d3348;
  font-size: 0.78rem;
  text-align: center;
  padding: 32px 16px;
  font-style: italic;
  margin: 0;
}

.game-chat-message {
  display: grid;
  gap: 8px;
  font-size: 0.76rem;
  line-height: 1.55;
  border-radius: 4px;
  padding: 3px 6px;
}

.game-chat-message-body {
  min-width: 0;
}

.game-chat-mention-arrow {
  color: #7ea2d6;
  font-weight: 700;
}

.game-chat-message-actions {
  display: flex;
  justify-content: flex-end;
}

.game-chat-details-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #dbe7f3;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.66rem;
  cursor: pointer;
}

.game-chat-details-btn:hover,
.game-chat-details-btn:focus-visible {
  border-color: #5e81f4;
  color: #ffffff;
}

.game-chat-message.is-system {
  color: #374151;
  font-style: italic;
  padding: 2px 0;
  font-size: 0.7rem;
}

.game-chat-message.is-user {
  color: #1f2937;
  background: #f3f7fb;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #6ea0dc;
  font-size: 0.79rem;
}

.game-chat-message.is-agent {
  color: #93c5fd;
  background: #0e1420;
  border-left: 2px solid #1e3a6e;
  border-radius: 0 4px 4px 0;
  padding: 4px 8px;
}

.game-chat-message.is-move {
  color: #7c8fd4;
  font-size: 0.7rem;
  padding: 1px 6px;
}

.game-chat-message.is-answer {
  color: #f1f5f9;
  background: #10162a;
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 3px solid #5e81f4;
  font-size: 0.8rem;
  white-space: pre-wrap;
  margin: 4px 0;
}

.game-chat-message.is-evidence {
  color: #6b7280;
  font-size: 0.7rem;
  background: #0a0c14;
  padding: 7px 10px;
  border-radius: 4px;
  border-left: 2px solid #1e2233;
}

.game-chat-message.is-evidence .ev-score {
  color: #374151;
  font-family: monospace;
  font-size: 0.65rem;
}

.game-chat-message.is-error {
  color: #bf616a;
  background: #160707;
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid #7c2020;
}

/* Graphic chat input usability override */
#gameAgentPickerBar #gapQuery.gap-query-input {
  flex: 1.6;
  min-width: 300px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

/* ---------- Final layout lock: graphic panel fills remaining viewport ---------- */

#tab-graphic.game-panel[hidden] {
  display: none !important;
}

body.graphic-fullscreen #tab-graphic.game-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body.graphic-fullscreen #tab-graphic .game-viewport {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 30vw, 420px);
}

body.graphic-fullscreen #tab-graphic .game-scene,
body.graphic-fullscreen #tab-graphic .game-chat-panel {
  min-height: 0;
  height: 100%;
}

body.graphic-fullscreen #tab-graphic #libraryShelves,
body.graphic-fullscreen #tab-graphic .game-chat-log {
  min-height: 0;
}

@media (max-width: 960px) {
  body.graphic-fullscreen #tab-graphic .game-viewport {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 40vh;
  }
}

.graphic-thought-answer {
  padding: 12px;
  border-radius: 14px;
  background: rgba(24, 78, 90, 0.05);
  border: 1px solid rgba(24, 78, 90, 0.08);
  color: var(--ink);
  line-height: 1.65;
}

.graphic-thought-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.graphic-thought-grid .detail-metric {
  margin: 0;
}

.graphic-thought-grid .detail-metric strong {
  word-break: break-word;
}

@media (max-width: 760px) {
  .graphic-thought-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Fullscreen overrides for graphic game mode ---------- */

.gap-send-btn {
  background: linear-gradient(180deg, #2f6ab8 0%, #234f8b 100%);
  border: 1px solid #6ea0dc;
  color: #f3f7ff;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.gap-send-btn:hover:not(:disabled),
.gap-send-btn:focus-visible:not(:disabled) {
  filter: brightness(1.08);
}

.gap-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.game-agent-picker-bar {
  justify-content: space-between;
  gap: 10px;
}

body.graphic-fullscreen {
  background:
    radial-gradient(circle at top right, rgba(24, 78, 90, 0.12), transparent 24%),
    radial-gradient(circle at left 20%, rgba(153, 95, 34, 0.08), transparent 26%),
    linear-gradient(180deg, #f7fbfa 0%, var(--bg) 100%);
}

body:not(.graphic-fullscreen) .game-agent-picker-bar {
  display: none !important;
}

body:not(.graphic-fullscreen) #tab-graphic .game-viewport,
body:not(.graphic-fullscreen) #tab-graphic .game-scene,
body:not(.graphic-fullscreen) #tab-graphic .game-chat-panel,
body:not(.graphic-fullscreen) #tab-graphic .game-chat-log {
  display: none !important;
}

body:not(.graphic-fullscreen) .office-agent-token.is-sleeping::after,
body:not(.graphic-fullscreen) .office-agent-token.is-thinking::before,
body:not(.graphic-fullscreen) .office-agent-token.is-thinking::after {
  content: none !important;
  display: none !important;
}

body.graphic-fullscreen .workspace-shell {
  padding: 12px;
  gap: 10px;
  grid-template-rows: auto minmax(0, 1fr);
}

body.graphic-fullscreen .topbar {
  display: flex;
}

body.graphic-fullscreen .tab-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}

body.graphic-fullscreen #tab-graphic.game-panel {
  position: relative;
  inset: auto;
  height: 100%;
  width: 100%;
  z-index: auto;
}

body.graphic-fullscreen .game-viewport {
  height: 100%;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 30vw, 420px);
}

body.graphic-fullscreen #libraryShelves {
  padding: clamp(10px, 1.3vw, 16px);
}

body.graphic-fullscreen .office-map {
  min-height: 100%;
}

body.graphic-fullscreen .office-map-grid {
  min-height: 0;
}

@media (max-width: 960px) {
  body.graphic-fullscreen .game-viewport {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 38vh;
  }

  body.graphic-fullscreen .game-chat-panel {
    border-top: 1px solid #1e2233;
  }

  body.graphic-fullscreen .office-map-grid {
    min-height: auto;
  }
}

.game-chat-message.is-friday {
  color: #e6f3f6;
  background: linear-gradient(180deg, rgba(24, 78, 90, 0.96) 0%, rgba(37, 96, 109, 0.98) 100%);
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #84c6d7;
  font-size: 0.79rem;
}

.game-chat-message.is-jarvis {
  color: #fff3e7;
  background: linear-gradient(180deg, rgba(107, 63, 29, 0.95) 0%, rgba(140, 89, 46, 0.98) 100%);
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #f1bf84;
  font-size: 0.79rem;
}

.game-chat-message.is-socrates {
  color: #f8f4e8;
  background: linear-gradient(180deg, rgba(79, 61, 16, 0.95) 0%, rgba(104, 84, 34, 0.98) 100%);
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #d8bf7f;
  font-size: 0.79rem;
}

.game-chat-message.is-deepseek {
  color: #eaf1ff;
  background: linear-gradient(180deg, rgba(38, 60, 136, 0.95) 0%, rgba(67, 92, 172, 0.98) 100%);
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #9db8ff;
  font-size: 0.79rem;
}

.graphic-campus {
  display: grid;
  gap: 16px;
  min-height: 100%;
}

.graphic-campus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.graphic-campus-head strong {
  color: #f6efe4;
  font-size: 1rem;
}

.graphic-campus-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.graphic-campus-badges .chip {
  background: rgba(255, 255, 255, 0.08);
  color: #d9e2ea;
}

.graphic-campus-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(360px, 1.3fr) minmax(280px, 1fr);
  gap: 14px;
  min-height: 0;
}

.graphic-room {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 520px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(0, 0, 0, 0.16);
}

.graphic-room-dormitory {
  background: radial-gradient(circle at top left, rgba(109, 136, 189, 0.22), transparent 34%), linear-gradient(180deg, #141a2b 0%, #101521 100%);
}

.graphic-room-library {
  background: radial-gradient(circle at top center, rgba(173, 120, 54, 0.16), transparent 28%), linear-gradient(180deg, #1f1a16 0%, #18130f 100%);
}

.graphic-room-meeting {
  background: radial-gradient(circle at top right, rgba(69, 144, 133, 0.16), transparent 30%), linear-gradient(180deg, #111c1d 0%, #0d1517 100%);
}

.graphic-room-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.graphic-room-head strong {
  color: #f8f4ec;
  font-size: 1rem;
}

.graphic-room-head span,
.graphic-room-copy,
.graphic-meeting-card p {
  color: #b8c2cc;
}

.graphic-room-copy {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
}

.graphic-room-agents {
  display: grid;
  gap: 10px;
  align-content: start;
}

.graphic-collab-agent {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--agent-accent) 24%, rgba(255, 255, 255, 0.04));
  border: 1px solid color-mix(in srgb, var(--agent-color) 38%, rgba(255, 255, 255, 0.06));
}

.graphic-collab-agent-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.graphic-collab-agent-head strong {
  display: block;
  margin: 0;
  color: #fff;
}

.graphic-collab-agent-head span,
.graphic-collab-agent p {
  color: #cbd6df;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
}

.graphic-collab-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--agent-color) 84%, white 16%) 0%, var(--agent-accent) 100%);
  color: white;
  font-weight: 700;
}

.graphic-collab-status {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf6fb;
  font-size: 0.72rem;
  font-weight: 700;
}

.graphic-collab-agent.is-sleeping {
  opacity: 0.86;
}

.graphic-sleep-zz {
  position: absolute;
  right: 10px;
  top: 10px;
  color: #9cb0d3;
  font-size: 0.76rem;
  font-weight: 700;
  animation: sleepFloat 1.8s ease-in-out infinite;
}

.graphic-library-books {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
}

.graphic-meeting-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.graphic-meeting-card.is-summary {
  align-self: end;
}

@media (max-width: 1280px) {
  .graphic-campus-grid {
    grid-template-columns: 1fr;
  }

  .graphic-room {
    min-height: auto;
  }
}

.game-agent-picker-bar[hidden] {
  display: none !important;
}

/* ===================================================
   2D Game Panel � Analise Grafica
   =================================================== */

.game-panel {
  padding: 0;
  overflow: hidden;
  height: 100%;
}

.game-viewport {
  display: grid;
  grid-template-columns: 1fr 360px;
  height: 100%;
  overflow: hidden;
}

/* ---------- Game Scene (left) ---------- */

.game-scene {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0d0f18;
  border-right: 1px solid #1e2233;
}

.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #0a0b12;
  border-bottom: 1px solid #1e2233;
  flex-shrink: 0;
}

.game-hud-meta {
  flex: 1;
  font-family: monospace;
  font-size: 0.68rem;
  color: #4b5563;
}

.game-hud-refresh {
  background: none;
  border: 1px solid #2a2d3a;
  color: #6b7280;
  padding: 3px 9px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
}

.game-hud-refresh:hover { border-color: #5e81f4; color: #5e81f4; }

#libraryShelves {
  flex: 1;
  overflow: auto;
  padding: 12px;
}

/* ---------- Agent Picker Bar (bottom of scene) ---------- */

.game-agent-picker-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #090a10;
  border-top: 2px solid #5e81f4;
  flex-wrap: wrap;
}

.gap-info {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}

.gap-info strong {
  font-size: 0.78rem;
  color: #e2e8f0;
}

.gap-info .meta-row {
  font-size: 0.65rem;
  color: #4b5563;
}

.gap-query-input {
  flex: 1;
  min-width: 150px;
  background: #12141f;
  border: 1px solid #2a2d3a;
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.gap-query-input:focus { outline: none; border-color: #5e81f4; }

.gap-agent-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gap-agent-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--agent-color, #5e81f4);
  background: color-mix(in srgb, var(--agent-color, #5e81f4) 10%, transparent);
  color: var(--agent-color, #5e81f4);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  gap: 1px;
}

.gap-agent-btn:hover {
  background: color-mix(in srgb, var(--agent-color, #5e81f4) 22%, transparent);
}

.gap-agent-btn.is-active {
  background: color-mix(in srgb, var(--agent-color, #5e81f4) 34%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--agent-color, #5e81f4) 28%, transparent 72%);
}

.gap-agent-btn.is-action {
  min-width: 132px;
}

.gap-agent-selected {
  color: #c8d3dc;
  font-size: 0.72rem;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gap-agent-name {
  font-size: 0.78rem;
  font-weight: 700;
}

.gap-agent-sub {
  font-size: 0.62rem;
  opacity: 0.72;
}

.gap-clear-btn {
  background: none;
  border: 1px solid #374151;
  color: #6b7280;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
}

.gap-clear-btn:hover { border-color: #bf616a; color: #bf616a; }

/* ---------- Chat Panel (right) ---------- */

.game-chat-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0b0d16;
}

.game-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #1e2233;
  flex-shrink: 0;
}

.game-chat-header strong {
  font-size: 0.78rem;
  color: #e2e8f0;
  letter-spacing: 0.04em;
}

.game-agent-badge {
  font-size: 0.68rem;
  padding: 2px 10px;
  border-radius: 100px;
  font-family: monospace;
}

.game-agent-badge.is-idle { background: #1a1d2a; color: #4b5563; }
.game-agent-badge.is-running { background: #141830; color: #818cf8; animation: badge-pulse 1.4s ease-in-out infinite; }
.game-agent-badge.is-done { background: #101a10; color: #a3be8c; }
.game-agent-badge.is-error { background: #1a0a0a; color: #bf616a; }

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.game-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  scroll-behavior: smooth;
}

.game-chat-hint {
  color: #2d3348;
  font-size: 0.78rem;
  text-align: center;
  padding: 32px 16px;
  font-style: italic;
  margin: 0;
}

.game-chat-message {
  font-size: 0.76rem;
  line-height: 1.55;
  border-radius: 4px;
  padding: 3px 6px;
}

.game-chat-message.is-system {
  color: #374151;
  font-style: italic;
  padding: 2px 0;
  font-size: 0.7rem;
}

.game-chat-message.is-user {
  color: #1f2937;
  background: #f3f7fb;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid #6ea0dc;
  font-size: 0.79rem;
}

.game-chat-message.is-agent {
  color: #93c5fd;
  background: #0e1420;
  border-left: 2px solid #1e3a6e;
  border-radius: 0 4px 4px 0;
  padding: 4px 8px;
}

.game-chat-message.is-move {
  color: #7c8fd4;
  font-size: 0.7rem;
  padding: 1px 6px;
}

.game-chat-message.is-answer {
  color: #f1f5f9;
  background: #10162a;
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 3px solid #5e81f4;
  font-size: 0.8rem;
  white-space: pre-wrap;
  margin: 4px 0;
}

.game-chat-message.is-evidence {
  color: #6b7280;
  font-size: 0.7rem;
  background: #0a0c14;
  padding: 7px 10px;
  border-radius: 4px;
  border-left: 2px solid #1e2233;
}

.game-chat-message.is-evidence .ev-score {
  color: #374151;
  font-family: monospace;
  border-radius: 6px;
  font-size: 0.78rem;
}

.game-chat-message.is-error {
  color: #bf616a;
  background: #160707;
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid #7c2020;
}


/* ===================================================
   Cyberpunk Scientific Dormitory (Nikola Tesla Theme)
   =================================================== */

.office-room-dormitory {
  background: 
    radial-gradient(circle at center, rgba(0, 240, 255, 0.15) 0%, rgba(13, 20, 38, 0.65) 50%, #010307 100%) !important;
  border-color: rgba(0, 240, 255, 0.35) !important;
  box-shadow: 
    inset 0 0 45px rgba(0, 240, 255, 0.15),
    0 12px 36px rgba(0, 0, 0, 0.98) !important;
  min-height: 520px !important;
}

.office-room-body-dormitory {
  width: 100% !important;
  height: 100% !important;
  min-height: 470px !important; /* Prevent container layout collapse in grid */
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  overflow: hidden !important;
  position: relative !important;
  background: 
    radial-gradient(circle at center, rgba(0, 240, 255, 0.08) 0%, rgba(2, 4, 12, 0.96) 85%) !important;
}

/* Floor Grid & Observability Glows */
.dormitory-floor-grid {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 1 !important;
  background:
    radial-gradient(circle at 50% 68%, transparent 20%, rgba(2, 4, 12, 0.96) 90%),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    /* Circuit lines connecting to central socket */
    radial-gradient(ellipse at 50% 68%, rgba(0, 240, 255, 0.22) 0%, transparent 65%) !important;
  background-size: 100% 100%, 18px 18px, 18px 18px !important;
  opacity: 0.95 !important;
}

.dormitory-volumetric-glow {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
  background: 
    radial-gradient(circle at 50% 30%, rgba(0, 240, 255, 0.16) 0%, transparent 60%),
    radial-gradient(circle at 10% 50%, rgba(0, 240, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 50%, rgba(0, 240, 255, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at top, transparent 40%, rgba(2, 4, 12, 0.98) 95%) !important;
}

/* Tesla Curved Arches */
.dormitory-tesla-arches {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.tesla-arch {
  position: absolute !important;
  bottom: 20px !important;
  width: 70px !important;
  height: 220px !important;
  border: 1.5px solid rgba(0, 240, 255, 0.18) !important;
  opacity: 0.8 !important;
}

.tesla-arch.arch-left {
  left: 95px !important;
  border-radius: 0 120px 120px 0 !important;
  border-left-color: transparent !important;
  border-top-color: transparent !important;
  background: linear-gradient(90deg, transparent 80%, rgba(0, 240, 255, 0.06) 100%) !important;
  box-shadow: inset -6px 0 15px rgba(0, 240, 255, 0.05) !important;
}

.tesla-arch.arch-right {
  right: 95px !important;
  border-radius: 120px 0 0 120px !important;
  border-right-color: transparent !important;
  border-top-color: transparent !important;
  background: linear-gradient(-90deg, transparent 80%, rgba(0, 240, 255, 0.06) 100%) !important;
  box-shadow: inset 6px 0 15px rgba(0, 240, 255, 0.05) !important;
}

/* Tech Energy Pipes */
.dormitory-energy-pipes {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.energy-pipe {
  position: absolute !important;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.05) 0%, rgba(0, 240, 255, 0.28) 50%, rgba(0, 240, 255, 0.05) 100%) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2) !important;
}

.energy-pipe.pipe-top {
  top: 10px !important;
  left: 0 !important;
  width: 100% !important;
  height: 3px !important;
  background-size: 200% 100% !important;
  animation: flow-pipe 5s linear infinite !important;
}

.energy-pipe.pipe-bottom {
  bottom: 12px !important;
  left: 0 !important;
  width: 100% !important;
  height: 3px !important;
  background-size: 200% 100% !important;
  animation: flow-pipe 7s linear infinite reverse !important;
}

@keyframes flow-pipe {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Mist Vapour Jets */
.dormitory-mist-jets {
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

.mist-jet {
  position: absolute !important;
  width: 32px !important;
  height: 32px !important;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%) !important;
  border-radius: 50% !important;
  filter: blur(5px) !important;
  opacity: 0 !important;
}

.mist-jet.jet-left {
  bottom: 30px !important;
  left: 110px !important;
  animation: mist-surge 5.5s infinite ease-out !important;
}

.mist-jet.jet-right {
  bottom: 30px !important;
  right: 110px !important;
  animation: mist-surge 6.5s infinite ease-out 2.5s !important;
}

@keyframes mist-surge {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  15% { opacity: 0.4; }
  75% { opacity: 0.12; }
  100% { transform: translateY(-50px) scale(2.4); opacity: 0; }
}

/* Floating Hologram Wall Panels */
.dormitory-hologram-panel {
  position: absolute !important;
  top: 75px !important;
  width: 125px !important;
  padding: 8px 10px !important;
  background: rgba(2, 6, 20, 0.72) !important;
  border: 1px solid rgba(0, 240, 255, 0.25) !important;
  border-radius: 6px !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1), inset 0 0 8px rgba(0, 240, 255, 0.08) !important;
  font-family: monospace !important;
  font-size: 0.6rem !important;
  color: #aefaff !important;
  z-index: 3 !important;
  pointer-events: none !important;
  animation: holo-float 6s ease-in-out infinite alternate !important;
  backdrop-filter: blur(1.5px) !important;
}

.dormitory-hologram-panel.panel-left {
  left: 96px !important;
}

.dormitory-hologram-panel.panel-right {
  right: 96px !important;
  animation-delay: 1.5s !important;
}

.holo-header {
  border-bottom: 1px solid rgba(0, 240, 255, 0.4) !important;
  padding-bottom: 3px !important;
  margin-bottom: 4px !important;
  font-weight: bold !important;
  letter-spacing: 0.08em !important;
  color: #ffffff !important;
  text-shadow: 0 0 4px #00f0ff !important;
}

.holo-stat {
  margin-bottom: 2px !important;
  opacity: 0.85 !important;
}

@keyframes holo-float {
  0% { transform: translateY(0px) rotate(0deg); opacity: 0.75; }
  100% { transform: translateY(-7px) rotate(1deg); opacity: 0.95; filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.3)); }
}

.dormitory-center-deck {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important; /* Perfectly center vertically */
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 480px !important;
  z-index: 4 !important;
  padding-bottom: 0 !important; /* Reset padding to keep it perfectly centered */
  margin-top: 10px !important; /* Small top margin from room header */
}

/* Nikola Tesla Colossal Wardenclyffe Tower (240px) */
.office-tower-cabinet {
  position: relative !important;
  width: 240px !important;
  height: 240px !important;
  margin-bottom: 12px !important;
  display: grid !important;
  place-items: center !important;
  filter: drop-shadow(0 4px 22px rgba(0, 240, 255, 0.3)) !important;
  transition: transform 0.3s ease !important;
  z-index: 6 !important;
}

.office-tower-cabinet:hover {
  transform: scale(1.03) !important;
}

.office-tower-sprite {
  width: 100% !important;
  height: 100% !important;
  background-image: url("/static/sprites/hibernation/cognitive_tower.svg") !important;
  background-repeat: no-repeat !important;
  background-size: 960px 240px !important; /* 4 frames of 240px */
  background-position: 0px 0px !important;
  image-rendering: auto !important;
}

/* Tower States */
.office-tower-cabinet.state-offline .office-tower-sprite {
  background-position: 0px 0px !important;
  filter: brightness(0.85) contrast(1.1) saturate(0.8) drop-shadow(0 0 12px rgba(0, 240, 255, 0.2)) !important;
  opacity: 0.85 !important;
}

.office-tower-cabinet.state-idle .office-tower-sprite {
  background-position: -240px 0px !important;
  filter: drop-shadow(0 0 32px rgba(0, 240, 255, 0.7)) !important;
}

.office-tower-cabinet.state-thinking .office-tower-sprite {
  background-position: -480px 0px !important;
  filter: drop-shadow(0 0 42px rgba(168, 85, 247, 0.9)) !important;
}

.office-tower-cabinet.state-overclock .office-tower-sprite {
  background-position: -720px 0px !important;
  filter: drop-shadow(0 0 54px rgba(0, 240, 255, 0.98)) brightness(1.2) !important;
}

/* Electrical Plasma Arc Sparks */
.tower-plasma-field {
  position: absolute !important;
  inset: -40px !important;
  pointer-events: none !important;
  z-index: 10 !important;
  overflow: visible !important;
}

.plasma-arc {
  position: absolute !important;
  background: none !important;
  border: 1px solid rgba(0, 240, 255, 0.72) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.plasma-arc.arc-1 {
  width: 95px !important;
  height: 45px !important;
  top: 10px !important;
  left: 15px !important;
  border-radius: 50% !important;
  border-top: 2px solid #ffffff !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-bottom-color: transparent !important;
  filter: drop-shadow(0 0 5px #00f0ff) !important;
  transform: rotate(-18deg) !important;
  animation: electricity-zap-1 2.8s linear infinite !important;
}

.plasma-arc.arc-2 {
  width: 105px !important;
  height: 45px !important;
  top: 20px !important;
  right: 10px !important;
  border-radius: 50% !important;
  border-top: 2px solid #00f0ff !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-bottom-color: transparent !important;
  filter: drop-shadow(0 0 5px #a855f7) !important;
  transform: rotate(22deg) !important;
  animation: electricity-zap-2 3.6s linear infinite !important;
}

@keyframes electricity-zap-1 {
  0%, 93%, 100% { opacity: 0; transform: scale(0.8) rotate(-18deg); }
  94% { opacity: 0.95; transform: scale(1.08) rotate(-14deg); }
  95% { opacity: 0.2; }
  96% { opacity: 0.8; transform: scale(0.96) rotate(-20deg); }
  97% { opacity: 0; }
}

@keyframes electricity-zap-2 {
  0%, 89%, 100% { opacity: 0; transform: scale(0.8) rotate(22deg); }
  90% { opacity: 0.98; transform: scale(1.1) rotate(19deg); }
  91% { opacity: 0.25; }
  92% { opacity: 0.85; transform: scale(0.97) rotate(25deg); }
  93% { opacity: 0; }
}

/* Holographic Alignment Pad */
.tower-hologram-pad {
  position: absolute !important;
  top: 226px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 174px !important;
  height: 28px !important;
  background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.32) 0%, rgba(0, 240, 255, 0.04) 60%, transparent 80%) !important;
  border-radius: 50% !important;
  border: 1.8px dashed rgba(0, 240, 255, 0.58) !important;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  box-shadow: 
    0 0 16px rgba(0, 240, 255, 0.28),
    inset 0 0 10px rgba(0, 240, 255, 0.16) !important;
  animation: spin-clockwise 22s linear infinite !important;
  z-index: 5 !important;
}

.tower-hologram-pad::after {
  content: "" !important;
  position: absolute !important;
  inset: 5px !important;
  border-radius: 50% !important;
  border: 1px dotted rgba(168, 85, 247, 0.5) !important;
  animation: spin-counter-clockwise 14s linear infinite !important;
}



/* The 4 Capsules aligned in a beautiful tight row exactly in front of the tower */
.dormitory-capsules-deck {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 16px !important;
  margin-top: 10px !important;
  z-index: 10 !important;
}

/* Dynamic floor energy connections */
.dormitory-deck-beams {
  position: absolute !important;
  top: 236px !important; /* aligns with tower base */
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 320px !important;
  height: 60px !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.deck-beam {
  position: absolute !important;
  background: linear-gradient(to bottom, rgba(0, 240, 255, 0.8) 0%, transparent 100%) !important;
  width: 1.5px !important;
  height: 100% !important;
  filter: drop-shadow(0 0 3px #00f0ff) !important;
  opacity: 0.65 !important;
}

/* Capsule 1 (Friday) to Tower base */
.deck-beam.beam-1 {
  left: 36px !important;
  transform: rotate(26deg) !important;
  transform-origin: top left !important;
  animation: beam-pulse 2.2s infinite linear !important;
}

/* Capsule 2 (Jarvis) to Tower base */
.deck-beam.beam-2 {
  left: 110px !important;
  transform: rotate(8deg) !important;
  transform-origin: top left !important;
  animation: beam-pulse 2.5s infinite linear !important;
}

/* Capsule 3 (Socrates) to Tower base */
.deck-beam.beam-3 {
  right: 110px !important;
  transform: rotate(-8deg) !important;
  transform-origin: top right !important;
  animation: beam-pulse 2.5s infinite linear !important;
}

/* Capsule 4 (Gemini) to Tower base */
.deck-beam.beam-4 {
  right: 36px !important;
  transform: rotate(-26deg) !important;
  transform-origin: top right !important;
  animation: beam-pulse 2.8s infinite linear !important;
}

@keyframes beam-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.95; filter: drop-shadow(0 0 6px #00f0ff); }
}

/* Hibernation Capsule Styling */
.dormitory-capsule-pod {
  position: relative !important;
  display: block !important; /* Override parent inline-grid to prevent auto-grid collapses */
  width: 66px !important;
  height: 88px !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.2s ease !important;
  margin: 0 !important;
}

.dormitory-capsule-pod:hover {
  transform: translateY(-5px) scale(1.05) !important;
}

.capsule-pod-sprite {
  width: 66px !important;
  height: 88px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background-image: url("/static/sprites/hibernation/cognitive_capsule_sheet.svg?v=2") !important;
  background-repeat: no-repeat !important;
  background-size: 264px 88px !important; /* 4 frames of 66px wide, 88px high */
  animation: none !important;
  filter: none !important;
}

.dormitory-capsule-pod .office-agent-sprite {
  position: absolute !important;
  top: 1px !important;
  left: 50% !important;
  transform: translateX(-50%) scale(0.68) !important;
  width: 84px !important;
  height: 84px !important;
  z-index: 2 !important;
  pointer-events: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: none !important;
}

.dormitory-capsule-pod.is-sleeping .office-agent-sprite {
  display: block !important;
}

/* Glass capsule details text overlay screen at the bottom, horizontally formatted */
.capsule-hologram-screen {
  position: absolute !important;
  bottom: -22px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 6px !important;
  font-family: monospace !important;
  font-size: 0.42rem !important;
  font-weight: 700 !important;
  color: #00f0ff !important;
  background: rgba(2, 6, 20, 0.88) !important;
  border: 0.8px solid rgba(0, 240, 255, 0.4) !important;
  border-radius: 3px !important;
  padding: 1px 5px !important;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  opacity: 0.85 !important;
  z-index: 10 !important;
}

.dormitory-capsule-pod.is-empty-cabin .capsule-hologram-screen,
.dormitory-capsule-pod.is-reserve .capsule-hologram-screen {
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.1) !important;
  opacity: 0.65 !important;
}

/* Cryo glass holographic label */
.capsule-tech-label {
  position: absolute !important;
  top: -18px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-family: monospace !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  color: #aefaff !important;
  background: rgba(2, 6, 20, 0.88) !important;
  border: 1px solid rgba(0, 240, 255, 0.4) !important;
  border-radius: 3px !important;
  padding: 1px 6px !important;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25) !important;
  letter-spacing: 0.08em !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  z-index: 10 !important;
}

.dormitory-capsule-pod.is-empty-cabin .capsule-tech-label,
.dormitory-capsule-pod.is-reserve .capsule-tech-label {
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  box-shadow: none !important;
}

/* Friday Capsule (Frame 1) */
.dormitory-capsule-pod.is-sleeping .capsule-pod-sprite.is-friday {
  background-position: 0px 0px !important;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.35)) !important;
}

/* Jarvis Capsule (Frame 2) */
.dormitory-capsule-pod.is-sleeping .capsule-pod-sprite.is-jarvis_ceo {
  background-position: -66px 0px !important;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.35)) !important;
}

/* Socrates Capsule (Frame 3) */
.dormitory-capsule-pod.is-sleeping .capsule-pod-sprite.is-socrates {
  background-position: -132px 0px !important;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.35)) !important;
}

/* Inactive Empty Capsule Frame (Frame 4) when agents are active elsewhere */
.dormitory-capsule-pod.is-empty-cabin .capsule-pod-sprite,
.dormitory-capsule-pod.is-reserve .capsule-pod-sprite {
  background-position: -198px 0px !important;
  opacity: 0.35 !important;
  filter: grayscale(100%) brightness(0.55) !important;
}

/* Capsule Selected Overrides */
.dormitory-capsule-pod.is-selected .capsule-pod-sprite {
  filter: drop-shadow(0 0 12px var(--agent-color)) brightness(1.2) !important;
}

/* Hide standard Zzz and thinking bubbles on standby agents in the dormitory since they have their own integrated indicators */
.office-room-body-dormitory .office-agent-token.is-sleeping::after {
  content: none !important;
  display: none !important;
}

/* ==========================================================================
   Virtual Laboratory Fullscreen & 100% Viewport Height Overrides
   ========================================================================== */

/* Keep top navigation visible even in graphic fullscreen mode */
body.graphic-fullscreen .analysis-bar {
  display: flex !important;
}

/* Core layouts */
body.graphic-fullscreen #tab-graphic.game-panel:not([hidden]) {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.graphic-fullscreen .game-viewport {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#libraryShelves {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: clamp(8px, 1vw, 14px) !important;
}

.office-map {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  gap: 8px !important;
}

.office-map-head {
  flex-shrink: 0 !important;
  margin-bottom: 4px !important;
}

.office-map-grid {
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: 1.2fr 1.2fr 2fr 1.2fr !important;
  gap: clamp(8px, 1vw, 14px) !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* Room layouts dynamic stretching */
.office-room {
  height: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto 1fr !important;
  gap: 8px !important;
  padding: 10px !important;
}

.office-room-dormitory,
.office-room-library,
.office-room-meeting,
.office-room-cognitive-core {
  min-height: 0 !important;
}

.office-room-meeting {
  align-self: stretch !important;
}

/* Room body content layout centering (with original high-fidelity SVGs & sprites preserved) */
.office-room-body {
  height: 100% !important;
  min-height: 0 !important;
  padding: clamp(6px, 0.8vw, 12px) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

.office-room-body-dormitory {
  place-items: center !important;
  position: relative !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: clamp(6px, 0.8vw, 12px) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  background: radial-gradient(circle at center, rgba(0, 240, 255, 0.08) 0%, rgba(2, 4, 12, 0.96) 85%) !important;
}

.dormitory-center-deck {
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: auto !important;
}

.office-room-body-library {
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

.office-room-body-meeting {
  place-items: center !important;
  position: relative !important;
  padding-bottom: 12px !important;
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

.office-room-body-cognitive-core {
  min-height: 0 !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Wrapping grids responsive adjustments */
@media (max-width: 1480px) {
  .office-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 960px) {
  .office-map-grid {
    grid-template-columns: 1fr !important;
    overflow-y: auto !important;
  }
}

/* ==========================================================================
   DeepSeek AI Brain Capsule 4x Enlargement Overrides
   ========================================================================== */

.office-agent-token[data-agent-id="deepseek"] {
  width: 192px !important;
  height: 192px !important;
  margin: auto !important;
}

.office-agent-sprite.is-deepseek {
  background-image: url("/static/sprites/deepseek/ai_brain_capsule_sprite.svg?v=4") !important;
  background-size: 768px 192px !important;
  width: 192px !important;
  height: 192px !important;
}

/* State offsets corresponding to 192px frame steps */
.office-agent-token.is-brain-ai-off .office-agent-sprite.is-deepseek {
  background-position: 0 0 !important;
}

.office-agent-token.is-brain-ai-idle .office-agent-sprite.is-deepseek {
  background-position: -192px 0 !important;
  animation: brain-ai-idle-pulse 2.1s ease-in-out infinite !important;
}

.office-agent-token.is-brain-ai-processing .office-agent-sprite.is-deepseek {
  animation: brain-ai-processing 0.7s steps(1, end) infinite !important;
}

/* Pulse animation for standard offset */
@keyframes brain-ai-idle-pulse {
  0%, 100% {
    transform: translateY(0);
    filter: contrast(1.1) saturate(1.08);
  }
  50% {
    transform: translateY(-4px);
    filter: contrast(1.14) saturate(1.18) brightness(1.04);
  }
}

/* Sincronização de frames em 4x */
@keyframes brain-ai-processing {
  0%, 49.999% {
    background-position: -384px 0 !important;
  }
  50%, 100% {
    background-position: -576px 0 !important;
  }
}

.office-agent-token.is-sleeping .office-agent-sprite.is-deepseek {
  background-position: -192px 0 !important;
  animation: none !important;
}

/* ==========================================================================
   Cognitive Core Clean & Organized Layout Overrides
   ========================================================================== */

/* ==========================================================================
   Cognitive Core Responsive & Horizontal Layout Overrides
   ========================================================================== */

/* Responsive custom properties for the 5-capsule core bank */
:root {
  --cc-capsule-off-size: 52px;
  --cc-capsule-active-size: 96px;
  --cc-capsule-gap: 8px;
}

@media (max-width: 1480px) {
  :root {
    --cc-capsule-off-size: 68px;
    --cc-capsule-active-size: 120px;
    --cc-capsule-gap: 12px;
  }
}

/* ==========================================================================
   Cognitive Core Responsive 2x2 Grid & 3x Larger Layout Overrides
   ========================================================================= */

/* Symmetrical 2x2 grid layout responsive variables (3x larger than previous tiny sizes) */
:root {
  --cc-capsule-off-size: 96px;     /* Desktop 4-column mode: beautiful fit in 330px room */
  --cc-capsule-active-size: 132px;
  --cc-capsule-gap: 12px;
  --cc-stage-min-height: 270px;
}

@media (max-width: 1480px) {
  :root {
    --cc-capsule-off-size: 160px;   /* Stacked mode: huge grand view filling the wide map grid cell */
    --cc-capsule-active-size: 192px; /* Native 192px pixel art crisp size for DeepSeek active core */
    --cc-capsule-gap: 20px;
    --cc-stage-min-height: 410px;
  }
}

.office-room-body-cognitive-core {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 12px !important;
  height: 100% !important;
  min-height: 0 !important;
}

.cognitive-core-stage {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  min-height: var(--cc-stage-min-height) !important;
  padding: 14px !important;
  background: radial-gradient(circle at center, rgba(0, 240, 255, 0.06) 0%, rgba(2, 4, 12, 0.5) 80%) !important;
  border: 1px solid rgba(0, 240, 255, 0.22) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 0 25px rgba(0, 240, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.45) !important;
  overflow: hidden !important;
}

.office-agents-lane-cognitive-core {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* Perfect symmetrical 2x2 grid */
  gap: var(--cc-capsule-gap) !important;
  justify-items: center !important;
  align-items: center !important;
  width: auto !important;
  margin: auto !important;
  z-index: 5 !important;
}

/* Tokens base style inside Cognitive Core */
.office-agents-lane-cognitive-core .office-agent-token {
  position: relative !important;
  display: inline-grid !important;
  place-items: center !important;
  margin: 0 !important;
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.25s ease !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.office-agents-lane-cognitive-core .office-agent-token:hover {
  transform: scale(1.08) translateY(-4px) !important;
  filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.65)) !important;
}

/* Central functioning DeepSeek capsule (3rd element in the 4-capsule 2x2 grid) */
.office-agents-lane-cognitive-core .office-agent-token:nth-child(3) {
  width: var(--cc-capsule-active-size) !important;
  height: var(--cc-capsule-active-size) !important;
  z-index: 10 !important;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.35)) !important;
}

.office-agents-lane-cognitive-core .office-agent-token:nth-child(3) .office-agent-sprite.is-deepseek {
  background-image: url("/static/sprites/deepseek/ai_brain_capsule_sprite.svg?v=5") !important;
  background-size: 400% 100% !important;
  width: var(--cc-capsule-active-size) !important;
  height: var(--cc-capsule-active-size) !important;
}

/* Local state offsets using percentage positioning for the central active capsule */
.office-agents-lane-cognitive-core .office-agent-token:nth-child(3).is-brain-ai-off .office-agent-sprite.is-deepseek {
  background-position: 0% 0% !important;
  animation: none !important;
}

.office-agents-lane-cognitive-core .office-agent-token:nth-child(3).is-brain-ai-idle .office-agent-sprite.is-deepseek {
  background-position: 33.3333% 0% !important;
  animation: brain-ai-idle-pulse-v2 2.1s ease-in-out infinite !important;
}

.office-agents-lane-cognitive-core .office-agent-token:nth-child(3).is-brain-ai-processing .office-agent-sprite.is-deepseek {
  animation: brain-ai-processing-v2 0.7s steps(1, end) infinite !important;
}

@keyframes brain-ai-idle-pulse-v2 {
  0%, 100% {
    transform: translateY(0);
    filter: contrast(1.1) saturate(1.08);
  }
  50% {
    transform: translateY(-3px);
    filter: contrast(1.14) saturate(1.18) brightness(1.04);
  }
}

@keyframes brain-ai-processing-v2 {
  0%, 49.999% {
    background-position: 66.6667% 0% !important;
  }
  50%, 100% {
    background-position: 100% 0% !important;
  }
}

/* Offline auxiliary flanking capsules (1st, 2nd, and 4th children) */
.office-agents-lane-cognitive-core .office-agent-token:not(:nth-child(3)) {
  width: var(--cc-capsule-off-size) !important;
  height: var(--cc-capsule-off-size) !important;
  opacity: 0.58 !important;
}

.office-agents-lane-cognitive-core .office-agent-token:not(:nth-child(3)) .office-agent-sprite.is-deepseek {
  background-image: url("/static/sprites/deepseek/ai_brain_capsule_sprite.svg?v=5") !important;
  background-size: 400% 100% !important;
  background-position: 0% 0% !important;
  width: var(--cc-capsule-off-size) !important;
  height: var(--cc-capsule-off-size) !important;
  animation: none !important;
  filter: grayscale(80%) brightness(0.65) !important;
}

/* High-fidelity operational background decals (placed behind the capsules and non-blocking) */
.cognitive-core-energy {
  width: calc(var(--cc-capsule-active-size) * 1.35) !important;
  height: calc(var(--cc-capsule-active-size) * 1.35) !important;
  opacity: 0.55 !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

.cognitive-core-terminal {
  opacity: 0.55 !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.cognitive-core-server-stack {
  opacity: 0.55 !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.cognitive-core-expansion {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 8px !important;
  flex-shrink: 0 !important;
}

