:root { color-scheme: dark; font-family: "Segoe UI", sans-serif; color: #e6e3da; background: #101416; --line: #343a3b; --accent: #c8ab78; }
* { box-sizing: border-box; }
nav { scrollbar-width: thin; scrollbar-color: #505652 transparent; }
body { margin: 0; }
button, a, canvas { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.masthead { display: flex; justify-content: space-between; align-items: center; padding: 25px 4vw; border-bottom: 1px solid var(--line); }
.wordmark { font: 26px Georgia, serif; text-decoration: none; color: #e6e3da; }
.wordmark span { display: block; font: 10px "Segoe UI", sans-serif; text-transform: uppercase; letter-spacing: .17em; color: #a9aca7; margin-top: 7px; }
.masthead p { font-size: 12px; color: #b8bcb7; }
.edition { margin-left: 22px; color: #7f8989; }
main { max-width: 1800px; margin: auto; padding: 0 4vw 20px; }
.categories { display: flex; gap: 32px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.categories button { position: relative; padding: 24px 0 22px; border: 0; color: #a9aeac; background: none; cursor: pointer; white-space: nowrap; font-size: 13px; }
.categories button span { color: #7f8989; margin-right: 8px; font-size: 10px; }
.categories button[aria-selected="true"] { color: #e6e3da; }
.categories button[aria-selected="true"]::after { content: ""; position: absolute; bottom: 0; height: 2px; background: var(--accent); left: 0; right: 0; }
.exhibit-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 30px 0 22px; }
.eyebrow { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h1 { margin: 0; font: 36px Georgia, serif; font-weight: normal; }
#technique { font-size: 12px; color: #a9aeac; margin: 0 0 5px; }
#specimens { display: flex; gap: 8px; padding-bottom: 18px; overflow-x: auto; }
#specimens:empty { display: none; }
#specimens button { border: 1px solid var(--line); border-radius: 3px; background: transparent; padding: 8px 13px; color: #a9aeac; font-size: 12px; white-space: nowrap; cursor: pointer; }
#specimens button[aria-selected="true"] { background: #292e2e; border-color: #8a795b; color: #f0e3cc; }
.viewer-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 29%); border: 1px solid var(--line); min-height: 380px; height: clamp(380px, 58vh, 850px); }
.viewer-layout[data-reference="false"] { grid-template-columns: minmax(0, 1fr); }
.stage { position: relative; background: #171b1d; min-width: 0; min-height: 0; overflow: hidden; }
canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
canvas:active { cursor: grabbing; }
.stage-label { position: absolute; top: 20px; left: 22px; color: #b7b9b2; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; pointer-events: none; background: #171b1ddb; padding: 6px 9px; border-radius: 2px; }
.stage-label span { margin-left: 16px; color: var(--accent); }
.interaction-hint { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); border: 1px solid #454c4c; border-radius: 3px; background: #171b1deb; padding: 9px 14px; color: #bdc1ba; font-size: 11px; white-space: nowrap; pointer-events: none; }
.interaction-hint span { margin: 0 10px; color: var(--accent); }
figure { display: flex; flex-direction: column; margin: 0; padding: 24px; border-left: 1px solid var(--line); background: #1c2021; min-height: 0; }
.reference-image { flex: 1; min-height: 0; display: grid; place-items: center; }
#reference-photo { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
figcaption { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
figcaption .eyebrow { display: block; }
figcaption a { color: #b7bcb8; text-underline-offset: 3px; font-size: 11px; line-height: 1.6; }
.exhibit-footer { display: flex; justify-content: space-between; gap: 18px; font-size: 11px; color: #979f9d; padding-top: 5px; }
#loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #171b1def; z-index: 2; text-align: center; padding: 30px; color: #c7ccc5; font-size: 13px; line-height: 1.6; }
.loading-mark { width: 26px; height: 26px; border: 1px solid #505652; border-top-color: var(--accent); border-radius: 50%; animation: spin 1.2s linear infinite; }
#loading[data-error] .loading-mark { display: none; }
#loading[data-streaming] { inset: auto 12px 64px auto; max-width: calc(100% - 24px); flex-direction: row; gap: 10px; padding: 8px 12px; background: #171b1d; border: 1px solid var(--line); border-radius: 3px; pointer-events: none; text-align: left; font-size: 11px; }
#loading[data-streaming] p { margin: 0; }
#loading[data-streaming] .loading-mark { flex: 0 0 14px; width: 14px; height: 14px; }
#reference-error { font-size: 12px; color: #b7bcb8; }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-mark { animation: none; } }
@media (max-width: 700px) {
  .masthead { padding: 20px; }
  .masthead > p { font-size: 11px; }
  .edition { display: none; }
  main { padding: 0 20px 20px; }
  .categories { gap: 25px; }
  .categories button { padding-block: 21px; }
  .exhibit-heading { display: block; padding-top: 24px; }
  h1 { font-size: 30px; }
  #technique { margin: 14px 0 0; line-height: 1.5; }
  .viewer-layout { height: auto; grid-template-columns: minmax(0, 1fr); }
  .stage { height: 52vh; min-height: 340px; }
  figure { border-left: 0; border-top: 1px solid var(--line); padding: 20px; }
  .reference-image { height: 300px; flex: auto; }
  #reference-photo { max-height: 300px; }
  .stage-label { top: 14px; left: 12px; }
  .exhibit-footer { line-height: 1.5; }
}
