.pdf-workspace [hidden] { display:none !important; }
.pdf-workspace { overflow:hidden; }
.pdf-open { padding:20px clamp(16px,3vw,28px) 0; }
.pdf-drop {
  display:grid; grid-template-columns:auto 1fr; align-items:center; gap:3px 13px; cursor:pointer;
  padding:20px; border:1px dashed #a3baa9; border-radius:10px; background:#f4f8f1; color:var(--wb-ink);
}
.pdf-drop svg { grid-row:span 2; color:var(--wb-pine); }
.pdf-drop span,.pdf-file-name span,.pdf-properties p,.pdf-inspector p { color:var(--wb-subtle); font-size:.87rem; margin:0; }
.pdf-drop.is-drag,.pdf-open:focus-within .pdf-drop { outline:3px solid #a4d5b9; outline-offset:2px; }
.pdf-notice { margin:10px clamp(16px,3vw,28px); }
.pdf-notice p:empty { display:none; }
.pdf-notice [role=status] { font-size:.87rem; color:var(--wb-subtle); margin:0; }
.pdf-bar { padding:12px clamp(12px,2.5vw,24px); border-top:1px solid var(--wb-border); display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.pdf-file-bar { justify-content:space-between; }
.pdf-file-name { display:grid; gap:3px; min-width:0; max-width:100%; }
.pdf-file-name strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pdf-actions,.pdf-page-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.pdf-workspace .pdf-control { border:1px solid #c1cec4; background:#fff; }
.pdf-workspace .pdf-control[aria-pressed=true] { background:#dceddb; border-color:#80a68d; color:#153d2b; }
.pdf-tool-bar { background:#f2f6ef; }
.pdf-properties { padding:12px clamp(12px,2.5vw,24px); border-top:1px solid var(--wb-border); }
.pdf-options { display:flex; flex-wrap:wrap; align-items:flex-end; gap:9px; margin-top:9px; }
.pdf-options label,.pdf-form-grid label { display:grid; gap:5px; font-size:.84rem; font-weight:650; min-width:0; max-width:100%; }
.pdf-options input,.pdf-options textarea,.pdf-form-grid input:not([type=checkbox]),.pdf-form-grid textarea,.pdf-form-grid select,.pdf-zoom select {
  font:inherit; font-weight:400; background:#fff; color:var(--wb-ink); border:1px solid #b2c2b6; border-radius:6px; padding:7px; min-width:0; max-width:100%;
}
.pdf-options select { font:inherit; font-weight:400; background:#fff; color:var(--wb-ink); border:1px solid #b2c2b6; border-radius:6px; padding:7px; max-width:100%; }
.pdf-existing-text { padding-top:7px; }
.pdf-existing-text select { width:min(26rem,76vw); text-overflow:ellipsis; }
.pdf-existing-text input { width:min(23rem,76vw); }
.pdf-existing-text [data-run-font] { margin-top:7px; }
.pdf-options textarea { width:min(285px,65vw); resize:vertical; }
.pdf-options input[type=number] { width:5rem; }
.pdf-options input[type=color] { width:3rem; height:36px; padding:2px; }
.pdf-selection { margin-top:8px; }
.pdf-edit-layout { display:grid; grid-template-columns:150px minmax(0,1fr); border-top:1px solid var(--wb-border); }
.pdf-sidebar { background:#f7f9f4; padding:9px; border-right:1px solid var(--wb-border); min-width:0; }
.pdf-side-head { display:flex; flex-wrap:wrap; gap:4px; align-items:center; justify-content:space-between; }
.pdf-side-head h3 { font:inherit; font-weight:700; margin:0 0 0 3px; }
.pdf-page-list { list-style:none; padding:0; margin:6px 0 0; display:grid; gap:5px; max-height:550px; overflow:auto; }
.pdf-page-list li,.pdf-sidebar button { min-width:0; }
.pdf-workspace .pdf-page-chip {
  padding:7px 9px; border:1px solid #c0cec2; border-radius:8px; background:white; width:100%; text-align:left;
  font-size:.87rem; color:var(--wb-ink); display:grid; gap:3px;
}
.pdf-page-chip small { color:var(--wb-subtle); }
.pdf-page-chip[aria-current=true] { background:#dceddb; border-color:#80a68d; }
.pdf-stage { min-width:0; }
.pdf-page-actions { padding:9px; background:#f6f8f4; border-bottom:1px solid var(--wb-border); }
.pdf-zoom { margin-left:auto; font-size:.82rem; }
.pdf-viewport { padding:clamp(10px,2vw,20px); background:#dfe6df; min-height:230px; overflow:auto; max-height:76vh; }
.pdf-viewport > p { margin:0; color:#374a3e; }
.pdf-sheet { position:relative; background:#fff; margin:0 auto; box-shadow:0 2px 12px #20372b36; max-width:none; }
.pdf-sheet canvas { display:block; width:100%; height:100%; }
.pdf-sheet svg { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; }
.pdf-sheet svg text { white-space:pre; }
.pdf-sheet svg[data-mode=select] { cursor:default; }
.pdf-sheet svg[data-mode=text],.pdf-sheet svg[data-mode=image] { cursor:copy; }
.pdf-sheet svg [data-text-target] { fill:#4ea47825; stroke:#3e8965; stroke-width:1; vector-effect:non-scaling-stroke; cursor:text; }
.pdf-sheet svg [data-text-target]:hover,.pdf-sheet svg [data-text-target].is-selected { fill:#4ea47852; stroke:#257353; }
.pdf-sheet svg[data-mode=highlight],.pdf-sheet svg[data-mode=rectangle],.pdf-sheet svg[data-mode=ink] { cursor:crosshair; touch-action:none; }
.pdf-sheet svg [data-mark] { cursor:move; touch-action:none; }
.pdf-inspector { padding:0 12px; }
.pdf-inspector details { padding:12px 0; border-bottom:1px solid var(--wb-border); }
.pdf-inspector summary { cursor:pointer; font-weight:650; }
.pdf-inspector [data-mark-list] { margin:8px 0 0; padding:0; list-style:none; display:flex; flex-wrap:wrap; gap:6px; }
.pdf-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:12px; margin-top:10px; }
.pdf-form-grid input[type=checkbox] { width:20px; height:20px; accent-color:var(--wb-pine); }
@media(max-width:700px) {
  .pdf-edit-layout { grid-template-columns:minmax(0,1fr); }
  .pdf-sidebar { border-right:0; border-bottom:1px solid var(--wb-border); }
  .pdf-page-list { display:flex; max-height:none; }
  .pdf-page-list li { flex:0 0 auto; }
  .pdf-page-chip { min-width:85px; }
}
