*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --yellow: #eab308;
  --yellow-dim: rgba(234, 179, 8, 0.15);
  --red: #ef4444;
  --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --text: #0f172a;
    --text-dim: #64748b;
    --accent-glow: rgba(99, 102, 241, 0.12);
    --green-dim: rgba(34, 197, 94, 0.1);
    --yellow-dim: rgba(234, 179, 8, 0.1);
  }
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

/* -- Layout -- */
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.header {
  padding: 16px 20px 8px;
  text-align: center;
}

.header h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 20px;
  -webkit-overflow-scrolling: touch;
}

/* -- Nav -- */
.nav {
  display: flex;
  gap: 4px;
  padding: 8px 20px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.nav button {
  flex: 1;
  padding: 6px 2px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.nav button svg { width: 20px; height: 20px; }

.nav button.active {
  background: var(--accent);
  color: white;
}

/* -- Streak badge -- */
.streak {
  text-align: center;
  padding: 20px 0;
}

.streak-count {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.streak-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 500;
}

/* -- Spray buttons -- */
.spray-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.spray-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  border: 2px solid var(--surface-hover);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.spray-btn:active {
  transform: scale(0.97);
}

.spray-btn .icon {
  font-size: 32px;
  line-height: 1;
}

.spray-btn .label {
  flex: 1;
}

.spray-btn .label-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.spray-btn .label-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

.spray-btn .check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.spray-btn.done {
  border-color: var(--green);
  background: var(--green-dim);
}

.spray-btn.done .check {
  border-color: var(--green);
  background: var(--green);
}

.spray-btn.done .check::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2.5px solid white;
  border-bottom: 2.5px solid white;
  transform: rotate(-45deg) translateY(-1px);
}

.spray-btn.done .label-sub {
  color: var(--green);
  font-weight: 600;
}

/* Undo toast */
.undo-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  opacity: 0;
  transition: all 0.3s;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.undo-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.undo-toast button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* -- History -- */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.month-nav button {
  background: var(--surface);
  border: none;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.month-nav .month-title {
  font-size: 17px;
  font-weight: 700;
}

.month-pct {
  text-align: center;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-dim);
}

.month-pct span {
  font-weight: 700;
  color: var(--text);
  font-size: 20px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 24px;
}

.cal-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  padding-bottom: 4px;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  position: relative;
}

.cal-day.both {
  background: var(--green);
  color: white;
}

.cal-day.partial {
  background: var(--yellow);
  color: #78350f;
}

.cal-day.missed {
  background: var(--surface);
  color: var(--text-dim);
}

.cal-day.future {
  opacity: 0.3;
}

.cal-day.today {
  box-shadow: 0 0 0 2px var(--accent);
}

.cal-day .photo-dot {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-day.both .photo-dot { background: white; }
.cal-day.partial .photo-dot { background: #78350f; }

/* -- Stats -- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--accent);
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  font-weight: 500;
}

/* -- Settings -- */
.settings-group {
  margin-bottom: 20px;
}

.settings-group h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 6px;
}

.setting-row label {
  font-size: 15px;
  font-weight: 600;
}

.setting-row input[type="time"] {
  background: var(--surface-hover);
  border: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}

.setting-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  margin-bottom: 6px;
}

.setting-btn.danger {
  color: var(--red);
}

.install-banner {
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.install-banner strong {
  display: block;
  margin-bottom: 4px;
}

/* hide on standalone */
@media (display-mode: standalone) {
  .install-banner { display: none; }
}

/* -- Photos -- */
.photos-section {
  margin-top: 20px;
}

.photos-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.photo-strip::-webkit-scrollbar { display: none; }

.photo-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid var(--surface-hover);
}

.add-photo-btn {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 2px dashed var(--surface-hover);
  background: transparent;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.add-photo-btn:active {
  background: var(--surface);
}

.photo-uploading {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 2px solid var(--accent);
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-uploading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 3px solid var(--surface-hover);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* -- Photo upload status overlays -- */
.photo-thumb-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.photo-thumb-wrap .photo-thumb {
  width: 100%;
  height: 100%;
}

.photo-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.photo-progress-text {
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.photo-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--accent);
  border-radius: 0 0 10px 10px;
  transition: width 0.2s;
}

.photo-failed-overlay {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(239,68,68,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  color: white;
  font-weight: 700;
}

.pending-count {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-left: 6px;
}

/* -- Gallery modal -- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gallery-modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.gallery-modal h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-close {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--surface-hover);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* -- Fullscreen viewer -- */
.fullscreen-viewer {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 300;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s;
}

.photo-zoom-container {
  flex: 1;
  overflow: hidden;
  touch-action: none;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-zoom-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
}

.fullscreen-bar {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  padding-top: calc(12px + var(--safe-top));
  background: rgba(0,0,0,0.5);
}

.fullscreen-bar button {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 16px;
  -webkit-tap-highlight-color: transparent;
}

.fullscreen-bar button:active { opacity: 0.6; }

.fullscreen-bar .delete-btn { color: var(--red); }
.fullscreen-bar .delete-confirm { color: white; background: var(--red); border-radius: 8px; }

.photo-note {
  padding: 12px 20px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: rgba(0,0,0,0.5);
  color: #ccc;
  font-size: 13px;
  text-align: center;
}

/* -- Workout tab -- */
.workout-streak { font-size: 42px; font-weight: 800; text-align: center; background: linear-gradient(135deg, var(--accent), #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 4px; }
.workout-streak-label { text-align: center; color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.weekly-goal { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.weekly-goal h3 { font-size: 14px; color: var(--text-dim); margin: 0 0 8px; }
.weekly-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.weekly-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; }
.weekly-dots { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.weekly-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text-dim); background: rgba(255,255,255,0.06); }
.weekly-dot.done { background: var(--accent); color: white; }
.weekly-dot.today { box-shadow: 0 0 0 2px var(--accent); }
.workout-toggle { width: 100%; padding: 18px; border: 2px solid rgba(255,255,255,0.1); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer; margin-bottom: 12px; transition: all 0.2s; }
.workout-toggle.done { border-color: var(--green); background: rgba(34,197,94,0.15); }
.type-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.type-pill { padding: 6px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: var(--text-dim); font-size: 13px; cursor: pointer; transition: all 0.2s; }
.type-pill.active { background: var(--accent); color: white; border-color: var(--accent); }
.workout-notes { width: 100%; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 14px; }

/* -- Body tab -- */
.body-today { text-align: center; margin-bottom: 20px; }
.body-today .weight-display { font-size: 48px; font-weight: 800; color: var(--text); }
.body-today .weight-unit { font-size: 18px; color: var(--text-dim); }
.body-today .weight-label { color: var(--text-dim); font-size: 13px; }
.weight-input-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.weight-input-row input { flex: 1; padding: 12px; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 18px; text-align: center; font-weight: 600; }
.weight-input-row button { padding: 12px 16px; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; }
.weight-input-row .log-btn { background: var(--accent); color: white; border-color: var(--accent); font-weight: 700; font-size: 14px; padding: 12px 20px; }
.body-chart { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.body-chart canvas { width: 100%; height: 120px; }
.body-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.body-stat { background: var(--surface); border-radius: var(--radius); padding: 12px; text-align: center; }
.body-stat .val { font-size: 20px; font-weight: 700; }
.body-stat .label { font-size: 11px; color: var(--text-dim); }
.body-history { background: var(--surface); border-radius: var(--radius); padding: 12px; }
.body-history-row { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; }

/* -- Workout Routine -- */
.routine-card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.routine-card.rest-day { text-align: center; }
.routine-header { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.routine-week { font-size: 12px; color: var(--accent); margin-bottom: 12px; font-weight: 600; }
.routine-note { font-size: 14px; color: var(--text-dim); }
.routine-exercises { display: flex; flex-direction: column; gap: 8px; }
.routine-exercise { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.routine-num { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: white; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.routine-name { flex: 1; }
.routine-sets { color: var(--text-dim); font-size: 13px; font-weight: 600; white-space: nowrap; }

.program-section { margin-top: 16px; }
.program-toggle { width: 100%; padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; }
.full-program { margin-top: 12px; }
.program-progression { background: var(--surface); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; font-size: 13px; }
.program-progression b { display: block; margin-bottom: 8px; }
.prog-rule { padding: 4px 0; color: var(--text-dim); }
.prog-rule.active { color: var(--accent); font-weight: 700; }
.program-day { background: var(--surface); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; }
.program-day.rest-day { text-align: center; color: var(--text-dim); }
.program-day-header { font-size: 14px; font-weight: 700; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.06); }

/* -- Photos tab -- */
.photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.photos-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: pointer; }
.photos-date-header { font-size: 13px; color: var(--text-dim); padding: 12px 0 6px; font-weight: 600; }
.photos-add-btn { width: 100%; padding: 14px; border: 2px dashed rgba(255,255,255,0.15); border-radius: var(--radius); background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 16px; }

/* -- Role selection -- */
.role-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
  min-height: 60vh;
}

.role-screen h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.role-screen p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 12px;
}

.role-btn {
  width: 100%;
  max-width: 300px;
  padding: 20px;
  border: 2px solid var(--surface-hover);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.role-btn:active { transform: scale(0.97); }

.role-btn .role-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 4px;
}

/* -- Partner view -- */
.partner-status {
  text-align: center;
  padding: 20px 0;
}

.partner-status h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.partner-status .date-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 2px solid var(--surface-hover);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
}

.status-card.done { border-color: var(--green); background: var(--green-dim); }
.status-card .icon { font-size: 28px; }
.status-card .status-text { flex: 1; font-size: 16px; font-weight: 600; }
.status-card .status-badge { font-size: 20px; }

.linked-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--green-dim);
  border: 1px solid var(--green);
  border-radius: 12px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
}

/* -- #12: Celebration animation -- */
.celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  z-index: 400;
  animation: celebratePop 1.5s ease-out forwards;
  pointer-events: none;
}

@keyframes celebratePop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  60% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1) translateY(-40px); }
}

/* -- #7: Last updated -- */
.last-updated {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 16px;
}

/* -- #11: Storage warning -- */
.storage-warning {
  background: var(--yellow-dim);
  border: 1px solid var(--yellow);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--yellow);
}

/* -- #13: Week trend -- */
.week-trend {
  text-align: center;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-dim);
  background: var(--surface);
  border-radius: 10px;
}

.week-trend .trend-value {
  font-weight: 700;
  color: var(--text);
}

.week-trend .trend-up { color: var(--green); }
.week-trend .trend-down { color: var(--red); }

