:root { --green: #1f6f5c; --green-l: #e3f1ec; --bg: #eef3f1; --line: #c4d3ce; --muted: #5b6b75; --red: #b3261e; --tap: 52px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: #1d2a33; font: 17px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: 96px; }
[hidden] { display: none !important; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); background: var(--green); color: #fff; }
.brand { font-weight: 700; font-size: 19px; }
.brand small { display: block; font-weight: 400; font-size: 12px; opacity: .9; }
.brand small.off { color: #ffd2cf; font-weight: 700; }
.bar-actions { display: flex; gap: 6px; }
.barbtn { min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; font: inherit; font-size: 15px; }
.screen { max-width: 640px; margin: 0 auto; }
.pad { padding: 12px 12px 0; }
h2 { margin: 6px 0 10px; color: var(--green); font-size: 21px; }
.step-title { padding: 0 12px; margin: 4px 0 0; }

/* step dots */
.steps { display: flex; gap: 4px; padding: 10px 10px 2px; }
.steps button { flex: 1; min-height: 48px; border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: inherit; font-size: 10px; color: var(--muted); }
.steps button i { display: block; width: 100%; height: 7px; border-radius: 4px; background: #cfdcd8; }
.steps button.done i { background: #8fc1b2; }
.steps button.cur i { background: var(--green); }
.steps button.cur { color: var(--green); font-weight: 700; }

/* fields */
.field { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.lbl { display: block; font-size: 15px; font-weight: 600; color: #33434d; margin: 0 0 8px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.hint.prev { color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: var(--tap); padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: #1d2a33; font: inherit; font-size: 16px; text-align: center; flex: 1 1 auto; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.chips.yn .chip { flex: 1 1 0; min-height: 60px; font-size: 19px; font-weight: 600; }
.chips.col { flex-direction: column; }
.chips.col .chip { text-align: left; }
.chip.add { border-style: dashed; color: var(--muted); }
.txt { display: block; width: 100%; min-height: var(--tap); padding: 12px; font: inherit; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: #1d2a33; margin-top: 8px; }
textarea.txt { min-height: 96px; }
.txt:focus { outline: 2px solid var(--green); border-color: transparent; }
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.stepper button { width: 64px; height: 64px; border-radius: 14px; border: 1.5px solid var(--green); background: #fff; color: var(--green); font-size: 32px; font-weight: 700; }
.stepper output { flex: 1; text-align: center; font-size: 28px; font-weight: 700; }
.stepper output small { font-size: 16px; font-weight: 400; color: var(--muted); }
.big { display: block; width: 100%; min-height: 60px; margin: 10px 0; border-radius: 14px; border: 1.5px solid var(--green); background: #fff; color: var(--green); font: inherit; font-size: 18px; font-weight: 600; text-align: center; text-decoration: none; line-height: 56px; padding: 0 12px; }
.big.primary, .primary { background: var(--green); color: #fff; }
.big.ghost { border-color: var(--line); color: var(--muted); }
.fold { min-height: 48px; width: 100%; border: 1.5px dashed var(--line); border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; text-align: left; padding: 0 12px; }

/* photos */
.photo-big { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 96px; border-radius: 16px; background: var(--green); color: #fff; font-size: 22px; font-weight: 700; cursor: pointer; }
.photo-big .ico { font-size: 36px; }
.photo-small { display: flex; align-items: center; justify-content: center; min-height: 52px; margin-top: 10px; border-radius: 12px; border: 1.5px solid var(--green); color: var(--green); font-weight: 600; cursor: pointer; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.thumbs figure { position: relative; margin: 0; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.thumbs .del { position: absolute; top: 4px; right: 4px; width: 48px; height: 48px; border-radius: 24px; border: 0; background: rgba(179,38,30,.92); color: #fff; font-size: 22px; font-weight: 700; }
.thumbs figcaption { font-size: 12px; color: var(--muted); text-align: center; }

/* signature */
.sigwrap { border: 2px dashed var(--line); border-radius: 12px; background: #fafcfb; }
#sig { width: 100%; height: 200px; display: block; touch-action: none; }

/* bottom nav */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 8px; padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
.navbtn { flex: 1; min-height: 64px; border-radius: 14px; border: 1.5px solid var(--green); background: #fff; color: var(--green); font: inherit; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.navbtn.primary { background: var(--green); color: #fff; }
.navbtn.photo { flex: 0 0 92px; font-size: 22px; cursor: pointer; }
.navbtn:disabled { opacity: .35; }
.navbtn.send { background: #d9822b; border-color: #d9822b; color: #fff; }

.error { color: var(--red); font-weight: 600; }
.notice { background: #fff4d6; border: 1px solid #f0d27a; border-radius: 12px; padding: 10px 12px; margin: 10px 12px 0; font-size: 15px; }
.notice button { min-height: 48px; margin-top: 6px; }
.muted { color: var(--muted); font-size: 15px; }
.sent { list-style: none; padding: 0; margin: 0 0 10px; }
.sent li { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 15px; }
.sent a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; margin: 6px 8px 0 0; border-radius: 10px; border: 1.5px solid var(--green); color: var(--green); font-weight: 600; text-decoration: none; }
.done-box { text-align: center; padding-top: 30px; }
.done-icon { width: 90px; height: 90px; margin: 0 auto; border-radius: 45px; background: var(--green); color: #fff; font-size: 52px; line-height: 90px; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: #1d2a33; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 15px; max-width: 90%; z-index: 20; }
.chip small { font-weight: 400; font-size: 13px; opacity: .85; }
.chips.col .chip { font-size: 15px; }
.qtybtn { min-width: 72px; font-size: 20px; font-weight: 700; }
.pad0 { margin: 4px 0 10px; }
.steps { overflow-x: auto; }
.steps button { min-width: 48px; }
.prow { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #edf1f0; font-size: 15px; }
.prow span { color: var(--muted); flex: 0 0 40%; }
.prow b { text-align: right; font-weight: 600; }
.passage .thumbs { margin-bottom: 4px; }
