.pa-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pa-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pa-editor__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pa-editor__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #5a1016;
  cursor: pointer;
  user-select: none;
}

.pa-editor__toggle input {
  width: 16px;
  height: 16px;
  accent-color: #b02a2a;
}

.pa-editor__nums {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pa-editor__num {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pa-editor__num span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #7a1620;
  opacity: 0.8;
}

.pa-editor__num input {
  width: 100%;
  min-height: 34px;
  padding-inline: 8px;
  font-size: 13px;
  color: #2a1a1a;
  background-color: #fff;
  border: 1px solid #e3d4c4;
  border-radius: 8px;
}

.pa-editor__num input:disabled {
  opacity: 0.5;
}

.pa-editor__readout {
  font-size: 12px;
  line-height: 1.5;
  color: #5a1016;
  opacity: 0.85;
}

.pa-editor__readout strong {
  font-weight: 700;
}

.pa-editor__readout .pa-editor__warn {
  color: #c0392b;
  font-weight: 700;
}

.pa-editor__stage {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  overflow: hidden;
  background-color: #f4efe9;
  background-image:
    linear-gradient(45deg, #e6ddd2 25%, transparent 25%),
    linear-gradient(-45deg, #e6ddd2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e6ddd2 75%),
    linear-gradient(-45deg, transparent 75%, #e6ddd2 75%);
  background-size: 18px 18px;
  background-position:
    0 0,
    0 9px,
    9px -9px,
    -9px 0;
  border: 1px solid #e3d4c4;
  border-radius: 10px;
  touch-action: none;
  user-select: none;
}

.pa-editor__stage:focus-visible {
  outline: 2px solid #b02a2a;
  outline-offset: 2px;
}

.pa-editor__stage[data-has-image="false"] {
  min-height: 180px;
}

.pa-editor__img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.pa-editor__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #7a1620;
  opacity: 0.7;
}

.pa-editor__box {
  position: absolute;
  box-sizing: border-box;
  border: 2px dashed #b02a2a;
  background-color: rgba(176, 42, 42, 0.08);
  box-shadow: 0 0 0 9999px rgba(42, 26, 26, 0.28);
  cursor: move;
}

.pa-editor__box[hidden] {
  display: none;
}

.pa-editor__handle {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  background-color: #fff;
  border: 2px solid #b02a2a;
  border-radius: 50%;
}

.pa-editor__handle--nw {
  left: 0;
  top: 0;
  cursor: nwse-resize;
}

.pa-editor__handle--n {
  left: 50%;
  top: 0;
  cursor: ns-resize;
}

.pa-editor__handle--ne {
  left: 100%;
  top: 0;
  cursor: nesw-resize;
}

.pa-editor__handle--e {
  left: 100%;
  top: 50%;
  cursor: ew-resize;
}

.pa-editor__handle--se {
  left: 100%;
  top: 100%;
  cursor: nwse-resize;
}

.pa-editor__handle--s {
  left: 50%;
  top: 100%;
  cursor: ns-resize;
}

.pa-editor__handle--sw {
  left: 0;
  top: 100%;
  cursor: nesw-resize;
}

.pa-editor__handle--w {
  left: 0;
  top: 50%;
  cursor: ew-resize;
}

.pa-editor__guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pa-editor__guides[hidden] {
  display: none;
}

.pa-editor__guide {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.6);
}

.pa-editor__guide--v {
  top: 0;
  bottom: 0;
  width: 1px;
}

.pa-editor__guide--h {
  left: 0;
  right: 0;
  height: 1px;
}

.item-line__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e3d4c4;
}

.pa-quad__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pa-quad__poly {
  fill: rgba(176, 42, 42, 0.12);
  stroke: #b02a2a;
  stroke-width: 1.5;
  stroke-dasharray: 5 3;
  vector-effect: non-scaling-stroke;
}

.pa-quad__handle {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  background-color: #fff;
  border: 2px solid #b02a2a;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
}
