:root {
  --ink: #17372d;
  --muted: #68756f;
  --green: #1e7558;
  --green-dark: #155c45;
  --green-soft: #e8f1e8;
  --orange: #ef7d38;
  --cream: #f5f7f1;
  --line: #dce5dc;
}
* { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 88% 4%, rgba(239,125,56,.10), transparent 22rem), linear-gradient(180deg,#f9faf6 0%,var(--cream) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.page-shell { width: min(100%,560px); min-height: 100vh; margin: 0 auto; padding: 24px 16px calc(28px + env(safe-area-inset-bottom)); }
.hero { display: flex; align-items: center; gap: 13px; padding: 4px 3px 20px; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 17px 17px 17px 6px; color: #fff; background: linear-gradient(145deg,#287e60,#14533f); box-shadow: 0 8px 20px rgba(26,105,78,.22); font-size: 24px; font-weight: 800; }
.eyebrow { margin: 0 0 2px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.04em; }
.intro { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.selector-card { padding: 17px; border: 1px solid var(--line); border-radius: 21px; background: rgba(255,255,255,.92); box-shadow: 0 10px 28px rgba(31,74,57,.07); }
.select-field { display: block; }
.select-field + .select-field { margin-top: 14px; }
.select-field > span { display: block; margin: 0 0 7px 2px; color: #56665f; font-size: 13px; font-weight: 700; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; width: 8px; height: 8px; position: absolute; top: 50%; right: 18px; transform: translateY(-68%) rotate(45deg); border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); pointer-events: none; }
select { width: 100%; height: 50px; padding: 0 45px 0 15px; appearance: none; border: 1px solid #d7e0d8; border-radius: 14px; outline: none; color: var(--ink); background: #f8faf7; font-size: 16px; font-weight: 650; }
select:focus { border-color: #78aa96; box-shadow: 0 0 0 4px rgba(30,117,88,.09); }
.empty-result { margin-top: 16px; padding: 42px 20px; border: 1px dashed #cbd7cc; border-radius: 21px; text-align: center; background: rgba(255,255,255,.5); }
.house-icon { width: 54px; height: 48px; position: relative; margin: 0 auto 14px; }
.house-icon::before { content: ""; width: 34px; height: 34px; position: absolute; bottom: 0; left: 10px; border-radius: 7px; background: var(--green-soft); }
.house-icon::after { content: ""; width: 29px; height: 29px; position: absolute; top: 1px; left: 13px; transform: rotate(45deg); border-radius: 6px; background: var(--green-soft); }
.house-icon span { width: 10px; height: 20px; position: absolute; z-index: 1; bottom: 0; left: 22px; border-radius: 4px 4px 0 0; background: var(--green); }
.empty-result h2 { margin: 0; font-size: 18px; }
.empty-result p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.qr-result { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 23px; background: #fff; box-shadow: 0 12px 30px rgba(31,74,57,.08); }
.qr-result[hidden], .image-viewer[hidden] { display: none; }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.result-area { margin: 0 0 3px; color: var(--green); font-size: 12px; font-weight: 750; }
.result-heading h2 { margin: 0; font-size: 25px; }
.matched-badge { padding: 5px 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 750; }
.qr-card { width: 100%; padding: 13px 12px 10px; border: 1px solid var(--line); border-radius: 18px; background: #f7f8f5; }
.qr-card img { display: block; width: min(65vw,260px); height: min(65vw,260px); margin: 0 auto; border-radius: 9px; background: #fff; }
.qr-card span { display: block; margin-top: 8px; color: var(--green); font-size: 12px; font-weight: 700; }
.join-guide { margin-top: 16px; }
.join-guide h3 { margin: 0 0 10px; font-size: 15px; }
.join-guide ol { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.join-guide li { display: flex; align-items: flex-start; gap: 10px; color: #596660; font-size: 13px; line-height: 1.5; }
.join-guide li > span { width: 21px; height: 21px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 7px; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; }
.join-guide p { margin: 0; }
.primary-action { width: 100%; min-height: 48px; margin-top: 17px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg,var(--green),var(--green-dark)); box-shadow: 0 9px 19px rgba(26,102,76,.2); font-size: 16px; font-weight: 750; }
.notice { display: flex; gap: 10px; margin-top: 14px; padding: 13px 14px; border-radius: 14px; color: #5a645f; background: #ecefe8; font-size: 12px; line-height: 1.55; }
.notice p { margin: 0; }
.notice-dot { width: 7px; height: 7px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: var(--orange); }
.image-viewer { position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; padding: 30px 22px; background: rgba(7,13,10,.94); text-align: center; }
.image-viewer img { width: min(88vw,560px); border-radius: 10px; background: #fff; }
.image-viewer p { margin: 16px 0 3px; color: #fff; font-size: 17px; font-weight: 750; }
.image-viewer > span { color: rgba(255,255,255,.72); font-size: 13px; }
.image-viewer button { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.17); font-size: 29px; }
body.viewer-open { overflow: hidden; }
