@font-face { font-family: Alice; src: url('fonts/custom/Alice-Regular.ttf') format('truetype'); font-display: swap; }
:root { color-scheme: light; --ink: #1c2c52; --muted: #465269; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.5 system-ui, sans-serif; }
main { padding: 22px clamp(16px, 3vw, 52px) 50px; }
header { margin-bottom: 22px; }
nav { display: flex; gap: 24px; margin-bottom: 12px; }
a { color: inherit; text-underline-offset: .2em; }
h1 { margin: 0; font: 400 clamp(32px, 4vw, 46px)/1.2 Alice, Georgia, serif; }
header p { margin: 8px 0 0; color: var(--muted); }
button, input, select { font: inherit; }
button, select, summary, [role="button"], nav, .hint, output { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { min-height: 44px; padding: 8px 12px; background: #fff; color: var(--ink); border: 1px solid #68758c; cursor: pointer; }
button:hover { background: #edf0f7; }
button[aria-pressed="true"] { background: var(--ink); color: #fff; }
button:disabled, select:disabled { cursor: default; background: #f2f4f6; color: var(--muted); }
input:disabled { cursor: default; }
:focus-visible { outline: 3px solid #496a78; outline-offset: 3px; }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 242px; gap: 28px; align-items: start; }
.viewer { min-width: 0; }
.view-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.stage { height: clamp(420px, 65vh, 800px); background: #000; overflow: hidden; }
#bough-preview { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; cursor: grab; }
#bough-preview:active { cursor: grabbing; }
#bough-preview text { fill: #ece9dd; font-family: Alice, Georgia, serif; text-anchor: middle; }
#bough-preview .topic { cursor: pointer; }
#bough-preview .topic:focus { outline: none; }
#bough-preview .topic:is(:hover, :focus-visible, .selected) text { text-decoration: underline; text-underline-offset: .14em; }
#bough-preview[data-mode="bare"] :is(.foliage-layer, .label-layer) { display: none; }
.hint { color: var(--muted); font-size: 14px; margin: 10px 0; }
#status, #download-status { margin: 10px 0; font-size: 14px; }
#issues { margin-top: 14px; }
summary { cursor: pointer; }
#issue-list { padding-left: 22px; font-size: 14px; }
#issue-list li { margin: 5px 0; }
#issue-list button { padding: 0; min-height: 28px; border: 0; text-decoration: underline; text-align: left; }
form > label { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; }
form > label:first-child { margin-top: 0; }
select { width: 100%; color: var(--ink); border: 1px solid #68758c; padding: 9px; background: #fff; margin: 8px 0 6px; }
input[type="range"] { width: 100%; height: 28px; margin: 8px 0 12px; accent-color: var(--ink); }
output { color: var(--muted); }
form > button { display: block; width: 100%; margin-top: 10px; }
footer { max-width: 78em; margin-top: 28px; color: var(--muted); font-size: 14px; }
footer p { margin: 6px 0; }
[hidden] { display: none !important; }
@media (max-width: 820px) {
  .workbench { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .stage { height: clamp(300px, 80vw, 500px); }
  form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
  form > label, form > input, form > select, #download-status { grid-column: 1 / -1; }
  .view-tools button { padding-inline: 9px; font-size: 14px; }
}
