:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --text: #1d1f1c;
  --muted: #666b63;
  --line: #e3e1da;
  --accent: #2f6b4f;
  --accent-soft: #e2efe7;
  --radius: 14px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141614;
    --surface: #1d201d;
    --text: #ecede9;
    --muted: #9da397;
    --line: #2e322d;
    --accent: #7cc59d;
    --accent-soft: #23352b;
  }
}

* { box-sizing: border-box; }

html { scroll-padding-top: 12px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 64px;
}

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0.2em 0 0.3em; }
h2 { font-size: 1.1rem; margin: 0 0 0.6em; }
h3 { font-size: 1rem; margin: 0 0 0.5em; }

a { color: var(--accent); }

.muted { color: var(--muted); }

.top { margin: 8px 0 20px; }

.today-card {
  display: block;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius);
  text-decoration: none;
}
.today-card .label { display: block; font-size: 0.85rem; opacity: 0.85; }
.today-card .title { display: block; font-size: 1.15rem; font-weight: 600; }

.week { margin-bottom: 24px; }
.week h2 .muted { font-weight: 400; font-size: 0.9rem; margin-left: 6px; }

.days { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.days li + li { border-top: 1px solid var(--line); }
.days a {
  display: grid;
  grid-template-columns: 4.2rem 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}
.days a:hover { background: var(--accent-soft); }
.days .is-today a { background: var(--accent-soft); font-weight: 600; }
.days .when { color: var(--muted); font-size: 0.9rem; }
.days .meta { display: flex; gap: 8px; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.days .done { color: var(--accent); font-weight: 700; }

.crumbs { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.95rem; }
.pager { display: flex; gap: 14px; }

.day-head { margin-bottom: 14px; }
.day-head .muted { margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.card p:first-of-type { margin-top: 0; }
.card ul, .card ol { padding-left: 1.3em; }
.card li { margin: 0.25em 0; }
.plain { list-style: none; padding: 0 !important; }

a.ex { font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 2px; }

.status { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 0.85rem; }
.pill.ok { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

.videos { margin-top: 28px; }
.video {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.frame { position: relative; width: 100%; margin: 0 auto 10px; border-radius: 10px; overflow: hidden; background: #000; }
.frame.wide { aspect-ratio: 16 / 9; }
.frame.short { aspect-ratio: 9 / 16; max-width: 340px; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.back { font-size: 0.9rem; }
