:root {
  --bg: #f4f6f5; --card: #ffffff; --ink: #18211d; --muted: #5d6a64; --line: #d9e0dc;
  --brand: #0b6e4f; --brand-ink: #ffffff; --brand-soft: #e3f1ec;
  --danger: #c5281c; --danger-soft: #fdecea; --warn: #8a5a00; --warn-soft: #fff4dc; --ok: #0b6e4f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
main { max-width: 560px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; line-height: 1.35; margin: 4px 0 14px; }
h2 { font-size: 17px; margin: 22px 0 8px; }
p { margin: 6px 0; }
a { color: var(--brand); }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.center { text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 10px 0; }
.card-link { display: block; color: inherit; text-decoration: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack > * + * { margin-top: 8px; }
.btn { display: block; width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-big { min-height: 64px; font-size: 19px; }
.btn-small { display: inline-block; width: auto; min-height: 38px; padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #5ab596; outline-offset: 2px; }
label.field { display: block; margin: 12px 0; font-weight: 700; font-size: 14px; }
label.field > input, label.field > select, label.field > textarea { display: block; width: 100%; margin-top: 4px; padding: 11px; font: 16px/1.4 inherit; font-family: inherit; color: var(--ink); background: var(--card); border: 1px solid #aeb9b3; border-radius: 8px; }
textarea { min-height: 84px; }
/* iPhoneの日付・時刻欄は独自の幅と高さを持つので、枠に収める */
label.field > input[type="time"], label.field > input[type="date"], label.field > input[type="month"], label.field > input[type="datetime-local"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; min-height: 46px; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.4em; }
.grid2 > * { min-width: 0; }
.grid2 > label.field { margin-top: 0; margin-bottom: 0; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
.task { display: flex; align-items: center; gap: 12px; padding: 13px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.task:last-child { border-bottom: 0; }
.task-mark { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; border: 2px solid #9aa8a1; text-align: center; line-height: 22px; font-size: 14px; font-weight: 700; }
.task-done .task-mark { background: var(--brand); border-color: var(--brand); color: #fff; }
.task-body { flex: 1; font-weight: 700; }
.task-body small { display: block; font-weight: 400; color: var(--muted); }
.list-card { padding: 0; overflow: hidden; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.notice { padding: 12px; border-radius: 10px; margin: 10px 0; font-size: 14px; background: var(--brand-soft); }
.notice-warn { background: var(--warn-soft); color: #4f3500; }
.notice-danger { background: var(--danger-soft); color: #7a1209; border: 1px solid var(--danger); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat strong { display: block; font-size: 20px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs[hidden] { display: none; }
.tabs a { flex: 1; min-height: 56px; display: flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 700; }
.tabs a.active { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.tabs a.tab-danger { color: var(--danger); }
.toast { position: fixed; left: 16px; right: 16px; bottom: 76px; max-width: 528px; margin: 0 auto; padding: 12px 14px; background: #18211d; color: #fff; border-radius: 10px; font-size: 14px; z-index: 5; }
.toast[hidden] { display: none; }
.photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar a, .calendar span { min-height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: inherit; text-decoration: none; font-size: 14px; background: var(--card); border: 1px solid var(--line); }
.calendar span.head { background: transparent; border: 0; color: var(--muted); font-size: 12px; min-height: 22px; }
.calendar span.blank { visibility: hidden; }
.calendar a.has { background: var(--brand-soft); border-color: var(--brand); font-weight: 700; }
pre.report { white-space: pre-wrap; word-break: break-word; font: inherit; background: var(--bg); padding: 10px; border-radius: 8px; }
.task-mark-none { visibility: hidden; width: 0; flex-basis: 0; margin-right: -12px; }
.copy-buffer { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
