:root {
  --sky: #eef3ff;
  --paper: #fbfcff;
  --ink: #17213d;
  --muted: #73809f;
  --cobalt: #315eea;
  --cobalt-dark: #2548b8;
  --line: #dce4f5;
  --coral: #ff6f59;
  --mint: #3bbf91;
  --shadow: 0 18px 46px rgba(39, 62, 119, .12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { background: var(--sky); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 5%, rgba(49,94,234,.13), transparent 28%),
    linear-gradient(180deg, var(--sky) 0 310px, #f8faff 310px 100%);
  font-family: Manrope, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(100%, 680px); min-height: 100vh; margin: 0 auto; padding: 0 18px calc(112px + var(--safe-bottom)); }
.hero { padding: calc(20px + env(safe-area-inset-top, 0px)) 4px 21px; }
.hero__topline, .hero__main, .sheet-head, .sheet-actions { display: flex; align-items: center; justify-content: space-between; }
.date-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.icon-button, .close-button {
  width: 42px; height: 42px; border: 1px solid rgba(49,94,234,.13); border-radius: 14px;
  background: rgba(255,255,255,.62); color: var(--cobalt); display: grid; place-items: center;
}
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.is-spinning svg { animation: spin .7s linear infinite; }
.eyebrow { margin: 0 0 7px; color: var(--cobalt); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-family: Unbounded, sans-serif; font-size: clamp(30px, 9vw, 43px); line-height: 1.02; letter-spacing: -.05em; }
.hero__main { margin-top: 17px; align-items: flex-end; }
.summary { margin: 17px 0 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.progress-orbit { position: relative; width: 88px; height: 88px; flex: 0 0 88px; }
.progress-orbit svg { width: 100%; transform: rotate(-90deg); }
.progress-orbit circle { fill: none; stroke-width: 7; }
.orbit-track { stroke: rgba(49,94,234,.11); }
.orbit-progress { stroke: var(--cobalt); stroke-linecap: round; stroke-dasharray: 226.2; stroke-dashoffset: 226.2; transition: stroke-dashoffset .5s ease; }
.progress-orbit__text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.progress-orbit__text strong { font-family: Unbounded, sans-serif; font-size: 20px; line-height: 1; }
.progress-orbit__text span { color: var(--muted); font-size: 9px; font-weight: 700; margin-top: 4px; }
.view-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: rgba(217,226,246,.7); border-radius: 16px; }
.view-tab { border: 0; border-radius: 12px; padding: 11px 8px; background: transparent; color: var(--muted); font-weight: 800; font-size: 13px; }
.view-tab span { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 4px; padding: 0 6px; border-radius: 8px; background: rgba(255,255,255,.65); font-size: 10px; }
.view-tab.is-active { background: white; color: var(--ink); box-shadow: 0 3px 10px rgba(45,67,116,.08); }
.context-filters { display: flex; gap: 8px; padding: 16px 0 12px; overflow-x: auto; scrollbar-width: none; }
.context-filters::-webkit-scrollbar { display: none; }
.context-chip { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px 11px; background: rgba(255,255,255,.72); color: var(--muted); font-size: 11px; font-weight: 800; }
.context-chip.is-active { border-color: var(--ink); background: var(--ink); color: white; }
.task-list { display: grid; gap: 10px; }
.task-card {
  position: relative; display: grid; grid-template-columns: 47px 1fr 18px; align-items: center; min-height: 78px;
  padding: 13px 14px 13px 10px; border: 1px solid rgba(211,221,241,.88); border-radius: 19px;
  background: rgba(255,255,255,.92); box-shadow: 0 8px 24px rgba(42,62,108,.055); cursor: pointer;
  animation: rise .28s both;
}
.task-card:active { transform: scale(.985); }
.task-card.is-done { opacity: .66; }
.task-card.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.check-button { width: 38px; height: 38px; border: 0; background: transparent; display: grid; place-items: center; padding: 0; }
.check-ring { width: 27px; height: 27px; border: 2px solid #c7d2eb; border-radius: 9px; display: grid; place-items: center; color: white; font-weight: 900; transition: .18s ease; }
.task-card.is-done .check-ring { border-color: var(--mint); background: var(--mint); transform: rotate(-3deg); }
.task-body { min-width: 0; }
.task-title { margin: 0; font-size: 14px; line-height: 1.4; font-weight: 750; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.meta-pill { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.meta-pill + .meta-pill::before { content: "·"; margin-right: 6px; color: #bdc7de; }
.priority-high { color: var(--coral); }
.task-chevron { color: #b4bfd8; font-size: 22px; font-weight: 300; }
.add-button { position: fixed; z-index: 20; left: 50%; bottom: calc(16px + var(--safe-bottom)); transform: translateX(-50%); width: min(calc(100% - 36px), 644px); height: 58px; border: 0; border-radius: 18px; background: var(--cobalt); color: white; font-weight: 800; box-shadow: 0 14px 34px rgba(49,94,234,.34); }
.add-button span { font-size: 21px; margin-right: 5px; vertical-align: -1px; }
.empty-state, .gate { padding: 42px 22px; text-align: center; }
.empty-state__mark, .gate__mark { width: 66px; height: 66px; margin: 0 auto 17px; display: grid; place-items: center; border-radius: 22px; background: white; color: var(--mint); font-family: Unbounded; font-size: 27px; box-shadow: var(--shadow); transform: rotate(-4deg); }
.empty-state h2, .gate h1 { margin: 0 0 8px; font-family: Unbounded; font-size: 20px; }
.empty-state p, .gate p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.gate { padding-top: 30vh; }
.sheet-backdrop { position: fixed; z-index: 40; inset: 0; background: rgba(17,27,54,.37); backdrop-filter: blur(4px); }
.task-sheet { position: fixed; z-index: 50; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 680px); max-height: 91vh; overflow-y: auto; padding: 10px 20px calc(24px + var(--safe-bottom)); border-radius: 28px 28px 0 0; background: var(--paper); box-shadow: 0 -24px 60px rgba(22,34,67,.2); animation: sheetUp .25s ease both; }
.sheet-handle { width: 42px; height: 5px; margin: 1px auto 17px; border-radius: 4px; background: #d6deef; }
.sheet-head { margin-bottom: 20px; }
.sheet-head h2 { margin: 0; font-family: Unbounded; font-size: 24px; }
.close-button { border: 0; background: #edf1fa; color: var(--muted); font-size: 28px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field > span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); padding: 13px 14px; outline: none; resize: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(49,94,234,.1); }
.field--title textarea { font-size: 17px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.save-button, .danger-button { min-height: 50px; border: 0; border-radius: 15px; padding: 0 20px; font-weight: 800; }
.save-button { margin-left: auto; min-width: 145px; background: var(--cobalt); color: white; }
.danger-button { background: #fff0ed; color: #d84e3b; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(90px + var(--safe-bottom)); transform: translateX(-50%); max-width: calc(100% - 48px); padding: 11px 15px; border-radius: 12px; background: var(--ink); color: white; font-size: 12px; font-weight: 700; box-shadow: var(--shadow); }
[hidden] { display: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } }
@keyframes sheetUp { from { transform: translate(-50%, 30px); opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 360px) { .progress-orbit { width: 76px; height: 76px; flex-basis: 76px; } .field-grid { grid-template-columns: 1fr; gap: 0; } }
