.studio-placement-guides {
  margin: 2px 0 6px;
  padding: 14px;
  border: 1px solid #d3dfd8;
  border-radius: 14px;
  background: #f5faf7;
  color: #234c48;
}

.placement-controls-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.placement-controls-heading h3 { margin: 0; font: 700 15px/1.4 Inter, Arial, sans-serif; }
.placement-surface-name { margin: 5px 0; font-size: 12px; font-weight: 600; }
.placement-coordinate-help { margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: #526c63; }
.placement-coordinate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.placement-coordinate-fields label { display: grid; gap: 6px; min-width: 0; font-size: 12px; font-weight: 700; }
.placement-coordinate-fields input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid #b9cec1;
  border-radius: 9px;
  background: white;
  color: #234c48;
  font: 500 16px/1.4 Inter, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
.placement-center-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.studio-placement-guides button {
  min-height: 44px;
  border: 1px solid #bccfc2;
  border-radius: 9px;
  padding: 8px;
  background: #fff;
  color: #234c48;
  font: 600 12px/1.4 Inter, Arial, sans-serif;
  cursor: pointer;
}
.studio-placement-guides :disabled { opacity: .6; cursor: not-allowed; }
.studio-placement-guides :focus-visible { outline: 3px solid #4d8b73; outline-offset: 2px; }
.placement-coordinate-status { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: #725a2b; }

.print-layout.has-placement-rulers {
  --placement-ruler-space-x: 68px;
  --placement-ruler-space-y: 60px;
}
.placement-guides-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.placement-grid {
  position: absolute;
  background-image: linear-gradient(to right, #285d5440 1px, transparent 1px), linear-gradient(to bottom, #285d5440 1px, transparent 1px);
  background-position: 0 0;
}
.placement-ruler { position: absolute; color: #173f36; background: #f9fcfa; font: 600 10px/1 Inter, Arial, sans-serif; font-variant-numeric: tabular-nums; }
.placement-ruler-horizontal { top: -22px; height: 19px; border-bottom: 1px solid #73988b; }
.placement-ruler-vertical { left: -28px; width: 25px; border-right: 1px solid #73988b; }
.placement-ruler-tick { position: absolute; width: 0; height: 0; }
.placement-ruler-horizontal .placement-ruler-tick { bottom: 0; }
.placement-ruler-vertical .placement-ruler-tick { right: 0; }
.placement-ruler-tick::after { position: absolute; content: ""; background: #52786c; }
.placement-ruler-horizontal .placement-ruler-tick::after { width: 1px; height: 5px; bottom: 0; }
.placement-ruler-vertical .placement-ruler-tick::after { height: 1px; width: 5px; right: 0; }
.placement-ruler-horizontal .placement-ruler-tick > span { position: absolute; bottom: 7px; left: 0; transform: translateX(-50%); white-space: nowrap; }
.placement-ruler-vertical .placement-ruler-tick > span { position: absolute; right: 7px; top: 0; transform: translateY(-50%); white-space: nowrap; }
.placement-center-line { position: absolute; opacity: .85; }
.placement-center-line-x { top: 0; bottom: 0; width: 0; border-left: 1px dashed #a92469; }
.placement-center-line-y { left: 0; right: 0; height: 0; border-top: 1px dashed #a92469; }
.placement-text-center {
  position: absolute;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border: 2px solid #a92469;
  border-radius: 50%;
  background: #fff9;
  box-shadow: 0 0 0 1px white;
}
.placement-text-drag {
  position: absolute;
  z-index: 3;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid #a92469;
  border-radius: 50%;
  background: #fffffff0;
  color: #8b1754;
  font: 28px/1 Arial, sans-serif;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
}
.placement-text-drag:active { cursor: grabbing; }
.placement-text-drag:focus-visible { outline: 3px solid #234c48; outline-offset: 3px; }
.placement-text-drag[hidden] { display: none; }

@media (max-width: 767px) {
  .studio-workspace #studio-layout [data-preview-representation="print"] .mockup-stage:has(.has-placement-rulers) { min-height: 270px; }
  .studio-placement-guides { padding: 12px; }
}
