.structure-viewer {
  --structure-protein: #95aebf;
  --structure-peptide: #ff9274;
  margin-top: 34px;
  min-width: 0;
}
.structure-caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 28px; margin-bottom: 17px; }
.structure-eyebrow { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.structure-caption > a { flex: none; font-size: 12px; }
.structure-stage {
  position: relative;
  isolation: isolate;
  height: 420px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}
.structure-canvas { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.structure-canvas:active { cursor: grabbing; }
.structure-canvas:focus-visible { outline: 2px solid var(--structure-peptide); outline-offset: -5px; }
.structure-canvas canvas { display: block; }
.structure-status { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; padding: 36px; text-align: center; font-size: 14px; line-height: 1.6; background: var(--paper); }
.structure-status [data-structure-message] { max-width: 390px; }
.structure-status button { border: 1px solid #888; background: var(--paper); color: var(--ink); padding: 7px 15px; font-size: 13px; }
.structure-status button:hover { background: #f5f5f5; }
.structure-status button:focus-visible { outline-color: var(--structure-peptide); }
.structure-legend { position: absolute; left: 20px; bottom: 18px; right: 20px; display: flex; flex-wrap: wrap; gap: 10px 24px; pointer-events: none; font-size: 12px; line-height: 1.5; }
.structure-legend span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.structure-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.structure-protein-dot { background: var(--structure-protein); }
.structure-peptide-dot { background: var(--structure-peptide); }
.structure-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0 0; }
.structure-style-controls, .structure-view-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.structure-toolbar button { border: 1px solid #bbb; border-radius: 0; padding: 6px 13px; min-height: 36px; background: #fff; color: #222; font-size: 12px; line-height: 1.5; }
.structure-toolbar button:hover:not(:disabled) { border-color: #222; }
.structure-toolbar button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.structure-toolbar button:disabled { opacity: .45; cursor: wait; }
.structure-toolbar p { flex-basis: 100%; font-size: 11px; color: var(--muted); }
.structure-noscript { margin-top: 12px; font-size: 13px; }
@media (max-width: 620px) {
  .structure-stage { height: 350px; }
  .structure-legend { left: 15px; bottom: 14px; gap: 8px 16px; font-size: 11px; }
  .structure-toolbar button { padding: 8px 12px; min-height: 40px; }
}
@media print {
  .structure-stage, .structure-toolbar { display: none; }
  .structure-caption { break-inside: avoid; }
}
