#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.noscript { padding: 2rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }

.meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--dim);
  letter-spacing: 0.02em;
}

/* ===== Login / error screen ===== */

.auth-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  gap: 0.25rem;
}

.auth-screen h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.auth-screen p { margin: 0.25rem 0; color: var(--muted); }
.auth-screen .meta { margin-top: 1.5rem; }

.btn-primary {
  margin-top: 1.5rem;
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--heat-3), var(--heat-12));
  color: #0a0b10;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.btn-primary:active { filter: brightness(0.92); }

/* ===== Tabs ===== */

.tabs {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem;
  margin: 0.85rem auto 0;
  max-width: 500px;
  width: calc(100% - 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.55rem 0.5rem;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  -webkit-tap-highlight-color: transparent;
}

.tab.active {
  background: var(--surface-2);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tab:not(.active):active { color: var(--fg); }

/* ===== Stage (main content) ===== */

.stage {
  flex: 1;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 1rem 1rem 5rem;
}

.empty {
  padding: 2rem 0.5rem;
  text-align: center;
  line-height: 1.55;
  color: var(--muted);
}

.empty p { margin: 0.25rem 0; }

/* ===== Today header ===== */

.day-header { padding: 0.5rem 0 1.25rem; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--heat-3), var(--heat-9));
  box-shadow: 0 0 10px rgba(232, 86, 124, 0.55);
}

.day-nav { display: flex; align-items: center; gap: 0.55rem; }

.nav-btn {
  width: 2.5rem; height: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 10px;
  font-size: 1.1rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.nav-btn:not(:disabled):active { border-color: var(--accent-cool); }
.nav-btn:disabled { color: var(--dim); opacity: 0.35; cursor: default; }

.date-stack { text-align: center; flex: 1; }

.date-stack h1 {
  font-size: clamp(1.1rem, 4.8vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.today-tag {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 9.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.2em;
  color: var(--accent-cool);
  text-transform: uppercase;
}

.today-tag.muted { color: var(--dim); }

/* ===== Plan items ===== */

.plan-items { display: block; }

.ex {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.25s;
}

.ex.done { border-color: rgba(220, 38, 38, 0.45); }

.ex-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.ex-title { font-size: 1rem; font-weight: 600; color: var(--fg); }

.ex-spec {
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}


.ex-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ex-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

.ex.done .ex-count { color: var(--heat-12); }

/* Compact override of .shell-btn-primary used inside .ex.
 * Color comes from --btn-color set per-instance by app.js (heatColor). */
button.tap {
  padding: 0.55rem 1.05rem;
  font-size: 0.92rem;
  min-width: 4.25rem;
}
button.tap:active { transform: scale(0.95); }
button.tap:disabled { opacity: 0.35; cursor: default; }
button.tap:disabled:active { transform: none; }

/* ===== Stage-pass section ===== */

.stage-section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
}

.stage-section h2 {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.7rem;
  text-align: center;
  font-weight: 600;
}

.track-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}

.track-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.track-name { font-size: 0.92rem; font-weight: 600; color: var(--fg); }

.track-stage {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.pass-btn {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  color: var(--accent-cool);
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s, color 0.18s;
}

.pass-btn:active {
  border-color: var(--accent-cool);
  border-style: solid;
  color: var(--fg);
}

.pass-btn:disabled { opacity: 0.45; cursor: default; }

/* ===== Project view: weekly grid ===== */

.grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.55rem 0.5rem;
}

.grid-row {
  display: grid;
  grid-template-columns: 3.2rem repeat(7, 1fr);
  gap: 2px;
  align-items: center;
}

.grid-row + .grid-row { margin-top: 2px; }

.grid-head {
  margin-bottom: 0.3rem;
  padding: 0 0 0.3rem;
  border-bottom: 1px solid var(--line);
}

.grid-date {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  color: var(--dim);
  letter-spacing: 0.04em;
  padding-left: 0.25rem;
}

.grid-day {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--dim);
  text-align: center;
  text-transform: uppercase;
}

.grid-cell {
  position: relative;
  height: 2.1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Intensity fill: gradient from purple → orange revealed by --pct.
   --pct = 0 means the gradient is fully transparent; --pct = 1 means
   it covers the cell at full opacity. */
.grid-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--heat-3), var(--heat-12));
  opacity: calc(var(--pct, 0) * 0.92);
  transition: opacity 0.2s;
}

.grid-cell.today { border-color: var(--accent-cool); box-shadow: 0 0 0 1px var(--accent-cool); }
.grid-cell.future { opacity: 0.4; }

.legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

/* ===== Settings ===== */

.subnav {
  display: flex;
  gap: 0.4rem;
  margin: 0.5rem 0 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.subnav::-webkit-scrollbar { display: none; }

.subnav-item {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.subnav-item.active {
  background: linear-gradient(135deg, var(--heat-3), var(--heat-12));
  color: #0a0b10;
  border-color: transparent;
  font-weight: 700;
}

.settings-head { padding: 0.25rem 0 1rem; }

.settings-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--fg);
  margin-top: 0.4rem;
}

.settings-body { display: block; }

.settings-raw {
  margin-top: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.settings-raw summary {
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
}

.settings-raw[open] summary { margin-bottom: 0.55rem; }

.json {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  background: #06070c;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.5;
}

.markdown-body {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  white-space: pre-wrap;
  line-height: 1.55;
  overflow-x: auto;
}

.md-editor {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  resize: vertical;
  min-height: 16rem;
  -webkit-tap-highlight-color: transparent;
}

.md-editor:focus {
  outline: none;
  border-color: var(--accent-cool);
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.body-warn {
  font-size: 0.78rem;
  margin: 0 0 0.5rem;
  padding: 0.45rem 0.6rem;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  color: var(--heat-12);
}

.updated {
  margin-top: 0.5rem;
  text-align: right;
}

/* Plan week navigation */

.plan-week-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.plan-week-title {
  flex: 1;
  margin: 0;
  text-align: center;
}

.plan-week-arrow {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.2rem 0.6rem;
  min-width: 2.25rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.plan-week-arrow:hover:not(:disabled) { filter: brightness(1.08); }
.plan-week-arrow:active:not(:disabled) { filter: brightness(0.92); }

.plan-week-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Generate plan card */

.generate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.generate-card-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.generate-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
}

.generate-card-target {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.generate-btn {
  margin-top: 0;
  align-self: stretch;
  text-align: center;
}

.generate-btn:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: progress;
}

.generate-error {
  font-size: 0.78rem;
  color: #fca5a5;
  margin: 0;
  padding: 0.45rem 0.6rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
}

.generate-ok {
  font-size: 0.78rem;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.generate-summary-wrap { display: flex; flex-direction: column; gap: 0.35rem; }

.generate-summary {
  margin: 0;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.generate-inputs {
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  background: var(--surface-2, transparent);
}

.generate-inputs > summary {
  cursor: pointer;
  font-size: 0.78rem;
  padding: 0.1rem 0;
  user-select: none;
}

.generate-inputs-section {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.generate-inputs-h {
  font-size: 0.72rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
}

.generate-inputs-pre {
  margin: 0;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 12rem;
  overflow: auto;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
}

.generate-context-label {
  font-size: 0.78rem;
  margin-bottom: -0.25rem;
}

.generate-context {
  width: 100%;
  resize: vertical;
  min-height: 3rem;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2, var(--surface));
  color: var(--fg);
  box-sizing: border-box;
}

.generate-context:disabled { opacity: 0.6; cursor: progress; }

.generate-done { display: flex; flex-direction: column; gap: 0.35rem; }

.generate-rationale {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.generate-rationale-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 0.35rem;
}

/* Plan summary */

.plan-summary { display: block; }

.plan-day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.5rem;
}

.plan-day-h {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.plan-day-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan-day-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.86rem;
}

.plan-entry-name { color: var(--fg); }

.plan-entry-spec {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.legend-scale {
  flex: 0 1 9rem;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface), var(--heat-3), var(--heat-12));
  border: 1px solid var(--line);
}

/* ===== Stages tab ===== */

.stages-list { display: block; }

.stage-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  margin-bottom: 0.6rem;
}

.stage-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.stage-card-name { font-size: 1rem; font-weight: 600; color: var(--fg); }

.stage-card-pos {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Goal cards */

.goal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}

.goal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.goal-card-name { font-size: 0.95rem; font-weight: 600; color: var(--fg); }

.goal-card-status {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok);
}

.goal-card-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.goal-card-tracks {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
}

.goal-card-tracks li {
  font-size: 0.8rem;
  padding: 0.2rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.goal-card.editing { border-color: rgba(96, 165, 250, 0.45); }

.status-active { color: var(--ok); }
.status-met { color: var(--heat-12); }
.status-archived { color: var(--dim); }

.list-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.85rem;
}

.add-btn { margin-top: 0; }

.card-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  margin-top: 0.55rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

.shell-btn-secondary.btn-danger { color: #fca5a5; }
.shell-btn-secondary.btn-danger:hover {
  border-color: rgba(239, 68, 68, 0.45);
  color: var(--danger);
}
.shell-btn-secondary.btn-danger:active { color: var(--danger); }

/* Forms inside cards */

.form-title {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-cool);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
}

.form-field:last-child { margin-bottom: 0; }

.form-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.form-field input[type="text"],
.form-field input[type="date"],
.form-field select {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-family: inherit;
  font-size: 0.88rem;
  -webkit-tap-highlight-color: transparent;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent-cool);
}

.json-editor {
  font-size: 0.78rem;
  min-height: 7rem;
}

/* Track cards */

.track-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}

.track-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.track-card-name { font-size: 0.95rem; font-weight: 600; color: var(--fg); }

.track-card-slug {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.track-card-meta {
  font-size: 0.72rem;
  margin: 0.1rem 0 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.track-stages summary {
  cursor: pointer;
  color: var(--accent-cool);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.track-stages[open] summary { margin-bottom: 0.45rem; }

.track-stage-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.8rem;
  line-height: 1.5;
}

.track-stage-list li { padding: 0.15rem 0; }

.stage-test { color: var(--fg); }

.stage-ex {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.track-card.editing { border-color: rgba(96, 165, 250, 0.45); }

.stage-card-next, .stage-card-last {
  font-size: 0.78rem;
  margin-top: 0.4rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
}

.stage-card-last { color: var(--dim); font-size: 0.7rem; }

.ladder {
  width: 100%;
  height: auto;
  display: block;
  margin: 0.25rem 0 0.1rem;
}

.ladder-line {
  stroke: var(--line);
  stroke-width: 1.5;
}

.ladder-dot {
  fill: var(--surface-2);
  stroke: var(--line);
  stroke-width: 1.5;
}

.ladder-dot.done {
  fill: var(--heat-12);
  stroke: var(--heat-12);
}

.ladder-dot.next {
  fill: var(--surface-2);
  stroke: var(--accent-cool);
  stroke-width: 2;
}

.ladder-num {
  fill: var(--dim);
  font: 600 7px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
}

/* ===== Footer ===== */

.appfoot {
  padding: 1rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.appfoot .meta { margin: 0; }

/* ===== Toast ===== */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 10px);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  z-index: 200;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.toast-error { border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.toast-success { border-color: rgba(34, 197, 94, 0.4); color: #86efac; }
.toast-info { color: var(--fg); }

/* ===== DESKTOP (>=900px) ===== */
@media (min-width: 900px) {
  .tabs,
  .stage {
    max-width: 760px;
  }

  /* Weekly grid cells were sized for the 500px container; with more
     room each cell can be a touch taller so the heatmap reads better. */
  .grid-cell { height: 2.6rem; }
}
