:root {
  --forest: #14532d;
  --forest-2: #1d6b3d;
  --forest-3: #e3efe5;
  --leaf: #8cc63f;
  --amber: #f59e0b;
  --orange: #f08a24;
  --orange-soft: #fff1e0;
  --cream: #faf7f0;
  --sand: #f2ede1;
  --ink: #15241a;
  --muted: #687569;
  --line: #e5e0d2;
  --card: #ffffff;
  --red: #e5533d;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(20, 40, 25, .06), 0 8px 24px rgba(20, 40, 25, .08);
  --shadow-lg: 0 24px 60px rgba(15, 45, 25, .22);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --head: 'Outfit', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
a { color: var(--forest-2); }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- desktop stage ---------- */
.stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 28px 40px;
  background:
    radial-gradient(900px 500px at 105% 110%, rgba(20, 83, 45, .16), transparent 60%),
    radial-gradient(700px 420px at -10% -10%, rgba(140, 198, 63, .16), transparent 60%),
    var(--cream);
}
.showcase {
  width: min(600px, 46vw);
  border-radius: 28px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: rise .9s var(--ease) both;
}
.sc-hero { position: relative; height: 330px; overflow: hidden; }
.sc-hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; transform: scale(1.08); animation: kenburns 18s ease-in-out infinite alternate; }
.sc-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 30, 15, .78) 0%, rgba(8, 30, 15, .35) 52%, transparent 80%); }
.sc-brand { position: absolute; top: 24px; left: 28px; display: flex; align-items: center; gap: 10px; color: #fff; font: 700 22px var(--head); }
.sc-title { position: absolute; left: 28px; bottom: 58px; color: #fff; font-size: 52px; line-height: .98; font-weight: 800; }
.sc-title em { font-style: normal; color: var(--leaf); }
.sc-sub { position: absolute; left: 30px; bottom: 24px; color: #f4f1e6; font: 600 18px var(--head); }
.sc-body { padding: 22px 28px 18px; display: grid; gap: 18px; }
.sc-live { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--forest-3); }
.sc-live-gauge { position: relative; width: 104px; flex: none; }
.sc-live-gauge svg { width: 104px; }
.sc-arc { transition: stroke-dashoffset 1.6s var(--ease); }
.sc-score { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font: 800 26px var(--head); color: var(--forest); }
.sc-k { font: 600 12px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sc-v { font: 600 16px var(--head); color: var(--forest); margin-top: 3px; }
.sc-note { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.sc-demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.demo-card { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: #fff; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.demo-card:hover { transform: translateY(-2px); border-color: var(--forest-2); box-shadow: var(--shadow); }
.demo-card img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.demo-card b { display: block; font-size: 14px; }
.demo-card small { color: var(--muted); font-size: 12px; }
.sc-pass { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sc-pass code { background: var(--sand); padding: 3px 8px; border-radius: 8px; color: var(--ink); font-weight: 600; }
.copy { font-size: 12px; font-weight: 600; color: var(--forest-2); padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); }
.sc-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.sc-points li { display: flex; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.sc-points b { color: var(--ink); }
.sc-points i { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--forest-3); color: var(--forest); display: grid; place-items: center; }
.sc-points i svg { width: 17px; height: 17px; }
.sc-foot { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

.device {
  position: relative;
  width: 400px;
  height: min(860px, calc(100vh - 56px));
  border-radius: 52px;
  padding: 12px;
  background: #101611;
  box-shadow: 0 0 0 2px #2b332d, var(--shadow-lg), inset 0 0 0 1px #3a443c;
  flex: none;
  animation: rise .9s .12s var(--ease) both;
}
.device-notch { position: absolute; top: 22px; left: 50%; width: 112px; height: 30px; margin-left: -56px; background: #101611; border-radius: 20px; z-index: 50; }
.app { position: relative; height: 100%; border-radius: 41px; overflow: hidden; background: var(--cream); isolation: isolate; }
.device .app { --safe-t: 44px; }

body.wide .showcase, body.wide .device-notch { display: none; }
body.wide .device { width: min(1240px, 100%); height: calc(100vh - 56px); border-radius: 26px; padding: 0; background: transparent; box-shadow: var(--shadow-lg); }
body.wide .app { border-radius: 26px; }
body.wide .device .app { --safe-t: 0px; }

@media (max-width: 1100px) {
  .showcase { display: none; }
}
@media (max-width: 560px), (max-height: 640px) {
  .stage { padding: 0; display: block; }
  .device, body.wide .device { width: 100%; height: 100vh; height: 100dvh; border-radius: 0; padding: 0; background: transparent; box-shadow: none; animation: none; }
  .device-notch { display: none; }
  .app, body.wide .app { border-radius: 0; }
  .device .app { --safe-t: env(safe-area-inset-top, 0px); }
}

/* ---------- app frame ---------- */
.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: var(--safe-t);
  padding-bottom: calc(96px + var(--safe-b));
  scrollbar-width: none;
  animation: viewIn .45s var(--ease) both;
}
.view::-webkit-scrollbar { display: none; }
.view.no-tabs { padding-bottom: calc(24px + var(--safe-b)); }
.view.leaving { animation: viewOut .25s ease both; pointer-events: none; }

.topbar { position: sticky; top: calc(-1 * var(--safe-t)); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 18px 10px; background: rgba(250, 247, 240, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topbar h2 { font-size: 20px; flex: 1; }
.topbar .center { flex: 1; text-align: center; font: 700 18px var(--head); }
.brand { display: flex; align-items: center; gap: 8px; font: 800 22px var(--head); color: var(--forest); flex: 1; }
.logo-mark { width: 30px; height: 30px; background: url(/icons/leaf.svg) center/contain no-repeat; flex: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; position: relative; background: #fff; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.ghost { background: transparent; box-shadow: none; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--red); color: #fff; font: 700 11px/18px var(--body); text-align: center; border: 2px solid var(--cream); animation: pop .4s var(--ease); }
.loc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 0 18px; margin-top: -2px; }
.loc-chip svg { width: 14px; height: 14px; color: var(--forest-2); }

.section { padding: 0 18px; margin-top: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.section-head h3 { font-size: 19px; }
.section-head button { font-size: 13px; font-weight: 600; color: var(--forest-2); }

/* entropy gauge */
.pulse-card { margin: 12px 18px 0; padding: 18px 18px 16px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.gauge { position: relative; width: 230px; margin: 0 auto; }
.gauge svg { width: 100%; display: block; overflow: visible; }
.gauge .track { stroke: #edeee6; }
.gauge .fill { transition: stroke-dashoffset 1.6s var(--ease); }
.gauge .knob { transition: transform 1.6s var(--ease); }
.gauge-label { position: absolute; left: 0; right: 0; top: 46px; text-align: center; }
.gauge-label small { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.gauge-label b { display: block; font: 800 50px/1 var(--head); color: var(--forest); margin: 2px 0; }
.gauge-label span { font-size: 13px; color: var(--muted); }
.pulse-row { display: flex; gap: 10px; margin-top: 8px; position: relative; z-index: 1; }
.pulse-stat { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--forest-3); }
.pulse-stat svg { width: 22px; height: 22px; color: var(--forest); flex: none; }
.pulse-stat b { font: 800 22px/1 var(--head); color: var(--forest); display: block; }
.pulse-stat small { font-size: 11.5px; color: var(--muted); }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--forest-3); color: var(--forest); }
.trend.up { background: #fde8e4; color: #b4382a; }
.pulse-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; position: relative; z-index: 1; }
.pulse-top .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.spark { width: 100%; height: 34px; margin-top: 10px; position: relative; z-index: 1; }
.info-btn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.info-btn svg { width: 16px; height: 16px; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 16px 18px 0; }
.quick button { display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.quick span.q { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--forest); box-shadow: 0 8px 18px rgba(20, 83, 45, .25); transition: transform .25s var(--ease); }
.quick button:active span.q { transform: scale(.9); }
.quick span.q.amber { background: var(--orange); box-shadow: 0 8px 18px rgba(240, 138, 36, .3); }
.quick span.q svg { width: 24px; height: 24px; }

/* chips + segmented */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 18px 4px; margin: 0 -18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: background .25s, color .25s, border-color .25s, transform .2s; }
.chip svg { width: 16px; height: 16px; }
.chip.on { background: var(--forest); color: #fff; border-color: var(--forest); }
.chip:active { transform: scale(.95); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: var(--sand); position: relative; }
.seg button { height: 38px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); position: relative; z-index: 1; transition: color .3s; }
.seg button.on { color: var(--forest); }
.seg .thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); transition: transform .35s var(--ease), width .35s var(--ease); }
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; background: none; flex: 1; font-size: 15px; min-width: 0; }
.filters { display: grid; gap: 10px; }
.meta-line { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.meta-line .dot { width: 7px; height: 7px; border-radius: 50%; background: #22a35a; box-shadow: 0 0 0 4px rgba(34, 163, 90, .16); animation: breathe 2.4s infinite; }

/* cards */
.cards { display: grid; gap: 12px; margin-top: 12px; }
.card { display: flex; gap: 12px; padding: 10px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); text-align: left; width: 100%; transition: transform .25s var(--ease), box-shadow .25s; animation: cardIn .5s var(--ease) both; }
.card:active { transform: scale(.985); }
.card .ph { width: 92px; height: 92px; border-radius: 15px; object-fit: cover; flex: none; background: var(--sand); }
.card .ph.empty { display: grid; place-items: center; color: var(--forest-2); }
.card .ph.empty svg { width: 30px; height: 30px; }
.card .bd { min-width: 0; flex: 1; display: grid; align-content: start; gap: 5px; }
.card h4 { font-size: 16px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.who { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.who img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.who .star { color: var(--amber); font-weight: 700; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; width: max-content; }
.tag.offer { background: var(--forest-3); color: var(--forest); }
.tag.request { background: var(--orange-soft); color: #b35a0c; }
.tag.done { background: #e9e7f8; color: #4b3fa8; }
.tag.hidden, .tag.closed { background: #eee; color: #666; }
.when { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--forest); background: var(--forest-3); border-radius: 8px; padding: 3px 8px; width: max-content; }
.when svg { width: 13px; height: 13px; }
.row-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dist { font-size: 12px; color: var(--muted); display: inline-flex; gap: 3px; align-items: center; }
.dist svg { width: 13px; height: 13px; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 18px 10px; margin: 0 -18px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.mcard { flex: none; width: 210px; scroll-snap-align: start; border-radius: 20px; background: #fff; box-shadow: var(--shadow); overflow: hidden; text-align: left; animation: cardIn .5s var(--ease) both; }
.mcard > img, .mcard > .ph { width: 100%; height: 118px; object-fit: cover; background: var(--sand); }
.mcard .bd { padding: 10px 12px 12px; display: grid; gap: 5px; }
.mcard h4 { font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.skeleton { border-radius: 20px; height: 112px; background: linear-gradient(90deg, #efebe0 0%, #f7f4ec 50%, #efebe0 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.empty-state { text-align: center; padding: 34px 20px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty-state svg { width: 46px; height: 46px; color: var(--forest-2); opacity: .7; }
.empty-state b { color: var(--ink); font: 700 17px var(--head); }

/* tab bar */
.tabbar { position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); height: 70px; border-radius: 26px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(20, 40, 25, .16); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; z-index: 40; transition: transform .4s var(--ease), opacity .3s; }
.tabbar.hide { transform: translateY(120%); opacity: 0; pointer-events: none; }
.tabbar button { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; transition: color .25s; }
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button.on { color: var(--forest); }
.tabbar button.on::before { content: ''; position: absolute; top: -9px; width: 22px; height: 4px; border-radius: 4px; background: var(--forest); animation: pop .35s var(--ease); }
.tabbar .fab { width: 58px; height: 58px; border-radius: 20px; margin: -26px auto 0; background: linear-gradient(145deg, var(--forest-2), var(--forest)); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 24px rgba(20, 83, 45, .35); transition: transform .25s var(--ease); }
.tabbar .fab svg { width: 28px; height: 28px; }
.tabbar .fab:active { transform: scale(.9) rotate(90deg); }
.tabbar .dotb { position: absolute; top: -2px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }

.to-top { position: absolute; left: 18px; bottom: calc(96px + var(--safe-b)); z-index: 35; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--forest); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

/* buttons + forms */
.btn { height: 54px; border-radius: 18px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 16px var(--head); background: var(--forest); color: #fff; width: 100%; box-shadow: 0 10px 22px rgba(20, 83, 45, .22); transition: transform .2s var(--ease), opacity .2s, background .2s; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn svg { width: 20px; height: 20px; }
.btn.amber { background: var(--orange); box-shadow: 0 10px 22px rgba(240, 138, 36, .28); }
.btn.light { background: #fff; color: var(--forest); box-shadow: var(--shadow); }
.btn.line { background: transparent; color: var(--forest); border: 1.5px solid rgba(20, 83, 45, .25); box-shadow: none; }
.btn.small { white-space: nowrap; height: 40px; font-size: 14px; border-radius: 13px; width: auto; padding: 0 14px; }
.btn.danger { background: #fff; color: #b4382a; box-shadow: none; border: 1.5px solid #f2cfc8; }
.field { display: grid; gap: 7px; }
.field label, .label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.input { height: 52px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; padding: 0 16px; font-size: 16px; outline: none; width: 100%; transition: border-color .2s, box-shadow .2s; }
textarea.input { height: 96px; padding: 14px 16px; resize: none; line-height: 1.45; }
.input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 4px rgba(29, 107, 61, .12); }
.form { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.hint { font-size: 13px; color: var(--muted); line-height: 1.45; }
.err { color: #b4382a; font-size: 13.5px; font-weight: 600; min-height: 1px; }
.demo-code { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: #fff7e6; border: 1px dashed #f3c46b; font-size: 13.5px; animation: pop .4s var(--ease); }
.demo-code > svg { width: 20px; height: 20px; flex: none; color: #b07a10; }
.demo-code b { font: 800 20px var(--head); letter-spacing: .18em; color: #8a5a00; }
.code-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-inputs input { height: 56px; text-align: center; font: 800 22px var(--head); padding: 0; }
.toggle { position: relative; width: 50px; height: 30px; border-radius: 15px; background: #d9d6cb; transition: background .25s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .3s var(--ease); }
.toggle.on { background: var(--forest-2); }
.toggle.on::after { transform: translateX(20px); }
input[type=range] { width: 100%; accent-color: var(--forest-2); }

/* welcome */
.welcome { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--forest); color: #fff; overflow: hidden; }
.welcome .photo { position: absolute; inset: 0 0 38% 0; overflow: hidden; }
.welcome .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 40%; animation: kenburns 20s ease-in-out infinite alternate; }
.welcome .photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 35, 18, .25) 0%, rgba(10, 35, 18, 0) 30%, rgba(20, 83, 45, .55) 70%, var(--forest) 100%); }
.welcome .inner { position: relative; margin-top: auto; padding: 0 24px calc(28px + var(--safe-b)); display: grid; gap: 14px; }
.welcome .wb { position: absolute; top: calc(var(--safe-t) + 14px); left: 24px; display: flex; align-items: center; gap: 8px; font: 800 22px var(--head); z-index: 2; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.welcome h1 { font-size: 46px; line-height: .98; font-weight: 800; }
.welcome h1 em { font-style: normal; color: var(--leaf); }
.welcome p.lead { color: #e2ecdf; font-size: 15.5px; line-height: 1.5; }
.welcome .btn.light { box-shadow: none; }
.welcome .btn.line { color: #fff; border-color: rgba(255, 255, 255, .4); }
.demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-row button { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); text-align: left; font-size: 12px; color: #eaf3e6; transition: background .2s; }
.demo-row button:hover { background: rgba(255, 255, 255, .2); }
.demo-row img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.demo-row b { display: block; font-size: 13px; color: #fff; }
.welcome .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #b9d3b9; font-weight: 700; }
.steps { display: flex; gap: 6px; }
.steps i { height: 4px; flex: 1; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.steps i.on::after { content: ''; display: block; height: 100%; background: #fff; animation: stepfill 4.5s linear both; }
.steps i.done { background: #fff; }
.slide-text { min-height: 150px; }
.slide-text > * { animation: fadeUp .6s var(--ease) both; }

.auth { padding: calc(var(--safe-t) + 8px) 22px 30px; display: grid; gap: 18px; }
.auth h2 { font-size: 30px; line-height: 1.05; }
.auth .sub { color: var(--muted); font-size: 15px; margin-top: 6px; line-height: 1.5; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* post detail */
.detail-hero { position: relative; height: 300px; background: var(--sand); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .ph.empty { height: 100%; display: grid; place-items: center; color: var(--forest-2); }
.detail-hero .ph.empty svg { width: 70px; height: 70px; opacity: .5; }
.detail-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28), transparent 30%); pointer-events: none; }
.detail-hero .bar { position: absolute; top: calc(var(--safe-t) + 10px); left: 16px; right: 16px; display: flex; justify-content: space-between; z-index: 2; }
.detail-body { position: relative; margin-top: -28px; border-radius: 28px 28px 0 0; background: var(--cream); padding: 20px 18px 0; display: grid; gap: 14px; }
.detail-body h1 { font-size: 27px; line-height: 1.1; }
.owner { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-align: left; width: 100%; }
.owner img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.owner b { display: block; font-size: 15px; }
.owner small { color: var(--muted); font-size: 12.5px; }
.owner .vf { color: var(--forest-2); display: inline-flex; vertical-align: -3px; }
.owner .vf svg { width: 16px; height: 16px; }
.facts { display: grid; gap: 10px; }
.fact { display: flex; gap: 12px; align-items: center; }
.fact .fi { width: 40px; height: 40px; border-radius: 13px; background: var(--forest-3); color: var(--forest); display: grid; place-items: center; flex: none; }
.fact .fi.amber { background: var(--orange-soft); color: var(--orange); }
.fact .fi svg { width: 20px; height: 20px; }
.fact b { display: block; font-size: 15px; }
.fact small { color: var(--muted); font-size: 12.5px; }
.desc { font-size: 15px; line-height: 1.6; color: #2c3a30; }
.mini-map { height: 150px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.match-banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: #fff7e6; font-weight: 600; font-size: 14.5px; color: #7a4a00; }
.match-banner .ico { width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: #fff; display: grid; place-items: center; flex: none; }
.match-banner .ico svg { width: 16px; height: 16px; }
.people { display: grid; gap: 2px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.person { display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-align: left; width: 100%; transition: background .2s; }
.person:hover { background: #faf8f3; }
.person + .person { border-top: 1px solid #f1ede3; }
.person img, .avatar-ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.person b { display: block; font-size: 14.5px; }
.person small { color: var(--muted); font-size: 12.5px; }
.person .go { margin-left: auto; color: var(--muted); }
.person .go svg { width: 18px; height: 18px; }
.sticky-cta { position: sticky; bottom: 0; padding: 14px 18px calc(14px + var(--safe-b)); background: linear-gradient(180deg, rgba(250, 247, 240, 0), var(--cream) 30%); display: flex; gap: 10px; z-index: 5; margin-top: 8px; }
.report-link { justify-self: center; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.report-link svg { width: 14px; height: 14px; }

/* map */
.map-wrap { position: absolute; inset: 0; }
#map { position: absolute; inset: 0; background: #e8eadf; }
.map-top { position: absolute; top: calc(var(--safe-t) + 10px); left: 14px; right: 14px; z-index: 500; display: grid; gap: 10px; }
.map-top .row { display: flex; gap: 8px; align-items: center; }
.map-top .chip { box-shadow: var(--shadow); border: 0; }
.map-legend { position: absolute; bottom: calc(96px + var(--safe-b)); left: 14px; z-index: 500; display: flex; gap: 8px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 13px; font-weight: 600; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; }
.map-card { position: absolute; left: 14px; right: 14px; bottom: calc(92px + var(--safe-b)); z-index: 600; animation: sheetIn .4s var(--ease) both; }
.map-card .card { box-shadow: var(--shadow-lg); }
.pin { width: 38px; height: 46px; position: relative; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); animation: pinDrop .5s var(--ease) both; }
.pin svg { width: 38px; height: 46px; }
.pin .glyph { position: absolute; top: 8px; left: 9px; width: 20px; height: 20px; color: #fff; }
.home-pin { width: 46px; height: 46px; border-radius: 50%; background: var(--forest); border: 4px solid #fff; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 10px rgba(20, 83, 45, .16), 0 6px 14px rgba(0, 0, 0, .25); }
.home-pin svg { width: 20px; height: 20px; }
.leaflet-container { font-family: var(--body); }
.leaflet-tile-pane { filter: saturate(.55) sepia(.12) brightness(1.04) contrast(.96); }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255, 255, 255, .7) !important; }
.leaflet-top.leaflet-left { display: none; }

/* compose */
.photo-pick { height: 170px; border-radius: 20px; border: 2px dashed #cfd8c8; background: #f4f7ef; display: grid; place-items: center; color: var(--forest-2); position: relative; overflow: hidden; text-align: center; font-weight: 600; font-size: 14px; transition: border-color .2s; }
.photo-pick:hover { border-color: var(--forest-2); }
.photo-pick svg { width: 32px; height: 32px; margin: 0 auto 6px; }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fadeIn .4s both; }
.photo-pick .pill { position: absolute; right: 10px; bottom: 10px; background: #fff; color: var(--forest); font-size: 12px; padding: 5px 10px; border-radius: 999px; box-shadow: var(--shadow); }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.compose-map { height: 170px; border-radius: 18px; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.compose-map .hint-pill { position: absolute; z-index: 500; left: 10px; top: 10px; background: #fff; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
.custom-when { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.custom-when .input { height: 46px; font-size: 14px; padding: 0 10px; }

/* chat */
.chat { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: var(--safe-t); background: var(--cream); animation: viewIn .45s var(--ease) both; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(250, 247, 240, .9); }
.chat-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-head b { display: block; font-size: 15.5px; }
.chat-head small { color: var(--forest-2); font-size: 12px; font-weight: 600; }
.chat-post { display: flex; align-items: center; gap: 10px; margin: 10px 14px 0; padding: 8px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); text-align: left; }
.chat-post img, .chat-post .ph { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; background: var(--sand); }
.chat-post b { font-size: 14px; display: block; }
.chat-post .btn { margin-left: auto; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }
.msgs::-webkit-scrollbar { display: none; }
.msg { max-width: 78%; padding: 10px 13px; border-radius: 18px 18px 18px 6px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); font-size: 14.5px; line-height: 1.42; animation: msgIn .35s var(--ease) both; }
.msg.mine { align-self: flex-end; background: var(--forest-2); color: #fff; border-radius: 18px 18px 6px 18px; }
.msg time { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }
.day-sep { align-self: center; font-size: 11px; color: var(--muted); background: var(--sand); padding: 3px 10px; border-radius: 999px; margin: 6px 0; }
.sys { align-self: center; text-align: center; font-size: 13px; color: var(--forest); background: var(--forest-3); padding: 8px 14px; border-radius: 14px; font-weight: 600; }
.composer { display: flex; gap: 8px; padding: 10px 12px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff; }
.composer input { flex: 1; height: 46px; border-radius: 23px; border: 1.5px solid var(--line); padding: 0 16px; outline: none; font-size: 15px; background: var(--cream); }
.composer input:focus { border-color: var(--forest-2); }
.composer button { width: 46px; height: 46px; border-radius: 50%; background: var(--forest-2); color: #fff; display: grid; place-items: center; transition: transform .2s; }
.composer button:active { transform: scale(.9); }
.composer button svg { width: 20px; height: 20px; }
.thanks-card { align-self: stretch; margin: 6px 0; padding: 16px; border-radius: 20px; background: var(--forest-3); text-align: center; display: grid; gap: 8px; justify-items: center; animation: pop .5s var(--ease); }
.thanks-card h4 { font-size: 19px; color: var(--forest); }
.thanks-card svg.heart { width: 26px; height: 26px; color: var(--forest); }
.stars { display: flex; gap: 6px; }
.stars button { font-size: 30px; line-height: 1; color: #d8d4c6; transition: transform .2s var(--ease), color .2s; }
.stars button.on { color: var(--amber); }
.stars button:active { transform: scale(1.3); }

/* lists */
.list { display: grid; gap: 10px; }
.thread { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-align: left; width: 100%; animation: cardIn .45s var(--ease) both; }
.thread .av { position: relative; flex: none; }
.thread .av img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.thread .av .pimg { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #fff; object-fit: cover; background: var(--sand); }
.thread .tx { min-width: 0; flex: 1; }
.thread b { font-size: 15px; }
.thread p { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.thread time { font-size: 11.5px; color: var(--muted); flex: none; align-self: start; margin-top: 4px; }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-align: left; width: 100%; animation: cardIn .45s var(--ease) both; }
.notif.unread { box-shadow: inset 4px 0 0 var(--forest-2), var(--shadow); }
.notif .ni { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--forest-3); color: var(--forest); flex: none; }
.notif .ni.match { background: #fff3dc; color: #c27606; }
.notif .ni.thanks { background: #fde8ef; color: #c2346b; }
.notif .ni.report { background: #fde8e4; color: #b4382a; }
.notif .ni svg { width: 20px; height: 20px; }
.notif b { font-size: 14.5px; display: block; line-height: 1.3; }
.notif p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.notif time { font-size: 11.5px; color: var(--muted); display: block; margin-top: 4px; }
.push-cta { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, var(--forest), var(--forest-2)); color: #fff; margin-bottom: 4px; }
.push-cta svg { width: 26px; height: 26px; flex: none; }
.push-cta p { font-size: 13px; opacity: .85; margin-top: 2px; }
.push-cta .btn { width: auto; margin-left: auto; height: 38px; font-size: 13.5px; box-shadow: none; }

/* profile */
.prof-head { padding: calc(var(--safe-t) + 18px) 18px 22px; background: linear-gradient(160deg, var(--forest) 0%, #1f7a45 100%); color: #fff; border-radius: 0 0 30px 30px; position: relative; overflow: hidden; }
.prof-top { display: flex; gap: 14px; align-items: center; position: relative; z-index: 1; }
.prof-top img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, .7); }
.prof-top h2 { font-size: 24px; }
.prof-top p { font-size: 13.5px; opacity: .85; margin-top: 2px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.badges span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.badges svg { width: 13px; height: 13px; }
.prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.prof-stats div { background: rgba(255, 255, 255, .12); border-radius: 16px; padding: 10px; text-align: center; }
.prof-stats b { display: block; font: 800 22px var(--head); }
.prof-stats small { font-size: 11.5px; opacity: .85; }
.wall { display: grid; gap: 10px; }
.wall .t { padding: 12px 14px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); display: grid; gap: 6px; }
.wall .t .who img { width: 24px; height: 24px; }
.wall .t p { font-size: 14px; line-height: 1.45; }
.settings { background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.set { display: flex; align-items: center; gap: 12px; padding: 14px; width: 100%; text-align: left; }
.set + .set { border-top: 1px solid #f1ede3; }
.set .si { width: 36px; height: 36px; border-radius: 11px; background: var(--forest-3); color: var(--forest); display: grid; place-items: center; flex: none; }
.set .si svg { width: 18px; height: 18px; }
.set .tx { flex: 1; min-width: 0; }
.set > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.set b { font-size: 14.5px; display: block; }
.set small { font-size: 12.5px; color: var(--muted); }
.set.col { display: grid; }
.credit { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 0 6px; }

/* sheets + toasts + overlays */
.scrim { position: absolute; inset: 0; background: rgba(12, 25, 15, .45); z-index: 80; animation: fadeIn .3s both; }
.scrim.out { animation: fadeOut .25s both; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--cream); border-radius: 28px 28px 0 0; padding: 10px 20px calc(22px + var(--safe-b)); max-height: 88%; overflow-y: auto; animation: sheetIn .45s var(--ease) both; box-shadow: 0 -10px 40px rgba(0, 0, 0, .15); }
.sheet.out { animation: sheetOut .3s ease both; }
.sheet .grab { width: 42px; height: 5px; border-radius: 3px; background: #d6d1c3; margin: 0 auto 14px; }
.sheet h3 { font-size: 22px; margin-bottom: 6px; }
.sheet .form { margin-top: 14px; }
.toast { position: absolute; left: 16px; right: 16px; top: calc(var(--safe-t) + 10px); z-index: 120; padding: 13px 16px; border-radius: 18px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); animation: toastIn .45s var(--ease) both; cursor: pointer; }
.toast.out { animation: toastOut .3s ease both; }
.toast svg { width: 20px; height: 20px; flex: none; color: var(--leaf); }
.toast small { display: block; opacity: .7; font-size: 12.5px; margin-top: 1px; }

.celebrate { position: absolute; inset: 0; z-index: 110; background: radial-gradient(circle at 50% 40%, #1f7a45 0%, var(--forest) 60%, #0d3a1f 100%); color: #fff; display: grid; place-items: center; text-align: center; padding: 30px; animation: fadeIn .4s both; overflow: hidden; }
.celebrate.out { animation: fadeOut .35s both; }
.celebrate > div { position: relative; z-index: 2; }
.celebrate h2 { font-size: 32px; line-height: 1.05; margin-top: 10px; }
.celebrate p { opacity: .85; margin-top: 8px; font-size: 15px; line-height: 1.5; }
.celebrate .gauge-label b, .celebrate .gauge-label small { color: #fff; }
.celebrate .gauge-label span { color: #cfe3cf; }
.celebrate .gauge .track { stroke: rgba(255, 255, 255, .15); }
.celebrate .btn { margin-top: 22px; }
.leafy { position: absolute; z-index: 1; opacity: .75; top: -40px; width: 22px; height: 22px; background: url(/icons/leaf.svg) center/contain no-repeat; animation: fall linear both; pointer-events: none; }

/* admin */
.adm { padding: calc(var(--safe-t) + 4px) 18px 30px; }
.adm-head { display: flex; align-items: center; gap: 12px; padding: 12px 0 16px; }
.adm-head h2 { font-size: 22px; flex: 1; line-height: 1.1; }
@media (max-width: 700px) { .mod { flex-wrap: wrap; } .mod .acts { width: 100%; justify-content: flex-start; padding-left: 64px; } }
.adm-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { padding: 14px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); animation: cardIn .45s var(--ease) both; }
.kpi small { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi b { display: block; font: 800 28px/1.1 var(--head); color: var(--forest); margin-top: 4px; }
.kpi span { font-size: 12px; color: var(--muted); }
.panel { padding: 16px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); margin-top: 12px; }
.panel h4 { font-size: 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bars i { width: 100%; display: block; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--leaf), var(--forest-2)); transform-origin: bottom; animation: grow .9s var(--ease) both; min-height: 4px; }
.bars small { font-size: 10px; color: var(--muted); }
.catbar { display: grid; grid-template-columns: 74px 1fr 30px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.catbar .tr { height: 10px; border-radius: 5px; background: var(--sand); overflow: hidden; }
.catbar .tr i { display: block; height: 100%; border-radius: 5px; background: var(--forest-2); transform-origin: left; animation: growX .9s var(--ease) both; }
.area-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #f1ede3; font-size: 14px; }
.area-row:first-of-type { border-top: 0; }
.score-pill { font: 800 15px var(--head); padding: 4px 10px; border-radius: 10px; }
.mod { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #f1ede3; }
.mod:first-of-type { border-top: 0; }
.mod img, .mod .ph { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--sand); flex: none; }
.mod .tx { flex: 1; min-width: 0; }
.mod b { font-size: 14.5px; display: block; }
.mod small { font-size: 12.5px; color: var(--muted); display: block; }
.mod .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.adm-grid { display: grid; gap: 12px; }
body.wide .adm { padding: 22px 30px 40px; }
body.wide .kpis { grid-template-columns: repeat(4, 1fr); }
body.wide .adm-grid { grid-template-columns: 1.4fr 1fr; }
body.wide .adm-grid .panel { margin-top: 0; }

/* animations */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes kenburns { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.14) translate(-2%, -1%); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes viewOut { to { opacity: 0; transform: translateY(-8px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px rgba(34, 163, 90, 0); } }
@keyframes pinDrop { from { opacity: 0; transform: translateY(-24px); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes stepfill { from { width: 0; } to { width: 100%; } }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
