/* Cada bloque incluye la paleta completa para que funcione también en las vistas previas. */

[data-look="clasico"] {
  --bg: #f6f5fb;
  --card: #ffffff;
  --text: #1b1a23;
  --muted: #5c596c;
  --line: #dfdcea;
  --field: #eeecf5;
  --accent: #5140c9;
  --accent-soft: #e9e4ff;
  --brand: #5140c9;
  --danger: #962438;
  --danger-soft: #fae4e7;
  --ok: #215c3c;
  --ok-soft: #dff2e6;
  --warn: #674400;
  --warn-soft: #f9edcd;
  --shadow: 0 1px 2px rgb(30 25 60 / 0.08);
  --radius: 12px;
  --font: system-ui, "Segoe UI", sans-serif;
  --font-title: var(--font);
  --card-padding: 16px;
}

[data-look="clasico"].dark, .dark [data-look="clasico"] {
  --bg: #0f0f14;
  --card: #18181f;
  --text: #eeedf3;
  --muted: #aaa7ba;
  --line: #343341;
  --field: #23232d;
  --accent: #b0a6ff;
  --accent-soft: #2c2649;
  --brand: #b0a6ff;
  --danger: #ffabb5;
  --danger-soft: #3e242b;
  --ok: #91ddb3;
  --ok-soft: #20382f;
  --warn: #ffd077;
  --warn-soft: #3d3019;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  --radius: 12px;
  --font: system-ui, "Segoe UI", sans-serif;
  --font-title: var(--font);
  --card-padding: 16px;
}

[data-look="papel"] {
  --bg: #f6f2e8;
  --card: #fffdf7;
  --text: #232935;
  --muted: #545b66;
  --line: #d6cfbf;
  --field: #efebdf;
  --accent: #284a77;
  --accent-soft: #e0e8f3;
  --brand: #284a77;
  --danger: #962438;
  --danger-soft: #fae4e7;
  --ok: #215c3c;
  --ok-soft: #dff2e6;
  --warn: #674400;
  --warn-soft: #f9edcd;
  --shadow: none;
  --radius: 4px;
  --font: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-title: Georgia, serif;
  --card-padding: 20px;
}

[data-look="papel"].dark, .dark [data-look="papel"] {
  --bg: #1a1b20;
  --card: #23252b;
  --text: #f0ede6;
  --muted: #b9b6b0;
  --line: #3e4149;
  --field: #2d3037;
  --accent: #aec9f1;
  --accent-soft: #2f3d52;
  --brand: #aec9f1;
  --danger: #ffabb5;
  --danger-soft: #3e242b;
  --ok: #91ddb3;
  --ok-soft: #20382f;
  --warn: #ffd077;
  --warn-soft: #3d3019;
  --shadow: none;
  --radius: 4px;
  --font: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-title: Georgia, serif;
  --card-padding: 20px;
}

[data-look="arcilla"] {
  --bg: #fbf1e7;
  --card: #fffaf4;
  --text: #33231e;
  --muted: #6e5247;
  --line: #e5ccbd;
  --field: #f3e4d8;
  --accent: #8d3e29;
  --accent-soft: #f6dfd2;
  --brand: #8d3e29;
  --danger: #962438;
  --danger-soft: #fae4e7;
  --ok: #215c3c;
  --ok-soft: #dff2e6;
  --warn: #674400;
  --warn-soft: #f9edcd;
  --shadow: none;
  --radius: 16px;
  --font: "Segoe UI", Roboto, sans-serif;
  --font-title: "Trebuchet MS", "Segoe UI", sans-serif;
  --card-padding: 20px;
}

[data-look="arcilla"].dark, .dark [data-look="arcilla"] {
  --bg: #221713;
  --card: #2e201a;
  --text: #faebe2;
  --muted: #d3b4a6;
  --line: #51382e;
  --field: #3b2a23;
  --accent: #ffaf93;
  --accent-soft: #503127;
  --brand: #ffaf93;
  --danger: #ffabb5;
  --danger-soft: #3e242b;
  --ok: #91ddb3;
  --ok-soft: #20382f;
  --warn: #ffd077;
  --warn-soft: #3d3019;
  --shadow: none;
  --radius: 16px;
  --font: "Segoe UI", Roboto, sans-serif;
  --font-title: "Trebuchet MS", "Segoe UI", sans-serif;
  --card-padding: 20px;
}

[data-look="bosque"] {
  --bg: #edf3eb;
  --card: #fbfdf7;
  --text: #202b22;
  --muted: #4b6051;
  --line: #cbd8c9;
  --field: #e4ede2;
  --accent: #24593d;
  --accent-soft: #d8eadb;
  --brand: #24593d;
  --danger: #962438;
  --danger-soft: #fae4e7;
  --ok: #215c3c;
  --ok-soft: #dff2e6;
  --warn: #674400;
  --warn-soft: #f9edcd;
  --shadow: none;
  --radius: 8px;
  --font: system-ui, "Segoe UI", sans-serif;
  --font-title: "Trebuchet MS", system-ui, sans-serif;
  --card-padding: 16px;
}

[data-look="bosque"].dark, .dark [data-look="bosque"] {
  --bg: #111c16;
  --card: #19271f;
  --text: #e8f2e9;
  --muted: #b5ccba;
  --line: #344b3c;
  --field: #23362a;
  --accent: #a0d9ae;
  --accent-soft: #2b4834;
  --brand: #a0d9ae;
  --danger: #ffabb5;
  --danger-soft: #3e242b;
  --ok: #91ddb3;
  --ok-soft: #20382f;
  --warn: #ffd077;
  --warn-soft: #3d3019;
  --shadow: none;
  --radius: 8px;
  --font: system-ui, "Segoe UI", sans-serif;
  --font-title: "Trebuchet MS", system-ui, sans-serif;
  --card-padding: 16px;
}

[data-look="tinta"] {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #101114;
  --muted: #474b54;
  --line: #8c919b;
  --field: #eceef1;
  --accent: #003fa5;
  --accent-soft: #dce8ff;
  --brand: #003fa5;
  --danger: #962438;
  --danger-soft: #fae4e7;
  --ok: #215c3c;
  --ok-soft: #dff2e6;
  --warn: #674400;
  --warn-soft: #f9edcd;
  --shadow: none;
  --radius: 6px;
  --font: system-ui, "Segoe UI", sans-serif;
  --font-title: "Arial Black", system-ui, sans-serif;
  --card-padding: 16px;
}

[data-look="tinta"].dark, .dark [data-look="tinta"] {
  --bg: #000000;
  --card: #0a0a0a;
  --text: #ffffff;
  --muted: #c5c5c5;
  --line: #62666e;
  --field: #17191d;
  --accent: #94bcff;
  --accent-soft: #182a49;
  --brand: #94bcff;
  --danger: #ffabb5;
  --danger-soft: #3e242b;
  --ok: #91ddb3;
  --ok-soft: #20382f;
  --warn: #ffd077;
  --warn-soft: #3d3019;
  --shadow: none;
  --radius: 6px;
  --font: system-ui, "Segoe UI", sans-serif;
  --font-title: "Arial Black", system-ui, sans-serif;
  --card-padding: 16px;
}

[data-look="terminal"] {
  --bg: #f8f2e1;
  --card: #fffbee;
  --text: #292510;
  --muted: #605737;
  --line: #d5c798;
  --field: #efe6c9;
  --accent: #684500;
  --accent-soft: #f1dfac;
  --brand: #684500;
  --danger: #962438;
  --danger-soft: #fae4e7;
  --ok: #215c3c;
  --ok-soft: #dff2e6;
  --warn: #674400;
  --warn-soft: #f9edcd;
  --shadow: none;
  --radius: 0px;
  --font: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --font-title: var(--font);
  --card-padding: 12px;
}

[data-look="terminal"].dark, .dark [data-look="terminal"] {
  --bg: #12110a;
  --card: #1b190f;
  --text: #f6edc9;
  --muted: #c4b887;
  --line: #544a2b;
  --field: #292515;
  --accent: #ffcd65;
  --accent-soft: #3c3016;
  --brand: #ffcd65;
  --danger: #ffabb5;
  --danger-soft: #3e242b;
  --ok: #91ddb3;
  --ok-soft: #20382f;
  --warn: #ffd077;
  --warn-soft: #3d3019;
  --shadow: none;
  --radius: 0px;
  --font: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --font-title: var(--font);
  --card-padding: 12px;
}

.look-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-block: 12px 16px;
}

@media (min-width: 560px) {
  .look-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.look-option {
  --button-bg: var(--card);
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-content: stretch;
  align-items: start;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  text-align: left;
  overflow-wrap: anywhere;
}

.look-option.selected {
  --button-bg: var(--accent-soft);
  --button-border: var(--accent);
}

.look-option.selected .look-name { color: var(--accent); }
.look-name { font-size: 0.9rem; font-weight: 700; }
.look-desc { color: var(--muted); font-size: 0.8rem; font-weight: 400; line-height: 1.35; }

.look-preview {
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: min(8px, var(--radius));
  font-family: var(--font);
}

.look-preview .lp-card {
  display: grid;
  gap: 4px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: min(6px, var(--radius));
  box-shadow: var(--shadow);
}

.lp-title { color: var(--text); font: 700 0.78rem/1.2 var(--font-title); }
.lp-line { width: 78%; height: 2px; background: var(--muted); }
.lp-line + .lp-line { width: 54%; }
.lp-button {
  width: 28px; height: 8px; margin-top: 4px;
  background: var(--accent);
  border-radius: min(3px, var(--radius));
}
