:root {
  --bg: #f6f3ec;
  --bg-deep: #eeeadf;
  --surface: #fffdf8;
  --surface-soft: #faf7f0;
  --ink: #1f201d;
  --ink-soft: #5f6159;
  --ink-faint: #92948a;
  --line: #e4dfd3;
  --line-strong: #d4cec0;
  --accent: #ef704d;
  --accent-deep: #d95736;
  --accent-soft: #fbe6dd;
  --olive: #64705d;
  --olive-soft: #e8ece2;
  --gold: #b9852e;
  --gold-soft: #f7ecd5;
  --danger: #c14f3d;
  --danger-soft: #f8e1dc;
  --shadow-sm: 0 1px 2px rgba(37, 35, 29, 0.04), 0 5px 18px rgba(37, 35, 29, 0.035);
  --shadow-lg: 0 30px 80px rgba(37, 35, 29, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar-width: 248px;
  --rail-width: 310px;
  --font: "Avenir Next", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 70% -20%, rgba(255, 255, 255, 0.9), transparent 36%),
    var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button:not(:disabled),
a {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.45;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
h3,
p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid rgba(239, 112, 77, 0.26);
  outline-offset: 2px;
}

.is-hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--rail-width);
  width: min(100%, 1536px);
  min-height: 100vh;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px 20px 24px;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fffaf0;
  background: var(--ink);
  border-radius: 13px;
}

.brand-mark svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.9;
}

.brand-mark circle {
  fill: var(--accent);
  stroke: none;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 48px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  color: var(--ink-soft);
  background: transparent;
  border-radius: 12px;
  text-align: left;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.7);
}

.nav-item:active {
  transform: scale(0.985);
}

.nav-item.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.nav-item.is-active::before {
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: -20px;
  width: 3px;
  content: "";
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
}

.nav-count {
  min-width: 22px;
  margin-left: auto;
  padding: 2px 6px;
  color: var(--ink-faint);
  background: var(--bg-deep);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.nav-item.is-active .nav-count {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.sidebar-note {
  position: relative;
  margin-top: auto;
  margin-bottom: 24px;
  padding: 19px 17px 18px;
  overflow: hidden;
  color: var(--olive);
  background: var(--olive-soft);
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.8;
}

.note-sun {
  position: absolute;
  top: -14px;
  right: -12px;
  width: 55px;
  height: 55px;
  background: rgba(239, 112, 77, 0.18);
  border-radius: 50%;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.utility-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  color: var(--ink-soft);
  background: transparent;
  border-radius: 9px;
  font-size: 12px;
}

.utility-button:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.utility-button svg {
  width: 17px;
  height: 17px;
}

.local-badge {
  padding-left: 10px;
  color: var(--ink-faint);
  font-size: 10px;
}

.main-content {
  min-width: 0;
  padding: 38px 44px 64px;
}

.view-root {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.view-enter {
  animation: view-in 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-header {
  display: none;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mobile-install-button {
  display: inline-flex;
  width: auto;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 650;
}

.mobile-install-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.mobile-install-button span {
  line-height: 1;
}

.is-standalone .mobile-install-button,
.is-standalone .install-banner,
.is-standalone .install-data-action {
  display: none !important;
}

.install-banner {
  display: none;
}

.page-header,
.calendar-header,
.upcoming-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-header h1,
.calendar-header h1,
.upcoming-header h1 {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.page-header p,
.calendar-header p,
.upcoming-header p {
  margin-top: 9px;
  color: var(--ink-faint);
  font-size: 13px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.button-primary {
  color: #fffaf1;
  background: var(--ink);
  box-shadow: 0 7px 18px rgba(31, 32, 29, 0.14);
}

.button-primary:hover {
  background: #34362f;
  box-shadow: 0 9px 22px rgba(31, 32, 29, 0.18);
}

.button-ghost {
  color: var(--ink-soft);
  background: transparent;
}

.button-ghost:hover {
  background: var(--bg-deep);
  color: var(--ink);
}

.button-soft {
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.hero-card {
  position: relative;
  display: flex;
  min-height: 174px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 32px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(255, 253, 248, 0.96), rgba(251, 237, 226, 0.8)),
    var(--surface);
  border: 1px solid rgba(226, 218, 203, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-card::after {
  position: absolute;
  right: -78px;
  bottom: -115px;
  width: 250px;
  height: 250px;
  content: "";
  background: rgba(239, 112, 77, 0.07);
  border: 1px solid rgba(239, 112, 77, 0.12);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--olive);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero-kicker::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
}

.hero-date {
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.hero-date strong {
  font-family: "Avenir Next", "SF Pro Display", var(--font);
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
}

.hero-date span {
  color: var(--ink-soft);
  font-size: 15px;
}

.hero-summary {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 13px;
}

.hero-summary strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-progress {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.progress-ring {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  background:
    radial-gradient(circle at center, #fffaf4 57%, transparent 58%),
    conic-gradient(var(--accent) calc(var(--progress, 0) * 1%), #e9e2d5 0);
  border-radius: 50%;
  transition: background 300ms ease;
}

.progress-ring-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.progress-ring-inner strong {
  font-size: 18px;
  font-weight: 650;
}

.progress-ring-inner span {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
}

.hero-progress-copy {
  max-width: 86px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.65;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.day-chip {
  position: relative;
  display: flex;
  min-height: 68px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  transition:
    color 160ms ease,
    background 160ms ease,
    border 160ms ease,
    transform 160ms ease;
}

.day-chip:hover {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.64);
  border-color: var(--line);
}

.day-chip:active {
  transform: scale(0.97);
}

.day-chip span {
  color: var(--ink-faint);
  font-size: 10px;
}

.day-chip strong {
  font-size: 17px;
  font-weight: 550;
}

.day-chip i {
  width: 4px;
  height: 4px;
  background: transparent;
  border-radius: 50%;
}

.day-chip.has-tasks i {
  background: var(--accent);
}

.day-chip.is-today:not(.is-selected) {
  border-color: var(--line-strong);
}

.day-chip.is-selected {
  color: #fffaf1;
  background: var(--ink);
  box-shadow: 0 9px 22px rgba(31, 32, 29, 0.14);
}

.day-chip.is-selected span {
  color: rgba(255, 250, 241, 0.63);
}

.day-chip.is-selected i {
  background: var(--accent);
}

.quick-add {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 56px;
  padding: 7px 8px 7px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  transition:
    border 160ms ease,
    box-shadow 160ms ease;
}

.quick-add:focus-within {
  border-color: #c9beb0;
  box-shadow: 0 0 0 4px rgba(239, 112, 77, 0.07);
}

.quick-add-icon {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 9px;
}

.quick-add-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.quick-add input {
  min-width: 0;
  flex: 1;
  padding: 8px 0;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 14px;
}

.quick-add input::placeholder {
  color: #a6a69d;
}

.quick-add-submit {
  display: grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  color: var(--ink);
  background: var(--bg);
  border-radius: 10px;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.quick-add-submit:hover {
  color: #fffaf1;
  background: var(--ink);
}

.quick-add-submit svg {
  width: 18px;
  height: 18px;
}

.quick-hint {
  padding: 0 8px;
  color: var(--ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

.tasks-section {
  margin-top: 30px;
}

.section-heading,
.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-heading h2,
.rail-heading h2,
.calendar-agenda h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.section-heading h2 span {
  margin-left: 7px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 500;
}

.text-button {
  display: inline-flex;
  align-items: center;
  padding: 5px 2px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 11px;
}

.text-button:hover {
  color: var(--ink);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: flex-start;
  padding: 17px 15px 17px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 1px rgba(37, 35, 29, 0.02);
  animation: card-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border 180ms ease,
    opacity 180ms ease;
}

.task-card:nth-child(2) {
  animation-delay: 25ms;
}

.task-card:nth-child(3) {
  animation-delay: 50ms;
}

.task-card:nth-child(4) {
  animation-delay: 75ms;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(37, 35, 29, 0.055);
  transform: translateY(-1px);
}

.task-card.priority-high::before {
  position: absolute;
  top: 19px;
  bottom: 19px;
  left: -1px;
  width: 3px;
  content: "";
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.task-check {
  display: grid;
  width: 25px;
  height: 25px;
  margin-top: 1px;
  place-items: center;
  color: transparent;
  background: var(--surface);
  border: 1.5px solid #c8c3b7;
  border-radius: 8px;
  transition:
    color 160ms ease,
    background 160ms ease,
    border 160ms ease,
    transform 160ms ease;
}

.task-check:hover {
  border-color: var(--accent);
  transform: scale(1.06);
}

.task-check svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.task-card.is-complete .task-check {
  color: #fffaf1;
  background: var(--olive);
  border-color: var(--olive);
}

.task-body {
  min-width: 0;
}

.task-topline {
  display: flex;
  min-height: 21px;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.task-time {
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.task-kind,
.task-important,
.due-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.6;
}

.task-kind {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.task-kind.task-type-deadline {
  color: var(--danger);
  background: var(--danger-soft);
}

.task-important {
  color: #9a6a18;
  background: var(--gold-soft);
}

.task-title {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 560;
  line-height: 1.52;
  transition: color 160ms ease;
}

.task-notes {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.due-badge {
  padding-left: 0;
  color: var(--ink-faint);
  background: transparent;
}

.due-badge::before {
  width: 5px;
  height: 5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.due-badge.is-today,
.due-badge.is-soon {
  color: var(--accent-deep);
}

.due-badge.is-overdue {
  color: var(--danger);
}

.due-badge.is-complete {
  color: var(--ink-faint);
}

.task-card.is-complete {
  opacity: 0.7;
}

.task-card.is-complete .task-title {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: #b8b4a9;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transform: translateX(3px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.task-card:hover .task-actions,
.task-card:focus-within .task-actions {
  opacity: 1;
  transform: translateX(0);
}

.task-action {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--ink-faint);
  background: transparent;
  border-radius: 8px;
}

.task-action:hover {
  color: var(--ink);
  background: var(--bg);
}

.task-action.delete-task:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.task-action svg {
  width: 15px;
  height: 15px;
}

.empty-state {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
  background: rgba(255, 253, 248, 0.5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
}

.empty-illustration {
  position: relative;
  width: 74px;
  height: 62px;
  margin-bottom: 17px;
}

.empty-illustration::before {
  position: absolute;
  inset: 5px 8px 0 0;
  content: "";
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 6px 6px 0 var(--bg-deep);
  transform: rotate(-4deg);
}

.empty-illustration::after {
  position: absolute;
  top: 21px;
  left: 24px;
  width: 29px;
  height: 2px;
  content: "";
  background: var(--line-strong);
  box-shadow: 0 8px 0 var(--line-strong), 0 16px 0 var(--line-strong);
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 600;
}

.empty-state p {
  max-width: 260px;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.7;
}

.empty-state .button {
  min-height: 36px;
  margin-top: 16px;
  padding: 7px 13px;
  font-size: 12px;
}

.all-done {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 12px 14px;
  color: var(--olive);
  background: var(--olive-soft);
  border-radius: 12px;
  font-size: 11px;
}

.all-done svg {
  width: 17px;
  height: 17px;
}

.right-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 36px 25px 40px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.rail-card {
  padding: 17px;
  background: rgba(255, 253, 248, 0.58);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.rail-card + .rail-card {
  margin-top: 14px;
}

.mini-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mini-calendar-head strong {
  font-size: 13px;
  font-weight: 650;
}

.mini-calendar-actions {
  display: flex;
  gap: 2px;
}

.mini-calendar-actions button,
.calendar-nav button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ink-faint);
  background: transparent;
  border-radius: 7px;
}

.mini-calendar-actions button:hover,
.calendar-nav button:hover {
  color: var(--ink);
  background: var(--bg-deep);
}

.mini-calendar-actions svg,
.calendar-nav svg {
  width: 15px;
  height: 15px;
}

.mini-weekdays,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.mini-weekdays {
  margin-bottom: 5px;
  color: var(--ink-faint);
  font-size: 9px;
}

.mini-day {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border-radius: 7px;
  font-size: 10px;
  transition:
    color 140ms ease,
    background 140ms ease;
}

.mini-day:hover {
  color: var(--ink);
  background: var(--bg-deep);
}

.mini-day.is-outside {
  color: #b7b5ad;
}

.mini-day.is-today {
  color: var(--accent-deep);
  font-weight: 700;
}

.mini-day.is-selected {
  color: #fffaf1;
  background: var(--ink);
}

.mini-day.has-tasks::after {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 3px;
  height: 3px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
}

.mini-day.is-selected.has-tasks::after {
  background: #ffb39c;
}

.rail-heading {
  margin-bottom: 13px;
}

.rail-heading h2 {
  font-size: 13px;
}

.rail-heading span {
  color: var(--ink-faint);
  font-size: 9px;
}

.rail-ddl-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-ddl-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 5px;
  color: inherit;
  background: transparent;
  border-radius: 9px;
  text-align: left;
}

.rail-ddl-item:hover {
  background: var(--surface);
}

.rail-ddl-dot {
  width: 6px;
  height: 6px;
  margin-top: 6px;
  flex: 0 0 auto;
  background: var(--accent);
  border-radius: 50%;
}

.rail-ddl-item.is-overdue .rail-ddl-dot {
  background: var(--danger);
}

.rail-ddl-copy {
  min-width: 0;
}

.rail-ddl-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-ddl-copy span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.rail-empty {
  padding: 20px 5px 14px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.rail-footer-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding: 10px 5px 1px;
  color: var(--ink-soft);
  background: transparent;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.rail-footer-button svg {
  width: 13px;
  height: 13px;
}

.mobile-nav {
  display: none;
}

.calendar-view .page-header,
.upcoming-view .page-header {
  margin-bottom: 20px;
}

.calendar-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 3px 16px;
}

.calendar-toolbar h2 {
  font-size: 16px;
  font-weight: 650;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.calendar-today-button {
  width: auto !important;
  padding: 0 10px;
  color: var(--ink-soft) !important;
  font-size: 10px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  padding: 0 0 7px;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.calendar-grid {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.calendar-day {
  position: relative;
  display: flex;
  min-height: 105px;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 9px;
  color: var(--ink);
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition:
    background 140ms ease,
    box-shadow 140ms ease;
}

.calendar-day:hover {
  z-index: 1;
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.calendar-day.is-outside {
  color: #b5b3aa;
  background: #fbf9f4;
}

.calendar-day.is-selected {
  z-index: 1;
  background: #fff9f2;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.calendar-day.has-deadline {
  background-image: radial-gradient(circle at right 9px top 9px, var(--accent) 2.5px, transparent 3px);
}

.calendar-day.is-today .calendar-day-number {
  color: #fffaf1;
  background: var(--ink);
}

.calendar-day-number {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
}

.calendar-day-items {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.calendar-task-label {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.calendar-task-label::before {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  content: "";
  background: #adae9f;
  border-radius: 50%;
}

.calendar-task-label.is-deadline::before {
  background: var(--accent);
}

.calendar-task-label.is-done {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.calendar-task-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-more {
  color: var(--ink-faint);
  font-size: 8px;
}

.calendar-agenda {
  margin-top: 26px;
}

.calendar-agenda .section-heading p {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.agenda-group {
  margin-top: 17px;
}

.agenda-group:first-child {
  margin-top: 0;
}

.agenda-group-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 9px;
}

.agenda-group-date {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.agenda-group-date strong {
  font-size: 13px;
  font-weight: 650;
}

.agenda-group-date span {
  color: var(--ink-faint);
  font-size: 10px;
}

.agenda-group-header::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--line);
}

.compact-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}

.compact-task:last-child {
  border-bottom: 0;
}

.compact-check {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  color: transparent;
  background: var(--surface);
  border: 1.4px solid #c8c3b7;
  border-radius: 7px;
}

.compact-check svg {
  width: 13px;
  height: 13px;
}

.compact-task.is-complete .compact-check {
  color: #fffaf1;
  background: var(--olive);
  border-color: var(--olive);
}

.compact-task-body {
  min-width: 0;
  flex: 1;
}

.compact-task-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 520;
}

.compact-task-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-task.is-complete .compact-task-title {
  color: var(--ink-faint);
  text-decoration: line-through;
}

.compact-task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
}

.compact-task-meta .due-badge {
  padding: 0;
  font-size: 9px;
}

.compact-edit {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--ink-faint);
  background: transparent;
  border-radius: 7px;
}

.compact-edit:hover {
  color: var(--ink);
  background: var(--surface);
}

.compact-edit svg {
  width: 14px;
  height: 14px;
}

.upcoming-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.filter-chip {
  padding: 7px 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 11px;
}

.filter-chip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.filter-chip.is-active {
  color: #fffaf1;
  background: var(--ink);
  border-color: var(--ink);
}

.upcoming-list-card {
  padding: 3px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.summary-stat {
  padding: 15px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.summary-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.summary-stat span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.summary-stat.is-urgent strong {
  color: var(--accent-deep);
}

.modal {
  width: min(92vw, 560px);
  max-height: min(90vh, 760px);
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(211, 203, 190, 0.8);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.modal::backdrop {
  background: rgba(31, 32, 29, 0.34);
  backdrop-filter: blur(4px);
  animation: backdrop-in 180ms ease;
}

.modal[open] {
  animation: modal-in 230ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}

.task-modal form,
.data-modal {
  padding: 25px;
}

.task-modal form {
  max-height: min(90vh, 760px);
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}

.modal-header .eyebrow {
  margin-bottom: 5px;
}

.modal-header h2 {
  font-family: "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-soft);
  background: var(--bg);
  border-radius: 10px;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--bg-deep);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 17px;
  padding: 0;
  border: 0;
}

.field > span,
.field legend {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.field em {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  background: #fcfaf5;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  font-size: 13px;
  transition:
    border 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #adaaa1;
}

.field input:focus,
.field textarea:focus {
  background: var(--surface);
  border-color: #c9beb0;
  box-shadow: 0 0 0 4px rgba(239, 112, 77, 0.07);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field textarea {
  min-height: 76px;
  resize: vertical;
}

.field-title input {
  padding: 14px 13px;
  font-size: 15px;
}

.field-error {
  display: none;
  color: var(--danger);
  font-size: 10px;
}

.field-error.is-visible {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  background: var(--bg);
  border-radius: 11px;
}

.segmented-control label {
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-faint);
  border-radius: 8px;
  font-size: 11px;
  transition:
    color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.segmented-control span:hover {
  color: var(--ink);
}

.segmented-control input:checked + span {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(37, 35, 29, 0.08);
  font-weight: 600;
}

.segmented-control input:focus-visible + span {
  outline: 3px solid rgba(239, 112, 77, 0.26);
}

.segmented-control svg {
  width: 15px;
  height: 15px;
}

.priority-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 17px;
  padding: 12px;
  background: var(--bg);
  border-radius: 11px;
  cursor: pointer;
}

.priority-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.priority-switch {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  background: #cfcac0;
  border-radius: 30px;
  transition: background 160ms ease;
}

.priority-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(31, 32, 29, 0.18);
  transition: transform 160ms ease;
}

.priority-toggle input:checked + .priority-switch {
  background: var(--accent);
}

.priority-toggle input:checked + .priority-switch::after {
  transform: translateX(14px);
}

.priority-toggle input:focus-visible + .priority-switch {
  outline: 3px solid rgba(239, 112, 77, 0.26);
  outline-offset: 2px;
}

.priority-toggle > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.priority-toggle strong {
  font-size: 11px;
  font-weight: 600;
}

.priority-toggle small {
  color: var(--ink-faint);
  font-size: 9px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.modal-footer-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.danger-text {
  color: var(--danger);
}

.data-modal {
  padding: 25px;
  overflow-y: auto;
}

.install-modal {
  width: min(92vw, 610px);
  overflow-y: auto;
}

.install-dialog-content {
  padding: 25px;
}

.install-preview {
  display: grid;
  grid-template-columns: 62px minmax(84px, 0.8fr) 22px minmax(130px, 1.2fr);
  gap: 13px;
  align-items: center;
  padding: 15px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(239, 112, 77, 0.12), transparent 42%),
    var(--bg);
  border-radius: 15px;
}

.install-app-icon {
  width: 62px;
  height: 62px;
  overflow: hidden;
  border-radius: 17px;
  box-shadow: 0 8px 20px rgba(31, 32, 29, 0.16);
}

.install-app-icon svg {
  width: 100%;
  height: 100%;
}

.install-preview-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.install-preview-copy strong {
  font-size: 15px;
  font-weight: 650;
}

.install-preview-copy span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 10px;
}

.install-preview-copy small {
  width: fit-content;
  margin-top: 6px;
  padding: 2px 7px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 99px;
  font-size: 8px;
}

.install-arrow {
  display: grid;
  place-items: center;
  color: var(--ink-faint);
}

.install-arrow svg {
  width: 16px;
  height: 16px;
}

.install-preview-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 10px 11px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(225, 217, 203, 0.92);
  border-radius: 11px;
  box-shadow: 0 5px 16px rgba(37, 35, 29, 0.04);
}

.install-preview-card span {
  color: var(--accent-deep);
  font-size: 8px;
  font-weight: 650;
}

.install-preview-card strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-preview-card small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.install-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.install-benefits div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.install-benefits strong {
  font-size: 10px;
  font-weight: 650;
}

.install-benefits span {
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.5;
}

.install-warning {
  margin-top: 12px;
  padding: 10px 12px;
  color: #986f28;
  background: var(--gold-soft);
  border-radius: 9px;
  font-size: 9px;
  line-height: 1.65;
}

.install-primary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}

.install-primary {
  flex: 0 0 auto;
}

.install-primary-row > span {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.55;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 15px;
}

.install-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.install-step-number {
  display: inline-flex;
  width: fit-content;
  padding: 2px 6px;
  color: var(--ink-soft);
  background: var(--bg);
  border-radius: 5px;
  font-size: 8px;
  font-weight: 650;
}

.install-step p {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.75;
}

.install-step strong {
  color: var(--ink);
  font-weight: 650;
}

.install-shortcut-note {
  margin-top: 12px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.data-summary {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 17px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--bg);
  border-radius: 13px;
}

.data-summary > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.data-summary strong {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.data-summary span,
.data-summary p {
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.65;
}

.data-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.data-action-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
}

.data-action-card:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.data-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-soft);
  background: var(--bg);
  border-radius: 9px;
}

.data-icon svg {
  width: 17px;
  height: 17px;
}

.data-action-card > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.data-action-card strong {
  font-size: 11px;
  font-weight: 600;
}

.data-action-card small {
  color: var(--ink-faint);
  font-size: 9px;
}

.arrow-icon {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--ink-faint);
  font-size: 9px;
}

.privacy-note svg {
  width: 13px;
  height: 13px;
}

.toast {
  position: fixed;
  z-index: 20;
  bottom: 26px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 220px;
  padding: 11px 14px 11px 16px;
  color: #fffaf1;
  background: var(--ink);
  border-radius: 11px;
  box-shadow: 0 14px 35px rgba(31, 32, 29, 0.25);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.toast button {
  margin-left: auto;
  padding: 2px 0;
  color: #ffb49d;
  background: transparent;
  font-size: 10px;
  font-weight: 650;
}

.toast button.is-hidden {
  display: none;
}

@media (max-width: 1240px) {
  :root {
    --sidebar-width: 224px;
    --rail-width: 280px;
  }

  .main-content {
    padding-right: 30px;
    padding-left: 30px;
  }

  .right-rail {
    padding-right: 18px;
    padding-left: 18px;
  }

  .calendar-day {
    min-height: 95px;
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --bg: #f7f4ed;
  }

  body {
    padding-bottom: calc(77px + env(safe-area-inset-bottom));
  }

  .app-shell {
    display: block;
    min-height: auto;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 0 17px 28px;
  }

  .mobile-header {
    display: flex;
    min-height: 69px;
    align-items: center;
    justify-content: space-between;
  }

  .brand-mobile {
    gap: 9px;
  }

  .brand-mobile .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .brand-mobile .brand-mark svg {
    width: 21px;
    height: 21px;
  }

  .brand-mobile strong {
    font-size: 17px;
    letter-spacing: 0.13em;
  }

  .mobile-header .icon-button {
    background: transparent;
  }

  .mobile-header-actions .mobile-install-button {
    border: 1px solid rgba(239, 112, 77, 0.12);
  }

  .install-banner {
    display: flex;
    align-items: flex-start;
    margin: -3px 0 14px;
    background: linear-gradient(105deg, #fff8f1, #f8eee2);
    border: 1px solid #f0d8ca;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(37, 35, 29, 0.035);
  }

  .install-banner-main {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 10px;
    padding: 11px 3px 11px 12px;
    background: transparent;
    text-align: left;
  }

  .install-banner-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--accent-deep);
    background: var(--accent-soft);
    border-radius: 10px;
  }

  .install-banner-icon svg {
    width: 18px;
    height: 18px;
  }

  .install-banner-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px;
  }

  .install-banner-copy strong {
    font-size: 11px;
    font-weight: 650;
  }

  .install-banner-copy small {
    overflow: hidden;
    color: var(--ink-faint);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .install-banner-arrow {
    display: grid;
    width: 25px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--accent-deep);
  }

  .install-banner-arrow svg {
    width: 14px;
    height: 14px;
  }

  .install-banner-dismiss {
    display: grid;
    width: 30px;
    height: 37px;
    flex: 0 0 auto;
    margin-top: 2px;
    place-items: center;
    color: var(--ink-faint);
    background: transparent;
    border-radius: 8px;
  }

  .install-banner-dismiss svg {
    width: 13px;
    height: 13px;
  }

  .view-root {
    max-width: 620px;
  }

  .page-header,
  .calendar-header,
  .upcoming-header {
    align-items: center;
    margin-bottom: 19px;
  }

  .page-header h1,
  .calendar-header h1,
  .upcoming-header h1 {
    font-size: 28px;
  }

  .page-header p,
  .calendar-header p,
  .upcoming-header p {
    font-size: 11px;
  }

  .desktop-only {
    display: none;
  }

  .desktop-add {
    display: none;
  }

  .hero-card {
    min-height: 154px;
    padding: 23px 20px;
    border-radius: 21px;
  }

  .hero-date strong {
    font-size: 46px;
  }

  .hero-date span {
    font-size: 13px;
  }

  .hero-summary {
    margin-top: 11px;
    font-size: 11px;
  }

  .hero-progress {
    gap: 0;
  }

  .progress-ring {
    width: 72px;
    height: 72px;
  }

  .progress-ring-inner strong {
    font-size: 15px;
  }

  .progress-ring-inner span {
    font-size: 9px;
  }

  .hero-progress-copy {
    display: none;
  }

  .week-strip {
    gap: 3px;
    margin: 14px 0;
  }

  .day-chip {
    min-height: 59px;
    border-radius: 11px;
  }

  .day-chip span {
    font-size: 9px;
  }

  .day-chip strong {
    font-size: 15px;
  }

  .quick-add {
    min-height: 52px;
    padding-left: 13px;
  }

  .quick-add-icon {
    width: 27px;
    height: 27px;
  }

  .quick-add input {
    font-size: 13px;
  }

  .quick-hint {
    display: none;
  }

  .quick-add-submit {
    width: 36px;
    height: 36px;
  }

  .tasks-section {
    margin-top: 25px;
  }

  .section-heading h2 {
    font-size: 15px;
  }

  .task-card {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 10px 14px 13px;
  }

  .task-check {
    width: 24px;
    height: 24px;
  }

  .task-title {
    font-size: 14px;
  }

  .task-topline {
    gap: 6px;
  }

  .task-time {
    font-size: 10px;
  }

  .task-actions {
    align-items: flex-start;
    opacity: 1;
    transform: none;
  }

  .task-action {
    width: 27px;
    height: 27px;
  }

  .task-action.delete-task {
    display: none;
  }

  .calendar-day {
    min-height: 79px;
    gap: 6px;
    padding: 8px 5px;
  }

  .calendar-day-number {
    width: 23px;
    height: 23px;
    font-size: 10px;
  }

  .calendar-task-label {
    display: none;
  }

  .calendar-day-items {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3px;
  }

  .calendar-day.has-tasks::after {
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 4px;
    height: 4px;
    content: "";
    background: #aca99f;
    border-radius: 50%;
    transform: translateX(-50%);
  }

  .calendar-day.has-deadline::after {
    background: var(--accent);
  }

  .calendar-more {
    display: none;
  }

  .calendar-card {
    padding: 13px 10px;
    border-radius: 18px;
  }

  .calendar-toolbar {
    padding: 0 3px 12px;
  }

  .calendar-weekdays {
    font-size: 9px;
  }

  .calendar-grid {
    border-radius: 8px;
  }

  .summary-strip {
    gap: 6px;
  }

  .summary-stat {
    padding: 12px;
  }

  .summary-stat strong {
    font-size: 20px;
  }

  .summary-stat span {
    font-size: 9px;
  }

  .upcoming-list-card {
    padding: 1px 14px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 12;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: calc(65px + env(safe-area-inset-bottom));
    align-items: start;
    padding: 8px 11px env(safe-area-inset-bottom);
    background: rgba(255, 253, 248, 0.92);
    border-top: 1px solid rgba(219, 212, 199, 0.92);
    box-shadow: 0 -10px 35px rgba(37, 35, 29, 0.04);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-item {
    display: flex;
    min-height: 49px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--ink-faint);
    background: transparent;
    border-radius: 10px;
    font-size: 9px;
  }

  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-item.is-active {
    color: var(--ink);
    font-weight: 650;
  }

  .mobile-add-button {
    display: grid;
    width: 49px;
    height: 49px;
    margin: -16px auto 0;
    place-items: center;
    color: #fffaf1;
    background: var(--ink);
    border: 5px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(31, 32, 29, 0.23);
  }

  .mobile-add-button svg {
    width: 19px;
    height: 19px;
    stroke-width: 2;
  }

  .modal {
    width: calc(100vw - 22px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    border-radius: 20px;
  }

  .task-modal form,
  .data-modal,
  .install-dialog-content {
    padding: 21px 18px;
  }

  .modal-header h2 {
    font-size: 23px;
  }

  .form-grid {
    gap: 9px;
  }

  .toast {
    bottom: calc(85px + env(safe-area-inset-bottom));
  }

  .install-preview {
    grid-template-columns: 54px minmax(78px, 0.7fr) 18px minmax(115px, 1.3fr);
    gap: 9px;
    padding: 12px;
  }

  .install-app-icon {
    width: 54px;
    height: 54px;
    border-radius: 15px;
  }

  .install-preview-copy strong {
    font-size: 13px;
  }

  .install-benefits {
    gap: 5px;
  }

  .install-benefits div {
    padding: 8px;
  }

  .install-benefits span {
    display: none;
  }

  .install-primary-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .install-primary {
    width: 100%;
  }

  .empty-state {
    min-height: 215px;
  }
}

@media (max-width: 390px) {
  .main-content {
    padding-right: 13px;
    padding-left: 13px;
  }

  .page-header h1,
  .calendar-header h1,
  .upcoming-header h1 {
    font-size: 25px;
  }

  .hero-card {
    padding: 20px 16px;
  }

  .hero-kicker {
    font-size: 9px;
  }

  .hero-date {
    gap: 9px;
  }

  .hero-date strong {
    font-size: 41px;
  }

  .progress-ring {
    width: 66px;
    height: 66px;
  }

  .task-card {
    grid-template-columns: 24px minmax(0, 1fr) 27px;
  }

  .calendar-day {
    min-height: 72px;
  }

  .calendar-card {
    padding-right: 7px;
    padding-left: 7px;
  }

  .summary-stat {
    padding: 10px;
  }

  .summary-stat strong {
    font-size: 18px;
  }

  .install-preview {
    grid-template-columns: 54px 1fr;
  }

  .install-arrow {
    display: none;
  }

  .install-preview-card {
    grid-column: 1 / -1;
  }

  .quick-add input {
    font-size: 12px;
  }
}

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