:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #f8f9fb;
  --canvas: #f7f8fa;
  --ink: #17191f;
  --muted: #69707d;
  --border: #dfe3ea;
  --border-strong: #c8ced8;
  --accent: #5c4ee5;
  --accent-strong: #493bc7;
  --accent-soft: #eeecff;
  --blue: #2775e7;
  --blue-soft: #eaf3ff;
  --green: #18865b;
  --green-soft: #e7f6ef;
  --amber: #9a6710;
  --amber-soft: #fff4d8;
  --red: #c43d4b;
  --shadow-sm: 0 1px 2px rgb(20 24 36 / 8%), 0 4px 16px rgb(20 24 36 / 5%);
  --shadow-lg: 0 20px 60px rgb(20 24 36 / 18%);
  --rail-width: 232px;
  --inspector-width: 340px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  overflow: hidden;
}

button, input, textarea, select { font: inherit; }

button, select { cursor: pointer; }

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, white);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--inspector-width);
  height: 100dvh;
  min-height: 620px;
}

.rail,
.inspector {
  background: var(--surface);
  position: relative;
  z-index: 10;
}

.rail {
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: white;
  font-weight: 800;
  background: var(--accent);
  box-shadow: 0 5px 14px rgb(92 78 229 / 24%);
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: .98rem; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: .72rem; margin-top: 1px; }

.project-picker { display: grid; gap: 7px; }
.project-picker label,
.nav-label {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0;
}

.project-picker select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 36px 0 11px;
  color: var(--ink);
  background: var(--surface-subtle);
}

.scenario-nav { display: grid; gap: 7px; }
.scenario-nav .nav-label { padding: 0 6px 3px; }

.scenario-button {
  border: 0;
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 11px;
  background: transparent;
  color: var(--ink);
}

.scenario-button:hover { background: var(--surface-subtle); }
.scenario-button.is-active { background: var(--accent-soft); color: #30269b; }
.scenario-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-weight: 750;
  font-size: .78rem;
}
.scenario-button.is-active .scenario-number { background: white; border-color: #c7c1ff; }
.scenario-button strong,
.scenario-button small { display: block; }
.scenario-button strong { font-size: .82rem; }
.scenario-button small { color: var(--muted); font-size: .69rem; margin-top: 2px; }

.rail-note {
  margin-top: auto;
  display: flex;
  gap: 9px;
  color: var(--muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px;
  font-size: .72rem;
  line-height: 1.45;
}
.rail-note span { color: var(--accent); font-size: 1rem; }
.rail-note p { margin: 0; }
.rail-note strong { color: var(--ink); }

.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  min-height: 78px;
  background: rgb(255 255 255 / 92%);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 8;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -.02em;
}

.toolbar { display: flex; align-items: center; gap: 8px; }

.tool-button,
.primary-button,
.secondary-button,
.icon-button {
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  min-height: 40px;
  padding: 0 13px;
  font-weight: 700;
  font-size: .8rem;
  color: var(--ink);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.tool-button:hover,
.secondary-button:hover { background: var(--surface-subtle); }
.tool-button[aria-pressed="true"] { color: var(--accent-strong); border-color: #b7affc; background: var(--accent-soft); }

.primary-button {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 5px 13px rgb(92 78 229 / 17%);
}
.primary-button:hover:not(:disabled) { background: var(--accent-strong); }
.primary-button:disabled { opacity: .44; cursor: not-allowed; box-shadow: none; }
.selection-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 99px;
  color: var(--accent-strong);
  background: white;
  font-size: .68rem;
}

.canvas-area { min-height: 0; display: grid; grid-template-rows: 40px minmax(0, 1fr); }
.canvas-toolbar {
  padding: 0 13px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  font-size: .72rem;
}
.zoom-controls { display: flex; align-items: center; gap: 2px; }
.zoom-controls button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}
.zoom-controls button:hover { background: var(--surface); color: var(--ink); }
.zoom-controls output { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }

.canvas-viewport {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  background: var(--canvas);
  background-image: radial-gradient(circle, #cfd4dc 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 40px 45px;
}

.canvas-stage {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
  transform-origin: top left;
}

.canvas-links {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.handoff-link {
  fill: none;
  stroke: #9389ef;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: .78;
}

.canvas-viewport.is-pan-mode { cursor: grab; }
.canvas-viewport.is-panning { cursor: grabbing; }
.canvas-viewport.is-pan-mode .canvas-object,
.canvas-viewport.is-pan-mode .handoff-node,
.canvas-viewport.is-panning .canvas-object,
.canvas-viewport.is-panning .handoff-node { cursor: inherit; }

.drop-indicator {
  position: absolute;
  inset: 22px;
  z-index: 30;
  border: 2px dashed var(--accent);
  border-radius: 18px;
  background: rgb(238 236 255 / 88%);
  color: var(--accent-strong);
  display: none;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  pointer-events: none;
}
.canvas-viewport.is-dragover .drop-indicator { display: grid; }

.canvas-object,
.handoff-node {
  position: absolute;
  z-index: 1;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  user-select: none;
  touch-action: none;
  pointer-events: auto;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.canvas-object { width: 250px; overflow: hidden; }
.canvas-object:hover,
.handoff-node:hover { box-shadow: 0 8px 24px rgb(20 24 36 / 12%); }
.canvas-object.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(92 78 229 / 19%), 0 8px 24px rgb(20 24 36 / 12%);
}
.canvas-object.is-dragging { cursor: grabbing; transform: rotate(.35deg) scale(1.01); z-index: 20; }
.canvas-object.is-resizing { z-index: 20; }

.object-check {
  position: absolute;
  z-index: 4;
  right: 9px;
  top: 9px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgb(255 255 255 / 75%);
  color: transparent;
  background: rgb(20 24 36 / 50%);
  backdrop-filter: blur(4px);
  font-size: .8rem;
  font-weight: 900;
}
.canvas-object.is-selected .object-check { color: white; background: var(--accent); }

.object-preview { height: var(--object-preview-height, 146px); position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.object-body { padding: 11px 12px 12px; }
.object-kicker { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.object-body h3 { margin: 5px 0 3px; font-size: .86rem; line-height: 1.3; }
.object-body p { margin: 0; color: var(--muted); font-size: .71rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.preview-screen { background: linear-gradient(145deg, #e8e6ff, #f5f4ff); padding: 15px 20px; }
.mock-browser { height: 100%; border: 1px solid #c9c5ef; border-radius: 9px; overflow: hidden; background: white; box-shadow: 0 7px 18px rgb(47 38 130 / 12%); }
.mock-browser-bar { height: 18px; background: #f0eff8; border-bottom: 1px solid #dedbec; display: flex; align-items: center; gap: 3px; padding-left: 7px; }
.mock-browser-bar i { width: 4px; height: 4px; border-radius: 50%; background: #aaa5c5; }
.mock-app { padding: 10px; display: grid; gap: 7px; }
.mock-app-header { height: 10px; width: 54%; border-radius: 4px; background: #3f37a8; }
.mock-app-field { height: 22px; border: 1px solid #e0dfea; border-radius: 5px; background: #fafafa; }
.mock-app-error { height: 18px; border-radius: 5px; background: #ffe6e8; border-left: 3px solid var(--red); }
.mock-app-button { width: 42%; height: 18px; border-radius: 5px; background: var(--accent); }

.preview-console,
.preview-log { background: #171a21; color: #d9e0ed; padding: 14px; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }
.preview-console .error-line { color: #ff8993; }
.preview-console .warn-line { color: #ffd27d; }
.preview-log { background: #20252d; color: #cbd5e1; }
.preview-log .log-error { color: #ff9b9b; }

.preview-document { background: #eef2f8; display: grid; place-items: center; }
.paper { height: min(74%, 260px); width: auto; aspect-ratio: 82 / 106; border-radius: 0; background: white; box-shadow: 0 6px 16px rgb(20 24 36 / 15%); padding: 14px 10px; position: relative; }
.paper:before { content: "PDF"; position: absolute; right: -7px; top: 10px; padding: 3px 6px; border-radius: 4px; color: white; background: #e03c4b; font-size: 8px; font-weight: 800; }
.paper i { display: block; height: 4px; background: #dfe3ea; border-radius: 2px; margin-bottom: 7px; }
.paper i:nth-child(2) { width: 70%; }
.paper i:nth-child(4) { width: 82%; }

.preview-image-upload { background-position: center; background-size: cover; }
.preview-file { background: var(--blue-soft); display: grid; place-items: center; color: var(--blue); font-size: 2.2rem; font-weight: 800; }
.preview-url { background: linear-gradient(145deg, #e8f8f0, #f8fffb); display: grid; place-items: center; color: var(--green); }
.preview-url span { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; background: white; box-shadow: var(--shadow-sm); font-size: 2rem; }

.resize-handle {
  position: absolute;
  z-index: 8;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: linear-gradient(135deg, transparent 50%, rgb(92 78 229 / 92%) 51%);
  cursor: nwse-resize;
  touch-action: none;
  opacity: .72;
}
.resize-handle::before,
.resize-handle::after,
.resize-handle span::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 5px;
  width: 8px;
  height: 1px;
  background: white;
  transform: rotate(-45deg);
  transform-origin: center;
}
.resize-handle::after { right: 2px; bottom: 8px; }
.resize-handle span::after { right: 6px; bottom: 2px; }
.canvas-object:hover .resize-handle,
.canvas-object.is-selected .resize-handle,
.resize-handle:focus-visible { opacity: 1; }

.handoff-node {
  width: 286px;
  min-height: 174px;
  padding: 14px;
  border-color: #bdb6ff;
  background: linear-gradient(180deg, #fdfcff, #f7f5ff);
  cursor: pointer;
}
.handoff-node.is-active { box-shadow: 0 0 0 3px rgb(92 78 229 / 18%), var(--shadow-sm); border-color: var(--accent); }
.handoff-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.handoff-id { color: var(--accent); font-size: .67rem; font-weight: 850; letter-spacing: .05em; }
.status-badge { border-radius: 99px; padding: 4px 8px; font-size: .62rem; font-weight: 800; background: var(--amber-soft); color: var(--amber); }
.status-badge.is-done { color: var(--green); background: var(--green-soft); }
.handoff-node h3 { margin: 10px 0 5px; font-size: .91rem; line-height: 1.3; }
.handoff-node > p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.handoff-thumbs { display: flex; margin-top: 13px; }
.mini-thumb { width: 34px; height: 34px; margin-right: -6px; border: 2px solid white; border-radius: 9px; display: grid; place-items: center; color: var(--accent-strong); background: var(--accent-soft); font-size: .65rem; font-weight: 850; }
.handoff-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; color: var(--muted); font-size: .65rem; }

.inspector {
  border-left: 1px solid var(--border);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  overflow: hidden;
}
.inspector-header { min-height: 78px; padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.inspector-header h2 { margin: 0; font-size: .98rem; }
.inspector-close { display: none; }
.icon-button { width: 38px; min-height: 38px; padding: 0; font-size: 1.25rem; }
.inspector-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 18px;
}

.empty-inspector { min-height: 100%; display: grid; place-content: center; text-align: center; color: var(--muted); padding: 20px; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 15px; border-radius: 17px; background: var(--accent-soft); color: var(--accent); font-size: 1.45rem; }
.empty-inspector h3 { color: var(--ink); margin: 0 0 7px; font-size: .92rem; }
.empty-inspector p { margin: 0; font-size: .75rem; line-height: 1.55; }

.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field > span { font-size: .72rem; font-weight: 800; color: #3d4350; }
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 11px;
  font-size: .8rem;
  line-height: 1.45;
  resize: vertical;
}
.field small { color: var(--muted); font-size: .67rem; line-height: 1.4; }

.metadata { margin: 0 0 18px; display: grid; gap: 9px; }
.metadata-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--border); font-size: .72rem; }
.metadata-row dt { color: var(--muted); }
.metadata-row dd { margin: 0; text-align: right; font-weight: 700; }

.panel-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.panel-section h3 { margin: 0 0 11px; font-size: .78rem; }
.selected-list,
.input-snapshot-list { display: grid; gap: 8px; }
.selected-item,
.snapshot-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; border: 1px solid var(--border); background: var(--surface-subtle); border-radius: 9px; padding: 8px; }
.selected-item-icon,
.snapshot-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: .67rem; font-weight: 850; }
.selected-item strong,
.snapshot-item strong { display: block; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selected-item small,
.snapshot-item small { display: block; color: var(--muted); font-size: .64rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-action { width: 100%; margin-top: 14px; }

.handoff-summary { margin: 0; padding: 12px; border-radius: 10px; background: var(--accent-soft); color: #3a328a; font-size: .76rem; line-height: 1.55; }
.timeline { position: relative; display: grid; gap: 15px; margin-top: 12px; }
.timeline:before { content: ""; position: absolute; left: 15px; top: 5px; bottom: 6px; width: 1px; background: var(--border); }
.timeline-event { position: relative; display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 10px; }
.timeline-dot { position: relative; z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); border: 3px solid white; font-size: .66rem; font-weight: 850; }
.timeline-event.is-agent .timeline-dot { color: var(--green); background: var(--green-soft); }
.timeline-copy { padding-top: 4px; }
.timeline-copy strong { display: block; font-size: .74rem; }
.timeline-copy time { color: var(--muted); font-size: .62rem; }
.timeline-copy p { margin: 5px 0 0; color: #4f5664; font-size: .7rem; line-height: 1.5; }
.result-card { margin-top: 8px; border: 1px solid #b9dfcc; background: #f5fcf8; border-radius: 9px; padding: 10px; }
.result-card a { color: var(--green); font-size: .72rem; font-weight: 800; text-decoration: none; word-break: break-all; }
.result-card p { margin-top: 4px; }

.handoff-dialog {
  width: min(650px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.handoff-dialog::backdrop { background: rgb(20 24 36 / 48%); }
.handoff-dialog form { padding: 22px; overflow-y: auto; max-height: inherit; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-header h2 { margin: 0; font-size: 1.18rem; }
.dialog-intro { color: var(--muted); font-size: .77rem; line-height: 1.55; }
.handoff-object-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 20px; }
.dialog-object { border: 1px solid var(--border); background: var(--surface-subtle); border-radius: 10px; padding: 9px; min-width: 0; }
.dialog-object strong { display: block; font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-object small { display: block; color: var(--muted); font-size: .62rem; margin-top: 3px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.toast-region { position: fixed; z-index: 100; left: 50%; bottom: 22px; transform: translateX(-50%); pointer-events: none; }
.toast { color: white; background: #232630; border-radius: 10px; box-shadow: var(--shadow-lg); padding: 11px 15px; font-size: .76rem; font-weight: 700; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  :root { --rail-width: 205px; --inspector-width: 310px; }
  .scenario-button { grid-template-columns: 26px minmax(0, 1fr); padding: 9px 7px; }
  .toolbar .tool-button { padding: 0 10px; }
}

@media (max-width: 900px) {
  body { overflow: hidden; }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); min-height: 100dvh; }
  .rail {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 9px 12px;
    display: grid;
    grid-template-columns: auto minmax(150px, 210px) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    overflow: visible;
  }
  .brand small,
  .rail-note,
  .nav-label,
  .scenario-button small { display: none; }
  .project-picker { gap: 2px; }
  .project-picker label { display: none; }
  .project-picker select { min-height: 38px; }
  .scenario-nav { display: flex; gap: 6px; min-width: 0; overflow-x: auto; padding: 2px; }
  .scenario-button { flex: 0 0 auto; width: auto; min-height: 38px; display: flex; padding: 5px 8px; }
  .scenario-button strong { font-size: .74rem; }
  .scenario-number { width: 25px; height: 25px; }
  .workspace { grid-row: 2; }
  .inspector {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(72dvh, 620px);
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -16px 50px rgb(20 24 36 / 18%);
    transform: translateY(calc(100% + 20px));
    transition: transform .2s ease;
  }
  .inspector.is-open { transform: translateY(0); }
  .inspector-close { display: inline-flex; }
  .inspector-header { min-height: 68px; }
}

@media (max-width: 640px) {
  .rail { grid-template-columns: auto minmax(0, 1fr); }
  .project-picker { display: none; }
  .brand > span:last-child { display: none; }
  .topbar { align-items: flex-start; padding: 10px 12px; min-height: 94px; flex-direction: column; gap: 9px; }
  .topbar-title { width: 100%; }
  .topbar h1 { font-size: .96rem; }
  .toolbar { width: 100%; }
  .toolbar > button { flex: 1; min-height: 38px; padding-inline: 7px; }
  .canvas-area { grid-template-rows: 34px minmax(0, 1fr); }
  .canvas-hint { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .handoff-object-list { grid-template-columns: 1fr; }
  .handoff-dialog form { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
