:root {
  --accent: #2e6b3b; --accent-dark: #1c4d2b; --bg: #f2f2f7; --card: #ffffff; --text: #111; --muted: #6b7280; --line: #e5e7eb;
  --sell: #b8860b; --donate: #e07b00; --keep: #8b5e3c; --radius: 16px; --tabbar-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root { --accent: #4f9e60; --accent-dark: #2e6b3b; --bg: #000; --card: #1c1c1e; --text: #f2f2f7; --muted: #9ca3af; --line: #2c2c2e; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { max-width: 680px; margin: 0 auto; padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); min-height: 100vh; }
h1, h2, h3 { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--accent); }
input, textarea, select { font: inherit; color: var(--text); background: transparent; border: 0; width: 100%; padding: 0; }
input[type=number] { text-align: right; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(16px); }
.topbar h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.5px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.demo-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.12); font-size: 22px; line-height: 1; }
.view { padding: 8px 16px 24px; }
.section-title { font-size: 20px; font-weight: 700; margin: 22px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.section-title .count { color: var(--muted); font-size: 15px; font-weight: 500; }
.section-title .spacer { flex: 1; }
.section-title a, .section-title button.link { font-size: 15px; font-weight: 600; color: var(--accent); }
.group-label { font-size: 13px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin: 18px 4px 6px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.card + .card { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 52px; }
.row:last-child { border-bottom: 0; }
.row.tappable { cursor: pointer; }
.row.tappable:active { background: color-mix(in srgb, var(--card) 85%, var(--text)); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .value { color: var(--muted); }
.row .chev { color: #c7c7cc; }
.row label { flex: 1; white-space: nowrap; }
.row select { flex: 1; min-width: 0; text-align: right; direction: rtl; appearance: auto; }
.row select option { direction: ltr; }
.row input[type=text], .row textarea { flex: 1; min-width: 0; }
.row textarea { resize: none; }
.row .mic { width: 32px; height: 32px; border-radius: 50%; font-size: 18px; flex: none; }
.row .mic.on { background: #fee2e2; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.footer-note { font-size: 13px; color: var(--muted); margin: 6px 16px 0; }
.thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--line); flex: none; display: grid; place-items: center; font-size: 24px; }
.pill { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--line); color: var(--muted); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-weight: 600; background: var(--accent); color: #fff; }
.btn.secondary { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.btn.danger { background: #fee2e2; color: #b91c1c; }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: default; }
.segmented { display: flex; background: var(--line); border-radius: 10px; padding: 3px; margin: 12px 16px; }
.segmented button { flex: 1; padding: 7px 4px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.segmented button.on { background: var(--card); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .big { font-size: 48px; }
.empty h3 { color: var(--text); margin: 10px 0 6px; }
.fab { position: fixed; right: 20px; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); z-index: 6; background: var(--accent); color: #fff; font-weight: 700; font-size: 17px; padding: 14px 20px; border-radius: 999px; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); width: min(100% - 24px, 656px); height: var(--tabbar-h); z-index: 6; display: flex; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(20px); border-radius: 999px; box-shadow: 0 4px 20px rgba(0,0,0,.18); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 20px; color: var(--muted); position: relative; border-radius: 999px; }
.tabbar button span { font-size: 10px; font-weight: 600; }
.tabbar button.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.badge { position: absolute; top: 8px; right: 14px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px; }
.menu { position: fixed; top: 60px; right: 16px; z-index: 20; background: var(--card); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.25); padding: 6px; min-width: 220px; }
.menu button { display: block; width: 100%; text-align: left; padding: 11px 14px; border-radius: 10px; font-size: 16px; }
.menu button:hover { background: var(--line); }
.hrow { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.hrow::-webkit-scrollbar { display: none; }
.hcard { flex: none; width: 150px; scroll-snap-align: start; cursor: pointer; }
.hcard .img { width: 150px; height: 150px; border-radius: 14px; object-fit: cover; background: var(--line); display: grid; place-items: center; font-size: 40px; }
.hcard .name { font-weight: 600; font-size: 15px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard .cap { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; height: 178px; border-radius: 18px; overflow: hidden; color: #fff; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.14); background-size: cover; background-position: center; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--c1), var(--c2)); opacity: .82; }
.tile > * { position: relative; }
.tile .ic { position: absolute; top: 12px; left: 12px; font-size: 28px; }
.tile h3 { font-size: 18px; }
.tile p { margin: 4px 0 0; font-size: 12.5px; opacity: .9; }
.nudge { display: flex; align-items: center; gap: 12px; background: var(--accent); color: #fff; border-radius: 16px; padding: 14px 16px; margin: 14px 0; cursor: pointer; }
.nudge b { display: block; }
.nudge small { opacity: .9; }
.status-card { background: var(--card); border-radius: 16px; padding: 16px; margin-top: 8px; }
.status-card b { display: block; margin-bottom: 4px; }
.status-card p { margin: 0; color: var(--muted); font-size: 14px; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: min(100%, 680px); max-height: 94vh; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; position: sticky; top: 0; background: var(--bg); border-radius: 22px 22px 0 0; z-index: 1; }
.sheet-head h2 { font-size: 17px; font-weight: 600; flex: 1; text-align: center; }
.sheet-head button { color: var(--accent); font-weight: 600; min-width: 60px; }
.sheet-head button.left { text-align: left; } .sheet-head button.right { text-align: right; }
.sheet-body { overflow-y: auto; padding: 0 16px 32px; }
.photo-hero { width: 100%; max-height: 300px; object-fit: contain; border-radius: 14px; background: var(--card); display: block; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; background: var(--accent); }
.tip-body { padding: 0 16px 12px; color: var(--muted); font-size: 14px; }
.tip-body a { display: inline-block; margin-top: 6px; font-weight: 600; }
.intro { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 14px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.intro .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; color: #fff; flex: none; }
.shop-line { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.shop-line:last-child { border-bottom: 0; }
.shop-line .t { font-weight: 600; } .shop-line .t b { color: var(--accent); margin-right: 6px; }
.shop-line .r { font-size: 14px; color: var(--muted); margin: 2px 0; }
.shop-line .p { font-size: 12px; color: var(--muted); }
.shop-line .links { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.shop-line .links a { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, transparent); text-decoration: none; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--muted); flex: none; display: grid; place-items: center; font-size: 15px; color: #fff; }
.check.on { background: var(--accent); border-color: var(--accent); }
.legal h3 { font-size: 16px; margin: 18px 0 4px; }
.legal p { margin: 0; color: var(--muted); font-size: 14px; }
.gate .sheet { max-height: 100vh; height: 100vh; border-radius: 0; }
.ack { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 12px; font-size: 14px; }
.ack input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: 14px; background: var(--card); padding: 10px 16px; border-radius: 999px; box-shadow: 0 4px 16px rgba(0,0,0,.2); z-index: 50; font-weight: 600; font-size: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; }
.chips button { flex: none; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 14px; font-weight: 600; }
.ai-result b { display: block; margin-top: 10px; }
