.atg { max-width: 760px; }

.atg-controls {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 14px; margin-bottom: 20px;
}
.atg-field { display: flex; flex-direction: column; gap: 4px; }
.atg-field label { font-size: 12.5px; font-weight: 700; color: #27331f; }
.atg-field select,
.atg-field input {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; color: #27331f; width: 100%; box-sizing: border-box;
}
.atg-field select:focus,
.atg-field input:focus { outline: 2px solid #19616a; outline-offset: 1px; }

.atg-preview-section { margin-bottom: 22px; }
.atg-preview-flag {
  margin: 0 0 10px; font-size: 12.5px; font-weight: 700; color: #19616a;
  background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px; padding: 8px 11px; display: inline-block;
}
.atg-preview-box {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 18px;
  background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 8px;
}
.atg-preview-svg-wrap { width: 200px; height: 200px; flex: 0 0 auto; }
.atg-svg { width: 100%; height: 100%; display: block; }
.atg-shape-group path,
.atg-shape-group rect,
.atg-shape-group ellipse { stroke-linejoin: round; }
.atg-inner-line { stroke: rgba(0,0,0,0.15); stroke-width: 2; fill: none; }
.atg-accent-line { fill: none; stroke-width: 3; stroke-linecap: round; }
.atg-accent-shape { opacity: 0.92; }
.atg-accent-ring { fill: none; stroke-width: 3.5; }

.atg-preview-legend { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: #27331f; }
.atg-swatch-row { display: flex; align-items: center; gap: 8px; }
.atg-swatch {
  display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid #d9e0d4; flex: 0 0 auto;
}
.atg-pattern-source { font-size: 12px; color: #5b6b56; font-style: italic; }

.atg-give-section { margin-bottom: 18px; }
.atg-give-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #27331f; }
.atg-target-field { max-width: 200px; margin-bottom: 10px; }

.atg-cmd-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: #fff; border: 1px solid #d9e0d4; border-radius: 6px;
}
.atg-cmd-row code { font-family: ui-monospace, monospace; font-size: 12.5px; color: #19616a; font-weight: 700; word-break: break-all; }

.atg-copy-btn {
  align-self: flex-start; padding: 7px 12px; font-size: 12.5px; font-weight: 700; border: 1px solid #d9e0d4;
  border-radius: 6px; background: #fff; color: #19616a; cursor: pointer;
}
.atg-copy-btn:hover { border-color: #19616a; }

.atg-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }

@media (max-width: 640px) {
  .atg-controls { grid-template-columns: 1fr; }
  .atg-preview-box { flex-direction: column; align-items: flex-start; }
}
