.page-title { gap: 18px; }
.workspace > * { min-width: 0; }
.mode-switch { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid #aeb9bd; background: #fff; flex: 0 0 auto; }
.mode-button { min-width: 132px; min-height: 36px; padding: 7px 12px; border: 0; border-right: 1px solid #aeb9bd; background: #fff; color: #4d5b65; font-weight: 600; }
.mode-button:last-child { border-right: 0; }
.mode-button.active { background: var(--green); color: #fff; }
.service-status { display: inline-flex; align-items: center; gap: 6px; }
.service-status i { width: 7px; height: 7px; border-radius: 50%; background: #98a3a8; }
.service-status.online i { background: var(--green); }
.service-status.offline i { background: var(--red); }
.run-button:disabled { background: #82918d; cursor: wait; }
.model-line { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.model-line strong { display: block; color: var(--ink); font-size: 12px; margin-bottom: 2px; }
.model-line a { color: var(--blue); text-decoration: none; }
.model-line a:hover { text-decoration: underline; }
.literature-profile { border: 1px solid var(--line); padding: 13px; }
.window-chart { position: relative; height: 150px; border-left: 1px solid #bfc8cb; border-bottom: 1px solid #bfc8cb; margin: 10px 14px 32px 40px; }
.window-grid { position: absolute; top: 0; bottom: 0; border-left: 1px dashed #dde3e4; }
.window-grid span { position: absolute; top: calc(100% + 7px); transform: translateX(-50%); color: var(--muted); font-size: 10px; white-space: nowrap; }
.window-band { position: absolute; height: 24px; min-width: 3px; border: 1px solid rgba(0,0,0,.12); }
.window-band.target { top: 29px; background: rgba(19,121,91,.75); }
.window-band.impurity { top: 87px; background: rgba(198,134,27,.78); }
.window-label { position: absolute; right: calc(100% + 8px); font-size: 10px; color: var(--muted); white-space: nowrap; }
.window-label.target { top: 33px; }
.window-label.impurity { top: 91px; }
.axis-title { position: absolute; top: calc(100% + 24px); right: 0; color: var(--muted); font-size: 10px; }
.result-table-wrap { overflow-x: auto; }
.result-table { width: 100%; min-width: 690px; border-collapse: collapse; }
.result-table th, .result-table td { padding: 9px 8px; border-bottom: 1px solid #e5e9ea; text-align: left; font-size: 11px; }
.result-table th { color: var(--muted); font-weight: 600; background: #fafbfa; }
.result-table td strong { font-size: 12px; }
.score-cell { color: var(--green-dark); font-weight: 700; }
.scope { display: inline-block; padding: 2px 5px; background: #eef1f1; color: #52616a; font-size: 10px; }
.scope.direct { background: var(--mint); color: var(--green-dark); }
.api-error { padding: 14px; background: #fcecec; border-left: 3px solid var(--red); color: #713434; }
.structure-section { padding-top: 20px; }
.structure-section-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.structure-section-head .section-title { margin-bottom: 2px; }
.structure-section-head p { margin: 0; color: var(--muted); font-size: 10px; }
.structure-badge { padding: 3px 6px; background: #e4f0f8; color: var(--blue); font-size: 10px; font-weight: 700; }
.structure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.structure-grid.single { grid-template-columns: minmax(0, 540px); }
.structure-card { margin: 0; min-width: 0; border: 1px solid var(--line); background: #fff; }
.structure-card figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 39px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.structure-card figcaption span { color: var(--green-dark); font-size: 11px; font-weight: 700; }
.structure-card.impurity figcaption span { color: #8a5c10; }
.structure-card figcaption strong { font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.structure-drawing { height: 210px; padding: 5px; display: grid; place-items: center; overflow: hidden; background: #fff; }
.structure-drawing svg { display: block; width: 100%; height: 100%; max-width: 420px; }
.structure-card code { display: block; padding: 8px 11px; border-top: 1px solid var(--line); color: #52606a; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stereo-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin-top: 18px; }
.stereo-stat { padding: 12px; border-right: 1px solid var(--line); min-width: 0; }
.stereo-stat:last-child { border-right: 0; }
.stereo-stat span { display: block; color: var(--muted); font-size: 10px; }
.stereo-stat strong { display: block; margin-top: 3px; font-size: 16px; overflow-wrap: anywhere; }
.stereo-centers { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.center-chip { padding: 4px 7px; background: var(--mint); color: var(--green-dark); border: 1px solid #bfddcd; font-size: 11px; }
.center-chip.unassigned { background: #fff7df; border-color: #ead89d; color: #70561c; }
.smiles-pair { border: 1px solid var(--line); margin-top: 12px; }
.smiles-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.smiles-row:last-child { border-bottom: 0; }
.smiles-row span { color: var(--muted); font-size: 11px; }
.smiles-row code { overflow-wrap: anywhere; font-size: 11px; }
.model-status-list { border: 1px solid var(--line); }
.model-status-row { display: grid; grid-template-columns: minmax(160px, .8fr) 100px minmax(240px, 1.5fr); gap: 12px; padding: 10px 11px; border-bottom: 1px solid var(--line); align-items: start; }
.model-status-row:last-child { border-bottom: 0; }
.model-status-row strong { font-size: 12px; }
.model-status-row a { color: var(--blue); text-decoration: none; }
.model-status-row p { margin: 0; color: var(--muted); font-size: 11px; }
.status-tag { display: inline-block; padding: 3px 5px; background: #eef1f1; color: #52616a; font-size: 10px; font-weight: 700; }
.status-tag.active, .status-tag.configured { background: var(--mint); color: var(--green-dark); }
@media (max-width: 980px) {
  .page-title { align-items: start; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .mode-switch { width: 100%; margin-top: 14px; }
  .mode-button { min-width: 0; }
  .stereo-grid { grid-template-columns: 1fr 1fr; }
  .stereo-stat:nth-child(2) { border-right: 0; }
  .stereo-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .model-status-row { grid-template-columns: 1fr; gap: 5px; }
  .smiles-row { grid-template-columns: 1fr; gap: 3px; }
  .structure-grid, .structure-grid.single { grid-template-columns: 1fr; }
  .structure-drawing { height: 190px; }
}
