:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf5ef;
  background: #050806;
  color-scheme: dark;
  --bg: #050806;
  --panel: #0b110e;
  --panel-raised: #101913;
  --line: #1e3226;
  --line-bright: #2d5637;
  --neon: #b6ff3b;
  --neon-soft: #75d92c;
  --muted: #8b9d91;
  --danger: #ff8c8c;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  min-height: 100vh;
  margin: 0;
  padding: 48px 20px 72px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, #153b2280 0, transparent 27rem),
    radial-gradient(circle at 90% 84%, #123a2260 0, transparent 30rem),
    radial-gradient(circle at 52% 42%, #0d1b1380 0, transparent 34rem),
    #050806;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: #d7ffc0;
  box-shadow: 8vw 9vh 0 0 #7eff75, 23vw 22vh 0 0 #5eff94, 38vw 7vh 0 0 #d7ffc0,
    62vw 16vh 0 0 #7eff75, 78vw 6vh 0 0 #b3ff80, 92vw 31vh 0 0 #5eff94,
    13vw 68vh 0 0 #b3ff80, 31vw 84vh 0 0 #7eff75, 57vw 72vh 0 0 #5eff94,
    84vw 65vh 0 0 #d7ffc0, 74vw 93vh 0 0 #7eff75;
  content: "";
  opacity: .45;
}

body::before { top: 0; left: 0; }
body::after { top: 4vh; left: 4vw; transform: scale(.55); opacity: .25; }

main {
  position: relative;
  max-width: 760px;
  margin: auto;
  padding: 78px clamp(24px, 6vw, 64px) 52px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line-bright);
  border-radius: 24px;
  background: linear-gradient(145deg, #0d1610f5, #080d0bf8 65%);
  box-shadow: 0 30px 100px #000c, 0 0 90px #3cff6d12, inset 0 1px #d0ffc21a;
}

main::before {
  position: absolute;
  z-index: -1;
  top: -160px;
  right: -100px;
  width: 420px;
  height: 420px;
  border: 1px solid #6bff8c1f;
  border-radius: 50%;
  box-shadow: 0 0 0 32px #6bff8c08, 0 0 0 64px #6bff8c05;
  content: "";
}

main::after {
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  box-shadow: 0 0 22px var(--neon);
  content: "";
}

.leaf-garden,
.lounge-art,
.herb-mark { display: none; }

.smoke-haze { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.smoke-haze i { display: none; }

.motion-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.motion-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--neon);
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--neon);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .24em;
}

h1, h2 { margin-top: 0; color: #f1ffe9; }
h1 {
  max-width: 580px;
  margin-bottom: 16px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: .98;
  letter-spacing: -.07em;
  text-shadow: 0 0 34px #8aff3b26;
}

main > p:not(.eyebrow):not(.note):not(#status):not(#empty-message):not(#celebration) {
  max-width: 500px;
  margin: 0;
  color: #9caf9f;
  font-size: 17px;
}

h2 {
  margin: 38px 0 16px;
  font-size: 22px;
  letter-spacing: -.025em;
}

.help-menu {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.help-menu summary {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 50%;
  color: var(--neon);
  background: #0c1710;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.help-menu summary::-webkit-details-marker { display: none; }
.help-menu summary:hover { border-color: var(--neon); box-shadow: 0 0 18px #8dff4c33; }
.help-menu[open] {
  width: min(310px, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  background: #0b130ef7;
  box-shadow: 0 20px 50px #000c;
}
.help-menu p, .help-menu li { color: var(--muted); font-size: 13px; line-height: 1.55; }
.help-menu ul { padding-left: 18px; }

form {
  margin-top: 38px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #09100c;
}

label {
  display: block;
  margin-bottom: 9px;
  color: #c7d8ca;
  font-size: 13px;
  font-weight: 700;
}

.input-row { display: flex; gap: 10px; }

input, button {
  min-height: 46px;
  border-radius: 9px;
  font: inherit;
}

input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
  border: 1px solid #294233;
  outline: 0;
  color: #efffe9;
  background: #060b08;
}

input:hover { border-color: #3e6950; }
input::placeholder { color: #617468; }
#task-due-date { display: block; width: min(230px, 100%); margin-top: 2px; }

button {
  padding: 10px 17px;
  border: 1px solid var(--neon);
  color: #081006;
  background: var(--neon);
  font-weight: 800;
  cursor: pointer;
}

button:hover { background: #d4ff8c; box-shadow: 0 0 22px #a7ff4c38; }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; }
#error, #storage-warning { min-height: 20px; color: var(--danger); }
#error { margin: 9px 0 0; }

#task-filters { display: flex; gap: 7px; flex-wrap: wrap; }
#task-filters button {
  min-height: 38px;
  border-color: var(--line-bright);
  color: #b9cabc;
  background: #0a120d;
  font-size: 13px;
}
#task-filters button:hover { color: var(--neon); border-color: var(--neon-soft); background: #102017; }
#task-filters button[aria-pressed="true"] {
  color: #091006;
  background: var(--neon);
  box-shadow: 0 0 20px #a7ff4c2b;
}

#empty-message, .note, #status { color: var(--muted); font-size: 13px; }
#empty-message { margin: 24px 0; }
#task-list { margin: 20px 0; padding: 0; list-style: none; }
#task-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 9px 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--neon-soft);
  border-radius: 10px;
  background: var(--panel-raised);
  overflow-wrap: anywhere;
}
#task-list li:hover { border-color: var(--line-bright); background: #132019; }
#task-list li:has(input:checked) { border-left-color: #476b50; opacity: .72; }
#task-list label { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; margin: 0; cursor: pointer; }
#task-list label span { min-width: 0; color: #dce9dd; }
#task-list input[type="checkbox"] { flex: none; width: 20px; height: 20px; accent-color: var(--neon); cursor: pointer; }
#task-list button, #undo-button {
  min-height: 34px;
  padding: 6px 10px;
  border-color: #34513c;
  color: #a9baa9;
  background: transparent;
  font-size: 12px;
}
#task-list button:hover, #undo-button:hover { color: var(--neon); border-color: var(--neon-soft); background: #112117; }
#status { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--line); }
#celebration { min-height: 24px; margin: 12px 0 0; color: var(--neon); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-align: center; }
#undo-area { margin: 16px 0; padding: 12px 14px; border: 1px solid #344f39; border-radius: 10px; background: #0d1a11; }
#undo-area p { display: inline; margin: 0 12px 0 0; color: var(--muted); font-size: 13px; }

section[aria-labelledby="backup-heading"] {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
section p { color: var(--muted); font-size: 13px; line-height: 1.6; }
section button { margin: 4px 0 12px; }
section input[type="file"] { width: 100%; padding: 10px; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  button, input, #task-list li { transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
  button:hover { transform: translateY(-1px); }
  main.is-celebrating { animation: neon-bloom 900ms ease-in-out; }
  @keyframes neon-bloom {
    45% { box-shadow: 0 30px 100px #000c, 0 0 100px #8dff4c38, inset 0 1px #d0ffc255; }
  }
}

@media (max-width: 520px) {
  body { padding: 20px 12px 48px; }
  main { padding: 70px 18px 36px; border-radius: 18px; }
  .input-row { flex-direction: column; }
  .input-row button { width: 100%; }
  form { padding: 16px; }
  #task-list li { flex-wrap: wrap; }
  #task-list label { flex-basis: 100%; }
  #task-list button { flex: 1; }
  #task-filters button { flex: 1; }
}
