:root {
  --green: #19906E;
  --green-dark: #126b52;
  --green-soft: #e8f4f0;
  --text: #1d2a26;
  --muted: #5b6b66;
  --line: #d5dfdb;
  --bg: #ffffff;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --danger: #a3212b;
  --danger-bg: #fde8ea;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); -webkit-text-size-adjust: 100%; }
.screen { max-width: 560px; margin: 0 auto; padding: 12px 16px calc(96px + env(safe-area-inset-bottom)); }
.logo { color: var(--green); display: flex; justify-content: center; padding: 8px 0 0; }
h1 { color: var(--green); font-size: 20px; font-weight: 700; text-align: center; margin: 8px 0 16px; outline: none; }
h2 { color: var(--green); font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.center { text-align: center; }
.center-col { align-items: center; }
.brand { color: var(--green); font-weight: 600; margin: 8px 0 32px; }
.home-logo { width: 88px; height: 88px; margin: 32px auto 0; border-radius: 16px; background: var(--green); color: #fff;
  font-size: 56px; font-weight: 700; display: grid; place-items: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; margin: 2px 0 6px; line-height: 1.4; }
.progress { text-align: center; color: var(--muted); font-size: 13px; margin: -8px 0 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.sticky { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 80%, transparent); padding: 16px 0 calc(8px + env(safe-area-inset-bottom)); margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.label { font-size: 14px; font-weight: 600; color: var(--green-dark); }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], input[type=search], input[type=number], input:not([type]), textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px; border: 1px solid #b9c7c2; border-radius: 6px; background: #fff; color: var(--text); min-height: 48px; }
textarea { resize: vertical; line-height: 1.4; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #f0a531; outline-offset: 2px; }
.choices { display: flex; gap: 8px; }
.choices.wrap { flex-wrap: wrap; }
.choice { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--green); }
.choice.big { margin: 16px 0; font-weight: 600; }
.btn { font: inherit; font-size: 16px; font-weight: 600; min-height: 48px; padding: 12px 16px; border-radius: 6px; border: 2px solid var(--green);
  background: var(--green); color: #fff; cursor: pointer; width: 100%; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn.secondary { background: #fff; color: var(--green-dark); }
.btn.secondary:hover { background: var(--green-soft); }
.btn:disabled, .btn.disabled { background: #e3e8e6; border-color: #e3e8e6; color: #5d6965; cursor: not-allowed; }
.center-col .btn { max-width: 280px; }
.link { background: none; border: 0; padding: 8px 0; color: var(--green-dark); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; min-height: 44px; }
a { color: var(--green-dark); }
.topbar { display: flex; justify-content: space-between; margin: -4px 0 0; }
.notice { border-radius: 6px; padding: 12px; background: var(--green-soft); line-height: 1.45; margin: 8px 0; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.danger { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.error { color: var(--danger); margin: 0; min-height: 1em; }
.section { border-top: 1px solid var(--line); padding: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.cards, .list, .summary, .log { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.card { width: 100%; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; cursor: pointer; min-height: 56px; color: var(--text); }
.card:hover { border-color: var(--green); }
.card strong { color: var(--green-dark); }
.tag { align-self: flex-start; font-size: 12px; background: var(--green-soft); color: var(--green-dark); padding: 2px 8px; border-radius: 99px; }
.summary li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.bullets { line-height: 1.5; padding-left: 20px; }
.bullets li { margin-bottom: 6px; }
details.group { border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; margin: 10px 0; }
details.group > summary { cursor: pointer; font-weight: 600; color: var(--green-dark); padding: 14px 0; min-height: 44px; }
details.group[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details.group > .stack { padding-bottom: 12px; }
details.more { margin-top: 8px; }
details.more summary { color: var(--green-dark); cursor: pointer; padding: 10px 0; }
details.more .btn { margin-top: 8px; }
.log li { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.log-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.old { color: var(--danger); text-decoration: line-through; word-break: break-word; }
.new { color: var(--green-dark); font-weight: 600; word-break: break-word; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); background: var(--text); color: #fff;
  padding: 12px 16px; border-radius: 8px; z-index: 50; max-width: 90vw; }
.toast.error { background: var(--danger); }
.dialog-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: grid; place-items: center; z-index: 40; padding: 16px; }
.dialog { background: #fff; border-radius: 10px; padding: 16px; max-width: 420px; width: 100%; }
.dialog p { line-height: 1.45; margin-top: 0; }
.sigwrap { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.sigpad { width: 100%; height: 180px; border: 2px dashed var(--green); border-radius: 8px; background: #fff; touch-action: none; }
.sigline { font-size: 13px; color: var(--muted); border-top: 1px solid var(--text); padding-top: 4px; }
.small-btn { min-height: 44px; font-size: 14px; }
.subhead { font-size: 15px; color: var(--green); margin: 12px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); }
.doc { line-height: 1.5; font-size: 15px; }
.doc h3 { color: var(--green-dark); font-size: 15px; margin: 16px 0 4px; }
.emph { background: var(--green-soft); border-left: 0; padding: 12px; border-radius: 6px; font-weight: 600; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.steps button { font: inherit; font-size: 13px; min-width: 44px; min-height: 44px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; }
.steps button.cur { background: var(--green); color: #fff; border-color: var(--green); }
.steps button.filled { border-color: var(--green); color: var(--green-dark); font-weight: 600; }
.note { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: 6px; font-size: 14px; line-height: 1.4; }
.kv { display: grid; grid-template-columns: 1fr; gap: 2px 12px; margin: 0; }
.kv dt { font-weight: 600; color: var(--green-dark); font-size: 13px; margin-top: 8px; }
.kv dd { margin: 0; white-space: pre-wrap; }
table.items { width: 100%; border-collapse: collapse; font-size: 14px; }
table.items th, table.items td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.items td.num, table.items th.num { text-align: right; white-space: nowrap; }
table.items input { min-height: 40px; padding: 6px 8px; font-size: 15px; }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; padding: 12px 0; }
.scroll-x { overflow-x: auto; }
.filelist li { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 0; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green-dark); }
.sketch { display: flex; flex-direction: column; gap: 4px; }
.sketch-canvas { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; touch-action: none; background: #fff; }
.figure { margin: 8px 0; text-align: center; }
.figure img { max-width: 260px; width: 70%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.figure figcaption { font-size: 13px; color: var(--muted); }
.choice.with-img { flex-direction: column; align-items: flex-start; }
.choice-img { width: 96px; height: auto; display: block; }
