.theme-panel {
  display: grid;
  gap: 1.25rem;
}

.theme-panel__groups {
  display: grid;
  gap: 1.25rem;
}

.theme-panel__group {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.5);
}

.theme-panel__group-title {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b87882;
  margin: 0 0 0.85rem;
}

.theme-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}

.theme-panel__field {
  display: grid;
  gap: 0.35rem;
}

.theme-panel__field label {
  font-size: 0.78rem;
  color: #5e5248;
}

.theme-panel__color {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-panel__color input[type="color"] {
  width: 42px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.theme-panel__color input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  font: inherit;
  font-size: 0.78rem;
}

.theme-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.theme-panel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.08);
  color: #1a1a1a;
}

.theme-panel__btn--primary {
  background: #1a1a1a;
  color: #fff;
}

.theme-panel__btn:hover { opacity: 0.9; }

.theme-panel__preview {
  height: 72px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--wall-bg);
}

.theme-panel__status {
  font-size: 0.88rem;
  color: #5e5248;
  margin: 0;
}

.theme-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(20, 18, 16, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.theme-panel-modal {
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 1.5rem;
  border-radius: 6px;
  background: #faf7f2;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.2);
}

.theme-panel-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.theme-panel-modal__head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0;
}

.theme-panel-modal__close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #5e5248;
}
