/* Screen-specific styles: workout, food, progress, more. */

/* ===== Workout ===== */
.week { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.warm ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.warm label { display: flex; gap: 12px; align-items: center; padding: 7px 0; cursor: pointer; }
.warm input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }

.ex-head {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}
.ex-num { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--accent-ink); min-width: 1.5em; flex: none; }
.thumb { width: 64px; height: 43px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.ex-title { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-name { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.1; }
.last { font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ss-label { font-size: 0.88rem; color: var(--muted); padding: 2px 4px 0; }
.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 62ch; }

/* ===== Food ===== */
.date-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.date-nav .eyebrow { text-align: center; flex: 1; }
.summary { gap: 12px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transition: width 0.3s; }
.bar.full i { background: var(--ok); }
.bar.kcal i { background: var(--muted); }
.bar.over i { background: var(--over); }
.spent { font-size: 0.95rem; }
.tip { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 0.9rem; display: flex; flex-direction: column; gap: 4px; }
.tip ul { margin: 0; padding-left: 1.1rem; }
.tip.ok { color: var(--ok); font-weight: 650; }
.meal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.meal-head h2 { font-size: 1.45rem; }
.entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.entry {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}
.entry-name { font-weight: 650; }
.sub-head { font-size: 0.92rem; }
.preset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.preset.better { border-color: var(--accent); }
.preset-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.preset-name { font-weight: 650; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn-add {
  appearance: none;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  cursor: pointer;
}
.tip-line { font-size: 0.86rem; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 10px; }

/* food sheets */
.pick-row {
  appearance: none;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: pointer;
}
.pick-name { font-weight: 650; }
.edit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.edit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.edit-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}
.stepper output { min-width: 2.6em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.edit-total { font-size: 0.95rem; }

/* ===== Progress ===== */
.checkin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.checkin .btn-main { grid-column: 1 / -1; }
.big-change { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1.1; }
.big-change .meta { font-family: var(--font-body); font-weight: 400; font-size: 0.88rem; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats3 > div { display: flex; flex-direction: column; gap: 2px; }
.stats3 b { font-family: var(--font-display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid, .chart .base { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: var(--accent); opacity: 0.12; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); }
.chart .dot.last { stroke: var(--surface); stroke-width: 2.5; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .bar-fill { fill: var(--accent); opacity: 0.45; }
.chart .bar-fill.reached { fill: var(--ok); opacity: 1; }
.chart .target { stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 5 4; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.log li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.log li:first-child { border-top: 0; }

/* ===== More ===== */
.install { border-color: var(--accent); }
.price-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; }
.price-list li { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.price-list label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.price-list .input.price { text-align: right; font-variant-numeric: tabular-nums; }
.sched { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sched th, .sched td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sched thead th { font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; }
.sched tbody th { color: var(--muted); font-weight: 650; white-space: nowrap; }

/* ===== Today ===== */
.today-card { gap: 12px; }
.today-big { font-size: 2.6rem; }
.food-today { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
.food-nums { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.today-left { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.ring { width: 120px; height: 120px; display: block; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray 0.4s; }
.ring-fg.full { stroke: var(--ok); }
.ring-num { fill: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 34px; }
.ring-unit { fill: var(--muted); font-family: var(--font-body); font-size: 12px; }
.next-meal { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.next-meal h3 { color: var(--accent-ink); }
.big-preset { display: flex; flex-direction: column; gap: 4px; border: 1.5px solid var(--accent); border-radius: 12px; padding: 12px; }
.big-preset .btn-main { margin-top: 8px; }
.checkin-due { border-color: var(--accent); }

/* ===== Workout focus mode ===== */
.wk-head { display: flex; flex-direction: column; gap: 12px; }
.wk-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wk-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.seg-btn {
  appearance: none;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  min-height: 38px;
  padding: 0 8px;
  font-weight: 650;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.seg-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.seg-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.seg-next { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 1px 6px; }
.wk-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.wk-progress .meta, .today-card .meta { font-variant-numeric: tabular-nums; }
.pills { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.pill-step {
  appearance: none;
  flex: 1 0 auto;
  min-width: 40px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.pill-step.done { background: var(--surface-2); border-color: transparent; color: var(--ok); }
.pill-step.current { border: 2px solid var(--accent); color: var(--ink); background: var(--surface); }

.step-card { gap: 12px; }
.step-name { font-size: 1.9rem; }
.anim.loop .f1 { animation: flip 2.6s infinite; }
.anim.loop.paused .f1 { animation-play-state: paused; }
@keyframes flip { 0%, 42% { opacity: 0; } 50%, 92% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .anim.loop .f1 { animation: none; opacity: 0; } }

.done-rows { display: flex; flex-direction: column; gap: 6px; }
.done-row {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: var(--surface-2);
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.done-row .check { color: var(--ok); font-weight: 700; font-size: 1.1rem; }
.all-done { color: var(--ok); font-weight: 700; font-size: 1.05rem; }

.cur { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--accent); border-radius: 14px; padding: 12px; }
.cur-label { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.03em; }
.cur-note { font-size: 0.88rem; color: var(--ok); font-weight: 600; }
.cur-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 10px; }
.num-step { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; align-items: center; }
.adj {
  appearance: none;
  height: 56px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.adj:active { background: var(--surface-2); }
.num-field { position: relative; display: block; min-width: 0; }
.num-field input {
  width: 100%;
  height: 56px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  font-variant-numeric: tabular-nums;
  padding: 0 4px 12px;
}
.num-field input:focus { outline: none; border-color: var(--accent); }
.num-field span { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font-size: 0.68rem; color: var(--muted); pointer-events: none; }
.done-set { min-height: 58px; }

.ss-item { display: flex; flex-direction: column; gap: 10px; border-top: 2px dashed var(--line); padding-top: 12px; }
.thumb.big { width: 96px; height: 64px; }

.step-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.step-nav .btn-main { font-size: 1.05rem; min-height: 50px; padding: 0 12px; }
.step-nav .btn-sec { min-height: 50px; }

.finish-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.finish-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.finish-list b { font-variant-numeric: tabular-nums; }

.done-card { align-items: center; text-align: center; gap: 14px; padding: 28px 16px; }
.big-check {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 3rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.done-card .btn-main { align-self: stretch; }

/* ===== Streaks, records, review, celebration ===== */
.streaks { display: flex; flex-wrap: wrap; gap: 8px; }
.streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  font-size: 0.88rem;
}
.streak.big { font-size: 1.05rem; padding: 6px 16px; }
.records { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.records li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); align-items: start; font-variant-numeric: tabular-nums; }
.new-records { align-self: stretch; text-align: left; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 12px; }
.new-records h3 { color: var(--accent-ink); }
.big-check.pop { animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.review-grid > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.review-grid b { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.review .tip .btn-sec { align-self: flex-start; margin-top: 6px; }
.per-side { font-weight: 700; color: var(--accent-ink); text-align: center; font-variant-numeric: tabular-nums; }
.backup-card { border-color: var(--warn); }

/* ===== Progress dashboard ===== */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tile b { font-family: var(--font-display); font-size: 1.75rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.streak-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 6px 0; }
.streak-num { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--accent-ink); font-variant-numeric: tabular-nums; min-width: 3.2ch; }
.streak-label { display: flex; flex-direction: column; font-weight: 650; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-wd { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.cal-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  border: 2px solid transparent;
}
.cal-cell.done { background: var(--accent); color: var(--on-accent); }
.cal-cell.missed { border: 2px dashed var(--over); color: var(--over); }
.cal-cell.today { border-color: var(--accent); }
.cal-cell.rest { background: var(--surface-2); color: var(--muted); }
.cal-cell.future, .cal-cell.before { color: var(--muted); opacity: 0.45; }
.cal-cell.is-today { box-shadow: 0 0 0 2px var(--ink); }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.cal-cell .cal-dot { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; }
.cal-dot.hit { background: var(--ok); }
.cal-dot.short { background: var(--warn); }
.cal-cell.done .cal-dot { box-shadow: 0 0 0 1.5px var(--surface); }
.legend { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 2px solid transparent; }
.lg.done { background: var(--accent); }
.lg.missed { border: 2px dashed var(--over); }
.lg.rest { background: var(--surface-2); }
