[data-theme="paper"] {
  --bg: #f4ecd8;
  --bg-panel: #faf4e6;
  --bg-sunken: #e9dec4;
  --bg-elev: #fffaf0;
  --border: #d8c9a8;
  --border-strong: #b8a67f;
  --text: #3a3226;
  --text-dim: #6f6450;
  --text-faint: #706856;
  --accent: #9c5a2d;
  --accent-soft: #ecdcc4;
  --accent-text: #ffffff;
  --good: #516a43;
  --warn: #786023;
  --bad: #a5453a;
}

[data-theme="midnight"] {
  --bg: #0d1524;
  --bg-panel: #121c2f;
  --bg-sunken: #0a1120;
  --bg-elev: #18233a;
  --border: #23324c;
  --border-strong: #35496b;
  --text: #dbe4f2;
  --text-dim: #93a3bd;
  --text-faint: #77859c;
  --accent: #6ea8e0;
  --accent-soft: #1b2c44;
  --accent-text: #0d1524;
  --good: #6fb08a;
  --warn: #d0a95a;
  --bad: #e0786f;
}

[data-theme="terminal"] {
  --bg: #070b07;
  --bg-panel: #0d130d;
  --bg-sunken: #040704;
  --bg-elev: #121b12;
  --border: #1e2a1e;
  --border-strong: #2f4230;
  --text: #b8f0b0;
  --text-dim: #74b06d;
  --text-faint: #678760;
  --accent: #57d64a;
  --accent-soft: #143014;
  --accent-text: #041004;
  --good: #57d64a;
  --warn: #d6c34a;
  --bad: #e0664a;
  --font: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="gruvbox"] {
  --bg: #282828;
  --bg-panel: #32302f;
  --bg-sunken: #1d2021;
  --bg-elev: #3c3836;
  --border: #504945;
  --border-strong: #665c54;
  --text: #ebdbb2;
  --text-dim: #bdae93;
  --text-faint: #a3978a;
  --accent: #d79921;
  --accent-soft: #4a3f2a;
  --accent-text: #1d2021;
  --good: #a5a41c;
  --warn: #d79921;
  --bad: #fc7161;
}

[data-theme="nord"] {
  --bg: #2e3440;
  --bg-panel: #3b4252;
  --bg-sunken: #272c36;
  --bg-elev: #434c5e;
  --border: #4c566a;
  --border-strong: #616e88;
  --text: #eceff4;
  --text-dim: #d8dee9;
  --text-faint: #a6afbe;
  --accent: #88c0d0;
  --accent-soft: #3b4a56;
  --accent-text: #2e3440;
  --good: #a3be8c;
  --warn: #ebcb8b;
  --bad: #d9a2a8;
}

[data-theme="rose"] {
  --bg: #fdf2f4;
  --bg-panel: #fff7f8;
  --bg-sunken: #f6e3e7;
  --bg-elev: #ffffff;
  --border: #eed3d9;
  --border-strong: #d8aeb8;
  --text: #3c2430;
  --text-dim: #7a5563;
  --text-faint: #806a71;
  --accent: #b5496b;
  --accent-soft: #f4dbe3;
  --accent-text: #ffffff;
  --good: #597348;
  --warn: #87612e;
  --bad: #b53a4a;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}
.theme-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  cursor: pointer;
  text-align: left;
}
.theme-card:hover {
  border-color: var(--border-strong);
}
.theme-card.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.theme-swatch {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.theme-swatch > span {
  display: block;
}
.theme-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.theme-card.selected .theme-label {
  color: var(--accent);
}
