.tpl-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  z-index: 1;
}
.tpl-badge.native { background: #1D1D1F; color: #F5F5F7; }
.tpl-badge.image { background: #0071E3; color: #fff; }

.slots-root {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
}
.slots-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.slots-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.slots-title strong {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slots-actions { display: flex; gap: 8px; }
.slots-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  padding: 16px 22px 24px;
  min-height: 0;
}
.slots-preview, .slots-form {
  min-height: 0;
  overflow: auto;
}
.slots-preview {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slots-preview img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  aspect-ratio: 16/9;
  object-fit: contain;
  display: block;
}
.slots-stage {
  position: relative;
  width: 100%;
}
.slots-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.slots-hotspot {
  position: absolute;
  box-sizing: border-box;
  padding: 2px 6px;
  overflow: hidden;
  cursor: text;
  line-height: 1.25;
  font-weight: 650;
  color: #111;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,113,227,0.18);
  border-radius: 3px;
  outline: none;
  pointer-events: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.slots-hotspot.is-active {
  border-color: #0071E3;
  box-shadow: 0 0 0 2px rgba(0,113,227,0.28);
  background: #fff;
  z-index: 2;
}
.slots-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}
.slots-field.is-active textarea {
  border-color: #0071E3;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}
.slots-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-2);
}
.slots-form { padding: 18px 18px 28px; }
.slots-page-label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.slots-field { margin-bottom: 14px; }
.slots-field label, .slots-table label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.slots-field label span { color: var(--text-3); font-weight: 400; font-size: 11px; }
.slots-field textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.55;
}
.slots-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.slots-table td {
  border: 1px solid var(--line);
  padding: 0;
}
.slots-table input {
  width: 100%;
  border: 0;
  padding: 8px;
  font: inherit;
  background: transparent;
}
@media (max-width: 980px) {
  .slots-layout { grid-template-columns: 1fr; }
}
