/* ------------------------------------------------------------------
   Aussehen des Winter Arc. Grundbausteine (Karten, Knöpfe, Tabs, Listen)
   kommen aus styles.css und lernplan.css, hier steht nur, was neu ist.
------------------------------------------------------------------ */

.tabs-4 { grid-template-columns: repeat(4, 1fr); }

/* Kopfkarte: Tag x von y, Fortschritt, Streak */
.hero {
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card) 70%);
}
.hero-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero .stat { font-size: 34px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.hero-stats div { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.hero-stats b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.hero-stats small { color: var(--muted); font-size: 12px; }

/* Tagesauswahl */
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-nav b { font-size: 16px; text-align: center; flex: 1; }
.day-nav .mini:disabled { opacity: .35; cursor: default; }
.nudge { border-color: var(--warn); color: var(--warn); }

/* Gewohnheiten */
.habit { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.habit:last-child { border-bottom: none; }
.habit .ico { font-size: 22px; text-align: center; }
.habit .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.habit .ctrl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.habit .minutes { width: 84px; text-align: right; padding: 7px 8px; }
.tog {
  border: 1px solid var(--border); background: transparent; color: var(--text);
  border-radius: 10px; padding: 8px 11px; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.tog.on { background: color-mix(in srgb, var(--ok) 20%, transparent); border-color: var(--ok); color: var(--ok); }
.tog.off { background: color-mix(in srgb, var(--bad) 16%, transparent); border-color: var(--bad); color: var(--bad); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.dim { background: var(--bg); color: var(--muted); }

/* Wochenziele */
.goal { display: grid; grid-template-columns: 26px 1fr 70px; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; }
.goal b { text-align: right; font-variant-numeric: tabular-nums; }
.goal .track i { background: var(--accent); }
.goal.met .track i { background: var(--ok); }
.week-list .item { justify-content: space-between; }

/* Verlauf: ein Kästchen pro Tag, eine Zeile pro Woche */
.heat { display: grid; gap: 4px; }
.heat-row { display: grid; grid-template-columns: 44px repeat(7, 1fr); gap: 4px; align-items: center; }
.heat-row span:first-child { font-size: 11px; color: var(--muted); }
.cell { padding: 0; aspect-ratio: 1; border-radius: 5px; background: var(--bg); border: 1px solid var(--border); position: relative; max-height: 34px; }
button.cell:not(:disabled) { cursor: pointer; }
.cell.done { background: var(--ok); border-color: var(--ok); }
.cell.partial { background: color-mix(in srgb, var(--warn) 55%, var(--bg)); border-color: var(--warn); }
.cell.missed { background: color-mix(in srgb, var(--bad) 45%, var(--bg)); border-color: var(--bad); }
.cell.none { background: color-mix(in srgb, var(--muted) 18%, var(--bg)); }
.cell.open:not(.today) { border: 1px dashed var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--bg)); } /* vergessen einzutragen */
.cell.out { visibility: hidden; }
.cell.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.heat-row .cell { justify-self: center; width: 100%; max-width: 34px; }
.cell.done.trained::after { background: var(--bg); opacity: 1; }
.cell.trained::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--text); opacity: .8; }
.heat-head { font-size: 11px; color: var(--muted); text-align: center; }
.legend-row { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 10px; align-items: center; }
.legend-row .cell { width: 14px; display: inline-block; vertical-align: middle; margin-right: 4px; }
.numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.numbers div { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.numbers b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.numbers small { color: var(--muted); font-size: 12px; }

/* Einstellungen: eine Gewohnheit pro Block */
.habit-set { border-bottom: 1px solid var(--border); padding: 12px 0; }
.habit-set:last-of-type { border-bottom: none; }
.habit-set .set { margin-top: 10px; }
.wd { display: flex; flex-wrap: wrap; gap: 6px; }
.wd label { display: flex !important; align-items: center; gap: 4px; color: var(--text) !important; font-size: 13px !important; }
.wd input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Einstellen direkt von "Heute" aus */
.gear { padding: 6px 8px; color: var(--muted); }
.time-in { width: 108px; padding: 7px 6px; }
.banner { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--card)); font-size: 14px; line-height: 1.45; }
.banner b { color: var(--warn); }
.reward { margin: 12px 0 0; font-size: 14px; }
.day-note { min-height: 80px; resize: vertical; font-family: inherit; line-height: 1.45; }

/* Einstellungen: Gewohnheiten zum Aufklappen, Listen für Belohnungen und Messwerte */
.habit-sum {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 0;
  background: none; border: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.habit-sum .ico { font-size: 22px; width: 34px; text-align: center; }
.habit-sum .grow { flex: 1; min-width: 0; }
.habit-sum .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.habit-sum .chev { color: var(--muted); }
.habit-set.off .habit-sum { opacity: .55; }
.habit-set > .set, .habit-set > p, .habit-set > .btn-row { margin-top: 10px; }
.row-set { display: grid; align-items: end; gap: 8px; margin: 8px 0; }
.reward-row { grid-template-columns: 72px minmax(0, 1fr) 26px auto; }
.field-row { grid-template-columns: minmax(0, 1fr) 76px auto auto; }
.row-set label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.row-set .input { min-width: 0; }
.row-set .mini { padding: 9px 9px; }
.days-in { max-width: 90px; }
.unit-in { max-width: 100px; }
.habit b, .habit .meta, .habit-sum b, .habit-sum .meta { overflow-wrap: anywhere; } /* lange Wörter brechen um statt die Seite zu verbreitern */
/* Andere Uhrzeit an einzelnen Wochentagen */
.day-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 6px; }
.day-times .row { gap: 6px; align-items: center; }
.day-times .input { min-width: 0; padding: 7px 6px; }

/* Wochenrückblick */
.review-score { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.review-score span { flex-basis: 100%; font-size: 14px; }
.review-score .tog { flex: 1; min-width: 0; max-width: 64px; text-align: center; }
.review-q { display: grid; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 600; }
.review-q .day-note { min-height: 64px; font-weight: 400; }
.row-end { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.focus { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.4;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg)); overflow-wrap: anywhere; }
