/* Lynn Todo: lime gradient, white glass, dark text */

:root {
  --text: #1C1C1E;
  --text-2: #2C2C2E;
  --muted: #6C6C70;
  --red: #C4291C;
  --blue: #0062CC;
  --orange: #A04A00;
  --violet: #5E5CE6;
  --green: #34C759;
  --lime: #C6F432;
  --glass: rgba(255, 255, 255, 0.6);
  --glass-line: rgba(255, 255, 255, 0.9);
  --row: rgba(255, 255, 255, 0.97);
  --hair: rgba(60, 60, 67, 0.12);
  --blur: blur(24px) saturate(180%);
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 65% at 0% 0%, #B2E000 0%, transparent 65%),
    radial-gradient(100% 60% at 100% 100%, #EEFF8A 0%, transparent 62%),
    #D6F04A;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.screen {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding: calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line);
}

/* header */
.top { display: flex; align-items: flex-end; justify-content: space-between; padding: 20px 4px 0; }
.top h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.top .count { font-size: 15px; font-weight: 500; color: var(--text-2); padding-bottom: 5px; }

.pill-dark {
  align-self: flex-start; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 0;
  background: rgba(28, 28, 30, 0.8); color: #fff; font-size: 13px; font-weight: 500;
}

.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; }
.search input { flex: 1; border: 0; background: transparent; font-size: 17px; outline: none; min-width: 0; }
.search input::placeholder { color: #555558; }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, 0.55); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }

.filter-pill {
  align-self: flex-start; display: flex; align-items: center; gap: 8px; min-height: 36px;
  padding: 0 8px 0 14px; border-radius: 999px; border: 0; background: var(--text); color: #fff;
  font-size: 14px; font-weight: 600;
}

.add-bar {
  display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px; border-radius: 16px;
  font-size: 17px; font-weight: 500; text-align: left; width: 100%;
  box-shadow: inset 0 1px 0 #fff, 0 8px 24px rgba(60, 80, 0, 0.12);
}
.plus { width: 30px; height: 30px; border-radius: 50%; background: var(--lime); display: flex; align-items: center; justify-content: center; flex: none; }

/* rows */
.rows { display: flex; flex-direction: column; gap: 6px; }
.row {
  display: flex; align-items: flex-start; gap: 4px; padding: 4px 14px 4px 4px; border-radius: 16px;
  background: var(--row); border: 1px solid #fff; box-shadow: 0 4px 16px rgba(60, 80, 0, 0.08);
}
.check {
  width: 44px; height: 44px; flex: none; border: 0; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.check span {
  width: 22px; height: 22px; border-radius: 50%; border: 1.8px solid #8E8E93;
  display: flex; align-items: center; justify-content: center;
}
.check.on span { background: var(--green); border-color: var(--green); }
.body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 11px 0 9px; }
.body .text {
  border: 0; background: transparent; padding: 0; text-align: left; font-size: 16px; line-height: 1.3;
  overflow-wrap: anywhere;
}
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 13px; }
.l-over { color: var(--red); font-weight: 600; }
.l-today { color: var(--blue); font-weight: 600; }
.l-wait { color: var(--orange); font-weight: 600; }
.l-lynn { display: inline-flex; align-items: center; gap: 4px; color: var(--violet); font-size: 12px; font-weight: 500; }
.tag { border: 0; background: rgba(60, 60, 67, 0.1); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 500; color: #3A3A3C; }
.due { flex: none; padding-top: 13px; font-size: 13px; text-align: right; max-width: 76px; color: var(--muted); }
.due.over { color: var(--red); font-weight: 600; }
.due.today { color: var(--blue); font-weight: 600; }
.row.done .text { color: #3A3A3C; text-decoration: line-through; }

.empty { margin: 0; padding: 32px 8px; font-size: 16px; color: var(--text-2); text-align: center; }

.link-pill {
  align-self: center; margin-top: 10px; display: flex; align-items: center; min-height: 40px; padding: 0 18px;
  border-radius: 999px; font-size: 14px; font-weight: 600;
}

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 20px); max-width: 528px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px 4px 18px; border-radius: 999px;
  background: rgba(28, 28, 30, 0.8); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  color: #fff; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); z-index: 20;
}
.toast span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast button { flex: none; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.18); color: #fff; font-weight: 600; min-height: 40px; padding: 0 16px; }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.back { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px; font-size: 17px; font-weight: 500; }

/* cards and form rows */
.card { border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, 0.92); border: 1px solid #fff; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 0 16px; border-bottom: 1px solid var(--hair); font-size: 17px; }
.field:last-child { border-bottom: 0; }
.field select, .field input[type="date"], .field input[type="datetime-local"] {
  border: 0; background: transparent; color: var(--muted); font-size: 17px; text-align: right; max-width: 60%; min-height: 44px;
}
.section-label { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; padding-left: 16px; }

.title-card { display: flex; gap: 6px; align-items: flex-start; padding: 6px 16px 14px 6px; border-radius: 22px; background: rgba(255, 255, 255, 0.92); border: 1px solid #fff; }
.title-card textarea {
  width: 100%; border: 0; background: transparent; padding: 0; font-size: 22px; font-weight: 600; line-height: 1.25;
  letter-spacing: -0.01em; resize: none; outline: none; field-sizing: content; min-height: 56px;
}

.segmented { display: flex; padding: 2px; border-radius: 9px; background: rgba(118, 118, 128, 0.14); }
.segmented button { min-height: 30px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: #3A3A3C; }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }

.switch { position: relative; width: 51px; height: 31px; border-radius: 999px; border: 0; padding: 0; background: rgba(120, 120, 128, 0.24); transition: background 0.2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: left 0.2s; }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { left: 22px; }

.reminder { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 6px 0 16px; border-bottom: 1px solid var(--hair); }
.reminder div { flex: 1; display: flex; flex-direction: column; }
.reminder small { font-size: 13px; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.options { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--hair); }
.option { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(60, 60, 67, 0.18); background: #fff; font-size: 15px; }
.option.picker { position: relative; display: flex; align-items: center; overflow: hidden; }
.option.picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.01; border: 0; }
.option[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.blue-btn { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px; border: 0; background: transparent; font-size: 17px; color: var(--blue); }

.actions { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.primary { min-height: 52px; border-radius: 999px; border: 0; background: var(--text); color: #fff; font-size: 17px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.secondary { min-height: 44px; border: 0; background: transparent; font-size: 15px; font-weight: 500; }

/* add sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(40, 50, 0, 0.18); z-index: 10; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 60px); z-index: 11;
  max-width: 560px; margin: 0 auto; border-radius: 32px 32px 0 0; overflow-y: auto;
  background: rgba(248, 250, 240, 0.86); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  border-top: 1px solid #fff; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  display: flex; flex-direction: column; gap: 18px; padding: 8px 20px calc(env(safe-area-inset-bottom) + 24px);
}
.grabber { align-self: center; width: 36px; height: 5px; border-radius: 3px; background: rgba(60, 60, 67, 0.3); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head strong { font-size: 17px; }
.text-btn { border: 0; background: transparent; font-size: 17px; color: var(--blue); min-height: 44px; padding: 0 4px; }
.text-btn.strong { font-weight: 600; }
.text-btn:disabled { color: #9a9aa0; }
.sheet textarea { border: 0; border-radius: 16px; background: #fff; padding: 14px 16px; font-size: 19px; line-height: 1.35; resize: none; outline: none; min-height: 96px; }
.saved { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding-left: 4px; }
.group { display: flex; flex-direction: column; gap: 10px; }
.group .row-options { display: flex; flex-wrap: wrap; gap: 8px; }
.hint { margin: -8px 0 0; padding: 0 4px; font-size: 13px; color: var(--muted); }

/* setup */
.setup h1 { font-size: 34px; margin: 40px 4px 0; }
.setup p { margin: 0 4px; font-size: 15px; color: var(--text-2); line-height: 1.4; }
.setup input { width: 100%; border: 0; background: transparent; font-size: 16px; text-align: left; min-height: 50px; outline: none; }
.error { color: var(--red); font-size: 14px; margin: 0 4px; }

.group-title { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 4px 0; }
