.pe-insert-library {
  --lib-ink: var(--pe-ink, #212825);
  --lib-muted: var(--pe-sub, #54645d);
  --lib-accent: var(--pe-accent, #285440);
  --lib-border: var(--pe-line, #dce2de);
  display: grid;
  align-content: start;
  gap: 13px;
  color: var(--lib-ink);
}
.pe-insert-library h2 { margin: 0; padding-right: 32px; }
.pe-insert-library .pe-lib-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--lib-border);
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
  color: var(--lib-ink);
  font: inherit;
}
.pe-insert-library .pe-lib-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.pe-insert-library .pe-lib-categories button {
  width: auto;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--lib-border);
  border-radius: 20px;
  background: #fff;
  color: var(--lib-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.pe-insert-library .pe-lib-categories button[aria-pressed=true] {
  border-color: #afc6b9;
  background: var(--pe-light, #e9f2eb);
  color: var(--lib-accent);
}
.pe-lib-count { color: var(--lib-muted); font-size: 11px; }
.pe-insert-library[data-mode=add] .pe-lib-categories {gap:4px}
.pe-insert-library[data-mode=add] .pe-lib-categories button {padding-inline:7px}
.pe-insert-library .pe-lib-group + .pe-lib-group {margin-top:16px}
.pe-insert-library .pe-lib-group h3 {margin:0 0 7px;color:var(--lib-ink);font:650 13px/1.25 "Instrument Sans","Segoe UI",sans-serif}
.pe-insert-library .pe-add-grid.pe-lib-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.pe-insert-library .pe-add-grid button.pe-lib-tile {
  position:relative;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--lib-border);
  border-radius: 7px;
  background: #fff;
  color: var(--lib-ink);
  font: inherit;
  text-align: left;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.pe-lib-drag-handle {display:none}
@media (any-pointer:coarse) {
  .pe-insert-library .pe-add-grid button.pe-lib-tile {touch-action:pan-y}
  .pe-lib-drag-handle {
    position:absolute;top:2px;right:2px;display:grid;place-items:center;
    width:30px;height:30px;border:1px solid #bbc8bd;border-radius:6px;
    background:#fffffff2;color:#314a3e;touch-action:none;cursor:grab;
  }
  .pe-lib-drag-handle::after {
    content:'';width:10px;height:16px;
    background:radial-gradient(circle at 2px 2px,currentColor 1.4px,transparent 1.6px) 0 0 / 5px 5px;
  }
}
.pe-insert-library .pe-add-grid button.pe-lib-tile:hover {
  border-color: #719481;
  box-shadow: 0 1px 5px #233e7a1a;
}
.pe-insert-library .pe-add-grid button.pe-lib-tile:active { cursor: grabbing; }
.pe-insert-library :is(button,input):focus-visible {
  outline: 2px solid var(--lib-accent);
  outline-offset: 2px;
}
.pe-lib-caption {
  display: block;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.pe-lib-sample,.pe-lib-grid .pe-lib-tile > .pe-lib-photo {
  width: 100%;
  aspect-ratio: 1.8 / 1;
  box-sizing: border-box;
}
.pe-lib-sample {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f2f5fa;
  color: #324157;
}
.pe-lib-photo { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pe-insert-library[data-mode=add] .pe-lib-sample {height:48px;aspect-ratio:auto}
.pe-lib-widget {position:relative;display:block;width:48%;max-width:56px;height:26px;box-sizing:border-box;color:#42576c}
.pe-lib-widget-table {
  border:1px solid currentColor;border-radius:2px;
  background:linear-gradient(to bottom,#bad1d7 0 30%,transparent 30%),
    repeating-linear-gradient(to right,transparent 0 calc(33.33% - 1px),currentColor calc(33.33% - 1px) 33.33%),
    repeating-linear-gradient(to bottom,transparent 0 calc(33.33% - 1px),currentColor calc(33.33% - 1px) 33.33%);
}
.pe-lib-widget-faq {border-top:2px solid currentColor;border-bottom:2px solid currentColor;background:linear-gradient(currentColor,currentColor) left center/100% 1px no-repeat}
.pe-lib-widget-faq::before,.pe-lib-widget-faq::after {content:"";position:absolute;top:4px;left:3px;width:50%;height:2px;background:currentColor;box-shadow:0 13px currentColor}
.pe-lib-widget-faq::after {left:auto;right:4px;width:5px}
.pe-lib-widget-spacer {border-block:1px dashed currentColor;background:linear-gradient(currentColor,currentColor) center/1px 100% no-repeat}
.pe-lib-widget-spacer::before,.pe-lib-widget-spacer::after {content:"";position:absolute;left:50%;width:6px;height:6px;border:solid currentColor;border-width:1px 0 0 1px}
.pe-lib-widget-spacer::before {top:2px;transform:translateX(-50%) rotate(45deg)}
.pe-lib-widget-spacer::after {bottom:2px;transform:translateX(-50%) rotate(225deg)}
.pe-lib-grid .pe-lib-tile > .pe-lib-photo { height: auto; }
.pe-lib-stamp { font: 600 23px/1 Georgia,serif; }
.pe-lib-stamp[data-type=eyebrow] { font: 700 9px/1 system-ui,sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.pe-lib-stamp[data-type=text] { font: italic 700 25px/1 Georgia,serif; }
.pe-lib-stamp[data-type=brand] { font: 700 18px/1 Georgia,serif; }
.pe-lib-stamp[data-type=button] { padding: 6px 11px; border-radius: 4px; background: #334762; color: white; font: 600 10px/1 system-ui,sans-serif; }
.pe-lib-stamp[data-type=link] { color: #3562af; font: 600 13px/1 system-ui,sans-serif; text-decoration: underline; }
.pe-lib-stamp[data-type=code] { color: #336b70; font: 600 20px/1 monospace; }
.pe-lib-lines,.pe-lib-wire-text { display: grid; gap: 4px; width: 49%; }
.pe-lib-lines i,.pe-lib-wire-text i { display: block; height: 2px; border-radius: 2px; background: currentColor; opacity: .6; }
.pe-lib-lines i:last-child:not(:first-child) { width: 73%; }
.pe-lib-wire { display: flex; align-items: center; justify-content: space-between; gap: 6%; padding: 10%; color: #324457; background: #e7eff0; }
.pe-lib-wire-columns-two,.pe-lib-wire-columns-three {gap:5%;background:#edf1e8}
.pe-lib-column-preview {flex:1 1 0;height:78%;min-width:0;border:1px solid #9fae9e;border-radius:2px;
  background:repeating-linear-gradient(to bottom,#829482 0 2px,transparent 2px 5px) center/58% 12px no-repeat,#fafbf8}
.pe-lib-wire-text { width: 50%; position: relative; z-index: 1; }
.pe-lib-wire-text i:first-child { height: 5px; opacity: .9; }
.pe-lib-wire-text i:last-child { width: 68%; }
.pe-lib-wire .pe-lib-photo { width: 43%; height: 100%; border-radius: 2px; }
.pe-lib-wire-spotlight { align-items: end; color: white; }
.pe-lib-wire-spotlight .pe-lib-photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; filter: brightness(.57); }
.pe-lib-wire-about { flex-direction: row-reverse; color: #5e4857; background: #f3e9e6; }
.pe-lib-wire-about .pe-lib-photo { border-radius: 12px 12px 2px 2px; }
.pe-lib-wire-copy,.pe-lib-wire-questions { justify-content: center; background: #f1ede6; color: #6b5546; }
.pe-lib-wire-copy .pe-lib-wire-text,.pe-lib-wire-questions .pe-lib-wire-text { width: 77%; }
.pe-lib-wire-questions .pe-lib-wire-text { gap: 6px; }
.pe-lib-wire-questions .pe-lib-wire-text i { width: 100%; height: 3px; }
.pe-lib-wire-services { flex-direction: column; align-items: start; justify-content: center; gap: 7px; color: #3d5f61; background: #e8f2ec; }
.pe-lib-wire-services .pe-lib-wire-extra { width: 100%; height: 30%; background: repeating-linear-gradient(to right,#9ebcb1 0 27%,transparent 27% 36%); }
.pe-lib-wire-contact { color: #eee8dc; background: #3c4650; }
.pe-lib-wire-contact .pe-lib-wire-extra { width: 25%; height: 20%; border-radius: 4px; background: #d7cba8; }
.pe-lib-wire-navigation,.pe-lib-wire-footer { color: #586379; background: #e9edf5; }
.pe-lib-wire-navigation .pe-lib-wire-text,.pe-lib-wire-footer .pe-lib-wire-text { width: 33%; }
.pe-lib-wire-navigation .pe-lib-wire-text i:not(:first-child),.pe-lib-wire-footer .pe-lib-wire-text i:not(:first-child) { display: none; }
.pe-lib-wire-navigation .pe-lib-wire-extra,.pe-lib-wire-footer .pe-lib-wire-extra { width: 41%; height: 2px; background: repeating-linear-gradient(to right,currentColor 0 21%, transparent 21% 32%); }
.pe-lib-wire-footer { color: #d8e3ed; background: #3b4a57; }
.pe-lib-empty { color: var(--lib-muted); font-size: 13px; line-height: 1.5; }
.pe-insert-library button.pe-lib-more,.pe-insert-library button.pe-lib-upload {
  width: 100%;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid var(--lib-border);
  background: white;
  color: var(--lib-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.pe-insert-library button.pe-lib-more { margin-top: 9px; }
.pe-insert-library button.pe-lib-upload { border-color: var(--lib-accent); background: var(--lib-accent); color: white; }
.pe-image-picker {
  box-sizing:border-box;
  width:min(640px,calc(100vw - 24px));
  height:min(700px,calc(100dvh - 30px));
  max-width:none;
  max-height:calc(100dvh - 30px);
  margin:auto;
  padding:0;
  overflow:hidden;
  color:#212825;
  background:#fff;
  border:1px solid #c8d3cb;
  border-radius:13px;
  box-shadow:0 20px 80px #23352840;
  font:400 14px/1.4 "Instrument Sans","Segoe UI",Arial,sans-serif;
}
.pe-image-picker[open] {display:grid;grid-template-rows:minmax(0,1fr) auto}
.pe-image-picker::backdrop {background:#17251dd1}
.pe-image-picker .pe-insert-library {
  min-width:0;min-height:0;padding:20px 20px 0;align-content:stretch;
  grid-template-rows:auto auto auto auto minmax(0,1fr);
}
.pe-image-picker .pe-insert-library:has(.pe-lib-upload) {grid-template-rows:auto auto auto auto auto minmax(0,1fr)}
.pe-image-picker h2 {font-size:22px;line-height:1.15;padding:0}
.pe-image-picker .pe-lib-results {overflow:auto;overscroll-behavior:contain;padding:3px 4px 12px}
.pe-image-picker .pe-insert-library .pe-lib-grid {grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
.pe-image-picker .pe-insert-library .pe-lib-tile {touch-action:pan-y;cursor:pointer}
.pe-image-picker .pe-insert-library .pe-lib-tile:active {cursor:pointer}
.pe-image-picker-actions {display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:10px 20px;border-top:1px solid #dce2de}
.pe-image-picker-feedback {margin-inline-end:auto;color:#8d3327;font-size:13px}
.pe-image-picker-feedback[data-pending] {color:#42604a}
.pe-image-picker-actions button {min-height:36px;padding:7px 15px;border:1px solid #c8d3cb;border-radius:7px;background:#fff;color:#24352b;font:inherit;cursor:pointer}
