.pm-workbench {
  --pm-ink: var(--text, #252423);
  --pm-deep: #201f1d;
  --pm-primary: var(--primary, #33312f);
  --pm-mat: #fcfcfc;
  --pm-rule: var(--line, #e4e0da);
  --pm-copy: var(--muted, #5b5854);
  --pm-surface: var(--paper, #fcfbf9);
  --pm-selected: var(--selected, #eceae6);
  --pm-active-border: #b6b1aa;
  --pm-control: #fff;
  --pm-control-border: var(--pm-rule);
  --pm-upload-dot: #dddbd6;
  --pm-grid-dot: #e4e4e4;
  --pm-scrim: #252423a8;
  position: relative;
  color: var(--pm-ink);
  font-family: var(--body, system-ui, sans-serif);
}
html[data-theme="dark"] .pm-workbench {
  --pm-deep: #fff8ee;
  --pm-mat: #171614;
  --pm-active-border: #958a7d;
  --pm-control: var(--card, #282623);
  --pm-control-border: #7d7469;
  --pm-upload-dot: #524b42;
  --pm-grid-dot: #35322d;
  --pm-scrim: #0009;
}
.pm-workbench *, .pm-workbench *::before, .pm-workbench *::after { box-sizing: border-box; }
.pm-workbench [hidden] { display: none !important; }
.pm-workbench :focus-visible { outline: 3px solid var(--pm-primary); outline-offset: 3px; }
.pm-workbench :where(button) { font: inherit; }
.pm-workbench button:disabled { cursor: default; }
.pm-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pm-empty {
  display: grid;
  justify-items: center;
  text-align: center;
}
.pm-upload-zone {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  align-content: center;
  width: 100%;
  max-width: 560px;
  min-height: 264px;
  padding: 25px 20px 28px;
  border: 1px solid var(--pm-rule);
  border-radius: 22px;
  background: var(--pm-control);
  box-shadow: 0 2px 6px #25242306, 0 15px 34px #2524230e;
}
.pm-upload-zone::before {
  position: absolute;
  z-index: -1;
  inset: 0 13% auto;
  height: 156px;
  background-image: radial-gradient(var(--pm-upload-dot) 1px, transparent 1px);
  background-size: 15px 15px;
  mask-image: radial-gradient(ellipse closest-side, #000 15%, transparent);
  pointer-events: none;
  content: '';
}
.pm-empty[data-dragging] .pm-upload-zone,
.pm-empty.is-dragging .pm-upload-zone,
.pm-empty.is-drop-target .pm-upload-zone {
  border-color: var(--pm-primary);
  background: var(--pm-surface);
  box-shadow: 0 0 0 3px #33312f22;
}
.pm-upload-art {
  display: block;
  width: 152px;
  height: 110px;
  margin-bottom: 15px;
  object-fit: contain;
}
.pm-workbench .pm-upload-button {
  width: 100%;
  max-width: 210px;
  min-height: 50px;
  padding: 10px 18px;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.pm-upload-hint {
  margin-top: 12px;
  color: var(--pm-copy);
  font-size: 14px;
  line-height: 1.4;
  text-wrap: balance;
}
.pm-empty-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 20px;
  margin-top: 13px;
}
.pm-sample-link {
  min-height: 44px;
  padding: 4px 2px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--pm-primary);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pm-sample-link:hover { color: var(--pm-deep); }
.pm-private {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--pm-copy);
  font-size: 13px;
  line-height: 1.4;
}
.pm-lock { position: relative; width: .86em; height: .63em; flex: none; margin-top: .35em; border: .1em solid currentColor; border-radius: .13em; }
.pm-lock::before { content: ''; position: absolute; inset: -.45em .11em auto; height: .37em; border: .1em solid currentColor; border-bottom: 0; border-radius: .35em .35em 0 0; }
.pm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}
.pm-primary { color: var(--primary-text, #fff); background: var(--pm-primary); }
.pm-primary:hover:not(:disabled) { background: var(--pm-deep); }
.pm-primary:disabled { color: var(--pm-copy); background: var(--pm-selected); }
.pm-primary > span { font-size: 20px; font-weight: 500; line-height: .9; }
.pm-secondary { border-color: var(--pm-active-border); color: var(--pm-ink); background: transparent; }
.pm-secondary:hover:not(:disabled) { background: var(--pm-selected); }
.pm-status { margin: 0; color: var(--pm-copy); font-size: 14px; }
.pm-status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pm-status:not(:empty) { padding: 8px 10px; }
.pm-status[data-state="error"], .pm-status[data-error="true"], .pm-status.is-error { color: #8d352b; }
.pm-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(248px, 286px);
  grid-template-rows: 1fr auto;
  grid-template-areas: 'canvas panel' 'canvas action';
  align-items: start;
  gap: 0;
  border: 1px solid var(--pm-rule);
  border-radius: 16px;
  background: var(--pm-surface);
  box-shadow: 0 9px 26px #2524230b;
}
.pm-canvas-pane { grid-area: canvas; min-width: 0; align-self: stretch; border-right: 1px solid var(--pm-rule); }
.pm-toolbar, .pm-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pm-toolbar { height: 54px; padding: 0 12px; }
.pm-tool-group, .pm-selection-actions { display: flex; align-items: center; gap: 4px; }
.pm-icon-button, .pm-fit {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--pm-ink);
  font-size: 21px;
  line-height: 1;
}
.pm-icon-button:hover:not(:disabled), .pm-fit:hover:not(:disabled) { border-color: var(--pm-rule); background: var(--pm-selected); }
.pm-icon-button:disabled, .pm-fit:disabled { opacity: .38; }
.pm-fit { min-width: 37px; font-size: 13px; font-weight: 700; border-color: var(--pm-control-border); }
.pm-zoom-label { display: inline-block; min-width: 39px; text-align: center; color: var(--pm-copy); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-viewport {
  position: relative;
  height: clamp(324px, calc(100svh - 276px), 860px);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  border-block: 1px solid var(--pm-rule);
  background-color: var(--pm-mat);
  background-image: radial-gradient(var(--pm-grid-dot) 1px, transparent 1px);
  background-size: 17px 17px;
}
.pm-viewport [data-pm-canvas] { position: absolute; display: block; margin: 0; max-width: none; max-height: none; pointer-events: none; background: repeating-conic-gradient(var(--pm-control) 0 25%, var(--pm-rule) 0 50%) 0 0 / 14px 14px; box-shadow: 0 6px 22px #25242324; }
.pm-overlay { position: absolute; inset: 0; pointer-events: none; }
.pm-selection { min-height: 39px; padding: 2px 12px; background: var(--pm-selected); border-bottom: 1px solid var(--pm-rule); }
.pm-selection-name { min-width: 0; color: var(--pm-copy); font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-selection .pm-icon-button { min-height: 34px; }
.pm-remove:hover:not(:disabled) { color: #873829; }
.pm-source-strip { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 12px; min-width: 0; }
.pm-strip-title { display: flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.pm-count { display: inline-grid; place-items: center; min-width: 20px; padding-inline: 4px; border-radius: 5px; background: var(--pm-selected); color: var(--pm-primary); font-weight: 700; font-size: 11px; }
.pm-clear { flex: none; margin-left: auto; min-height: 32px; padding: 3px 4px; border: 0; background: transparent; color: var(--pm-primary); font-size: 12px; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.pm-strip-media { display: flex; flex: 1 1 auto; align-items: center; gap: 5px; min-width: 0; }
.pm-files { display: flex; flex: 0 1 auto; align-items: stretch; gap: 7px; margin: 0; padding: 2px 3px; min-width: 0; overflow: auto; scrollbar-width: thin; list-style: none; }
.pm-file { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; min-width: 100px; max-width: 205px; padding: 3px 5px; border: 1px solid var(--pm-rule); border-radius: 8px; background: var(--pm-control); }
.pm-file.is-selected, .pm-file[data-selected="true"], .pm-file[aria-current="true"], .pm-file[aria-selected="true"] { border-color: var(--pm-active-border); background: var(--pm-selected); }
.pm-file .pm-thumb, .pm-file > img { display: block; object-fit: cover; flex: none; width: 34px; height: 34px; border-radius: 4px; background: var(--pm-selected); }
.pm-file button.pm-thumb { padding: 0; border: 0; }
.pm-file .pm-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pm-file-text { display: grid; min-width: 0; font-size: 12px; line-height: 1.25; }
.pm-file-text strong, .pm-file-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-file-text small { margin-top: 3px; color: var(--pm-copy); }
.pm-file-actions { display: flex; flex: none; gap: 2px; }
.pm-file-action { display: grid; place-items: center; width: 27px; min-height: 34px; padding: 1px; border: 0; border-radius: 5px; background: var(--pm-selected); color: var(--pm-primary); font-size: 14px; }
.pm-file-action:disabled { opacity: .36; }
.pm-file-action:not(:disabled):hover { background: var(--pm-rule); }
.pm-file-action svg { width: 15px; height: 15px; }
.pm-panel { grid-area: panel; display: grid; gap: 13px; padding: 16px 14px 12px; min-width: 0; }
.pm-panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pm-panel-title { font: 700 17px/1.3 var(--body, system-ui, sans-serif); letter-spacing: -.03em; margin-right: auto; }
.pm-panel-close, .pm-panel-open { display: none; }
.pm-quickbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 7px 12px; padding: 0 12px 8px;
}
.pm-quick-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-width: 0; }
.pm-inline-field { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--pm-copy); font-size: 12px; font-weight: 700; }
.pm-inline-field > span:first-child { white-space: nowrap; }
.pm-inline-field select, .pm-format {
  min-width: 0; min-height: 36px; padding: 4px 6px; border: 1px solid var(--pm-control-border);
  border-radius: 7px; background: var(--pm-control); color: var(--pm-ink); font: 600 13px var(--body, system-ui, sans-serif);
}
.pm-inline-field select { max-width: 100%; }
.pm-field > span:first-child { padding: 0; color: var(--pm-ink); font-size: 12px; font-weight: 700; }
.pm-layout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.pm-layout {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 5px 9px;
  border: 1px solid var(--pm-rule); border-radius: 7px; background: var(--pm-control); color: var(--pm-primary);
  font-size: 12px; font-weight: 700; line-height: 1.2;
}
.pm-free-layout { justify-self: start; }
.pm-layout:disabled { opacity: .55; }
.pm-layout:hover, .pm-layout[aria-pressed="true"] { background: var(--pm-selected); border-color: var(--pm-active-border); color: var(--pm-primary); }
.pm-layout-icon { display: grid; flex: none; gap: 2px; width: 16px; height: 14px; }
.pm-layout-icon::before, .pm-layout-icon::after { content: ''; display: block; border: 1px solid currentColor; border-radius: 2px; }
.pm-icon-vertical { grid-template-rows: 1fr 1fr; width: 13px; }
.pm-icon-horizontal, .pm-icon-grid { grid-template-columns: 1fr 1fr; }
.pm-icon-grid::before, .pm-icon-grid::after { border: 0; background: linear-gradient(currentColor 0 43%, transparent 43% 57%, currentColor 57%); }
.pm-icon-free { position: relative; }
.pm-icon-free::before, .pm-icon-free::after { position: absolute; width: 9px; height: 8px; }
.pm-icon-free::before { top: 0; left: 0; }
.pm-icon-free::after { bottom: 0; right: 0; background: var(--pm-surface); }
.pm-fields, .pm-field-group { display: grid; gap: 9px; }
.pm-field { display: grid; align-content: start; gap: 4px; min-width: 0; }
.pm-size-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pm-field select, .pm-field input[type="text"], .pm-unit-field {
  width: 100%;
  height: 37px;
  min-width: 0;
  border: 1px solid var(--pm-control-border);
  border-radius: 6px;
  padding: 4px 7px;
  background: var(--pm-control);
  color: var(--pm-ink);
  font-size: 13px;
}
.pm-field :disabled { opacity: .5; }
.pm-unit-field { display: flex; align-items: center; padding-right: 5px; gap: 1px; }
.pm-unit-field:focus-within { outline: 2px solid var(--pm-primary); outline-offset: 2px; }
.pm-unit-field input { width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font-size: 13px; text-align: left; appearance: textfield; }
.pm-unit-field input:focus-visible { outline: none; }
.pm-unit-field input::-webkit-inner-spin-button, .pm-unit-field input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.pm-unit-field > span { color: var(--pm-copy); font-size: 11px; }
.pm-field-group { border-block: 1px solid var(--pm-rule); padding: 10px 0; }
.pm-scale input { width: 100%; margin: 0; min-height: 25px; accent-color: var(--pm-primary); }
.pm-check { display: flex; align-items: center; gap: 6px; color: var(--pm-copy); font-size: 12px; }
.pm-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--pm-primary); }
.pm-label-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pm-trim-toggle { font-size: 12px; font-weight: 700; }
.pm-trim-toggle[aria-expanded="true"] { border-color: var(--pm-active-border); background: var(--pm-selected); }
.pm-trim {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 7px 12px; border-bottom: 1px solid var(--pm-rule); background: var(--pm-surface);
}
.pm-trim .pm-unit-field { width: 72px; height: 34px; }
.pm-trim-actions { display: flex; margin-left: auto; gap: 4px; }
.pm-inline-button {
  min-height: 34px; padding: 4px 7px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--pm-primary); font-size: 12px; font-weight: 700;
}
.pm-inline-button:hover:not(:disabled) { background: var(--pm-selected); }
.pm-inline-button:disabled { opacity: .48; }
.pm-actionbar { grid-area: action; display: grid; align-self: end; gap: 7px; padding: 10px 12px 14px; }
.pm-export-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 8px; min-width: 0; }
.pm-export-dimensions { display: grid; gap: 3px; min-width: 0; }
.pm-export-width .pm-unit-field { width: 76px; min-height: 44px; }
.pm-export-width input { font-size: 16px; }
.pm-export-width-error { grid-column: 1 / -1; color: var(--pm-copy); font-size: 12px; }
.pm-output { color: var(--pm-ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-format-tip, .pm-scaled-note { color: var(--pm-copy); font-size: 12px; font-weight: 500; }
.pm-scaled-note { display: block; }
.pm-action-buttons { display: flex; align-items: stretch; gap: 5px; min-width: 0; }
.pm-action-buttons .pm-button { min-height: 44px; padding: 5px 7px; white-space: nowrap; font-size: 13px; }
.pm-action-buttons .pm-format { flex: none; width: 68px; min-height: 44px; }
.pm-action-buttons .pm-download { flex: 1 1 auto; min-width: 0; }
.pm-download [data-pm-download-type] { font: inherit; }
.pm-action-buttons .pm-copy { flex: none; }
.pm-action-buttons .pm-panel-open { min-width: 44px; padding-inline: 0; }
.pm-panel-open > span { font-size: 19px; }
.pm-export-status { display: contents; }
.pm-export-status .pm-status:not(:empty) { padding: 0; font-size: 12px; }
@media (max-width: 800px) {
  .pm-editor { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto; grid-template-areas: 'canvas' 'action'; }
  .pm-canvas-pane { border-right: 0; }
  .pm-viewport { height: clamp(288px, 61vw, 430px); }
  .pm-panel {
    display: none;
    position: fixed;
    z-index: 50;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(100% - 24px, 420px);
    max-height: min(78dvh, 570px);
    margin-inline: auto;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 14px;
    border: 1px solid var(--pm-rule);
    border-radius: 16px;
    background: var(--pm-surface);
    box-shadow: 0 0 0 100vmax var(--pm-scrim);
  }
  .pm-panel[data-open="true"], .pm-panel.is-open, .pm-workbench.is-panel-open .pm-panel { display: grid; }
  .pm-panel-close { display: inline-grid; }
  .pm-panel-open { display: inline-flex; }
  .pm-actionbar { position: sticky; z-index: 4; bottom: 0; margin: 0; border-top: 1px solid var(--pm-rule); border-radius: 0 0 15px 15px; background: var(--pm-surface); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .pm-layout, .pm-inline-field select, .pm-trim .pm-unit-field, .pm-inline-button { min-height: 44px; }
}
@media (max-width: 620px) {
  .pm-upload-zone { min-height: 226px; padding: 21px 16px 24px; border-radius: 18px; }
  .pm-upload-zone::before { height: 126px; }
  .pm-upload-art { width: 130px; height: 94px; margin-bottom: 12px; }
  .pm-upload-hint { font-size: 13px; }
  .pm-empty-meta { gap: 0 14px; margin-top: 10px; }
  .pm-toolbar { height: 47px; padding-inline: 7px; }
  .pm-quickbar { padding-inline: 8px; }
  .pm-quickbar .pm-layout-grid { width: 100%; }
  .pm-viewport { height: clamp(226px, 61vw, 370px); }
  .pm-source-strip, .pm-trim { padding-inline: 8px; }
  .pm-trim { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 8px; }
  .pm-trim .pm-inline-field { display: grid; gap: 2px; }
  .pm-trim .pm-unit-field { width: 100%; }
  .pm-trim-actions { grid-column: 1 / -1; }
  .pm-actionbar { padding: 7px 8px max(8px, env(safe-area-inset-bottom)); }
}
.pm-empty-undo {
  min-height: 33px;
  margin-top: 6px;
  padding: 3px 2px;
  border: 0;
  background: transparent;
  color: var(--pm-primary);
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pm-viewport.is-drop-target { box-shadow: inset 0 0 0 3px var(--pm-primary); }
.pm-viewport:focus-visible { outline-offset: -4px; }
.pm-viewport[data-panning] { cursor: grabbing; }
.pm-selection-box {
  position: absolute;
  border: 2px solid #f1b953;
  box-shadow: 0 0 0 1px var(--pm-primary);
  pointer-events: none;
}
.pm-resize-handle {
  position: absolute;
  z-index: 1;
  right: -11px;
  bottom: -11px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: nwse-resize;
  pointer-events: auto;
}
.pm-resize-handle::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid var(--pm-primary);
  border-radius: 2px;
  background: #f5c46b;
  box-shadow: 0 0 0 1px #fff9e8;
}
.pm-guide { position: absolute; z-index: 1; background: var(--pm-primary); box-shadow: 0 0 0 1px #fcfbf99e; pointer-events: none; }
.pm-guide-x { top: 0; width: 1px; height: 100%; }
.pm-guide-y { left: 0; width: 100%; height: 1px; }
.pm-file-select {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.pm-file-select:hover { color: var(--pm-primary); }
.pm-file-number { color: var(--pm-copy); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pm-file.is-drop-target { border-color: var(--pm-primary); box-shadow: inset 2px 0 var(--pm-primary); background: var(--pm-selected); }
.pm-scale:has(input:disabled) { display: none; }
.pm-range-heading { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.pm-range-heading output { color: var(--pm-copy); font-weight: 650; font-variant-numeric: tabular-nums; }
.pm-panel-backdrop { display: none; }
@media (max-width: 800px) {
  .pm-panel { box-shadow: 0 14px 35px #25242340; }
  .pm-panel-backdrop { display: block; position: fixed; z-index: 49; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--pm-scrim); }
  .pm-resize-handle { width: 28px; height: 28px; right: -14px; bottom: -14px; }
  .pm-resize-handle::before { inset: 8px; }
}

.pm-workbench { position: relative; }
.pm-workbench[data-pm-mode="free"] .pm-gap-field { display: none; }
.pm-workbench[data-pm-mode="free"] .pm-size-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.pm-target-box { position: absolute; border: 2px dashed var(--pm-primary); background: #33312f19; box-shadow: 0 0 0 1px var(--pm-selected); }
html[data-theme="dark"] :is(.pm-status[data-state="error"], .pm-status[data-error="true"], .pm-status.is-error, .pm-remove:hover:not(:disabled)) { color: #ffb8aa; }
html[data-theme="dark"] .pm-selection-box { box-shadow: 0 0 0 1px var(--pm-mat); }
html[data-theme="dark"] .pm-resize-handle::before { border-color: var(--pm-mat); }
html[data-theme="dark"] .pm-guide { box-shadow: 0 0 0 1px #171614b3; }
html[data-theme="dark"] .pm-target-box { background: #ebe5dd26; }
.pm-canvas-hint { color: var(--pm-copy); font-size: 12px; }
.pm-toolbar :is(button,input), .pm-panel :is(button,input), .pm-actionbar button { -webkit-tap-highlight-color: transparent; }
@media (max-width:800px){
  .pm-toolbar .pm-icon-button,.pm-toolbar .pm-fit,.pm-panel-close,.pm-selection .pm-icon-button { min-width:44px;min-height:44px; }
  .pm-selection { gap: 4px; padding-inline: 8px; }
  .pm-selection-actions { gap: 2px; }
  .pm-panel :is(select,input[type="text"],.pm-unit-field) { height:44px; }
  .pm-panel .pm-check { min-height:44px; }
  .pm-viewport:focus-visible { outline-offset:-4px; }
  .pm-canvas-hint { display:none; }
}

@media (max-width:360px){
  .pm-toolbar { padding-inline:3px; gap:4px; }
  .pm-toolbar .pm-tool-group { gap:2px; }
  .pm-toolbar .pm-zoom-label { min-width:31px; }
  .pm-layout { gap: 4px; padding-inline: 4px; }
  .pm-layout-grid .pm-layout-icon { width: 12px; }
  .pm-action-buttons .pm-download { padding-inline: 4px; }
  .pm-download [data-pm-download-type] { display: none; }
  .pm-action-buttons .pm-copy { padding-inline: 5px; }
}

@media (max-width:420px){
  .pm-file { min-width:84px; width:84px; }
  .pm-file-select { display:grid; width:100%; min-height:44px; grid-template-columns:30px minmax(0,1fr); grid-template-rows:auto auto; gap:1px 4px; }
  .pm-file .pm-thumb { grid-row:1 / 3; width:30px; height:38px; }
  .pm-file-number { align-self:end; }
  .pm-file-text { align-self:start; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}

.pm-add {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:36px;
  padding:4px 9px;
  border:1px solid var(--pm-active-border);
  border-radius:7px;
  background:transparent;
  color:var(--pm-primary);
  font-size:13px;
  font-weight:700;
  line-height:1.25;
}
.pm-add span { font-size:17px; font-weight:600; line-height:1; }
.pm-add:hover:not(:disabled) { background:var(--pm-selected); border-color:var(--pm-active-border); }
.pm-add:active:not(:disabled) { background:var(--pm-rule); }
.pm-add:disabled { opacity:.48; }
.pm-strip-add { flex:none; width:40px; min-height:40px; padding:0; border-style:dashed; }
.pm-strip-add span { font-size:20px; }
@media (max-width:800px){
  .pm-source-strip { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:2px 6px; padding:3px 8px 7px; }
  .pm-strip-media { grid-column:1/-1; grid-row:2; }
  .pm-strip-add { width:44px; min-height:44px; }
  .pm-clear { grid-column:2; grid-row:1; min-height:44px; }
  .pm-add-panel { display:none; }
}
@media (max-width:360px) {
  .pm-strip-title { gap:4px; font-size:12px; }
  .pm-source-prefix { display:none; }
  .pm-strip-title strong { text-transform:capitalize; }
}
