:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --white: #fffefa;
  --ink: #263b34;
  --muted: #858b82;
  --green: #426b57;
  --green-dark: #315340;
  --line: #e9e8df;
  --peach: #f4e7dc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(ellipse at 13% 5%, rgba(229, 230, 214, .48), transparent 29rem),
    var(--paper);
  color: var(--ink);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.page { width: min(100% - 40px, 680px); margin: 0 auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--green);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

.date-label { color: var(--muted); font-size: 12px; }
.intro { padding: 45px 0 34px; }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 8vw, 56px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.08;
}

h1 span { color: var(--green); }
.intro-copy { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.card {
  border: 1px solid rgba(233, 232, 223, .9);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 35px rgba(38, 59, 52, .045);
}

.composer { padding: 24px; }
.section-heading, .list-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-heading { margin-bottom: 19px; }

h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; letter-spacing: -.025em; }
.sparkle { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 12px; background: var(--peach); color: #a9754b; font-size: 19px; }

#entry-form { display: grid; gap: 12px; }
#entry-title, #entry-details {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

#entry-title { padding: 12px 14px; font-size: 14px; font-weight: 600; }
#entry-details { min-height: 69px; padding: 11px 14px; resize: vertical; font-size: 13px; line-height: 1.5; }
#entry-title:focus, #entry-details:focus, .date-input input:focus { border-color: #8fa997; box-shadow: 0 0 0 3px rgba(66, 107, 87, .1); }
input::placeholder, textarea::placeholder { color: #a9aca5; }

.form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.date-input { display: flex; align-items: center; gap: 8px; color: var(--green); }
.date-input input { width: 145px; padding: 8px 9px; border: 1px solid transparent; border-radius: 8px; outline: none; background: transparent; color: var(--muted); font-size: 12px; }

.add-button {
  padding: 10px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: white;
  font-size: 12px;
  font-weight: 600;
  transition: background .15s, transform .15s;
}

.add-button:hover { transform: translateY(-1px); background: var(--green-dark); }
.list-section { padding-top: 43px; }
.list-heading { align-items: flex-end; margin-bottom: 15px; }
.list-heading h2 { font-size: 21px; }
.count { display: inline-grid; min-width: 23px; height: 23px; margin-left: 3px; padding: 0 6px; place-items: center; border-radius: 8px; background: #e9eee8; color: var(--green); font-family: "DM Sans", sans-serif; font-size: 11px; vertical-align: 3px; }
.filters { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 254, 250, .75); }
.filter-button { padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; }
.filter-button.is-active { background: var(--white); color: var(--green-dark); box-shadow: 0 1px 4px rgba(38, 59, 52, .1); font-weight: 600; }

.entries { display: grid; gap: 9px; }
.entry {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 254, 250, .84);
  animation: enter .2s ease-out;
}

@keyframes enter { from { transform: translateY(4px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.check-button { width: 20px; height: 20px; margin-top: 1px; padding: 0; border: 1.5px solid #b7c2b7; border-radius: 7px; background: transparent; color: white; font-size: 13px; line-height: 17px; }
.check-button:hover { border-color: var(--green); }
.entry.is-done .check-button { border-color: var(--green); background: var(--green); }
.entry-content { min-width: 0; }
.entry-title { overflow-wrap: anywhere; margin: 0; font-size: 13px; font-weight: 600; line-height: 1.5; }
.entry-details { margin: 5px 0 0; color: #777f76; font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.entry-date { display: block; margin-top: 8px; color: #999e95; font-size: 10px; }
.entry.is-done .entry-title { color: #999e95; text-decoration: line-through; }
.delete-button { padding: 4px 5px; border: 0; border-radius: 6px; background: transparent; color: #9a9e96; font-size: 11px; }
.delete-button:hover { background: #f8eae6; color: #a84f3a; }

.empty-state { padding: 27px 16px; border: 1px dashed #d9ddd3; border-radius: 13px; color: var(--muted); text-align: center; }
.empty-icon { margin-bottom: 7px; color: #a7b7a9; font-size: 20px; }
.empty-state p { margin: 0; font-size: 12px; }
.privacy-note { margin: 17px 0 0; color: #94988f; font-size: 10px; text-align: center; }
.privacy-note span { margin-right: 4px; color: var(--green); }
footer { padding: 40px 0 25px; color: #a1a49c; font-family: Georgia, "Times New Roman", serif; font-size: 13px; text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 520px) {
  .page { width: min(100% - 28px, 680px); }
  .topbar { padding: 19px 0; }
  .intro { padding: 36px 0 27px; }
  .composer { padding: 19px; }
  .list-section { padding-top: 34px; }
  .list-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .entry { padding: 14px 12px; }
  .date-input input { width: 135px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
