:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --ink: #28352f;
  --muted: #6c746e;
  --line: #dcdfd7;
  --office: #179378;
  --studio: #c96f3b;
  --basement: #4c7a9f;
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input, summary, #scene { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--office); outline-offset: 4px; }
button:disabled { opacity: .35; cursor: default; }
button:hover:not(:disabled) { background: #e8ece4; }
h1, h2, p { margin: 0; }
.app-shell { max-width: 1600px; padding: 0 48px 36px; margin: auto; }
.topbar { min-height: 96px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 24px; }
.wordmark { display: flex; align-items: center; gap: 24px; color: inherit; text-decoration: none; font-size: 23px; font-weight: 800; letter-spacing: -.08em; }
.wordmark span { padding-left: 24px; border-left: 1px solid var(--line); font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.edition { color: var(--muted); font-size: 12px; }
.dossier-link { color: var(--office); font-size: 12px; text-decoration: none; white-space: nowrap; }
.dossier-link:hover { text-decoration: underline; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 38px 0 28px; }
.eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
h1 { font-size: clamp(26px, 3.4vw, 48px); font-weight: 500; letter-spacing: -.055em; line-height: 1.12; }
.intro { color: var(--muted); font-size: 13px; line-height: 1.55; }
.viewer { background: #fdfdf9; border: 1px solid var(--line); }
.toolbar { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--line); }
.view-tabs, .camera-tools { display: flex; gap: 4px; }
.camera-tools { flex-wrap: wrap; }
.topbar { flex-wrap: wrap; padding-block: 16px; }
#scene { overflow: hidden; }
.toolbar button { border: 0; background: transparent; border-radius: 3px; padding: 10px 14px; color: var(--muted); font-size: 12px; min-height: 40px; }
.toolbar button[aria-pressed="true"] { background: #e9eee6; color: var(--ink); font-weight: 600; }
.scene-wrap { position: relative; height: clamp(440px, 57vh, 720px); }
#scene { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; }
#scene.is-dragging { cursor: grabbing; }
#drawing path, #drawing line, #drawing polyline { stroke-linecap: round; stroke-linejoin: round; }
.zoom-tools { position: absolute; right: 18px; bottom: 18px; display: flex; border: 1px solid var(--line); background: #fdfdf9; border-radius: 3px; }
.zoom-tools button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 20px; }
.zoom-tools button + button { border-left: 1px solid var(--line); }
.view-status { position: absolute; left: 20px; bottom: 23px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.viewer-footer { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 11px; color: var(--muted); }
.viewer-footer label { display: flex; align-items: center; gap: 8px; min-height: 28px; cursor: pointer; }
input { accent-color: var(--office); width: 16px; height: 16px; margin: 0; }
.space-key { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 28px 0 30px; }
.space { position: relative; padding-left: 18px; border-left: 2px solid var(--color); }
.office { --color: var(--office); }
.studio { --color: var(--studio); }
.basement { --color: var(--basement); }
.space-number { color: var(--color); font-size: 10px; letter-spacing: .08em; }
.space h2 { font-weight: 500; font-size: 24px; letter-spacing: -.04em; margin: 6px 0; }
.space p { font-size: 12px; line-height: 1.6; color: var(--muted); }
.notes { border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 11px; line-height: 1.65; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
summary { cursor: pointer; color: var(--ink); }
details > p { margin-top: 12px; }
.reference-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
figure { margin: 0; }
figure img { width: 100%; height: auto; border: 1px solid var(--line); }
figcaption { font-size: 10px; margin-top: 6px; }

@media (max-width: 760px) {
  .app-shell { padding: 0 20px 24px; }
  .topbar { min-height: 76px; }
  .edition, .intro { display: none; }
  .heading { padding: 28px 0 22px; }
  .toolbar { padding: 10px; gap: 8px; }
  .toolbar button { padding: 10px 12px; min-height: 44px; }
  .scene-wrap { height: 480px; }
  .viewer-footer { padding: 10px 14px; flex-wrap: wrap; gap: 2px; }
  .interaction-hint { font-size: 10px; }
  .space-key { gap: 16px; }
  .space { padding-left: 10px; }
  .space h2 { font-size: 21px; }
  .space p { font-size: 11px; }
  .notes { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 430px) {
  .app-shell { padding-inline: 12px; }
  .wordmark { gap: 16px; }
  .wordmark span { padding-left: 16px; }
  .scene-wrap { height: 460px; }
  .space-key { grid-template-columns: 1fr; gap: 20px; }
  .space { display: grid; grid-template-columns: 105px 1fr; column-gap: 12px; padding-left: 14px; }
  .space-number { grid-column: 1; }
  .space h2 { grid-column: 1; margin-bottom: 0; }
  .space p { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}
