:root {
  color-scheme: dark;
  --bg: #111214;
  --panel: #1b1d22;
  --panel2: #252932;
  --line: rgba(255, 255, 255, .13);
  --text: #f8f8f6;
  --muted: #aeb3bd;
  --green: #61d394;
  --blue: #61b7e8;
  --amber: #f6c95e;
  --rose: #ec6a8e;
  --ink: #101114;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    linear-gradient(145deg, rgba(97, 183, 232, .14), transparent 34%),
    linear-gradient(220deg, rgba(246, 201, 94, .1), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }

.app-shell {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 88px;
  background: rgba(17, 18, 20, .78);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 8px;
}

.title-block { text-align: center; min-width: 0; }
.title-block span, .eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: 22px; line-height: 1.1; }
h2 { margin-bottom: 8px; font-size: 28px; line-height: 1.08; }
h3 { margin-bottom: 7px; font-size: 17px; line-height: 1.18; }
p { color: var(--muted); line-height: 1.5; }

main { padding: 10px 16px 0; }

.view { display: block; }
.loading {
  min-height: 60vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.hero, .panel, .card, .task-card, .notice-group, .system-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
}

.hero {
  padding: 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(236, 106, 142, .24), transparent 28%),
    radial-gradient(circle at 82% 36%, rgba(97, 183, 232, .18), transparent 30%),
    rgba(255, 255, 255, .07);
}

.hero-head, .row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(97, 211, 148, .32);
  border-radius: 999px;
  color: #d8ffe7;
  background: rgba(97, 211, 148, .12);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.card {
  min-height: 104px;
  padding: 14px;
}

.card span, .task-card span, .system-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.card strong {
  display: block;
  margin: 9px 0 3px;
  font-size: 24px;
}

.card small, .task-card small, .system-row small, .notice-item small {
  color: var(--muted);
  line-height: 1.35;
}

.stack { display: grid; gap: 10px; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: var(--panel);
}

input, select { min-height: 46px; }
textarea { min-height: 104px; padding-top: 12px; resize: vertical; }

.chip-button, .primary-action, .secondary-action, .danger-action {
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.chip-button {
  min-height: 40px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  font-size: 12px;
}

.primary-action, .secondary-action, .danger-action {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
}

.primary-action { background: var(--green); color: var(--ink); }
.secondary-action { background: rgba(97, 183, 232, .16); color: #d9f2ff; border: 1px solid rgba(97, 183, 232, .34); }
.danger-action { background: rgba(236, 106, 142, .16); color: #ffe4eb; border: 1px solid rgba(236, 106, 142, .38); }

.actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.action-tile {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.swipe-zone {
  height: calc(100vh - 166px);
  min-height: 520px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  margin: -8px -16px 0;
  padding: 0 16px 16px;
}

.swipe-panel {
  min-height: calc(100vh - 184px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 0 18px;
  scroll-snap-align: start;
}

.swipe-hint {
  min-height: 36px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.list { display: grid; gap: 10px; }
.task-card, .system-row, .notice-group { padding: 14px; }
.task-card strong { display: block; margin: 7px 0 5px; font-size: 16px; line-height: 1.3; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tag.high { color: #ffe0e7; background: rgba(236, 106, 142, .18); }
.tag.done { color: #dfffe9; background: rgba(97, 211, 148, .16); }

.task-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin-top: 12px;
  border: 1px solid rgba(97, 211, 148, .34);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(97, 211, 148, .12);
  color: #dfffe9;
  font-weight: 900;
}

.task-check input { width: 22px; height: 22px; accent-color: var(--green); }

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
}

.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  text-align: center;
  line-height: 1.5;
}

.notice-board { display: grid; gap: 12px; }
.notice-group.reminders { border-color: rgba(97, 183, 232, .34); }
.notice-group.celebrations { border-color: rgba(97, 211, 148, .34); }
.notice-group.alerts { border-color: rgba(236, 106, 142, .38); }
.notice-title { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.notice-item { margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; }
.notice-item strong { display: block; margin-bottom: 4px; line-height: 1.25; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  display: grid;
  width: min(480px, 100vw);
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(17, 18, 20, .94);
  transform: translateX(-50%);
}

.bottom-nav button {
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.bottom-nav button.active { background: rgba(255, 255, 255, .1); color: var(--text); }

@media (max-width: 360px) {
  .topbar, main { padding-left: 12px; padding-right: 12px; }
  .actions { gap: 7px; }
  .action-tile { font-size: 11px; }
}
