:root {
  --green: #2f5d3a;
  --green-soft: #e6efe7;
  --ink: #1f2420;
  --muted: #6b726c;
  --line: #dde2dd;
  --bg: #f7f6f2;
  --warn: #9a5b00;
  --error: #b3261e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
.top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--green); color: #fff;
}
.top h1 { font-size: 19px; margin: 0; }
main { max-width: 720px; margin: 0 auto; padding: 12px 12px 48px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 10px 0;
}
h2 { font-size: 18px; margin: 18px 4px 4px; }
.card h2 { margin: 0 0 4px; }
h3 { font-size: 17px; margin: 0; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 15px; }
.error { color: var(--error); min-height: 1.2em; }
label { display: block; margin: 10px 0; font-size: 15px; color: var(--muted); }
input, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
textarea { resize: vertical; }
button {
  font: inherit; min-height: 44px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
button.primary { width: 100%; background: var(--green); color: #fff; border-color: var(--green); }
button.link { background: none; border: none; color: #fff; text-decoration: underline; min-height: 0; padding: 4px; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: center; }
.week-nav button { width: 48px; font-size: 24px; }
.week-label { font-weight: 600; }
.banner { background: #fff4e0; color: var(--warn); padding: 10px 12px; border-radius: 8px; }
.section-note { margin: 0 4px 6px; }
.mission-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.m-duration { white-space: nowrap; font-size: 15px; color: var(--muted); }
.hors .m-duration { font-weight: 700; color: var(--warn); }
.m-actions { margin: 10px 0 4px; }
.toggle { width: 100%; font-weight: 600; }
.mission.done { border-color: var(--green); background: var(--green-soft); }
.mission.done .toggle { background: var(--green); color: #fff; border-color: var(--green); }
.m-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.photo-btn {
  display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 8px 14px;
  border: 1px dashed var(--muted); border-radius: 8px; color: var(--ink); cursor: pointer;
}
.m-photo { max-width: 120px; max-height: 120px; border-radius: 8px; object-fit: cover; }
.readonly .m-actions, .readonly .fb-label, .readonly .m-row { display: none; }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); }
.check input { width: 22px; height: 22px; margin: 0; }
.p-text { white-space: pre-wrap; }
