.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 430px;
  margin: 0 auto;
  min-height: calc(var(--tabbar) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--tabbar);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.tabbar a.is-on {
  color: var(--accent);
}

.tabbar svg {
  width: 22px;
  height: 22px;
}

.plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.plan-row .amt {
  font-weight: 600;
}

.plan-row.is-done {
  color: var(--muted);
}

.plan-row.is-done .amt {
  text-decoration: line-through;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}

.dot--open {
  background: var(--accent);
}

.dot--done {
  background: var(--good);
}

.legend {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.legend-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  color: var(--ink-soft);
}

.swatch {
  width: 18px;
  height: 3px;
  margin-top: 8px;
  border-radius: 2px;
}

.swatch--never {
  background: var(--warn);
}

.swatch--plan {
  background: var(--accent);
}

.swatch--actual {
  background: var(--good);
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-tick {
  fill: var(--muted);
  font-size: 9px;
  font-family: var(--font-sans);
}

.chart-never {
  stroke: var(--warn);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.chart-plan {
  stroke: var(--accent);
  stroke-width: 2.5;
}

.chart-actual {
  stroke: var(--good);
  stroke-width: 2.5;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 20;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(20px + var(--safe-bottom));
  box-shadow: var(--shadow-sheet);
  z-index: 21;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  margin: 4px auto 16px;
  border-radius: 4px;
  background: var(--line);
}

.sheet h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.receipt {
  padding-top: 24px;
}

.receipt .hero-leftover {
  color: var(--good);
}

.gear {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}

.banner {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--warn-soft);
  color: var(--ink-soft);
  font-size: 14px;
  margin: 12px 0;
}

.review-line {
  margin: 0 0 12px;
  font-size: 17px;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.header-row h1 {
  flex: 1;
  min-width: 0;
  margin: 0 0 12px;
  font-size: 24px;
}

textarea.field {
  min-height: 140px;
  resize: vertical;
}

.step-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
