:root {
  --ink: #14201e;
  --muted: #5b6b68;
  --faint: #8a9896;
  --line: #e2e8e6;
  --line-2: #cfd9d6;
  --bg: #f5f7f6;
  --card: #ffffff;
  --accent: #0f5c57;
  --accent-2: #14786f;
  --accent-soft: #e8f3f1;
  --warn-bg: #fff4c2;
  --warn-line: #e0b400;
  --danger: #b3342c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 30, .04), 0 4px 16px rgba(16, 32, 30, .06);
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--ui); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 58px;
  padding: 0 18px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; letter-spacing: -.1px; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(140deg, var(--accent-2), var(--accent)); color: #fff; font: 700 14px var(--serif); }
.account { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.plan-chip { background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.btn.small-top { padding: 7px 14px; font-size: 13.5px; }
.menu-wrap { position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--accent);
  font-weight: 700; cursor: pointer; }
.menu { position: absolute; right: 0; top: 42px; width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16,32,30,.14); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-weight: 600; word-break: break-all; }
.menu-head small { display: block; color: var(--muted); font-weight: 400; }
.menu a, .menu button { text-align: left; padding: 9px 10px; border-radius: 8px; border: none; background: none; color: var(--ink);
  text-decoration: none; cursor: pointer; font-size: 14px; }
.menu a:hover, .menu button:hover { background: var(--bg); }
.menu .danger { color: var(--danger); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2);
  background: #fff; border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink);
  transition: background .15s, border-color .15s, transform .05s; min-height: 42px; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.big { padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.btn.small { padding: 5px 9px; font-size: 12.5px; min-height: 32px; border-radius: 8px; }
.btn.small.on { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.actions.tight { margin-top: 10px; }

/* ---------- Landing ---------- */
.landing { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 64px 0 56px; }
.eyebrow { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px;
  padding: 4px 12px; border-radius: 99px; margin-bottom: 16px; }
.hero h1 { font: 700 clamp(32px, 5vw, 48px)/1.1 var(--ui); letter-spacing: -1px; margin: 0 0 16px; }
.lede { color: var(--muted); font-size: 17.5px; max-width: 34em; margin: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.micro { color: var(--faint); font-size: 13px; margin-top: 12px; }

.hero-art { position: relative; padding: 20px 10px 30px; }
.paper { background: #fff; border-radius: 10px; box-shadow: 0 24px 60px rgba(16,32,30,.14), 0 2px 6px rgba(16,32,30,.06);
  padding: 26px 24px 30px; transform: rotate(1.2deg); max-width: 360px; margin: 0 auto; }
.p-title { font: 700 13px var(--serif); text-align: center; letter-spacing: 1.5px; }
.p-sub { font: 11px var(--serif); text-align: center; color: var(--muted); margin-bottom: 14px; }
.p-h { font: 700 11px var(--serif); text-decoration: underline; margin: 14px 0 7px; }
.ln { height: 7px; border-radius: 4px; background: #e9eeec; margin: 6px 0; }
.ln.w90 { width: 90%; } .ln.w80 { width: 80%; } .ln.w70 { width: 70%; } .ln.w60 { width: 60%; } .ln.w50 { width: 50%; }
.chip { position: absolute; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 99px; padding: 8px 14px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.chip.c1 { top: 4px; left: 0; }
.chip.c2 { bottom: 6px; right: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.ok { background: #22a06b; } .dot.warn { background: var(--warn-line); }

.sec-title { font: 700 26px/1.2 var(--ui); letter-spacing: -.4px; margin: 0 0 20px; }
.how { padding: 40px 0; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.how-card h3 { margin: 12px 0 6px; font-size: 17px; }
.how-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.how-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft);
  color: var(--accent); font-weight: 700; }

.trust { margin: 40px 0; padding: 36px; background: var(--accent); color: #fff; border-radius: 20px; }
.trust .sec-title { color: #fff; margin-bottom: 8px; }
.trust-head p { color: rgba(255,255,255,.8); margin: 0 0 24px; max-width: 40em; }
.trust-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.trust-grid li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 16px;
  color: rgba(255,255,255,.85); font-size: 14.5px; }
.trust-grid b { color: #fff; display: block; margin-bottom: 2px; }
.trust-more { margin: 20px 0 0; }
.trust-more a { color: #fff; font-weight: 600; }

.pricing { padding: 40px 0 20px; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.price-card.best { border: 2px solid var(--accent); }
.price-card h3 { margin: 0; font-size: 16px; color: var(--muted); font-weight: 600; }
.price { font: 700 34px/1.2 var(--ui); letter-spacing: -.5px; margin: 8px 0 2px; }
.price small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.price-card .pnote { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.price-card ul { margin: 0 0 20px; padding: 0; list-style: none; flex: 1; }
.price-card li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; }
.price-card li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent-2); font-weight: 700; }
.price-card .btn { width: 100%; }
.tag { position: absolute; top: -11px; left: 20px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; }

.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; border-top: 1px solid var(--line);
  margin-top: 48px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer nav { display: flex; gap: 18px; margin-left: auto; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.foot-note { flex-basis: 100%; margin: 4px 0 0; font-size: 12.5px; color: var(--faint); }
.fine { color: var(--muted); font-size: 12.5px; margin-top: 16px; }

/* ---------- Terms gate ---------- */
.gate-page { max-width: 640px; margin: 0 auto; padding: 32px 16px 60px; }
.gate-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.gate-card h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.3px; }
label.check { flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 14.5px; font-weight: 500; color: var(--ink); cursor: pointer; }
label.check input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--accent); }

/* ---------- App layout ---------- */
.app { max-width: 920px; margin: 0 auto; padding: 0 14px 40px; }
.stepper { position: sticky; top: 58px; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  padding: 12px 0; background: var(--bg); }
.stepper button { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 6px;
  font-size: 13.5px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.stepper button em { font-style: normal; }
.stepper button span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; }
.stepper button.on { border-color: var(--accent); color: var(--accent); font-weight: 600; box-shadow: 0 0 0 3px var(--accent-soft); }
.stepper button.on span { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper button:disabled { opacity: .5; cursor: not-allowed; }

.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step h2 { margin: 0 0 4px; font: 700 22px/1.25 var(--ui); letter-spacing: -.3px; }
h3.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); margin: 24px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.hint { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.note-line { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 9px 12px; margin: 12px 0 0; }
.app-footer { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 24px; }
.app-footer a { color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.span2 { grid-column: span 2; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
label small { font-weight: 400; color: var(--faint); }
label.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
input, select, textarea { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; background: #fff;
  font-weight: 400; font-size: 15px; color: var(--ink); width: 100%; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input, select { min-height: 44px; }
input[type=checkbox] { min-height: 0; accent-color: var(--accent); }
label.inline input[type=checkbox], label.inline select { width: auto; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.unclear { background: var(--warn-bg) !important; border-color: var(--warn-line) !important; }

.len-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.len { position: relative; flex-direction: column; align-items: flex-start; gap: 2px; border: 1.5px solid var(--line-2); border-radius: 12px;
  padding: 12px 12px 30px; background: #fff; cursor: pointer; color: var(--ink); font-weight: 400; }
.len input { position: absolute; opacity: 0; pointer-events: none; }
.len b { font-size: 15px; }
.len span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.len em { position: absolute; left: 12px; bottom: 9px; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.len:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.len.off { opacity: .45; cursor: not-allowed; }
.len-inline select { min-height: 42px; padding: 6px 10px; }
@media (max-width: 560px) { .len-pick { grid-template-columns: 1fr; } .len { padding-bottom: 12px; } .len em { position: static; margin-top: 4px; } }

.home { max-width: 560px; margin: 0 auto; padding: 18px 0 10px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.new-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 260px;
  border-radius: 24px; background: linear-gradient(150deg, var(--accent-2), var(--accent)); color: #fff; cursor: pointer;
  box-shadow: 0 14px 36px rgba(15,92,87,.28); text-align: center; padding: 24px; font-weight: 400; transition: transform .08s; }
.new-btn:active { transform: scale(.985); }
.new-btn .cam-ic { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.16); margin-bottom: 4px; }
.new-btn b { font-size: 28px; letter-spacing: -.4px; color: #fff; }
.new-btn small { color: rgba(255,255,255,.85); font-size: 14.5px; font-weight: 400; }
.link-btn { align-self: center; color: var(--accent-2); font-weight: 600; font-size: 14.5px; cursor: pointer; flex-direction: row; }
.continue-btn { width: 100%; }
.meter-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.meter-top { display: flex; align-items: baseline; gap: 6px; font-size: 14.5px; color: var(--muted); }
.meter-top b { font-size: 20px; color: var(--ink); }
.meter-top span { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 99px; }
.meter { height: 9px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; background: var(--accent-2); border-radius: 99px; transition: width .4s; }
.meter.warn i { background: var(--warn-line); }
.meter.full i { background: var(--danger); }
.meter-note { font-size: 12.5px; color: var(--muted); margin: 0; }
.meter-up { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.meter-up span { font-size: 13px; color: var(--muted); }
.plan-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.home-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wa-btn { color: #128c4b; border-color: #a9dcbf; }

.ph-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pg-no { font-size: 12.5px; font-weight: 700; color: var(--muted); align-self: center; margin-right: auto; }
details.opts { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fbfcfb; }
details.opts > summary { padding: 13px 0; cursor: pointer; font-size: 14.5px; list-style: none; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
details.opts > summary::-webkit-details-marker { display: none; }
details.opts > summary::before { content: "▸"; color: var(--muted); }
details.opts[open] > summary::before { content: "▾"; }
details.opts > summary span, details.opts > summary small { color: var(--muted); font-size: 13px; }
details.opts[open] { padding-bottom: 14px; }
.print-details { margin: 0 0 12px; }

.actions.sticky { position: sticky; bottom: 0; z-index: 5; background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  margin: 20px -22px -22px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius); }
.actions.sticky .btn.primary { flex: 1; max-width: 340px; }

.attention { margin-bottom: 4px; }
.att-head { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--danger); margin: 4px 0 8px; }
.att-item { border: 1px solid var(--line); border-left: 4px solid var(--accent-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; font-size: 14px; }
.att-item.warn { border-left-color: var(--warn-line); background: #fffbea; }
.att-item p { margin: 4px 0; }
.att-item ul, .att-item ol { margin: 6px 0; padding-left: 20px; }
.att-item .btn { margin-top: 4px; }
.all-head { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); margin: 22px 0 4px; }
.all-head small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }
details.rv-section > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 2px 0 8px; }
details.rv-section > summary::-webkit-details-marker { display: none; }
details.rv-section > summary::before { content: "▸"; color: var(--muted); width: 12px; }
details.rv-section[open] > summary::before { content: "▾"; }
details.rv-section > summary h3 { margin: 0; }
.sec-count { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 99px; padding: 1px 8px; }
.sec-flag { font-size: 11.5px; font-weight: 700; color: #8a6a00; background: var(--warn-bg); border-radius: 99px; padding: 1px 8px; }

.stages { list-style: none; margin: 0 0 12px; padding: 0; text-align: left; font-size: 15px; }
.stages li { padding: 4px 0; color: var(--faint); }
.stages li.done { color: var(--accent-2); }
.stages li.now { color: var(--ink); font-weight: 600; }
.busy .meter { width: 240px; margin: 0 auto 6px; }
.busy small { color: var(--muted); }
@media (max-width: 560px) {
  .actions.sticky { margin: 16px -16px -16px; padding-left: 16px; padding-right: 16px; }
  .new-btn { min-height: 220px; }
}

/* ---------- Photos ---------- */
.add-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fafbfa; display: flex; flex-direction: column; }
.photo.needs-id { border-color: var(--warn-line); box-shadow: 0 0 0 2px var(--warn-bg); }
.photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #e9eeec; cursor: zoom-in; }
.photo .row { display: flex; gap: 4px; padding: 6px; flex-wrap: wrap; }
.photo .row.id-row { border-top: 1px solid var(--line); background: #fff; }
.photo select { padding: 6px; font-size: 13px; min-height: 36px; }
.photo .row .btn.small { flex: 1; min-width: 0; padding: 5px 4px; }
.empty { color: var(--muted); text-align: center; padding: 36px 12px; border: 1.5px dashed var(--line-2); border-radius: 12px; grid-column: 1/-1; }

.photo-count { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.photo-count.full { color: var(--danger); }
.btn.off { opacity: .45; pointer-events: none; }

/* ---------- Review ---------- */
.thumb-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 10px; }
.thumb-strip img { height: 68px; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.rv-section { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.rv-section h3 { font-size: 13px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); }
.rv-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.rv-warn ul { margin: 6px 0 0; padding-left: 18px; }
.tbl-wrap { overflow-x: auto; }
table.edit { border-collapse: collapse; width: 100%; min-width: 560px; }
table.edit th { text-align: left; font-size: 12px; color: var(--muted); padding: 4px; font-weight: 600; }
table.edit td { padding: 2px; vertical-align: top; }
table.edit input, table.edit textarea { padding: 7px; font-size: 14px; border-radius: 8px; min-height: 36px; }
table.edit td.chk { text-align: center; vertical-align: middle; }
table.edit td.chk input { width: 20px; height: 20px; }
.x { border: none; background: none; color: var(--danger); font-size: 18px; cursor: pointer; padding: 4px 6px; }
.confirm { flex-direction: row; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 14px; border-radius: 12px;
  background: var(--accent-soft); color: var(--ink); font-size: 14.5px; font-weight: 500; cursor: pointer; }
.confirm input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.confirm.verify { border: 1px solid #b9d6d3; }

.timeline { border-left: 2px solid var(--line-2); margin-left: 6px; padding-left: 14px; }
.tl-day { position: relative; margin-bottom: 12px; font-size: 14px; }
.tl-day::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); }
.tl-day.before::before { background: var(--faint); }
.tl-day.trend::before { background: var(--warn-line); }
.tl-day b { font-size: 13px; color: var(--accent); }
.tl-day.before b { color: var(--muted); }
.tl-day ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink); }
.tl-day li { margin: 2px 0; }

.rx-box { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; margin-top: 16px; background: #fbfcfb; }
.rx-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.rx-tag { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--line); padding: 2px 8px; border-radius: 99px; }
.rx-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); font-weight: 700; margin: 14px 0 6px; }
.labs { display: flex; flex-wrap: wrap; gap: 6px; }
.lab { font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.lab.ab { border-color: var(--warn-line); background: var(--warn-bg); }
.lab i { font-style: normal; font-weight: 700; color: var(--danger); }
.lab small { color: var(--muted); }
.rx-more { margin-top: 8px; font-size: 13px; color: var(--muted); }
.rx-more .labs { margin-top: 6px; }
.rx-missing { font-size: 13px; color: var(--danger); margin: 8px 0 0; }
.rx-allergy { font-size: 13.5px; margin: 8px 0 0; }
.rx-ok { font-size: 13.5px; color: #1b7a43; margin: 0; }
.rx-issue { border: 1px solid var(--line); border-left: 4px solid var(--faint); border-radius: 10px; background: #fff; padding: 10px 12px; margin-top: 8px; font-size: 14px; }
.rx-issue.high { border-left-color: var(--danger); background: #fff6f5; }
.rx-issue.check { border-left-color: var(--warn-line); }
.rx-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- Templates ---------- */
.onboard { background: var(--accent-soft); border: 1px solid #b9d6d3; border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.onboard p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.tpl-pick { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tpl-pick label { flex: 1; }
.tpl-list { display: grid; gap: 8px; }
.tpl-item { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.tpl-item .nm { font-weight: 600; flex: 1; min-width: 140px; }
.tpl-item .meta { color: var(--muted); font-size: 12.5px; font-weight: 400; display: block; }
.badge { background: var(--accent); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 99px; margin-left: 6px; font-weight: 600; }
.sec-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fbfcfb; }
.sec-card.ai { border-left: 4px solid var(--accent-2); }
.sec-top { display: grid; grid-template-columns: 26px 1fr; gap: 6px 8px; align-items: center; }
.sec-top .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line); font-size: 12px; font-weight: 700; }
.sec-top select { grid-column: 2; }
.sec-card label { margin-top: 8px; }
.sec-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }

/* ---------- Plan picker ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 45; background: rgba(16,22,21,.5); display: grid; place-items: end center; }
.sheet { background: var(--card); width: min(520px, 100%); border-radius: 20px 20px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }
@media (min-width: 600px) { .sheet-bg { place-items: center; } .sheet { border-radius: 20px; } }
.sheet h2 { margin: 0 0 8px; font: 700 22px var(--ui); }
.feat { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.plans { display: grid; gap: 10px; }
.plan { position: relative; display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; cursor: pointer; text-align: left; width: 100%; }
.plan.best { border-color: var(--accent); }
.plan .pn { font-weight: 700; }
.plan .pnote { font-size: 12.5px; color: var(--muted); }
.plan .pp { margin-left: auto; text-align: right; font: 700 20px var(--ui); white-space: nowrap; }
.plan .pp small { font-size: 12px; font-weight: 500; color: var(--muted); }
.plan .tag { top: -11px; left: 14px; }

/* ---------- Final document ---------- */
.final-bar { margin-bottom: 16px; }
.doc-warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-bottom: 10px; }
.doc { background: #fff; max-width: 210mm; margin: 0 auto; padding: 18mm 16mm; font: 11.5pt/1.55 var(--serif);
  color: #111; box-shadow: 0 2px 12px rgba(0,0,0,.08); border: 1px solid var(--line); border-radius: 6px; outline: none; }
.doc h1 { text-align: center; font-size: 16pt; letter-spacing: 1px; margin: 0; }
.doc .dept { text-align: center; margin: 2px 0 12px; font-weight: 600; }
.doc table.pt { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 10.5pt; }
.doc table.pt td { border: 1px solid #999; padding: 4px 6px; }
.doc table.pt td b { font-weight: 600; }
.doc .writein { display: inline-block; min-width: 28mm; border-bottom: 1px dotted #777; height: 1em; vertical-align: bottom; }
.doc h2 { font-size: 12pt; margin: 14px 0 6px; text-decoration: underline; text-underline-offset: 3px; }
.doc p { margin: 0 0 8px; text-align: justify; }
.doc ol { margin: 0 0 8px; padding-left: 22px; }
.doc table.inv { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: 10pt; }
.doc table.inv th, .doc table.inv td { border: 1px solid #aaa; padding: 3px 6px; text-align: left; vertical-align: top; }
.doc table.inv th { background: #f1f3f2; }
.doc .sign { display: flex; justify-content: space-between; margin-top: 40px; font-size: 10.5pt; }
.doc .sign div { border-top: 1px solid #555; padding-top: 4px; min-width: 28%; text-align: center; }
mark { background: var(--warn-bg); padding: 0 2px; }
.doc mark.unv { background: #ffe1c4; border-bottom: 1.5px dashed #d9730d; cursor: help; }

/* ---------- Overlays ---------- */
.busy { position: fixed; inset: 0; z-index: 50; background: rgba(245,247,246,.92); display: grid; place-content: center; text-align: center; gap: 12px; }
.spinner { width: 42px; height: 42px; margin: 0 auto; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal { position: fixed; inset: 0; z-index: 40; background: #101615; display: flex; flex-direction: column; }
.modal-bar { display: flex; gap: 8px; align-items: center; padding: 10px; background: #1d2725; color: #fff; font-size: 13px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mask-wrap { flex: 1; display: grid; place-items: center; overflow: hidden; padding: 8px; }
#maskCanvas { touch-action: none; max-width: 100%; max-height: 100%; cursor: crosshair; }
.lb-wrap { flex: 1; overflow: auto; display: grid; place-items: center; }
.lb-wrap img { max-width: 100%; max-height: 100%; }
.lb-wrap.zoom { display: block; }
.lb-wrap.zoom img { max-width: none; max-height: none; width: 220%; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: #1d2725; color: #fff;
  padding: 11px 18px; border-radius: 12px; font-size: 14px; max-width: 90vw; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.err { background: var(--danger); }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 20px 60px; }
.legal h1 { font-size: 30px; letter-spacing: -.5px; margin: 0 0 4px; }
.legal .updated { color: var(--muted); margin: 0 0 24px; }
.legal h2 { font-size: 19px; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 15px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal .box { background: var(--accent-soft); border: 1px solid #b9d6d3; border-radius: 12px; padding: 14px 16px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal th, .legal td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }

/* ---------- Responsive ---------- */
.brand, .account .btn, .plan-chip { white-space: nowrap; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 32px; }
  .hero-art { max-width: 380px; width: 100%; margin: 0 auto; }
  .price-grid { grid-template-columns: 1fr; max-width: 440px; }
}
@media (max-width: 640px) {
  .how-grid, .trust-grid { grid-template-columns: 1fr; }
  .trust { padding: 24px 18px; border-radius: 16px; }
}
@media (max-width: 560px) {
  #appName { display: none; }
  .topbar { padding: 0 12px; }
  .plan-chip { font-size: 12px; padding: 3px 8px; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .span2 { grid-column: auto; }
  .step { padding: 16px; }
  .doc { padding: 14px 12px; font-size: 11pt; }
  .doc p { text-align: left; }
  .photo-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stepper button { flex-direction: column; gap: 3px; font-size: 11.5px; padding: 7px 2px; }
  .site-footer nav { margin-left: 0; }
}

@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  body { background: #fff; }
  .no-print, .topbar, .stepper, .toast, .busy { display: none !important; }
  .app { max-width: none; padding: 0; }
  .step { border: none; padding: 0; background: none; box-shadow: none; }
  .doc { box-shadow: none; border: none; padding: 0; max-width: none; font-size: 11pt; }
  mark, .doc mark.unv { background: none; border: none; }
  .doc h2 { break-after: avoid; }
  .doc ol li, .doc p { break-inside: avoid-page; }
}

/* after-summary: feedback + WhatsApp group invite */
.after-doc { max-width: 820px; margin: 18px auto 0; display: grid; gap: 12px; }
.fb-box, .group-card { background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; }
.fb-row { display: flex; gap: 8px; margin: 10px 0 4px; flex-wrap: wrap; }
.fb-btn.on { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); }
#fbMore { display: grid; gap: 8px; margin-top: 8px; }
#fbMore textarea { width: 100%; box-sizing: border-box; }
#fbMore .btn { justify-self: start; }
.group-pop { position: fixed; left: 50%; bottom: 16px; z-index: 55; width: min(440px, calc(100vw - 24px));
  transform: translate(-50%, 140%); transition: transform .3s ease; background: #fff; border: 1px solid #a9dcbf;
  border-radius: 16px; padding: 14px 16px 14px; box-shadow: 0 10px 30px rgba(15, 40, 36, .22); }
.group-pop.show { transform: translate(-50%, 0); }
.group-pop .gp-head { display: flex; align-items: center; gap: 8px; padding-right: 22px; }
.group-pop .gp-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e3f6eb; font-size: 17px; }
.group-pop p { margin: 8px 0 12px; font-size: 14px; color: #5b6b68; }
.group-pop .gp-actions { display: flex; gap: 8px; }
.group-pop .wa-join { background: #1fa855; border-color: #1fa855; color: #fff; flex: 1; text-align: center; }
.group-pop .x { position: absolute; top: 6px; right: 10px; border: 0; background: none; font-size: 22px; color: #6b7b78; cursor: pointer; }

/* in-page choice dialog */
.ask-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(16,22,21,.45); display: grid; place-items: center; padding: 16px; }
.ask { background: #fff; border-radius: 16px; padding: 18px; width: min(420px, 100%); box-shadow: 0 12px 36px rgba(0,0,0,.25); }
.ask p { margin: 8px 0 16px; color: #4d5c59; font-size: 14.5px; line-height: 1.45; }
.ask-actions { display: grid; gap: 8px; }
.ask-danger { color: var(--danger); border-color: #f0c9c6; }
