:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, -apple-system, sans-serif;
  --background: #f8f7f3;
  --paper: #fffefa;
  --ink: #272923;
  --muted: #626259;
  --line: #e7e4dc;
  --accent: #a6422d;
  --accent-dark: #873323;
  --tint: #f6e6de;
  --sidebar: #f0eee6;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden], .symbols { display: none !important; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, p { margin: 0; }
h1 { font-family: Georgia, serif; font-size: clamp(3rem, 6vw, 5.35rem); font-weight: 400; letter-spacing: -.065em; line-height: 1.12; }
h2 { font-size: 1.15rem; letter-spacing: -.025em; line-height: 1.25; }
.shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 33px 19px 20px; background: var(--sidebar); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; font-weight: 750; letter-spacing: -.04em; font-size: 1.2rem; }
.brand-mark, .avatar { display: grid; place-items: center; flex: none; width: 37px; height: 37px; border-radius: 11px; }
.brand-mark { background: var(--accent); color: white; transform: rotate(-7deg); }
.brand-mark svg { width: 23px; height: 23px; stroke-width: 2.5; }
.nav { margin-top: 68px; display: grid; gap: 5px; }
.eyebrow { color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.nav-label { padding: 0 11px 7px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 10px 11px; min-height: 44px; border-radius: 8px; font-size: .93rem; color: var(--muted); font-weight: 580; }
.nav-link:hover, .account:hover { background: #e9e5d9; }
.nav-link[aria-current="page"] { background: var(--tint); color: var(--accent-dark); font-weight: 700; }
.nav-count { margin-left: auto; font-size: .8rem; font-variant-numeric: tabular-nums; }
.account { display: flex; align-items: center; text-align: left; min-width: 0; gap: 10px; width: 100%; margin-top: auto; padding: 9px; border: 0; background: transparent; border-radius: 9px; }
.avatar { background: #e6e1d5; color: #565448; }
.account-copy { display: grid; min-width: 0; }
.account-copy strong, .account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: .88rem; }
.account-copy small { color: var(--muted); font-size: .8rem; }
main { width: 100%; max-width: 1520px; margin-inline: auto; padding: 64px clamp(24px, 5vw, 76px); }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 41px; }
.date-heading { color: var(--accent-dark); margin-bottom: 9px; }
.subtitle { color: var(--muted); margin-top: 10px; }
.primary, .secondary, .icon-button, .text-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; font-weight: 660; border-radius: 8px; }
.primary, .secondary { min-height: 43px; padding: 8px 15px; white-space: nowrap; border: 1px solid transparent; }
.primary { background: var(--accent); color: #fff; transition: background .15s, transform .15s; }
.primary:hover { background: var(--accent-dark); }
.primary:active { transform: translateY(1px); }
.secondary { background: var(--paper); border-color: var(--line); }
.secondary:hover, .icon-button:hover { background: var(--sidebar); }
.add { margin-bottom: 2px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .57fr); gap: clamp(20px, 3vw, 39px); align-items: start; }
.workspace.calendar-view { grid-template-columns: minmax(0, 1fr) minmax(250px, .57fr); }
.calendar-view .calendar-panel { grid-column: 1; grid-row: 1; }
.calendar-view .task-panel { grid-column: 2; grid-row: 1; }
.task-panel { min-width: 0; border-top: 1px solid var(--line); }
.task-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 69px; }
.search { display: flex; align-items: center; gap: 6px; width: min(38%, 180px); padding: 6px 8px; color: var(--muted); border-radius: 7px; }
.search:focus-within { background: var(--paper); }
.search svg { width: 17px; height: 17px; }
.search input { width: 100%; min-width: 0; border: 0; padding: 0; background: none; color: var(--ink); font-size: .88rem; }
.search input:focus { outline: none; }
.filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 18px; }
.filters button { background: transparent; border: 0; border-radius: 7px; color: var(--muted); padding: 6px 10px; font-size: .88rem; font-weight: 620; min-height: 36px; }
.filters button:hover { background: var(--sidebar); }
.filters button[aria-pressed="true"] { background: #ece9df; color: var(--ink); }
.task-list { list-style: none; margin: 0; padding: 0; }
.group-title { font-size: .88rem; color: var(--muted); padding: 15px 0 7px; }
.group-title.overdue { color: var(--accent-dark); }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 13px 3px; border-bottom: 1px solid var(--line); }
.task:first-child { border-top: 1px solid var(--line); }
.task-check { display: grid; place-items: center; width: 36px; height: 36px; margin: -5px -4px -5px -5px; padding: 0; background: none; border: 0; border-radius: 7px; }
.task-check:hover { background: var(--tint); }
.task-check span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 6px; border: 1px solid #a29e90; }
.task-check[aria-checked="true"] span { background: var(--accent); border-color: var(--accent); color: #fff; }
.task-check svg { width: 16px; height: 16px; stroke-width: 2.3; }
.task-name { font-weight: 660; overflow-wrap: anywhere; }
.task.completed .task-name { text-decoration: line-through; color: var(--muted); }
.task-notes { color: var(--muted); font-size: .9rem; margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: .88rem; margin-top: 4px; }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-meta svg { width: 15px; height: 15px; }
.task-meta .priority { color: var(--accent-dark); font-weight: 650; }
.empty { padding: 35px 14px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.empty .empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 13px; color: var(--accent-dark); background: var(--tint); }
.empty p { margin: 6px 0 11px; }
.empty h3 { margin: 0; color: var(--ink); font-size: 1rem; }
.calendar-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: clamp(14px, 2vw, 23px); min-width: 0; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.calendar-header h2 { margin-top: 4px; text-transform: capitalize; }
.calendar-actions { display: flex; gap: 2px; }
.icon-button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); padding: 0; }
.icon-button svg { width: 18px; height: 18px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.weekday { font-size: .8rem; color: var(--muted); font-weight: 650; padding: 4px 0; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid transparent; background: transparent; min-height: 35px; padding: 3px 0; border-radius: 7px; font-size: .90rem; font-variant-numeric: tabular-nums; }
.calendar-view .day { min-height: clamp(42px, 6vw, 72px); }
.day:hover { background: var(--sidebar); }
.day.outside { color: var(--muted); }
.day[aria-current="date"] { border-color: #d5aa9c; color: var(--accent-dark); font-weight: 700; }
.day[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 720; }
.day i, .calendar-footer i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.day i { position: absolute; bottom: 3px; }
.day[aria-pressed="true"] i { background: white; }
.calendar-footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; color: var(--muted); font-size: .86rem; }
.calendar-footer span { display: inline-flex; align-items: center; gap: 6px; }
.text-button { border: 0; background: transparent; color: var(--accent-dark); min-height: 34px; padding: 3px 6px; font-size: .90rem; }
.text-button:hover { background: var(--tint); }
dialog { width: min(470px, calc(100% - 28px)); max-height: calc(100dvh - 28px); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: 23px; box-shadow: 0 18px 70px #27292328; }
dialog[open] { animation: arrive .2s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } }
dialog::backdrop { background: #27292350; }
dialog form { display: grid; gap: 13px; }
.dialog-header, .dialog-footer { display: flex; align-items: center; gap: 8px; }
.dialog-header { justify-content: space-between; }
.dialog-footer { justify-content: end; flex-wrap: wrap; margin-top: 6px; }
#account-dialog .dialog-footer { margin-top: 20px; }
#delete-task, #auth-mode { margin-right: auto; }
dialog label { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; min-width: 0; }
dialog input:not([type="checkbox"]), dialog select, dialog textarea { width: 100%; min-width: 0; border: 1px solid #d8d5ca; border-radius: 8px; padding: 8px 9px; min-height: 42px; background: #fff; color: var(--ink); font-size: 1rem; }
dialog select { appearance: none; padding-right: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23626259' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 12px; }
dialog textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checkbox-label { display: flex; align-items: center; gap: 7px; min-height: 36px; }
input[type="checkbox"] { accent-color: var(--accent); }
.form-error { color: var(--accent-dark); font-size: .88rem; }
#toast { position: fixed; bottom: 16px; right: 16px; z-index: 2; max-width: min(420px, calc(100% - 32px)); padding: 11px 15px; background: var(--ink); color: #fff; border-radius: 9px; box-shadow: 0 4px 16px #27292330; animation: arrive .2s ease-out; }
#toast:empty { display: none; }
@media (max-width: 1040px) {
  .shell { grid-template-columns: 175px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  main { padding-inline: 25px; }
}
@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr auto; height: auto; padding: 12px 15px 7px; border-right: 0; border-bottom: 1px solid var(--line); gap: 9px; }
  .nav { grid-area: 2 / 1 / 3 / 3; display: flex; margin: 0; justify-content: space-between; }
  .nav-label, .nav-count, .account-copy { display: none; }
  .nav-link { justify-content: center; gap: 5px; padding: 5px 7px; font-size: .87rem; }
  .nav-link svg { width: 17px; height: 17px; }
  .account { margin: 0; padding: 0; border-radius: 11px; }
  .brand { padding: 0; }
  main { padding-top: 37px; }
}
@media (max-width: 620px) {
  main { padding-inline: 16px; padding-bottom: 36px; }
  .page-header { align-items: start; margin-bottom: 25px; }
  h1 { font-size: 3rem; }
  .add { margin-top: 26px; padding-inline: 9px; font-size: .87rem; }
  .add svg { width: 17px; height: 17px; }
  .workspace, .workspace.calendar-view { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .calendar-view .calendar-panel, .calendar-view .task-panel { grid-column: auto; grid-row: auto; }
  .calendar-view .calendar-panel { grid-row: 1; }
}
@media (max-width: 360px) {
  .nav-link svg { display: none; }
  .page-header { gap: 6px; }
  h1 { font-size: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

:root {
  --background: #faf8f1;
  --paper: #fffdf7;
  --ink: #292b25;
  --muted: #5b6054;
  --line: #e6e2d7;
  --accent: #2d5641;
  --accent-dark: #214630;
  --tint: #e8eee2;
  --sidebar: #f0eee3;
}
.brand-mark { transform: rotate(-7deg); }
.sidebar .dada-perch { margin-top: auto; padding: 0 15px 14px; text-align: left; }
.dada-perch img { display: block; width: 108px; height: 108px; object-fit: contain; }
.sidebar .account { margin-top: 0; }
.primary { background: var(--accent); }
.primary:hover { background: var(--accent-dark); }
.task-meta .priority, .group-title.overdue, .form-error, .danger { color: #913c2a; }
.day[aria-current="date"] { border-color: #a9b8a1; }
.loading { min-height: 100dvh; display: grid; place-content: center; padding: 20px; color: var(--muted); }

.auth-page {
  width: min(100%, 940px);
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr minmax(300px, .9fr);
  align-items: center;
  gap: clamp(30px, 7vw, 98px);
  margin: 0 auto;
  padding: 50px 30px;
}
.auth-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: #edead9;
  border-radius: 46% 49% 43% 39% / 49% 44% 49% 44%;
}
.auth-art img { display: block; width: 85%; height: auto; filter: drop-shadow(0 12px 12px #3f301d1c); }
.auth-content h1 { font-size: clamp(3.15rem, 5vw, 4.75rem); margin-bottom: 27px; }
#auth-form { display: grid; gap: 13px; }
#auth-form label { display: grid; gap: 5px; font-size: .93rem; font-weight: 660; }
#auth-form label.checkbox-label { display: flex; font-weight: 550; }
#auth-form input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  min-height: 46px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #d6d3c8;
  border-radius: 8px;
}
#auth-form input[type="checkbox"] { width: 17px; height: 17px; flex: none; }
#auth-submit { min-height: 47px; }

@media (max-width: 820px) {
  .sidebar .dada-perch { display: none; }
  .brand { position: relative; }
  .brand::after { content: ""; width: 35px; height: 35px; background: url("/dada.webp") center / contain no-repeat; }
}
@media (max-width: 620px) {
  .auth-page { grid-template-columns: 1fr; align-content: center; gap: 10px; padding: 22px 23px 35px; max-width: 440px; }
  .auth-art { width: 148px; justify-self: center; }
  .auth-content h1 { font-size: 3.15rem; margin-bottom: 20px; }
}
