diff --git a/app/web/index.html b/app/web/index.html
index 8123f68..881ab91 100644
--- a/app/web/index.html
+++ b/app/web/index.html
@@ -4,6 +4,15 @@
Aime
+
diff --git a/app/web/src/main.js b/app/web/src/main.js
index 816a674..f9525e8 100644
--- a/app/web/src/main.js
+++ b/app/web/src/main.js
@@ -13,18 +13,34 @@ const state = { tab: 'record', recording: false, recStart: 0, timer: null, selec
function fmt(ms) { const s = Math.floor(ms / 1000); return `${String(Math.floor(s / 60)).padStart(2, '0')}:${String(s % 60).padStart(2, '0')}`; }
function toast(msg, err) { const t = document.createElement('div'); t.className = 'toast' + (err ? ' err' : ''); t.textContent = msg; document.body.appendChild(t); setTimeout(() => t.remove(), 4000); }
+// Theme: data-theme on , chosen in index.html before first paint (no
+// flash); the toggle persists to localStorage.
+function applyTheme(t) {
+ document.documentElement.dataset.theme = t;
+ localStorage.setItem('aime-theme', t);
+ const b = document.querySelector('#themetoggle');
+ if (b) b.textContent = t === 'dark' ? '☀️' : '🌙';
+}
+
function render() {
app.classList.toggle('wide', state.tab === 'recordings');
+ const theme = document.documentElement.dataset.theme || 'dark';
app.innerHTML = `
-