:root {
  color-scheme: light;
  --bg: #f3f0e7;
  --paper: #fbfaf5;
  --card: rgba(255, 255, 252, 0.88);
  --card-solid: #fffef9;
  --ink: #20332b;
  --muted: #748078;
  --line: rgba(45, 68, 58, 0.12);
  --green: #173f34;
  --green-2: #285b4a;
  --green-soft: #dfeadd;
  --lime: #dceaa8;
  --coral: #d87352;
  --coral-soft: #f7e4d9;
  --gold: #d7a33d;
  --gold-soft: #f5ead0;
  --blue: #557aa6;
  --blue-soft: #dfe9f5;
  --shadow: 0 16px 48px rgba(42, 59, 49, 0.08);
  --shadow-soft: 0 8px 28px rgba(42, 59, 49, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --sidebar-width: 238px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 10%, rgba(220, 234, 168, 0.46), transparent 28rem),
    radial-gradient(circle at 8% 92%, rgba(216, 115, 82, 0.14), transparent 25rem),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(85, 122, 166, 0.38);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(2px);
  opacity: 0.58;
}

.ambient-a {
  width: 22rem;
  height: 22rem;
  top: -7rem;
  right: 8%;
  background: rgba(220, 234, 168, 0.34);
}

.ambient-b {
  width: 12rem;
  height: 12rem;
  left: 23%;
  bottom: -4rem;
  background: rgba(216, 115, 82, 0.12);
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: min(1480px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 32px;
  background: rgba(251, 250, 245, 0.76);
  box-shadow: 0 26px 80px rgba(42, 59, 49, 0.11);
  backdrop-filter: blur(20px);
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px 18px 22px;
  color: #f9faf5;
  background:
    radial-gradient(circle at 20% 0%, rgba(220, 234, 168, 0.15), transparent 20rem),
    var(--green);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: var(--green);
  background: var(--lime);
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 21px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.brand strong {
  display: block;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 17px;
  letter-spacing: 0.04em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.19em;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 13px;
  border: 0;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  color: var(--green);
  background: var(--lime);
  box-shadow: 0 8px 20px rgba(8, 29, 22, 0.16);
}

.nav-icon {
  width: 19px;
  height: 19px;
}

.sidebar-note {
  position: relative;
  margin: auto 4px 18px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-note::after {
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(220, 234, 168, 0.09);
  content: "";
}

.sidebar-note-label {
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.sidebar-note p {
  margin: 9px 0 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.7;
}

.text-button {
  position: relative;
  z-index: 1;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 8px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: rgba(0, 0, 0, 0.08);
  text-align: left;
  cursor: pointer;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--green);
  background: #f4e6d4;
  font-family: "STSong", "Songti SC", serif;
  font-weight: 800;
}

.profile-copy {
  min-width: 0;
}

.profile-copy strong,
.profile-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.profile-copy small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 8px;
}

.profile-more {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.38);
}

.main-column {
  min-width: 0;
  min-height: calc(100vh - 32px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 18px clamp(22px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}

.mobile-brand {
  display: none;
}

.topbar-date {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.save-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.save-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #79a36e;
  box-shadow: 0 0 0 4px rgba(121, 163, 110, 0.12);
}

.save-indicator.saving i {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(215, 163, 61, 0.12);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  background: #fff;
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button.subtle {
  border-color: transparent;
  background: transparent;
}

.view {
  padding: 34px clamp(22px, 4vw, 52px) 56px;
  animation: pageIn 280ms ease both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-heading-copy {
  min-width: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: clamp(28px, 4vw, 41px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.page-heading p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button {
  border: 1px solid var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(23, 63, 52, 0.16);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.ghost-button {
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
}

.card {
  border: 1px solid rgba(45, 68, 58, 0.1);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.card-pad {
  padding: 22px;
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.card-heading h2,
.card-heading h3 {
  margin: 0;
  font-size: 15px;
}

.card-heading small {
  color: var(--muted);
  font-size: 10px;
}

.card-link {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.75fr);
  min-height: 244px;
  margin-bottom: 18px;
  overflow: hidden;
  color: #f8faf4;
  background:
    radial-gradient(circle at 82% 12%, rgba(220, 234, 168, 0.26), transparent 17rem),
    linear-gradient(135deg, #173f34, #244d3f);
  box-shadow: 0 18px 44px rgba(23, 63, 52, 0.18);
}

.dashboard-hero::before {
  position: absolute;
  top: -62px;
  right: 19%;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.dashboard-hero::after {
  position: absolute;
  right: -24px;
  bottom: -68px;
  width: 210px;
  height: 210px;
  border: 42px solid rgba(220, 234, 168, 0.07);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 32px;
}

.hero-copy .eyebrow {
  color: var(--lime);
}

.hero-copy h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: clamp(28px, 4.1vw, 43px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.26;
}

.hero-copy p {
  max-width: 480px;
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 9px;
  margin-top: 23px;
}

.hero-copy .primary-button {
  border-color: var(--lime);
  color: var(--green);
  background: var(--lime);
}

.hero-copy .secondary-button {
  border-color: rgba(255, 255, 255, 0.13);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-progress {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.progress-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(var(--lime) var(--progress), rgba(255, 255, 255, 0.09) 0);
}

.progress-orbit::before {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #224b3d;
  content: "";
}

.progress-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.progress-center strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.progress-center span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.today-panel {
  grid-column: span 7;
}

.habit-panel {
  grid-column: span 5;
}

.quick-panel {
  grid-column: span 5;
}

.note-panel {
  grid-column: span 7;
}

.schedule-mini {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.schedule-mini-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(243, 240, 231, 0.56);
}

.schedule-mini-time {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  line-height: 1.45;
}

.schedule-mini-main strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-mini-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.course-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

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

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

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

.task-check {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid rgba(45, 68, 58, 0.22);
  border-radius: 7px;
  color: transparent;
  background: transparent;
  cursor: pointer;
}

.task-check svg {
  width: 12px;
  height: 12px;
}

.task-row.done .task-check {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

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

.task-copy strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row.done .task-copy strong {
  color: var(--muted);
  text-decoration: line-through;
}

.task-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.tiny-tag {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 8px;
}

.habit-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.habit-button {
  position: relative;
  min-height: 95px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(243, 240, 231, 0.46);
  text-align: left;
  cursor: pointer;
}

.habit-button.done {
  border-color: transparent;
  color: #fff;
  background: var(--green);
}

.habit-symbol {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-bottom: 13px;
  border-radius: 9px;
  background: #fff;
}

.habit-symbol svg {
  width: 14px;
  height: 14px;
}

.habit-button strong {
  display: block;
  font-size: 11px;
}

.habit-button small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.habit-button.done small {
  color: rgba(255, 255, 255, 0.5);
}

.habit-check {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
  font-size: 9px;
}

.habit-button.done .habit-check {
  border-color: var(--lime);
  color: var(--green);
  background: var(--lime);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  min-height: 112px;
  padding: 15px;
  border: 0;
  border-radius: 15px;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease;
}

.quick-card:hover {
  transform: translateY(-2px);
}

.quick-card.tone-green { background: var(--green-soft); }
.quick-card.tone-coral { background: var(--coral-soft); }
.quick-card.tone-gold { background: var(--gold-soft); }
.quick-card.tone-blue { background: var(--blue-soft); }

.quick-icon {
  width: 21px;
  height: 21px;
  margin-bottom: auto;
}

.quick-card strong {
  margin-top: 13px;
  font-size: 11px;
}

.quick-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.daily-note {
  width: 100%;
  min-height: 132px;
  padding: 15px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background:
    linear-gradient(transparent 31px, rgba(45, 68, 58, 0.08) 32px) 0 2px / 100% 32px,
    rgba(255, 255, 255, 0.58);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 14px;
  line-height: 32px;
}

.daily-note::placeholder {
  color: #a5aaa4;
}

.day-strip {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.day-strip::-webkit-scrollbar {
  display: none;
}

.day-chip {
  display: grid;
  flex: 1 0 58px;
  place-items: center;
  min-height: 59px;
  padding: 8px 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

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

.day-chip strong {
  margin-top: 4px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
}

.day-chip.active {
  border-color: var(--green);
  color: rgba(255, 255, 255, 0.58);
  background: var(--green);
}

.day-chip.active strong {
  color: #fff;
}

.timetable-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.65fr);
  gap: 18px;
}

.course-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.course-card {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.54);
}

.course-card::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 3px;
  border-radius: 0 99px 99px 0;
  background: var(--course-color, var(--green));
  content: "";
}

.course-time strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 500;
}

.course-time small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.course-info strong {
  display: block;
  font-size: 13px;
}

.course-info small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.course-actions {
  display: flex;
  gap: 4px;
}

.mini-icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.mini-icon-button:hover {
  border-color: var(--line);
  background: #fff;
}

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

.week-overview {
  position: sticky;
  top: 16px;
  align-self: start;
}

.week-rhythm {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 150px;
  padding-top: 10px;
}

.rhythm-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.rhythm-bar {
  width: 100%;
  max-width: 17px;
  min-height: 7px;
  border-radius: 99px;
  background: var(--green-soft);
}

.rhythm-col.today .rhythm-bar {
  background: var(--coral);
}

.rhythm-col span {
  color: var(--muted);
  font-size: 8px;
}

.week-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.summary-tile {
  padding: 13px;
  border-radius: 13px;
  background: rgba(243, 240, 231, 0.65);
}

.summary-tile strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.summary-tile span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.empty-state {
  display: grid;
  min-height: 170px;
  place-items: center;
  text-align: center;
}

.empty-state div {
  max-width: 270px;
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin: 0 auto 12px;
  border-radius: 15px;
  color: var(--green);
  background: var(--green-soft);
}

.empty-state-icon svg {
  width: 22px;
  height: 22px;
}

.empty-state strong {
  display: block;
  font-size: 12px;
}

.empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.finance-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.budget-card {
  position: relative;
  min-height: 230px;
  padding: 26px;
  overflow: hidden;
  color: #fff;
  background: var(--green);
}

.budget-card::after {
  position: absolute;
  top: -80px;
  right: -60px;
  width: 230px;
  height: 230px;
  border: 45px solid rgba(220, 234, 168, 0.08);
  border-radius: 50%;
  content: "";
}

.budget-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.budget-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

.budget-card h2 {
  margin: 9px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.budget-card h2 small {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 400;
}

.budget-badge {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--lime);
  background: rgba(255, 255, 255, 0.08);
  font-size: 8px;
}

.budget-progress {
  position: relative;
  z-index: 1;
  height: 7px;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
}

.budget-progress span {
  display: block;
  width: var(--used);
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
}

.budget-meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 9px;
}

.spend-categories {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 230px;
}

.donut {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(var(--donut));
}

.donut::after {
  position: absolute;
  inset: 19px;
  border-radius: 50%;
  background: var(--card-solid);
  content: "";
}

.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.donut-center strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
}

.donut-center span {
  color: var(--muted);
  font-size: 8px;
}

.category-legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 110px;
}

.legend-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  font-size: 9px;
}

.legend-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-row span {
  color: var(--muted);
}

.legend-row strong {
  font-size: 9px;
  font-weight: 600;
}

.expense-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 18px;
}

.transaction-list {
  display: flex;
  flex-direction: column;
}

.transaction-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.transaction-row:last-child {
  border-bottom: 0;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 15px;
}

.category-icon.cat-food { background: var(--coral-soft); }
.category-icon.cat-traffic { background: var(--blue-soft); }
.category-icon.cat-study { background: var(--gold-soft); }
.category-icon.cat-daily { background: var(--green-soft); }
.category-icon.cat-fun { background: #eee1f4; }
.category-icon.cat-other { background: #ecece7; }

.transaction-copy {
  min-width: 0;
}

.transaction-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.transaction-amount {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  text-align: right;
}

.transaction-amount small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 8px;
}

.row-delete {
  padding: 0;
  border: 0;
  color: #9ca39d;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 170px;
  padding-top: 15px;
}

.trend-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  height: 100%;
}

.trend-bar {
  width: min(20px, 60%);
  min-height: 5px;
  border-radius: 99px 99px 4px 4px;
  background: var(--green-soft);
}

.trend-col.high .trend-bar {
  background: var(--coral);
}

.trend-col span {
  color: var(--muted);
  font-size: 7px;
}

.health-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: rgba(230, 229, 219, 0.72);
}

.health-tab {
  min-width: 95px;
  padding: 9px 15px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.health-tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 12px rgba(42, 59, 49, 0.07);
}

.workout-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(210px, 0.55fr);
  gap: 18px;
  margin-bottom: 18px;
}

.today-workout {
  position: relative;
  min-height: 246px;
  padding: 28px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 100% 20%, rgba(220, 234, 168, 0.22), transparent 16rem),
    var(--green);
}

.today-workout::after {
  position: absolute;
  right: 23px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  border: 28px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.workout-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  color: var(--lime);
  background: rgba(255, 255, 255, 0.06);
  font-size: 8px;
}

.workout-badge svg {
  width: 12px;
  height: 12px;
}

.today-workout h2 {
  position: relative;
  z-index: 1;
  margin: 23px 0 8px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 31px;
}

.today-workout p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
}

.workout-meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 27px;
  margin-top: 26px;
}

.workout-meta strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
}

.workout-meta span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
}

.workout-cta {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  min-height: 38px;
  border-color: var(--lime);
  color: var(--green);
  background: var(--lime);
}

.workout-cta.done {
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.water-card {
  display: flex;
  flex-direction: column;
  min-height: 246px;
  padding: 23px;
}

.water-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.water-title strong {
  font-size: 13px;
}

.water-title span {
  color: var(--muted);
  font-size: 9px;
}

.water-glasses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.water-glass {
  position: relative;
  width: 23px;
  height: 32px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(85, 122, 166, 0.28);
  border-radius: 5px 5px 9px 9px;
  background: transparent;
  cursor: pointer;
}

.water-glass::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: calc(100% - 4px);
  border-radius: 3px 3px 6px 6px;
  background: var(--blue);
  opacity: 0;
  content: "";
  transition: opacity 160ms ease;
}

.water-glass.filled::after {
  opacity: 0.72;
}

.water-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
}

.water-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.water-number small {
  color: var(--muted);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 9px;
}

.week-workouts {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
}

.workout-day {
  min-height: 116px;
  padding: 13px 10px;
  border-radius: 14px;
  background: rgba(243, 240, 231, 0.62);
}

.workout-day span {
  color: var(--muted);
  font-size: 8px;
}

.workout-day strong {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.5;
}

.workout-day small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.workout-day.rest {
  color: #a2a7a2;
  background: rgba(243, 240, 231, 0.34);
}

.meal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
  gap: 18px;
}

.meal-timeline {
  display: flex;
  flex-direction: column;
}

.meal-row {
  display: grid;
  grid-template-columns: 56px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 87px;
  border-bottom: 1px solid var(--line);
}

.meal-row:last-child {
  border-bottom: 0;
}

.meal-time {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
}

.meal-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--coral-soft);
}

.meal-symbol svg {
  width: 17px;
  height: 17px;
}

.meal-copy strong {
  display: block;
  font-size: 11px;
}

.meal-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.meal-empty {
  color: #a0a6a1;
  font-size: 9px;
}

.nutrition-ring {
  display: grid;
  place-items: center;
  width: 145px;
  height: 145px;
  margin: 12px auto 22px;
  border-radius: 50%;
  background: conic-gradient(var(--coral) 0 32%, var(--gold) 32% 55%, var(--green) 55% 87%, #e9e5da 87%);
}

.nutrition-ring > div {
  display: grid;
  place-items: center;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: var(--card-solid);
  text-align: center;
}

.nutrition-ring strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
}

.nutrition-ring span {
  color: var(--muted);
  font-size: 8px;
}

.nutrition-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.nutrition-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
}

.nutrition-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.study-focus {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  margin-bottom: 18px;
}

.focus-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 310px;
  padding: 26px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 120%, rgba(220, 234, 168, 0.18), transparent 20rem),
    var(--green);
}

.focus-card .eyebrow {
  align-self: flex-start;
  color: var(--lime);
}

.focus-timer {
  position: relative;
  display: grid;
  place-items: center;
  width: 158px;
  height: 158px;
  margin: 10px 0 17px;
  border-radius: 50%;
  background: conic-gradient(var(--lime) var(--focus-progress, 0%), rgba(255, 255, 255, 0.09) 0);
}

.focus-controls svg {
  width: 13px;
  height: 13px;
}

.focus-timer::before {
  position: absolute;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: #22493c;
  content: "";
}

.focus-time {
  position: relative;
  z-index: 1;
  margin-left: 0.07em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 37px;
  letter-spacing: 0.02em;
}

.focus-label {
  position: relative;
  z-index: 1;
  margin-top: -13px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 8px;
}

.focus-controls {
  display: flex;
  gap: 8px;
}

.focus-controls button {
  min-height: 37px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  cursor: pointer;
}

.focus-controls button.primary {
  border-color: var(--lime);
  color: var(--green);
  background: var(--lime);
}

.study-plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.study-plan {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.5);
}

.study-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.study-plan-top strong {
  font-size: 12px;
}

.subject-tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 99px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 8px;
}

.study-plan-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  color: var(--muted);
  font-size: 8px;
}

.study-progress {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #ebe9e0;
}

.study-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.study-plan-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 10px;
}

.study-plan-actions button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 8px;
  cursor: pointer;
}

.study-plan-actions svg {
  width: 11px;
  height: 11px;
}

.plan-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.plan-summary > div {
  padding: 14px;
  border-radius: 13px;
  background: rgba(243, 240, 231, 0.62);
}

.plan-summary strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
}

.plan-summary span {
  color: var(--muted);
  font-size: 8px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.settings-section:last-child {
  border-bottom: 0;
}

.settings-section h3 {
  margin: 0 0 3px;
  font-size: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 37px;
}

.settings-row span {
  color: var(--muted);
  font-size: 10px;
}

.settings-row strong {
  font-size: 10px;
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.cloud-key-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.02em;
}

.sync-hint {
  margin: 2px 0 11px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.cloud-restore-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.cloud-restore-form .secondary-button {
  white-space: nowrap;
}

.settings-actions svg {
  width: 14px;
  height: 14px;
}

.danger-button {
  grid-column: 1 / -1;
  min-height: 40px;
  border: 1px solid rgba(191, 70, 51, 0.16);
  border-radius: 11px;
  color: #b4503d;
  background: rgba(191, 70, 51, 0.05);
  font-size: 10px;
  cursor: pointer;
}

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

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

.field.full {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 19px;
}

.quick-amounts {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.quick-amounts button {
  flex: 1;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(243, 240, 231, 0.6);
  font-size: 9px;
  cursor: pointer;
}

.section-block {
  margin-bottom: 18px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 13px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 14px;
}

.section-title-row span {
  color: var(--muted);
  font-size: 9px;
}

.bottom-nav {
  display: none;
}

.context-fab {
  position: fixed;
  z-index: 30;
  right: max(22px, calc((100vw - 1480px) / 2 + 30px));
  bottom: 30px;
  display: none;
  place-items: center;
  width: 55px;
  height: 55px;
  border: 0;
  border-radius: 18px;
  color: var(--green);
  background: var(--lime);
  box-shadow: 0 12px 28px rgba(23, 63, 52, 0.24);
  cursor: pointer;
}

.context-fab span {
  margin-top: -3px;
  font-family: Georgia, serif;
  font-size: 31px;
  font-weight: 400;
}

.sheet-dialog {
  width: min(520px, calc(100% - 28px));
  max-height: min(780px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 26px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 32px 100px rgba(13, 35, 28, 0.28);
}

.sheet-dialog::backdrop {
  background: rgba(14, 31, 25, 0.45);
  backdrop-filter: blur(4px);
}

.sheet-dialog[open] {
  animation: sheetIn 220ms ease both;
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sheet-grabber {
  display: none;
}

.sheet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 25px 25px 8px;
}

.sheet-heading h2 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
}

#sheetBody {
  padding: 17px 25px 25px;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 92px;
  max-width: min(360px, calc(100% - 32px));
  padding: 11px 17px;
  border-radius: 12px;
  color: #fff;
  background: rgba(23, 43, 35, 0.94);
  box-shadow: 0 12px 30px rgba(23, 43, 35, 0.22);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-loading {
  display: grid;
  min-height: 55vh;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  .dashboard-hero {
    grid-template-columns: minmax(0, 1.3fr) 190px;
  }

  .today-panel,
  .habit-panel,
  .quick-panel,
  .note-panel {
    grid-column: span 12;
  }

  .health-main {
    grid-template-columns: 1fr;
  }

  .week-workouts {
    overflow-x: auto;
    grid-template-columns: repeat(7, 105px);
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: calc(78px + var(--safe-bottom));
  }

  .app-shell {
    display: block;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .sidebar {
    display: none;
  }

  .main-column {
    min-height: 100vh;
  }

  .topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    min-height: 66px;
    padding: max(11px, env(safe-area-inset-top)) 18px 10px;
    border-bottom: 1px solid rgba(45, 68, 58, 0.08);
    background: rgba(243, 240, 231, 0.87);
    backdrop-filter: blur(16px);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: "STSong", "Songti SC", serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
  }

  .mobile-brand .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 10px;
    font-size: 17px;
  }

  .topbar-date {
    position: absolute;
    left: 50%;
    font-size: 9px;
    transform: translateX(-50%);
  }

  .topbar-actions {
    gap: 8px;
  }

  .save-indicator {
    display: none;
  }

  .topbar .icon-button {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-color: transparent;
    background: transparent;
  }

  .view {
    padding: 23px 16px 30px;
  }

  .page-heading {
    align-items: flex-start;
    margin-bottom: 19px;
  }

  .page-heading h1 {
    font-size: 29px;
  }

  .page-heading p {
    font-size: 11px;
  }

  .page-heading > .primary-button {
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 13px;
    font-size: 0;
  }

  .page-heading > .primary-button svg {
    width: 17px;
    height: 17px;
  }

  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr) 117px;
    min-height: 214px;
    margin-bottom: 14px;
    border-radius: 23px;
  }

  .hero-copy {
    padding: 24px 18px;
  }

  .hero-copy h1 {
    font-size: 27px;
    line-height: 1.25;
  }

  .hero-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 10px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .hero-actions {
    margin-top: 17px;
  }

  .hero-actions .secondary-button {
    display: none;
  }

  .hero-actions .primary-button {
    min-height: 37px;
    padding: 0 12px;
    font-size: 10px;
  }

  .hero-progress {
    padding: 12px;
  }

  .progress-orbit {
    width: 92px;
    height: 92px;
  }

  .progress-orbit::before {
    inset: 7px;
  }

  .progress-center strong {
    font-size: 24px;
  }

  .progress-center span {
    font-size: 6px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12,
  .today-panel,
  .habit-panel,
  .quick-panel,
  .note-panel {
    grid-column: span 1;
  }

  .card {
    border-radius: 19px;
  }

  .card-pad {
    padding: 18px;
  }

  .bottom-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 9px calc(8px + var(--safe-bottom));
    border-top: 1px solid rgba(45, 68, 58, 0.08);
    background: rgba(250, 249, 244, 0.94);
    backdrop-filter: blur(18px);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    border: 0;
    border-radius: 12px;
    color: #8b938d;
    background: transparent;
    font-size: 8px;
    cursor: pointer;
  }

  .bottom-nav-item > span:first-child {
    width: 20px;
    height: 20px;
  }

  .bottom-nav-item.active {
    color: var(--green);
  }

  .bottom-nav-item.active > span:first-child {
    display: grid;
    place-items: center;
    width: 33px;
    height: 25px;
    border-radius: 9px;
    background: var(--green-soft);
  }

  .bottom-nav-item.active svg {
    width: 17px;
    height: 17px;
  }

  .context-fab {
    display: none;
  }

  .today-panel .task-row {
    padding: 11px 0;
  }

  .schedule-mini-item {
    grid-template-columns: 51px minmax(0, 1fr) auto;
  }

  .habit-button {
    min-height: 88px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-card {
    min-height: 104px;
  }

  .timetable-layout,
  .finance-overview,
  .expense-layout,
  .workout-hero,
  .meal-layout,
  .study-focus {
    grid-template-columns: 1fr;
  }

  .week-overview {
    position: static;
  }

  .day-strip {
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px;
  }

  .day-chip {
    flex-basis: 53px;
  }

  .course-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 14px 13px 14px 16px;
  }

  .course-time strong {
    font-size: 13px;
  }

  .budget-card {
    min-height: 214px;
    padding: 22px;
  }

  .budget-card h2 {
    font-size: 37px;
  }

  .spend-categories {
    min-height: 205px;
    gap: 22px;
  }

  .donut {
    width: 116px;
    height: 116px;
  }

  .expense-layout .card:last-child {
    order: -1;
  }

  .health-tabs {
    display: flex;
    width: 100%;
  }

  .health-tab {
    flex: 1;
    min-width: 0;
  }

  .today-workout {
    min-height: 255px;
    padding: 22px;
  }

  .today-workout h2 {
    font-size: 27px;
  }

  .workout-cta {
    right: 20px;
    bottom: 21px;
  }

  .week-workouts {
    margin-right: -18px;
    margin-left: -18px;
    padding: 0 18px 3px;
  }

  .meal-row {
    grid-template-columns: 44px 32px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .meal-layout .card:last-child {
    order: -1;
  }

  .study-focus {
    margin-bottom: 14px;
  }

  .focus-card {
    min-height: 294px;
  }

  .sheet-dialog {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 90dvh;
    margin: 0;
    border-radius: 25px 25px 0 0;
  }

  .sheet-dialog[open] {
    animation: bottomSheetIn 230ms cubic-bezier(0.2, 0.85, 0.3, 1) both;
  }

  @keyframes bottomSheetIn {
    from {
      opacity: 0.5;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .sheet-grabber {
    display: block;
    width: 34px;
    height: 4px;
    margin: 9px auto 0;
    border-radius: 99px;
    background: #d6d5ce;
  }

  .sheet-heading {
    padding: 15px 20px 5px;
  }

  #sheetBody {
    padding: 14px 20px calc(22px + var(--safe-bottom));
  }

  .toast {
    bottom: calc(79px + var(--safe-bottom));
  }
}

@media (max-width: 390px) {
  .topbar-date {
    display: none;
  }

  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr) 91px;
  }

  .hero-copy {
    padding: 21px 15px;
  }

  .hero-copy h1 {
    font-size: 24px;
  }

  .progress-orbit {
    width: 78px;
    height: 78px;
  }

  .progress-center strong {
    font-size: 20px;
  }

  .habit-list {
    gap: 8px;
  }

  .habit-button {
    padding: 12px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .cloud-restore-form {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}
