.part-edge-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  border: 1px solid #333;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.part-edge-open-btn:focus-visible {
  outline: 2px solid #0a7f5a;
  outline-offset: 1px;
}

.part-edge-open-btn-active {
  box-shadow: 0 0 0 2px rgba(10, 127, 90, 0.35);
}

.part-edge-open-btn-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid #333;
  display: block;
}

.part-edge-banding-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}

.part-edge-banding-backdrop[hidden] {
  display: none !important;
}

.part-edge-banding-modal {
  width: min(860px, 96vw);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.25);
  pointer-events: auto;
}

.part-edge-banding-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.part-edge-banding-title {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

.part-edge-banding-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
}

.part-edge-banding-close:hover {
  background: #f3f4f6;
}

.part-edge-banding-body {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(220px, 290px);
  gap: 14px;
  padding: 14px;
}

.part-edge-banding-preview-wrap {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}

.part-edge-banding-preview {
  display: block;
  width: 100%;
  height: auto;
  min-height: 260px;
}

.part-edge-banding-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.part-edge-banding-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #334155;
}

.part-edge-banding-field input {
  min-height: 34px;
}

.part-edge-banding-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.part-edge-banding-side-grid .part-edge-banding-field {
  gap: 4px;
}

.part-edge-banding-side-grid .part-edge-banding-field span {
  font-size: 12px;
}

.part-edge-banding-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

.part-edge-banding-line strong {
  color: #0f172a;
}

.part-edge-banding-action {
  width: 100%;
  margin: 0;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.part-edge-banding-action:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.part-edge-banding-action:focus-visible {
  outline: 2px solid rgba(14, 165, 163, 0.35);
  outline-offset: 1px;
}

.part-edge-banding-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.part-edge-banding-warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.peb-edge-line {
  stroke: #6b7280;
  stroke-width: 1;
  stroke-linecap: round;
}

.peb-edge-line-active {
  stroke: #0a7f5a;
  stroke-width: 4;
}

.peb-edge-hit {
  pointer-events: stroke;
}

.peb-grain-line {
  stroke: #000;
  stroke-opacity: 0.6;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.peb-cad-contour {
  fill: none;
  stroke: #0f172a;
  stroke-width: 1.2;
  stroke-linejoin: round;
  stroke-dasharray: 4 2;
  pointer-events: none;
}

.peb-cad-cutout {
  fill: rgba(14, 165, 233, 0.08);
  stroke: #0369a1;
  stroke-width: 1.1;
  stroke-linejoin: round;
  stroke-dasharray: 5 3;
  pointer-events: none;
}

.peb-cad-groove {
  fill: rgba(20, 184, 166, 0.14);
  stroke: #0f766e;
  stroke-width: 1.1;
  stroke-linejoin: round;
  pointer-events: none;
}

.peb-cad-groove[data-side="bottom"] {
  fill: rgba(37, 99, 235, 0.12);
  stroke: #1d4ed8;
  stroke-dasharray: 3 2;
}

.peb-dim-label {
  fill: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(248, 250, 252, 0.98);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}

.peb-dim-label-vertical {
  font-size: 11px;
}

.peb-edge-thickness-label {
  fill: #0a7f5a;
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(248, 250, 252, 0.98);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.peb-edge-thickness-label-vertical {
  font-size: 9px;
}

@media (max-width: 880px) {
  .part-edge-banding-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .part-edge-banding-side-grid {
    grid-template-columns: 1fr;
  }
}
