.edit-file-toolbar{display:flex;align-items:center;gap:16px;margin:4px 0 14px;min-height:40px}.edit-file-toolbar button,.edit-empty button{border-radius:12px;padding:10px 16px;background:#f3eaf4;color:#87187a;font-weight:600;font-size:13px;min-height:42px}.edit-tools{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:14px;border-bottom:1px solid #ece5ec}.edit-tools button{padding:7px 10px;border:1px solid #e7dfe7;border-radius:9px;background:white;font-size:11px;font-weight:600;min-height:34px}.edit-tools button:hover,.edit-tools button.active{background:#f3eaf4;border-color:#b97bb3;color:#87187a}.edit-empty{min-height:340px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center;color:#6b6370;max-width:500px;margin:auto;font-size:14px;line-height:1.7}.edit-empty h2{font-size:26px;font-weight:700;color:#382d34}.edit-empty>.material-symbols-outlined{font-size:58px;color:#87187a}.edit-options{display:flex;flex-direction:column;gap:13px}.edit-options input:not([type=checkbox]):not([type=range]):not([type=color]),.edit-options select,.edit-options textarea{width:100%;min-width:0;border:1px solid #e2d8df;border-radius:10px;padding:9px 11px;font-size:13px;background:#fff}.edit-options textarea{resize:vertical;line-height:1.6;min-height:85px}.edit-options input[type=range]{width:100%;accent-color:#87187a}.edit-options input[type=color]{height:39px;width:100%;background:white;border:1px solid #e2d8df;border-radius:9px;padding:4px}.edit-options button:disabled{opacity:.4}.edit-options select:disabled,.edit-options textarea:disabled{background:#faf8fb;color:#817483}.edit-options details{font-size:12px;line-height:1.7}.edit-options summary{cursor:pointer;color:#87187a;font-weight:600}.edit-options details>*:not(summary){margin-top:10px}.edit-options details>button{padding:9px 12px;background:#f3eaf4;border-radius:10px;color:#87187a;font-weight:600}.edit-options a{text-decoration:underline}.edit-options .field-label{margin:10px 0 4px}.edit-options h3{font-size:14px;font-weight:700;margin-bottom:12px;color:#382d34}.edit-options .tool-hint{margin:8px 0}.edit-options .field-pair{gap:12px}.edit-options .option-actions{margin-top:12px}.edit-options .option-actions button{font-size:11px}.edit-action{position:sticky;top:0;background:#fff;padding-bottom:8px;z-index:30}.has-editor-file #merge-btn:not(:disabled){background:#87187a;color:white}.edit-preview-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0 6px;font-size:12px}.edit-preview-toolbar button{padding:7px 12px;background:#f3eaf4;color:#87187a;border-radius:8px;min-height:34px}.edit-preview-toolbar select{border:1px solid #e2d8df;border-radius:9px;padding:5px 25px 5px 10px;font-size:12px;min-height:34px}.edit-preview-toolbar label{margin-left:auto;color:#6b6370}#edit-scroll{--edit-fit-height:min(520px,65dvh);min-height:220px;overflow:auto;padding:20px;background:#f0edf1;border-radius:14px;margin:10px 0;overscroll-behavior:contain;position:relative}#edit-paper{position:relative;flex-shrink:0;margin:auto;background:white;box-shadow:0 3px 18px #24142a20;isolation:isolate;max-width:none}#edit-canvas{display:block;width:100%;height:100%}#edit-overlay{position:absolute;inset:0;touch-action:none;user-select:none}#edit-overlay.edit-select{touch-action:pan-y pinch-zoom}.edit-source-box{position:absolute;display:block;border:1px solid transparent;border-radius:1px;min-height:5px;cursor:text;pointer-events:none;background:transparent}.edit-select .edit-source-box{pointer-events:auto}.edit-source-box:hover{border-color:#87187a80;background:#87187a09}.edit-source-box.selected{border-color:#87187a;background:#87187a08;outline:1px solid white;z-index:2}.edit-source-box.read-only:hover{border-color:#64748b}.edit-added-box{position:absolute;pointer-events:none;border:1px solid transparent;cursor:move}.edit-select .edit-added-box{pointer-events:auto}.edit-added-box.selected,.edit-link-box{border:1.5px dashed #87187a;z-index:3}.edit-resize{position:absolute;right:-7px;bottom:-7px;width:17px;height:17px;background:#87187a;border:2px solid white;border-radius:3px;cursor:nwse-resize}.edit-drawing #edit-overlay{cursor:crosshair}.edit-pan{cursor:grab}.edit-pan:active{cursor:grabbing}#edit-rubber{position:absolute;border:1.5px dashed #87187a;background:#87187a15;pointer-events:none;z-index:5}#edit-progress{width:100%;height:8px;accent-color:#87187a;flex-shrink:0}#edit-summary{overflow-wrap:anywhere}#edit-view{min-width:0}#edit-font-style{padding-top:13px;display:grid;gap:6px;align-content:center}#edit-source-list{font-size:12px;min-height:110px}#edit-page-note{margin-top:10px}#edit-page-note:empty{display:none}body[data-tool=edit] #main-workspace-drop{padding-right:6px}#edit-text-fields>details{margin-top:12px}
@media(min-width:1024px) and (min-height:621px){#edit-scroll{--edit-fit-height:calc(100dvh - 380px);height:calc(100dvh - 340px);min-height:240px}#edit-view{display:flex;flex-direction:column}}
@media(max-width:1023px){.edit-empty{min-height:270px}.edit-tools button{min-height:40px;padding:8px 11px}.edit-tools{gap:7px}.edit-preview-toolbar{gap:7px}#edit-scroll{max-height:640px;min-height:200px;padding:16px}#edit-paper{margin:0 auto}.edit-resize{width:24px;height:24px;right:-9px;bottom:-9px}.edit-file-toolbar{flex-wrap:wrap}.edit-preview-toolbar label{margin-left:0}}

body[data-tool=edit] [hidden]{display:none!important}

#edit-copy-style{padding:8px 11px;border-radius:9px;background:#f3eaf4;color:#87187a;font-size:12px;font-weight:600;margin:4px 0 10px}

body[data-tool="edit"] #edit-tools {
  flex: 1 1 auto;
  padding: 0;
  border: 0;
}
body[data-tool="edit"] #edit-tools button {
  width: 39px;
  min-height: 39px;
  padding: 0;
}
body[data-tool="edit"] #edit-tools button .material-symbols-outlined { font-size: 19px; }
body[data-tool-theme="edit"] main #edit-tools button[aria-pressed="true"] {
  background: var(--tool-action);
  color: #fff;
}
#edit-live { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.edit-tool-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 9px;
  row-gap: 2px;
  margin: 2px 0 4px;
  padding: 9px 12px;
  border: 1px solid var(--tool-border);
  border-radius: 12px;
  background: var(--tool-action-tint);
  color: var(--tool-heading-ink);
  font-size: 13px;
  line-height: 1.45;
}
.edit-tool-guide strong { color: var(--tool-action); font-weight: 700; }
#edit-layer-count { color: #5f5966; font-weight: 500; }
#edit-elements { display: grid; gap: 5px; margin-top: 8px; list-style: none; }
.edit-layer-row {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--tool-border);
  border-radius: 10px;
  background: white;
}
.edit-layer-row:has([aria-pressed="true"]) {
  border-color: var(--tool-action);
  background: var(--tool-action-tint);
}
.edit-layer-row.sortable-ghost { opacity: .45; }
.edit-layer-handle {
  display: grid;
  flex: 0 0 34px;
  min-height: 40px;
  place-items: center;
  color: var(--tool-action);
  font-size: 18px;
  cursor: grab;
  touch-action: none;
}
.edit-layer-handle:active { cursor: grabbing; }
.edit-element {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 6px 9px 6px 0;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.edit-element[aria-pressed="true"] { color: var(--tool-action); font-weight: 650; }
.edit-options .edit-layer-actions { margin-top: 8px; }
.edit-layer-actions button .material-symbols-outlined { font-size: 16px; }
.edit-text-style { margin-top: 10px; }
@media (min-width: 768px) and (min-height: 621px) {
  body[data-tool="edit"]:has(#edit-view:not([hidden])) #main-workspace-drop {
    display: flex;
    flex-direction: column;
    overflow-y: hidden !important;
  }
  #edit-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  #edit-scroll { container-type: size; flex: 1; min-height: 0; height: auto; }
  #edit-paper { --edit-fit-height: max(120px, calc(100cqh - 40px)); }
}

.edit-format-buttons { display:flex;flex-wrap:wrap;gap:8px; }
#edit-stickers-dialog {
  width:min(450px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;
  padding:22px;border:1px solid var(--tool-border);border-radius:26px;background:white;
  color:var(--tool-heading-ink);box-shadow:0 16px 70px #29202e30;
}
#edit-stickers-dialog::backdrop { background:#241d3066; }
.edit-sticker-heading { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px; }
.edit-sticker-heading h2 {font-size:22px;font-weight:650;}
#edit-stickers-close {width:36px;height:36px;border-radius:12px;background:var(--tool-action-tint);font-size:23px;}
#edit-sticker-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px;}
#edit-sticker-grid button {display:grid;place-items:center;min-height:58px;padding:8px;border-radius:16px;background:#f7f7fa;}
#edit-sticker-grid span {border:1px solid var(--sticker-color);color:var(--sticker-color);background:color-mix(in srgb,var(--sticker-color) 8%,white);padding:6px 10px;border-radius:7px;font-size:13px;font-weight:700;}
#edit-stickers-dialog details {display:grid;gap:10px;}
#edit-stickers-dialog summary {cursor:pointer;color:var(--tool-action);font-weight:600;}
#edit-stickers-dialog input:not([type=color]) {width:100%;border:1px solid var(--tool-border);padding:10px;border-radius:12px;}
#edit-stickers-dialog input[type=color] {width:40px;height:40px;padding:3px;border:1px solid var(--tool-border);border-radius:50%;}
#edit-sticker-add {padding:9px 14px;border-radius:13px;background:var(--tool-action);color:white;justify-self:start;}
.edit-font-row{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:10px;align-items:end}
#edit-font-style.edit-format-row{display:flex;gap:7px;padding:10px 0 2px}
.edit-format-row label{display:grid;place-items:center;position:relative;min-width:38px;min-height:36px;border:1px solid var(--tool-border);border-radius:12px;background:white;cursor:pointer;font-size:15px}
.edit-format-row input{position:absolute;opacity:0;width:100%;height:100%;cursor:pointer}
.edit-format-row label:has(:checked){background:var(--tool-action-tint);color:var(--tool-action);border-color:var(--tool-action)}
.edit-sticker-live{display:grid;width:100%;height:100%;place-items:center;border:1px solid currentColor;border-radius:16%;background:#f3faf7;font:650 clamp(9px,1.2vw,18px)/1.1 Inter,sans-serif;pointer-events:none}
#edit-selection-properties>.option-actions{justify-content:flex-start}
#edit-layer-settings[hidden]{display:none!important}
