/* ═══════════════════════════════════════════════════════════════════════
   light.css — the light appearance, designed on its own terms (loads last).
   Dark mode is untouched: every rule here starts with :root[data-theme="light"].

   · Page: clean near-white; the theme's aurora is a soft glow at the edges,
     never a coloured wash over everything.
   · Cards: frosted glass — translucent white over the aurora, a bright top
     edge and a soft shadow, so they lift off the page.
   · Segmented controls (top tabs, Focus/Break, Week/Month, Light/Dark…):
     a quiet grey track with a raised white pill for the selection, in the
     theme's colour — not tint-on-tint.
   · Over a video scene: bright frosted glass (the frame is lightened behind
     it), not milky grey.
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="light"] {
  --l-edge: rgba(17, 17, 24, 0.07);
  --l-edge-strong: rgba(17, 17, 24, 0.11);
  --l-lift: 0 1px 2px rgba(17, 17, 24, 0.04), 0 8px 24px -6px rgba(17, 17, 24, 0.09);
  --l-lift-hi: 0 1px 2px rgba(17, 17, 24, 0.05), 0 14px 36px -8px rgba(17, 17, 24, 0.14);
  --l-track: rgba(17, 17, 24, 0.05);
  --l-pill: 0 1px 2px rgba(17, 17, 24, 0.10), 0 0 0 0.5px rgba(17, 17, 24, 0.06);
  --hairline: rgba(17, 17, 24, 0.09);
  --shadow-card: var(--l-lift);
}

/* ── page: near-white, with the aurora as a soft glow ── */
:root[data-theme="light"] body {
  background:
    radial-gradient(1200px 700px at 50% -10%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%),
    linear-gradient(180deg, #fbfbfa, color-mix(in srgb, var(--page) 55%, #f6f6f4));
}
:root[data-theme="light"] .blob {
  opacity: calc(var(--blob-a) * .38 * var(--aurora, .6) * var(--aurora-gain, 1) * var(--aurora-breath, 1));
  filter: blur(90px) saturate(.9);
}
:root[data-theme="light"] .aurora-scrim { background: rgba(255, 255, 255, 0.42); }

/* ── top bar: white frosted strip with a hairline ── */
:root[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--l-edge);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}

/* ── sidebar: white frosted, a grey selection ── */
:root[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid var(--l-edge);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
}
:root[data-theme="light"] body.has-scene .sidebar { background: rgba(255, 255, 255, 0.74); -webkit-backdrop-filter: blur(28px) saturate(180%) brightness(1.15); backdrop-filter: blur(28px) saturate(180%) brightness(1.15); }
:root[data-theme="light"] .sidebar .gs-avatar-btn { background: transparent; }
:root[data-theme="light"] .sidebar .sb-item.tab:hover,
:root[data-theme="light"] .sb-toggle:hover,
:root[data-theme="light"] .sidebar .gs-avatar-btn:hover,
:root[data-theme="light"] .sidebar .gs-avatar-btn[aria-expanded="true"] { background: rgba(17, 17, 24, 0.045); }
:root[data-theme="light"] .sidebar .sb-item.tab.is-active { background: rgba(17, 17, 24, 0.065); box-shadow: none; color: var(--text-primary); }
:root[data-theme="light"] .pf-sg { background: rgba(255, 255, 255, 0.7); border-color: var(--l-edge); box-shadow: 0 1px 2px rgba(17, 17, 24, 0.04); }
:root[data-theme="light"] .pf-sg:hover { background: #fff; }

/* ── cards: frosted glass ── */
:root[data-theme="light"] .glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.4));
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 2px rgba(17, 17, 24, 0.04), 0 14px 36px -12px rgba(17, 17, 24, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
}
:root[data-theme="light"] .glass::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 38%); }
:root[data-theme="light"] .settings-index.glass { background: rgba(255, 255, 255, 0.6); }

/* ── segmented controls: grey track, raised white pill ── */
:root[data-theme="light"] .tabs,
:root[data-theme="light"] .mode-switch,
:root[data-theme="light"] .segmented {
  background: var(--l-track);
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 24, 0.03);
}
:root[data-theme="light"] .tab.is-active,
:root[data-theme="light"] .mode-btn.is-active,
:root[data-theme="light"] .seg-btn.is-active {
  color: var(--tint-text);
  background: #fff;
  box-shadow: var(--l-pill);
}
:root[data-theme="light"] .tab:not(.is-active):hover,
:root[data-theme="light"] .mode-btn:not(.is-active):hover,
:root[data-theme="light"] .seg-btn:not(.is-active):hover { background: rgba(17, 17, 24, 0.04); }

/* ── buttons: white with a hairline and a whisper of shadow ── */
:root[data-theme="light"] .btn:not(.btn-primary):not(.btn-danger) {
  background: #fff;
  border-color: var(--l-edge-strong);
  box-shadow: 0 1px 2px rgba(17, 17, 24, 0.05);
}
:root[data-theme="light"] .btn:not(.btn-primary):not(.btn-danger):hover { background: #f7f7f6; border-color: rgba(17, 17, 24, 0.16); }
:root[data-theme="light"] .icon-btn:hover { background: rgba(17, 17, 24, 0.05); }

/* ── Focus page ── */
/* the timer panel: see-through, but bright behind it rather than grey */
:root[data-theme="light"] #view-focus .timer-card {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 2px rgba(17, 17, 24, 0.04), 0 18px 48px -12px rgba(17, 17, 24, 0.12);
  -webkit-backdrop-filter: blur(28px) saturate(170%) brightness(1.08); backdrop-filter: blur(28px) saturate(170%) brightness(1.08);
}
:root[data-theme="light"] #view-focus .timer-card::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 40%); }
/* the music bar: frosted like the cards */
:root[data-theme="light"] #view-focus .pf-np {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.46));
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 2px rgba(17, 17, 24, 0.04), 0 14px 36px -12px rgba(17, 17, 24, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
}
/* the corner buttons: white glass */
:root[data-theme="light"] .corner-btn,
:root[data-theme="light"] .sb-open { background: rgba(255, 255, 255, 0.82); border-color: var(--l-edge-strong); box-shadow: 0 1px 2px rgba(17, 17, 24, 0.05), 0 6px 16px -8px rgba(17, 17, 24, 0.16); }
:root[data-theme="light"] .corner-btn:hover,
:root[data-theme="light"] .sb-open:hover { background: #fff; }
/* tasks: the add field is a soft inset, rows sit on hairlines, the current task is a gentle tint */
:root[data-theme="light"] .tk-add { background: rgba(17, 17, 24, 0.035); border-color: transparent; }
:root[data-theme="light"] .tk-add:focus-within { background: #fff; border-color: var(--l-edge-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
:root[data-theme="light"] .tk-row.is-active { background: color-mix(in srgb, var(--accent) 7%, #fff); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
:root[data-theme="light"] .tk-check { border-color: rgba(17, 17, 24, 0.28); }
:root[data-theme="light"] .tk-row .tk-chip:not(.is-overdue):not(.is-today):not(.is-live) { border-color: var(--l-edge-strong); color: var(--text-secondary); }
:root[data-theme="light"] .tasks-head-chips .pf-hud,
:root[data-theme="light"] .tasks-head-chips .guard-chip { background: #fff; border-color: var(--l-edge-strong); box-shadow: 0 1px 2px rgba(17, 17, 24, 0.04); }
:root[data-theme="light"] .count-badge { background: rgba(17, 17, 24, 0.06); color: var(--text-secondary); }

/* ── Calendar ── */
:root[data-theme="light"] #view-calendar .cal-col.is-today { background-color: color-mix(in srgb, var(--focus-tint) 3.5%, transparent); }
:root[data-theme="light"] #view-calendar .cal-tg-top { background: rgba(255, 255, 255, 0.92); }
:root[data-theme="light"] #view-calendar .cal-side { background: rgba(250, 250, 249, 0.6); }
:root[data-theme="light"] #view-calendar .cal-ev-more { background: #f1f1ef; }

/* ── over a video scene: bright frosted glass ── */
:root[data-theme="light"] body.has-scene .glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.62));
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 2px rgba(17, 17, 24, 0.06), 0 20px 50px -12px rgba(17, 17, 24, 0.22);
  -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.18); backdrop-filter: blur(40px) saturate(180%) brightness(1.18);
}
:root[data-theme="light"] body.has-scene #view-focus .timer-card {
  -webkit-backdrop-filter: blur(30px) saturate(170%) brightness(1.22); backdrop-filter: blur(30px) saturate(170%) brightness(1.22);
}
:root[data-theme="light"] body.has-scene .topbar { background: rgba(255, 255, 255, 0.7); -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(1.15); backdrop-filter: blur(24px) saturate(180%) brightness(1.15); }
:root[data-theme="light"] body.has-scene .tab.is-active,
:root[data-theme="light"] body.has-scene .mode-btn.is-active { background: #fff; box-shadow: var(--l-pill); }

/* Reset / Skip: white round buttons, so over a see-through panel and a busy scene they still read as buttons */
:root[data-theme="light"] #view-focus .btn-transport {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--l-edge-strong);
  box-shadow: 0 1px 2px rgba(17, 17, 24, 0.06), 0 4px 12px -4px rgba(17, 17, 24, 0.12);
  color: var(--text-primary);
}
:root[data-theme="light"] #view-focus .btn-transport:hover { background: #fff; }

/* ═════════  Focus page, light (2026-10-27)  ═════════
   A soft neutral canvas so the white panels stand out from it; crisp panel edges and a real
   lift; the ring on a quiet neutral track with the theme colour only for progress; the sidebar
   a light grey strip whose selection is the raised white pill used by every segmented control. */
:root[data-theme="light"] body {
  background:
    radial-gradient(1100px 640px at 55% -12%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--page) 30%, #f5f5f3), color-mix(in srgb, var(--page) 30%, #ebebe8));
}
:root[data-theme="light"] .aurora-scrim { background: rgba(245, 245, 243, 0.5); }

/* panels: white frosted glass with a hairline and a soft, defined shadow */
:root[data-theme="light"] body:not(.has-scene) #view-focus .timer-card,
:root[data-theme="light"] body:not(.has-scene) #view-focus .focus-grid > .tasks-card,
:root[data-theme="light"] body:not(.has-scene) #view-focus .pf-np {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(17, 17, 24, 0.06);
  box-shadow: 0 1px 2px rgba(17, 17, 24, 0.05), 0 20px 48px -22px rgba(17, 17, 24, 0.24), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
}
:root[data-theme="light"] body:not(.has-scene) #view-focus .timer-card::before { background: none; }

/* the ring: neutral track (a hint of the mode's colour), theme-coloured progress with a soft lift */
:root[data-theme="light"] .ring-track { stroke: color-mix(in srgb, var(--mode-tint, var(--focus-tint)) 7%, #e9e9e6); }
:root[data-theme="light"] .ring-progress { filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--mode-tint, var(--focus-tint)) 30%, transparent)); }
:root[data-theme="light"] .ring-wrap::before {
  background: radial-gradient(circle, color-mix(in srgb, var(--tint) 10%, transparent) 0%, color-mix(in srgb, var(--tint) 3%, transparent) 45%, transparent 68%);
}
:root[data-theme="light"] body:not(.has-scene) .ring-wrap::after { background: none; }
:root[data-theme="light"] .ring-time { color: #18181b; }
:root[data-theme="light"] .interval-dot:not(.is-done) { border-color: rgba(17, 17, 24, 0.22); }

/* the sidebar */
:root[data-theme="light"] body:not(.has-scene) .sidebar { background: rgba(240, 240, 237, 0.82); border-right-color: rgba(17, 17, 24, 0.06); }
:root[data-theme="light"] .sidebar .sb-item.tab.is-active { background: #fff; box-shadow: var(--l-pill); }
:root[data-theme="light"] .pf-sg { background: #fff; border-color: rgba(17, 17, 24, 0.06); box-shadow: 0 1px 2px rgba(17, 17, 24, 0.04); }
:root[data-theme="light"] .pf-sg:hover { background: #fff; box-shadow: 0 1px 2px rgba(17, 17, 24, 0.05), 0 6px 16px -8px rgba(17, 17, 24, 0.16); }

/* the add field and the music bar's play button sit on white, so they take the grey-track look */
:root[data-theme="light"] body:not(.has-scene) #view-focus .pf-np-pp { background: rgba(17, 17, 24, 0.05); box-shadow: none; }
:root[data-theme="light"] body:not(.has-scene) #view-focus .pf-np-pp:hover { background: rgba(17, 17, 24, 0.09); }
