/* Sands PDF editor (/editor) — uses the tokens defined in /styles.css. */
body[data-view="edit"] .live-region .toast { pointer-events:none; } /* never block clicks on the page being edited */
#pdfEditorHost { position:fixed; left:0; right:0; top:var(--topbar); bottom:0; z-index:5; background:var(--bg); }
.sed { position:absolute; inset:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto; color:var(--text); font-family:var(--ui); }
.sed .i { width:18px; height:18px; }

/* ---- top bar ---- */
.sed-bar { display:flex; align-items:center; gap:10px; padding:5px 12px; min-height:62px; border-bottom:1px solid var(--line); background:#1b1611; }
.sed-file { display:flex; align-items:center; gap:8px; min-width:0; flex:0 1 230px; }
.sed-back { width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--line); border-radius:var(--radius); color:var(--text-dim); flex:none; }
.sed-back:hover { background:var(--surface); color:var(--text); }
.sed-name { display:grid; min-width:0; gap:1px; }
.sed-name strong { font-size:13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sed-sub { display:flex; align-items:center; gap:8px; min-height:16px; font-family:var(--mono); font-size:11px; color:var(--muted); white-space:nowrap; }
.sed-dirty.on { color:var(--amber-soft); display:inline-flex; align-items:center; gap:5px; }
.sed-dirty.on::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--amber); }
.sed-tools { display:flex; align-items:stretch; flex:1 1 auto; min-width:0; overflow-x:auto; scrollbar-width:none; justify-content:center; }
.sed-tools::-webkit-scrollbar { display:none; }
.sed-group { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; padding:0 7px; border-left:1px solid var(--line-soft); flex:none; }
.sed-group:first-child { border-left:0; }
.sed-gbtns { display:flex; align-items:center; gap:2px; }
.sed-glabel { font-family:var(--mono); font-size:9.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); line-height:1.2; }
.sed-tw { display:flex; align-items:center; }
.sed-tool { width:34px; height:34px; padding:0; display:inline-grid; place-items:center; border:1px solid transparent; border-radius:var(--radius); background:transparent; color:var(--text-dim); flex:none; font-size:12px; font-weight:600; }
.sed-tool:hover:not(:disabled) { background:var(--surface); color:var(--text); }
.sed-tool[aria-pressed="true"] { background:rgba(232,165,71,.16); border-color:rgba(232,165,71,.5); color:var(--amber-soft); }
.sed-tool.sm { width:30px; height:30px; }
.sed-tool.sm .i { width:16px; height:16px; }
.sed-tool.xs { width:24px; height:24px; }
.sed-tool.xs .i { width:14px; height:14px; }
.sed-tool.danger { color:var(--coral); }
.sed-caret { width:15px; height:34px; padding:0; margin-left:-3px; border:0; border-radius:6px; background:transparent; color:var(--muted); display:grid; place-items:center; }
.sed-caret .i { width:12px; height:12px; }
.sed-caret:hover { color:var(--text); background:var(--surface); }
.sed-acts { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.sed-vsep { width:1px; height:22px; background:var(--line); margin:0 3px; flex:none; }
.sed-zoom { display:flex; align-items:center; gap:0; border:1px solid var(--line); border-radius:var(--radius); margin-left:2px; }
.sed-zoom .sed-tool { width:30px; height:30px; }
.sed-zoomval { min-width:52px; height:30px; border:0; background:transparent; color:var(--text-dim); font-family:var(--mono); font-size:12px; padding:0 4px; }
.sed-zoomval:hover { color:var(--text); background:var(--surface); }
.sed-savewrap { display:flex; }
.sed-save { border-radius:var(--radius) 0 0 var(--radius); }
.sed-savecaret { border-radius:0 var(--radius) var(--radius) 0; width:30px; padding:0; border-left:1px solid rgba(21,17,13,.3); }
.sed-savecaret .i { width:14px; height:14px; }

/* ---- body ---- */
.sed-body { display:grid; grid-template-columns:auto minmax(0,1fr) 288px; min-height:0; position:relative; }
.sed-left { width:228px; min-height:0; overflow:hidden; border-right:1px solid var(--line); background:var(--bg-2); }
.sed-right { min-height:0; overflow:auto; border-left:1px solid var(--line); background:var(--bg-2); }
.sed-view { position:relative; min-width:0; min-height:0; background:#0f0c09; }
.sed-scroll { position:absolute; inset:0; overflow:auto; outline:none; overscroll-behavior:contain; touch-action:pan-x pan-y; }
.sed-scroll:focus-visible { box-shadow:inset 0 0 0 2px var(--amber); }
.sed-pages { display:flex; flex-direction:column; align-items:center; gap:18px; padding:24px 24px 96px; min-width:min-content; }
.sed-page { position:relative; flex:none; background:#fff; box-shadow:0 2px 16px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4); }
.sed-canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
.sed-layer, .sed-fields { position:absolute; inset:0; }
.sed-layer { pointer-events:none; }
.sed-ov { position:absolute; inset:0; pointer-events:none; }
.sed-fields { pointer-events:none; }
.sed-fields > * { position:absolute; pointer-events:auto; margin:0; }
.sed-loading { position:absolute; left:50%; bottom:22px; transform:translateX(-50%); z-index:6; display:flex; align-items:center; gap:9px; padding:8px 14px; border:1px solid var(--line); border-radius:999px; background:var(--surface); box-shadow:var(--shadow); font-size:13px; color:var(--text-dim); }
.sed-spin { width:12px; height:12px; border-radius:50%; border:2px solid rgba(232,165,71,.35); border-top-color:var(--amber); animation:spin .8s linear infinite; }

/* tool cursors */
.sed[data-at="select"] .sed-scroll { cursor:default; }
.sed[data-at="text"] .sed-page { cursor:text; }
.sed[data-at="rect"] .sed-page, .sed[data-at="ellipse"] .sed-page, .sed[data-at="line"] .sed-page, .sed[data-at="arrow"] .sed-page, .sed[data-at="ink"] .sed-page,
.sed[data-at="link"] .sed-page, .sed[data-at="redact"] .sed-page, .sed[data-at="field"] .sed-page, .sed[data-at="crop"] .sed-page, .sed[data-at="image"] .sed-page,
.sed[data-at="note"] .sed-page, .sed[data-at="sign"] .sed-page, .sed[data-at="stamp"] .sed-page, .sed[data-at="mark"] .sed-page { cursor:crosshair; }
.sed[data-at="highlight"] .sed-page, .sed[data-at="underline"] .sed-page, .sed[data-at="strikeout"] .sed-page { cursor:text; }
.sed.panning .sed-scroll, .sed[data-at="hand"] .sed-scroll { cursor:grab; }
.sed[data-at="ink"] .sed-scroll, .sed[data-at="rect"] .sed-scroll, .sed[data-at="ellipse"] .sed-scroll, .sed[data-at="line"] .sed-scroll, .sed[data-at="arrow"] .sed-scroll, .sed[data-at="highlight"] .sed-scroll, .sed[data-at="underline"] .sed-scroll, .sed[data-at="strikeout"] .sed-scroll, .sed[data-at="redact"] .sed-scroll { touch-action:none; }

/* overlays */
.sed-hit { position:absolute; background:rgba(232,165,71,.32); border-radius:2px; mix-blend-mode:multiply; }
.sed-hit.cur { background:rgba(232,120,30,.45); box-shadow:0 0 0 2px #e8a547; }
.sed-redact { position:absolute; pointer-events:auto; cursor:pointer; background:repeating-linear-gradient(135deg, rgba(0,0,0,.55) 0 5px, rgba(180,40,40,.45) 5px 10px); outline:1.5px solid #b82c2c; }
.sed-redact.preview { background:#000; outline:0; }
.sed-sel { position:absolute; border:1.5px solid var(--amber); border-radius:2px; box-shadow:0 0 0 1px rgba(21,17,13,.35); }
.sed-sel-block { border-style:solid; background:rgba(232,165,71,.06); }
.sed-hover { position:absolute; border:1px dashed rgba(232,165,71,.85); border-radius:2px; background:rgba(232,165,71,.05); }
.sed-handle { position:absolute; width:10px; height:10px; border:1.5px solid var(--amber); background:#fff; border-radius:2px; pointer-events:auto; touch-action:none; }
.sed-handle[data-handle="nw"], .sed-handle[data-handle="se"] { cursor:nwse-resize; }
.sed-handle[data-handle="ne"], .sed-handle[data-handle="sw"] { cursor:nesw-resize; }
.sed-handle[data-handle="n"], .sed-handle[data-handle="s"] { cursor:ns-resize; }
.sed-handle[data-handle="e"], .sed-handle[data-handle="w"] { cursor:ew-resize; }
.sed-guide { position:absolute; background:#ff4fa3; opacity:.85; }
.sed-guide.v { top:0; bottom:0; width:1px; }
.sed-guide.h { left:0; right:0; height:1px; }
.sed-ghost { position:absolute; opacity:.88; pointer-events:none; box-shadow:0 0 0 1px rgba(232,165,71,.7); }
.sed-draft { position:absolute; inset:0; overflow:visible; pointer-events:none; }
.sed-textedit { position:absolute; pointer-events:auto; margin:0; padding:3px; border:0; border-radius:2px; overflow:visible; white-space:pre-wrap; overflow-wrap:break-word; background:rgba(255,255,255,.97); outline:2px solid var(--amber); box-shadow:0 6px 24px rgba(0,0,0,.35); color:#111; z-index:3; min-height:1em; cursor:text; }
.sed-textedit span { white-space:inherit; }
.sed-hint.sm { font-size:11.5px; margin-top:8px; }
.sed-textedit:focus-visible { outline:2px solid var(--amber); outline-offset:0; }

/* form field overlays */
.sed-fin { background:transparent; color:transparent; caret-color:#111; border:1px solid transparent; border-radius:2px; padding:0 3px; font-family:Helvetica, Arial, sans-serif; resize:none; }
.sed-fin:hover { border-color:rgba(232,165,71,.75); }
.sed-fin:focus, .sed-fin:focus-visible { background:#fff; color:#111; border-color:var(--amber); outline:2px solid rgba(232,165,71,.45); outline-offset:0; }
.sed-fbtn { background:transparent; border:1px solid transparent; border-radius:2px; padding:0; cursor:pointer; }
.sed-fbtn:hover, .sed-fbtn:focus-visible { border-color:var(--amber); outline:none; }
.sed-fsel { opacity:0; cursor:pointer; }
.sed-fsel:focus-visible { opacity:1; background:#fff; color:#111; outline:2px solid var(--amber); }
.sed-fsig { display:grid; place-items:center; background:rgba(232,165,71,.14); border:1.5px dashed var(--amber); border-radius:4px; color:#7a4a08; font-size:12px; font-weight:700; cursor:pointer; }
.sed-fsig span { display:inline-flex; align-items:center; gap:5px; }
.sed-fsig .i { width:15px; height:15px; }

/* ---- banner & find bar ---- */
.sed-banner { position:absolute; top:10px; left:50%; transform:translateX(-50%); z-index:7; display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:center; max-width:calc(100% - 24px); padding:8px 10px 8px 12px; border:1px solid rgba(224,138,108,.55); border-radius:var(--radius); background:#2a1d17; box-shadow:var(--shadow); font-size:13px; }
.sed-banner-ic { color:var(--coral); display:grid; }
.sed-banner.info { border-color:rgba(143,176,197,.55); background:#1c2125; max-width:min(760px, calc(100% - 24px)); justify-content:flex-start; }
.sed-banner.info .sed-banner-ic { color:var(--blue); }
.sed-banner-text { flex:1 1 300px; line-height:1.45; }
.sed-detail { position:absolute; display:block; pointer-events:none; }
.sed-findbar { position:absolute; top:10px; right:14px; z-index:8; width:min(560px, calc(100% - 28px)); padding:8px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); display:grid; gap:6px; }
.sed-findrow { display:flex; align-items:center; gap:4px; }
.sed-findrow.wrap { flex-wrap:wrap; gap:6px; }
.sed-findin { flex:1; display:flex; align-items:center; gap:6px; min-width:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--bg); padding:0 8px; color:var(--muted); }
.sed-findin:focus-within { border-color:var(--amber); }
.sed-findin input { flex:1; min-width:0; border:0; background:transparent; height:32px; padding:0; outline:none; }
.sed-findin input:focus-visible { outline:none; }
.sed-count { font-family:var(--mono); font-size:11.5px; color:var(--muted); min-width:58px; text-align:center; white-space:nowrap; }
.sed-findtabs { display:flex; gap:2px; border-bottom:1px solid var(--line); }
.sed-findtabs button, .sed-tabs button { border:0; background:none; color:var(--muted); padding:6px 10px; font-size:12.5px; border-bottom:2px solid transparent; margin-bottom:-1px; }
.sed-findtabs button[aria-selected="true"], .sed-tabs button[aria-selected="true"] { color:var(--amber-soft); border-bottom-color:var(--amber); }
.sed-findnote { margin:0; font-size:11.5px; color:var(--muted); line-height:1.5; }

/* ---- properties panel ---- */
.sed-props { padding:14px 14px 28px; }
.sed-ph { font-family:var(--ui); font-size:14.5px; font-weight:600; margin:0 0 6px; }
.sed-hint { margin:0 0 10px; color:var(--text-dim); font-size:12.5px; line-height:1.55; }
.sed-meta { margin:0 0 8px; color:var(--muted); font-family:var(--mono); font-size:11.5px; }
.sed-fontname { font-family:var(--mono); font-size:11px; color:var(--muted); margin-bottom:6px; word-break:break-all; }
.sed-row { display:flex; align-items:center; gap:8px; margin:9px 0; font-size:13px; }
.sed-row.col { flex-direction:column; align-items:stretch; gap:5px; }
.sed-lab { font-size:12px; color:var(--muted); min-width:58px; }
.sed-row input[type="number"] { width:72px; height:32px; padding:0 8px; }
.sed-row input[type="text"], .sed-row input[type="password"], .sed-row input:not([type]), .sed-row select, .sed-row textarea { height:34px; padding:0 9px; width:100%; }
.sed-row textarea { height:auto; padding:7px 9px; line-height:1.45; resize:vertical; }
.sed-row select { flex:1; }
.sed-row input[type="range"] { flex:1; accent-color:var(--amber); }
.sed-row output { font-family:var(--mono); font-size:11.5px; color:var(--text-dim); min-width:40px; text-align:right; }
.sed-unit { font-family:var(--mono); font-size:11.5px; color:var(--muted); }
.sed-seg { display:flex; align-items:center; gap:3px; flex-wrap:wrap; }
.sed-seg.wrap { flex-wrap:wrap; }
.sed-seg .ghost.on, .sed-seg .ghost[aria-checked="true"] { border-color:rgba(232,165,71,.6); color:var(--amber-soft); background:rgba(232,165,71,.12); }
.sed-swatches { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.sed-sw { width:22px; height:22px; padding:0; border-radius:50%; border:2px solid rgba(244,236,223,.18); background:var(--c); flex:none; }
.sed-sw.on, .sed-sw[aria-checked="true"] { box-shadow:0 0 0 2px var(--bg-2), 0 0 0 4px var(--amber); }
.sed-sw.none { background:linear-gradient(135deg, #fff 0 44%, var(--coral) 44% 56%, #fff 56%); }
.sed-swpick { position:relative; width:22px; height:22px; border-radius:50%; background:conic-gradient(#e74c3c, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c); cursor:pointer; flex:none; }
.sed-swpick input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; padding:0; border:0; }
.sed-swpick:focus-within { outline:2px solid var(--amber); outline-offset:2px; }
.sed-btnrow { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.sed-geom { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; margin:10px 0; align-items:end; }
.sed-geom label { display:grid; gap:3px; font-family:var(--mono); font-size:10.5px; color:var(--muted); }
.sed-geom input { width:100%; height:30px; padding:0 6px; font-family:var(--mono); font-size:12px; }
.sed-stamps { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:6px; }
.sed-stampbtn { border:2px solid var(--c); color:var(--c); background:#f7f2ea; border-radius:6px; padding:6px 4px; font-weight:800; font-size:12px; letter-spacing:.03em; text-transform:uppercase; }
.sed-stampbtn.on { box-shadow:0 0 0 2px var(--bg-2), 0 0 0 4px var(--amber); }
.sed-check { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--text-dim); margin:8px 0; cursor:pointer; line-height:1.45; }
.sed-check input { accent-color:var(--amber); margin-top:3px; flex:none; }
.sed-check small { display:block; color:var(--muted); font-size:11.5px; }
.sed-banner .sed-check { margin:0; align-items:center; }
.sed-banner .sed-check input { margin-top:0; }

/* ---- menus & popovers ---- */
.sed-menu { position:fixed; z-index:90; min-width:200px; max-height:min(70vh, 520px); overflow:auto; padding:6px; display:grid; gap:1px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); }
.sed-menu button[role^="menuitem"] { display:flex; align-items:center; gap:9px; text-align:left; border:0; background:none; color:var(--text-dim); padding:7px 10px; border-radius:6px; font-size:13px; min-height:34px; width:100%; }
.sed-menu button[role^="menuitem"]:hover, .sed-menu button[role^="menuitem"]:focus-visible { background:var(--surface-2); color:var(--text); outline:none; }
.sed-menu button[aria-checked="true"] { color:var(--amber-soft); }
.sed-menu button span { flex:1; }
.sed-menu kbd, .sed-keys kbd { font-family:var(--mono); font-size:11px; color:var(--muted); border:1px solid var(--line); border-radius:4px; padding:1px 5px; background:var(--bg); }
.sed-msep { height:1px; background:var(--line); margin:5px 2px; position:relative; }
.sed-msep span { position:absolute; left:8px; top:-8px; padding:0 6px; background:var(--surface); font-family:var(--mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.sed-msep:has(span) { margin:12px 2px 8px; }
.sed-mswatch { width:14px; height:14px; border-radius:3px; border:2px solid var(--c); background:#f7f2ea; flex:none; }
.sed-mpad { width:18px; flex:none; }
.sed-savepop { width:300px; padding:12px; gap:4px; }
.sed-savepop h3 { font-family:var(--ui); font-size:13px; font-weight:600; margin:0 0 4px; }
.sed-savepop .primary { margin-top:8px; }

/* ---- dialogs ---- */
dialog.sed-dlg { width:min(460px, calc(100% - 24px)); max-height:calc(100% - 24px); border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); color:var(--text); padding:0; box-shadow:var(--shadow); }
dialog.sed-dlg.wide { width:min(640px, calc(100% - 24px)); }
dialog.sed-dlg::backdrop { background:rgba(8,6,5,.7); }
.sed-dlgform { padding:18px 20px; display:grid; gap:10px; }
.sed-dlgform h2 { font-size:19px; }
.sed-dlgbody { display:grid; gap:4px; }
.sed-dlgactions { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin-top:6px; }
.sed-dlgactions button { min-height:40px; }
.sed-dl { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; margin:10px 0; font-size:12.5px; }
.sed-dl dt { color:var(--muted); font-size:11px; }
.sed-dl dd { margin:0; color:var(--text-dim); overflow-wrap:anywhere; }
.sed-fs { border:1px solid var(--line); border-radius:var(--radius); padding:8px 12px; margin:6px 0 0; }
.sed-fs legend { font-size:12px; color:var(--muted); padding:0 4px; }
.sed-props2 .sed-row { margin:6px 0; }
.sed-keys { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:6px 18px; margin:0; }
.sed-keys div { display:flex; justify-content:space-between; gap:10px; align-items:center; border-bottom:1px solid var(--line-soft); padding:4px 0; font-size:13px; }
.sed-keys dt, .sed-keys dd { margin:0; }
.sed-keys dd { color:var(--text-dim); text-align:right; }
/* signature dialog */
dialog.sed-sigdlg { width:min(620px, calc(100% - 20px)); }
.sed-tabs { display:flex; gap:2px; border-bottom:1px solid var(--line); }
.sed-sigbody { min-height:200px; display:grid; gap:8px; align-content:start; }
.sed-sigbody.shake { animation:sedShake .35s; }
@keyframes sedShake { 25% { transform:translateX(-6px); } 75% { transform:translateX(6px); } }
.sed-padwrap { position:relative; }
.sed-pad, .sed-typed { width:100%; aspect-ratio:1040/360; background:#fbf8f2; border:1px solid var(--line); border-radius:var(--radius); touch-action:none; display:block; cursor:crosshair; }
.sed-typed { aspect-ratio:1040/200; cursor:default; }
.sed-padline { position:absolute; left:6%; right:6%; bottom:26%; border-bottom:1px dashed #c9bda9; pointer-events:none; }
.sed-sigrow { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.sed-sigcolors { display:flex; gap:8px; }
.sed-uplprev { min-height:120px; display:grid; place-items:center; border:1px dashed var(--line); border-radius:var(--radius); background:#fbf8f2; padding:8px; }
.sed-uplcanvas { max-width:100%; max-height:200px; }
.sed-upl { justify-self:start; }
.sed-saved { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; }
.sed-saved li { position:relative; }
.sed-savedsig { width:100%; height:84px; border:1px solid var(--line); border-radius:var(--radius); background:#fbf8f2; display:grid; place-items:center; padding:6px; }
.sed-savedsig:hover { border-color:var(--amber); }
.sed-savedsig img { max-width:100%; max-height:70px; }
.sed-saved .icon { position:absolute; top:4px; right:4px; width:26px; height:26px; background:var(--surface); }

/* ---- left panel: pages & outline ---- */
.sed-lp { display:flex; flex-direction:column; height:100%; min-height:0; }
.sed-lphead { display:flex; align-items:center; gap:6px; padding:10px 8px 6px 12px; }
.sed-lphead h2 { font-family:var(--ui); font-size:13.5px; font-weight:600; flex:1; }
.sed-lphead .sed-meta { margin:0; }
.sed-lptools { display:flex; flex-wrap:wrap; gap:2px; padding:0 8px 8px; border-bottom:1px solid var(--line); }
.sed-thumbs { flex:1; min-height:0; overflow:auto; padding:10px 8px 20px; display:grid; gap:6px; align-content:start; position:relative; outline:none; }
.sed-thumb { display:grid; justify-items:center; gap:4px; padding:7px; border-radius:var(--radius); cursor:pointer; border:1px solid transparent; touch-action:pan-y; user-select:none; }
.sed-thumb:hover { background:var(--surface); }
.sed-thumb.sel { background:rgba(232,165,71,.13); border-color:rgba(232,165,71,.5); }
.sed-thumb.cur span { color:var(--amber-soft); }
.sed-thumb span { font-family:var(--mono); font-size:11px; color:var(--muted); }
.sed-tbox { width:132px; max-height:190px; background:#fff; box-shadow:0 1px 6px rgba(0,0,0,.45); display:grid; place-items:center; overflow:hidden; }
.sed-tbox canvas { width:100%; height:100%; display:block; }
.sed-thumbs.dragging .sed-thumb.sel { opacity:.5; }
.sed-dropmark { position:absolute; left:10px; right:10px; height:3px; border-radius:2px; background:var(--amber); pointer-events:none; }
.sed-lphint { margin:0; padding:8px 12px 12px; font-size:11.5px; color:var(--muted); line-height:1.5; border-top:1px solid var(--line-soft); }
.sed-otree { list-style:none; margin:0; padding:6px; overflow:auto; flex:1; }
.sed-orow { display:flex; align-items:center; gap:2px; padding-left:calc(var(--d) * 14px); border-radius:6px; }
.sed-orow.cur .sed-otitle { color:var(--amber-soft); }
.sed-orow:hover, .sed-orow:focus-within { background:var(--surface); }
.sed-otitle { flex:1; min-width:0; display:flex; gap:6px; align-items:baseline; border:0; background:none; color:var(--text-dim); text-align:left; padding:6px; font-size:12.5px; }
.sed-otitle span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.sed-otitle em { font-style:normal; font-family:var(--mono); font-size:10.5px; color:var(--muted); }
.sed-oacts { display:none; gap:0; flex:none; }
.sed-orow:hover .sed-oacts, .sed-orow:focus-within .sed-oacts { display:flex; }
.sed-oin { flex:1; min-width:0; height:28px; padding:0 6px; font-size:12.5px; }

/* ---- mobile dock ---- */
.sed-dock { display:none; }

@media (max-width: 1180px) {
  .sed-body { grid-template-columns:auto minmax(0,1fr) 250px; }
  .sed-glabel { display:none; }
  .sed-group { padding:0 4px; }
  .sed-file { flex-basis:170px; }
}
@media (max-width: 900px) {
  .sed-tools { justify-content:flex-start; }
  .sed-left { position:absolute; left:0; top:0; bottom:0; z-index:9; width:min(260px, 80vw); box-shadow:var(--shadow); }
  .sed-body { grid-template-columns:minmax(0,1fr) 250px; }
}
@media (max-width: 760px) {
  .sed-bar { min-height:52px; padding:5px 8px; gap:6px; }
  .sed-tools, .sed-hide-sm { display:none !important; }
  .sed-file { flex:1 1 auto; }
  .sed-acts { gap:4px; }
  .sed-save span { display:none; }
  .sed-save { width:40px; padding:0; }
  .sed-body { grid-template-columns:minmax(0,1fr); }
  .sed-right { position:absolute; left:0; right:0; bottom:0; z-index:9; max-height:46%; border-left:0; border-top:1px solid var(--line); box-shadow:0 -12px 30px rgba(0,0,0,.5); display:none; border-radius:12px 12px 0 0; }
  .sed.has-props .sed-right { display:block; }
  .sed-pages { padding:12px 8px 80px; gap:12px; }
  .sed-dock { display:flex; gap:2px; overflow-x:auto; scrollbar-width:none; padding:4px 6px calc(4px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:#1b1611; }
  .sed-dock::-webkit-scrollbar { display:none; }
  .sed-dockbtn { flex:1 0 58px; display:grid; justify-items:center; gap:2px; padding:5px 2px; min-height:50px; border:1px solid transparent; border-radius:var(--radius); background:transparent; color:var(--text-dim); font-size:10.5px; line-height:1.1; }
  .sed-dockbtn .i { width:20px; height:20px; }
  .sed-dockbtn[aria-pressed="true"] { background:rgba(232,165,71,.16); color:var(--amber-soft); border-color:rgba(232,165,71,.45); }
  .sed-findbar { right:8px; left:8px; width:auto; }
  .sed-geom { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .sed-keys { grid-template-columns:1fr; }
  .sed-dl { grid-template-columns:1fr; }
  .sed-tool { width:38px; height:38px; }
}
@media (prefers-reduced-motion: reduce) { .sed-spin { animation:none; } .sed-sigbody.shake { animation:none; } }

/* ---- empty state (drop screen) extras ---- */
.ed-restore { display:flex; align-items:center; gap:14px; flex-wrap:wrap; justify-content:space-between; border:1px solid rgba(232,165,71,.5); border-radius:var(--radius); background:rgba(232,165,71,.08); padding:12px 14px; margin:0 0 14px; }
.ed-restore p { margin:0; color:var(--text-dim); font-size:13.5px; line-height:1.5; }
.ed-restore strong { color:var(--text); }
.ed-restore-actions { display:flex; gap:8px; }
.ed-features { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; margin-top:14px; }
.ed-feat { border:1px solid var(--line); border-radius:var(--radius); background:var(--bg-2); padding:12px 14px; }
.ed-feat h2 { display:flex; align-items:center; gap:8px; font-family:var(--ui); font-size:14px; font-weight:600; margin-bottom:6px; }
.ed-feat h2 .i { color:var(--amber); width:18px; height:18px; }
.ed-feat p { margin:0; color:var(--text-dim); font-size:12.5px; line-height:1.55; }
.ed-note { margin:12px 0 0; color:var(--muted); font-size:12.5px; line-height:1.55; }
@media (max-width: 860px) { .ed-features { grid-template-columns:1fr 1fr; } }
@media (max-width: 520px) { .ed-features { grid-template-columns:1fr; } }
