:root {
  --ink: #3f3b35;
  --muted: #7c756c;
  --paper: #fffdf7;
  --cream: #fff8e8;
  --yellow: #ffdf72;
  --yellow-soft: #fff1ae;
  --mint: #9fdcc8;
  --mint-soft: #def3ea;
  --blue: #9fd3ef;
  --blue-soft: #e2f3fb;
  --pink: #ffaaa5;
  --pink-soft: #ffe3df;
  --lavender: #cabeea;
  --lavender-soft: #eee9fb;
  --peach: #ffc596;
  --green: #4f9f7f;
  --danger: #d96c67;
  --border: 2px solid rgba(63, 59, 53, .78);
  --shadow: 4px 5px 0 rgba(63, 59, 53, .12);
  --shadow-dark: 3px 4px 0 rgba(63, 59, 53, .75);
  --radius-lg: 26px 22px 28px 20px;
  --radius-md: 18px 15px 20px 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 223, 114, .34) 0 4%, transparent 4.2%),
    radial-gradient(circle at 92% 28%, rgba(159, 220, 200, .25) 0 6%, transparent 6.2%),
    linear-gradient(140deg, #fff9e9 0%, #fffdf8 48%, #f6fbf4 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: inherit; }

.app-shell { min-height: 100vh; }

.sidebar {
  display: none;
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  padding: 28px 18px;
  background: rgba(255, 253, 247, .92);
  border-right: 2px dashed rgba(63, 59, 53, .22);
  backdrop-filter: blur(14px);
  overflow-y: auto;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 7px 22px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 12px; }
.brand-mark {
  position: relative;
  width: 48px;
  height: 44px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  border: var(--border);
  border-radius: 49% 43% 52% 41%;
  transform: rotate(-4deg);
  box-shadow: 2px 3px 0 rgba(63,59,53,.75);
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 5px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}
.brand-mark::before { left: 12px; }
.brand-mark::after { right: 12px; }
.brand-face { transform: translateY(5px); font-weight: 800; }

.side-nav { display: grid; gap: 4px; }
.nav-section-label {
  padding: 14px 12px 5px;
  color: #aaa197;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.nav-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 0;
  border-radius: 14px 12px 16px 11px;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
}
.nav-item .nav-icon { width: 24px; font-size: 18px; text-align: center; }
.nav-item:hover { background: var(--cream); }
.nav-item.active { background: var(--yellow-soft); border: 1.5px solid rgba(63,59,53,.65); transform: rotate(-.25deg); }
.sidebar-note {
  display: flex;
  gap: 9px;
  margin: 25px 5px 0;
  padding: 13px;
  background: var(--mint-soft);
  border: 1.5px dashed rgba(63,59,53,.6);
  border-radius: 16px 13px 18px 14px;
  font-size: 12px;
  line-height: 1.65;
}
.sidebar-note p { margin: 0; }

.main-shell { width: 100%; min-height: 100vh; }
.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 18px 12px;
}
.topbar h1 { margin: 1px 0 0; font-size: clamp(24px, 5vw, 31px); line-height: 1.2; letter-spacing: -.03em; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.top-actions { display: flex; gap: 9px; }
.icon-button, .avatar-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.5px solid rgba(63,59,53,.6);
  border-radius: 50% 46% 52% 43%;
  background: var(--paper);
  font-size: 22px;
  box-shadow: 2px 2px 0 rgba(63,59,53,.14);
}
.avatar-button { background: var(--pink-soft); font-size: 14px; font-weight: 850; }

#mainContent { padding: 8px 16px calc(102px + var(--safe-bottom)); outline: 0; }
.page { max-width: 1180px; margin: 0 auto; animation: page-in .25s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } }

.mobile-nav {
  position: fixed;
  inset: auto 0 0;
  height: calc(76px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  padding: 8px 6px var(--safe-bottom);
  background: rgba(255,253,247,.96);
  border-top: 2px solid rgba(63,59,53,.15);
  backdrop-filter: blur(18px);
  z-index: 35;
}
.mobile-nav-item {
  min-height: 58px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}
.mobile-nav-item span { font-size: 21px; line-height: 1; }
.mobile-nav-item.active { color: var(--ink); }
.mobile-nav-item.active span { transform: rotate(-5deg) scale(1.08); }
.mobile-fab {
  position: fixed;
  left: 50%;
  bottom: calc(45px + var(--safe-bottom));
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  z-index: 40;
  transform: translateX(-50%) rotate(-2deg);
  border: var(--border);
  border-radius: 50% 44% 51% 45%;
  background: var(--yellow);
  box-shadow: var(--shadow-dark);
  font-size: 29px;
  font-weight: 500;
}

.card {
  position: relative;
  padding: 18px;
  background: rgba(255,253,247,.94);
  border: 1.7px solid rgba(63,59,53,.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card.soft { border-color: rgba(63,59,53,.2); box-shadow: 0 10px 28px rgba(71,65,54,.07); }
.card.yellow { background: var(--yellow-soft); }
.card.mint { background: var(--mint-soft); }
.card.blue { background: var(--blue-soft); }
.card.pink { background: var(--pink-soft); }
.card.lavender { background: var(--lavender-soft); }
.card + .card { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
.section-gap { margin-top: 18px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 13px; }
.section-heading h2, .section-heading h3 { margin: 0; font-size: 17px; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.text-button { min-height: 36px; padding: 5px 8px; border: 0; background: transparent; color: var(--green); font-size: 12px; font-weight: 800; }

.hero {
  min-height: 232px;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 23px 20px;
  background: linear-gradient(135deg, #fff0a5, #ffe6a7 60%, #ffd9c6);
}
.hero::before {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -25px;
  top: -32px;
  border: 10px solid rgba(255,255,255,.6);
  border-radius: 50%;
}
.hero-copy { position: relative; z-index: 2; max-width: 640px; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 7px 10px; background: rgba(255,255,255,.65); border: 1.5px dashed rgba(63,59,53,.6); border-radius: 20px; font-size: 12px; font-weight: 800; }
.hero h2 { max-width: 620px; margin: 0; font-size: clamp(25px, 6vw, 39px); line-height: 1.25; letter-spacing: -.04em; }
.hero p { max-width: 560px; margin: 10px 0 18px; color: #665d52; font-size: 14px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-doodle { position: absolute; right: 16px; bottom: 4px; width: 120px; height: 120px; opacity: .86; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1.7px solid rgba(63,59,53,.78);
  border-radius: 14px 12px 16px 11px;
  background: var(--paper);
  font-weight: 800;
  font-size: 13px;
  box-shadow: 2px 3px 0 rgba(63,59,53,.64);
}
.button:active { transform: translate(1px, 2px); box-shadow: 1px 1px 0 rgba(63,59,53,.65); }
.button.primary { background: var(--ink); color: #fffdf7; }
.button.yellow { background: var(--yellow); color: var(--ink); }
.button.mint { background: var(--mint); }
.button.ghost { background: rgba(255,255,255,.55); box-shadow: none; }
.button.danger { background: #fff0ef; color: #a74a45; border-color: #d98a85; box-shadow: none; }
.button.block { width: 100%; }
.button.small { min-height: 36px; padding: 6px 10px; font-size: 12px; box-shadow: 1px 2px 0 rgba(63,59,53,.55); }

.stats-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-card { min-height: 98px; padding: 15px; }
.stat-icon { font-size: 22px; }
.stat-value { margin-top: 7px; font-size: 25px; line-height: 1; font-weight: 900; }
.stat-label { margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.stat-trend { margin-top: 5px; color: var(--green); font-size: 10px; font-weight: 800; }

.focus-list, .task-list, .record-list { display: grid; gap: 9px; }
.focus-item, .task-item, .record-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  background: rgba(255,255,255,.65);
  border: 1.4px solid rgba(63,59,53,.22);
  border-radius: 15px 12px 16px 13px;
}
.focus-number {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border: 1.4px solid rgba(63,59,53,.6);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 900;
}
.check-button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1.7px solid rgba(63,59,53,.7);
  border-radius: 9px 7px 10px 8px;
  background: #fff;
}
.check-button.done { background: var(--mint); }
.item-main { min-width: 0; flex: 1; }
.item-title { margin: 1px 0 4px; font-size: 14px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.item-title.done { color: #999087; text-decoration: line-through; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.item-actions { display: flex; gap: 3px; }
.mini-action { min-width: 36px; min-height: 36px; padding: 5px; border: 0; border-radius: 10px; background: transparent; font-size: 16px; }
.mini-action:hover { background: rgba(63,59,53,.06); }
.empty-state { padding: 24px 12px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { display: block; margin-bottom: 8px; font-size: 36px; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 14px; }
.empty-state p { max-width: 320px; margin: 0 auto 12px; font-size: 12px; line-height: 1.6; }

.pill { display: inline-flex; align-items: center; gap: 4px; min-height: 23px; padding: 3px 8px; border-radius: 12px; background: #eeeae1; font-size: 10px; font-weight: 800; }
.pill.high { background: var(--pink-soft); color: #a54c47; }
.pill.medium { background: var(--yellow-soft); }
.pill.low { background: var(--blue-soft); color: #36718d; }
.pill.complete { background: var(--mint-soft); color: #33735d; }

.progress { height: 10px; overflow: hidden; border: 1.2px solid rgba(63,59,53,.45); border-radius: 8px 6px 9px 7px; background: rgba(255,255,255,.65); }
.progress > span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--mint); transition: width .35s ease; }
.progress.yellow > span { background: var(--yellow); }
.progress.pink > span { background: var(--pink); }
.progress-row { display: flex; justify-content: space-between; margin: 7px 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.quick-action {
  min-height: 78px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 9px 5px;
  border: 1.4px dashed rgba(63,59,53,.5);
  border-radius: 17px 14px 18px 13px;
  background: rgba(255,255,255,.65);
  font-size: 11px;
  font-weight: 800;
}
.quick-action span { font-size: 24px; }

.health-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.health-chip { padding: 12px; border-radius: 15px; background: rgba(255,255,255,.55); }
.health-chip strong { display: block; margin-top: 4px; font-size: 18px; }
.health-chip small { color: var(--muted); }

.segmented { display: flex; gap: 4px; padding: 4px; overflow-x: auto; background: rgba(63,59,53,.06); border-radius: 14px; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segment { min-height: 38px; flex: 0 0 auto; padding: 7px 13px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.segment.active { background: var(--paper); color: var(--ink); box-shadow: 0 2px 8px rgba(63,59,53,.08); }

.chart-wrap { width: 100%; overflow: hidden; }
.chart { width: 100%; height: auto; min-height: 150px; }
.chart-label { fill: #8d847a; font-size: 9px; font-weight: 700; }
.chart-grid { stroke: rgba(63,59,53,.12); stroke-width: 1; stroke-dasharray: 3 5; }
.chart-line { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#chartGradient); opacity: .35; }
.chart-dot { fill: var(--paper); stroke: var(--green); stroke-width: 2.4; }

.project-card { display: grid; gap: 11px; }
.project-top { display: flex; align-items: center; gap: 11px; }
.project-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 46px; background: var(--yellow-soft); border: 1.5px solid rgba(63,59,53,.55); border-radius: 15px 12px 16px 13px; font-size: 23px; }
.project-top h3 { margin: 0 0 3px; font-size: 15px; }
.project-top p { margin: 0; color: var(--muted); font-size: 11px; }
.project-next { padding: 10px 12px; background: rgba(255,255,255,.55); border-radius: 12px; font-size: 12px; line-height: 1.55; }

.money-value { font-size: 28px; font-weight: 900; letter-spacing: -.03em; }
.money-value.income { color: #397c64; }
.money-value.expense { color: #bd5e58; }
.record-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 13px; background: var(--cream); font-size: 19px; }
.record-amount { margin-left: auto; font-size: 14px; font-weight: 900; white-space: nowrap; }

.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.badge-card { position: relative; min-height: 138px; padding: 15px; text-align: center; overflow: hidden; }
.badge-card.locked { filter: grayscale(.75); opacity: .55; }
.badge-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 8px; border: 1.5px solid rgba(63,59,53,.6); border-radius: 50% 43% 51% 44%; background: var(--yellow-soft); font-size: 29px; transform: rotate(-3deg); }
.badge-card h3 { margin: 0 0 4px; font-size: 13px; }
.badge-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.photo-card { overflow: hidden; padding: 0; }
.photo-card img { display: block; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.photo-card figcaption { padding: 10px; font-size: 11px; }

.evidence-item { position: relative; padding-left: 30px; }
.evidence-item::before { content: "✦"; position: absolute; left: 3px; top: 10px; color: #e4a900; font-size: 16px; }
.evidence-item:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 32px; bottom: -10px; border-left: 1px dashed rgba(63,59,53,.3); }

.callout { padding: 13px 14px; border: 1.5px dashed rgba(63,59,53,.55); border-radius: 15px 12px 17px 13px; background: var(--blue-soft); font-size: 12px; line-height: 1.65; }
.callout.warning { background: #fff1de; }
.callout strong { display: block; margin-bottom: 3px; }

.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: 1fr; }
.field { display: grid; gap: 6px; }
.field label, .field-label { font-size: 12px; font-weight: 800; }
.field small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid rgba(63,59,53,.38);
  border-radius: 13px 11px 15px 12px;
  outline: none;
  background: rgba(255,255,255,.85);
  appearance: none;
  font-size: 14px;
}
.textarea { min-height: 88px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(79,159,127,.12); }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 12px; top: 11px; pointer-events: none; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-chip input { position: absolute; opacity: 0; pointer-events: none; }
.radio-chip span { min-height: 40px; display: inline-flex; align-items: center; padding: 7px 12px; border: 1.3px solid rgba(63,59,53,.3); border-radius: 13px; background: #fff; font-size: 12px; font-weight: 750; }
.radio-chip input:checked + span { background: var(--yellow-soft); border-color: rgba(63,59,53,.7); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 6px; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(46,42,37,.32); backdrop-filter: blur(2px); }
.bottom-sheet {
  position: fixed;
  inset: auto 0 0;
  max-height: min(88vh, 820px);
  overflow-y: auto;
  z-index: 75;
  padding: 8px 17px calc(22px + var(--safe-bottom));
  border: 2px solid rgba(63,59,53,.65);
  border-bottom: 0;
  border-radius: 27px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -10px 35px rgba(63,59,53,.15);
  animation: sheet-up .25s ease-out;
  overscroll-behavior: contain;
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-handle { width: 46px; height: 5px; margin: 2px auto 11px; border-radius: 6px; background: rgba(63,59,53,.18); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.sheet-header h2 { margin: 2px 0 0; font-size: 21px; }
.sheet-body { padding-bottom: 4px; }

.quick-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-sheet-button { min-height: 92px; display: grid; place-items: center; align-content: center; gap: 6px; border: 1.5px solid rgba(63,59,53,.45); border-radius: 18px 15px 20px 14px; background: var(--cream); font-size: 12px; font-weight: 800; }
.quick-sheet-button:nth-child(2n) { background: var(--mint-soft); }
.quick-sheet-button:nth-child(3n) { background: var(--pink-soft); }
.quick-sheet-button span { font-size: 27px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(94px + var(--safe-bottom));
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border: 1.5px solid rgba(63,59,53,.65);
  border-radius: 14px 12px 16px 11px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 3px 4px 0 rgba(63,59,53,.22);
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.more-link { min-height: 94px; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1.5px solid rgba(63,59,53,.36); border-radius: 18px 14px 20px 15px; background: var(--paper); text-align: left; font-weight: 800; }
.more-link span { font-size: 26px; }
.more-link small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 600; }

.tabs-space { margin-bottom: 14px; }
.inline-note { color: var(--muted); font-size: 11px; line-height: 1.55; }
.divider { height: 1px; margin: 16px 0; background: rgba(63,59,53,.12); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 600px) {
  #mainContent { padding: 12px 24px calc(105px + var(--safe-bottom)); }
  .topbar { padding-inline: 26px; }
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-strip { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(6, 1fr); }
  .health-row { grid-template-columns: repeat(4, 1fr); }
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid.two { grid-template-columns: repeat(2, 1fr); }
  .bottom-sheet { left: 50%; right: auto; width: min(620px, calc(100% - 28px)); border-radius: 27px 24px 0 0; transform: translateX(-50%); }
  @keyframes sheet-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
  .more-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 820px) {
  .sidebar { display: block; }
  .main-shell { padding-left: 252px; }
  .mobile-nav, .mobile-fab { display: none; }
  #mainContent { padding: 16px 30px 50px; }
  .topbar { min-height: 104px; padding: 24px 32px 13px; }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-main-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); }
  .hero { min-height: 250px; padding: 30px; }
  .hero-doodle { right: 28px; bottom: 8px; width: 160px; height: 160px; }
  .bottom-sheet { inset: 50% auto auto 50%; width: min(650px, calc(100% - 40px)); max-height: 86vh; padding: 12px 24px 24px; border: 2px solid rgba(63,59,53,.65); border-radius: 27px 24px 30px 22px; transform: translate(-50%, -50%); animation: modal-in .2s ease-out; }
  @keyframes modal-in { from { transform: translate(-50%, -47%); opacity: 0; } }
  .toast { bottom: 35px; }
}

@media (min-width: 1100px) {
  .sidebar { width: 272px; padding-inline: 22px; }
  .main-shell { padding-left: 272px; }
  #mainContent { padding-inline: 38px; }
}

@media (max-width: 380px) {
  .topbar { padding-inline: 14px; }
  #mainContent { padding-inline: 12px; }
  .card { padding: 15px; }
  .hero { padding: 20px 16px; }
  .quick-grid { gap: 7px; }
  .quick-action { min-height: 73px; }
  .mobile-nav-item { font-size: 9px; }
}

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