:root {
  color-scheme: light;
  font: 16px/1.45 system-ui, sans-serif;
  color: #281d38;
  background: #f8f6fa;
  --purple: #5429a4;
  --muted: #60536f;
  --line: #e6deed;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #8a56d5; outline-offset: 3px; }
[hidden] { display: none !important; }
main { max-width: 700px; margin: auto; padding: 28px 28px 10px; }
.brand, .section-title, .dialog-heading { display: flex; align-items: center; gap: 12px; }
.brand { margin-bottom: 20px; font-size: 19px; font-weight: 750; }
.brand img { width: 40px; height: 40px; border-radius: 14px; }
.demo { margin-left: auto; color: var(--muted); font-weight: 500; font-size: .82rem; }
.hero { background: #e9dcff; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 26px; padding: 22px 24px; }
.hero img { width: clamp(68px, 23vw, 118px); border-radius: 24px; transform: rotate(4deg); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 6vw, 2.85rem); line-height: 1.05; letter-spacing: -.055em; }
h2 { font-size: 1.2rem; }
#date-label { margin-top: 9px; color: #513c69; }
nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; background: #eee8f3; padding: 5px; border-radius: 15px; margin: 22px 0; }
nav button { border: 0; background: transparent; color: #534565; border-radius: 11px; min-height: 44px; padding: 5px 2px; font-weight: 650; font-size: clamp(.75rem, 3.5vw, .94rem); }
nav button[aria-pressed=true] { background: white; color: var(--purple); box-shadow: 0 1px 5px #31175015; }
.section-title { justify-content: space-between; margin-bottom: 12px; }
#count { color: var(--muted); }
#list { display: grid; gap: 9px; }
.item { display: grid; grid-template-columns: minmax(4.5rem, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 13px 15px; min-height: 64px; border: 1px solid var(--line); background: white; color: inherit; border-radius: 15px; }
.item:hover { border-color: #bca3df; }
.clock { color: var(--purple); font-weight: 750; font-variant-numeric: tabular-nums; }
.clock small { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; }
.task { overflow-wrap: anywhere; }
.more { color: var(--muted); }
.item:disabled { cursor: default; }
.item:disabled .more { font-size: .78rem; }
#editor-error { color: #962739; }
#editor-error:empty { display: none; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 22px 14px; border: 1px dashed #cdbbdf; border-radius: 16px; }
.empty img { width: 68px; border-radius: 16px; }
.actions { margin-top: 18px; }
.primary, .secondary { width: 100%; min-height: 48px; border-radius: 13px; font-weight: 700; padding: 10px 12px; }
.primary { border: 1px solid transparent; background: var(--purple); color: white; }
.primary:hover { background: #432181; }
.secondary { background: #f1e8fb; border: 1px solid #dcd0ec; color: var(--purple); }
.secondary.danger { background: #fff3f4; border-color: #efced4; color: #962739; }
.feedback { margin-top: 10px; min-height: 1.5em; color: var(--muted); }
dialog { color: inherit; margin: auto; width: min(440px, calc(100% - 24px)); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 12px 50px #25173630; }
dialog::backdrop { background: #24173577; }
form { display: grid; gap: 14px; }
.dialog-heading { justify-content: space-between; }
#close { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: #f1eaf6; font-size: 1.5rem; }
label { display: grid; gap: 5px; color: var(--muted); font-weight: 600; }
input { width: 100%; min-width: 0; min-height: 45px; border: 1px solid #cbbcd9; border-radius: 10px; color: #281d38; padding: 8px; }
.fields { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 480px) { main { padding: 18px 14px 8px; } .hero { padding: 17px; } }
