:root {
  --bg: #0e0e0f;
  --card: #1a1a1c;
  --border: transparent;
  --text: #e6e6e8;
  --muted: #9a9aa1;
  --ok: #3dd68c;
  --warn: #f0b429;
  --err: #f07178;
  --accent: #c7c7cf;
  /* Primary action buttons — blue ~20% lighter than #2563eb */
  --primary-btn: #5082ef;
  --primary-btn-hover: #4580e8;
  --primary-btn-border: #4580e8;
  --primary-btn-disabled: #6ba0f4;
  --ui-font-scale: 1;
}
html {
  font-size: calc(16px * var(--ui-font-scale, 1));
}
* { box-sizing: border-box; }
input[type="checkbox"] {
  accent-color: var(--primary-btn);
  cursor: pointer;
}
body {
  margin: 0;
  font-family: "Hiragino Sans", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  padding: 0.6rem 0.85rem 1.2rem;
}
.tm-disk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #202024 0%, var(--card) 100%);
}
.tm-disk-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 12rem;
}
.tm-disk-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
}
.tm-disk-label strong {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.tm-disk-status {
  font-size: 0.74rem;
}
.tm-disk-status.ok { color: var(--ok); }
.tm-disk-status.warn { color: var(--warn); }
.tm-disk-status.err { color: var(--err); }
.tm-disk-detail {
  font-size: 0.68rem;
}
.tm-disk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.tm-disk-message {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}
.tm-disk-message.ok { color: var(--ok); }
.tm-disk-message.err { color: var(--err); }
.tm-disk-message.hidden { display: none; }

.mlx-vlm-bar {
  border-color: var(--border);
}
.mlx-vlm-bar .tm-disk-label strong {
  color: inherit;
}
.mlx-vlm-bar button.danger {
  border-color: rgba(240, 113, 120, 0.55);
  color: #ffb4b8;
}
.mlx-vlm-bar button.danger:not(:disabled):hover {
  border-color: rgba(240, 113, 120, 0.9);
  background: rgba(240, 113, 120, 0.12);
}

.odk-message.ok { color: var(--ok); }
.odk-message.err { color: var(--err); }
.odk-path-table th { text-align: left; white-space: nowrap; width: 11rem; }
.odk-path-table code { font-size: 0.85em; word-break: break-all; }
.financial-dd-workspace {
  display: grid;
  gap: 0.75rem;
}
.financial-dd-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 0.7rem;
}
.financial-dd-panel h3 {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--accent);
}
.financial-dd-upload-row,
.financial-dd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.45rem 0;
}
.financial-dd-run-flow {
  flex-wrap: nowrap;
}
.financial-dd-flow-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.15rem;
  user-select: none;
}
.financial-dd-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.financial-dd-table td {
  vertical-align: top;
}
.financial-dd-table td:last-child {
  text-align: right;
  white-space: nowrap;
}
.financial-dd-table--paths td,
.financial-dd-table--paths td:last-child,
.financial-dd-table--paths th,
.financial-dd-table--paths th:last-child {
  text-align: left;
  white-space: normal;
}
.financial-dd-table--paths code,
.financial-dd-table--paths code.fin-excel-path {
  display: block;
  word-break: break-all;
  white-space: normal;
  font-size: 0.78rem;
  text-align: left;
}
.financial-dd-panel input[type="text"] {
  width: min(100%, 34rem);
}
.financial-dd-drop-zone {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  margin: 0.45rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.02);
}
.financial-dd-drop-zone.dragover {
  border-color: var(--accent);
  color: var(--text);
}
.excel-error-check-mode .fin-excel-actions-bottom {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
}
.excel-error-check-mode .fin-excel-run-help {
  margin: 0 0 0.65rem;
  line-height: 1.45;
}
.excel-error-check-mode .fin-excel-run-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.excel-error-check-mode .fin-excel-run-status {
  flex: 1 1 12rem;
  min-width: 8rem;
}
.financial-dd-folder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.35rem 0;
}
.fin-excel-finding-critical { color: var(--err); }
.fin-excel-finding-warn { color: #c9a227; }
.fin-excel-results-note {
  margin: 0.75rem 0 0.35rem;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--primary-btn);
  background: rgba(80, 130, 239, 0.08);
}
.fin-excel-result-block {
  margin: 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.fin-excel-result-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.55rem;
}
.fin-excel-result-actions { flex-shrink: 0; }
.fin-excel-path-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}
.fin-excel-integrity-ok { color: var(--ok); font-size: 0.78rem; }
.fin-excel-integrity-bad { color: var(--err); font-size: 0.78rem; }
.fin-excel-findings-nav { margin-top: 0.55rem; }
.fin-excel-findings-nav h4 { margin: 0 0 0.45rem; font-size: 0.88rem; }
.fin-excel-findings-table { font-size: 0.78rem; }
.fin-excel-findings-table code { font-size: 0.76rem; }
.fin-excel-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}
.fin-excel-badge-llm { background: rgba(80, 130, 239, 0.25); color: #9ec5ff; }
.fin-excel-badge-rule { background: rgba(255, 255, 255, 0.1); color: var(--muted); }
.fin-excel-llm-summary {
  margin: 0.55rem 0;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid #6a9fd8;
  background: rgba(106, 159, 216, 0.08);
}
.fin-excel-review-host { margin-top: 0.75rem; }
.fin-excel-review-host .fin-excel-review-card {
  background: transparent;
}
.fin-excel-review-host .fin-excel-cell-panel,
.fin-excel-review-host .fin-excel-review-context {
  background: #ffffff !important;
  color: #1a2233 !important;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
}
.fin-excel-review-host .fin-excel-review-ma {
  background: #f1f5f9 !important;
  color: #1a2233 !important;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  padding: 8px 10px;
}
.fin-excel-review-host .fin-excel-cell-panel,
.fin-excel-review-host .fin-excel-review-context {
  padding: 8px 10px;
}
.fin-excel-review-host .fin-excel-context-table,
.fin-excel-review-host .fin-excel-context-table th,
.fin-excel-review-host .fin-excel-context-table td {
  background: #ffffff !important;
  color: #0f172a !important;
}
.fin-excel-review-host .fin-excel-context-table th {
  color: #64748b !important;
}
.fin-excel-review-host .fin-excel-context-table code,
.fin-excel-review-host .fin-excel-formula {
  color: #0f172a !important;
  background: #eef2ff !important;
}
.fin-excel-suggested-fix {
  margin: 0.45rem 0 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.82rem;
  line-height: 1.45;
}
.fin-excel-review-overlay .fin-excel-suggested-fix {
  background: #ecfdf5 !important;
  color: #065f46 !important;
}
.fin-excel-review-nav {
  border: 1px solid var(--primary-btn-border);
  border-radius: 10px;
  padding: 0.75rem;
  background: rgba(80, 130, 239, 0.06);
}
.fin-excel-review-nav-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}
.fin-excel-review-nav-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.fin-excel-review-card {
  min-height: 5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 0.55rem;
}
.fin-excel-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.fin-excel-review-message { margin: 0.35rem 0; line-height: 1.45; }
.fin-excel-meaning { margin: 0.35rem 0; color: #9ec5ff; line-height: 1.45; }
.fin-excel-review-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}
@media (max-width: 900px) {
  .fin-excel-review-split { grid-template-columns: 1fr; }
}
.fin-excel-review-ma h5,
.fin-excel-review-context h5 {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.fin-excel-review-loc { margin: 0 0 0.35rem; font-size: 0.88rem; }
.fin-excel-context-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: #ffffff !important;
}
.fin-excel-context-table th,
.fin-excel-context-table td {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.2rem 0.45rem 0.2rem 0;
}
.fin-excel-context-table th {
  text-align: left;
  vertical-align: top;
  color: #64748b !important;
  width: 5.5rem;
  font-weight: 600;
}
.fin-excel-context-table td {
  padding: 0.2rem 0;
  word-break: break-all;
  color: #0f172a !important;
}
.fin-excel-context-table code { font-size: 0.8rem; }
.fin-excel-review-host .fin-excel-formula,
.fin-excel-review-nav .fin-excel-formula {
  color: #b8d4ff;
}
.fin-excel-cell-panel {
  background: #ffffff;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  padding: 8px 10px;
  color: #1a2233;
}
.fin-excel-cell-panel h5 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  color: #475569;
  font-weight: 600;
}
.fin-excel-cell-panel .fin-excel-context-table th {
  color: #64748b;
  font-size: 0.76rem;
}
.fin-excel-cell-panel .fin-excel-context-table td {
  color: #0f172a;
  font-size: 0.8rem;
}
.fin-excel-cell-panel .fin-excel-context-table code,
.fin-excel-cell-panel .fin-excel-formula {
  color: #0f172a;
  background: #eef2ff;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.78rem;
}
.fin-excel-label-note {
  margin: 0 0 0.45rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 235, 156, 0.12);
  font-size: 0.82rem;
  line-height: 1.45;
}
.fin-excel-review-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #ffffff;
  color: #1a2233;
  overflow: auto;
}
.fin-excel-review-overlay.is-open { display: block; }
body.fin-excel-review-mode {
  background: #ffffff !important;
  color: #1a2233 !important;
  overflow: auto;
}
body.fin-excel-review-mode > header.top,
body.fin-excel-review-mode > section.home-summary,
body.fin-excel-review-mode > section#ma-service-guardian-section,
body.fin-excel-review-mode > section#workspace,
body.fin-excel-review-mode > section#ma-llm-queue-section,
body.fin-excel-review-mode > section.home-modules,
body.fin-excel-review-mode > footer,
body.fin-excel-review-mode > section#permission-alerts {
  display: none !important;
}
.fin-excel-review-overlay-inner {
  width: 100%;
  max-width: none;
  min-height: 100%;
  margin: 0;
  padding: 12px 14px 14px;
  box-sizing: border-box;
}
.fin-excel-review-overlay-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.fin-excel-review-overlay-head h2 {
  margin: 0;
  font-size: 0.98rem;
  color: #1e40af;
  font-weight: 700;
}
.fin-excel-review-overlay .fin-excel-review-card {
  background: transparent;
  color: #1a2233;
  min-height: 0;
  padding: 0;
  margin-bottom: 8px;
}
.fin-excel-review-overlay .fin-excel-review-split {
  grid-template-columns: 1fr;
  gap: 8px;
}
.fin-excel-review-overlay .fin-excel-review-ma {
  background: #f8fafc !important;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  padding: 8px 10px;
  color: #1a2233 !important;
}
.fin-excel-review-overlay .fin-excel-cell-panel,
.fin-excel-review-overlay .fin-excel-review-context {
  background: #ffffff !important;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  padding: 8px 10px;
  color: #1a2233 !important;
}
body.fin-excel-review-mode .fin-excel-cell-panel,
body.fin-excel-review-mode .fin-excel-review-context {
  background: #ffffff !important;
  color: #1a2233 !important;
}
body.fin-excel-review-mode .fin-excel-cell-panel code,
body.fin-excel-review-mode .fin-excel-cell-panel .fin-excel-formula,
body.fin-excel-review-mode .fin-excel-review-context code,
body.fin-excel-review-mode .fin-excel-review-context .fin-excel-formula {
  color: #0f172a !important;
  background: #eef2ff !important;
}
body.fin-excel-review-mode .fin-excel-cell-panel th,
body.fin-excel-review-mode .fin-excel-review-context th {
  color: #64748b !important;
}
body.fin-excel-review-mode .fin-excel-cell-panel td,
body.fin-excel-review-mode .fin-excel-review-context td {
  color: #0f172a !important;
}
.fin-excel-review-overlay .fin-excel-review-ma h5,
.fin-excel-review-overlay .fin-excel-review-context h5 {
  color: #475569 !important;
  font-size: 0.78rem;
}
.fin-excel-review-overlay .fin-excel-review-loc,
.fin-excel-review-overlay .fin-excel-review-message,
.fin-excel-review-overlay .fin-excel-review-detail,
.fin-excel-review-overlay .muted-inline {
  color: #1a2233 !important;
}
.fin-excel-review-overlay .fin-excel-meaning { color: #1d4ed8 !important; }
.fin-excel-review-overlay .fin-excel-context-table th {
  color: #64748b !important;
  font-size: 0.76rem;
}
.fin-excel-review-overlay .fin-excel-context-table td {
  color: #0f172a !important;
  font-size: 0.8rem;
}
.fin-excel-review-overlay .fin-excel-context-table code,
.fin-excel-review-overlay .fin-excel-formula {
  color: #0f172a !important;
  background: #e8eef9 !important;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.78rem;
}
.fin-excel-review-overlay .fin-excel-label-note {
  background: #fef9c3;
  color: #713f12;
}
.fin-excel-review-overlay-status {
  margin-top: 8px;
  font-size: 0.76rem;
  color: #64748b;
  min-height: 1em;
}
.fin-excel-review-overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.fin-excel-review-overlay-hint {
  margin: 0 0 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef2ff;
  color: #334155;
  font-size: 0.74rem;
  line-height: 1.35;
}
.fin-excel-review-overlay-file {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: #64748b !important;
  word-break: break-all;
}
.financial-dd-model-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0.45rem 0;
}
.financial-dd-model-row select {
  min-width: min(100%, 20rem);
}
.financial-dd-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.45rem 0;
}
.financial-dd-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.55rem;
  max-height: 42rem;
  overflow: auto;
  padding-right: 0.25rem;
}
.financial-dd-pages h4 {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  color: var(--accent);
}
.financial-dd-page-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem;
  background: #141416;
}
.financial-dd-page-card.suggested {
  border-color: rgba(240, 180, 41, 0.65);
}
.financial-dd-page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.financial-dd-page-head strong {
  color: var(--text);
}
.financial-dd-page-image {
  display: block;
  width: 100%;
  max-height: 28rem;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
.financial-dd-case {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0.65rem 0;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.financial-dd-case-head {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.financial-dd-case-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.financial-dd-case-path {
  display: block;
  font-size: 0.74rem;
  word-break: break-all;
  color: var(--muted);
}
.financial-dd-case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.financial-dd-case-body {
  padding: 0.65rem 0.75rem 0.85rem;
}
.financial-dd-case-body h4,
.financial-dd-case-body h5 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.82rem;
  color: var(--accent);
}
.financial-dd-case-body h4:first-child {
  margin-top: 0;
}
.fin-dd-case-summary {
  margin: 0.35rem 0 0.55rem;
}
.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.app-logo { border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
h1 { margin: 0; font-size: 1.2rem; }
.sub { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.78rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.actions .btn-restart-app {
  margin-left: auto;
  font-size: calc(1em + 1pt);
  font-weight: 600;
}
.dev-links {
  display: flex;
  gap: 0.35rem;
  padding-right: 0.5rem;
  margin-right: 0.35rem;
  border-right: 1px solid var(--border);
}
button.dev-link { min-width: 5.5rem; }
.font-size-control {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.45rem;
  margin-right: 0.15rem;
  border-right: 1px solid var(--border);
}
.font-size-control .font-size-label {
  min-width: 2.6rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  user-select: none;
}
.font-size-control button.font-btn {
  min-width: 1.75rem;
  padding: 0.25rem 0.35rem;
  font-size: 0.72rem;
  line-height: 1;
}
.font-size-control input[type="range"] {
  width: 4.5rem;
  height: 0.35rem;
  accent-color: var(--accent);
  cursor: pointer;
}
button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
}
button:hover { border-color: var(--accent); }
button.primary {
  background: var(--primary-btn);
  color: #fff;
  border-color: var(--primary-btn-border);
  font-weight: 600;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}
button.primary:hover {
  background: var(--primary-btn-hover);
  border-color: #3d78e0;
  filter: none;
}
button.primary:disabled {
  background: var(--primary-btn-disabled);
  border-color: var(--primary-btn-border);
  opacity: 0.65;
  cursor: wait;
}
button.secondary { border-color: var(--accent); color: var(--accent); }
button.ok { border-color: var(--ok); color: var(--ok); }
button.warn { border-color: var(--warn); color: var(--warn); }
button.linkish {
  border: none;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.45rem;
}
.cards-hubs {
  margin-bottom: 0.45rem;
}
.home-summary-tail-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  min-width: 0;
  width: 100%;
}
.cards-tail {
  display: flex;
  flex: 0 0 auto;
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 0.45rem;
  margin-bottom: 0;
}
.cards-tail .card {
  min-width: 6.5rem;
  max-width: 9.5rem;
}
.cards-tail .card .val {
  font-size: calc(1.05rem - 1pt);
  font-weight: 600;
  line-height: 1.1;
  text-transform: none;
  letter-spacing: normal;
}
.home-modules {
  margin-bottom: 0.75rem;
}

.ma-llm-queue-section {
  margin: 0 0 0.85rem;
}

.ma-service-guardian-section {
  margin: 0 0 0.55rem;
}

/* Home: compact ops panels */
body:not(.workspace-only) .ma-service-guardian-section,
body:not(.workspace-only) .ma-llm-queue-section {
  font-size: 0.82rem;
  line-height: 1.35;
}
body:not(.workspace-only) .ma-service-guardian-bar {
  padding: 0.4rem 0.6rem 0.35rem;
  margin-bottom: 0.4rem;
}
body:not(.workspace-only) .ma-svc-guard-head {
  gap: 0.3rem 0.45rem;
  margin-bottom: 0.2rem;
}
body:not(.workspace-only) .ma-svc-guard-chips {
  gap: 0.25rem;
  margin: 0.15rem 0 0.25rem;
}
body:not(.workspace-only) .ma-svc-chip {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
}
body:not(.workspace-only) .ma-llm-queue-panel {
  padding: 0.45rem 0.65rem 0.55rem;
}
body:not(.workspace-only) .ma-llm-queue-summary {
  font-size: 0.95rem;
  padding: 0.05rem 0 0.25rem;
}
body:not(.workspace-only) .ma-llm-queue-note {
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0.15rem 0 0.35rem;
}
body:not(.workspace-only) .ma-llm-queue-body {
  font-size: 0.76rem;
  line-height: 1.3;
}
body:not(.workspace-only) .ma-llm-inflight-table,
body:not(.workspace-only) .ma-llm-dispatch-table {
  font-size: 0.74rem;
}
body:not(.workspace-only) .ma-llm-queue-dock-hint {
  display: none;
}

.ma-service-guardian-bar {
  border: 1px solid rgba(120, 140, 160, 0.35);
  border-radius: 8px;
  padding: 0.55rem 0.75rem 0.45rem;
  margin-bottom: 0.55rem;
  background: rgba(30, 36, 44, 0.55);
}

.ma-svc-guard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
}

.ma-svc-guard-summary.ok { color: #7fd4a0; }
.ma-svc-guard-summary.warn { color: #e8c66a; }
.ma-svc-guard-summary.error { color: #f08878; }

.ma-svc-guard-inline {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(52vw, 520px);
}

.ma-svc-guard-expand-btn.hidden,
.ma-llm-queue-dock-hint.hidden {
  display: none;
}

.ma-svc-guard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.25rem 0 0.35rem;
}

.ma-svc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.15);
}

.ma-svc-chip.ok { border-color: rgba(80, 180, 120, 0.45); }
.ma-svc-chip.warn { border-color: rgba(220, 180, 70, 0.55); }
.ma-svc-chip.error { border-color: rgba(200, 80, 70, 0.55); }

.ma-svc-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #888;
}
.ma-svc-chip.ok .ma-svc-chip-dot { background: #5cb87a; }
.ma-svc-chip.warn .ma-svc-chip-dot { background: #d4b24a; }
.ma-svc-chip.error .ma-svc-chip-dot { background: #d06050; }

.ma-svc-guard-alerts {
  margin: 0.35rem 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(220, 120, 70, 0.45);
  background: rgba(200, 80, 70, 0.12);
  font-size: 0.86rem;
}

.ma-svc-guard-alerts.hidden { display: none; }

.ma-svc-alert-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  margin: 0.2rem 0;
}

.ma-svc-guard-details summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted, #9aa0a6);
  margin-bottom: 0.25rem;
}

.ma-svc-guard-body {
  font-size: 0.82rem;
  max-height: 220px;
  overflow: auto;
}

.ma-svc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.ma-svc-table th,
.ma-svc-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.25rem 0.35rem;
  text-align: left;
  vertical-align: top;
}

.ma-llm-queue-panel {
  border: 1px solid rgba(74, 163, 204, 0.45);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: rgba(58, 143, 183, 0.12);
}

.ma-llm-queue-summary {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.45;
  color: #9fd4ff;
  cursor: pointer;
  list-style: none;
  padding: 0.15rem 0 0.45rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.ma-llm-queue-summary-label {
  flex: 0 0 auto;
}

.ma-llm-queue-dock-hint {
  font-size: 0.72rem;
  font-weight: 400;
}

.ma-llm-queue-summary::-webkit-details-marker {
  display: none;
}

.ma-llm-queue-note {
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0 0 0.55rem;
}

.ma-llm-queue-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
}

/* 右 MA キュー: 左列の高さに合わせ、行増加時は右ペイン内スクロール */
.ma-llm-queue-col-dispatch {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ma-llm-queue-body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 960px) {
  .ma-llm-queue-columns {
    grid-template-columns: 1fr;
  }
}

.ma-llm-queue-col {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(74, 163, 204, 0.25);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.12);
}

.ma-llm-lane-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  line-height: 1.35;
}

.ma-llm-lane-badge.interactive {
  background: rgba(46, 204, 113, 0.22);
  color: #8ef0b8;
  border: 1px solid rgba(46, 204, 113, 0.45);
}

.ma-llm-lane-badge.routine {
  background: rgba(241, 196, 15, 0.16);
  color: #f9e79f;
  border: 1px solid rgba(241, 196, 15, 0.35);
}

.ma-llm-dispatch-table tr.paused td:first-child {
  color: #9fd4ff;
}

.ma-llm-dispatch-table tr.running td:first-child {
  color: #8ef0b8;
}

.ma-llm-queue-body {
  font-size: 0.92rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.9);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.ma-llm-queue-col:not(.ma-llm-queue-col-dispatch) .ma-llm-queue-body {
  overflow-y: visible;
}

.ma-llm-queue-meta {
  font-size: 0.8rem;
  line-height: 1.6;
  margin-bottom: 0.45rem;
  color: var(--muted);
}

.ma-llm-queue-line {
  margin: 0.35rem 0;
  line-height: 1.65;
}

.ma-llm-queue-section-title {
  margin: 0.55rem 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #b8e0f5;
}

.ma-llm-slot-list {
  margin: 0.25rem 0 0.5rem 1.2em;
  padding: 0;
  line-height: 1.65;
  font-size: 0.88rem;
}

.ma-llm-inflight-table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.84rem;
  line-height: 1.5;
}

.ma-llm-inflight-table th,
.ma-llm-inflight-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.45rem;
  text-align: left;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.ma-llm-inflight-table th:nth-child(1),
.ma-llm-inflight-table td:nth-child(1) {
  width: 4.2em;
  white-space: nowrap;
}

.ma-llm-inflight-table th:nth-child(2),
.ma-llm-inflight-table td:nth-child(2) {
  min-width: 8rem;
}

.ma-llm-inflight-table th:nth-child(3),
.ma-llm-inflight-table td:nth-child(3) {
  width: 3.6em;
  white-space: nowrap;
}

.ma-llm-inflight-table th:nth-child(4),
.ma-llm-inflight-table td:nth-child(4),
.ma-llm-inflight-table th:nth-child(5),
.ma-llm-inflight-table td:nth-child(5) {
  min-width: 8rem;
}

.ma-llm-inflight-table th:nth-child(7),
.ma-llm-inflight-table td:nth-child(7) {
  width: 4.2em;
  white-space: nowrap;
}

.ma-llm-inflight-table th:nth-child(8),
.ma-llm-inflight-table td:nth-child(8) {
  width: 7.4em;
}

.ma-llm-inflight-table td.ma-llm-actions {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}

.ma-llm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem 0.18rem;
  white-space: normal;
  overflow: visible;
  max-width: 100%;
}

.ma-llm-actions button {
  font-size: 0.68rem;
  padding: 0.12rem 0.28rem;
  margin: 0;
  flex: 0 0 auto;
}

.ma-llm-inflight-table tr.paused td:first-child {
  color: #9fd4ff;
}

.ma-llm-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.ma-llm-queue-actions .warn-btn {
  border-color: rgba(192, 57, 43, 0.55);
  color: #f0a8a0;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
}
.card .val { font-size: 1.05rem; font-weight: 600; line-height: 1.1; }
.card .lbl { font-size: 0.66rem; color: var(--muted); line-height: 1.2; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.7rem;
}
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
section { margin-bottom: 0.75rem; }
h2 { font-size: 0.9rem; margin: 0 0 0.4rem; color: var(--accent); }
.module-list { display: flex; flex-direction: column; gap: 0.5rem; }
.module-groups { display: flex; flex-direction: column; gap: 0.5rem; }
.module-groups-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.module-group-panel--news,
.module-group-panel--corporate,
.module-group-panel--productivity,
.module-group-panel--admin {
  grid-column: 1 / -1;
}
.module-group-panel--teaser {
  grid-column: 1;
}
.module-group-panel--matching {
  grid-column: 2 / 4;
}
.module-group-panel--brp {
  grid-column: 1;
}
.module-group-panel--financial_dd {
  grid-column: 2;
}
.module-group-panel--comps {
  grid-column: 3;
}
@media (max-width: 960px) {
  .module-groups-layout {
    grid-template-columns: 1fr;
  }
  .module-group-panel--teaser,
  .module-group-panel--matching,
  .module-group-panel--brp,
  .module-group-panel--financial_dd,
  .module-group-panel--comps {
    grid-column: 1 / -1;
  }
}
@media (min-width: 961px) and (max-width: 1200px) {
  .module-groups-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .module-group-panel--matching {
    grid-column: 1 / -1;
  }
  .module-group-panel--comps {
    grid-column: 2;
  }
}
.module-group-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 0.55rem 0.65rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.module-group-panel-title {
  margin: 0 0 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}
/* グループ内: ウィンドウ幅に応じて auto-fit（1件は横いっぱい） */
.module-list--rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.45rem;
  width: 100%;
}
.module-group-panel--news .module-list--rows,
.module-group-panel--teaser .module-list--rows,
.module-group-panel--brp .module-list--rows {
  grid-template-columns: 1fr;
}
.module-group-panel--financial_dd .module-list--rows {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.module-group-panel--news {
  padding: 0.28rem 0.55rem 0.32rem;
}
.module-group-panel--news .module-group-panel-title {
  display: none;
}
.module-group-panel--news .mod {
  padding: 0.2rem 0.45rem;
  align-items: center;
  row-gap: 0.08rem;
}
.module-group-panel--news .mod h3 {
  flex: 0 0 auto;
  min-width: 5.5rem;
  font-size: 0.78rem;
}
.module-group-panel--news .mod p {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.68rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.module-group-panel--news .mod .links {
  flex: 0 0 auto;
  margin-left: auto;
  gap: 0.25rem 0.45rem;
}
.module-group-panel--admin .module-list--rows {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 0.35rem;
}
.module-group-panel--admin {
  padding: 0.4rem 0.55rem 0.45rem;
}
.module-group-panel--admin .module-group-panel-head--operations {
  margin-bottom: 0.35rem;
}
.module-group-panel--admin .module-group-panel-head--operations .section-hint {
  font-size: 0.74rem;
  line-height: 1.2;
}
.module-group-panel--admin .mod,
.module-group-panel--admin .mod.mod-service-panel {
  padding: 0.32rem 0.5rem;
  row-gap: 0.12rem;
}
.module-group-panel--admin .mod h3,
.module-group-panel--admin .mod.mod-service-panel h3.mod-service-head {
  font-size: 0.8rem;
  line-height: 1.2;
}
.module-group-panel--admin .mod p,
.module-group-panel--admin .mod.mod-service-panel .mod-service-detail {
  font-size: 0.7rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.module-group-panel--admin .mod .links {
  gap: 0.25rem 0.45rem;
}
.module-group-panel--admin .mod .links a,
.module-group-panel--admin .mod.mod-service-panel .mod-service-actions .btn-inline {
  font-size: 0.68rem;
  padding: 0.18rem 0.38rem;
}
.module-group-panel--admin .mod.mod-service-panel .mod-service-actions {
  gap: 0.25rem;
  margin-top: 0.05rem;
}
.module-group-panel--matching .module-list--rows {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.module-group-panel--corporate .module-list--rows {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
}
.module-group-panel--comps .module-list--rows {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.module-group-panel .mod.mod-service-panel {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem;
  min-height: 6.5rem;
}
.module-group-panel--admin .mod.mod-service-panel {
  min-height: 4rem;
  padding: 0.32rem 0.5rem;
  gap: 0.25rem;
  flex-direction: column;
  align-items: stretch;
}
.module-group-panel--admin .mod.mod-service-panel .mod-service-detail {
  min-height: 0;
  -webkit-line-clamp: 1;
}
.module-group-panel .mod.mod-service-panel h3.mod-service-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  width: 100%;
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.25;
}
.module-group-panel .mod.mod-service-panel .mod-service-detail {
  width: 100%;
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  min-height: 1.35em;
}
.module-group-panel .mod.mod-service-panel .mod-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.1rem;
}
.module-group-panel .mod.mod-service-panel .mod-service-actions .btn-inline {
  font-size: 0.72rem;
  padding: 0.22rem 0.45rem;
}
.module-group-panel .mod.mod-service-panel .mod-service-actions button.danger {
  border-color: rgba(240, 113, 120, 0.55);
  color: #ffb4b8;
}
.module-group-panel .mod.mod-service-panel .mod-service-message {
  width: 100%;
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}
.module-group-panel .mod.mod-service-panel .mod-service-message.ok { color: var(--ok); }
.module-group-panel .mod.mod-service-panel .mod-service-message.err { color: var(--err); }
.module-group-panel .mod.mod-service-panel .mod-service-message.hidden { display: none; }
.module-group-panel .mod.mod-service-panel .tm-disk-status {
  font-size: 0.72rem;
  font-weight: 500;
}
/* コンパクト横並び（低い高さ・リンクは右寄せ） */
.module-group-panel .mod {
  margin: 0;
  min-height: 0;
  padding: 0.38rem 0.55rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  column-gap: 0.55rem;
  row-gap: 0.18rem;
}
.module-group-panel .mod h3 {
  font-size: 0.84rem;
  margin: 0;
  flex: 0 1 auto;
  min-width: 6.5rem;
  line-height: 1.25;
}
.module-group-panel .mod p {
  font-size: 0.73rem;
  line-height: 1.28;
  margin: 0;
  flex: 1 1 8rem;
  min-width: 0;
}
.module-group-panel .mod .links {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  margin-left: 0;
  justify-content: flex-start;
}
.module-group-panel .mod .links a {
  margin-right: 0;
  font-size: 0.73rem;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .module-group-panel .mod {
    flex-direction: column;
    align-items: flex-start;
  }
  .module-group-panel .mod .links {
    margin-left: 0;
    justify-content: flex-start;
  }
}
.module-group h3 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.module-group .module-list { margin: 0; }
.unified-search-workspace { display: flex; flex-direction: column; gap: 0.65rem; min-height: 60vh; }
.unified-search-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.unified-search-bar input[type="search"] { flex: 1 1 14rem; min-width: 10rem; }
.unified-company-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--card);
}
.unified-search-panel {
  margin-bottom: 0.35rem;
}
.unified-search-primary {
  margin-top: 0.2rem;
}
.unified-search-tools {
  margin-top: 0.3rem;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.unified-query-wrap {
  position: relative;
}
.unified-suggest-dropdown {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border: 1px solid #3d5a7a;
  border-radius: 6px;
  background: #121820;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.unified-suggest-dropdown[hidden] {
  display: none !important;
}
.unified-suggest-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.unified-suggest-option:hover {
  background: rgba(255, 255, 255, 0.06);
}
.unified-suggest-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.unified-suggest-ticker {
  flex-shrink: 0;
}
.unified-related { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.unified-profile-summary { display: flex; flex-direction: column; gap: 0.75rem; }
.unified-search-mode-wrap { display: flex; flex-direction: column; gap: 0.2rem; min-width: 11rem; }
.unified-search-mode-wrap select { min-width: 10.5rem; }
.unified-kw-hint { margin: 0.25rem 0 0.5rem; font-size: 0.82rem; }
.unified-kw-meta { display: grid; grid-template-columns: 6rem 1fr; gap: 0.25rem 0.75rem; margin: 0; }
.unified-kw-breakdown { margin-top: 0.5rem; }
.unified-kw-breakdown .num { text-align: right; width: 4rem; }
.unified-normal-summary .unified-profile-samples { margin-top: 0.75rem; }
.unified-narrative-head { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.unified-narrative-title { margin: 0; font-size: 1.15rem; }
.unified-narrative-body {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  line-height: 1.65;
  font-size: 0.95rem;
  white-space: normal;
}
.unified-narrative-prose {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  background: transparent;
  border: none;
  padding: 0;
}
.unified-narrative-hint { margin: 0; font-size: 0.82rem; }

.unified-narrative-warn {
  margin: 0.5rem 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  border-radius: 6px;
  background: rgba(200, 120, 40, 0.12);
  border: 1px solid rgba(200, 120, 40, 0.35);
  color: inherit;
}

.unified-narrative-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.35rem;
}

.unified-narrative-llm-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted, #666);
}

.unified-narrative-llm-wrap select {
  min-width: 12rem;
  max-width: 22rem;
}

.unified-panel-toolbar .unified-panel-llm-wrap select {
  min-width: 10rem;
}
.unified-profile-dev-details { margin-top: 0.25rem; }
.unified-sample-narrative-excerpt {
  display: block;
  font-size: 0.78rem;
  color: var(--muted, #9aa);
  line-height: 1.35;
  margin-top: 0.2rem;
}
.unified-profile-json-block summary { cursor: pointer; font-weight: 600; }
.unified-profile-samples-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.unified-profile-sample-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.unified-profile-sample-btn:hover { border-color: var(--accent, #6af); }
.unified-news-channel { margin-top: 0.75rem; }
.unified-news-channel h4 { margin: 0 0 0.4rem; font-size: 0.92rem; }
.unified-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.unified-tabs button.active { border-color: var(--accent); color: var(--text); }
.unified-tab-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  vertical-align: middle;
}
.unified-tab-badge.pending { opacity: 0.7; }
.unified-tabs button.active .unified-tab-badge { background: var(--accent); color: #111; }
.unified-panel { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; }
.unified-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.unified-panel-query { flex: 1 1 12rem; font-size: 0.82rem; }
.unified-panel-head { font-size: 0.82rem; color: var(--muted); }
.unified-shikiho-layout {
  display: grid;
  grid-template-columns: minmax(11rem, 26%) 1fr;
  gap: 0.65rem;
  min-height: 52vh;
  align-items: stretch;
}
.unified-shikiho-list {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
}
.unified-shikiho-detail {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: var(--card);
}
.unified-shikiho-raw { max-height: 48vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.unified-comps-table-wrap,
.unified-data-table-wrap {
  overflow: auto;
  max-height: 65vh;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.unified-comps-table th,
.unified-comps-table td,
.unified-data-table th,
.unified-data-table td {
  white-space: nowrap;
  font-size: 0.78rem;
  vertical-align: top;
}
.unified-comps-table td.col-ticker,
.unified-data-table .col-ticker { font-variant-numeric: tabular-nums; }
.unified-data-table .col-saved_path,
.unified-data-table .col-path { white-space: normal; max-width: 14rem; word-break: break-all; }
.unified-row-actions { width: 4.5rem; }
.unified-news-list { display: flex; flex-direction: column; gap: 0.55rem; }
.unified-news-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  background: var(--card);
}
.unified-news-title { font-weight: 600; font-size: 0.9rem; color: var(--accent); text-decoration: none; }
.unified-news-meta { color: var(--muted); font-size: 0.76rem; margin-top: 0.2rem; }
.unified-news-snippet { margin: 0.35rem 0 0; font-size: 0.82rem; line-height: 1.45; white-space: pre-wrap; }
.unified-hit { padding: 0.45rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.unified-hit .hit-title { font-weight: 600; }
.unified-hit .hit-meta { color: var(--muted); font-size: 0.78rem; }
.mod {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}
.mod h3 { margin: 0 0 0.25rem; font-size: 0.95rem; }
.mod p { margin: 0; font-size: 0.82rem; color: var(--muted); }
.mod .links a { color: var(--accent); font-size: 0.8rem; margin-right: 0.75rem; }
.badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.badge.ok { background: #1a3d2e; color: var(--ok); }
.badge.warn { background: #3d3218; color: var(--warn); }
.badge.err { background: #3d1f22; color: var(--err); }
.badge.idle { background: #2a2a2a; color: var(--muted); }

.hdd-mount-led {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: #444;
  flex-shrink: 0;
}
.hdd-mount-led.on {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(93, 211, 158, 0.85);
}
.hdd-mount-led.running {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(93, 211, 158, 0.85);
  animation: hdd-led-pulse 1.2s ease-in-out infinite;
}
.hdd-mount-led.err {
  background: var(--err);
  box-shadow: 0 0 6px rgba(240, 112, 112, 0.75);
}
@keyframes hdd-led-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.88); }
}
.module-group-panel .mod.mod-service-panel h3.mod-service-head .hdd-mount-led {
  align-self: center;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
}
th, td { border-bottom: 1px solid var(--border); padding: 0.45rem 0.6rem; text-align: left; }
th { color: var(--muted); font-weight: 500; }
.queue-steps { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.section-hint {
  margin: -0.2rem 0 0.45rem;
  font-size: 0.76rem;
}
.auto-chain-section {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
.auto-chain-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 240px);
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
@media (max-width: 960px) {
  .auto-chain-board {
    grid-template-columns: 1fr;
  }
}
.auto-chain-timeline-wrap {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: 100%;
  min-height: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 0.5rem 0.55rem 0.6rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.auto-chain-axis {
  position: relative;
  height: 1.4rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.auto-chain-axis-tick {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}
.auto-chain-track {
  position: relative;
  flex: 1 1 auto;
  min-height: 10rem;
  margin-bottom: 0.35rem;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  padding-right: 0.25rem;
  box-sizing: border-box;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent calc(12.5% - 1px),
    rgba(255, 255, 255, 0.04) calc(12.5% - 1px),
    rgba(255, 255, 255, 0.04) 12.5%
  );
  border-radius: 6px;
}
.auto-chain-block {
  position: absolute;
  min-height: 0;
  max-width: calc(100% - 2px);
  padding: 0.3rem 0.4rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: rgba(61, 214, 140, 0.12);
  font-size: 0.7rem;
  line-height: 1.35;
  overflow-x: hidden;
  overflow-y: auto;
  cursor: default;
  box-sizing: border-box;
}
.auto-chain-block.pipeline { background: rgba(120, 160, 255, 0.14); }
.auto-chain-block.auto_queue { background: rgba(240, 180, 41, 0.14); }
.auto-chain-block--edge {
  z-index: 2;
  min-width: 0;
}
.auto-chain-block--edge .block-title {
  white-space: normal;
  word-break: break-word;
}
.auto-chain-block .block-time {
  font-weight: 600;
  color: var(--accent);
}
.auto-chain-block .block-title {
  display: block;
  color: var(--text);
  opacity: 0.92;
  white-space: normal;
  word-break: break-word;
}
.auto-chain-always {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.35rem 0.4rem;
  flex: 0 0 auto;
  flex-shrink: 0;
  padding-top: 0.25rem;
}
.auto-chain-always .pill-btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  line-height: 1.3;
  white-space: normal;
  text-align: left;
  justify-content: flex-start;
  min-height: 2rem;
}
.auto-chain-deps {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 0.45rem 0.5rem 0.55rem;
  overflow: visible;
  min-width: 0;
  max-width: 100%;
  word-break: break-word;
  box-sizing: border-box;
}
.auto-chain-deps-list {
  flex: 1 1 auto;
  min-height: 0;
}
.auto-chain-deps h3 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.auto-chain-dep {
  padding: 0.35rem 0.4rem;
  margin-bottom: 0.35rem;
  border-left: 3px solid var(--border);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.74rem;
}
.auto-chain-dep.done { border-left-color: var(--ok); }
.auto-chain-dep.started,
.auto-chain-dep.running { border-left-color: var(--warn); }
.auto-chain-dep.error,
.auto-chain-dep.failed { border-left-color: var(--err); }
.auto-chain-dep.skipped { border-left-color: var(--muted); opacity: 0.75; }
.auto-chain-dep.clickable { cursor: pointer; }
.auto-chain-dep.clickable:hover { background: rgba(255, 255, 255, 0.06); }
.auto-chain-dep strong {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.1rem;
}
.auto-chain-dep .dep-meta {
  color: var(--muted);
  font-size: 0.68rem;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: 0.78rem;
  min-width: 160px;
}
.step.done { border-color: var(--ok); }
.step.started { border-color: var(--accent); }
.step.pending { opacity: 0.7; }
.log {
  background: #111113;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem;
  font-size: 0.72rem;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
}
footer { margin-top: 0.8rem; font-size: 0.68rem; color: var(--muted); }

.clickable { cursor: pointer; }
.clickable:hover { border-color: var(--accent) !important; }
.card.clickable:hover .val { color: var(--accent); }
tr.clickable:hover td { background: #2b2b30; }
tr.tb-news-row.selected td {
  background: #2f3d52;
  box-shadow: inset 3px 0 0 var(--accent);
}
.badge.clickable { cursor: pointer; text-decoration: underline dotted; }

.drawer { position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: flex-end; }
.drawer.hidden { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.drawer-panel {
  position: relative;
  width: min(520px, 100vw);
  min-width: 360px;
  max-width: calc(100vw - 24px);
  height: 100%;
  background: var(--card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.35);
}
.drawer-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  z-index: 2;
}
.drawer-resize-handle:hover {
  background: rgba(158, 200, 240, 0.15);
}
.drawer-zoom-toolbar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0 0.5rem;
  font-size: 0.75rem;
}
.drawer-zoom-label {
  min-width: 3rem;
  text-align: center;
  color: var(--muted);
}
.drawer-zoom-surface {
  flex: 1;
  overflow: auto;
  touch-action: pinch-zoom;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #111113;
  min-height: 200px;
}
.drawer-zoom-inner {
  transform-origin: top left;
  padding: 0.5rem;
}
.match-drawer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.match-drawer-news,
.match-drawer-doc-list {
  margin: 0;
  padding-left: 1.1rem;
}
.match-drawer-news li {
  margin-bottom: 0.65rem;
}
.match-drawer-doc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.45rem;
}
.match-business-summary {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  line-height: 1.35;
  max-width: 28rem;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.drawer-head h2 { margin: 0; font-size: 1.05rem; color: var(--text); }
.icon-btn {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
}
.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
}
.drawer-actions {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.drawer-actions button.primary {
  background: var(--primary-btn);
  border-color: var(--primary-btn-border);
  color: #fff;
}
.drawer-actions button.primary:hover {
  background: var(--primary-btn-hover);
  border-color: #3d78e0;
}
.detail-section { margin-bottom: 1rem; }
.detail-section h4 { margin: 0 0 0.35rem; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-kv { display: grid; grid-template-columns: 7rem 1fr; gap: 0.25rem 0.5rem; font-size: 0.82rem; }
.detail-kv dt { color: var(--muted); }
.detail-kv dd { margin: 0; }
.detail-log {
  background: #111113;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.72rem;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
}
.hit-preview-body {
  max-height: min(70vh, 560px);
  font-size: 0.78rem;
  line-height: 1.45;
}
.hit-preview-html {
  white-space: pre-wrap;
  word-break: break-word;
}
.hit-preview-html mark.hit-mark,
.hit-preview-body mark.hit-mark {
  background: #f0c040;
  color: #1a1200;
  padding: 0 0.12em;
  border-radius: 2px;
}
.hit-preview-hi-note { margin: 0 0 0.5rem; font-size: 0.75rem; }
.hit-preview-meta { margin-bottom: 0.65rem; }
.ir-search-card .ir-primary-row { margin-top: 0.35rem; }
.ir-detail-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.ir-preview-panel { margin-top: 0.5rem; }
.ir-preview-body { max-height: min(65vh, 520px); }
.ir-pdf-viewer-host {
  flex: 1;
  min-height: min(62vh, 560px);
  display: flex;
  flex-direction: column;
}
.ir-pdf-frame,
.ir-pdf-viewer-host .nikkei-pdf-frame {
  flex: 1;
  width: 100%;
  min-height: min(58vh, 520px);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #0f1013;
}
.shikiho-detail .ir-pdf-viewer-host { margin-top: 0.35rem; }
.ir-advanced-filters select {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  padding: 0.22rem 0.4rem;
  font-size: 0.76rem;
}
.ir-strategy-only { display: inline-flex; align-items: center; gap: 0.35rem; }
.unified-ir-layout { margin-top: 0.5rem; }
.match-hit-row.clickable { cursor: pointer; }
.match-hit-row.clickable:hover td { background: rgba(96, 165, 250, 0.08); }
.detail-list { list-style: none; padding: 0; margin: 0; }
.detail-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.detail-list li:hover { color: var(--accent); }
.diagnosis {
  background: #3d3218;
  border: 1px solid var(--warn);
  color: var(--warn);
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}
.mod.clickable { cursor: pointer; }
.mod.clickable:hover { border-color: var(--accent); }
.step.clickable { cursor: pointer; }

.workspace {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.workspace.hidden { display: none; }
.workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
}
.workspace-head h2 { margin: 0; font-size: 1rem; color: var(--accent); }
.workspace-body { padding: 0.75rem 1rem 1rem; max-height: 70vh; overflow: auto; }
.workspace-panels-host {
  display: none;
  padding: 0;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}
.workspace-panel[hidden] { display: none !important; }
.workspace.panels-mode .workspace-body { display: none !important; }
.workspace.panels-mode .workspace-panels-host { display: flex; flex-direction: column; }
.workspace-only #workspace.panels-mode {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.workspace-only .workspace-panels-host {
  max-height: none;
}
.workspace-only #workspace.panels-mode .workspace-panels-host {
  flex: 1 1 auto;
  height: 0;
  max-height: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.workspace-only #workspace.panels-mode .workspace-panel:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.workspace-only #workspace-panels-host .comps-hub,
.workspace-only #workspace-panels-host .brp-hub,
.workspace-only #workspace-panels-host .comps-hub-panel,
.workspace-only #workspace-panels-host .comps-ai-embed {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
}
.workspace-only #workspace-panels-host .comps-embed-frame {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
}
body.workspace-only {
  padding: 0;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.workspace-only > .home-summary {
  order: 1;
  flex-shrink: 0;
}
body.workspace-only > #ma-service-guardian-section {
  order: 2;
  flex-shrink: 0;
  margin: 0;
}
body.workspace-only > #workspace {
  order: 3;
}
body.workspace-only > #ma-llm-queue-section {
  order: 4;
  flex-shrink: 0;
  margin: 0;
  border-top: 1px solid rgba(74, 163, 204, 0.35);
  background: rgba(12, 16, 22, 0.96);
  z-index: 950;
}
body.workspace-only .ma-service-guardian-bar {
  border: none;
  border-bottom: 1px solid rgba(120, 140, 160, 0.25);
  border-radius: 0;
  margin: 0;
  padding: 0.2rem 0.55rem;
  background: rgba(20, 24, 30, 0.92);
  font-size: 0.72rem;
  line-height: 1.25;
}
body.workspace-only .ma-svc-guard-head {
  margin: 0;
  gap: 0.25rem 0.4rem;
  flex-wrap: nowrap;
}
body.workspace-only .ma-svc-guard-label {
  font-size: 0.72rem;
  font-weight: 600;
}
body.workspace-only .ma-svc-guard-summary {
  font-size: 0.72rem;
}
body.workspace-only .ma-svc-guard-inline {
  font-size: 0.68rem;
  max-width: min(40vw, 360px);
}
body.workspace-only .ma-svc-guard-refresh-btn {
  font-size: 0.68rem;
  padding: 0.08rem 0.35rem;
}
body.workspace-only .ma-svc-guard-chips,
body.workspace-only .ma-svc-guard-details {
  display: none !important;
}
body.workspace-only .ma-svc-guard-alerts:not(.hidden) {
  margin: 0.15rem 0 0;
  padding: 0.25rem 0.4rem;
  font-size: 0.68rem;
}
body.workspace-only .ma-svc-guard-expand-btn {
  font-size: 0.68rem;
  padding: 0.08rem 0.35rem;
}
body.workspace-only.ma-ops-guard-expanded .ma-svc-guard-chips,
body.workspace-only.ma-ops-guard-expanded .ma-svc-guard-details {
  display: block !important;
}
body.workspace-only.ma-ops-guard-expanded .ma-service-guardian-bar {
  padding-bottom: 0.35rem;
}
body.workspace-only .ma-llm-queue-section {
  max-height: min(46vh, 420px);
}
body.workspace-only .ma-llm-queue-panel:not([open]) {
  padding: 0.28rem 0.55rem;
}
body.workspace-only .ma-llm-queue-panel[open] {
  padding: 0.35rem 0.55rem 0.5rem;
  max-height: min(44vh, 400px);
  overflow: auto;
}
body.workspace-only .ma-llm-queue-summary {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 0;
  color: #9fd4ff;
}
body.workspace-only .ma-llm-queue-panel:not([open]) .ma-llm-queue-note,
body.workspace-only .ma-llm-queue-panel:not([open]) .ma-llm-queue-columns,
body.workspace-only .ma-llm-queue-panel:not([open]) .ma-llm-queue-actions {
  display: none;
}
body.workspace-only .ma-llm-queue-panel[open] .ma-llm-queue-dock-hint {
  display: none;
}
body.workspace-only .ma-llm-queue-note {
  font-size: 0.68rem;
  line-height: 1.3;
  margin: 0.1rem 0 0.25rem;
}
body.workspace-only .ma-llm-queue-body,
body.workspace-only .ma-llm-inflight-table,
body.workspace-only .ma-llm-dispatch-table {
  font-size: 0.76rem;
  line-height: 1.35;
}
body.workspace-only .ma-llm-queue-section-title {
  font-size: 0.72rem;
  margin: 0.15rem 0 0.1rem;
}
body.workspace-only .ma-llm-queue-col-dispatch {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
body.workspace-only .ma-llm-queue-body-scroll {
  overflow-y: auto;
  min-height: 0;
}
body.workspace-only > .top {
  flex-shrink: 0;
  margin-bottom: 0;
}
.workspace-only #summary-hubs,
.workspace-only #summary-tail,
.workspace-only .home-modules,
.workspace-only > .grid,
.workspace-only > footer {
  display: none !important;
}
.workspace-only .home-summary-tail-row {
  display: flex !important;
  flex-shrink: 0;
  margin-bottom: 0;
  gap: 0;
}
.workspace-only .home-summary-tail-row .workspace-tabs--inline {
  flex: 1 1 auto;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #0d0d0f;
  min-height: auto;
}
.workspace-only #workspace {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: auto;
  z-index: 900;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.workspace-only #workspace .workspace-head {
  flex-shrink: 0;
}
.workspace-only #workspace .workspace-body {
  flex: 1 1 auto;
  height: 0;
  max-height: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.workspace-only #workspace.news-mode .workspace-body {
  flex: 1 1 auto;
  height: 0;
  max-height: none;
  overflow: hidden;
}
.workspace-only #workspace-body > .news-shell,
.workspace-only #workspace-body > .tb-news-shell {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
}
.workspace.news-mode { max-height: none; }
.workspace.news-mode .workspace-body {
  padding: 0;
  overflow: hidden;
}
body:not(.workspace-only) .workspace.news-mode .workspace-body {
  max-height: calc(100vh - 11rem);
}
.news-hub {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 12rem);
}
.workspace-only .news-hub {
  height: 100%;
  flex: 1 1 auto;
}
.news-hub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem 0.55rem;
  border-bottom: 1px solid var(--border);
  background: #121214;
  flex-shrink: 0;
}
.news-hub-tab {
  border: 1px solid var(--border);
  background: #1e1e22;
  color: var(--muted);
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.news-hub-tab:hover {
  color: var(--text);
  border-color: #4a4a54;
}
.news-hub-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: #2a2a30;
}
.news-hub-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.news-hub-panel > .news-shell,
.news-hub-panel > .tb-news-shell,
.news-hub-panel > .news-hub-overview,
.news-hub-panel > .news-ai-embed {
  flex: 1;
  min-height: 0;
  height: 100%;
}
.news-hub-overview {
  overflow-y: auto;
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.news-hub-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.news-hub-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.news-hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}
.news-hub-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: #16161a;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 12rem;
  max-height: min(72vh, 36rem);
}
.news-hub-card h3 {
  margin: 0;
  font-size: 0.95rem;
}
.news-hub-card-body {
  flex: 1 1 auto;
  min-height: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-hub-card-meta {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
}

.news-headline-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(58vh, 28rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.news-headline-feed li {
  margin: 0;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--border, rgba(128, 128, 128, 0.2));
}

.news-headline-feed li:last-child {
  border-bottom: none;
}

.news-headline-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary-btn);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
  text-decoration: none;
}

.news-headline-link:hover {
  text-decoration: underline;
}

button.news-headline-link {
  font-family: inherit;
}

.news-headline-plain {
  font-size: 0.82rem;
  color: var(--text);
}

.news-headline-empty {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}

.news-ai-embed {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.news-ai-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: #121214;
}
.research-embed-frame,
.comps-embed-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: none;
  background: #0a0a0a;
}
.brp-embed-stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.brp-embed-frame-tab.hidden {
  display: none;
}
.brp-embed-stack .brp-embed-frame-tab {
  flex: 1 1 auto;
  min-height: 0;
}
.comps-hub {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
}
.comps-hub-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.comps-ai-embed {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
}
.comps-ai-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #2a2a2a;
  background: #141414;
}
.comps-ai-embed--down {
  padding: 1.5rem;
}
.workspace.comps-mode,
.workspace.brp-mode,
.workspace.mail-proofread-mode,
.workspace.contract-review-mode { max-height: none; }
.workspace-tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: #0d0d0f;
  min-width: 0;
}
.workspace-tabs--inline {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  align-items: center;
  align-content: flex-start;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  min-height: auto;
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.55rem;
}
.workspace-tabs--inline:empty {
  display: none;
}
.workspace-tabs:empty {
  display: none;
}
.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 16rem;
  padding: 0.32rem 0.45rem 0.32rem 0.65rem;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #171719;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  font-size: calc(1em + 1pt);
}
.workspace-tab.active {
  border-color: var(--accent);
  background: #202533;
  color: var(--fg);
}
.workspace-tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
}
.workspace-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.9rem;
}
.workspace-tab-close:hover {
  background: rgba(255, 255, 255, 0.12);
}
.workspace.comps-mode .workspace-body,
.workspace.brp-mode .workspace-body,
.workspace.mail-proofread-mode .workspace-body,
.workspace.contract-review-mode .workspace-body {
  padding: 0;
  overflow: hidden;
}
.workspace.comps-mode .workspace-panels-host,
.workspace.brp-mode .workspace-panels-host,
.workspace.teaser-mode .workspace-panels-host,
.workspace.mail-proofread-mode .workspace-panels-host,
.workspace.contract-review-mode .workspace-panels-host {
  padding: 0;
  overflow: hidden;
}
.workspace-only #workspace.comps-mode .workspace-body,
.workspace-only #workspace.brp-mode .workspace-body,
.workspace-only #workspace.mail-proofread-mode .workspace-body,
.workspace-only #workspace.contract-review-mode .workspace-body {
  flex: 1 1 auto;
  height: 0;
  max-height: none;
  overflow: hidden;
}
.workspace-only #workspace.comps-mode .workspace-panels-host,
.workspace-only #workspace.brp-mode .workspace-panels-host,
.workspace-only #workspace.teaser-mode .workspace-panels-host,
.workspace-only #workspace.mail-proofread-mode .workspace-panels-host,
.workspace-only #workspace.contract-review-mode .workspace-panels-host {
  flex: 1 1 auto;
  height: 0;
  max-height: none;
  overflow: hidden;
}
.workspace-only #workspace-body > .comps-hub,
.workspace-only #workspace-body > .brp-hub,
.workspace-only #workspace-panels-host .comps-hub,
.workspace-only #workspace-panels-host .brp-hub {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
}
#contract-review-embed-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #0a0a0a;
  display: block;
}
.news-ai-embed--down {
  padding: 1.5rem;
}
.morning-split-shell {
  grid-template-columns: minmax(260px, 32%) 10px minmax(0, 1fr);
}
.morning-split-shell .news-sidebar {
  border-right: none;
  min-width: 0;
}
.morning-model-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 0.35rem;
}
.morning-model-select {
  max-width: 11rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
}
.news-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  min-height: 0;
  height: calc(100vh - 12rem);
}
@media (max-width: 900px) {
  .news-shell { grid-template-columns: 1fr; height: auto; }
  body.workspace-only .news-shell,
  body.workspace-only .tb-news-shell {
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
  }
  .tb-news-shell { grid-template-columns: 1fr 8px 1fr; height: calc(100vh - 12rem); }
  .tb-news-left { border-right: 1px solid var(--border); border-bottom: none; }
  .tb-news-list-wrap { max-height: none; }
  .nikkei-split-shell { grid-template-columns: minmax(260px, 28%) 10px minmax(0, 1fr); }
  .nikkei-splitter { display: block; }
  .tb-splitter { display: block; }
}
.news-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #17171a;
  min-height: 0;
}
.news-sidebar-head {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.news-search-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.news-search-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
}
.news-sidebar-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border);
}
.news-sidebar-section:last-child { border-bottom: none; flex: 1.2; }
.news-sidebar-section h4 {
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #121214;
}
.news-scroll {
  overflow-y: auto;
  flex: 1;
  padding: 0.35rem 0.5rem;
}
.edition-list, .article-list { list-style: none; margin: 0; padding: 0; }
.edition-list li, .article-list li {
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  border: 1px solid transparent;
  margin-bottom: 0.25rem;
}
.edition-list li:hover, .edition-list li.active,
.article-list li:hover, .article-list li.active {
  border-color: var(--accent);
  background: #2b2b30;
}
.article-list li .art-title { font-weight: 600; line-height: 1.3; }
.article-list li .art-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.hidden { display: none !important; }
#morning-article-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
}
#morning-article-panel .news-article-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.news-article-view .article-summary {
  white-space: pre-wrap;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}
.news-source-text {
  margin: 0.5rem 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  background: rgba(0, 0, 0, 0.12);
}
.news-source-text summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.news-source-body {
  max-height: 420px;
  overflow: auto;
  font-size: 0.82rem;
  margin: 0;
}
.morning-reader-embed {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  height: 100%;
  overflow: hidden;
}
.morning-reader-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #2a2a2a;
  background: #141414;
}
.morning-reader-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: none;
  background: #0a0a0a;
}
.news-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #141414;
}
.news-shell .news-sidebar {
  background: #141414;
}
.news-shell .news-main,
.news-shell #morning-article-panel .news-article-view {
  background: #0a0a0a;
  color: #e8e8e8;
}
.tb-news-shell {
  min-height: 0;
  height: calc(100vh - 12rem);
}
.news-hub-panel .tb-news-shell {
  height: 100%;
}
.news-hub-panel .tb-news-shell,
.news-hub-panel .nikkei-split-shell {
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
}
.news-hub-panel .tb-split-shell {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: 1fr;
}
.news-hub-panel .tb-news-left {
  min-height: 0;
  height: 100%;
}
.news-hub-panel .tb-news-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}
.workspace-only .nikkei-split-shell {
  min-height: 0;
  height: 100%;
}
.workspace-only .nikkei-split-shell > .tb-news-left,
.workspace-only .nikkei-split-shell > .tb-news-main {
  height: 100%;
  min-height: 0;
  align-self: stretch;
}
.tb-split-shell {
  grid-template-columns: minmax(260px, 50%) 10px minmax(0, 1fr);
}
.tb-news-left {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: #17171a;
}
.tb-news-left-head {
  padding: 0.65rem 0.75rem 0.2rem;
  border-bottom: 1px solid var(--border);
}
.tb-news-list-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
}
.tb-news-list-wrap table {
  width: 100%;
  margin: 0;
}
.tb-news-main {
  min-height: 0;
  overflow: hidden;
}
.tb-news-main .news-article-view {
  height: 100%;
  overflow-y: auto;
}
.ws-split-handle,
.tb-splitter,
.nikkei-splitter {
  width: 10px;
  min-height: 12rem;
  border-radius: 6px;
  background: #3a3a42;
  border: 1px solid #54545d;
  cursor: col-resize;
  align-self: stretch;
  pointer-events: auto;
  z-index: 8;
  touch-action: none;
  flex-shrink: 0;
}
.ws-split-handle:hover,
.tb-splitter:hover,
.nikkei-splitter:hover {
  background: #4d6a8a;
}
body.ws-split-dragging {
  cursor: col-resize !important;
  user-select: none !important;
}
body.ws-split-dragging * {
  cursor: col-resize !important;
}
.nikkei-pdf-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nikkei-pdf-detail-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 0.15rem 0.25rem 0;
  overflow: hidden;
}
.nikkei-pdf-viewer-stack {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  --nikkei-excerpt-h: 96px;
}
.nikkei-pdf-detail-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin-bottom: 0.2rem;
  flex-shrink: 0;
}
.nikkei-pdf-detail-title {
  flex: 1;
  min-width: 8rem;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nikkei-pdf-detail-bar .secondary {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
}
.nikkei-hit-nav-label {
  font-size: 0.72rem;
  margin-right: 0.15rem;
}
.nikkei-dir-toolbar {
  flex-direction: column;
  align-items: stretch;
}
.nikkei-dir-current {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
  word-break: break-all;
  max-height: 2.7em;
  overflow: hidden;
}
.nikkei-pdf-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  background: #0f1013;
}
.nikkei-vsplit-handle {
  flex: 0 0 8px;
  cursor: row-resize;
  background: #3a3a42;
  border-top: 1px solid #54545d;
  border-bottom: 1px solid #54545d;
  z-index: 3;
}
.nikkei-vsplit-handle:hover {
  background: #4d6a8a;
}
.nikkei-pdf-excerpt-panel {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  max-height: var(--nikkei-excerpt-h, 96px);
  min-height: 0;
  overflow: hidden;
  background: #17171a;
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
}
.nikkei-pdf-excerpt-panel.nikkei-excerpt-hidden {
  display: none;
  max-height: 0;
  border: none;
  padding: 0;
  margin: 0;
}
.nikkei-excerpt-head {
  flex-shrink: 0;
  padding: 0.2rem 0.45rem;
  font-size: 0.62rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.nikkei-excerpt-body {
  flex: 0 1 auto;
  overflow: auto;
  padding: 0.3rem 0.45rem 0.25rem;
  font-size: 0.65rem;
  line-height: 1.35;
  max-height: calc(var(--nikkei-excerpt-h, 96px) - 1.35rem);
}
mark.tb-hl {
  background: rgba(255, 230, 0, 0.42);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
mark.tb-hl-active {
  background: rgba(255, 120, 0, 0.58);
  box-shadow: 0 0 0 2px rgba(255, 80, 0, 0.85);
}
.tb-hit-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.35rem 0 0.5rem;
}
.tb-hit-nav .secondary {
  font-size: 0.68rem;
  padding: 0.18rem 0.45rem;
}
mark.nikkei-hl-text {
  background: #f5d547;
  color: #111;
  padding: 0 0.05rem;
  border-radius: 2px;
}
body.nikkei-vsplit-dragging {
  cursor: row-resize !important;
  user-select: none !important;
}
body.nikkei-vsplit-dragging * {
  cursor: row-resize !important;
}
.nikkei-pdf-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  background: #141418;
  display: block;
}
.nikkei-split-shell {
  grid-template-columns: minmax(260px, 28%) 10px minmax(0, 1fr);
}
.nikkei-split-shell > .tb-news-left {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  transition: opacity 0.12s ease;
}
.nikkei-split-shell.nikkei-left-hidden > .tb-news-left {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.nikkei-split-shell .tb-news-left.nikkei-left-collapsed {
  visibility: hidden;
}
.nikkei-split-shell > .tb-news-main {
  min-height: 0;
  min-width: 0;
}
.nikkei-file-list-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.nikkei-split-shell .nikkei-compact-left {
  font-size: 0.62rem;
  line-height: 1.3;
}
.nikkei-split-shell .nikkei-compact-left table {
  font-size: 0.62rem;
}
.nikkei-split-shell .nikkei-compact-left th,
.nikkei-split-shell .nikkei-compact-left td {
  padding: 0.2rem 0.3rem;
}
.nikkei-split-shell .nikkei-compact-left .tb-news-left-head {
  padding: 0.35rem 0.4rem 0.1rem;
}
.nikkei-split-shell .nikkei-compact-meta {
  margin: 0 0 0.25rem;
  font-size: 0.62rem;
}
.nikkei-split-shell .nikkei-compact-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
  align-items: center;
}
.nikkei-split-shell .nikkei-compact-toolbar .secondary {
  font-size: 0.6rem;
  padding: 0.15rem 0.32rem;
}
.nikkei-split-shell .nikkei-compact-input {
  min-width: 0;
  flex: 1 1 6rem;
  font-size: 0.62rem;
  padding: 0.18rem 0.32rem;
}
.nikkei-split-shell .nikkei-compact-path {
  flex-basis: 100%;
}
.nikkei-match-snippet {
  font-size: 0.58rem;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 0.15rem;
  word-break: break-word;
}
.tb-news-main.nikkei-pdf-detail-host {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.news-main-toolbar {
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.news-article-view {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.1rem;
}
.news-article-view h3 { margin: 0 0 0.5rem; font-size: 1.1rem; line-height: 1.35; }
.news-article-view .meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.news-article-view .body {
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.news-empty {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.5rem;
}
.workspace-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.workspace.teaser-mode { max-height: none; }
.workspace.teaser-mode .workspace-body {
  max-height: calc(100vh - 11rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.workspace-only #workspace.teaser-mode .workspace-body {
  flex: 1 1 auto;
  height: 0;
  max-height: none;
  min-height: 0;
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* panels-mode: content lives in #workspace-teaser panel (workspace-body is hidden) */
.workspace.teaser-mode.panels-mode .workspace-panel:not([hidden]),
.workspace-only #workspace.teaser-mode.panels-mode .workspace-panel:not([hidden]) {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.workspace.teaser-mode.panels-mode .workspace-panel .teaser-workspace,
.workspace-only #workspace.teaser-mode.panels-mode .workspace-panel .teaser-workspace {
  min-height: min-content;
  padding: 0.75rem 1rem 1.25rem;
}
.teaser-deal-list-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
}
.buyside-mail-status {
  margin-top: 0.65rem;
  max-height: 12rem;
}
.buyside-mail-imap-missing {
  color: #b45309;
  font-weight: 600;
}
.buyside-mail-imap-ok {
  color: #15803d;
  font-weight: 600;
}
.buyside-mail-check-col {
  width: 2.5rem;
  text-align: center;
  vertical-align: middle;
}
#buyside-mail-table .buyside-mail-pick,
#buyside-mail-pick-all {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--primary-btn);
}
#buyside-mail-table tr.buyside-mail-row--selected td {
  color: var(--primary-btn);
  font-weight: 600;
}
#buyside-mail-table tr.buyside-mail-row--selected td:first-child {
  color: inherit;
  font-weight: normal;
}
.teaser-jp-check-col,
.teaser-jp-check-cell {
  width: 2.5rem;
  text-align: center;
  vertical-align: middle;
}
.teaser-jp-check-cell input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}
.teaser-jp-apply-cell,
.teaser-job-delete-cell {
  white-space: nowrap;
  vertical-align: middle;
  min-width: 7.5rem;
}
.teaser-jp-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}
.teaser-jp-row-actions .secondary {
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
}
.teaser-jp-edit-status {
  min-height: 1rem;
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
  max-width: 12rem;
  word-break: break-word;
}
.teaser-jp-edit-status.is-error {
  color: #f08080;
}
.teaser-jp-edit-row .secondary,
.teaser-jp-edit-row .linkish {
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
.teaser-jp-edit-project-cell {
  min-width: 11rem;
}
.teaser-edit-folder-row {
  margin-top: 0.15rem;
}
.teaser-edit-folder-row .teaser-pick-folder {
  flex-shrink: 0;
  min-width: 3.2rem;
}
.teaser-section .table-scroll:has(.teaser-jp-edit-row) {
  padding-bottom: 0.75rem;
}
.teaser-jp-edit-row input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}
.teaser-edit-path-row { display: flex; gap: 0.25rem; align-items: center; margin-bottom: 0.15rem; }
.teaser-edit-path-row input[type="text"] {
  width: auto;
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.teaser-edit-folder-row { position: relative; z-index: 3; }
.teaser-delete-job,
.teaser-delete-jp,
.teaser-delete-registry {
  color: #f08080;
}
.teaser-delete-job:hover,
.teaser-delete-jp:hover,
.teaser-delete-registry:hover {
  color: #ffb4b4;
}
.teaser-workspace .teaser-section { margin-bottom: 1.25rem; }
.teaser-pipeline-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}
.teaser-pipeline-run {
  padding: 0.55rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.teaser-pipeline-run-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.teaser-pipeline-progress {
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.teaser-pipeline-progress > div {
  height: 100%;
  background: linear-gradient(90deg, #6a9fd8, #8fd4ff);
  transition: width 0.35s ease;
}
.teaser-pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.teaser-pipeline-msg {
  font-size: 0.82rem;
  line-height: 1.4;
}
.teaser-workspace .teaser-section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
}
.teaser-drop-zone {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 2px dashed #4a5568;
  border-radius: 10px;
  background: #1a1d24;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.teaser-drop-zone:hover,
.teaser-drop-zone.dragover {
  border-color: var(--accent);
  background: #222836;
}
.teaser-drop-zone.uploading {
  opacity: 0.65;
  pointer-events: none;
}
.teaser-drop-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  background: #2a3140;
  color: #e85d5d;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.teaser-drop-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
}
.teaser-drop-status {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
}
.teaser-drop-status.is-error { color: #f0a0a0; }
.teaser-convert-section { margin-top: 0.25rem; }
.teaser-convert-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.teaser-convert-toolbar h3 { margin: 0; }
.teaser-model-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.teaser-llm-select {
  max-width: 14rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
}
.teaser-output-dir-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.teaser-output-dir-label {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.teaser-output-dir-input {
  flex: 1 1 12rem;
  min-width: 10rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.25rem 0.45rem;
}
.matching-list-row-clickable { cursor: pointer; }
.matching-list-row-clickable:hover { background: rgba(40, 90, 140, 0.06); }
.matching-list-has-registered-bank td {
  background: rgba(52, 120, 90, 0.07);
}
.matching-list-detail-table th.match-th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.matching-list-detail-table th.match-th-sortable:hover {
  color: var(--accent, #7eb6ff);
}
.matching-list-open-candidate {
  text-align: left;
  font: inherit;
  padding: 0;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
.matching-list-open-candidate:hover { text-decoration: underline; }
.matching-list-open-candidate-cell { cursor: pointer; }
.match-drawer-section-title {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.match-candidate-biz { margin: 0 0 0.5rem; line-height: 1.45; }
.match-cbma-summary-box {
  background: rgba(120, 160, 220, 0.08);
  border: 1px solid rgba(120, 160, 220, 0.25);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
}
.match-cbma-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.match-cbma-points {
  margin: 0.35rem 0 0.25rem;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.4;
}
.match-cbma-points li { margin-bottom: 0.15rem; }
.matching-list-project-cell .matching-list-open-detail {
  text-align: left;
  font: inherit;
  padding: 0;
}
.matching-list-detail-table th:first-child,
.matching-list-detail-table td:first-child {
  width: 2rem;
  text-align: center;
}

.teaser-table th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
  text-align: left;
}
.teaser-table td { vertical-align: top; padding: 0.35rem 0.5rem; }
.teaser-table code.fname { font-size: 0.72rem; word-break: break-all; }
.link-cell .teaser-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0 0.35rem 0 0;
  text-decoration: underline;
}
.link-cell .teaser-link:hover { color: #7eb8ff; }
.muted-cell, .muted-inline { color: var(--muted); font-size: 0.78rem; }
.msg-cell { max-width: 28rem; word-break: break-word; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.teaser-workspace .teaser-panel-scroll {
  max-height: min(36vh, 360px);
  overflow: auto;
  overscroll-behavior: contain;
}
.teaser-workspace .teaser-panel-scroll-md {
  max-height: min(42vh, 420px);
  overflow: auto;
  overscroll-behavior: contain;
}
.teaser-workspace .teaser-panel-scroll-lg {
  max-height: min(48vh, 460px);
  overflow: auto;
  overscroll-behavior: contain;
}
.pill.ok { font-size: 0.65rem; padding: 0.1rem 0.35rem; border-radius: 4px; background: #1a3d2a; color: #8fd4a8; }
.match-table { width: 100%; font-size: 0.78rem; }
.match-table th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.matching-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.matching-column {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  background: #161618;
  min-height: 220px;
}
.matching-column h3 {
  margin: 0 0 0.45rem;
  font-size: 0.86rem;
  color: var(--accent);
}
.matching-list {
  margin: 0;
  padding-left: 1rem;
  max-height: 30vh;
  overflow: auto;
}
.matching-list li {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}
.matching-layout-advanced {
  grid-template-columns: minmax(320px, 0.95fr) minmax(520px, 1.65fr);
}
.matching-layout-resizable {
  grid-template-columns: 380px 8px 1fr;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.matching-top-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #161618;
  margin-bottom: 0.3rem;
  overflow-x: auto;
  flex-shrink: 0;
}
.matching-top-bar-group {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.5rem;
  flex-shrink: 0;
}
.matching-top-bar-actions {
  margin-left: auto;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.match-file-drop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 8.5rem;
  max-width: 14rem;
  padding: 0.28rem 0.5rem;
  border: 1px dashed #4a5568;
  border-radius: 6px;
  background: #1e1e24;
  cursor: pointer;
  flex-shrink: 0;
}
.match-file-drop:hover,
.match-file-drop.dragover {
  border-color: var(--accent);
  background: #252a35;
}
.match-file-drop.has-files {
  border-style: solid;
  border-color: #3d5a7a;
}
.match-file-drop.uploading {
  opacity: 0.65;
  pointer-events: none;
}
.match-file-drop-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}
.match-file-drop-names {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.2rem;
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
}
.match-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.12rem 0.25rem 0.12rem 0.4rem;
  border-radius: 4px;
  background: #2a2a32;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}
.match-file-chip-clear {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 0.85rem;
  line-height: 1;
}
.match-file-chip-clear:hover { color: var(--text); }
.match-file-change-btn { margin-left: 0.25rem; padding: 0.1rem 0.35rem; font-size: 0.68rem; }

.match-kw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 18rem;
  text-align: left;
  border: 1px solid var(--border);
  background: #25252c;
  color: var(--text);
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
  font-size: 0.76rem;
  cursor: pointer;
  flex-shrink: 1;
  min-width: 9rem;
}
.match-kw-toggle:hover {
  border-color: var(--accent);
}
.match-kw-toggle-label {
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}
.match-kw-summary {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #b8bcc8;
}
.match-settings-compact {
  flex-shrink: 0;
  margin-bottom: 0.3rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #1a1a1e;
  min-height: 0;
}
.match-settings-kw-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(240px, 1.1fr);
  gap: 0.4rem 0.55rem;
  align-items: start;
  margin-bottom: 0.25rem;
}
.match-kw-ai-section {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
  min-width: 0;
}
.match-kw-ai-section .match-kw-create-btn {
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.match-kw-ai-section .match-kw-ai-block {
  flex: 1 1 auto;
}
.match-kw-ai-block,
.match-kw-unified-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.match-kw-unified-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.match-kw-col-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}
.match-kw-copy-btn {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 0.12rem 0.35rem;
}
.match-unified-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}
.match-unified-inline input {
  flex: 1 1 5.5rem;
  min-width: 4.5rem;
  font-size: 0.74rem;
  padding: 0.16rem 0.3rem;
  background: #141418;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.match-unified-advanced-details {
  margin-top: 0.1rem;
  font-size: 0.7rem;
}
.match-unified-advanced-details > summary {
  cursor: pointer;
  color: #9aa3b5;
  user-select: none;
  list-style: none;
}
.match-unified-advanced-details > summary::-webkit-details-marker {
  display: none;
}
.match-unified-advanced-compact {
  margin-top: 0.2rem;
  padding-top: 0.2rem;
}
.match-unified-filters-inline {
  gap: 0.2rem 0.35rem !important;
}
.match-unified-advanced-compact .shikiho-filter-num,
.match-unified-advanced-compact .shikiho-filter-text input {
  font-size: 0.72rem;
  padding: 0.12rem 0.25rem;
}
.match-keywords-hint {
  font-size: 0.68rem;
  margin-top: 0.1rem;
}
.match-kw-textarea {
  width: 100%;
  min-height: 5.2rem;
  max-height: none;
  height: auto;
  font-size: 0.74rem;
  line-height: 1.35;
  padding: 0.2rem 0.35rem;
  resize: vertical;
  overflow: visible;
  field-sizing: content;
}
.match-kw-ai-block .match-kw-col-title,
.match-kw-unified-block .match-kw-col-title {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.match-settings-compact {
  overflow: visible;
}
.match-settings-kw-row {
  overflow: visible;
}
.match-unified-inline {
  flex-wrap: wrap;
}
.match-unified-inline input {
  min-width: 0;
  max-width: 100%;
}
.match-pipeline-badge {
  display: inline-block;
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.match-pipeline-badge.matching {
  background: #2a3a2a;
  border: 1px solid #4a6a4a;
  color: #9fd49f;
}
.match-pipeline-badge.unified {
  background: #2a2f3a;
  border: 1px solid #4a5a7a;
  color: #9fb8df;
}
.match-pipeline-cell {
  white-space: nowrap;
}
.match-list-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  font-size: 0.72rem;
}
.match-list-filter-bar input[type="search"],
.match-list-filter-bar input[type="number"] {
  font-size: 0.72rem;
  padding: 0.14rem 0.3rem;
  background: #141418;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 4.5rem;
}
.match-list-filter-bar input[type="search"] {
  min-width: 6rem;
  flex: 1 1 6rem;
  max-width: 10rem;
}
.match-filter-range {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}
.match-filter-range span {
  color: #888;
  font-size: 0.68rem;
}
.match-list-filter-bar button {
  font-size: 0.68rem;
  padding: 0.14rem 0.4rem;
  flex-shrink: 0;
}
.match-list-filter-bar select {
  font-size: 0.72rem;
  padding: 0.14rem 0.3rem;
  background: #141418;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  max-width: 11rem;
}
.match-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}
.match-folder-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 42rem;
  flex-wrap: wrap;
}
.match-teaser-file-select {
  font-size: 0.72rem;
  max-width: 16rem;
  padding: 0.14rem 0.3rem;
  background: #141418;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.match-selected-file-label {
  font-size: 0.72rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-kw-create-btn {
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
}
.match-selected-folder {
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}
.match-folder-chip {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #1e2430;
  border: 1px solid var(--border);
}
.match-workflow-panel {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #12151c;
}
.match-workflow-panel--empty {
  opacity: 0.92;
}
.match-workflow-head {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.match-workflow-steps {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.25rem 0.5rem;
}
.match-wf-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.68rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #0e1014;
}
.match-wf-step--done {
  border-color: #2d5a3a;
  background: #142018;
}
.match-wf-step--active {
  border-color: #4a6a9a;
  background: #151c28;
  box-shadow: 0 0 0 1px rgba(100, 150, 220, 0.25);
}
.match-wf-step--blocked {
  opacity: 0.55;
}
.match-wf-step-badge {
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
}
.match-workflow-meta {
  font-size: 0.66rem;
  margin-bottom: 0.35rem;
}
.match-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.match-workflow-note {
  font-size: 0.66rem;
  flex: 1 1 12rem;
}
.match-kw-hi {
  background: #5a4a12;
  color: #ffeaa0;
  padding: 0 0.1em;
  border-radius: 2px;
}
.match-th-sortable {
  cursor: pointer;
  user-select: none;
}
.match-th-sortable:hover .match-th-label {
  color: #9fd4ff;
}
.match-select-cell {
  text-align: center;
  width: 34px;
}
.match-select-head {
  text-align: center;
}
.match-select-head input[type="checkbox"] {
  cursor: pointer;
}
.match-saved-session-list {
  font-size: 0.72rem;
  max-width: 14rem;
  padding: 0.14rem 0.3rem;
  background: #141418;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.match-fin-cell {
  text-align: right;
  white-space: nowrap;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.match-fin-narrow {
  font-size: 0.66rem !important;
  padding: 0.12rem 0.2rem !important;
  max-width: 3.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.match-industry-cell {
  font-size: 0.66rem;
  max-width: 3.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-sources-cell {
  font-size: 0.72rem;
  min-width: 8rem;
}
.match-reason-cell {
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}
.match-row-ticker {
  display: block;
  font-size: 0.66rem;
  margin-top: 0.05rem;
}
.match-actions-cell {
  text-align: center;
  padding: 0 0.15rem !important;
}
.match-row-delete {
  font-size: 0.82rem;
  line-height: 1;
  padding: 0.1rem 0.35rem !important;
  min-width: 1.6rem;
  color: #e8a0a0;
}
.match-row-delete:hover {
  color: #ff6b6b;
  border-color: #a44;
}
@media (max-width: 900px) {
  .match-settings-kw-row {
    grid-template-columns: 1fr;
  }
}
.matching-results-full {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #161618;
  overflow: hidden;
}
.matching-results-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.matching-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  padding: 0.25rem 0.45rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.matching-results-head h3 {
  margin: 0;
  font-size: 0.8rem;
  color: var(--accent);
}
.matching-results-head-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
}
.matching-results-view-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.matching-results-view-actions .secondary {
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
}
.match-context-inventory {
  font-size: 0.8rem;
  color: var(--muted);
}
.matching-results-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.match-table-unified.match-table-col-resize {
  table-layout: fixed;
  width: 100%;
  min-width: 100%;
}
.matching-results-table-wrap {
  width: 100%;
}
.match-table-unified:not(.match-table-col-resize) {
  table-layout: fixed;
  width: 100%;
}
.match-table-col-resize.match-table-unified .match-reason-cell {
  max-width: none;
  white-space: normal;
  word-break: break-word;
}
.match-table-unified th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
}
.match-table-unified th:nth-child(5),
.match-table-unified .match-reason-cell {
  max-width: none;
}
.match-rank-cell {
  width: 2.5rem;
  text-align: center;
  font-weight: 600;
}
.match-company-cell {
  vertical-align: top;
  font-size: 0.8rem;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
}
.match-company-cell strong {
  font-weight: 600;
  display: block;
}
.match-table-unified .match-reason-cell {
  white-space: normal;
  word-break: break-word;
  font-size: 0.74rem;
  line-height: 1.4;
  vertical-align: top;
}
.match-sources-cell {
  vertical-align: top;
  font-size: 0.72rem;
}
.match-score-cell {
  width: 4.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.match-source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: flex-start;
}
.match-source-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.12rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #222228;
  color: var(--text);
  font-size: 0.68rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  line-height: 1.2;
}
.match-source-chip:hover {
  border-color: var(--accent);
}
.match-source-type {
  font-weight: 600;
  color: #9ec8f0;
}
.match-source-doc {
  color: #b8bcc8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}
.match-approach-cell {
  min-width: 6.5rem;
  width: auto;
  vertical-align: top;
  overflow: visible;
  word-break: break-word;
  white-space: normal;
}
.match-approach-banks {
  display: block;
  font-size: 0.74rem;
  line-height: 1.45;
  min-width: 0;
  word-break: break-word;
}
.match-approach-bank-text {
  color: var(--text);
}
.match-company-web {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: normal;
  margin-left: 0.15rem;
  vertical-align: baseline;
}
.match-approach-bank-link {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  text-align: left;
  color: #9ec8f0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.match-approach-bank-link:hover {
  color: #c5dff7;
}
.match-approach-bank {
  color: var(--text);
}
.match-approach-item {
  margin-bottom: 0.35rem;
  font-size: 0.74rem;
}
.match-approach-regional-fallback {
  margin-top: 0.2rem;
  font-size: 0.72rem;
}
.match-approach-regional-btn {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.7rem;
  text-align: left;
  color: var(--muted);
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: pointer;
}
.match-approach-regional-btn:hover {
  color: #9ec8f0;
}
.match-approach-regional-suggestion {
  color: #d9b36c;
}
.match-approach-regional-suggestion:hover {
  color: #eccb8f;
}
.match-approach-mail {
  display: inline-block;
  margin-top: 0.15rem;
}
.workspace-only #workspace-body > .matching-top-bar {
  flex-shrink: 0;
}
.workspace-only #workspace-body > .match-settings-compact {
  flex-shrink: 0;
  max-height: none;
  overflow: visible;
}
.workspace-only #workspace-body > .matching-results-full {
  flex: 1 1 auto;
  min-height: 0;
}
.workspace-only #workspace-body > .matching-workspace-toolbar {
  flex-shrink: 0;
}
.workspace-only #workspace-body > .matching-layout-resizable {
  flex: 1 1 auto;
  min-height: 0;
}
.workspace-only #workspace.matching-results-expanded #match-workflow-panel,
.workspace-only #workspace.matching-results-expanded .matching-top-bar,
.workspace-only #workspace.matching-results-expanded .match-settings-compact {
  display: none !important;
}
.workspace-only #workspace.matching-results-expanded #matching-right-panel {
  flex: 1 1 auto;
  min-height: 0;
}
body.matching-results-popout.workspace-only .home-summary-tail-row {
  display: none !important;
}
body.matching-results-popout.workspace-only #workspace .workspace-body {
  padding: 0.35rem 0.55rem 0.55rem;
}
body.matching-results-popout #matching-right-panel.matching-results-popout-panel {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 8px;
}
body.matching-results-popout #btn-match-results-popout,
body.matching-results-popout #btn-match-results-expand {
  display: none;
}
.matching-results-shell:fullscreen {
  background: #161618;
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0.55rem;
  box-sizing: border-box;
}
.matching-results-shell:fullscreen .matching-results-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.matching-results-shell:fullscreen .match-table-unified th {
  position: sticky;
  top: 0;
  z-index: 3;
}
.matching-column.matching-left {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.matching-column.matching-left > h3,
.matching-column.matching-left > .muted-inline,
.matching-column.matching-left > .sellside-breadcrumbs,
.matching-column.matching-left > .sellside-path-line,
.matching-column.matching-left > .matching-project-search {
  flex-shrink: 0;
}
.matching-column.matching-left .sellside-browser {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.matching-left-vstack {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0.15rem;
}
.matching-left-bottom-pane {
  padding-top: 0.35rem;
  border-top: 1px solid transparent;
}
.matching-left-footer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.75rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--border);
  padding-top: 0.4rem;
}
.panel-vstack {
  display: grid;
  min-height: 0;
  overflow: hidden;
}
.panel-vstack-pane {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.panel-vsplit-handle {
  height: 8px;
  min-height: 8px;
  background: #3a3a42;
  border-top: 1px solid #54545d;
  border-bottom: 1px solid #54545d;
  cursor: row-resize;
  flex-shrink: 0;
  touch-action: none;
}
.panel-vsplit-handle:hover {
  background: #4d6a8a;
}
body.panel-vsplit-dragging {
  cursor: row-resize !important;
  user-select: none;
}
body.panel-vsplit-dragging * {
  cursor: row-resize !important;
}
.matching-column.matching-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}
.matching-right-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100%;
}
.matching-right-tabs-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.matching-right-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  padding: 0.55rem 0.7rem 0.35rem;
  flex-shrink: 0;
}
.matching-right-head h3 {
  margin: 0;
  font-size: 0.86rem;
  color: var(--accent);
}
.matching-right-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.matching-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem 0.45rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #1a1a1e;
}
.matching-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: #25252c;
  color: var(--text);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  font-size: 0.76rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.matching-tab:hover {
  border-color: var(--accent);
}
.matching-tab.active {
  background: #2a3d52;
  border-color: var(--accent);
  color: #e8f4ff;
}
.matching-tab-badge {
  display: inline-block;
  min-width: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 8px;
  background: #3d5a7a;
  color: #fff;
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
}
.mod-notify-badge {
  display: inline-block;
  min-width: 1rem;
  margin-left: 0.35rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.62rem;
  line-height: 1.3;
  vertical-align: super;
  font-weight: 700;
}
.mod-notify-badge.hidden {
  display: none;
}
.matching-tab-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.matching-tab-panel {
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.matching-tab-panel.active {
  display: flex;
}
.matching-tab-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.55rem 0.7rem 0.75rem;
}
.matching-tab-panel-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.45rem 0.65rem 0.65rem;
}
.matching-tab-meta {
  margin-bottom: 0.35rem;
}
.matching-tab-card {
  margin: 0 0 0.4rem;
  flex-shrink: 0;
}
.matching-tab-table-wrap {
  flex: 1 1 auto;
  min-height: 12rem;
  max-height: min(62vh, calc(100% - 10rem));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #141418;
}
.match-hit-row .linkish {
  white-space: nowrap;
}
.match-evidence-block {
  margin-top: 0.35rem;
  padding-top: 0.3rem;
  border-top: 1px dashed var(--border);
}
.match-tier {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}
.match-tier-high {
  background: #1e4d2e;
  color: #b8f0c8;
}
.match-tier-mid {
  background: #3d4a1e;
  color: #e8f0b0;
}
.match-tier-review {
  background: #4a3d1a;
  color: #f0d8a8;
}
.match-tier-low {
  background: #4a2020;
  color: #f0b0b0;
}
.match-dims {
  font-size: 0.68rem;
  margin-top: 0.2rem;
}
.match-evidence-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.68rem;
  color: #b8bcc8;
}
.match-evidence-li {
  margin: 0.12rem 0;
}
.matching-tab-table-wrap .match-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.match-ai-queries-compact {
  min-height: 3.2rem;
  max-height: 5.5rem;
}
.match-reason-cell {
  max-width: 28rem;
  white-space: normal;
  word-break: break-word;
  font-size: 0.74rem;
  line-height: 1.35;
}
.match-table-scroll-x {
  overflow-x: auto;
}
.match-table-col-resize {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
}
.match-table-col-resize .match-reason-cell {
  max-width: none;
  white-space: normal;
  word-break: break-word;
}
.match-table-col-resize .match-hit-name-cell {
  vertical-align: top;
  overflow: hidden;
  word-break: break-word;
}
.match-hit-company {
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.3;
}
.match-hit-doc {
  font-size: 0.7rem;
  margin-top: 0.15rem;
  line-height: 1.25;
}
.match-th-resizable {
  position: relative;
  white-space: nowrap;
  overflow: visible;
  text-overflow: ellipsis;
}
.match-table-col-resize .match-th-resizable {
  z-index: 2;
}
.match-th-resizable .match-th-label {
  display: inline-block;
  padding-right: 0.45rem;
}
.match-col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
  touch-action: none;
  pointer-events: auto;
}
.match-col-resizer:hover {
  background: rgba(90, 140, 200, 0.45);
}
body.match-col-resize-dragging {
  cursor: col-resize !important;
  user-select: none;
}
body.match-col-resize-dragging * {
  cursor: col-resize !important;
}
.match-table-list td {
  vertical-align: top;
}
.panel-vstack-pane .matching-candidate-list {
  max-height: none;
}
.matching-right-scroll-inner {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.6rem 0.7rem 1rem;
}
.matching-workspace-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}
.match-llm-select {
  max-width: 220px;
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
  background: #1a1a1e;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.match-llm-hint {
  font-size: 0.72rem;
}
.match-run-status {
  font-size: 0.78rem;
  color: #9ec9ff;
  max-width: 14rem;
}
#btn-match-cancel[hidden] {
  display: none !important;
}
#match-run-status[hidden] {
  display: none !important;
}
.matching-sources-panel {
  margin-top: 0.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}
.matching-sources-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.match-sources-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.match-sources-badge.ready {
  background: rgba(52, 168, 83, 0.25);
  color: #8fd9a8;
  border: 1px solid rgba(52, 168, 83, 0.45);
}
.match-sources-badge.not-ready {
  background: rgba(255, 193, 7, 0.15);
  color: #ffd666;
  border: 1px solid rgba(255, 193, 7, 0.35);
}
.match-sources-detail {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.45;
}
.matching-criteria-panel input[type="text"],
.matching-criteria-panel select {
  width: 100%;
  margin: 0;
  font-size: 0.74rem;
  padding: 0.16rem 0.3rem;
  background: #141418;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.matching-criteria-compact {
  padding-top: 0.2rem;
  border-top: 1px solid var(--border);
  margin-top: 0.15rem;
}
.match-criteria-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.25rem 0.4rem;
}
.match-criteria-field {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1 1 7rem;
  min-width: 5.5rem;
}
.match-criteria-field.match-criteria-ind-field {
  flex: 2 1 14rem;
  min-width: 10rem;
}
.match-criteria-label {
  font-size: 0.68rem;
  color: #9aa3b5;
}
.match-criteria-actions {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
  align-items: center;
  padding-bottom: 0.05rem;
}
.match-criteria-actions button {
  font-size: 0.7rem;
  padding: 0.14rem 0.4rem;
}
.match-criteria-suggest-details {
  margin-top: 0.1rem;
  font-size: 0.68rem;
}
.match-criteria-suggest-details > summary {
  cursor: pointer;
  color: #9aa3b5;
  list-style: none;
}
.match-criteria-suggest-details > summary::-webkit-details-marker {
  display: none;
}
.match-criteria-hint {
  font-size: 0.68rem;
  margin-top: 0.08rem;
}
.match-criteria-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.3rem;
  margin: 0.12rem 0 0;
  max-height: 2.4rem;
  overflow-y: auto;
}
.match-criteria-chip {
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}
.match-criteria-ind-picker {
  display: grid;
  grid-template-columns: 1fr 1.1fr auto;
  gap: 0.2rem;
  align-items: center;
}
.match-criteria-ind-search {
  width: 100%;
  font-size: 0.74rem;
  padding: 0.16rem 0.3rem;
  background: #141418;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.match-criteria-ind-select {
  width: 100%;
  font-size: 0.74rem;
  padding: 0.16rem 0.3rem;
  background: #141418;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  max-height: 1.6rem;
}
.match-criteria-ind-selected {
  min-height: 0;
}
.match-criteria-ind-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.06rem 0.3rem;
  margin: 0;
  border: 1px solid #3d5a7a;
  border-radius: 3px;
  background: #152535;
  font-size: 0.68rem;
}
.match-criteria-ind-remove {
  border: none;
  background: transparent;
  color: #c8d4e0;
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 0.9rem;
  line-height: 1;
}
.match-criteria-suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0.15rem 0 0;
}
.match-criteria-suggest-row .match-criteria-suggest-add {
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
}
@media (min-width: 520px) {
  .match-criteria-ind-search {
    grid-column: 1 / -1;
  }
}
.shikiho-primary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 0.5rem;
  margin-top: 0.3rem;
}
.shikiho-row-field {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1 1 9rem;
  min-width: 0;
}
.shikiho-row-field.shikiho-row-keyword {
  flex: 2 1 12rem;
}
.shikiho-row-field.shikiho-row-business {
  flex: 1.4 1 10rem;
}
.shikiho-row-field.shikiho-ind-dropdown-host {
  flex: 0 1 8.5rem;
  min-width: 7rem;
}
.shikiho-row-label {
  font-size: 0.68rem;
  color: #9eb4cc;
}
.shikiho-row-field input {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  padding: 0.22rem 0.4rem;
  font-size: 0.76rem;
  width: 100%;
  min-width: 0;
}
.shikiho-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  flex-shrink: 0;
  align-items: flex-end;
}
.shikiho-ind-dropdown {
  position: relative;
  width: 100%;
}
.shikiho-ind-trigger {
  width: 100%;
  text-align: left;
  padding: 0.22rem 0.45rem;
  font-size: 0.76rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.shikiho-ind-trigger::after {
  content: "▾";
  float: right;
  color: #7a8fa8;
  font-size: 0.7rem;
}
.shikiho-ind-panel {
  display: flex;
  flex-direction: column;
  background: #121820;
  border: 1px solid #3d5a7a;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.shikiho-ind-panel[hidden] {
  display: none !important;
}
.shikiho-ind-panel-search {
  flex-shrink: 0;
  width: 100%;
  padding: 0.35rem 0.45rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: #0c1219;
  color: var(--text);
  font-size: 0.76rem;
}
.shikiho-ind-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0.15rem 0;
}
.shikiho-ind-sector {
  font-size: 0.68rem;
  font-weight: 700;
  color: #7a9bb8;
  padding: 0.35rem 0.55rem 0.12rem;
  position: sticky;
  top: 0;
  background: #121820;
  z-index: 1;
}
.shikiho-ind-option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 0.22rem 0.6rem;
  font-size: 0.74rem;
  cursor: pointer;
}
.shikiho-ind-option:hover,
.shikiho-ind-option:focus {
  background: #1a2838;
  outline: none;
}
.shikiho-ind-empty {
  padding: 0.45rem 0.55rem;
  font-size: 0.74rem;
}
.shikiho-ind-selected-compact {
  min-height: 0;
  margin-top: 0.1rem;
}
.shikiho-ind-selected-compact .match-criteria-ind-tag {
  padding: 0.06rem 0.3rem;
  margin: 0.06rem 0.15rem 0.06rem 0;
  font-size: 0.7rem;
}
.shikiho-advanced-filters {
  margin-top: 0.25rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0c1219;
}
.shikiho-advanced-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 0.55rem;
}
.shikiho-range-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}
.shikiho-range-label {
  font-size: 0.68rem;
  color: #9eb4cc;
  white-space: nowrap;
}
.shikiho-range-sep {
  font-size: 0.72rem;
  color: #7a8fa8;
}
.shikiho-filter-num {
  width: 3.6rem;
  max-width: 3.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  padding: 0.16rem 0.25rem;
  font-size: 0.74rem;
  text-align: right;
}
.shikiho-filter-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.68rem;
  color: #9eb4cc;
  min-width: 6rem;
  flex: 1 1 6rem;
  max-width: 10rem;
}
.shikiho-filter-text input {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  padding: 0.18rem 0.35rem;
  font-size: 0.74rem;
}
.matching-splitter {
  width: 8px;
  min-height: 12rem;
  border-radius: 6px;
  background: #3a3a42;
  border: 1px solid #54545d;
  cursor: col-resize;
  align-self: stretch;
}
.matching-splitter:hover {
  background: #4d6a8a;
}
.matching-web-ai-top {
  margin-bottom: 0.55rem;
  border-color: #3d5a7a;
}
.web-ai-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.4rem;
}
.web-ai-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0c1219;
  padding: 0.45rem 0.55rem;
}
.web-ai-panel-title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f0f4f8;
}
.matching-candidate-list {
  list-style: none;
  padding-left: 0;
  max-height: 28vh;
}
.match-candidate-item {
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #243040;
}
.match-candidate-item.clickable,
.match-hit-row.clickable {
  cursor: pointer;
}
.match-hit-row.clickable:hover {
  background: #1a2838;
}
.match-hit-row.clickable td:first-child {
  text-decoration: underline;
  text-decoration-color: #6a8fb8;
}
.match-candidate-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.84rem;
  line-height: 1.35;
}
.match-candidate-sector {
  font-size: 0.72rem;
  color: #9eb4cc;
  margin-top: 0.12rem;
}
.match-candidate-rationale {
  font-size: 0.76rem;
  color: #c5d3e3;
  margin-top: 0.2rem;
  line-height: 1.45;
}
.match-candidate-link {
  font-size: 0.72rem;
  color: #9eb4cc;
  margin-left: 0.25rem;
  text-decoration: none;
}
.match-candidate-link:hover {
  color: #ffffff;
}
.matching-list a:not(.match-candidate-link) {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}
.matching-finder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.matching-finder-grid-3 {
  grid-template-columns: 0.9fr 1fr 1.2fr;
}
.matching-finder-stack {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.finder-block { min-width: 0; }
.matching-keywords-panel {
  border: 1px solid #3d5a7a;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  background: #0f1721;
}
.matching-keywords-panel textarea {
  width: 100%;
  margin-top: 0.25rem;
  min-height: 5.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0f1721;
  color: #e8f0fa;
}
.match-ai-queries {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0c1219;
  color: #e8f0fa;
  font-size: 0.78rem;
  line-height: 1.4;
  resize: vertical;
  min-height: 5.5rem;
}
.finder-open-root {
  width: 100%;
  margin-top: 0.4rem;
  font-size: 0.76rem;
}
.finder-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f1721;
  min-height: 7.5rem;
  max-height: 19vh;
  overflow: auto;
  padding: 0.2rem;
}
.finder-list-tall {
  min-height: 10rem;
  max-height: 32vh;
}
.sellside-browser {
  min-height: 14rem;
  max-height: 42vh;
}
.sellside-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  margin: 0.35rem 0 0.15rem;
  font-size: 0.74rem;
}
.sellside-crumb {
  border: none;
  background: transparent;
  color: #8eb8e8;
  cursor: pointer;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
}
.sellside-crumb:hover { background: #172335; }
.sellside-crumb.active { color: #fff; font-weight: 600; }
.sellside-crumb-sep { color: #5a708a; user-select: none; }
.sellside-path-line {
  font-size: 0.68rem;
  word-break: break-all;
  line-height: 1.35;
}
.sellside-selected-wrap {
  margin-top: 0.2rem;
  font-size: 0.76rem;
}
.sellside-selected-file {
  padding: 0.15rem 0;
  word-break: break-all;
}
.finder-row.sellside-file.active {
  background: #1e3a5f;
  outline: 1px solid #4a8fd4;
}
.finder-row.disabled {
  opacity: 0.45;
  cursor: default;
}
.finder-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #dbe9ff;
  text-align: left;
  padding: 0.28rem 0.38rem;
  font-size: 0.77rem;
  cursor: pointer;
}
.finder-row:hover { background: #172335; }
.finder-row.active {
  background: #24354b;
  color: #ffffff;
}
.finder-dot {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #3d8f5d;
  color: #8fd4a8;
  font-size: 0.64rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
}
.finder-parent {
  color: var(--muted, #8b9cb3);
  font-size: 0.82em;
}
.matching-source-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
.matching-source-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f1721;
  padding: 0.5rem 0.55rem;
}
.matching-source-card h4 {
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  color: #b7dbff;
}
.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}
.pill-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #182332;
  color: #dbe9ff;
  padding: 0.16rem 0.55rem;
  font-size: 0.72rem;
  cursor: pointer;
}
.pill-btn:hover { border-color: var(--accent); }
.pill-btn.active {
  border-color: var(--accent);
  background: #2b2b30;
}
.drawer.wide .drawer-panel { width: min(720px, 100vw); }
.shikiho-search-card .shikiho-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
  align-items: center;
}
.shikiho-search-card .shikiho-toolbar input {
  flex: 1;
  min-width: 16rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 0.38rem 0.55rem;
  font-size: 0.8rem;
}
.shikiho-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) 8px minmax(420px, 1.1fr);
  gap: 0.6rem;
  margin-top: 0.45rem;
}
.shikiho-splitter {
  width: 10px;
  border-radius: 6px;
  background: #3a3a42;
  border: 1px solid #54545d;
  cursor: col-resize;
}
.shikiho-splitter.horizontal {
  width: 100%;
  height: 10px;
  cursor: row-resize;
}
.shikiho-list {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #121212;
  padding: 0.3rem;
}
.shikiho-hit {
  width: 100%;
  border: 1px solid var(--border);
  background: #1a1a1a;
  color: var(--text);
  border-radius: 8px;
  text-align: left;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.35rem;
  -webkit-user-select: text;
  user-select: text;
}
.shikiho-hit.active {
  border-color: var(--accent);
  background: #242424;
}
.shikiho-hit-title { font-size: 0.84rem; font-weight: 600; }
.shikiho-hit-meta { font-size: 0.72rem; color: var(--muted); margin-top: 0.12rem; }
.shikiho-hit-snippet {
  font-size: 0.72rem;
  color: #c9c9c9;
  margin-top: 0.2rem;
  line-height: 1.35;
  max-height: 3.9em;
  overflow: hidden;
}
.shikiho-detail {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #121212;
  padding: 0.55rem;
  max-height: 62vh;
  overflow: auto;
  -webkit-user-select: text;
  user-select: text;
}
.industry-map-main {
  display: grid;
  grid-template-columns: 1fr 10px 360px;
  gap: 0.5rem;
  margin-top: 0.45rem;
  flex: 1;
  height: auto;
  min-height: 0;
}
.industry-map-image-pane {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #111113;
  padding: 0.3rem;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
}
.industry-map-zoombar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.3rem;
}
.industry-map-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-width: none;
}
.industry-map-data-pane {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #121214;
  padding: 0.5rem;
  min-height: 0;
  height: 100%;
  min-width: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.industry-map-right-layout {
  display: grid;
  grid-template-rows: 160px 10px 1fr;
  gap: 0.35rem;
  min-height: 0;
  height: 100%;
  min-width: 0;
  flex: 1;
}
.industry-map-workspace {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
#industry-map-layout {
  min-height: 0;
  flex: 1;
  height: 100%;
}
#industry-map-layout .shikiho-list,
#industry-map-layout .shikiho-detail {
  max-height: none;
  height: 100%;
  min-height: 0;
}
#industry-map-layout .shikiho-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.industry-map-company-hits {
  margin-bottom: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #141418;
  padding: 0.4rem 0.45rem;
}
.industry-map-company-hits-head {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.industry-map-company-hits-list {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.industry-map-company-hit {
  border: 1px solid #3c4b5e;
  background: #1a2430;
  border-radius: 999px;
  color: #dcecff;
  font-size: 0.73rem;
  padding: 0.2rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.industry-map-company-hit .ticker {
  color: #9fd6ff;
  font-weight: 600;
}
.industry-map-company-hit .meta {
  color: #aab4c4;
}
.industry-map-right-top {
  overflow: auto;
  min-height: 0;
}
.industry-map-right-layout > div:last-child {
  min-height: 0;
}
.shikiho-detail-head h3 {
  margin: 0;
  font-size: 1rem;
}
.shikiho-kv {
  margin-top: 0.45rem;
  grid-template-columns: 7rem 1fr;
}
.shikiho-raw-title {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.shikiho-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
  margin-bottom: 0.35rem;
}
.shikiho-raw {
  margin-top: 0.1rem;
  max-height: 46vh;
  -webkit-user-select: text;
  user-select: text;
}
.shikiho-history-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.35rem;
}
.shikiho-history-item {
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.025);
}
.shikiho-history-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.shikiho-history-item .shikiho-raw {
  max-height: 28vh;
}
.shikiho-kv dd,
.shikiho-hit-title,
.shikiho-hit-meta,
.shikiho-hit-snippet {
  -webkit-user-select: text;
  user-select: text;
}
.unlisted-detail-body,
.unlisted-detail-body pre,
.unlisted-detail-body div {
  -webkit-user-select: text;
  user-select: text;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.schedule-filters { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.schedule-filters .active { border-color: var(--ok); color: var(--ok); }

.proactive-agent-status {
  margin: 0.25rem 0 0.5rem;
  min-height: 2.5rem;
  white-space: pre-wrap;
}
.proactive-agent-status--error {
  color: #c0392b;
}

.standing-match-workspace.proactive-need-workspace {
  flex: 1;
  min-height: 0;
  height: 100%;
}
.proactive-need-grid {
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
}
.workspace-only #workspace-body > .standing-match-workspace.proactive-need-workspace {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.proactive-need-col-list,
.proactive-need-col-detail {
  min-height: 0;
}
.standing-need-import-drop {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 0.5rem 0;
  text-align: center;
  color: var(--muted);
  cursor: copy;
}
.standing-need-import-drop.dragover {
  border-color: var(--ok);
  color: var(--ok);
  background: rgba(46, 204, 113, 0.08);
}
.standing-need-import-drop.uploading {
  opacity: 0.6;
}
.standing-import-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}
#standing-need-import-text {
  width: 100%;
  min-height: 5rem;
  margin-top: 0.35rem;
}

/* 買いニーズリスト（TC風テーブル） */
.buy-needs-workspace {
  --bn-font-extra: 1pt;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
  font-size: calc(0.7rem + var(--bn-font-extra));
}
.workspace-only #workspace-body > .buy-needs-workspace.standing-match-workspace {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.buy-needs-tabs,
.buy-needs-list-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}
.buy-needs-tabs {
  padding: 0.1rem 0 0.15rem;
  border-bottom: 1px solid var(--border);
}
.buy-needs-list-tabs {
  padding: 0.05rem 0;
}
.buy-needs-tab,
.buy-needs-list-tab {
  border: 1px solid var(--border);
  background: #1e1e22;
  color: var(--muted);
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.buy-needs-list-tab {
  padding: 0.22rem 0.7rem;
  font-size: 0.76rem;
}
.buy-needs-tab:hover,
.buy-needs-list-tab:hover {
  color: var(--text);
  border-color: #4a4a54;
}
.buy-needs-tab.active,
.buy-needs-list-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: #2a2a30;
}
.buy-needs-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 0.4rem;
}
.buy-needs-tab-panel[hidden] {
  display: none !important;
}
.buy-needs-tab-panel[data-bn-panel="proposals"] {
  overflow: auto;
}
.buy-needs-workspace .standing-toolbar-top,
.buy-needs-workspace .buy-needs-tabs,
.buy-needs-workspace .buy-needs-list-tabs,
.buy-needs-workspace .standing-manual-block {
  flex-shrink: 0;
}
.buy-needs-section-row .buy-needs-section-head {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.45rem 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.buy-needs-section-row:first-child .buy-needs-section-head {
  border-top: none;
}
#buy-needs-agent-body .buy-needs-section-head {
  color: #c8b48a;
}
.buy-needs-table-wrap {
  flex: 1 1 auto;
  min-height: 10rem;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}
.buy-needs-table-wrap.unified-comps-table-wrap {
  max-height: none;
}
.buy-needs-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: calc(0.7rem + var(--bn-font-extra));
}
.buy-needs-table.unified-comps-table th,
.buy-needs-table.unified-comps-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: calc(0.7rem + var(--bn-font-extra));
}
.buy-needs-table th,
.buy-needs-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.18rem 0.22rem;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.buy-needs-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel, #1a1f2e);
  color: var(--muted);
  font-weight: 600;
  line-height: 1.25;
}
.buy-needs-row.row-selected {
  background: rgba(80, 180, 120, 0.1);
}
.buy-needs-table .col-select {
  width: 1.4rem;
  text-align: center;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}
.buy-needs-table col.col-select { width: 1.4rem; }
.buy-needs-table col.col-posted { width: 4.2%; }
.buy-needs-table col.col-company-code { width: 9.5%; }
.buy-needs-table col.col-source { width: 5%; }
.buy-needs-table col.col-industry-class { width: 6.5%; }
.buy-needs-table col.col-buyer-kw { width: 5%; }
.buy-needs-table col.col-narrative { width: 30%; }
.buy-needs-table col.col-regions { width: 6%; }
.buy-needs-table col.col-target-kw { width: 5.5%; }
.buy-needs-table col.col-other-kw { width: 5%; }
.buy-needs-table col.col-scale { width: 7.5%; }
.buy-needs-table col.col-paths { width: 10%; }
.buy-needs-table th.col-company-code,
.buy-needs-table td.col-company-code {
  min-width: 5.8rem;
}
.buy-needs-table th.col-narrative,
.buy-needs-table td.col-narrative {
  min-width: 10rem;
}
.buy-needs-table th .bn-th-sub {
  font-size: calc(0.62rem + var(--bn-font-extra));
  font-weight: 500;
  color: var(--muted);
}
.bn-cell {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font-size: calc(0.7rem + var(--bn-font-extra));
  padding: 0.16rem 0.22rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  line-height: 1.3;
}
.bn-stack {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}
.bn-company-name {
  font-weight: 500;
}
.bn-cell-code {
  font-size: calc(0.64rem + var(--bn-font-extra));
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bn-cell-date {
  padding: 0.1rem 0.05rem;
  font-size: calc(0.58rem + var(--bn-font-extra));
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.bn-cell-wrap {
  min-height: 1.55rem;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.28;
  field-sizing: content;
}
.bn-clamp-wrap {
  min-width: 0;
}
.buy-needs-row:not(.bn-row-expanded) .bn-clamp-field.bn-clamped {
  cursor: pointer;
}
.buy-needs-row.bn-row-expanded .bn-clamp-field {
  cursor: text;
}
.bn-row-expand-hint,
.bn-row-collapse-hint {
  display: inline-block;
  margin-top: 0.12rem;
  font-size: calc(0.58rem + var(--bn-font-extra));
  color: var(--muted);
  padding: 0;
  border: none;
  background: none;
}
.bn-row-expand-hint:hover,
.bn-row-collapse-hint:hover {
  color: var(--accent, #6eb5ff);
}
.bn-src-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.08rem 0.18rem;
  margin-bottom: 0.16rem;
  line-height: 1.2;
}
.bn-src-links .linkish {
  font-size: calc(0.6rem + var(--bn-font-extra));
  padding: 0;
  border: none;
  background: none;
  color: var(--accent, #6eb5ff);
  cursor: pointer;
  text-decoration: underline;
}
.bn-src-sep {
  color: var(--muted);
  font-size: calc(0.58rem + var(--bn-font-extra));
}
.buy-needs-table .col-posted {
  padding-left: 0.12rem;
  padding-right: 0.12rem;
}
.bn-path-stack {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.bn-path-line {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}
.bn-path-btn {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(0.68rem + var(--bn-font-extra));
  padding: 0.08rem 0.12rem;
  text-align: left;
  border: 1px dashed transparent;
  border-radius: 4px;
}
.bn-path-clear {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0.25rem;
  font-size: calc(0.72rem + var(--bn-font-extra));
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
}
.bn-path-clear:hover {
  color: #f0a0a0;
}
.bn-path-clear[hidden] {
  display: none;
}
.bn-path-btn.dragover {
  border-color: var(--accent, #6eb5ff);
  background: rgba(110, 181, 255, 0.12);
}
.bn-path-btn.bn-path-set {
  color: var(--accent, #6eb5ff);
  border-style: solid;
  border-color: transparent;
}
.bn-path-row .bn-cell {
  flex: 1 1 auto;
  min-width: 0;
  font-size: calc(0.64rem + var(--bn-font-extra));
  padding: 0.12rem 0.18rem;
}
.bn-cell-short {
  min-width: 0;
  max-width: 100%;
}
.bn-cell-narrow {
  min-width: 0;
  max-width: 100%;
}
.bn-narrative {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 2.8rem;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  line-height: 1.35;
  field-sizing: content;
}
.buy-needs-row:not(.bn-row-expanded) .bn-narrative {
  min-height: 0;
}
.bn-multi {
  min-width: 0;
  max-width: 100%;
  min-height: 2.2rem;
  max-height: 4.5rem;
  overflow: auto;
  font-size: calc(0.64rem + var(--bn-font-extra));
}
.bn-scale {
  min-width: 0;
}
.bn-industry-pick {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.bn-industry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  min-height: 0;
}
.bn-industry-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  font-size: calc(0.6rem + var(--bn-font-extra));
  line-height: 1.2;
  padding: 0.06rem 0.18rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  word-break: break-word;
}
.bn-chip-x {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: calc(0.72rem + var(--bn-font-extra));
  line-height: 1;
  padding: 0;
}
.bn-industry-add {
  font-size: calc(0.62rem + var(--bn-font-extra));
  padding: 0.1rem 0.15rem;
  min-height: 1.35rem;
}
.buy-needs-workspace .standing-manual-block,
.buy-needs-workspace .standing-need-import-drop,
.buy-needs-workspace #standing-need-import-text,
.buy-needs-workspace .standing-pool-item,
.buy-needs-workspace .standing-pool-detail-inner,
.buy-needs-workspace .standing-user-intel-label {
  font-size: calc(0.82rem + var(--bn-font-extra));
}
.buy-needs-pool-panel {
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  background: rgba(0, 0, 0, 0.12);
}
.buy-needs-pool-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.25fr);
  gap: 0.5rem;
  max-height: min(72vh, calc(100vh - 14rem));
  min-height: 16rem;
  align-items: start;
}
.buy-needs-pool-list {
  overflow: auto;
  min-height: 0;
  max-height: inherit;
}
.buy-needs-pool-detail {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: min(72vh, calc(100vh - 14rem));
  overflow: auto;
  min-height: 0;
}
.standing-proposals-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.35rem 0 0.75rem;
}
.buy-needs-proposals-panel .buy-needs-proposals-grid {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  height: min(58vh, calc(100vh - 11rem));
  min-height: 18rem;
  max-height: none;
  align-items: stretch;
  overflow: hidden;
}
.buy-needs-coordinator-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem 0.65rem;
  margin-bottom: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}
.mc-coord-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}
.mc-coord-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.mc-coord-badge.ok-inline {
  margin-left: 0.35rem;
}
.mc-coord-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mc-coord-progress-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.mc-coord-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b9bd5, #7ec8ff);
  transition: width 0.35s ease;
}
.mc-coord-progress-wrap[data-status="error"] .mc-coord-progress-bar {
  background: linear-gradient(90deg, #c45c5c, #ff8a8a);
}
.mc-coord-progress-wrap[data-status="done"] .mc-coord-progress-bar {
  background: linear-gradient(90deg, #4caf7a, #8fd9a8);
}
.mc-coord-error {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 120, 120, 0.12);
}
.mc-coord-terminal-block,
.mc-coord-log-block {
  font-size: 0.92rem;
}
.mc-coord-term-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0.35rem 0;
}
.mc-coord-log {
  max-height: 8rem;
  overflow: auto;
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}
.buy-needs-proposals-list {
  flex: 0 0 min(42%, 22rem);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  min-height: 0;
}
.buy-needs-proposal-detail {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: sticky;
  top: 0;
  align-self: stretch;
  max-height: 100%;
}
.standing-proposal-party-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.25rem 0 0.15rem;
}
.standing-proposal-party-name.buy {
  color: #9fd4ff;
}
.standing-proposal-party-name.sell {
  color: #ffd699;
}
.standing-proposal-party-summary {
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0 0 0.35rem;
  opacity: 0.92;
}
.standing-proposal-buy-block,
.standing-proposal-sell-block {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}
.standing-proposal-buy-block {
  border-left: 3px solid rgba(126, 184, 255, 0.55);
}
.standing-proposal-sell-block {
  border-left: 3px solid rgba(255, 198, 120, 0.55);
}
.standing-proposal-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  color: inherit;
}
.standing-proposal-item.active {
  border-color: var(--accent, #7eb8ff);
  background: rgba(126, 184, 255, 0.08);
}
.standing-proposal-score {
  font-weight: 700;
  font-size: 1.05rem;
  margin-right: 0.5rem;
}
.standing-proposal-k {
  display: inline-block;
  min-width: 2.2rem;
  color: var(--muted, #9aa0a6);
  font-size: 0.78rem;
}
.standing-proposal-line {
  margin-top: 0.35rem;
  font-size: 0.9rem;
}
.standing-proposal-sub {
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}
.standing-proposal-reason {
  margin-top: 0.45rem;
  font-size: 0.78rem;
}
.standing-proposal-detail-inner h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}
.standing-proposal-detail-inner,
.standing-proposal-detail-inner p,
.standing-proposal-detail-inner li {
  font-size: 0.78rem;
  line-height: 1.35;
}
.standing-proposal-detail-section details {
  margin-top: 0.35rem;
}
.standing-proposal-detail-section details > summary {
  font-size: 0.78rem;
  cursor: pointer;
}
.standing-proposal-detail-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.standing-proposal-detail-section h5 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted, #9aa0a6);
}
.standing-proposal-pre {
  white-space: pre-wrap;
  font-size: 0.78rem;
  line-height: 1.35;
  max-height: none;
  overflow: visible;
}
.standing-proposal-draft-block {
  margin-top: 0.75rem;
}
.proposal-bank-select {
  width: 100%;
  max-width: 100%;
  margin-top: 0.35rem;
}
.standing-proposal-head {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.standing-proposal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.45rem;
}
.standing-proposal-badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
  background: var(--surface-3, #eef2f7);
  color: var(--text-muted, #556);
  margin-left: 0.25rem;
}
.standing-proposal-badge.ok {
  background: #e8f5e9;
  color: #2e7d32;
}
.standing-proposal-badge.warn {
  background: #fff3e0;
  color: #e65100;
}
.standing-proposal-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0;
}
.standing-proposal-gates {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}
.standing-gate-row {
  display: grid;
  grid-template-columns: 5.5rem 2.5rem 1fr;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.standing-gate-row.gate-fail .standing-gate-sev {
  color: #ff8a65;
}
.standing-gate-row.gate-warn .standing-gate-sev {
  color: #ffd54f;
}
.standing-gate-row.gate-ok .standing-gate-sev {
  color: #81c784;
}
.standing-gate-name {
  font-weight: 600;
  text-transform: capitalize;
}
.buy-needs-proposals-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.buy-needs-digest-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.buy-needs-digest-panel {
  border: 1px solid rgba(126, 184, 255, 0.35);
  border-radius: 10px;
  padding: 0.5rem 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  background: rgba(126, 184, 255, 0.05);
}
.digest-paid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.buy-needs-digest-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0.1rem 0.1rem;
  max-height: 46vh;
  overflow: auto;
}
.digest-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  background: #202024;
  color: var(--text);
}
.digest-item.digest-score-hot,
.digest-item.digest-score-warm {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #1c1c1f 0%, #141416 100%);
}
.digest-item.digest-item-open {
  cursor: pointer;
}
.digest-item.digest-item-open:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #242428 0%, #18181a 100%);
}
.digest-company.digest-open-overview {
  background: none;
  border: 0;
  padding: 0;
  color: #9ec4ff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(158, 196, 255, 0.7);
  text-underline-offset: 0.18em;
}
.digest-company.digest-open-overview:hover {
  color: #c5dcff;
}
.digest-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}
.digest-rank {
  font-weight: 700;
  opacity: 0.7;
}
.digest-score {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent, #7eb8ff);
}
.digest-company {
  font-weight: 700;
}
.digest-sentence {
  margin: 0.3rem 0;
  line-height: 1.5;
  color: var(--text);
}
.digest-points ul {
  margin: 0.3rem 0 0.1rem 1rem;
  padding: 0;
  font-size: 0.85rem;
}
.digest-points summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
}
.digest-item-actions {
  margin-top: 0.4rem;
}
.home-digest-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  margin: 0 0 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, #1c1c1e 0%, #121214 100%);
  font-weight: 600;
}
.home-digest-banner .secondary {
  font-weight: 600;
}
html.match-digest-modal-open,
html.match-digest-modal-open body {
  overflow: hidden !important;
}
html.match-digest-modal-open .workspace-body {
  overflow: hidden !important;
}
.match-digest-popup {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5vh 0.8rem 1.2rem;
  background: rgba(0, 0, 0, 0.55);
  overscroll-behavior: contain;
  touch-action: none;
}
.match-digest-popup[hidden] {
  display: none;
}
.match-digest-popup-card {
  position: relative;
  width: min(920px, 94vw);
  height: min(86vh, 920px);
  min-width: min(480px, 94vw);
  min-height: min(420px, 70vh);
  max-width: 98vw;
  max-height: 94vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #1a1a1c 0%, #121214 100%);
  color: var(--text);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  padding: 0.65rem 0.75rem 0.9rem;
  touch-action: auto;
}
.match-digest-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex: 0 0 auto;
}
.match-digest-popup-head h2 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}
.match-digest-popup-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--text);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
  overscroll-behavior: contain;
}
.match-digest-popup-body > p {
  margin: 0 0 0.1rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}
.digest-project-group {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #161618;
  overflow: hidden;
  flex: 0 0 auto;
}
.digest-project-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  cursor: pointer;
  list-style: none;
  padding: 0.48rem 0.6rem;
  min-height: 2.2rem;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text);
}
.digest-project-summary::-webkit-details-marker {
  display: none;
}
.digest-project-summary::marker {
  content: "";
}
.digest-project-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.digest-project-name::before {
  content: "▸ ";
  color: var(--muted);
  font-weight: 500;
}
.digest-project-group[open] .digest-project-name::before {
  content: "▾ ";
}
.digest-project-meta {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}
.digest-project-group[open] .digest-project-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.digest-project-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem 0.5rem;
}
.match-digest-more-label {
  margin: 0.2rem 0 0;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 0.75rem;
}
.match-digest-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}
.match-digest-popup .digest-item {
  background: #202024;
  color: var(--text);
  padding: 0.4rem 0.55rem 0.45rem;
}
.match-digest-popup .digest-item.digest-item-open {
  cursor: pointer;
}
.match-digest-popup .digest-sentence {
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.25rem 0 0.15rem;
  max-height: 22em;
  overflow-y: auto;
  display: block;
  padding-right: 0.3rem;
  white-space: pre-wrap;
  overscroll-behavior: contain;
}
.match-digest-resize {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 2;
  background:
    linear-gradient(135deg, transparent 55%, rgba(255, 255, 255, 0.35) 55% 62%, transparent 62% 70%, rgba(255, 255, 255, 0.35) 70% 77%, transparent 77%);
}
.match-digest-popup .digest-chips {
  display: none;
}
.match-digest-popup .digest-company,
.match-digest-popup .digest-rank,
.match-digest-popup .digest-score {
  color: var(--text);
}
.match-digest-popup .digest-score {
  font-size: 0.92rem;
}
.match-digest-popup .digest-item-head {
  margin-bottom: 0.1rem;
  gap: 0.3rem;
}
.match-digest-popup .primary.btn-inline {
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}
.digest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0.15rem 0 0;
}
.digest-chip {
  font-size: 0.66rem;
  line-height: 1.3;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.matching-list-digest-panel {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #1a1a1c 0%, #121214 100%);
}
.matching-list-digest-panel h3 {
  margin: 0 0 0.45rem;
}
.matching-list-digest-panel .digest-sentence {
  max-height: 9.4em;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.matching-list-candidate-row.digest-top5 {
  outline: 1px solid rgba(255, 255, 255, 0.12);
  outline-offset: -1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent);
}
.matching-list-digest-badge {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #3a3a3e 0%, #2a2a2e 100%);
  color: #e8e8ea;
  font-size: 0.75rem;
  font-weight: 700;
}
.unified-context-workspace .buy-needs-pool-grid {
  max-height: calc(100vh - 11rem);
  min-height: 24rem;
}
.unified-context-workspace,
.unified-context-workspace .uc-copyable,
.unified-context-workspace textarea,
.unified-context-workspace pre,
.unified-context-workspace .uc-source-card,
.unified-context-workspace .uc-reason-line,
.unified-context-workspace .standing-pool-detail-inner {
  user-select: text;
  -webkit-user-select: text;
}
.uc-filter-bar input,
.uc-filter-bar select {
  font-size: 0.82rem;
}
.uc-list-table-wrap {
  overflow: auto;
  max-height: min(52vh, calc(100vh - 18rem));
}
.uc-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.uc-list-table th,
.uc-list-table td {
  padding: 0.28rem 0.4rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.uc-list-row {
  cursor: pointer;
}
.uc-list-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.uc-list-row.active {
  background: rgba(106, 168, 255, 0.12);
}
.uc-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.uc-merged-summary {
  min-height: 14rem;
  width: 100%;
  font-size: 0.82rem;
  line-height: 1.55;
}
.uc-manual-notes {
  min-height: 4rem;
  width: 100%;
  font-size: 0.82rem;
}
.uc-source-card .uc-reason-line {
  font-size: 0.82rem;
  margin: 0.15rem 0;
}
.unified-context-workspace .buy-needs-pool-detail {
  max-height: calc(100vh - 11rem);
}
.recorded-jump-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0 0.65rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(106, 168, 255, 0.07);
}
.recorded-jump-label {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted, #9aa4b2);
  margin-right: 0.2rem;
}
.recorded-jump-bar .btn-inline {
  font-size: 0.78rem;
}
.uc-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.uc-detail-tabs button.active {
  font-weight: 600;
  border-color: var(--accent, #6aa8ff);
}
.uc-source-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  margin-bottom: 0.35rem;
  background: rgba(0, 0, 0, 0.08);
}
.uc-job-panel {
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  margin: 0.45rem 0 0.65rem;
  background: rgba(106, 168, 255, 0.08);
}
.uc-job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.uc-job-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.uc-job-bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.35s ease;
}
.uc-job-bar-fill.ok { background: var(--ok, #57a773); }
.uc-job-bar-fill.err { background: var(--err, #e74c3c); }
.uc-job-message.err { color: var(--err, #e74c3c); }
.uc-job-log {
  max-height: 8rem;
  overflow: auto;
  font-size: 0.75rem;
  margin: 0.25rem 0 0;
  white-space: pre-wrap;
  user-select: text;
}
button.uc-action-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.uc-db-path {
  font-size: 0.78em;
  word-break: break-all;
}
.standing-pool-score.legacy-score {
  background: rgba(240, 180, 41, 0.25);
  color: var(--warn, #f0b429);
}

/* 案件ソーシング Phase 0 */
.deal-sourcing-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 72vh;
  height: calc(100vh - 10rem);
  font-size: calc(0.82rem + 1pt);
}
.deal-sourcing-workspace .ds-safety-hint {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.35);
}
.deal-sourcing-workspace .ds-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.overseas-fa-workspace .ofa-progress {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  background: rgba(120, 160, 220, 0.12);
}
.overseas-fa-workspace .ofa-progress--ok {
  background: rgba(80, 180, 120, 0.14);
  border-color: rgba(80, 180, 120, 0.45);
}
.overseas-fa-workspace .ofa-progress--warn {
  background: rgba(240, 180, 41, 0.12);
  border-color: rgba(240, 180, 41, 0.4);
}
.overseas-fa-workspace .ofa-progress--err {
  background: rgba(220, 90, 90, 0.12);
  border-color: rgba(220, 90, 90, 0.45);
  color: var(--err);
}
.overseas-fa-workspace .ofa-pending-scroll {
  max-height: 34vh;
  flex-shrink: 0;
}
.overseas-fa-workspace .ofa-approved-scroll {
  max-height: 22vh;
  flex-shrink: 0;
}
.overseas-fa-workspace .ofa-known-scroll {
  max-height: 38vh;
  min-height: 16vh;
}
.deal-sourcing-workspace .ds-section-title {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.deal-sourcing-workspace .ds-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.deal-sourcing-workspace .ds-sites-scroll {
  max-height: 18vh;
  flex-shrink: 0;
}
.deal-sourcing-workspace .ds-deals-scroll {
  flex: 1;
  min-height: 0;
}
.deal-sourcing-workspace .ds-title-cell a {
  font-weight: 500;
}
.deal-sourcing-workspace .ds-summary-cell {
  max-width: 24rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  white-space: normal;
}
.deal-sourcing-workspace .ds-match-badge {
  font-size: 0.68rem;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.deal-sourcing-workspace .ds-row-ref {
  opacity: 0.88;
}
.deal-sourcing-workspace .ds-list-controls {
  margin: 0.15rem 0;
}
.deal-sourcing-workspace .ds-unit-hint {
  font-size: 0.72rem;
  color: var(--muted);
}
.deal-sourcing-workspace .ds-filter-inline {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}
.deal-sourcing-workspace .ds-actions {
  white-space: nowrap;
}
.deal-sourcing-workspace .ds-table {
  width: 100%;
  border-collapse: collapse;
}
.deal-sourcing-workspace .ds-table th,
.deal-sourcing-workspace .ds-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.45rem;
  vertical-align: top;
  text-align: left;
}
.deal-sourcing-workspace .ds-asking-price {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.deal-sourcing-workspace .badge-ok { color: var(--ok); }
.deal-sourcing-workspace .badge-warn { color: var(--warn); }
.deal-sourcing-workspace .badge-err { color: var(--err); }
.deal-sourcing-workspace a,
.deal-sourcing-workspace a:visited,
.deal-sourcing-workspace a:hover {
  color: #fff;
  text-decoration: underline;
}
.deal-sourcing-workspace .ds-filter-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
}
.deal-sourcing-workspace .ds-filter-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}
.deal-sourcing-workspace .ds-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
  margin-top: 0.55rem;
}
.deal-sourcing-workspace .ds-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.deal-sourcing-workspace .ds-filter-grid label.ds-filter-full {
  grid-column: 1 / -1;
}
.deal-sourcing-workspace .ds-filter-grid input,
.deal-sourcing-workspace .ds-filter-grid textarea {
  font: inherit;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.deal-sourcing-workspace .ds-filter-grid textarea {
  min-height: 3.2rem;
  resize: vertical;
}
.deal-sourcing-workspace .ds-filter-check {
  flex-direction: row !important;
  align-items: center;
  gap: 0.45rem !important;
  color: var(--text);
  font-size: 0.8rem;
}
.deal-sourcing-workspace .ds-filter-check input {
  width: auto;
}
.deal-sourcing-workspace .ds-filter-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.45rem;
  align-items: center;
}
.deal-sourcing-workspace .ds-filter-hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* 常時マッチプール（legacy class names） */
.standing-match-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}
.standing-toolbar-top {
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.standing-match-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.4fr) minmax(280px, 1.2fr);
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
}
.standing-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  background: rgba(0, 0, 0, 0.15);
}
.standing-col h3 {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.standing-scroll-list,
.standing-scroll-panel {
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.standing-watch-item,
.standing-pool-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  margin-bottom: 0.35rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.standing-watch-item.active,
.standing-pool-item.active {
  border-color: var(--ok);
  background: rgba(80, 180, 120, 0.12);
}
.standing-watch-title {
  font-weight: 600;
  font-size: 0.86rem;
}
.standing-pool-score {
  font-weight: 700;
  color: var(--ok);
  margin-right: 0.35rem;
}
.standing-editor-form label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
}
.standing-editor-form input,
.standing-editor-form textarea {
  width: 100%;
  margin-top: 0.2rem;
  font-size: 0.85rem;
}
.standing-editor-form input.short {
  max-width: 8rem;
}
.standing-field-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.standing-fieldset {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  margin: 0.5rem 0;
}
.standing-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.standing-json-edit {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
}
.standing-json-preview,
.standing-blob-preview {
  font-size: 0.72rem;
  max-height: 18vh;
  overflow: auto;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.4rem;
  border-radius: 4px;
}
.standing-profile-block summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
}
.standing-hearings-table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
}
.standing-hearings-table th,
.standing-hearings-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.3rem 0.35rem;
  vertical-align: top;
}
.standing-hearing-notes {
  max-width: 14rem;
}
.standing-intel-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
}
.pill-src {
  font-size: 0.68rem;
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-right: 0.25rem;
}
.standing-pool-scroll {
  max-height: 28vh;
  flex: none;
}
.standing-pool-detail {
  flex: 1;
  margin-top: 0.45rem;
  border-top: 1px solid var(--border);
  padding-top: 0.45rem;
}
.standing-user-intel-label textarea {
  font-size: 0.84rem;
  min-height: 8rem;
}
.section-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.pill-muted {
  font-size: 0.68rem;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .standing-match-grid {
    grid-template-columns: 1fr;
  }
}
.source-pill {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

.permission-alerts { margin-bottom: 0.65rem; display: flex; flex-direction: column; gap: 0.5rem; }
.permission-alerts.hidden { display: none; }
.permission-card {
  border: 1px solid var(--warn);
  background: rgba(240, 180, 41, 0.08);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}
.permission-card h3 { margin: 0 0 0.25rem; font-size: 0.88rem; color: var(--warn); }
.permission-card .perm-detail { margin: 0; font-size: 0.76rem; color: var(--text); white-space: pre-wrap; }
.permission-card .perm-action { margin: 0.35rem 0 0.5rem; font-size: 0.78rem; color: var(--accent); }
.permission-card .perm-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.permission-card button.ok { border-color: var(--ok); color: var(--ok); }

.bcp-niche-workspace .bcp-niche-head { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.75rem; }
.bcp-niche-settings-grid,
.bcp-niche-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.5rem 0.75rem;
  align-items: end;
}
.bcp-niche-settings-grid label,
.bcp-niche-add-grid label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.78rem; }
.bcp-niche-check { flex-direction: row !important; align-items: center; gap: 0.35rem !important; }
.bcp-niche-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.bcp-niche-table th,
.bcp-niche-table td { border-bottom: 1px solid var(--border); padding: 0.35rem 0.4rem; text-align: left; vertical-align: middle; }
.bcp-niche-kind { font-size: 0.72rem; padding: 0.1rem 0.35rem; border-radius: 4px; }
.bcp-niche-kind-cat { background: rgba(120, 160, 255, 0.18); }
.bcp-niche-kind-kw { background: rgba(240, 180, 41, 0.2); }
.bcp-niche-ind-picker select { width: 100%; min-height: 5rem; margin-top: 0.25rem; }
.bcp-niche-preview-box { margin-top: 0.5rem; padding: 0.5rem; background: rgba(120, 160, 255, 0.08); border-radius: 6px; font-size: 0.78rem; }
.bcp-hub-workspace .bcp-hub-stats { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0.35rem 0 0.5rem; font-size: 0.82rem; }
.bcp-hub-stat strong { color: var(--accent); }
.bcp-hub-jobs tbody tr.clickable { cursor: pointer; }
.bcp-hub-jobs tbody tr.clickable:hover { background: rgba(120, 160, 255, 0.1); }

.cbma-layout-resizable {
  grid-template-columns: 300px 8px minmax(0, 1fr);
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}
.workspace-only #workspace-body > .cbma-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.workspace-only #workspace-body > .cbma-workspace > .matching-source-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.workspace-only #workspace-body > .cbma-workspace .cbma-layout-resizable {
  flex: 1 1 auto;
  min-height: 0;
}
.cbma-table-wrap {
  max-height: none;
  height: 100%;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101010;
}
.cbma-rank-table--compact {
  font-size: 0.64rem;
  line-height: 1.22;
}
.cbma-rank-table--compact th,
.cbma-rank-table--compact td {
  padding: 0.16rem 0.28rem;
  vertical-align: top;
}
.cbma-rank-table--compact th {
  font-size: 0.62rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  background: #181818;
  z-index: 1;
}
.cbma-rank-table--compact td:nth-child(2) {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cbma-rank-table--compact td:nth-child(11) {
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cbma-rank-table tbody tr.cbma-row-active {
  background: rgba(120, 160, 255, 0.12);
}
.cbma-rank-table tbody tr.clickable {
  cursor: pointer;
}
.cbma-rank-table tbody tr.clickable:hover {
  background: rgba(120, 160, 255, 0.08);
}
.cbma-detail {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: #121212;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cbma-detail-head h3 {
  font-size: 0.95rem;
  margin: 0 0 0.2rem;
}
.cbma-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.35rem 0 0.25rem;
}
.cbma-overview-body {
  flex: 1;
  min-height: 12rem;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.cbma-detail-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
@media (max-width: 1100px) {
  .cbma-layout-resizable {
    grid-template-columns: 1fr;
  }
  .cbma-layout-resizable .shikiho-splitter {
    display: none;
  }
}

/* パイプライン統合ダッシュボード（管理グループ内） */
.module-group-panel--admin {
  border: 1px solid rgba(120, 160, 255, 0.25);
  background: rgba(120, 160, 255, 0.04);
}
.module-group-panel-head--operations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.module-group-panel--admin .module-group-panel-head--operations {
  margin-bottom: 0.35rem;
}
.module-group-panel-head--operations .module-group-panel-title {
  margin: 0 0 0.2rem;
}
.module-group-panel-head--operations .section-hint {
  margin: 0;
  font-size: 0.82rem;
}
.workspace.pipeline-control-mode .workspace-body {
  max-width: none;
}
.workspace.pipeline-control-mode .workspace-panels-host {
  max-width: none;
}
.workspace-only #workspace.pipeline-control-mode .workspace-body {
  overflow-y: auto;
  overflow-x: hidden;
}
.workspace-only #workspace.pipeline-control-mode .workspace-panels-host {
  overflow-y: auto;
  overflow-x: hidden;
}
.pipeline-control-workspace {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: min-content;
  padding-bottom: 1rem;
}
.pc-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.92rem;
}
.pc-readiness.ok { border-color: rgba(80, 200, 120, 0.35); }
.pc-readiness.warn { border-color: rgba(240, 180, 41, 0.45); }
.pc-paused { color: var(--warn); }
.pc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.pc-meta { margin-left: auto; font-size: 0.85rem; }
.pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 900px) {
  .pc-grid { grid-template-columns: 1fr; }
}
.pc-panel {
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}
.pc-panel h3 { margin: 0 0 0.45rem; font-size: 1rem; }
.pc-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.pc-table th, .pc-table td { padding: 0.35rem 0.45rem; text-align: left; border-bottom: 1px solid transparent; }
.pc-list { margin: 0; padding-left: 1.1rem; font-size: 0.88rem; }
.pc-list li { margin: 0.2rem 0; }
.pc-alerts li { color: var(--warn); }
.pc-chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pill-err { border-color: var(--err); color: var(--err); }
.pc-log-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
@media (max-width: 900px) {
  .pc-log-grid { grid-template-columns: 1fr; }
}
.pc-log-grid pre.log { max-height: 12rem; font-size: 0.75rem; }
.row-error td { background: rgba(255, 80, 80, 0.06); }
.row-interrupted td { background: rgba(255, 160, 60, 0.08); }
.row-running td { background: rgba(80, 200, 120, 0.05); }
.row-daemon td { background: rgba(120, 140, 180, 0.04); }
.badge.daemon { background: rgba(120, 160, 220, 0.18); color: #a8c4f0; }
.badge.daemon-paused { background: rgba(160, 160, 180, 0.15); color: #b8bcc8; }
.pc-pause-hint { margin: 0.35rem 0 0.5rem; font-size: 0.82rem; line-height: 1.45; }
.badge.sched { background: rgba(100, 160, 255, 0.2); color: #9ec5ff; }
.badge.muted { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.pc-status-badge { font-size: 0.78rem; white-space: nowrap; }
.pc-job-title { font-weight: 600; font-size: 0.88rem; }
.pc-job-id { font-size: 0.72rem; opacity: 0.75; }
.pc-inline-progress { display: flex; flex-direction: column; gap: 0.2rem; min-width: 7rem; }
.pc-progress-bar--inline { margin-top: 0; }
.pc-jobs-scroll {
  max-height: min(46vh, 520px);
  overflow: auto;
  border: 1px solid transparent;
  border-radius: 6px;
}
.pc-jobs-scroll .pc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1a1d28;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}
.pc-progress-cell { white-space: nowrap; font-size: 0.82rem; color: var(--ok); }
.pc-job-progress { font-variant-numeric: tabular-nums; }
.pc-active-tasks {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pc-active-task {
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(120, 160, 255, 0.2);
  border-radius: 8px;
  background: rgba(120, 160, 255, 0.05);
}
.pc-active-task.clickable { cursor: pointer; }
.pc-active-task.clickable:hover { background: rgba(120, 160, 255, 0.1); }
.pc-active-task-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.pc-active-task-pct {
  font-variant-numeric: tabular-nums;
  color: var(--ok);
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 600;
}
.pc-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 0.15rem;
}
.pc-progress-fill {
  height: 100%;
  background: var(--ok);
  border-radius: 999px;
}
.pc-active-task-meta { font-size: 0.78rem; margin-top: 0.25rem; }
.pc-error-row { margin-top: 0.5rem; }
.pc-no-tasks { margin: 0.25rem 0; }

.hdd-backup-toolbar { margin-top: 0.5rem; }
.hdd-backup-status-line {
  font-size: 0.92rem;
  line-height: 1.4;
  flex: 1;
  min-width: 12rem;
}
.hdd-backup-status-line.ok { color: var(--ok, #5dd39e); }
.hdd-backup-status-line.err { color: var(--err, #f07070); }
.hdd-backup-status-line.muted-inline { color: var(--muted, #9aa0a6); }


.ma-llm-job-click {
  cursor: pointer;
}
.ma-llm-job-click:hover {
  background: rgba(74, 163, 204, 0.16);
}

.ma-llm-job-dialog {
  max-width: min(44rem, 94vw);
  width: 44rem;
  border: 1px solid rgba(74, 163, 204, 0.45);
  border-radius: 8px;
  background: #16181c;
  color: var(--text, #e6e6e8);
  padding: 0.9rem 1.05rem;
}
.ma-llm-job-dialog h3 {
  margin: 0 0 0.65rem;
  font-size: 1.02rem;
  color: #9fd4ff;
}
.ma-llm-job-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}
.ma-llm-job-detail-table th {
  text-align: left;
  width: 7.8rem;
  vertical-align: top;
  padding: 0.28rem 0.45rem 0.28rem 0;
  color: var(--muted, #9aa0a6);
  white-space: nowrap;
}
.ma-llm-job-detail-table td pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
}

.power-stack-status {
  font-size: 0.84rem;
  font-weight: 600;
  margin-right: 0.35rem;
  white-space: normal;
  line-height: 1.3;
  min-width: 12rem;
  flex: 1 1 14rem;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(245, 200, 66, 0.4);
  background: rgba(0, 0, 0, 0.25);
  overflow: visible;
}
.power-stack-status.tone-ok { color: #7dcea0; }
.power-stack-status.tone-warn { color: #f5c842; }
.power-stack-status.tone-muted { color: var(--muted, #888); }
.power-stack-status.tone-err { color: #e07070; }
#btn-power-stack-off { margin-right: 0.25rem; }

.matching-agent-badge {
  font-size: 0.78rem;
  white-space: nowrap;
  margin-right: 0.35rem;
}
.matching-agent-badge.ok-inline { color: var(--ok, #5dd39e); }
.matching-agent-badge.warn-inline { color: #f5c842; }
.matching-agent-badge.muted-inline { color: var(--muted, #9aa0a6); }
.standing-toolbar-top {
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.sellside-outreach-dialog {
  border: 1px solid var(--border, #3a3f4b);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background: var(--card, #1e1e22);
  color: var(--text, #e8eaed);
  max-width: 28rem;
  width: calc(100vw - 2rem);
}
.sellside-outreach-dialog-wide {
  max-width: 42rem;
}
.sellside-outreach-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.sellside-outreach-dialog h4 {
  margin: 0 0 0.5rem;
}
.sso-field {
  display: block;
  margin: 0.65rem 0;
  font-size: 0.92rem;
}
.sso-field input,
.sso-field select,
.sso-field textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
}
.sso-dialog-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.85rem;
}
.sellside-outreach-ops {
  white-space: nowrap;
}
.sellside-outreach-ops .linkish {
  margin-right: 0.35rem;
}
.sellside-outreach-body,
.sellside-outreach-body-ta {
  -webkit-user-select: text !important;
  user-select: text !important;
  cursor: text;
}
.sellside-outreach-body-ta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 140px;
  max-height: 240px;
  margin: 0.4rem 0 0;
  resize: vertical;
  background: #111113;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* RAG 検索ワークスペース — 背景(#0e0e0f)よりわずかに明るい濃灰 + 白文字 */
.rag-workspace {
  --rag-surface: #18181b;
  --rag-surface-2: #1e1e22;
  --rag-surface-on: #252a34;
  --rag-edge: #2c2c32;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 62vh;
  color: var(--text);
}
.rag-search-panel {
  border: 1px solid var(--rag-edge);
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  background: var(--card);
  color: var(--text);
}
.rag-query-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: flex-end;
}
.rag-query-wrap { flex: 1 1 16rem; min-width: 12rem; }
.rag-company-wrap { flex: 0 1 10rem; }
.rag-ticker-wrap { flex: 0 1 5.5rem; }
.rag-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.rag-query-wrap input,
.rag-company-wrap input,
.rag-ticker-wrap input {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.45rem 0.6rem;
  background: var(--rag-surface-2);
  color: #f4f4f6;
  border: 1px solid var(--rag-edge);
  border-radius: 6px;
  color-scheme: dark;
}
.rag-query-wrap input::placeholder,
.rag-company-wrap input::placeholder,
.rag-ticker-wrap input::placeholder {
  color: #8a8a92;
}
.rag-query-wrap input:focus,
.rag-company-wrap input:focus,
.rag-ticker-wrap input:focus {
  outline: none;
  border-color: #4a6a94;
}
.rag-query-actions { display: flex; gap: 0.4rem; }
.rag-sources { margin-top: 0.7rem; }
.rag-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
.rag-presets-label { font-size: 0.78rem; color: var(--muted); margin-right: 0.2rem; }
.rag-preset {
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--rag-edge);
  background: var(--rag-surface-2);
  color: #f0f0f2;
  cursor: pointer;
}
.rag-preset:hover { background: #26262c; }
.rag-preset-clear { color: var(--muted); }
.rag-group { margin-bottom: 0.55rem; }
.rag-group-title {
  font-size: 0.78rem;
  font-weight: 650;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.rag-source-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rag-source {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  border: 1px solid var(--rag-edge);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  min-width: 10.5rem;
  cursor: pointer;
  background: var(--rag-surface);
  color: #f0f0f2;
}
.rag-source.is-on {
  border-color: #4a6a94;
  background: var(--rag-surface-on);
  color: #f4f4f6;
}
.rag-source--empty { opacity: 0.78; }
.rag-source input { margin-right: 0.3rem; }
.rag-source-label { font-size: 0.86rem; font-weight: 600; color: inherit; }
.rag-source-hint { font-size: 0.72rem; color: var(--muted); }
.rag-web-engine-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.35rem;
  color: var(--text);
}
.rag-web-engine-row select {
  background: var(--rag-surface-2);
  color: #f4f4f6;
  border: 1px solid var(--rag-edge);
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  color-scheme: dark;
}
.rag-result-bar { display: flex; gap: 0.6rem; align-items: baseline; color: var(--text); }
.rag-split {
  display: grid;
  grid-template-columns: minmax(18rem, 1.15fr) minmax(16rem, 0.95fr);
  gap: 0.75rem;
  min-height: 42vh;
}
@media (max-width: 860px) {
  .rag-split { grid-template-columns: 1fr; }
}
.rag-results {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 62vh;
  overflow: auto;
}
.rag-hit {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
  text-align: left;
  border: 1px solid var(--rag-edge);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  background: var(--rag-surface);
  color: #f0f0f2;
}
.rag-hit-main {
  flex: 1;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0.1rem 0.15rem;
}
.rag-hit-jump { flex: 0 0 auto; align-self: center; white-space: nowrap; }
.rag-hit:hover { border-color: #4a6a94; background: #1c1c20; }
.rag-hit.is-active { border-color: #4a6a94; background: var(--rag-surface-on); }
.rag-hit-head { display: flex; gap: 0.4rem; align-items: baseline; flex-wrap: wrap; color: #f4f4f6; }
.rag-hit-snip { font-size: 0.84rem; color: #d8d8de; margin-top: 0.2rem; line-height: 1.4; }
.rag-hit-meta { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
.rag-badge {
  font-size: 0.68rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
}
.rag-badge-brp { background: #1a3324; color: #b8e0c4; }
.rag-badge-news { background: #332818; color: #f0d9a8; }
.rag-badge-ma { background: #1c2438; color: #c4d0f0; }
.rag-badge-web { background: #2a2a30; color: #e8e8ec; }
.rag-badge-mail { background: #2a2430; color: #e0c8f0; }
.rag-badge-folder { background: #24302a; color: #c8e0d0; }
.rag-preview {
  border: 1px solid var(--rag-edge);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  background: var(--rag-surface);
  color: #f0f0f2;
  min-height: 16rem;
}
.rag-preview-empty { color: var(--muted); font-size: 0.9rem; }
.rag-preview-head h3 { margin: 0.25rem 0 0.4rem; font-size: 1.02rem; color: #f4f4f6; }
.rag-preview-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.35rem 0; }
.rag-preview-meta { font-size: 0.75rem; color: var(--muted); word-break: break-all; }
.rag-preview-body {
  white-space: pre-wrap;
  font-size: 0.84rem;
  line-height: 1.45;
  max-height: 48vh;
  overflow: auto;
  margin: 0.5rem 0 0;
  color: #ececf0;
  background: transparent;
}
.rag-warnings { font-size: 0.82rem; color: #e0a060; }
.rag-kw-hi,
.rag-hit-snip .match-kw-hi,
.rag-preview-body .match-kw-hi,
.rag-reason-summary .match-kw-hi {
  background: #5a4a12;
  color: #ffeaa0;
  padding: 0 0.12em;
  border-radius: 2px;
}
.rag-scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: flex-end;
  margin: 0.55rem 0 0.7rem;
}
.rag-scope-brp { flex: 0 1 16rem; }
.rag-scope-folder { flex: 1 1 18rem; min-width: 14rem; }
.rag-scope-mail {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: #d8d8de;
  padding-bottom: 0.35rem;
}
.rag-scope-brp select,
.rag-scope-folder input {
  width: 100%;
  padding: 0.4rem 0.55rem;
  background: var(--rag-surface-2);
  color: #f4f4f6;
  border: 1px solid var(--rag-edge);
  border-radius: 6px;
  color-scheme: dark;
}
.rag-reason-panel {
  border: 1px solid var(--rag-edge);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: var(--rag-surface);
}
.rag-topic-panel {
  border: 1px solid var(--rag-edge);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: var(--rag-surface);
  margin: 0 0 0.7rem;
}
.rag-topic-head { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.rag-topic-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 0.35rem; }
.rag-topic-chip {
  background: var(--rag-surface-2);
  color: #d8d8de;
  border: 1px solid var(--rag-edge);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.rag-topic-chip.is-on { background: #2a3a28; border-color: #4a7a52; color: #c8e6c0; }
.rag-topic-chip span { color: var(--muted); margin-left: 0.15rem; }
.rag-topic-points { margin: 0.35rem 0 0 1.1rem; color: #e4e4ea; font-size: 0.84rem; }
.rag-hit-topics { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.2rem; }
.rag-topic-mini {
  font-size: 0.68rem;
  padding: 0.04rem 0.35rem;
  border-radius: 999px;
  background: #243028;
  color: #b8d4c0;
}
.rag-source-note {
  font-size: 0.8rem;
  color: #e0a060;
  margin: 0.25rem 0;
}
.rag-cat-head {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9fd4ff;
  margin: 0.65rem 0 0.25rem;
  letter-spacing: 0.02em;
}
.rag-model-wrap, .rag-sort-wrap { flex: 0 1 12rem; }
.rag-model-wrap select, .rag-sort-wrap select {
  width: 100%;
  padding: 0.4rem 0.55rem;
  background: var(--rag-surface-2);
  color: #f4f4f6;
  border: 1px solid var(--rag-edge);
  border-radius: 6px;
  color-scheme: dark;
}
.rag-preview-rich { white-space: normal; }
.rag-preview-rich mark.rag-kw-hi,
.rag-prev-xlsx mark.rag-kw-hi,
.rag-prev-docx mark.rag-kw-hi,
.rag-prev-mail mark.rag-kw-hi,
.rag-prev-pre mark.rag-kw-hi {
  background: #ffe566;
  color: #111;
  padding: 0 0.12em;
  border-radius: 2px;
}
.rag-prev-pdf img { width: 100%; height: auto; background: #fff; border-radius: 4px; }
.rag-prev-page { margin: 0 0 0.8rem; }
.rag-prev-page figcaption { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.25rem; }
.rag-prev-xlsx,
.rag-prev-table-wrap,
.rag-prev-docx,
.rag-prev-mail {
  color-scheme: light;
  background: #fff;
  color: #111;
  border-radius: 4px;
}
.rag-prev-table-wrap { overflow: auto; max-height: 42vh; }
.rag-prev-table { border-collapse: collapse; font-size: 0.75rem; min-width: 100%; background: #fff; color: #111; }
.rag-prev-table td {
  border: 1px solid #ddd;
  padding: 0.15rem 0.3rem;
  background: #fff;
  color: #111;
}
.rag-prev-table tr.is-hit-row td { background: #fff6c8; color: #111; }
.rag-prev-table td.is-hit { background: #ffe566; color: #111; }
.rag-prev-docx { padding: 0.7rem 0.85rem; max-height: 48vh; overflow: auto; }
.rag-prev-docx .rag-prev-h { font-weight: 700; font-size: 1rem; color: #111; }
.rag-prev-docx .rag-prev-p { margin: 0.35rem 0; line-height: 1.45; color: #111; }
.rag-prev-docx .is-hit { background: #fff3a0; }
.rag-prev-sheet h4 { margin: 0.4rem 0 0.25rem; color: #d8d8de; }
.rag-prev-pre { white-space: pre-wrap; font-size: 0.84rem; }
.rag-prev-note { color: #e0a060; }
.rag-prev-mail { padding: 0.55rem 0.7rem; max-height: 48vh; overflow: auto; }
.rag-mail-head { margin-bottom: 0.45rem; color: #222; }
.rag-mail-note { font-size: 0.78rem; color: #6a5a00; margin-bottom: 0.3rem; }
.rag-mail-meta { font-size: 0.75rem; color: #555; }
.rag-mail-hit {
  border: 2px solid #e6c200;
  background: #fffbeb;
  padding: 0.45rem 0.55rem;
  margin: 0.55rem 0;
  border-radius: 4px;
}
.rag-mail-hit .rag-prev-pre { color: #111; }
.rag-hit-jump:disabled { opacity: 0.45; cursor: not-allowed; }
.rag-reason-head { display: flex; gap: 0.6rem; align-items: baseline; }
.rag-reason-summary {
  white-space: pre-wrap;
  margin: 0.45rem 0;
  line-height: 1.5;
  color: #ececf0;
}
.rag-reason-points { margin: 0.3rem 0 0.5rem 1.1rem; color: #e4e4ea; }
.rag-computed { margin: 0.35rem 0; color: #c8e6c0; }
.rag-computed-warn { color: #e0a060; }
.rag-timeline { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.rag-timeline li { margin: 0.25rem 0; }
.rag-tl-date { color: #9fd4ff; margin-right: 0.4rem; font-size: 0.8rem; }
.rag-tl-src { color: var(--muted); margin-right: 0.35rem; font-size: 0.78rem; }
.match-news-cell { max-width: 12rem; font-size: 0.8rem; }
.match-news-cell .linkish { white-space: normal; text-align: left; }

.grok-bot-dialog {
  max-width: min(40rem, 94vw);
  width: 40rem;
  border: 1px solid var(--border, #3a3f4b);
  border-radius: 8px;
  background: var(--card, #1e1e22);
  color: var(--text, #e8eaed);
  padding: 0.9rem 1.05rem;
}
.grok-bot-dialog-inner { display: flex; flex-direction: column; gap: 0.55rem; }
.grok-bot-dialog h3 { margin: 0; font-size: 1.02rem; color: var(--accent, #9fd4ff); }
.grok-bot-field,
.grok-bot-check {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
}
.grok-bot-check { flex-direction: row; align-items: center; gap: 0.45rem; }
.grok-bot-field input {
  width: 100%;
  background: #121214;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
}
.grok-bot-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.35rem;
}
.grok-bot-title-list {
  margin: 0.2rem 0 0;
  padding-left: 1.1rem;
  max-height: 12rem;
  overflow: auto;
}
