:root {
  --paper: #f4efe6;
  --paper-deep: #ebe2d3;
  --card: #fffcf6;
  --card-solid: #fffdf9;
  --ink: #29271f;
  --ink-soft: #555045;
  --muted: #857e70;
  --faint: #aaa191;
  --line: rgba(62, 53, 38, 0.11);
  --line-strong: rgba(62, 53, 38, 0.18);
  --orange: #dd7a52;
  --orange-deep: #c75a34;
  --orange-soft: #f6dfd0;
  --sage: #7d967f;
  --sage-deep: #5f7a65;
  --sage-soft: #dfe8de;
  --forest: #22372f;
  --forest-light: #2e4a3f;
  --cream: #f1e5cf;
  --gold: #b88c46;
  --shadow: 0 20px 60px rgba(77, 62, 40, 0.09), 0 2px 8px rgba(77, 62, 40, 0.04);
  --shadow-soft: 0 10px 30px rgba(77, 62, 40, 0.06);
  --radius: 28px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-number: "Avenir Next", "DIN Alternate", "Arial Rounded MT Bold", "Helvetica Neue", var(--font-sans);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% -8%, rgba(221, 122, 82, 0.19), transparent 34rem),
    radial-gradient(circle at 92% 9%, rgba(125, 150, 127, 0.17), transparent 36rem),
    radial-gradient(circle at 52% 100%, rgba(190, 157, 101, 0.09), transparent 42rem),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  border: 0;
  cursor: pointer;
}

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

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

svg {
  display: block;
  width: 1em;
  height: 1em;
}

[hidden] {
  display: none !important;
}

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

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    repeating-linear-gradient(0deg, rgba(85, 70, 48, 0.018) 0, rgba(85, 70, 48, 0.018) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0, rgba(255, 255, 255, 0.16) 1px, transparent 1px, transparent 5px);
  mask-image: radial-gradient(circle at center, black, transparent 90%);
}

.app-shell {
  width: min(100%, 1480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 30px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 17px 0;
  background: linear-gradient(to bottom, rgba(244, 239, 230, 0.94) 55%, rgba(244, 239, 230, 0.78) 80%, rgba(244, 239, 230, 0));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff7ef;
  background: var(--orange-deep);
  border-radius: 14px;
  box-shadow: 0 7px 18px rgba(199, 90, 52, 0.25);
  transform: rotate(-3deg);
}

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

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-family: var(--font-number);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

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

.date-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  background: rgba(255, 252, 246, 0.62);
  border: 1px solid rgba(62, 53, 38, 0.08);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(77, 62, 40, 0.04);
}

.round-button {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.round-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.round-button:active {
  transform: scale(0.94);
}

.round-button:disabled {
  opacity: 0.25;
  cursor: default;
}

.flip {
  transform: rotate(180deg);
}

.date-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px;
  background: transparent;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.date-button:hover {
  background: rgba(255, 255, 255, 0.6);
}

.date-button > svg {
  width: 15px;
  height: 15px;
  color: var(--orange-deep);
}

.date-button > span:first-of-type {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.date-tag {
  padding: 2px 7px;
  color: var(--orange-deep);
  background: var(--orange-soft);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.date-tag.is-past {
  color: var(--sage-deep);
  background: var(--sage-soft);
}

.today-button {
  height: 30px;
  padding: 0 11px;
  color: var(--muted);
  background: transparent;
  border-left: 1px solid var(--line);
  border-radius: 0 999px 999px 0;
  font-size: 11px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.today-button:hover {
  color: var(--orange-deep);
}

.today-button:disabled {
  color: var(--faint);
  opacity: 0.6;
  cursor: default;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sync-dot {
  position: relative;
  width: 6px;
  height: 6px;
  background: var(--sage);
  border-radius: 50%;
}

.sync-dot::after {
  position: absolute;
  inset: -4px;
  content: "";
  border: 1px solid rgba(125, 150, 127, 0.45);
  border-radius: 50%;
  animation: pulse 2.4s ease-out infinite;
}

.sync-state.is-error {
  color: var(--orange-deep);
}

.sync-state.is-error .sync-dot {
  background: var(--orange-deep);
}

.sync-state.is-error .sync-dot::after {
  border-color: rgba(199, 90, 52, 0.4);
}

@keyframes pulse {
  0% { opacity: 0.85; transform: scale(0.55); }
  70%, 100% { opacity: 0; transform: scale(1.5); }
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 18px;
  color: #fffaf4;
  background: var(--forest);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(34, 55, 47, 0.18);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button svg {
  width: 16px;
  height: 16px;
}

.primary-button:hover {
  background: var(--forest-light);
  box-shadow: 0 10px 24px rgba(34, 55, 47, 0.23);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(0) scale(0.985);
}

.primary-button:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.top-add {
  min-height: 40px;
}

.voice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--orange-deep);
  background: rgba(246, 223, 208, 0.72);
  border: 1px solid rgba(221, 122, 82, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.voice-button svg {
  width: 15px;
  height: 15px;
}

.voice-button:hover {
  background: var(--orange-soft);
  box-shadow: 0 7px 18px rgba(221, 122, 82, 0.15);
  transform: translateY(-1px);
}

.voice-button:active {
  transform: scale(0.97);
}

/* Main layout */
main {
  padding: 16px 0 0;
}

.dashboard-grid,
.lower-grid {
  display: grid;
  gap: 19px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.47fr) minmax(310px, 0.83fr);
}

.lower-grid {
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, 0.88fr);
  margin-top: 19px;
}

.side-column {
  display: grid;
  gap: 19px;
  grid-template-rows: minmax(0, 1.06fr) minmax(0, 0.94fr);
}

.card {
  min-width: 0;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.64), transparent 45%),
    rgba(255, 252, 246, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-card {
  padding: 27px 30px 22px;
  overflow: hidden;
  animation: rise 0.65s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.side-column > section {
  animation: rise 0.65s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.side-column > section:nth-child(1) {
  animation-delay: 0.07s;
}

.side-column > section:nth-child(2) {
  animation-delay: 0.13s;
}

.lower-grid > article {
  animation: rise 0.65s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  animation-delay: 0.16s;
}

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.3;
}

.eyebrow > span {
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.eyebrow.light {
  color: rgba(244, 238, 224, 0.58);
}

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

.hero-head h1 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.35vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.goal-chip {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 16px;
  white-space: nowrap;
}

.goal-chip span {
  margin-right: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.goal-chip b {
  font-family: var(--font-number);
  font-size: 19px;
  font-weight: 750;
  line-height: 1;
}

.goal-chip em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

/* Hero gauge */
.hero-content {
  display: grid;
  grid-template-columns: minmax(280px, 1.06fr) minmax(250px, 0.94fr);
  align-items: center;
  gap: clamp(22px, 3.1vw, 52px);
  margin-top: 14px;
}

.gauge-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.gauge {
  position: relative;
  width: min(100%, 282px);
  aspect-ratio: 1;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.gauge-soft {
  fill: none;
  stroke: rgba(94, 77, 54, 0.14);
  stroke-width: 1;
  stroke-dasharray: 0.6 7.2;
  stroke-linecap: round;
}

.gauge-track {
  fill: none;
  stroke: #f0e5d5;
  stroke-width: 13;
}

.gauge-fill {
  fill: none;
  stroke: url(#gaugeGradient);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 615.752;
  stroke-dashoffset: 615.752;
  transition: stroke-dashoffset 1.05s cubic-bezier(0.22, 0.8, 0.3, 1);
  filter: drop-shadow(0 5px 7px rgba(199, 90, 52, 0.18));
}

.gauge-inner {
  fill: none;
  stroke: rgba(221, 122, 82, 0.1);
  stroke-width: 1;
}

.gauge-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
}

.gauge-total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 0.95;
}

.gauge-total > span {
  font-family: var(--font-number);
  font-size: clamp(54px, 5.4vw, 70px);
  font-weight: 750;
  letter-spacing: -0.065em;
  font-variant-numeric: tabular-nums;
}

.gauge-total small {
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 14px;
  font-weight: 600;
}

.gauge-percent {
  margin-top: 10px;
  padding: 3px 10px;
  color: var(--orange-deep);
  background: rgba(221, 122, 82, 0.1);
  border-radius: 999px;
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.gauge-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.remaining-pill {
  margin-top: -3px;
  padding: 6px 13px;
  color: var(--muted);
  background: rgba(255, 252, 246, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  box-shadow: 0 4px 12px rgba(77, 62, 40, 0.04);
}

.remaining-pill b {
  color: var(--orange-deep);
  font-family: var(--font-number);
  font-size: 13px;
}

.remaining-pill.is-done {
  color: var(--sage-deep);
  background: var(--sage-soft);
  border-color: transparent;
}

.remaining-pill.is-done b {
  color: var(--sage-deep);
}

.hero-breakdown {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}

.breakdown-card {
  padding: 15px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.breakdown-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.formula-card {
  background: linear-gradient(135deg, rgba(250, 231, 218, 0.78), rgba(255, 252, 246, 0.6));
}

.breast-card {
  background: linear-gradient(135deg, rgba(226, 235, 224, 0.82), rgba(255, 252, 246, 0.6));
}

.breakdown-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.type-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
}

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

.formula-card .type-icon {
  color: var(--orange-deep);
  background: rgba(255, 255, 255, 0.65);
}

.breast-card .type-icon {
  color: var(--sage-deep);
  background: rgba(255, 255, 255, 0.65);
}

.breakdown-name {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.breakdown-name > span {
  font-size: 12.5px;
  font-weight: 650;
}

.breakdown-name small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.breakdown-top > b {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--font-number);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.breakdown-top > b small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.breakdown-track {
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.66);
  border-radius: 999px;
}

.breakdown-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 0.9s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.formula-card .breakdown-track i {
  background: var(--orange);
}

.breast-card .breakdown-track i {
  background: var(--sage);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 2px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.hero-note::before {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  content: "";
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.65;
}

.hero-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  padding: 15px 0 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mini-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 0 17px;
  border-left: 1px solid var(--line);
}

.mini-stat:first-child {
  padding-left: 2px;
  border-left: 0;
}

.mini-stat > span {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.mini-stat > b {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-height: 24px;
  font-family: var(--font-number);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.mini-stat em {
  font-style: normal;
}

.mini-stat small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.mini-stat .mini-time {
  font-size: 17px;
  letter-spacing: 0.01em;
}

/* Timeline */
.timeline-panel {
  padding-top: 12px;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.timeline-head > span:last-child {
  overflow: hidden;
  color: var(--faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 1px;
  color: var(--faint);
  font-family: var(--font-number);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.timeline-track {
  position: relative;
  height: 20px;
  margin-top: 6px;
}

.timeline-track::before {
  position: absolute;
  top: 8px;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background:
    repeating-linear-gradient(90deg, rgba(62, 53, 38, 0.13) 0, rgba(62, 53, 38, 0.13) 1px, transparent 1px, transparent calc(100% / 24)),
    rgba(62, 53, 38, 0.045);
  border-radius: 999px;
}

.timeline-now {
  position: absolute;
  top: 1px;
  bottom: -2px;
  z-index: 3;
  width: 1px;
  background: var(--orange);
  opacity: 0.55;
  transform: translateX(-0.5px);
}

.timeline-now i {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--orange);
  border: 1px solid var(--card);
  border-radius: 50%;
  transform: translateX(-50%);
}

.timeline-now span {
  position: absolute;
  top: 18px;
  left: 50%;
  color: var(--orange-deep);
  font-size: 7px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.timeline-dots {
  position: absolute;
  inset: 0;
}

.timeline-dot {
  position: absolute;
  top: 4px;
  z-index: 2;
  width: 11px;
  height: 11px;
  padding: 0;
  background: var(--orange);
  border: 2.5px solid var(--card);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(77, 62, 40, 0.15);
  transform: translateX(-50%);
  transition: transform 0.2s ease;
}

.timeline-dot.is-breast {
  background: var(--sage);
}

.timeline-dot:hover,
.timeline-dot:focus-visible {
  z-index: 5;
  outline: none;
  transform: translateX(-50%) scale(1.35);
}

.timeline-dot::after {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  padding: 5px 8px;
  content: attr(data-tooltip);
  color: #fffaf3;
  background: var(--forest);
  border-radius: 7px;
  font-size: 9px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.timeline-dot:hover::after,
.timeline-dot:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Last feed card */
.last-card {
  position: relative;
  display: flex;
  min-height: 274px;
  flex-direction: column;
  padding: 25px 27px 22px;
  overflow: hidden;
  color: #f5eddf;
  background:
    radial-gradient(circle at 94% 4%, rgba(239, 196, 137, 0.19), transparent 46%),
    radial-gradient(circle at -8% 100%, rgba(143, 173, 148, 0.25), transparent 55%),
    var(--forest);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: 0 22px 56px rgba(28, 45, 38, 0.22);
}

.last-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  color: rgba(245, 237, 223, 0.68);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-family: var(--font-number);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.live-badge i {
  width: 4px;
  height: 4px;
  background: #e7b77a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(231, 183, 122, 0.12);
}

.last-big {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 5px;
  margin-top: 17px;
  font-family: var(--font-number);
  font-size: clamp(58px, 5.95vw, 80px);
  font-weight: 720;
  letter-spacing: -0.065em;
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
}

.last-big .big-unit {
  margin-right: 4px;
  color: rgba(245, 237, 223, 0.5);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.02em;
}

.last-big .big-num.is-text {
  color: #f5eddf;
  font-family: var(--font-display);
  font-size: 0.66em;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.last-big .big-colon {
  margin: 0 -2px;
  color: rgba(245, 237, 223, 0.32);
  font-size: 0.55em;
  transform: translateY(-0.17em);
}

.last-big.is-clock {
  font-size: clamp(58px, 6vw, 82px);
  letter-spacing: -0.04em;
}

.last-big.is-empty {
  color: rgba(245, 237, 223, 0.24);
}

.last-big.is-empty .big-num.is-text {
  color: rgba(245, 237, 223, 0.34);
  font-size: 0.48em;
  letter-spacing: 0.04em;
}

.last-label {
  position: relative;
  z-index: 2;
  margin-top: 7px;
  color: rgba(245, 237, 223, 0.57);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.last-detail {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  color: rgba(245, 237, 223, 0.73);
  font-size: 10.5px;
}

.detail-type {
  padding: 3px 9px;
  color: #f8d9c5;
  background: rgba(221, 122, 82, 0.18);
  border: 1px solid rgba(221, 122, 82, 0.18);
  border-radius: 999px;
  font-size: 9.5px;
}

.detail-type.is-breast {
  color: #dbe9dc;
  background: rgba(125, 150, 127, 0.2);
  border-color: rgba(125, 150, 127, 0.18);
}

.detail-dot {
  width: 3px;
  height: 3px;
  background: rgba(245, 237, 223, 0.28);
  border-radius: 50%;
}

.last-tip {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 17px;
  color: rgba(245, 237, 223, 0.43);
  font-size: 9.5px;
  line-height: 1.6;
}

.last-decoration {
  position: absolute;
  right: -67px;
  bottom: -91px;
  width: 244px;
  height: 244px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.last-decoration::before {
  position: absolute;
  inset: 30px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
}

.last-decoration::after {
  position: absolute;
  inset: 65px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.last-decoration span {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #e7b77a;
  border-radius: 50%;
  opacity: 0.45;
}

.last-decoration span:nth-child(1) {
  top: 13px;
  left: 70px;
}

.last-decoration span:nth-child(2) {
  top: 103px;
  left: 2px;
  width: 3px;
  height: 3px;
}

.last-decoration span:nth-child(3) {
  top: 153px;
  left: 57px;
  width: 4px;
  height: 4px;
}

/* Rhythm card */
.rhythm-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 22px 24px 20px;
}

.section-heading h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.progress-badge {
  display: inline-grid;
  min-width: 48px;
  min-height: 31px;
  padding: 0 9px;
  place-items: center;
  color: var(--orange-deep);
  background: var(--orange-soft);
  border-radius: 999px;
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.rhythm-list {
  display: flex;
  flex-direction: column;
  margin-top: 13px;
}

.rhythm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

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

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

.rhythm-row b {
  font-family: var(--font-number);
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rhythm-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 9px 11px;
  color: var(--sage-deep);
  background: rgba(223, 232, 222, 0.58);
  border-radius: 12px;
  font-size: 9.5px;
  line-height: 1.55;
}

.rhythm-tip svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin-top: 1px;
}

/* Records */
.records-card,
.trend-card {
  padding: 24px 25px;
}

.records-heading {
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.count-badge {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0 7px;
  place-items: center;
  color: var(--muted);
  background: rgba(62, 53, 38, 0.06);
  border-radius: 999px;
  font-family: var(--font-number);
  font-size: 10px;
  font-weight: 700;
  vertical-align: 3px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 13px;
  color: var(--orange-deep);
  background: rgba(221, 122, 82, 0.08);
  border: 1px solid rgba(221, 122, 82, 0.14);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.ghost-button:hover {
  background: rgba(221, 122, 82, 0.14);
  transform: translateY(-1px);
}

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

.feed-row {
  display: grid;
  grid-template-columns: 58px 34px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 2px;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--line);
  transition: padding 0.2s ease, background 0.2s ease;
}

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

.feed-row:hover {
  padding-right: 7px;
  padding-left: 7px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 12px;
}

.feed-time {
  color: var(--ink-soft);
  font-family: var(--font-number);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.feed-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
}

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

.feed-icon.is-formula {
  color: var(--orange-deep);
  background: rgba(246, 223, 208, 0.7);
}

.feed-icon.is-breast {
  color: var(--sage-deep);
  background: rgba(223, 232, 222, 0.78);
}

.feed-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.feed-main b {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 650;
}

.feed-voice {
  display: inline-grid;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--orange-deep);
  background: rgba(246, 223, 208, 0.7);
  border-radius: 50%;
}

.feed-voice svg {
  width: 8px;
  height: 8px;
}

.feed-voice.feed-wechat {
  color: #2f8d62;
  background: rgba(198, 235, 216, 0.72);
}

.feed-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-amount {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.feed-amount b {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.feed-amount small {
  color: var(--muted);
  font-size: 8.5px;
}

.feed-edit {
  color: var(--faint);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.feed-row:hover .feed-edit {
  opacity: 1;
  transform: translateX(0);
}

.empty-state {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.empty-bottle {
  position: relative;
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 13px;
  place-items: center;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 50%;
}

.empty-bottle > svg {
  width: 34px;
  height: 34px;
  opacity: 0.8;
  transform: rotate(-6deg);
}

.empty-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.35;
}

.spark-one {
  top: 2px;
  right: -7px;
}

.spark-two {
  bottom: 9px;
  left: -13px;
  width: 4px;
  height: 4px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.empty-state p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 15px;
  padding: 7px 12px;
  color: var(--orange-deep);
  background: transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.text-button:hover {
  background: rgba(221, 122, 82, 0.08);
}

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

/* 7 day chart */
.trend-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.trend-heading {
  align-items: center;
}

.week-average {
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.week-average b {
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.week-average small {
  font-size: 8px;
}

.week-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(4px, 0.9vw, 10px);
  min-height: 196px;
  margin-top: 14px;
  padding: 18px 0 0;
}

.chart-day {
  position: relative;
  display: flex;
  min-width: 0;
  height: 162px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 0;
  background: transparent;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.chart-day:hover {
  background: rgba(255, 255, 255, 0.4);
}

.chart-value {
  min-height: 13px;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 8px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.chart-column {
  display: flex;
  width: 100%;
  height: 112px;
  align-items: flex-end;
  justify-content: center;
}

.chart-column i {
  display: block;
  width: min(26px, 70%);
  min-height: 3px;
  background: linear-gradient(to top, var(--orange), #eda77f);
  border-radius: 7px 7px 4px 4px;
  box-shadow: 0 5px 12px rgba(221, 122, 82, 0.13);
  transition: height 0.8s cubic-bezier(0.22, 0.8, 0.3, 1), filter 0.2s ease;
}

.chart-day.is-today .chart-column i {
  background: linear-gradient(to top, var(--orange-deep), var(--orange));
  box-shadow: 0 6px 15px rgba(199, 90, 52, 0.22);
}

.chart-day.is-empty .chart-column i {
  background: rgba(62, 53, 38, 0.1);
  box-shadow: none;
}

.chart-day:hover .chart-column i {
  filter: brightness(1.035);
}

.chart-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
  white-space: nowrap;
}

.chart-label small {
  color: var(--faint);
  font-family: var(--font-number);
  font-size: 7.5px;
}

.chart-day.is-today .chart-label {
  color: var(--orange-deep);
  font-weight: 650;
}

.chart-target-line {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 2;
  height: 0;
  border-top: 1px dashed rgba(184, 140, 70, 0.45);
  pointer-events: none;
}

.chart-target-line span {
  position: absolute;
  top: -8px;
  right: 0;
  padding: 0 4px;
  color: var(--gold);
  background: var(--card);
  font-family: var(--font-number);
  font-size: 7px;
  letter-spacing: 0.02em;
}

/* QR */
.qr-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 13px;
  padding: 12px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.48), transparent 60%),
    var(--cream);
  border: 1px solid rgba(184, 140, 70, 0.13);
  border-radius: 18px;
}

.qr-code {
  display: grid;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  background: #fffdf8;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(77, 62, 40, 0.08);
}

.qr-code canvas,
.qr-code img {
  width: 100% !important;
  height: 100% !important;
}

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

.qr-copy .eyebrow {
  color: rgba(123, 92, 43, 0.68);
  font-size: 7.5px;
}

.qr-copy h3 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.qr-copy > p:not(.eyebrow) {
  margin-top: 2px;
  color: rgba(85, 80, 69, 0.72);
  font-size: 8.5px;
  line-height: 1.55;
}

.link-button {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin-top: 7px;
  padding: 3px 7px;
  color: rgba(85, 80, 69, 0.82);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(184, 140, 70, 0.13);
  border-radius: 6px;
  transition: background 0.2s ease;
}

.link-button:hover {
  background: rgba(255, 255, 255, 0.8);
}

.link-button code {
  max-width: 172px;
  overflow: hidden;
  font-family: var(--font-number);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-button svg {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  opacity: 0.6;
}

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 23px 2px 29px;
  color: var(--faint);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.footer span:first-child {
  color: var(--muted);
  font-family: var(--font-number);
  font-weight: 650;
  letter-spacing: 0.1em;
}

/* Mobile dock */
.mobile-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: none;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(244, 239, 230, 0.97) 48%, rgba(244, 239, 230, 0.8), transparent);
  pointer-events: none;
}

.mobile-actions {
  display: flex;
  width: 100%;
  gap: 8px;
  pointer-events: auto;
}

.mobile-add,
.mobile-voice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 50px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.03em;
  transition: transform 0.18s ease;
}

.mobile-add:active,
.mobile-voice:active {
  transform: scale(0.985);
}

.mobile-voice {
  flex: 1.35;
  color: #fffaf4;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  box-shadow: 0 10px 26px rgba(199, 90, 52, 0.28);
}

.mobile-voice-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.mobile-voice svg {
  width: 15px;
  height: 15px;
}

.mobile-add {
  flex: 0.65;
  color: var(--forest);
  background: rgba(255, 252, 246, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(77, 62, 40, 0.1);
}

.mobile-add svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* Sheets */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  padding: 22px;
  place-items: center;
  background: rgba(25, 36, 31, 0.46);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn 0.22s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-panel {
  width: min(100%, 540px);
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  padding: 25px 27px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 100% 0%, rgba(221, 122, 82, 0.08), transparent 32%),
    var(--card-solid);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  box-shadow: 0 36px 90px rgba(25, 36, 31, 0.3);
  animation: sheetIn 0.32s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

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

.sheet-handle {
  display: none;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.sheet-head h2 {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sheet-close {
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: rgba(62, 53, 38, 0.045);
}

.sheet-close:hover {
  background: rgba(62, 53, 38, 0.08);
}

.type-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0;
  margin: 0 0 16px;
  border: 0;
}

.type-picker legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.type-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 11px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  border: 1.5px solid var(--line);
  border-radius: 15px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.type-option:hover {
  background: rgba(255, 255, 255, 0.8);
}

.type-option.selected.formula-option {
  background: rgba(246, 223, 208, 0.5);
  border-color: rgba(221, 122, 82, 0.55);
  box-shadow: 0 0 0 3px rgba(221, 122, 82, 0.07);
}

.type-option.selected.breast-option {
  background: rgba(223, 232, 222, 0.52);
  border-color: rgba(125, 150, 127, 0.6);
  box-shadow: 0 0 0 3px rgba(125, 150, 127, 0.08);
}

.type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-option-icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--orange-deep);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 10px;
}

.breast-option .type-option-icon {
  color: var(--sage-deep);
}

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

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

.type-option-copy b {
  font-size: 12px;
  font-weight: 650;
}

.type-option-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
}

.radio-mark {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1.5px solid rgba(62, 53, 38, 0.22);
  border-radius: 50%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.type-option.selected.formula-option .radio-mark {
  border-color: var(--orange-deep);
  box-shadow: inset 0 0 0 3.5px var(--card), inset 0 0 0 8px var(--orange-deep);
}

.type-option.selected.breast-option .radio-mark {
  border-color: var(--sage-deep);
  box-shadow: inset 0 0 0 3.5px var(--card), inset 0 0 0 8px var(--sage-deep);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 13px;
}

.field > span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.field > span small {
  color: var(--faint);
  font-size: 8px;
}

.field input {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  font-family: var(--font-number);
  font-size: 12.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input[type="text"] {
  font-family: var(--font-sans);
}

.field input:focus {
  background: #fff;
  border-color: rgba(221, 122, 82, 0.55);
  box-shadow: 0 0 0 3px rgba(221, 122, 82, 0.08);
}

.field input::placeholder {
  color: var(--faint);
}

.amount-field {
  padding: 13px 14px 12px;
  margin-bottom: 13px;
  background: rgba(241, 233, 219, 0.45);
  border: 1px solid rgba(62, 53, 38, 0.07);
  border-radius: 17px;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.field-label-row > span {
  font-size: 10.5px;
  font-weight: 600;
}

.field-label-row small {
  color: var(--faint);
  font-size: 8px;
}

.amount-control {
  display: flex;
  align-items: center;
  gap: 9px;
}

.amount-step {
  display: grid;
  width: 38px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 19px;
  font-weight: 400;
  transition: background 0.15s ease, transform 0.15s ease;
}

.amount-step:hover {
  background: #fff;
}

.amount-step:active {
  transform: scale(0.94);
}

.amount-input-wrap {
  display: flex;
  height: 58px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fffdf9;
  border: 1px solid rgba(62, 53, 38, 0.1);
  border-radius: 13px;
}

.amount-input-wrap input {
  width: 118px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--font-number);
  font-size: 36px;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.amount-input-wrap input::-webkit-outer-spin-button,
.amount-input-wrap input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.amount-input-wrap span {
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 11px;
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.amount-chips button {
  min-width: 45px;
  height: 25px;
  padding: 0 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-number);
  font-size: 9.5px;
  transition: all 0.15s ease;
}

.amount-chips button:hover {
  color: var(--ink);
  background: #fff;
}

.amount-chips button.active {
  color: var(--orange-deep);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(221, 122, 82, 0.32);
  font-weight: 700;
}

.note-field {
  margin-bottom: 6px;
}

.form-error {
  min-height: 16px;
  padding: 0 2px;
  color: var(--orange-deep);
  font-size: 10px;
  line-height: 1.5;
}

.sheet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.delete-button,
.export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(62, 53, 38, 0.04);
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.delete-button svg,
.export-button svg {
  width: 13px;
  height: 13px;
}

.delete-button:hover {
  color: #b4442d;
  background: rgba(199, 90, 52, 0.08);
}

.export-button:hover {
  color: var(--ink);
  background: rgba(62, 53, 38, 0.07);
}

.save-button {
  flex: 1;
  min-height: 46px;
  border-radius: 14px;
  font-size: 13px;
}

.save-button svg {
  width: 15px;
  height: 15px;
}

.settings-panel .field {
  margin-bottom: 15px;
}

.target-input {
  position: relative;
}

.target-input input {
  padding-right: 40px;
}

.target-input > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 10px;
  transform: translateY(-50%);
  pointer-events: none;
}

.field-help {
  margin: 0 2px 4px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.6;
}


/* Voice entry */
.voice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 22px;
  place-items: center;
  background: rgba(15, 27, 23, 0.72);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: fadeIn 0.22s ease both;
}

.voice-panel {
  position: relative;
  width: min(100%, 445px);
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  padding: 27px 28px 19px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #f5eddf;
  background:
    radial-gradient(circle at 50% 28%, rgba(221, 122, 82, 0.16), transparent 38%),
    radial-gradient(circle at 100% 0%, rgba(231, 183, 122, 0.1), transparent 38%),
    #1e332b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  box-shadow: 0 40px 100px rgba(6, 14, 11, 0.5);
  animation: voiceIn 0.36s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.voice-panel::before,
.voice-panel::after {
  position: absolute;
  width: 240px;
  height: 240px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  pointer-events: none;
}

.voice-panel::before {
  top: -128px;
  right: -105px;
}

.voice-panel::after {
  bottom: -156px;
  left: -118px;
}

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

.voice-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.voice-head h2 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.voice-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  color: rgba(245, 237, 223, 0.58);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.voice-close:hover {
  color: #f5eddf;
  background: rgba(255, 255, 255, 0.1);
}

.voice-close svg {
  width: 16px;
  height: 16px;
}

.voice-example {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: rgba(245, 237, 223, 0.54);
  font-size: 10.5px;
}

.voice-example span {
  padding: 2px 7px;
  color: rgba(245, 237, 223, 0.58);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.voice-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 13px 0 7px;
}

.voice-orb-wrap {
  position: relative;
  display: grid;
  width: 178px;
  height: 178px;
  flex: 0 0 auto;
  place-items: center;
}

.voice-wave {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(231, 183, 122, 0.18);
  border-radius: 50%;
  opacity: 0;
}

.voice-panel.is-listening .voice-wave {
  animation: voiceWave 2.7s ease-out infinite;
}

.voice-panel.is-listening .w2 {
  animation-delay: 0.65s;
}

.voice-panel.is-listening .w3 {
  animation-delay: 1.3s;
}

@keyframes voiceWave {
  0% { opacity: 0.55; transform: scale(0.68); }
  80%, 100% { opacity: 0; transform: scale(1.12); }
}

.voice-orb {
  position: relative;
  z-index: 2;
  display: grid;
  width: 112px;
  height: 112px;
  padding: 0;
  place-items: center;
  color: #fffaf4;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(135deg, #e78a5f, #c95631);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 13px rgba(221, 122, 82, 0.08),
    0 18px 38px rgba(199, 90, 52, 0.25);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.voice-orb:hover {
  filter: brightness(1.035);
  transform: scale(1.025);
}

.voice-orb:active {
  transform: scale(0.97);
}

.voice-orb svg {
  width: 39px;
  height: 39px;
}

.voice-panel.is-listening .voice-orb {
  animation: orbBreathe 2.4s ease-in-out infinite;
}

@keyframes orbBreathe {
  0%, 100% { box-shadow: 0 0 0 13px rgba(221, 122, 82, 0.08), 0 18px 38px rgba(199, 90, 52, 0.25); }
  50% { box-shadow: 0 0 0 22px rgba(221, 122, 82, 0.03), 0 18px 42px rgba(199, 90, 52, 0.33); }
}

.voice-panel.is-idle .voice-orb,
.voice-panel.is-error .voice-orb,
.voice-panel.is-unsupported .voice-orb {
  filter: grayscale(0.4) brightness(0.72);
  animation: none;
}

.voice-panel.is-error .voice-wave,
.voice-panel.is-idle .voice-wave,
.voice-panel.is-unsupported .voice-wave {
  display: none;
}

.voice-status {
  min-height: 22px;
  margin-top: 8px;
  color: #f7efe2;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

.voice-transcript {
  max-width: 330px;
  min-height: 22px;
  margin-top: 4px;
  color: rgba(245, 237, 223, 0.64);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.voice-transcript:empty::before {
  content: "听你说…";
  color: rgba(245, 237, 223, 0.25);
  font-family: var(--font-sans);
  font-size: 11px;
}

.voice-parsed {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.voice-token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  color: rgba(245, 237, 223, 0.68);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  font-size: 9px;
}

.voice-token b {
  color: #f2c795;
  font-family: var(--font-number);
  font-size: 10px;
  font-weight: 700;
}

.voice-hint {
  max-width: 300px;
  min-height: 15px;
  margin-top: 9px;
  color: rgba(245, 237, 223, 0.35);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.voice-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 11px;
}

.voice-ghost,
.voice-cancel {
  min-height: 38px;
  padding: 0 16px;
  color: rgba(245, 237, 223, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  font-size: 10.5px;
  transition: color 0.2s ease, background 0.2s ease;
}

.voice-ghost:hover,
.voice-cancel:hover {
  color: #f5eddf;
  background: rgba(255, 255, 255, 0.1);
}

.voice-ghost {
  color: #f2c795;
}

.voice-privacy {
  position: relative;
  z-index: 2;
  margin-top: 11px;
  color: rgba(245, 237, 223, 0.24);
  font-size: 7.5px;
  line-height: 1.5;
  text-align: center;
}


/* Authentication */
.auth-screen {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  place-items: center;
  background:
    radial-gradient(circle at 12% 0%, rgba(221, 122, 82, 0.18), transparent 34rem),
    radial-gradient(circle at 92% 100%, rgba(125, 150, 127, 0.18), transparent 32rem),
    var(--paper);
}

.auth-panel {
  width: min(100%, 420px);
  padding: 30px 30px 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(221, 122, 82, 0.07), transparent 36%),
    rgba(255, 252, 246, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.auth-brand strong {
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.auth-brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.auth-panel h1 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.auth-intro {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 14px;
}

.auth-field > span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.auth-field input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-field input:focus {
  background: #fff;
  border-color: rgba(221, 122, 82, 0.55);
  box-shadow: 0 0 0 3px rgba(221, 122, 82, 0.08);
}

.auth-field input::placeholder {
  color: var(--faint);
}

.auth-error {
  min-height: 17px;
  margin-top: 8px;
  color: var(--orange-deep);
  font-size: 10px;
  line-height: 1.5;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  color: #fffaf4;
  background: var(--forest);
  border-radius: 13px;
  box-shadow: 0 9px 22px rgba(34, 55, 47, 0.2);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.auth-submit:hover {
  background: var(--forest-light);
}

.auth-submit:active {
  transform: scale(0.99);
}

.auth-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.auth-switch {
  display: block;
  margin: 14px auto 0;
  padding: 5px 8px;
  color: var(--orange-deep);
  background: transparent;
  font-size: 10px;
}

.auth-switch:hover {
  text-decoration: underline;
}

.auth-footnote {
  margin-top: 22px;
  padding-top: 14px;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font-size: 8.5px;
  line-height: 1.6;
  text-align: center;
}

/* Account settings */
.account-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.account-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-heading h3 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.logout-button {
  min-height: 30px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(62, 53, 38, 0.05);
  border-radius: 999px;
  font-size: 9px;
}

.logout-button:hover {
  color: var(--orange-deep);
  background: rgba(221, 122, 82, 0.08);
}

.account-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.account-row b {
  color: var(--ink);
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 700;
}

.account-row code {
  padding: 3px 7px;
  color: var(--orange-deep);
  background: var(--orange-soft);
  border-radius: 5px;
  font-family: var(--font-number);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.account-role {
  margin-left: auto;
  padding: 2px 7px;
  color: var(--sage-deep);
  background: var(--sage-soft);
  border-radius: 999px;
  font-size: 8px;
}

.wechat-bind-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 11px 12px;
  background: rgba(223, 232, 222, 0.45);
  border: 1px solid rgba(125, 150, 127, 0.12);
  border-radius: 12px;
}

.wechat-bind-box b {
  font-size: 10.5px;
  font-weight: 650;
}

.wechat-bind-box p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.wechat-bind-box .ghost-button {
  flex: 0 0 auto;
  min-height: 29px;
  color: var(--sage-deep);
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(125, 150, 127, 0.18);
  font-size: 9px;
}

.wechat-bind-result {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(125, 150, 127, 0.3);
  border-radius: 9px;
}

.wechat-bind-result code {
  color: var(--sage-deep);
  font-family: var(--font-number);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.wechat-bind-result span {
  color: var(--muted);
  font-size: 8.5px;
}

.password-form {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.account-subtitle {
  margin-bottom: 9px;
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.password-form .field {
  margin-bottom: 8px;
}

.password-submit {
  margin-left: auto;
  display: flex;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 36px);
  padding: 10px 15px 10px 10px;
  color: #fffaf4;
  background: var(--forest);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 15px 40px rgba(25, 36, 31, 0.28);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.toast-action {
  flex: 0 0 auto;
  margin-left: 3px;
  padding: 5px 9px;
  color: #f2c795;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 650;
}

.toast-action:hover {
  background: rgba(255, 255, 255, 0.15);
}

.toast-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  color: #f3ca96;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

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

/* Responsive */
@media (max-width: 1180px) {
  .app-shell {
    padding: 0 22px;
  }

  .sync-state {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.8fr);
  }

  .hero-card {
    padding: 24px 25px 20px;
  }

  .hero-content {
    gap: 24px;
  }

  .gauge {
    width: min(100%, 250px);
  }

  .last-card {
    padding: 23px 23px 20px;
  }

  .lower-grid {
    grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.9fr);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .date-nav {
    justify-self: center;
  }

  .sync-state {
    display: none;
  }

  .top-voice {
    width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .top-voice span {
    display: none;
  }

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

  .side-column {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .last-card {
    min-height: 255px;
  }

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

  .trend-card {
    min-height: 0;
  }

  .week-chart {
    max-width: none;
  }

  .qr-panel {
    max-width: 390px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .app-shell {
    padding: 0 14px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    gap: 11px;
    padding: 11px 0 8px;
    transition: padding 0.22s ease, gap 0.22s ease;
  }

  .topbar.is-compact {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 7px 0 6px;
  }

  .topbar.is-compact .brand {
    display: none;
  }

  .topbar.is-compact .date-nav {
    grid-column: 1;
    grid-row: 1;
  }

  .topbar.is-compact .today-button {
    display: none;
  }

  .topbar.is-compact .top-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

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

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

  .brand-copy small {
    margin-top: 3px;
    font-size: 8.5px;
  }

  .date-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: space-between;
    width: 100%;
    padding: 4px;
  }

  .date-button {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
  }

  .date-button > span:first-of-type {
    font-size: 12.5px;
  }

  .date-tag {
    font-size: 8px;
  }

  .round-button {
    width: 33px;
    height: 33px;
  }

  .today-button {
    padding: 0 9px;
    font-size: 9.5px;
  }

  .top-actions {
    gap: 4px;
  }

  .top-add,
  .top-voice {
    display: none;
  }

  .top-actions .round-button {
    width: 35px;
    height: 35px;
  }

  main {
    padding-top: 10px;
  }

  .dashboard-grid,
  .lower-grid,
  .side-column {
    gap: 12px;
  }

  .lower-grid {
    margin-top: 12px;
  }

  .card {
    border-radius: 22px;
  }

  .hero-card {
    padding: 19px 17px 16px;
  }

  .hero-head {
    gap: 10px;
  }

  .hero-head h1 {
    margin-top: 4px;
    font-size: 23px;
  }

  .goal-chip {
    min-height: 38px;
    padding: 8px 9px;
    border-radius: 12px;
  }

  .goal-chip span {
    margin-right: 1px;
    font-size: 8.5px;
  }

  .goal-chip b {
    font-size: 17px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 8px;
  }

  .gauge {
    width: 224px;
  }

  .gauge-total > span {
    font-size: 54px;
  }

  .gauge-percent {
    margin-top: 6px;
  }

  .gauge-caption {
    margin-top: 5px;
    font-size: 8.5px;
  }

  .remaining-pill {
    margin-top: -2px;
    padding: 5px 11px;
    font-size: 9.5px;
  }

  .hero-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 13px;
  }

  .breakdown-card {
    padding: 11px 11px 10px;
    border-radius: 15px;
  }

  .breakdown-top {
    gap: 7px;
  }

  .type-icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }

  .type-icon svg {
    width: 15px;
    height: 15px;
  }

  .breakdown-name > span {
    font-size: 10.5px;
  }

  .breakdown-name small {
    font-size: 7.5px;
  }

  .breakdown-top > b {
    font-size: 17px;
  }

  .breakdown-top > b small {
    font-size: 7.5px;
  }

  .breakdown-track {
    margin-top: 8px;
  }

  .hero-note {
    grid-column: 1 / -1;
    padding: 1px 2px 0;
    font-size: 9.5px;
  }

  .hero-footer {
    margin-top: 13px;
    padding: 11px 0 10px;
  }

  .mini-stat {
    gap: 3px;
    padding: 0 10px;
  }

  .mini-stat > span {
    font-size: 8.5px;
  }

  .mini-stat > b {
    min-height: 21px;
    font-size: 17px;
  }

  .mini-stat .mini-time {
    font-size: 14px;
  }

  .timeline-panel {
    padding-top: 10px;
  }

  .timeline-head {
    margin-bottom: 8px;
    font-size: 8.5px;
  }

  .last-card {
    min-height: 245px;
    padding: 20px 19px 18px;
    border-radius: 22px;
  }

  .last-big {
    margin-top: 13px;
    font-size: 58px;
  }

  .last-big.is-clock {
    font-size: 60px;
  }

  .last-big .big-unit {
    font-size: 10px;
  }

  .last-label {
    margin-top: 6px;
    font-size: 9.5px;
  }

  .last-detail {
    margin-top: 12px;
    font-size: 9.5px;
  }

  .last-tip {
    padding-top: 13px;
    font-size: 8.5px;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .rhythm-card {
    min-height: 0;
    padding: 18px 17px 16px;
  }

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

  .rhythm-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
  }

  .rhythm-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 9px;
    background: rgba(255, 255, 255, 0.48);
    border: 0;
    border-radius: 10px;
  }

  .rhythm-row span {
    font-size: 8px;
  }

  .rhythm-row b {
    font-size: 11px;
  }

  .rhythm-tip {
    margin-top: 12px;
  }

  .records-card,
  .trend-card {
    padding: 18px 16px;
  }

  .records-heading {
    padding-bottom: 11px;
  }

  .ghost-button {
    min-height: 31px;
    padding: 0 10px;
    font-size: 10px;
  }

  .feed-row {
    grid-template-columns: 48px 30px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 11px 0;
  }

  .feed-time {
    font-size: 16px;
  }

  .feed-icon {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }

  .feed-icon svg {
    width: 15px;
    height: 15px;
  }

  .feed-main b {
    font-size: 11.5px;
  }

  .feed-main small {
    font-size: 8.5px;
  }

  .feed-amount b {
    font-size: 17px;
  }

  .feed-edit {
    display: none;
  }

  .empty-state {
    min-height: 250px;
    padding: 18px;
  }

  .week-chart {
    min-height: 178px;
    gap: 3px;
    margin-top: 10px;
  }

  .chart-day {
    height: 147px;
  }

  .chart-column {
    height: 105px;
  }

  .chart-column i {
    width: min(24px, 76%);
  }

  .chart-label {
    font-size: 7.5px;
  }

  .chart-value {
    font-size: 7px;
  }

  .qr-panel {
    max-width: none;
    gap: 12px;
    padding: 11px;
  }

  .qr-code {
    width: 86px;
    height: 86px;
  }

  .qr-copy h3 {
    font-size: 15px;
  }

  .link-button code {
    max-width: 155px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 18px 2px 92px;
    font-size: 8px;
  }

  .mobile-dock {
    display: block;
  }

  .sheet-backdrop {
    align-items: end;
    padding: 0;
  }

  .sheet-panel {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 25px 25px 0 0;
    animation: sheetUp 0.32s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  }

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

  .sheet-handle {
    display: block;
    width: 37px;
    height: 4px;
    margin: 0 auto 9px;
    background: rgba(62, 53, 38, 0.13);
    border-radius: 999px;
  }

  .sheet-head {
    margin-bottom: 14px;
  }

  .sheet-head h2 {
    font-size: 23px;
  }

  .type-picker {
    margin-bottom: 12px;
  }

  .type-option {
    padding: 10px;
  }

  .radio-mark {
    display: none;
  }

  .field-row {
    gap: 8px;
  }

  .field {
    margin-bottom: 10px;
  }

  .field input {
    height: 41px;
  }

  .amount-field {
    padding: 11px 11px 10px;
    margin-bottom: 10px;
  }

  .amount-input-wrap {
    height: 54px;
  }

  .amount-input-wrap input {
    font-size: 33px;
  }

  .amount-step {
    height: 40px;
  }

  .sheet-actions {
    margin-top: 5px;
  }

  .save-button {
    min-height: 46px;
  }

  .toast {
    bottom: 78px;
  }

  .auth-screen {
    padding: 14px;
  }

  .auth-panel {
    padding: 25px 20px 20px;
    border-radius: 24px;
  }

  .auth-brand {
    margin-bottom: 22px;
  }

  .auth-panel h1 {
    font-size: 26px;
  }

  .account-section {
    margin-top: 16px;
    padding-top: 15px;
  }

  .voice-backdrop {
    padding: 12px;
  }

  .voice-panel {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 21px 18px calc(16px + env(safe-area-inset-bottom));
    border-radius: 26px;
  }

  .voice-head h2 {
    font-size: 24px;
  }

  .voice-example {
    margin-top: 6px;
  }

  .voice-stage {
    padding-top: 10px;
  }

  .voice-orb-wrap {
    width: 154px;
    height: 154px;
  }

  .voice-orb {
    width: 98px;
    height: 98px;
  }

  .voice-orb svg {
    width: 34px;
    height: 34px;
  }

  .voice-status {
    margin-top: 5px;
    font-size: 12px;
  }

  .voice-transcript {
    font-size: 14px;
  }

  .voice-hint {
    margin-top: 7px;
  }

  .voice-actions {
    margin-top: 8px;
  }

  .voice-privacy {
    margin-top: 8px;
  }

  .toast {
    gap: 7px;
    padding-right: 9px;
    font-size: 10.5px;
  }
}

@media (max-width: 390px) {
  .top-actions .round-button {
    width: 32px;
    height: 32px;
  }

  .date-button > svg {
    display: none;
  }

  .today-button {
    padding-right: 6px;
    padding-left: 6px;
  }

  .hero-head h1 {
    font-size: 21px;
  }

  .gauge {
    width: 204px;
  }

  .gauge-total > span {
    font-size: 49px;
  }

  .mini-stat {
    padding: 0 8px;
  }

  .breakdown-card {
    padding: 10px 9px;
  }

  .breakdown-name small {
    display: none;
  }

  .breakdown-top > b {
    font-size: 15px;
  }

  .chart-column i {
    width: 64%;
  }

  .qr-code {
    width: 78px;
    height: 78px;
  }

  .link-button code {
    max-width: 130px;
  }

  .type-option-icon {
    display: none;
  }
}

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

body.auth-locked .mobile-dock {
  display: none !important;
}
