:root { color-scheme: light; color: var(--project-text); background: #fff; font: 15px var(--project-font); }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; min-height: 540px; display: flex; flex-direction: column; }
a { color: var(--project-link); }
.model-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 24px; border-bottom: 1px solid #ddd; }
.model-controls label { color: var(--project-muted); }
select { max-width: 100%; padding: 7px 30px 7px 10px; background: white; border: 1px solid #aaa; border-radius: 5px; color: inherit; font: inherit; }
main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px 24px 0; }
.caption { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
h1 { margin: 0; font-size: 17px; font-weight: 600; }
.caption a { white-space: nowrap; font-size: 13px; }
#figure-help { margin: 6px 0 10px; font-size: 13px; color: var(--project-muted); }
#viewer { flex: 1; min-height: 0; position: relative; }
iframe, #static-figure { display: block; width: 100%; height: 100%; border: 0; }
#static-figure { object-fit: contain; }
[hidden] { display: none !important; }
#figure-error { position: absolute; top: 0; padding: 12px; background: #fff8ef; }
footer { padding: 12px 24px 16px; border-top: 1px solid #ddd; background: #fafafa; }
.figure-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.figure-labels button { min-height: 36px; padding: 5px; border: 0; border-radius: 4px; background: transparent; color: var(--project-muted); font: 13px var(--project-font); cursor: pointer; }
.figure-labels button[aria-selected=true] { color: var(--project-link); background: #eaf1fa; font-weight: 600; }
:focus-visible { outline: 2px solid var(--project-link); outline-offset: 3px; }
@media(max-width:600px) {
  .model-controls, footer { padding: 10px 12px; }
  .model-controls { gap: 8px; }
  select { flex: 1; min-width: 0; }
  main { padding: 12px 10px 0; }
  h1 { font-size: 15px; }
  .figure-labels { gap: 2px; }
  .figure-labels button { font-size: 11px; min-height: 44px; }
}
