/**
 * Generic theme system: 20 themes (10 light, 10 dark).
 * Each theme sets the same token set; app uses var(--t-*) only.
 */

/* Token set used everywhere */
:root,
[data-theme] {
  --t-bg: #f5f0e8;
  --t-panel: #faf8f4;
  --t-ink: #1c1916;
  --t-muted: #57534e;
  --t-accent: #92400e;
  --t-accent-hover: #b45309;
  --t-accent-ink: #fff;
  --t-border: #d6d3d0;
  --t-grid: #fffefb;
  --t-cell: #fffefb;
  --t-cell-hover: #faf5ed;
  --t-cell-selected: #fef3c7;
  --t-found: #166534;
  --t-overlay: rgba(28, 25, 22, 0.4);
  --t-shadow: rgba(28, 25, 22, 0.08);
  --t-font-display: "Cinzel", Georgia, serif;
  --t-font-body: "DM Sans", system-ui, sans-serif;
}

/* --- LIGHT (1–10) --- */

/* 1: manuscript (default above) */

[data-theme="forest"] {
  --t-bg: #ecfdf5;
  --t-panel: #d1fae5;
  --t-ink: #064e3b;
  --t-muted: #047857;
  --t-accent: #059669;
  --t-accent-hover: #047857;
  --t-accent-ink: #fff;
  --t-border: #a7f3d0;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #ecfdf5;
  --t-cell-selected: #d1fae5;
  --t-found: #065f46;
  --t-overlay: rgba(4, 78, 59, 0.35);
  --t-shadow: rgba(4, 78, 59, 0.08);
  --t-font-display: Georgia, serif;
  --t-font-body: Georgia, serif;
}

[data-theme="ocean"] {
  --t-bg: #f0f9ff;
  --t-panel: #e0f2fe;
  --t-ink: #0c4a6e;
  --t-muted: #0369a1;
  --t-accent: #0284c7;
  --t-accent-hover: #0369a1;
  --t-accent-ink: #fff;
  --t-border: #bae6fd;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #f0f9ff;
  --t-cell-selected: #e0f2fe;
  --t-found: #0e7490;
  --t-overlay: rgba(12, 74, 110, 0.35);
  --t-shadow: rgba(12, 74, 110, 0.08);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="sunset"] {
  --t-bg: #fff7ed;
  --t-panel: #ffedd5;
  --t-ink: #7c2d12;
  --t-muted: #c2410c;
  --t-accent: #ea580c;
  --t-accent-hover: #c2410c;
  --t-accent-ink: #fff;
  --t-border: #fed7aa;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #fff7ed;
  --t-cell-selected: #ffedd5;
  --t-found: #b45309;
  --t-overlay: rgba(124, 45, 18, 0.35);
  --t-shadow: rgba(124, 45, 18, 0.08);
  --t-font-display: Georgia, serif;
  --t-font-body: Georgia, serif;
}

[data-theme="rose"] {
  --t-bg: #fff1f2;
  --t-panel: #ffe4e6;
  --t-ink: #881337;
  --t-muted: #be123c;
  --t-accent: #e11d48;
  --t-accent-hover: #be123c;
  --t-accent-ink: #fff;
  --t-border: #fecdd3;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #fff1f2;
  --t-cell-selected: #ffe4e6;
  --t-found: #9f1239;
  --t-overlay: rgba(136, 19, 55, 0.35);
  --t-shadow: rgba(136, 19, 55, 0.08);
  --t-font-display: Georgia, serif;
  --t-font-body: Georgia, serif;
}

[data-theme="lime"] {
  --t-bg: #f7fee7;
  --t-panel: #ecfccb;
  --t-ink: #365314;
  --t-muted: #65a30d;
  --t-accent: #84cc16;
  --t-accent-hover: #65a30d;
  --t-accent-ink: #fff;
  --t-border: #d9f99d;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #f7fee7;
  --t-cell-selected: #ecfccb;
  --t-found: #15803d;
  --t-overlay: rgba(54, 83, 20, 0.35);
  --t-shadow: rgba(54, 83, 20, 0.08);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="amber"] {
  --t-bg: #fffbeb;
  --t-panel: #fef3c7;
  --t-ink: #78350f;
  --t-muted: #b45309;
  --t-accent: #d97706;
  --t-accent-hover: #b45309;
  --t-accent-ink: #fff;
  --t-border: #fde68a;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #fffbeb;
  --t-cell-selected: #fef3c7;
  --t-found: #92400e;
  --t-overlay: rgba(120, 53, 15, 0.35);
  --t-shadow: rgba(120, 53, 15, 0.08);
  --t-font-display: Georgia, serif;
  --t-font-body: Georgia, serif;
}

[data-theme="violet"] {
  --t-bg: #f5f3ff;
  --t-panel: #ede9fe;
  --t-ink: #4c1d95;
  --t-muted: #6d28d9;
  --t-accent: #7c3aed;
  --t-accent-hover: #6d28d9;
  --t-accent-ink: #fff;
  --t-border: #ddd6fe;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #f5f3ff;
  --t-cell-selected: #ede9fe;
  --t-found: #5b21b6;
  --t-overlay: rgba(76, 29, 149, 0.35);
  --t-shadow: rgba(76, 29, 149, 0.08);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="emerald"] {
  --t-bg: #ecfdf5;
  --t-panel: #d1fae5;
  --t-ink: #022c22;
  --t-muted: #047857;
  --t-accent: #10b981;
  --t-accent-hover: #059669;
  --t-accent-ink: #fff;
  --t-border: #a7f3d0;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #ecfdf5;
  --t-cell-selected: #d1fae5;
  --t-found: #065f46;
  --t-overlay: rgba(2, 44, 34, 0.35);
  --t-shadow: rgba(2, 44, 34, 0.08);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="sky"] {
  --t-bg: #f0f9ff;
  --t-panel: #e0f2fe;
  --t-ink: #0c4a6e;
  --t-muted: #0284c7;
  --t-accent: #0ea5e9;
  --t-accent-hover: #0284c7;
  --t-accent-ink: #fff;
  --t-border: #bae6fd;
  --t-grid: #fff;
  --t-cell: #fff;
  --t-cell-hover: #f0f9ff;
  --t-cell-selected: #e0f2fe;
  --t-found: #0369a1;
  --t-overlay: rgba(12, 74, 110, 0.35);
  --t-shadow: rgba(12, 74, 110, 0.08);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

/* --- DARK (11–20) --- */

[data-theme="dracula"] {
  --t-bg: #282a36;
  --t-panel: #44475a;
  --t-ink: #f8f8f2;
  --t-muted: #6272a4;
  --t-accent: #bd93f9;
  --t-accent-hover: #ff79c6;
  --t-accent-ink: #282a36;
  --t-border: #6272a4;
  --t-grid: #44475a;
  --t-cell: #44475a;
  --t-cell-hover: #6272a4;
  --t-cell-selected: #bd93f9;
  --t-found: #50fa7b;
  --t-overlay: rgba(0, 0, 0, 0.65);
  --t-shadow: rgba(0, 0, 0, 0.35);
  --t-font-display: ui-monospace, monospace;
  --t-font-body: ui-monospace, monospace;
}

[data-theme="slate"] {
  --t-bg: #0f172a;
  --t-panel: #1e293b;
  --t-ink: #f1f5f9;
  --t-muted: #94a3b8;
  --t-accent: #38bdf8;
  --t-accent-hover: #7dd3fc;
  --t-accent-ink: #0f172a;
  --t-border: #334155;
  --t-grid: #1e293b;
  --t-cell: #1e293b;
  --t-cell-hover: #334155;
  --t-cell-selected: #0ea5e9;
  --t-found: #4ade80;
  --t-overlay: rgba(0, 0, 0, 0.7);
  --t-shadow: rgba(0, 0, 0, 0.4);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="nord"] {
  --t-bg: #2e3440;
  --t-panel: #3b4252;
  --t-ink: #eceff4;
  --t-muted: #d8dee9;
  --t-accent: #88c0d0;
  --t-accent-hover: #8fbcbb;
  --t-accent-ink: #2e3440;
  --t-border: #4c566a;
  --t-grid: #3b4252;
  --t-cell: #3b4252;
  --t-cell-hover: #4c566a;
  --t-cell-selected: #5e81ac;
  --t-found: #a3be8c;
  --t-overlay: rgba(0, 0, 0, 0.65);
  --t-shadow: rgba(0, 0, 0, 0.35);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="zinc"] {
  --t-bg: #18181b;
  --t-panel: #27272a;
  --t-ink: #fafafa;
  --t-muted: #a1a1aa;
  --t-accent: #a1a1aa;
  --t-accent-hover: #d4d4d8;
  --t-accent-ink: #18181b;
  --t-border: #3f3f46;
  --t-grid: #27272a;
  --t-cell: #27272a;
  --t-cell-hover: #3f3f46;
  --t-cell-selected: #52525b;
  --t-found: #4ade80;
  --t-overlay: rgba(0, 0, 0, 0.7);
  --t-shadow: rgba(0, 0, 0, 0.4);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="stone"] {
  --t-bg: #1c1917;
  --t-panel: #292524;
  --t-ink: #fafaf9;
  --t-muted: #a8a29e;
  --t-accent: #d6d3d1;
  --t-accent-hover: #e7e5e4;
  --t-accent-ink: #1c1917;
  --t-border: #44403c;
  --t-grid: #292524;
  --t-cell: #292524;
  --t-cell-hover: #44403c;
  --t-cell-selected: #57534e;
  --t-found: #4ade80;
  --t-overlay: rgba(0, 0, 0, 0.7);
  --t-shadow: rgba(0, 0, 0, 0.4);
  --t-font-display: Georgia, serif;
  --t-font-body: Georgia, serif;
}

[data-theme="neutral"] {
  --t-bg: #171717;
  --t-panel: #262626;
  --t-ink: #fafafa;
  --t-muted: #a3a3a3;
  --t-accent: #737373;
  --t-accent-hover: #a3a3a3;
  --t-accent-ink: #fff;
  --t-border: #404040;
  --t-grid: #262626;
  --t-cell: #262626;
  --t-cell-hover: #404040;
  --t-cell-selected: #525252;
  --t-found: #4ade80;
  --t-overlay: rgba(0, 0, 0, 0.7);
  --t-shadow: rgba(0, 0, 0, 0.4);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="midnight"] {
  --t-bg: #0c0a09;
  --t-panel: #1c1917;
  --t-ink: #fafaf9;
  --t-muted: #78716c;
  --t-accent: #f97316;
  --t-accent-hover: #fb923c;
  --t-accent-ink: #0c0a09;
  --t-border: #292524;
  --t-grid: #1c1917;
  --t-cell: #1c1917;
  --t-cell-hover: #292524;
  --t-cell-selected: #ea580c;
  --t-found: #22c55e;
  --t-overlay: rgba(0, 0, 0, 0.8);
  --t-shadow: rgba(0, 0, 0, 0.5);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="obsidian"] {
  --t-bg: #0d1117;
  --t-panel: #161b22;
  --t-ink: #e6edf3;
  --t-muted: #8b949e;
  --t-accent: #58a6ff;
  --t-accent-hover: #79c0ff;
  --t-accent-ink: #0d1117;
  --t-border: #30363d;
  --t-grid: #161b22;
  --t-cell: #161b22;
  --t-cell-hover: #21262d;
  --t-cell-selected: #388bfd;
  --t-found: #3fb950;
  --t-overlay: rgba(0, 0, 0, 0.8);
  --t-shadow: rgba(0, 0, 0, 0.5);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}

[data-theme="ink"] {
  --t-bg: #0f0f0f;
  --t-panel: #1a1a1a;
  --t-ink: #f5f5f4;
  --t-muted: #a8a29e;
  --t-accent: #eab308;
  --t-accent-hover: #facc15;
  --t-accent-ink: #0f0f0f;
  --t-border: #2d2d2d;
  --t-grid: #1a1a1a;
  --t-cell: #1a1a1a;
  --t-cell-hover: #2d2d2d;
  --t-cell-selected: #ca8a04;
  --t-found: #84cc16;
  --t-overlay: rgba(0, 0, 0, 0.85);
  --t-shadow: rgba(0, 0, 0, 0.5);
  --t-font-display: Georgia, serif;
  --t-font-body: Georgia, serif;
}

[data-theme="graphite"] {
  --t-bg: #111113;
  --t-panel: #1f1f23;
  --t-ink: #fafafa;
  --t-muted: #71717a;
  --t-accent: #a855f7;
  --t-accent-hover: #c084fc;
  --t-accent-ink: #fff;
  --t-border: #3f3f46;
  --t-grid: #1f1f23;
  --t-cell: #1f1f23;
  --t-cell-hover: #3f3f46;
  --t-cell-selected: #7c3aed;
  --t-found: #34d399;
  --t-overlay: rgba(0, 0, 0, 0.8);
  --t-shadow: rgba(0, 0, 0, 0.5);
  --t-font-display: ui-sans-serif, system-ui, sans-serif;
  --t-font-body: ui-sans-serif, system-ui, sans-serif;
}
