.pc-dialog {
  box-sizing: border-box;
  width: min(960px, calc(100% - 24px));
  max-height: 92vh;
  max-height: 92dvh;
  padding: clamp(14px, 2.5vw, 26px);
  overflow: auto;
  overscroll-behavior: contain;
  color: #222922;
  background: #fffef9;
  border: 1px solid #a9ac9f;
  border-radius: 10px;
  box-shadow: 0 18px 80px #14181255;
  font: 15px/1.5 var(--body, system-ui, sans-serif);
}
.pc-dialog::backdrop { background: #1b201ccd; }
.pc-dialog h2, .pc-dialog h3 { margin: 0; }
.pc-dialog h2 { font-size: 1.35rem; overflow-wrap: anywhere; }
.pc-dialog h3 { font-size: 1rem; }
.pc-dialog p { margin: .55rem 0 1rem; }
.pc-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pc-tools, .pc-coords, .pc-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pc-tools { margin: 8px 0; }
.pc-dialog button, .pc-coords input {
  box-sizing: border-box; min-height: 34px; padding: 4px 9px; border: 1px solid #bfc1b5;
  border-radius: 4px; background: #fffef9; color: inherit; font: inherit;
}
.pc-dialog button { cursor: pointer; }
.pc-dialog button[aria-pressed=true] { color: #543d18; border-color: #876832; background: #f1e7d3; }
.pc-dialog :focus-visible { outline: 3px solid #286c8c; outline-offset: 2px; }
.pc-view, .pc-preview > svg {
  background-color: #f6f5ef;
  background-image: repeating-conic-gradient(#e3e4db 0 25%, transparent 0 50%);
  background-size: 16px 16px;
  border: 1px solid #c5c8bb;
}
.pc-view svg, .pc-preview > svg { width: 100%; display: block; }
.pc-view svg { height: clamp(160px, 25vh, 260px); cursor: crosshair; touch-action: none; user-select: none; }
.pc-pan svg { cursor: grab; }
.pc-pan svg:active { cursor: grabbing; }
.pc-coords { margin: 7px 0; font-size: .85rem; }
.pc-coords input { width: 5.4rem; }
.pc-preview { display: grid; grid-template-columns: minmax(8rem, .4fr) 1fr; align-items: center; gap: 15px; padding-top: 14px; }
.pc-preview label { display: grid; gap: 4px; margin-top: 8px; font-size: .85rem; }
.pc-preview input { width: 100%; }
.pc-preview > svg { box-sizing: border-box; height: 115px; }
.pc-status { color: #485347; }
.pc-footer { justify-content: flex-end; }
.pc-footer [data-reset] { margin-right: auto; }
.pc-footer [data-apply] { color: white; background: #303d33; }
.pc-dialog button:disabled { color: #5b6259; background: #e3e5dd; cursor: default; }
@media (max-width: 650px) {
  .pc-panels { grid-template-columns: 1fr; gap: 12px; }
  .pc-view svg { height: 168px; }
  .pc-dialog button { min-height: 40px; }
}
