:root {
  --forest-950: #10271e;
  --forest-900: #173c2c;
  --forest-800: #21533d;
  --forest-700: #2e6b50;
  --forest-100: #e8f1ec;
  --cream: #f7f3e8;
  --paper: #fffdf7;
  --ink: #1d2821;
  --muted: #566159;
  --moss: #97ad67;
  --amber: #d49b47;
  --danger: #a3453f;
  --line: #dfe4dd;
  --shadow: 0 10px 28px rgba(16,39,30,.10);
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #dfe7e2; color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { display: flex; justify-content: center; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100%, 480px); min-height: 100dvh; background: var(--cream); position: relative; box-shadow: 0 0 40px rgba(0,0,0,.12); padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.topbar { height: 72px; padding: 12px 18px; display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; align-items: center; position: sticky; top: 0; z-index: 20; background: rgba(247,243,232,.94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(23,60,44,.06); }
.avatar { width: 40px; height: 40px; border: none; border-radius: 50%; background: var(--forest-900); color: white; font-size: 12px; font-weight: 800; }
.brand-wrap { display: flex; justify-content: center; align-items: center; gap: 8px; }
.brand-mark { font-size: 25px; }
.brand { font-weight: 900; letter-spacing: -.3px; line-height: 1; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; text-transform: uppercase; letter-spacing: .8px; }
.icon-button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--forest-900); font-size: 23px; }
.content { padding: 18px 16px 28px; }
.hero { background: linear-gradient(135deg, var(--forest-950), var(--forest-700)); color: white; border-radius: 28px; padding: 24px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero::after { content: "🍄"; position: absolute; right: -12px; bottom: -28px; font-size: 120px; opacity: .10; transform: rotate(-12deg); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: .75; }
.hero h1 { margin: 8px 0 6px; font-size: 30px; line-height: 1.08; letter-spacing: -.8px; }
.hero p { margin: 0; color: rgba(255,255,255,.82); line-height: 1.45; max-width: 320px; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; position: relative; z-index: 1; }
.primary, .secondary, .ghost, .danger-btn { border: none; border-radius: 14px; padding: 12px 16px; font-weight: 800; }
.primary { background: white; color: var(--forest-950); }
.secondary { background: var(--forest-900); color: white; }
.ghost { background: var(--forest-100); color: var(--forest-900); }
.danger-btn { background: #f3dedb; color: var(--danger); }
.section-head { margin: 24px 2px 12px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.4px; }
.section-head small { color: var(--muted); }
.link-button { border: 0; background: transparent; color: var(--forest-700); font-weight: 800; padding: 4px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-card { background: var(--paper); padding: 16px 12px; border-radius: 18px; border: 1px solid rgba(23,60,44,.08); box-shadow: 0 6px 18px rgba(16,39,30,.05); }
.stat-card strong { display: block; font-size: 21px; letter-spacing: -.5px; }
.stat-card span { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); }
.card { background: var(--paper); border-radius: var(--radius); border: 1px solid rgba(23,60,44,.08); padding: 16px; box-shadow: 0 6px 18px rgba(16,39,30,.05); }
.card + .card { margin-top: 10px; }
.trip-card { display: grid; grid-template-columns: 50px 1fr auto; align-items: center; gap: 12px; }
.trip-icon { width: 50px; height: 50px; border-radius: 16px; background: var(--forest-100); display: grid; place-items: center; font-size: 23px; }
.trip-title { font-weight: 850; }
.trip-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.trip-score { text-align: right; }
.trip-score strong { display: block; color: var(--forest-900); }
.trip-score small { color: var(--muted); }
.active-trip { border: 2px solid var(--forest-700); background: #f0f6f2; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 10px; background: var(--forest-100); color: var(--forest-900); font-size: 12px; font-weight: 800; }
.pill.amber { background: #f7ead6; color: #785116; }
.pill.red { background: #f4e2df; color: var(--danger); }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-card { min-height: 110px; padding: 16px; border-radius: 20px; border: 0; text-align: left; background: var(--paper); box-shadow: 0 6px 18px rgba(16,39,30,.05); }
.quick-card .qicon { display: block; font-size: 25px; margin-bottom: 18px; }
.quick-card strong { display: block; }
.quick-card small { color: var(--muted); display: block; margin-top: 4px; }
.bottom-nav { height: calc(72px + env(safe-area-inset-bottom)); padding: 7px 12px calc(7px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); align-items: center; position: fixed; bottom: 0; width: min(100%, 480px); z-index: 30; background: rgba(255,253,247,.96); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.nav-item { border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); gap: 3px; min-height: 52px; }
.nav-item span { font-size: 21px; line-height: 1; }
.nav-item small { font-size: 12px; }
.nav-item.active { color: var(--forest-900); font-weight: 900; }
.start-nav span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--forest-900); color: white; box-shadow: 0 8px 16px rgba(23,60,44,.25); font-size: 15px; }
.page-title { margin: 2px 0 4px; font-size: 28px; letter-spacing: -.7px; }
.page-sub { margin: 0 0 18px; color: var(--muted); line-height: 1.45; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .big { font-size: 42px; display: block; margin-bottom: 10px; }
.feed-card { overflow: hidden; padding: 0; }
.feed-photo { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #dce6df; display: block; }
.feed-body { padding: 14px 16px 16px; }
.feed-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.feed-author { font-weight: 850; }
.feed-time { color: var(--muted); font-size: 12px; }
.feed-copy { margin: 10px 0; line-height: 1.45; }
.feed-actions { display: flex; gap: 10px; color: var(--muted); font-size: 13px; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-card { background: var(--paper); border-radius: 20px; overflow: hidden; border: 1px solid rgba(23,60,44,.08); }
.product-image { aspect-ratio: 1.25; background: linear-gradient(135deg,#e8efe6,#d7e0d4); display: grid; place-items: center; font-size: 48px; }
.product-body { padding: 12px; }
.product-body strong { display: block; font-size: 14px; }
.product-body small { display: block; color: var(--muted); margin-top: 4px; }
.product-price { margin-top: 9px; font-weight: 900; color: var(--forest-900); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 800; color: var(--forest-900); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #cfd8d0; border-radius: 13px; background: white; padding: 12px 13px; color: var(--ink); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--forest-700); box-shadow: 0 0 0 3px rgba(46,107,80,.10); }
.field textarea { min-height: 90px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(8,22,16,.58); display: flex; align-items: end; justify-content: center; }
.modal { width: min(100%,480px); max-height: 88dvh; overflow-y: auto; background: var(--cream); border-radius: 28px 28px 0 0; padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: white; font-size: 20px; }
.toast { position: fixed; left: 50%; bottom: 95px; transform: translateX(-50%) translateY(18px); background: var(--forest-950); color: white; padding: 11px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 200; max-width: calc(100% - 36px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.location-box { background: #edf4ef; border-radius: 16px; padding: 12px; font-size: 13px; color: var(--forest-900); line-height: 1.45; }
.map-placeholder { min-height: 220px; border-radius: 22px; background: radial-gradient(circle at 30% 30%, rgba(151,173,103,.25), transparent 25%), linear-gradient(135deg,#e7eee9,#cfdccf); position: relative; overflow: hidden; border: 1px solid rgba(23,60,44,.10); }
.map-placeholder::before, .map-placeholder::after { content:""; position:absolute; inset:-20%; border:2px dashed rgba(23,60,44,.16); border-radius:45%; transform: rotate(18deg); }
.map-placeholder::after { transform: rotate(-25deg) scale(.7); }
.map-pin { position: absolute; z-index: 2; transform: translate(-50%,-100%); font-size: 28px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.16)); }
.map-label { position:absolute; left:12px; right:12px; bottom:12px; z-index:3; background:rgba(255,253,247,.92); backdrop-filter: blur(8px); border-radius:14px; padding:10px 12px; font-size:13px; color:var(--forest-900); }
.badge-list { display:flex; gap:8px; flex-wrap:wrap; }
.profile-card { display:grid; grid-template-columns:64px 1fr; gap:14px; align-items:center; }
.profile-avatar { width:64px; height:64px; border-radius:20px; background:var(--forest-900); color:white; display:grid; place-items:center; font-size:19px; font-weight:900; }
.kpi-list { display:grid; gap:8px; margin-top:12px; }
.kpi-row { display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--line); font-size:13px; }
.kpi-row:last-child { border-bottom:0; }
.notice { padding:13px 14px; border-radius:16px; background:#f7ead6; color:#6d4c1c; font-size:13px; line-height:1.45; }
hr { border:0; border-top:1px solid var(--line); margin:16px 0; }
@media (min-width: 600px) { body { padding: 18px 0; } .app-shell { min-height: calc(100dvh - 36px); border-radius: 28px; overflow: hidden; } .bottom-nav { bottom: 18px; border-radius: 0 0 28px 28px; } }

/* MVP 0.2 */
button, .button-link { min-height: 44px; }
.forest-text { color: var(--forest-700); opacity: 1; }
.section-head.compact { margin: 6px 0 8px; }
.micro-note { margin: 8px 4px 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.card-button { width: 100%; color: inherit; font: inherit; text-align: left; }
.card-button:active { transform: scale(.995); }
.location-private { margin-top: 10px; padding: 9px 10px; border-radius: 12px; background: var(--forest-100); color: var(--forest-800); font-size: 13px; }
.pill.subtle { background: #f0f1ed; color: var(--muted); }
.check-pill { justify-content: flex-start; font-size: 13px; line-height: 1.35; }
.check-pill input { width: 18px; height: 18px; }
.feed-actions { margin-top: 13px; }
.feed-action { border: 0; background: transparent; color: var(--muted); min-height: 42px; padding: 8px 6px; font-weight: 750; }
.feed-action.liked { color: var(--danger); }
.full { width: 100%; margin-top: 10px; }
.compact-hero { padding: 20px; }
.compact-hero h1 { font-size: 24px; }
.profile-name { font-size: 20px; }
.product-price.large { font-size: 28px; margin: 12px 0 18px; }
.product-modal-icon { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 42px; background: var(--forest-100); margin-bottom: 14px; }
.button-link { border: none; border-radius: 14px; padding: 12px 16px; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.direction-arrow { width: 82px; height: 82px; margin: 0 auto 10px; border-radius: 50%; background: var(--forest-900); color: white; display: grid; place-items: center; font-size: 48px; transform-origin: 50% 50%; transition: transform .25s ease; }
.direction-distance { display: block; font-size: 30px; color: var(--forest-900); margin-bottom: 6px; }
.success-hero { text-align: center; padding: 8px 8px 16px; }
.success-icon { width: 78px; height: 78px; border-radius: 26px; background: var(--forest-100); display: grid; place-items: center; font-size: 42px; margin: 0 auto 12px; }
.success-hero h2 { margin: 5px 0; font-size: 27px; }
.success-hero p { margin: 0; color: var(--muted); }
.success-stats { margin: 8px 0 12px; }
.success-list { text-align: center; margin-bottom: 10px; }
.finding-photo { margin-top: 12px; border-radius: 14px; }
.onboarding { text-align: left; }
.onboarding-icon { width: 82px; height: 82px; border-radius: 28px; background: var(--forest-100); display: grid; place-items: center; font-size: 44px; margin-bottom: 18px; }
.onboarding h2 { font-size: 28px; letter-spacing: -.6px; margin: 6px 0 8px; }
.onboarding > p { color: var(--muted); line-height: 1.55; margin: 0 0 18px; }
.onboarding-points { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 16px 0 22px; }
.onboarding-points div { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 9px; }
.onboarding-points strong { width: 26px; height: 26px; display: grid; place-items: center; background: var(--forest-900); color: white; border-radius: 50%; margin-bottom: 9px; }
.onboarding-points span { font-size: 13px; font-weight: 750; line-height: 1.25; }
.field small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.vertical-mobile { align-items: stretch; }
@media (max-width:380px){
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { display: flex; justify-content: space-between; align-items: center; }
  .stat-card span { margin-top: 0; }
  .onboarding-points { grid-template-columns: 1fr; }
}


/* MVP 0.4 — field usability & iOS install */
.icon-button, .avatar, .close, .feed-action, .nav-item { min-width: 44px; min-height: 44px; }
.close { width:44px; height:44px; }
.icon-button, .avatar { width:46px; height:46px; }
.quick-card { min-height: 92px; }
.install-steps { margin: 14px 0 0; padding-left: 22px; line-height: 1.65; }
.install-steps li { margin-bottom: 8px; }
.sync-badge { font-size:13px; }

/* MVP 0.4 stability & accessibility */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.notice.warning{background:#fff3d6;border-color:#d39b2f;color:#634408}
input[type=file]{min-height:48px;padding:10px;background:#fff}
.modal :focus-visible,.content :focus-visible,.bottom-nav :focus-visible{outline:3px solid #b65c2b;outline-offset:2px}
@media (max-width:360px){.two-col{grid-template-columns:1fr}}
