:root { font-family: Inter, system-ui, sans-serif; color: #0f172a; background: #f8fafc; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { padding: 1.2rem 1.5rem; background: linear-gradient(90deg, #1d4ed8, #0f172a); color: #fff; }
.topbar-title-link,.topbar-title-link:visited{color:#fff;text-decoration:none;}
.version-tag { font-size: .7em; }
.layout { width: 100%; max-width: min(96vw, 980px); margin: 1rem auto; padding: 0 .5rem 1rem; }
.card { background:#fff; border:1px solid #e2e8f0; border-radius:.75rem; padding:1.25rem; box-shadow:0 10px 30px rgba(15,23,42,.05);} 
.drop-zone {
  margin-top: .8rem;
  border: 2px dashed #93c5fd;
  border-radius: .6rem;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
}
.drop-zone p { margin: .2rem 0; }
.drop-zone.is-dragging { border-color: #2563eb; background: #dbeafe; }
.toolbar { margin-top: .8rem; display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; }
.toolbar label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; }
input,select { border:1px solid #cbd5e1; border-radius:.45rem; padding:.45rem; font: inherit; }
.canvas-wrap { margin-top:.9rem; border:1px solid #cbd5e1; border-radius:.5rem; overflow:hidden; background:#f8fafc; }
canvas { display:block; width:100%; max-width:100%; touch-action:none; cursor: crosshair; }
canvas.panning { cursor: grabbing; }
canvas.cursor-nw, canvas.cursor-se { cursor: nwse-resize; }
canvas.cursor-ne, canvas.cursor-sw { cursor: nesw-resize; }
canvas.cursor-n, canvas.cursor-s { cursor: ns-resize; }
canvas.cursor-e, canvas.cursor-w { cursor: ew-resize; }
canvas.cursor-move { cursor: move; }
.actions { margin-top: .9rem; }
.btn { border:0;border-radius:.5rem;cursor:pointer;padding:.7rem .95rem;font-weight:600;background:#2563eb;color:#fff; }
.btn-secondary { background:#334155; }
.status { margin:.75rem 0 0; color:#1e40af; font-weight:600; }
.status.error { color:#b91c1c; }
.report-bug-hint a{ color:#1d4ed8; font-weight:600; text-decoration:none; }
.subtle-text{ color:#64748b; }
kbd { border: 1px solid #94a3b8; border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; font-size: .85em; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
