.tr4-site-layouts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, currentColor 3%, transparent);
}

.tr4-layouts-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.tr4-layouts-sub {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 2px;
}

.tr4-layouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.tr4-layout-card {
  appearance: none;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, #fff 92%, transparent);
  color: inherit;
  text-align: left;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.tr4-layout-card:hover {
  border-color: color-mix(in srgb, var(--brand, #db3409) 55%, currentColor);
  transform: translateY(-1px);
}

.tr4-layout-card.is-active {
  border-color: #db3409;
  box-shadow: 0 0 0 2px color-mix(in srgb, #db3409 28%, transparent);
}

.tr4-layout-card.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.tr4-layout-preview {
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--p2, #16181a);
  position: relative;
}

.tr4-layout-preview-bar {
  height: 18px;
  background: var(--p1, #db3409);
}

.tr4-layout-preview-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
}

.tr4-layout-preview-chip {
  width: 42%;
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 18%, transparent);
}

.tr4-layout-preview-btn {
  width: 56px;
  height: 22px;
  border-radius: 6px;
  background: var(--p3, #11d157);
}

.tr4-layout-label {
  font-size: 0.85rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.tr4-layout-desc {
  font-size: 0.72rem;
  opacity: 0.72;
  line-height: 1.35;
  margin-top: 2px;
}

.tr4-layout-swatches {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.tr4-layout-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #000 20%, transparent);
}

.tr4-layout-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  background: #151923;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tr4-layout-toast.is-ok {
  background: #0f7a3a;
}

.tr4-layout-toast.is-err {
  background: #b42318;
}

.tr4-layout-toast.is-out {
  opacity: 0;
  transform: translateY(6px);
}

@media (prefers-color-scheme: dark) {
  .tr4-layout-card {
    background: color-mix(in srgb, #111 88%, transparent);
  }
}
