@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700&family=Varela+Round&display=swap');

:root {
  --primary: #0891B2;
  --primary-light: #22D3EE;
  --primary-dark: #0E7490;
  --accent: #059669;
  --accent-light: #34D399;
  --bg: #FFFFFF;
  --bg-subtle: #F8FAFA;
  --text: #1A3A44;
  --text-muted: #6B8E99;
  --divider: #EEF2F4;
  --border: #DDE4E8;
  --radius: 6px;
  --radius-sm: 4px;
  --phone-width: 375px;
  --nav-height: 44px;
  --tab-height: 50px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #E8ECF0;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-heading {
  font-family: 'Varela Round', sans-serif;
}

/* Phone frame */
.phone-frame {
  width: var(--phone-width);
  min-height: 812px;
  background: var(--bg);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #1E293B;
  border-radius: 0 0 16px 16px;
  z-index: 100;
}

.phone-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 28px;
  overflow: hidden;
}

/* Nav bar */
.nav-bar {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  flex-shrink: 0;
}

.nav-bar .nav-back {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.nav-bar .nav-title {
  font-family: 'Varela Round', sans-serif;
  font-size: 17px;
  font-weight: 600;
}

.nav-bar .nav-action {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
}

/* Page content */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom));
}

.page-content.no-tab {
  padding-bottom: 24px;
}

.page-content > .section:first-child,
.page-content > .baby-header-section:first-child {
  border-top: none;
}

/* Section — flat block with divider, no card box */
.section {
  padding: 16px;
  border-bottom: 8px solid var(--bg-subtle);
}

.section:last-child {
  border-bottom: none;
}

.section-title {
  font-family: 'Varela Round', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: none;
  letter-spacing: 0;
}

/* Legacy .card maps to flat section */
.card {
  padding: 16px;
  border-bottom: 8px solid var(--bg-subtle);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}

.card-title {
  font-family: 'Varela Round', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title svg {
  opacity: 0.6;
}

/* Tab bar */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg);
  border-top: 1px solid var(--divider);
  display: flex;
  z-index: 50;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
}

.tab-item.active {
  color: var(--primary);
}

.tab-item svg {
  width: 22px;
  height: 22px;
}

/* Baby header */
.baby-header-section {
  padding: 20px 16px;
  border-bottom: 8px solid var(--bg-subtle);
}

.baby-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.baby-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.baby-avatar svg {
  width: 28px;
  height: 28px;
  color: white;
}

.baby-info h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 2px;
}

.baby-meta {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Stats — flat inline row */
.stats-grid {
  display: flex;
  justify-content: space-around;
}

.stat-item {
  text-align: center;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.stat-item + .stat-item {
  border-left: 1px solid var(--divider);
  padding-left: 0;
  flex: 1;
}

.stat-value {
  font-family: 'Varela Round', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Timeline — flat list */
.timeline {
  position: relative;
  padding-left: 16px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -16px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
}

.timeline-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.timeline-main {
  flex: 1;
}

.timeline-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.timeline-detail {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-amount {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Legacy timeline-card → flat */
.timeline-card {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.feed-type {
  display: inline;
  font-size: 15px;
  font-weight: 600;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
}

.feed-type.bottle { color: #6366F1; }
.feed-type.pumped { color: #8B5CF6; }
.feed-type.solid { color: var(--accent); }

/* FAB — flat circle */
.fab {
  position: absolute;
  right: 16px;
  bottom: calc(var(--tab-height) + 16px + var(--safe-bottom));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  z-index: 40;
  border: none;
  font-family: inherit;
}

.fab svg {
  width: 24px;
  height: 24px;
}

/* Action Sheet */
.action-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 60;
}

.action-sheet-mask.open {
  opacity: 1;
  visibility: visible;
}

.action-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-subtle);
  border-radius: 12px 12px 0 0;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 70;
  padding-bottom: var(--safe-bottom);
}

.action-sheet.open {
  transform: translateY(0);
}

.action-sheet-panel {
  background: var(--bg);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.action-sheet-title {
  padding: 14px 16px 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
}

.action-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
}

.action-sheet-item:last-of-type {
  border-bottom: none;
}

.action-sheet-item:active {
  background: var(--bg-subtle);
}

.action-sheet-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-sheet-item-icon.breast { background: #FDF2F8; color: #DB2777; }
.action-sheet-item-icon.bottle { background: #EEF2FF; color: #6366F1; }
.action-sheet-item-icon.pumped { background: #F5F3FF; color: #8B5CF6; }
.action-sheet-item-icon.solid { background: #ECFDF5; color: #059669; }

.action-sheet-item-label {
  flex: 1;
  font-weight: 500;
}

.action-sheet-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.action-sheet-cancel {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 15px 16px;
  background: var(--bg);
  border: none;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: center;
}

.action-sheet-cancel:active {
  background: var(--bg-subtle);
}

.phone-screen.sheet-open .page-content {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .action-sheet-mask,
  .action-sheet {
    transition: none;
  }
}

/* Forms — flat, underline style inputs */
.form-section {
  padding: 0 16px;
}

.form-group {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--divider);
}

.form-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--primary);
  box-shadow: none;
}

.form-textarea {
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

/* Buttons — flat */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-block {
  width: calc(100% - 32px);
  margin: 20px 16px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* Segmented — flat tabs */
.segmented {
  display: flex;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 0;
  padding: 0 16px;
  background: none;
  border-radius: 0;
}

.segmented-item {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  border: none;
  background: transparent;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
}

.segmented-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: none;
  box-shadow: none;
}

/* Feed type — flat list */
.feed-type-grid {
  display: flex;
  flex-direction: column;
}

.feed-type-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--divider);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.feed-type-card:last-child {
  border-bottom: none;
}

.feed-type-card:hover {
  background: var(--bg-subtle);
}

.feed-type-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feed-type-icon.breast { background: #FDF2F8; color: #DB2777; }
.feed-type-icon.bottle { background: #EEF2FF; color: #6366F1; }
.feed-type-icon.pumped { background: #F5F3FF; color: #8B5CF6; }
.feed-type-icon.solid { background: #ECFDF5; color: #059669; }

.feed-type-info {
  flex: 1;
}

.feed-type-name {
  font-weight: 600;
  font-size: 15px;
  display: block;
}

.feed-type-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.feed-type-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Timer */
.timer-section {
  padding: 24px 16px;
  text-align: center;
}

.timer-display {
  padding: 20px 0;
}

.timer-value {
  font-family: 'Varela Round', sans-serif;
  font-size: 52px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 1px;
}

.timer-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.breast-selector {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.breast-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-right: 1px solid var(--divider);
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}

.breast-btn:last-child {
  border-right: none;
}

.breast-btn.active {
  background: var(--bg-subtle);
  color: var(--primary);
}

.breast-btn .label {
  font-size: 13px;
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}

.breast-btn .time {
  font-size: 18px;
  font-family: 'Varela Round', sans-serif;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px 0;
}

.timer-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.timer-btn.play {
  background: var(--accent);
  color: white;
}

.timer-btn.stop {
  background: var(--bg-subtle);
  color: #DC2626;
  border: 1px solid var(--divider);
}

.timer-btn svg {
  width: 24px;
  height: 24px;
}

/* Chart */
.chart-container {
  height: 180px;
  position: relative;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Filter tabs — flat underline style */
.filter-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--divider);
  overflow-x: auto;
  padding: 0 16px;
  margin-bottom: 0;
}

.filter-tab {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
}

.filter-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Date range row */
.date-range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 8px solid var(--bg-subtle);
}

/* Record list */
.record-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
}

.record-list-item:last-child {
  border-bottom: none;
}

.record-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.record-info {
  flex: 1;
}

.record-info .title {
  font-weight: 600;
  font-size: 14px;
}

.record-info .detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.record-time {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

/* Profile */
.profile-header {
  text-align: center;
  padding: 28px 16px;
  border-bottom: 8px solid var(--bg-subtle);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar svg {
  width: 38px;
  height: 38px;
  color: white;
}

/* Menu — flat list, no container box */
.menu-list {
  background: none;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 8px solid var(--bg-subtle);
}

.menu-list:last-child {
  border-bottom: none;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 15px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  background: var(--bg);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item svg:first-child {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  margin-right: 12px;
}

.menu-item span {
  flex: 1;
  font-size: 15px;
}

.menu-item .arrow {
  width: 16px;
  height: 16px;
  color: var(--border);
}

/* Avatar upload */
.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  border-bottom: 8px solid var(--bg-subtle);
}

.avatar-upload-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px dashed var(--border);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}

.avatar-upload-btn svg {
  width: 24px;
  height: 24px;
}

.avatar-upload-btn span {
  font-size: 10px;
  margin-top: 4px;
}

/* Gender selector — flat toggle */
.gender-selector {
  display: flex;
  gap: 0;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.gender-option {
  flex: 1;
  padding: 12px;
  border: none;
  border-right: 1px solid var(--divider);
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  font-family: inherit;
}

.gender-option:last-child {
  border-right: none;
}

.gender-option.active {
  background: var(--bg-subtle);
  color: var(--primary);
}

.gender-option .text {
  font-size: 14px;
  font-weight: 500;
}

/* Hint text */
.hint-text {
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* Quick tags */
.amount-quick, .food-tags, .unit-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.amount-btn, .food-tag, .unit-btn {
  padding: 6px 14px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}

.amount-btn.active, .food-tag.active, .unit-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-subtle);
}

/* Prototype gallery */
.gallery {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px;
}

.gallery-header {
  text-align: center;
  margin-bottom: 48px;
}

.gallery-header h1 {
  font-size: 32px;
  color: #1E293B;
  margin-bottom: 8px;
}

.gallery-header p {
  color: #64748B;
  font-size: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(395px, 1fr));
  gap: 40px;
  justify-items: center;
}

.gallery-item h3 {
  font-size: 16px;
  color: #334155;
  margin-bottom: 16px;
}

.gallery-item a {
  text-decoration: none;
  color: inherit;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.nav-links a {
  padding: 8px 16px;
  background: white;
  border-radius: var(--radius);
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--divider);
}

.panel { display: none; }
.panel.active { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 420px) {
  .gallery { padding: 20px 12px; }
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ===== History / 喂奶统计页 ===== */
.category-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--divider);
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  white-space: nowrap;
}

.category-tab.active {
  color: var(--text);
  font-weight: 600;
}

.category-tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.stats-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}

.chart-mode-toggle {
  display: flex;
  background: var(--bg-subtle);
  border-radius: 8px;
  padding: 2px;
}

.chart-mode-btn {
  padding: 6px 12px;
  font-size: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.chart-mode-btn.active {
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-hint {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.bar-chart-wrap {
  display: flex;
  gap: 0;
  padding-left: 4px;
}

.bar-chart-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: 160px;
  padding: 0 6px 22px 0;
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.bar-chart-yaxis .y-unit {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.bar-chart-scroll {
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bar-chart-scroll::-webkit-scrollbar {
  display: none;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 160px;
  min-width: 100%;
  padding-bottom: 22px;
  position: relative;
  border-bottom: 1px solid var(--divider);
}

.bar-chart-grid {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.bar-chart-grid line {
  stroke: var(--divider);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.bar-col {
  flex: 1;
  min-width: 36px;
  max-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.bar-value {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
  min-height: 14px;
}

.bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 4px;
}

.bar-fill {
  width: 14px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  transition: height 0.3s ease, opacity 0.2s;
  min-height: 2px;
}

.bar-col.selected .bar-fill {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-dark) 100%);
}

.bar-col:not(.selected) .bar-fill {
  opacity: 0.75;
}

.bar-label {
  position: absolute;
  bottom: 0;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.bar-col.selected .bar-label {
  color: var(--primary);
  font-weight: 600;
}

.history-detail {
  padding-top: 0;
}

.history-date-header {
  margin-bottom: 12px;
}

.history-date-header .section-title {
  margin-bottom: 4px;
}

.history-date-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.history-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.nav-bar .nav-share {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

