/* pdf-editor: styles only it uses, split out of site.css by scripts/split-css.mjs. */
.pe-bar { position: sticky; top: 72px; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 8px; margin: 0 -8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow-1); }
.pe-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.pe-tool-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px; padding: 6px 6px 4px; border: 1px solid transparent; border-radius: var(--r-control); background: none; color: var(--ink); font: 600 0.72rem var(--text); cursor: pointer; }
.pe-tool-btn svg { width: 20px; height: 20px; }
.pe-tool-btn:hover { background: var(--mist); }
.pe-tool-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pe-tool-btn:focus-visible, .pe-toggle:focus-visible { outline: 3px solid var(--signal); outline-offset: 1px; }
.pe-props { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.pe-prop { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--slate); }
.pe-prop[hidden], .pe-toggle[hidden] { display: none; }
.pe-prop input[type="color"] { width: 36px; height: 32px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--paper); }
.pe-prop input[type="range"] { width: 90px; }
.pe-prop select, .pe-prop input[type="number"] { width: auto; padding: 6px 30px 6px 10px; font-size: 0.9rem; }
.pe-prop input[type="number"] { width: 72px; padding-right: 8px; }
.pe-toggle { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--paper); color: var(--ink); cursor: pointer; }
.pe-toggle svg { width: 18px; height: 18px; }
.pe-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pe-toggle:disabled { opacity: 0.4; cursor: default; }
.pe-sep { width: 1px; height: 26px; margin: 0 4px; background: var(--line); }
.pe-zoom { min-width: 3.4em; text-align: center; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pe-hint { margin: 10px 0 8px; }
.pe-viewer { height: 78vh; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 16px 12px 36px; background: var(--mist); border-radius: var(--r-panel); border: 1px solid var(--line); }
.pe-page { position: relative; flex: none; background: #fff; box-shadow: var(--shadow-2); container-type: inline-size; touch-action: none; user-select: none; -webkit-user-select: none; }
.pe-viewer[data-tool="select"] .pe-page { touch-action: pan-y pinch-zoom; }
.pe-viewer:not([data-tool="select"]):not([data-tool="edit"]) .pe-page { cursor: crosshair; }
.pe-viewer[data-tool="text"] .pe-page { cursor: text; }
.pe-canvas { display: block; position: absolute; inset: 0; height: 100%; }
.pe-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pe-svg line, .pe-svg polyline { pointer-events: stroke; }
.pe-svg rect, .pe-svg ellipse { pointer-events: all; }
.pe-viewer:not([data-tool="select"]) .pe-svg * { pointer-events: none; }
.pe-layer { position: absolute; inset: 0; pointer-events: none; }
.pe-layer > * { pointer-events: auto; }
.pe-viewer:not([data-tool="select"]) .pe-layer > :not(.is-editing) { pointer-events: none; }
.pe-text { position: absolute; min-width: 0.5em; padding: 0; line-height: 1.2; white-space: pre; cursor: move; outline: none; }
.pe-text.is-editing { cursor: text; outline: 1.5px dashed var(--signal); outline-offset: 2px; user-select: text; -webkit-user-select: text; min-width: 2em; }
.pe-image { position: absolute; cursor: move; }
.pe-selection { position: absolute; border: 1.5px solid var(--signal); border-radius: 2px; cursor: move; touch-action: none; }
.pe-handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--signal); cursor: nwse-resize; }
.pe-texts { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.pe-text-item { position: absolute; pointer-events: auto; padding: 0; border: 0; background: rgb(255 90 31 / 0.08); outline: 1px solid rgb(255 90 31 / 0.35); cursor: text; }
.pe-text-item:hover, .pe-text-item:focus-visible { background: rgb(255 90 31 / 0.2); outline: 2px solid var(--signal); }
.pe-page-number { position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); font-size: 0.75rem; color: var(--slate); }
@media (max-width: 700px) { .pe-tool-btn { min-width: 44px; } .pe-tool-btn span { display: none; } .pe-viewer { height: 70vh; padding: 10px 6px 30px; } .pe-bar { top: 64px; } }
