main.editor { display: block; max-width: 1200px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.grow { flex: 1; }
.modes { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.mode { border: 0; background: none; padding: 8px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--muted); }
.mode.on { background: var(--accent); color: #fff; }
.stage { display: grid; gap: 16px; }
@media (min-width: 900px) { .stage { grid-template-columns: 1fr 300px; align-items: start; } .panel { position: sticky; top: 16px; } }
.pages { display: grid; gap: 16px; }
.page { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(21,32,43,.12); margin: 0 auto; touch-action: none; }
.page canvas { display: block; width: 100%; height: auto; }
.page .layer { position: absolute; inset: 0; }
.mode-text .layer, .mode-rect .layer { cursor: crosshair; }
.item { position: absolute; box-sizing: border-box; border: 1px solid transparent; cursor: move; overflow: hidden; }
.item.text { white-space: pre-wrap; line-height: 1.15; padding: 0; word-break: break-word; }
.item:hover, .item.sel { border-color: var(--accent); }
.item.sel .handle { display: block; }
.handle { display: none; position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: var(--accent); border-radius: 50%; cursor: nwse-resize; }
.draft { position: absolute; border: 1px dashed var(--accent); background: rgba(43,87,214,.1); pointer-events: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.panel h3 { margin: 0 0 8px; font-size: 1rem; }
.panel label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; margin-bottom: 8px; }
.panel input, .panel select, .panel textarea { padding: 8px; border: 1px solid var(--line); border-radius: 8px; font-weight: 500; width: 100%; }
.panel input[type=color] { padding: 2px; height: 38px; }
.panel .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hint.small { font-size: .85rem; margin-bottom: 10px; }
