/* ===== QR-ГЕНЕРАТОР PLAYGROUND ===== */
.qr-tool {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(280px, 340px);
  gap: 1.75rem;
  justify-content: center;
  align-items: start;
  max-width: 820px;
}

@media (max-width: 767px) {
  .qr-tool {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

.qr-tool__panel {
  width: 100%;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

.qr-tool__frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1 / 1;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

.qr-frame-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem;
  text-align: center;
}

#qr-code-image {
  max-width: 190px;
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* Уголки-маячки — отсылка к finder-паттернам QR-кода */
.qr-frame-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid var(--card-border);
  pointer-events: none;
}
.qr-frame-corner--tl { top: 12px; left: 12px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.qr-frame-corner--tr { top: 12px; right: 12px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.qr-frame-corner--bl { bottom: 12px; left: 12px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }

.qr-error {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* Пресеты и Playground контролы */
.qr-preset-pill {
  cursor: pointer;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 15px;
  transition: all 0.15s ease;
}

.qr-preset-pill:hover {
  background-color: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.color-swatch-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch:hover,
.color-swatch.active {
  transform: scale(1.15);
  border-color: var(--card-border);
  box-shadow: 0 0 0 2px var(--accent-color);
}

.qr-meta-badge {
  font-size: 0.75rem;
  background-color: rgba(99, 102, 241, 0.08);
  color: var(--accent-color);
  border-radius: 12px;
  padding: 2px 8px;
}
