:root {
  color-scheme: dark;
  --wall: #261d1c;
  --table: #312422;
  --ink: #f4e6ce;
  --muted: #c8ada4;
  --faint: #644c44;
  --accent: #efad7b;
  --serif: 'Baskerville', 'Songti SC', 'AppleMyungjo', 'Batang', serif;
  --sans: system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--wall); color: var(--ink); font-family: var(--sans); }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #f7c08f; outline-offset: 3px; }
.wrap { width: min(100% - 92px, 1334px); margin-inline: auto; }
.mast { border-bottom: 1px solid var(--faint); }
.mast-inner { min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mast a, footer a { color: var(--ink); text-decoration: none; font-size: .8rem; font-weight: 650; }
.mast a:hover, footer a:hover { text-decoration: underline; }
.intro { display: grid; grid-template-columns: 1fr minmax(240px, 340px); align-items: end; gap: 24px; padding: 23px 0 21px; }
.eyebrow { color: var(--accent); margin: 0 0 6px; font-size: .78rem; font-weight: 660; letter-spacing: .07em; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.065em; }
h1 { font-size: clamp(3.1rem, 5.8vw, 5.4rem); line-height: 1.04; }
.lead { max-width: 36ch; margin: 0 0 8px; color: #e0c9bb; font-size: .96rem; line-height: 1.62; }
.works { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--faint); border: 1px solid var(--faint); }
.work { display: flex; align-items: center; gap: .75rem; min-height: 50px; padding: 8px 16px; text-align: left; color: var(--muted); background: var(--wall); border: 0; }
.work:hover { background: #3c2b27; color: var(--ink); }
.work[aria-current="true"] { color: var(--ink); background: #412f29; box-shadow: inset 0 -2px var(--accent); }
.work span { color: var(--accent); font: .72rem ui-monospace, Menlo, monospace; }
.work strong { font-size: .85rem; font-weight: 640; }
.exhibit { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .85fr); gap: 22px; align-items: start; margin-top: 20px; scroll-margin-top: 18px; }
.frame { min-width: 0; margin: 0; border: 1px solid var(--faint); background: var(--table); }
.frame-top { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 9px 15px; gap: 10px; border-bottom: 1px solid var(--faint); }
figcaption { color: var(--muted); font-size: .78rem; }
.switch { display: inline-grid; grid-auto-flow: column; gap: 4px; }
.switch button { background: transparent; color: var(--muted); border: 1px solid transparent; padding: 7px 11px; font-size: .77rem; white-space: nowrap; }
.switch button:hover { border-color: var(--faint); color: var(--ink); }
.switch button[aria-pressed="true"] { color: #2a211d; background: #f0debf; border-color: #f0debf; font-weight: 680; }
.stage { display: grid; justify-items: center; padding: clamp(16px, 2.1vw, 26px); overflow: hidden; background: radial-gradient(ellipse at 50% 34%, #4b352d, var(--table) 74%); }
#print { width: min(100%, 565px); height: auto; display: block; background: #eee1c8; box-shadow: 0 9px 16px #140b0a88, 0 25px 46px #160c0a60; }
#print.drag-ready { cursor: grab; }
#print.drag-ready:active { cursor: grabbing; }
.reading { display: grid; gap: 15px; }
.story, .instrument { padding: clamp(16px, 2.35vw, 30px); border: 1px solid var(--faint); }
.story { background: #2e2420; }
.story h2 { font-size: clamp(1.9rem, 3.5vw, 3.4rem); line-height: 1.1; }
.story p:not(.eyebrow), .instruction { color: var(--muted); font-size: .88rem; line-height: 1.67; margin: 12px 0 0; }
.story p.insight:not(.eyebrow) { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 12px; }
.instrument { background: #241b1a; }
.instrument h2 { font-family: var(--sans); font-weight: 650; letter-spacing: -.04em; font-size: 1.07rem; }
.instrument .instruction { margin: 5px 0 12px; }
.plate-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 5px; }
.plate, .eye { color: var(--ink); background: #2e2421; border: 1px solid #54423b; min-height: 42px; }
.plate { display: grid; grid-template-columns: auto auto minmax(0,1fr); gap: 8px; align-items: center; text-align: left; padding: 5px 9px; }
.plate:hover, .eye:hover { border-color: var(--accent); }
.plate[aria-pressed="true"] { color: #fff2d7; border-color: var(--accent); background: #4a362e; }
.plate[aria-pressed="false"] { color: var(--muted); }
.plate strong { font-size: .83rem; }
.plate small { color: #d7bfb2; margin-left: 4px; font-size: .73rem; overflow-wrap: anywhere; }
.swatch { width: 13px; height: 13px; border-radius: 50%; border: 1px solid #ffffff52; background: var(--swatch); }
.eye { min-width: 44px; min-height: 44px; padding: 3px 7px; color: var(--muted); font-size: .72rem; }
.eye[aria-pressed="true"] { color: #f4debf; }
.alignment { display: grid; grid-template-columns: 4.3rem 1fr; gap: 6px 12px; margin: 13px 0; align-items: center; }
.alignment label { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; }
.alignment output { color: var(--accent); font-family: ui-monospace, Menlo, monospace; }
input[type="range"] { width: 100%; min-height: 28px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions button { min-height: 42px; padding: 6px 11px; border: 1px solid var(--faint); background: #362723; color: var(--ink); font-size: .82rem; }
.actions button:hover { border-color: var(--accent); }
.actions #align { background: #f0debf; border-color: #f0debf; color: #261d1c; font-weight: 690; }
.status { min-height: 1.25em; margin: 8px 0 0; color: var(--accent); font-size: .8rem; }
footer { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 25px; padding: 17px 0 30px; border-top: 1px solid var(--faint); }
footer p { color: var(--muted); margin: 0; font-size: .82rem; line-height: 1.6; }
footer a { white-space: nowrap; }
@media (max-width: 850px) {
  .wrap { width: calc(100% - 44px); }
  .exhibit { gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr); }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 28px); }
  .mast-inner { min-height: 48px; }
  .intro { grid-template-columns: 1fr; gap: 10px; padding: 23px 0 17px; }
  .lead { margin-bottom: 0; }
  .work { min-height: 60px; padding: 7px 8px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
  .work strong { font-size: .76rem; }
  .exhibit { grid-template-columns: 1fr; gap: 12px; margin-top: 11px; }
  .frame-top { padding-inline: 8px; min-height: 47px; }
  .switch button { padding: 5px 7px; }
  .stage { padding: 13px; }
  .reading { gap: 12px; }
  .instrument { grid-row: 1; }
  footer { flex-direction: column; }
}
