.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
}
@media (min-width: 520px) {
  body { background: linear-gradient(180deg, #d9eefb, #e6f7ea); }
  .app { box-shadow: 0 16px 40px rgba(40, 90, 130, .12); }
}
.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(36px + env(safe-area-inset-top)) 22px 28px;
}
.auth-logo { width: 112px; height: 112px; object-fit: contain; }
.auth h1 { margin: 4px 0 0; font-size: 34px; letter-spacing: .12em; }
.tag { margin: 6px 0 18px; color: var(--muted); }
.auth form, .auth-bottom { width: min(100%, 360px); }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0; }
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); }
.primary, .auth form button, .sheet .primary, .alarm-actions .primary {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--green-deep);
  color: #fff;
  font-weight: 700;
  padding: 13px;
  margin-top: 6px;
}
.ghost, .link {
  border: 0;
  background: transparent;
  color: var(--blue-deep);
  font-weight: 700;
}
.auth-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.auth-bottom .ghost {
  border: 1px solid var(--blue);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
}
.link { display: block; margin: 14px auto 0; background: none; }
.main { min-height: 100vh; display: flex; flex-direction: column; }
.head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
}
.head img { width: 44px; height: 44px; object-fit: contain; }
.head-text { flex: 1; min-width: 0; }
.head-row { display: flex; align-items: center; gap: 8px; }
.head-row strong { font-size: 20px; letter-spacing: .08em; }
.sub { margin-top: 2px; color: var(--muted); font-size: 13px; }
.tiny {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--blue-deep);
  font-weight: 700;
}
.push-card {
  margin: 4px 16px 8px;
  background: var(--sun-soft);
  border-radius: 16px;
  padding: 12px 14px;
}
.push-card strong { font-size: 15px; }
.push-card p { margin: 6px 0 10px; font-size: 13px; line-height: 1.55; }
.push-card .row { display: flex; gap: 8px; }
.push-card .primary { width: auto; margin: 0; padding: 8px 14px; }
.filters, .chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; }
.filters button, .chips button {
  flex: 0 0 auto;
  border: 0;
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 13px;
}
.filters button.on, .chips button.on { background: var(--blue); color: #08385c; }
.list { flex: 1; padding: 4px 16px 12px; }
.card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 8px 18px rgba(55, 120, 160, .06);
  text-align: left;
}
.check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  background: #fff;
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 0;
}
.check.on { background: var(--green-deep); border-color: var(--green-deep); }
.check.on::after {
  content: "";
  display: block;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin: 2px auto 0;
}
.card-body { flex: 1; min-width: 0; }
.card-body p { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.card-body span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.st-done .card-body p { color: var(--muted); text-decoration: line-through; }
.pill {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 8px;
  flex: 0 0 auto;
}
.st-todo .pill { background: var(--blue-soft); color: var(--blue-deep); }
.st-undone .pill { background: var(--sun-soft); color: var(--sun-deep); }
.st-later .pill { background: var(--green-soft); color: var(--green-ink); }
.st-done .pill { background: #f1f4f6; color: #8aa0b0; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px 10px; }
.empty img { width: 88px; height: 88px; object-fit: contain; }
.dock {
  position: sticky;
  bottom: 0;
  background: #f7fbfe;
  border-top: 1px solid var(--line);
  padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
}
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 0 16px; }
.composer textarea { flex: 1; min-height: 46px; max-height: 96px; resize: none; margin: 0; }
#saveBtn {
  width: auto;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  white-space: nowrap;
}
.pick-time { margin: 0 16px 8px; }
.mic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 32px);
  margin: 8px 16px 0;
  border: 0;
  border-radius: 999px;
  background: var(--green-deep);
  color: #fff;
  font-weight: 700;
  padding: 12px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.mic svg { width: 20px; height: 20px; fill: currentColor; }
.mic.rec { background: var(--sun); color: #5c4810; }
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet .mask { position: absolute; inset: 0; background: rgba(20, 40, 60, .45); }
.sheet .panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 88vh;
  overflow: auto;
}
.sheet h2 { margin: 0 0 8px; font-size: 18px; }
.me-line { margin: 8px 0; font-size: 15px; }
#meSheet .ghost { display: block; width: 100%; text-align: left; padding: 10px 0; }
.danger {
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-weight: 700;
  padding: 10px;
}
.alarm {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 40, 60, .48);
  padding: 22px;
}
.alarm-card {
  width: min(100%, 360px);
  background: #fff;
  border-radius: 28px;
  padding: 22px 18px 16px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(20, 40, 60, .2);
}
.alarm-card img { width: 76px; height: 76px; object-fit: contain; }
.kicker { color: var(--sun-deep); font-weight: 800; letter-spacing: .08em; }
.alarm-card h2 { margin: 8px 0; font-size: 22px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.alarm-card .when { color: var(--muted); margin: 0 0 12px; }
.checkline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  margin: 8px 0 12px;
}
.checkline input { width: 22px; height: 22px; margin: 0; }
.alarm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.alarm-actions button { flex: 1 1 30%; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 10px 6px; font-weight: 700; }
.alarm-actions .primary { border: 0; background: var(--green-deep); color: #fff; }
.more { min-height: 18px; color: var(--muted); font-size: 12px; margin-top: 8px; }
