:root { --bg: #f4f4f6; --panel: #fff; --ink: #222; --muted: #666; --line: #d8d8de; --accent: #2b6cb0; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.4 system-ui, sans-serif; background: var(--bg); color: var(--ink); }
.decoration { position: fixed; top: 40px; opacity: .8; pointer-events: none; z-index: -1; }
.decoration.left { left: -250px; }
.decoration.right { right: -250px; }
@media (max-width: 1300px) { .decoration { display: none; } }
main { display: grid; grid-template-columns: minmax(0, 692px) minmax(300px, 420px); gap: 16px; justify-content: center; padding: 16px; }
@media (max-width: 900px) { main { grid-template-columns: minmax(0, 1fr); } }
h1 { font-size: 18px; margin: 0 0 8px; }
canvas { width: 100%; height: auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px #0002; touch-action: pan-y; }
canvas.examine { cursor: url(assets/icons/manipulate.png) 16 16, grab; }
#caption { color: var(--muted); margin: 8px 0 0; min-height: 1.4em; }
aside { background: var(--panel); border-radius: 8px; box-shadow: 0 1px 4px #0002; display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
[role=tablist] { display: flex; border-bottom: 1px solid var(--line); }
[role=tab] { flex: 1; padding: 10px 6px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-bottom: 3px solid transparent; }
[role=tab][aria-selected=true] { border-bottom-color: var(--accent); font-weight: 600; }
[role=tabpanel] { overflow-y: auto; padding: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.toolbar input[type=text] { flex: 1; min-width: 0; font: 12px ui-monospace, monospace; padding: 6px; border: 1px solid var(--line); border-radius: 4px; }
.button { padding: 6px 10px; border: 1px solid var(--line); background: #fafafa; border-radius: 4px; font: inherit; color: inherit; cursor: pointer; }
.option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0; }
.option-name { flex: 0 0 130px; }
.picker, .choices button { padding: 2px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; line-height: 0; }
.picker[aria-expanded=true], .choices button[aria-pressed=true] { outline: 2px solid var(--accent); outline-offset: 1px; }
.icon { display: inline-block; position: relative; width: 36px; height: 36px; overflow: hidden; background: #fff; }
.icon img { position: absolute; max-width: none; }
.swatch { display: inline-block; width: 36px; height: 36px; border-radius: 4px; }
.choices { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0 10px 136px; }
.choices.colors button { padding: 0; border: 0; }
.choices.colors .swatch { width: 16px; height: 16px; border-radius: 3px; }
@media (max-width: 500px) { .choices { padding-left: 0; } }
.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font: 12px/1.2 system-ui, sans-serif; color: inherit; cursor: pointer; }
.action img { width: 40px; height: 40px; object-fit: contain; }
.action[aria-pressed=true] { outline: 2px solid var(--accent); }
.loading { text-align: center; color: var(--muted); padding: 40px; }
