.tr4-site-bg {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(21, 25, 35, 0.1);
  border-radius: 14px;
  background: #fff;
}

.tr4-site-bg-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #151923;
}

.tr4-site-bg-sub {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.35;
}

.tr4-site-bg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.tr4-site-bg-card {
  appearance: none;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.75rem 0.65rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.tr4-site-bg-card:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.tr4-site-bg-card.is-active {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
  background: #f0fdfa;
}

.tr4-site-bg-card.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.tr4-site-bg-swatch {
  height: 44px;
  border-radius: 8px;
  margin-bottom: 0.55rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.tr4-site-bg-swatch.is-default {
  background: linear-gradient(135deg, #0f172a 0%, #334155 55%, #009436 100%);
}

.tr4-site-bg-swatch.is-white {
  background: #ffffff;
}

.tr4-site-bg-swatch.is-image {
  background-size: cover;
  background-position: center;
  background-color: #0b3d1a;
}

.tr4-site-bg-label {
  font-weight: 700;
  font-size: 0.84rem;
  color: #0f172a;
}

.tr4-site-bg-desc {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

.tr4-site-bg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  align-items: center;
}

.tr4-site-bg-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.tr4-site-bg-btn.is-primary {
  background: #0f766e;
  color: #fff;
}

.tr4-site-bg-btn.is-ghost {
  background: #f1f5f9;
  color: #0f172a;
}

.tr4-site-bg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tr4-site-bg-preview {
  margin-top: 0.85rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  min-height: 120px;
  background: #0b3d1a center / cover no-repeat;
}

.tr4-site-bg-hint {
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: #64748b;
}

.tr4-site-bg-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  background: #0f172a;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tr4-site-bg-toast.is-ok {
  background: #0f766e;
}

.tr4-site-bg-toast.is-err {
  background: #b42318;
}

.tr4-site-bg-toast.is-out {
  opacity: 0;
  transform: translateY(8px);
}

@media (max-width: 720px) {
  .tr4-site-bg-grid {
    grid-template-columns: 1fr;
  }
}
