:root {
  color-scheme: light;
  --ink: #272621;
  --muted: #747168;
  --line: #dfddd5;
  --paper: #f7f5ef;
  --card: rgba(255, 255, 255, 0.86);
  --white: #fff;
  --violet: #7466e8;
  --violet-dark: #5b4ccc;
  --violet-soft: #eeebff;
  --rose: #e97984;
  --rose-soft: #fff0f1;
  --mint: #69a48e;
  --mint-soft: #e9f5ef;
  --amber: #c8873b;
  --amber-soft: #fff3df;
  --danger: #c4515b;
  --shadow: 0 18px 50px rgba(44, 40, 31, 0.09);
  --shadow-small: 0 8px 24px rgba(44, 40, 31, 0.07);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(235, 172, 160, 0.12), transparent 25rem),
    radial-gradient(circle at 87% 30%, rgba(122, 105, 233, 0.11), transparent 27rem),
    var(--paper);
}

body.dialog-open { overflow: hidden; }
body.composer-open { overflow: hidden; }

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one { top: -11rem; left: -8rem; background: rgba(237, 136, 145, 0.09); }
.ambient-two { right: -10rem; bottom: -10rem; background: rgba(116, 102, 232, 0.08); }

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

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.login-card {
  width: min(100%, 31rem);
  padding: 3rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 2.25rem;
  height: 1.65rem;
  flex: 0 0 auto;
}

.brand-mark span {
  position: absolute;
  top: .18rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--violet);
}

.brand-mark span:first-child { left: 0; }
.brand-mark span:last-child { right: 0; background: var(--rose); opacity: .9; }
.brand-mark.large { width: 4.5rem; height: 3.4rem; }
.brand-mark.large span { width: 3rem; height: 3rem; }

.eyebrow {
  margin: 0 0 .55rem;
  color: var(--violet-dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.login-card h1 {
  margin: .8rem 0 .65rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7vw, 3.25rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.04em;
}

.login-intro { margin: 0 auto 2.25rem; color: var(--muted); line-height: 1.55; max-width: 23rem; }
.login-form { text-align: left; }
.login-form fieldset, .color-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.login-form legend, .color-picker legend, .field-label { display: block; margin-bottom: .65rem; font-size: .82rem; font-weight: 750; }

.profile-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.35rem; }

.profile-option {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 4rem;
  padding: .7rem .85rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1rem;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.profile-option:hover { transform: translateY(-1px); border-color: #bab5d9; }
.profile-option.selected { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.profile-option strong { font-size: .93rem; }

.avatar {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, #9186ef, #6859d8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.profile-1 { background: linear-gradient(145deg, #f198a0, #d86873); }

.password-field { position: relative; }
.password-field input { padding-right: 5.6rem; }
.password-field .icon-button { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); font-size: .75rem; }

input, textarea, select {
  width: 100%;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: .8rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input, select { min-height: 2.85rem; padding: 0 .85rem; }
textarea { padding: .8rem .85rem; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); background: #fff; }
input::placeholder, textarea::placeholder { color: #aaa69d; }

.form-error { min-height: 1.2rem; margin: .55rem 0; color: var(--danger); font-size: .82rem; }
.privacy-note { margin: 1.5rem 0 0; color: var(--muted); font-size: .74rem; }
.privacy-note span { color: var(--mint); margin-right: .25rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: 0 1.05rem;
  border: 0;
  border-radius: .8rem;
  font-weight: 750;
  font-size: .86rem;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { color: #fff; background: var(--ink); box-shadow: 0 7px 18px rgba(39, 38, 33, .15); }
.button.primary:hover { background: #0f0f0d; }
.button.quiet { color: var(--muted); background: #eeece6; }
.button.wide { width: 100%; }
.button.danger-button { color: var(--danger); background: var(--rose-soft); }

.icon-button, .text-button {
  min-height: 2.25rem;
  padding: 0 .65rem;
  border: 0;
  border-radius: .65rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.icon-button:hover, .text-button:hover { color: var(--ink); background: #efede7; }
.logout-icon { display: none; font-size: 1.2rem; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 4.8rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: .65rem max(1.25rem, calc((100vw - 76rem) / 2));
  background: rgba(247, 245, 239, .85);
  border-bottom: 1px solid rgba(215, 212, 203, .8);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: .7rem; width: max-content; color: var(--ink); text-decoration: none; font-family: Georgia, serif; font-size: 1.3rem; font-weight: 600; }
.main-nav { display: flex; gap: .25rem; padding: .25rem; border-radius: .85rem; background: #eeece6; }
.nav-button { min-height: 2.3rem; padding: 0 .85rem; border: 0; border-radius: .65rem; color: var(--muted); background: transparent; font-size: .8rem; font-weight: 700; cursor: pointer; }
.nav-button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(43, 41, 35, .08); }
.nav-badge { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; margin-left: .25rem; color: #fff; background: var(--violet); border-radius: 999px; font-size: .65rem; }
.user-area { justify-self: end; display: flex; align-items: center; gap: .65rem; }
.user-copy { display: flex; flex-direction: column; font-size: .77rem; line-height: 1.25; }
.user-caption { color: var(--muted); font-size: .65rem; }
.text-button { font-size: .75rem; }

.content { width: min(100% - 2.5rem, 76rem); margin: 0 auto; flex: 1; padding: 3.4rem 0 5rem; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.1rem; }
.welcome-row h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 3.45rem); font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.wave { color: var(--rose); font-size: .65em; }
.welcome-subtitle { margin: .65rem 0 0; color: var(--muted); }

.install-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  margin: -1rem 0 1.5rem;
  padding: 1rem 1.1rem;
  color: #fff;
  background: linear-gradient(125deg, #282722, #3d394f);
  border-radius: 1.1rem;
  box-shadow: 0 14px 34px rgba(39, 38, 33, .16);
}
.install-app-icon { position: relative; width: 2.7rem; height: 2.7rem; overflow: hidden; border-radius: .8rem; background: #171714; }
.install-app-icon span { position: absolute; top: .72rem; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: #8f82f5; }
.install-app-icon span:first-child { left: .42rem; }
.install-app-icon span:last-child { right: .42rem; background: #ef8e96; opacity: .94; }
.install-copy h2 { margin: 0 0 .18rem; font-family: Georgia, serif; font-size: 1.08rem; font-weight: 500; }
.install-copy p { margin: 0; color: rgba(255, 255, 255, .7); font-size: .75rem; line-height: 1.4; }
.install-action { min-height: 2.35rem; color: var(--ink); background: #fff; }
.install-close { color: rgba(255, 255, 255, .66); }
.install-close:hover { color: #fff; background: rgba(255, 255, 255, .1); }

.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2.7rem; }
.stat-card { display: flex; align-items: center; gap: 1rem; min-height: 6.1rem; padding: 1.2rem 1.35rem; border: 1px solid rgba(218, 215, 205, .86); border-radius: 1.15rem; background: var(--card); box-shadow: var(--shadow-small); }
.stat-icon { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: .85rem; font-size: 1.4rem; font-weight: 700; }
.stat-open .stat-icon { color: var(--violet-dark); background: var(--violet-soft); }
.stat-done .stat-icon { color: var(--mint); background: var(--mint-soft); }
.stat-card div { display: flex; flex-direction: column; }
.stat-card strong { font-family: Georgia, serif; font-size: 2rem; line-height: 1; font-weight: 500; }
.stat-card div span { margin-top: .25rem; color: var(--muted); font-size: .76rem; }

.composer-card { margin-bottom: 1.5rem; padding: 1.5rem; border: 1px solid #d9d4f5; border-radius: 1.15rem; background: rgba(250, 249, 255, .95); box-shadow: var(--shadow-small); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading.compact { align-items: flex-start; margin-bottom: 1.2rem; }
.section-heading h2, .group-title h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; letter-spacing: -.02em; }
.section-heading h2 { font-size: 2rem; }
.section-heading.compact h2 { font-size: 1.5rem; }

.task-form, .note-composer form, .edit-dialog form { display: grid; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .42rem; min-width: 0; }
.field > span { font-size: .76rem; font-weight: 750; }
.field em { color: var(--muted); font-weight: 500; font-style: normal; }
.form-grid { display: grid; gap: .85rem; }
.form-grid.three { grid-template-columns: 1.25fr 1fr 1fr; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; justify-content: flex-end; gap: .6rem; }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.filter-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter-chip { min-height: 2.3rem; padding: 0 .85rem; border: 1px solid transparent; border-radius: 999px; color: var(--muted); background: transparent; font-size: .78rem; font-weight: 700; cursor: pointer; }
.filter-chip:hover { background: #efede7; }
.filter-chip.active { color: var(--violet-dark); border-color: #dcd6ff; background: var(--violet-soft); }
.search-field { position: relative; width: min(15rem, 100%); }
.search-field > span:not(.sr-only) { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.2rem; pointer-events: none; }
.search-field input { min-height: 2.45rem; padding-left: 2.25rem; border-radius: 999px; background: rgba(255, 255, 255, .68); }

.task-group { margin-bottom: 2.25rem; }
.group-title { display: flex; align-items: center; gap: .55rem; margin-bottom: .85rem; padding: 0 .25rem; }
.group-title h2 { font-size: 1.25rem; }
.group-title > span { display: grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem; border-radius: 999px; color: var(--muted); background: #e9e6de; font-size: .68rem; font-weight: 750; }
.group-title.danger h2 { color: var(--danger); }
.group-title.danger > span { color: var(--danger); background: var(--rose-soft); }
.task-list { display: grid; gap: .65rem; }

.task-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .95rem; min-height: 4.7rem; padding: .85rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 5px 16px rgba(44, 40, 31, .045); transition: border-color .18s ease, transform .18s ease, opacity .18s ease; }
.task-card:hover { border-color: #c8c4b9; transform: translateY(-1px); }
.task-card.completed { opacity: .62; }
.task-card.completed .task-title { text-decoration: line-through; }
.task-check { appearance: none; width: 1.45rem; height: 1.45rem; min-height: auto; padding: 0; border: 2px solid #bbb7ad; border-radius: 50%; background: #fff; cursor: pointer; }
.task-check:hover { border-color: var(--violet); }
.task-check:checked { border-color: var(--mint); background: var(--mint); }
.task-check:checked::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #fff; font-size: .78rem; font-weight: 900; }
.task-main { min-width: 0; }
.task-title { display: block; margin-bottom: .25rem; font-size: .93rem; font-weight: 750; overflow-wrap: anywhere; }
.task-details { margin: .15rem 0 .35rem; color: var(--muted); font-size: .8rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; color: var(--muted); font-size: .7rem; }
.meta-item { display: inline-flex; align-items: center; gap: .25rem; }
.person-dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--violet); }
.person-dot.profile-1 { background: var(--rose); }
.task-menu { align-self: center; font-size: 1.2rem; }

.empty-state { padding: 4.5rem 1rem; text-align: center; color: var(--muted); }
.empty-symbol { width: 4rem; height: 4rem; display: grid; place-items: center; margin: 0 auto 1rem; color: var(--mint); background: var(--mint-soft); border-radius: 1.3rem; font-size: 1.75rem; }
.empty-symbol.note { color: var(--violet); background: var(--violet-soft); }
.empty-state h3 { margin: 0 0 .35rem; color: var(--ink); font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.empty-state p { margin: 0; font-size: .86rem; }

.notes-heading { margin-top: .4rem; }
.note-options { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.color-picker { display: flex; flex-wrap: wrap; gap: .45rem; }
.color-picker legend { width: 100%; }
.color-picker label { cursor: pointer; }
.color-picker input { position: absolute; opacity: 0; pointer-events: none; }
.swatch { width: 1.8rem; height: 1.8rem; display: block; overflow: hidden; border: 2px solid transparent; border-radius: 50%; color: transparent; }
.color-picker input:checked + .swatch { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.swatch.sand, .note-card.sand { background: #f4e8c9; }
.swatch.rose, .note-card.rose { background: #f7d9dc; }
.swatch.lavender, .note-card.lavender { background: #e4dff8; }
.swatch.mint, .note-card.mint { background: #d8ece2; }
.swatch.sky, .note-card.sky { background: #dceaf2; }
.pin-option { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 700; cursor: pointer; }
.pin-option input { width: 1.05rem; height: 1.05rem; min-height: auto; accent-color: var(--violet); }

.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.note-card { position: relative; min-height: 12rem; display: flex; flex-direction: column; padding: 1.25rem; border: 1px solid rgba(104, 95, 70, .09); border-radius: 1.15rem; box-shadow: var(--shadow-small); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.note-card:hover { transform: translateY(-2px) rotate(-.2deg); box-shadow: var(--shadow); }
.note-card.pinned::before { content: "●"; position: absolute; top: .7rem; right: .8rem; color: rgba(39, 38, 33, .45); font-size: .65rem; }
.note-card h3 { margin: 0 1rem .7rem 0; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
.note-card p { display: -webkit-box; margin: 0 0 1.2rem; overflow: hidden; color: #47443d; font-size: .84rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-line-clamp: 7; -webkit-box-orient: vertical; }
.note-footer { display: flex; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid rgba(50, 45, 35, .1); color: rgba(50, 45, 35, .58); font-size: .68rem; }

.edit-dialog { width: min(calc(100% - 2rem), 38rem); padding: 0; border: 0; border-radius: 1.35rem; color: var(--ink); background: #fbfaf7; box-shadow: 0 24px 80px rgba(26, 24, 20, .25); }
.edit-dialog::backdrop { background: rgba(32, 30, 27, .42); backdrop-filter: blur(4px); }
.edit-dialog form { padding: 1.6rem; }
.dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .4rem; }
.dialog-actions > div { display: flex; gap: .55rem; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 1.5rem; transform: translate(-50%, 130%); max-width: calc(100% - 2rem); padding: .8rem 1rem; color: #fff; background: var(--ink); border-radius: .75rem; box-shadow: var(--shadow); font-size: .8rem; font-weight: 700; opacity: 0; transition: transform .25s ease, opacity .25s ease; pointer-events: none; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--danger); }
.footer { display: flex; justify-content: center; gap: .55rem; padding: 1.5rem; color: #98948b; font-size: .7rem; }

@media (max-width: 860px) {
  .topbar { grid-template-columns: 1fr auto; padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
  .main-nav { position: fixed; z-index: 30; bottom: max(.7rem, env(safe-area-inset-bottom)); left: 50%; width: min(calc(100% - 1.4rem), 26rem); display: grid; grid-template-columns: 1fr 1fr; transform: translateX(-50%); padding: .35rem; background: rgba(238, 236, 230, .94); border: 1px solid rgba(255, 255, 255, .75); box-shadow: 0 12px 38px rgba(39, 38, 33, .22); backdrop-filter: blur(18px); }
  .nav-button { min-width: 0; min-height: 2.9rem; }
  .user-copy { display: none; }
  .logout-button { width: 2.65rem; min-height: 2.65rem; padding: 0; }
  .logout-label { display: none; }
  .logout-icon { display: inline; }
  .content { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .login-shell { min-height: 100dvh; align-items: center; padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
  .login-card { padding: 2rem 1.25rem; border-radius: 1.5rem; }
  .login-intro { margin-bottom: 1.65rem; }
  .profile-option { min-height: 4.3rem; }
  input, select { min-height: 3.15rem; font-size: 1rem; }
  textarea { font-size: 1rem; }
  .button { min-height: 3rem; }
  .icon-button { min-width: 2.75rem; min-height: 2.75rem; }
  .topbar { min-height: 4.2rem; padding-top: max(.55rem, env(safe-area-inset-top)); }
  .brand { font-size: 1.15rem; }
  .brand-mark { transform: scale(.86); transform-origin: left; margin-right: -.2rem; }
  .content { width: min(100% - 1.25rem, 76rem); padding-top: 1.65rem; }
  .welcome-row { align-items: flex-start; margin-bottom: 1.6rem; }
  .welcome-row h1 { font-size: 2.45rem; }
  .welcome-subtitle { font-size: .86rem; }
  .welcome-row #quick-add-button, .notes-heading #add-note-button { position: fixed; z-index: 28; right: max(1rem, env(safe-area-inset-right)); bottom: calc(5.25rem + env(safe-area-inset-bottom)); width: 3.55rem; min-height: 3.55rem; padding: 0; overflow: hidden; border-radius: 50%; white-space: nowrap; color: transparent; box-shadow: 0 10px 28px rgba(39, 38, 33, .3); }
  .welcome-row #quick-add-button span, .notes-heading #add-note-button span { color: #fff; font-size: 1.45rem; }
  .stats-grid { gap: .55rem; margin-bottom: 2rem; }
  .stat-card { min-height: 5.1rem; padding: .85rem; border-radius: 1rem; box-shadow: 0 5px 16px rgba(44, 40, 31, .04); }
  .stat-icon { display: none; }
  .stat-card strong { font-size: 1.6rem; }
  .stat-card div span { font-size: .65rem; }
  .form-grid.three, .form-grid.two { grid-template-columns: 1fr; }
  body.composer-open::before { content: ""; position: fixed; z-index: 54; inset: 0; background: rgba(32, 30, 27, .45); backdrop-filter: blur(3px); }
  .composer-card { position: fixed; z-index: 55; right: 0; bottom: 0; left: 0; max-height: 88dvh; margin: 0; padding: 1.25rem max(1.1rem, env(safe-area-inset-right)) max(1.15rem, env(safe-area-inset-bottom)) max(1.1rem, env(safe-area-inset-left)); overflow-y: auto; border: 0; border-radius: 1.5rem 1.5rem 0 0; background: #fbfaf7; box-shadow: 0 -18px 50px rgba(25, 23, 20, .2); }
  .composer-card::before { content: ""; display: block; width: 2.6rem; height: .28rem; margin: -.55rem auto .8rem; border-radius: 1rem; background: #d7d3c9; }
  .composer-card .form-actions { position: sticky; bottom: 0; padding-top: .55rem; background: #fbfaf7; }
  .composer-card .form-actions .button { flex: 1; }
  .list-toolbar { align-items: stretch; flex-direction: column; margin-bottom: 1.5rem; }
  .filter-group { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; }
  .filter-chip { flex: 0 0 auto; }
  .search-field { width: 100%; }
  .task-card { min-height: 5rem; grid-template-columns: auto 1fr auto; padding: .9rem .75rem .9rem .9rem; gap: .72rem; border-radius: 1.05rem; }
  .task-check { width: 1.65rem; height: 1.65rem; }
  .task-menu { min-width: 2.75rem; min-height: 2.75rem; }
  .task-details { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .notes-heading { align-items: flex-start; }
  .notes-heading h2 { font-size: 1.75rem; }
  .notes-grid { grid-template-columns: 1fr; gap: .8rem; }
  .note-card { min-height: 9rem; padding: 1.1rem; }
  .install-card { grid-template-columns: auto 1fr auto; gap: .75rem; margin: -.45rem 0 1.4rem; padding: .9rem; }
  .install-app-icon { width: 2.55rem; height: 2.55rem; }
  .install-action { grid-column: 1 / -1; width: 100%; }
  .install-close { position: absolute; top: .25rem; right: .2rem; }
  .install-copy { padding-right: 1.6rem; }
  .note-options, .dialog-actions { align-items: flex-start; flex-direction: column; }
  .dialog-actions > div { width: 100%; }
  .dialog-actions > div .button { flex: 1; }
  .edit-dialog { width: 100%; max-height: 90dvh; margin: auto 0 0; overflow-y: auto; border-radius: 1.5rem 1.5rem 0 0; }
  .edit-dialog form { padding: 1.2rem max(1.1rem, env(safe-area-inset-right)) max(1.2rem, env(safe-area-inset-bottom)) max(1.1rem, env(safe-area-inset-left)); }
  .toast { bottom: calc(5.6rem + env(safe-area-inset-bottom)); width: max-content; }
  .footer { display: none; }
}

@media (display-mode: standalone) {
  .topbar { padding-top: max(.65rem, env(safe-area-inset-top)); }
}

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