*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #b0ad9a;
  --surface: #eee9df;
  --surface2: #e4dfd4;
  --border: #d5d0c4;
  --text: #2a2a26;
  --text2: #7a7868;
  --accent: #d96b4f;
  --accent2: #c45a3f;
  --green: #6b8f71;
  --green-light: #e8f0e8;
  --gold: #c4a035;
  --radius: 20px;
  --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow-x: hidden;
}

/* Barcode decoration */
.barcode {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 28px;
  opacity: 0.25;
}

.barcode span {
  display: block;
  width: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header h1 span { color: var(--accent); }

.header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  background: var(--surface);
  border: none;
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.15s;
}

.icon-btn:active { background: var(--surface2); }

.dots-icon {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  gap: 3px;
}

.dots-icon span {
  width: 5px;
  height: 5px;
  background: var(--text);
  border-radius: 50%;
}

/* Nav */
.nav {
  display: flex;
  gap: 6px;
  padding: 6px 20px 10px;
  background: var(--bg);
}

.nav-btn {
  flex: 1;
  padding: 10px 8px;
  background: var(--surface);
  border: none;
  border-radius: 12px;
  color: var(--text2);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.nav-btn.active {
  background: var(--accent);
  color: #fff;
}

/* Pages */
.page { display: none; padding: 16px 20px; padding-bottom: 100px; }
.page.active { display: block; }

/* Workout Page */
.workout-header {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.workout-header .barcode-deco {
  position: absolute;
  right: 20px;
  bottom: 20px;
}

.workout-day-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text2);
  font-weight: 700;
}

.workout-title {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -1px;
}

.workout-title .decimal {
  font-weight: 300;
  opacity: 0.4;
}

.workout-date {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Day Selector */
.day-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.day-btn {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.day-btn .day-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 0.58rem;
  color: var(--text2);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.day-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.day-btn.active .day-label { color: rgba(255,255,255,0.7); }

.day-btn.done {
  border-color: var(--green);
}

.day-btn.done::after {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-top: 3px;
}

/* Exercise Card */
.exercise-card {
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.exercise-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exercise-name {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.2px;
}

.exercise-muscle {
  font-size: 0.65rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 3px;
  font-weight: 600;
}

.exercise-status {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.exercise-status.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.exercise-body {
  padding: 0 20px 20px;
}

.set-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
  background: var(--surface2);
  border-radius: 14px;
}

.set-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text2);
  text-transform: uppercase;
  width: 50px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.set-label small {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
  letter-spacing: 0;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.input-group label {
  font-size: 0.65rem;
  color: var(--text2);
  width: 22px;
  text-align: right;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.set-input {
  width: 64px;
  padding: 8px 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.set-input::-webkit-inner-spin-button,
.set-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.set-input:focus {
  outline: none;
  border-color: var(--accent);
}

.set-check {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.set-check.checked {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.previous-weight {
  font-size: 0.7rem;
  color: var(--text2);
  padding: 0 14px 8px;
  font-weight: 500;
}

.previous-weight strong {
  color: var(--text);
  font-family: var(--font-mono);
}

/* Tempo Reminder */
.tempo-bar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.tempo-icon {
  width: 36px;
  height: 36px;
  background: var(--surface2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tempo-text {
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.4;
}

.tempo-text strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Finish / Action Buttons */
.finish-btn {
  display: block;
  width: 100%;
  padding: 18px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 20px;
  transition: opacity 0.15s;
}

.finish-btn:active { opacity: 0.8; }
.finish-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Accent bar section (coral) */
.accent-bar {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accent-bar .accent-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  opacity: 0.85;
}

.accent-bar .accent-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
}

.accent-bar .accent-arrow {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* History Page */
.history-week {
  margin-bottom: 24px;
}

.history-week-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text2);
  margin-bottom: 10px;
  font-weight: 700;
}

.history-entry {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.history-entry .barcode-deco {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.history-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-entry-day {
  font-weight: 700;
  font-size: 0.9rem;
}

.history-entry-date {
  font-size: 0.72rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-entry-stats {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text2);
}

.history-entry-stats span strong {
  color: var(--text);
  font-family: var(--font-mono);
}

/* Stats Page */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.stat-card .barcode-deco {
  position: absolute;
  right: 16px;
  bottom: 16px;
}

.stat-card h3 {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text2);
  margin-bottom: 12px;
  font-weight: 700;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child { border-bottom: none; }

.stat-exercise { font-size: 0.88rem; font-weight: 500; }

.stat-value {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
}

.stat-change {
  font-size: 0.72rem;
  margin-left: 6px;
  font-weight: 600;
}

.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--accent); }

.stat-big {
  text-align: center;
  padding: 16px;
}

.stat-big .number {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -2px;
}

.stat-big .number .decimal {
  font-weight: 300;
  opacity: 0.35;
}

.stat-big .label {
  font-size: 0.7rem;
  color: var(--text2);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Protein Page */
.protein-ring {
  width: 190px;
  height: 190px;
  margin: 24px auto;
  position: relative;
}

.protein-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.protein-ring circle {
  fill: none;
  stroke-width: 8;
}

.protein-ring .ring-bg { stroke: var(--border); }

.protein-ring .ring-fill {
  stroke: var(--green);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.protein-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.protein-center .amount {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -2px;
}

.protein-center .goal {
  font-size: 0.78rem;
  color: var(--text2);
  font-weight: 600;
}

.protein-meals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.meal-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.meal-card.filled {
  border-left: 3px solid var(--green);
}

.meal-card .meal-label {
  font-size: 0.62rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.meal-card .meal-amount {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -1px;
}

.meal-card .meal-unit {
  font-size: 0.65rem;
  color: var(--text2);
  font-weight: 500;
}

.quick-add {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-add-btn {
  padding: 10px 18px;
  background: var(--surface);
  border: none;
  border-radius: 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-add-btn:active {
  background: var(--accent);
  color: #fff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal h2 {
  font-size: 1.1rem;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
}

.modal-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.modal-input:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.modal-actions button {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-cancel {
  background: var(--surface2);
  color: var(--text);
}

.modal-confirm {
  background: var(--accent);
  color: #fff;
}

/* Summary Modal */
.summary-stat {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.summary-stat:last-child { border-bottom: none; }

.summary-stat .label {
  color: var(--text2);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.summary-stat .value {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
}

.summary-prs {
  margin-top: 14px;
  padding: 14px;
  background: rgba(196, 160, 53, 0.12);
  border-radius: 14px;
}

.summary-prs h4 {
  color: var(--gold);
  font-size: 0.8rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-prs p {
  font-size: 0.82rem;
  color: var(--text);
  font-family: var(--font-mono);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text2);
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Rest timer toast */
.rest-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border-radius: 18px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 150;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.rest-toast.visible {
  opacity: 1;
  pointer-events: auto;
}

.rest-toast .rest-time {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  min-width: 55px;
  text-align: center;
  letter-spacing: -1px;
}

.rest-toast .rest-label {
  font-size: 0.65rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.rest-toast button {
  padding: 8px 14px;
  background: var(--surface2);
  border: none;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* History detail */
.history-detail-exercises {
  margin-top: 14px;
}

.history-exercise {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.history-exercise:last-child { border-bottom: none; }

.history-exercise-name {
  font-weight: 700;
  font-size: 0.88rem;
}

.history-sets {
  display: flex;
  gap: 14px;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--text2);
  font-family: var(--font-mono);
}

/* Divider line like in reference */
.divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Secondary btn */
.secondary-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.15s;
}

.secondary-btn:active { opacity: 0.7; }

/* Week Picker — 7-day horizontal strip */
.week-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.week-arrow {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.week-arrow:disabled {
  opacity: 0.2;
  cursor: default;
}

.week-arrow:active:not(:disabled) {
  background: var(--surface2);
}

.week-picker {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: space-between;
}

.week-day {
  flex: 1;
  text-align: center;
  padding: 8px 2px 10px;
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.15s;
}

.week-day:active:not(.future) {
  transform: scale(0.95);
}

.week-day.today {
  outline: 2px solid var(--text2);
}

.week-day.selected {
  background: var(--accent);
}

.week-day.selected .week-day-name,
.week-day.selected .week-day-num {
  color: #fff;
}

.week-day.selected .week-day-tag {
  color: rgba(255,255,255,0.8);
}

.week-day.done:not(.selected) {
  background: var(--green-light);
}

.week-day.future {
  opacity: 0.3;
  cursor: default;
}

/* Backdate banner */
.backdate-banner {
  background: rgba(217, 107, 79, 0.12);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.backdate-banner button {
  background: var(--surface);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.week-day-name {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
  font-weight: 700;
}

.week-day-num {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.week-day-tag {
  font-size: 0.5rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Exercise Cue */
.exercise-cue {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  padding: 0 14px 6px;
  font-style: italic;
}

/* Progress Hint */
.progress-hint {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  margin: 0 0 8px 0;
}

.progress-hint.progress-up {
  background: rgba(107, 143, 113, 0.15);
  color: var(--green);
}

.progress-hint.progress-tempo {
  background: rgba(217, 107, 79, 0.12);
  color: var(--accent);
}

/* Summary Progress */
.summary-progress {
  margin-top: 14px;
  padding: 14px;
  background: rgba(107, 143, 113, 0.12);
  border-radius: 14px;
}

.summary-progress h4 {
  color: var(--green);
  font-size: 0.8rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-progress p {
  font-size: 0.78rem;
  color: var(--text);
  margin-top: 4px;
}

/* ---- Reports / Charts ---- */

/* Range selector active state */
.range-active {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Vertical bar chart */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  padding: 8px 0;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(to top, var(--accent), var(--accent2));
  border-radius: 6px 6px 0 0;
  min-height: 3px;
  transition: height 0.4s ease;
}

.chart-bar-value {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text2);
  margin-bottom: 4px;
}

.chart-bar-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* Sparkline rows */
.spark-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.spark-row:last-child { border-bottom: none; }

.spark-info {
  flex: 1;
  min-width: 0;
}

.spark-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spark-detail {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text2);
  margin-top: 2px;
}

.sparkline {
  width: 80px;
  height: 32px;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Frequency grid (dot calendar) */
.freq-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.freq-dot {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  font-weight: 800;
  color: transparent;
  transition: all 0.15s;
}

.freq-dot.active {
  background: var(--green);
  color: #fff;
}

/* Horizontal bar chart */
.hbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hbar-label {
  font-size: 0.75rem;
  font-weight: 600;
  width: 80px;
  flex-shrink: 0;
  text-align: right;
}

.hbar-track {
  flex: 1;
  height: 20px;
  background: var(--surface2);
  border-radius: 10px;
  overflow: hidden;
}

.hbar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--green), #8ab87e);
  border-radius: 10px;
  transition: width 0.5s ease;
  min-width: 4px;
}

.hbar-value {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text2);
  width: 36px;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .page { max-width: 480px; margin: 0 auto; }
  .header, .nav { max-width: 480px; margin: 0 auto; }
}
