:root {
  color-scheme: light;
  --ink: #171922;
  --muted: #727785;
  --line: #e8eaf0;
  --purple: #626be8;
  --lime: #cfff62;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f6f8;
  min-width: 320px;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #c2c5ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.app {
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: auto;
  background: #fff;
  box-shadow: 0 0 80px #1719220d;
}
main {
  min-height: 100dvh;
  padding: max(22px, env(safe-area-inset-top)) 18px
    calc(130px + env(safe-area-inset-bottom));
}
.section-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  margin: 0 4px 10px;
}
.habit-label {
  margin-top: 24px;
}
.todo-list {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.todo {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 3px;
  align-items: center;
  padding: 10px 9px;
  min-height: 78px;
  border-top: 1px solid var(--line);
}
.todo:first-child {
  border: 0;
}
.check {
  background: none;
  border: 0;
  width: 44px;
  height: 48px;
  display: grid;
  place-items: center;
}
.check span {
  height: 26px;
  width: 26px;
  border: 1.5px solid #cdd0d8;
  border-radius: 9px;
  display: grid;
  place-items: center;
}
.check .icon {
  opacity: 0;
  width: 15px;
  height: 15px;
}
.done .check span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--lime);
}
.done .check .icon {
  opacity: 1;
}
.task-body {
  border: 0;
  background: none;
  text-align: left;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}
.task-copy {
  min-width: 0;
  flex: 1;
}
.task-title {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.task-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.task-time {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.chip {
  background: #eef0ff;
  color: #515cce;
  border-radius: 6px;
  padding: 2px 5px;
  margin-right: 4px;
  font-size: 12px;
}
.overdue {
  color: #b64d43;
}
.done .task-title {
  text-decoration: line-through;
  color: #9da2ad;
}
.done .task-sub,
.done .task-time {
  opacity: 0.65;
}
.empty {
  padding: 25px 16px;
  color: #8a8f9a;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}
.calendar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  background: #f1f2f6;
  color: #686e7c;
  border-radius: 13px;
  min-height: 44px;
  padding: 0 15px;
  margin: 24px auto 0;
  font-size: 14px;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sync-status {
  margin: 12px 0;
  text-align: center;
  font-size: 12px;
  color: #a27631;
  min-height: 18px;
}
.composer-shell {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--keyboard-offset, 0px);
  width: min(100%, 480px);
  padding: 12px 14px max(13px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, #fff 24%);
  z-index: 10;
}
.composer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: end;
  gap: 7px;
  padding: 7px;
  border: 1px solid #dfe2e9;
  border-radius: 19px;
  background: #fffffff5;
  box-shadow: 0 12px 38px #1719221c;
}
.round {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  display: grid;
  place-items: center;
}
.voice {
  background: #f0f1f5;
  color: #727785;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.voice.recording {
  background: #fbe4e1;
  color: #b23c32;
}
.send {
  background: var(--ink);
  color: #fff;
}
.composer textarea {
  border: 0;
  background: none;
  width: 100%;
  min-height: 42px;
  max-height: 135px;
  resize: none;
  line-height: 1.45;
  padding: 9px 2px;
  margin: 0;
  outline: none;
}
.composer textarea::placeholder {
  color: #979ca8;
  font-size: 14px;
}
.voice-hint {
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  margin-top: 8px;
}
.sheet {
  width: min(calc(100% - 20px), 460px);
  max-height: calc(100dvh - 32px);
  border: 0;
  border-radius: 25px;
  padding: 22px 20px max(24px, env(safe-area-inset-bottom));
  margin: auto auto 10px;
  box-shadow: 0 24px 90px #17192240;
  overscroll-behavior: contain;
  overflow: auto;
}
.sheet::backdrop {
  background: #17192255;
  backdrop-filter: blur(3px);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.sheet h2 {
  font-size: 19px;
  margin: 0;
  font-weight: 650;
}
.close {
  font-size: 27px;
  font-weight: 300;
  border: 0;
  border-radius: 50%;
  height: 38px;
  width: 38px;
  background: #f1f2f6;
  color: #767b86;
}
.sheet label,
.login label {
  display: block;
  font-size: 14px;
  font-weight: 550;
  margin: 16px 0 7px;
}
.sheet input:not([type="checkbox"]):not([type="file"]),
.sheet select,
.sheet textarea,
.login input {
  border: 1px solid #dfe2e9;
  border-radius: 12px;
  width: 100%;
  min-height: 45px;
  padding: 10px 11px;
  background: #fff;
  resize: vertical;
}
.sheet input[type="date"],
.sheet input[type="time"] {
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.check-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
}
.check-label input {
  accent-color: var(--ink);
  width: 18px;
  height: 18px;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
  align-items: center;
}
.primary,
.soft,
.danger,
.plain {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
}
.primary {
  background: var(--ink);
  color: #fff;
}
.soft {
  background: #f0f1f6;
  color: #545b69;
}
.danger {
  color: #af433a;
  background: #fbeeed;
}
.plain {
  background: none;
  color: #727785;
}
.actions .primary {
  flex: 1;
}
.notice,
.hint {
  font-size: 14px;
  color: #777c89;
  line-height: 1.7;
}
.notice:empty,
.warning:empty {
  display: none;
}
.warning {
  font-size: 14px;
  color: #ac572c;
  line-height: 1.6;
  white-space: pre-line;
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.calendar-nav .plain {
  font-size: 28px;
}
.calendar-nav input {
  border: 0 !important;
  text-align: center;
  width: 180px !important;
  font-weight: 600;
}
.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.weekdays {
  text-align: center;
  font-size: 13px;
  color: #9095a0;
  margin: 6px 0 12px;
}
.day {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  background: none;
  border-radius: 13px;
  min-height: 38px;
  padding: 0;
  font-size: 16px;
}
.day.other {
  color: #bdc1ca;
}
.day.today {
  box-shadow: inset 0 0 0 1px #bbbfd0;
}
.day.selected {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}
.day.has-tasks:after {
  content: "";
  height: 4px;
  width: 4px;
  position: absolute;
  bottom: 5px;
  left: calc(50% - 2px);
  border-radius: 50%;
  background: var(--purple);
}
.day.selected:after {
  background: var(--lime);
}
.calendar-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.weekday-picks {
  display: flex;
  gap: 5px;
}
.weekday-picks button {
  flex: 1;
  border: 1px solid #e3e5ed;
  border-radius: 10px;
  background: #fff;
  min-height: 40px;
  padding: 5px 0;
  font-size: 14px;
}
.weekday-picks button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.steps-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.step {
  padding: 12px;
  background: #f6f7fa;
  border-radius: 14px;
  margin: 9px 0;
}
.step-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-top input {
  background: #fff;
}
.step .field-row {
  margin-top: 7px;
}
.step .plain {
  padding: 0;
  width: 32px;
  flex-shrink: 0;
}
.step label {
  margin: 4px 0;
  font-size: 12px;
}
.sheet section {
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
.sheet section:first-of-type {
  border: 0;
  padding-top: 0;
}
.sheet h3 {
  font-size: 16px;
  margin: 6px 0;
}
.sheet section > .soft {
  margin-top: 12px;
}
.sheet details {
  margin: 22px 0;
  font-size: 14px;
}
.sheet small {
  display: block;
  color: #9b9faa;
  margin: 24px 0 0;
  font-size: 12px;
}
.login {
  padding: 20vh 28px 50px;
  max-width: 400px;
  margin: auto;
}
.login h1 {
  font-size: 26px;
  margin: 16px 0 6px;
}
.login p {
  color: var(--muted);
  font-size: 14px;
}
.login .primary {
  width: 100%;
  margin-top: 15px;
}
.login small {
  display: block;
  font-size: 12px;
  color: #a0a5af;
  margin-top: 24px;
}
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(104px + env(safe-area-inset-bottom));
  max-width: calc(100% - 42px);
  width: max-content;
  z-index: 1000;
  background: #171922;
  color: #fff;
  padding: 12px 17px;
  border-radius: 14px;
  font-size: 14px;
  box-shadow: 0 8px 30px #17192220;
  pointer-events: none;
}
.batch-note {
  font-size: 14px;
  color: var(--purple);
}
@media (min-width: 600px) {
  .sheet {
    margin: auto;
    border-radius: 24px;
    max-height: 90dvh;
  }
  .app {
    border-left: 1px solid #eceef3;
    border-right: 1px solid #eceef3;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .todo,
  .day {
    transition: background 0.15s;
  }
  .sheet[open] {
    animation: enter 0.18s ease-out;
  }
  @keyframes enter {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.task-title,
.task-sub {
  display: block;
}
