:root {
  --bg: #f3f0e8;
  --surface: #ffffff;
  --ink: #12201a;
  --ink-2: #3c4a42;
  --muted: #7b847d;
  --line: rgba(18, 32, 26, .08);
  --brand: #0f6b57;
  --brand-ink: #0a4a3c;
  --brand-soft: #e2efe9;
  --orange: #ef7a2f;
  --orange-soft: #fdeee3;
  --warm: #d5481e;
  --cool: #2c6aa8;
  --good: #2f8a4c;
  --good-soft: #e5f3e8;
  --warn: #c2571c;
  --warn-soft: #fbece2;
  --info: #2c6aa8;
  --info-soft: #e6eef7;
  --r: 22px;
  --shadow: 0 1px 2px rgba(18, 32, 26, .05), 0 8px 24px rgba(18, 32, 26, .06);
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-top: max(env(safe-area-inset-top), 14px);
  --safe-bottom: max(env(safe-area-inset-bottom), 10px);
}
html.framed { --safe-top: 54px; --safe-bottom: 24px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font: 15px/1.45 var(--sans); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.on { display: flex; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.pad { padding: 0 18px; }

/* ---------- onboarding ---------- */
#onboard { background: #0d2a22; color: #eef3ef; }
#onboard .scroll { padding: calc(var(--safe-top) + 18px) 22px calc(var(--safe-bottom) + 18px); }
.hero-bg {
  position: absolute; inset: 0 0 auto 0; height: 470px; pointer-events: none;
  background: url('https://tiles.maps.eox.at/wmts/1.0.0/s2cloudless-2021_3857/default/g/12/2112/1356.jpg') center/cover;
  mask-image: linear-gradient(#000 20%, transparent 100%);
  -webkit-mask-image: linear-gradient(#000 20%, transparent 100%);
  opacity: .9;
}
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,42,34,.05) 0%, rgba(13,42,34,.35) 45%, #0d2a22 96%); }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: .14em; font-size: 13px; position: relative; }
.logo svg { width: 26px; height: 26px; }
.hero { position: relative; margin-top: 150px; }
.hero h1 { font: 400 46px/1.02 var(--serif); letter-spacing: -.01em; }
.hero h1 em { color: #f5a868; }
.hero p { margin-top: 14px; color: #b8c7bf; font-size: 15.5px; max-width: 320px; }
.ob-label { margin: 30px 0 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8fa69b; position: relative; }
.farm-pick { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; margin-bottom: 8px; border-radius: 18px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); transition: background .2s, transform .15s; }
.farm-pick:active { transform: scale(.985); background: rgba(255,255,255,.1); }
.farm-pick .thumb { width: 46px; height: 46px; border-radius: 13px; background-size: cover; background-position: center; flex: none; }
.farm-pick b { display: block; font-weight: 600; font-size: 15px; }
.farm-pick span { font-size: 13px; color: #9fb3a9; }
.farm-pick .cc { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #cfe0d7;
  padding: 4px 7px; border-radius: 7px; background: rgba(255,255,255,.08); }
.ob-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; position: relative; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 18px;
  border-radius: 16px; font-weight: 600; font-size: 15px; transition: transform .15s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--orange); color: #fff; }
.btn.light { background: #eef3ef; color: #0d2a22; }
.btn.ghost { background: rgba(255,255,255,.08); color: #eef3ef; }
.btn.brand { background: var(--brand); color: #fff; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* map picker */
#picker { background: #0d2a22; color: #fff; }
#pickmap { position: absolute; inset: 0; }
.pick-top { position: absolute; z-index: 500; left: 14px; right: 14px; top: calc(var(--safe-top) + 6px); display: flex; gap: 8px; }
.pick-top input { flex: 1; height: 46px; border-radius: 14px; border: 0; padding: 0 16px; background: rgba(255,255,255,.96);
  color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.25); outline: none; }
.round { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.96); color: var(--ink);
  box-shadow: 0 6px 20px rgba(0,0,0,.25); flex: none; }
.round svg { width: 20px; height: 20px; }
.results { position: absolute; z-index: 600; left: 14px; right: 14px; top: calc(var(--safe-top) + 58px); background: #fff; color: var(--ink);
  border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.results button { display: block; width: 100%; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.results button span { color: var(--muted); font-size: 13px; }
.pick-card { position: absolute; z-index: 500; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 10px);
  background: #fff; color: var(--ink); border-radius: 24px; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.pick-card h3 { font-weight: 600; font-size: 17px; }
.pick-card p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.field { display: block; margin-top: 12px; }
.field small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: #f6f5f1; padding: 0 12px; outline: none; }
.field textarea { height: 96px; padding: 12px; resize: none; }
.row2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.pick-pin { position: absolute; z-index: 450; left: 50%; top: 50%; width: 34px; height: 34px; margin: -34px 0 0 -17px; pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }

/* ---------- scan ---------- */
#scan { background: #0d2a22; color: #eef3ef; align-items: center; justify-content: center; text-align: center; }
.scan-ring { position: relative; width: 210px; height: 210px; border-radius: 50%; overflow: hidden; background-size: cover; background-position: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 0 0 10px rgba(255,255,255,.03), 0 30px 80px rgba(0,0,0,.4); }
.scan-ring::before { content: ''; position: absolute; inset: 0; background:
  repeating-linear-gradient(0deg, transparent 0 20px, rgba(255,255,255,.07) 20px 21px),
  repeating-linear-gradient(90deg, transparent 0 20px, rgba(255,255,255,.07) 20px 21px); }
.scan-ring::after { content: ''; position: absolute; left: 0; right: 0; height: 60px; top: -60px;
  background: linear-gradient(180deg, transparent, rgba(239,122,47,.55)); border-bottom: 2px solid #f5a868;
  animation: sweep 1.8s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes sweep { to { top: 210px; } }
#scan h2 { font: 400 30px/1.1 var(--serif); margin-top: 30px; }
#scan .sub { color: #9fb3a9; font-size: 14px; margin-top: 6px; }
.steps { list-style: none; padding: 0; margin: 26px 0 0; text-align: left; width: 318px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 14px; color: #7f978c; transition: color .3s; }
.steps li i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #3c5a4e; display: grid; place-items: center; flex: none; font-style: normal; font-size: 11px; }
.steps li.run { color: #eef3ef; }
.steps li.run i { border-color: #f5a868; border-top-color: transparent; animation: spin .8s linear infinite; }
.steps li.done { color: #eef3ef; }
.steps li.done i { background: #3fae7a; border-color: #3fae7a; color: #0d2a22; }
.steps li.fail i { background: #6b4a3a; border-color: #6b4a3a; }
.steps li small { margin-left: auto; color: #6f877c; font-size: 12px; white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- main shell ---------- */
#main { background: var(--bg); }
.tab { display: none; flex: 1; min-height: 0; flex-direction: column; }
.tab.on { display: flex; animation: fade .25s ease; }
.tab .scroll { padding-bottom: calc(var(--safe-bottom) + 64px); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.top { padding: calc(var(--safe-top) + 4px) 18px 10px; display: flex; align-items: center; gap: 12px; }
.top .t { flex: 1; min-width: 0; }
.eyebrow { font-size: 12px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); font-weight: 550; }
.title { font: 400 31px/1.08 var(--serif); letter-spacing: -.005em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar.logo-av { background: none !important; padding: 0; }
.avatar.logo-av svg { width: 100%; height: 100%; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 14px; color: #fff; flex: none; }
.chip-btn { height: 36px; padding: 0 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.chip-btn svg { width: 16px; height: 16px; }

.tabbar { display: none; position: absolute; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line); padding: 7px 8px var(--safe-bottom); grid-template-columns: repeat(4, 1fr); }
#main.on + .tabbar, .tabbar.on { display: grid; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; font-size: 11px; font-weight: 550; color: #8c948e; transition: color .2s; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--brand); }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin: 0 14px 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card h3 { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.card h3 .src { margin-left: auto; font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: 0; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 18px 10px; }
.section-h h2 { font: 400 23px/1.1 var(--serif); }
.section-h span { font-size: 12.5px; color: var(--muted); }

/* farm map */
.mapcard { position: relative; margin: 2px 14px 12px; height: 236px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); background: #2c3a2f; }
.mapcard .map { position: absolute; inset: 0; }
.map-tog { position: absolute; z-index: 500; top: 10px; left: 10px; display: flex; padding: 3px; border-radius: 12px;
  background: rgba(10, 20, 15, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.map-tog button { padding: 6px 10px; border-radius: 9px; font-size: 12px; font-weight: 600; color: #dfe8e3; }
.map-tog button.on { background: #fff; color: var(--ink); }
.map-legend { position: absolute; z-index: 500; left: 10px; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.map-legend .bar { flex: 1; max-width: 120px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #c8b48c, #e0dd84, #8cbf55, #2f8a35, #0a5a12); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.map-coord { position: absolute; z-index: 500; top: 12px; right: 12px; font-size: 11px; color: #fff; font-variant-numeric: tabular-nums;
  padding: 5px 8px; border-radius: 9px; background: rgba(10,20,15,.55); backdrop-filter: blur(10px); }
.farm-pin { width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(239,122,47,.7); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(239,122,47,.65); } 80%, 100% { box-shadow: 0 0 0 22px rgba(239,122,47,0); } }
.leaflet-container { background: #2c3a2f; font: inherit; }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255,255,255,.6) !important; }

/* headline climate card */
.headline { background: linear-gradient(150deg, #10372c 0%, #0f5444 100%); color: #eef5f1; position: relative; overflow: hidden; }
.headline::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(239,122,47,.35), transparent 70%); }
.headline h3 { color: #a9c4b8; }
.big { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; position: relative; z-index: 1; }
.big b { font: 400 58px/1 var(--serif); letter-spacing: -.02em; }
.big span { color: #b8cdc3; font-size: 14px; }
.headline p.lead { color: #cddcd5; font-size: 14px; margin-top: 6px; position: relative; z-index: 1; }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.mini { background: rgba(255,255,255,.08); border-radius: 14px; padding: 10px; }
.mini b { display: block; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini span { font-size: 11.5px; color: #a9c4b8; line-height: 1.25; display: block; margin-top: 2px; }
.stripes { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin-top: 14px; position: relative; z-index: 1; }
.stripes i { flex: 1; }
.stripe-axis span:nth-child(2) { position: absolute; transform: translateX(-50%); }
.stripe-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: #8fb0a2; margin-top: 5px; position: relative; z-index: 1; }

/* actions */
.action { display: flex; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.action:first-of-type { border-top: 0; }
.action .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.action .ic svg { width: 19px; height: 19px; }
.action.warn .ic { background: var(--warn-soft); color: var(--warn); }
.action.good .ic { background: var(--good-soft); color: var(--good); }
.action.info .ic { background: var(--info-soft); color: var(--info); }
.action small { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.action b { display: block; font-weight: 600; font-size: 15px; margin-top: 1px; }
.action p { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.action .go { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--brand); display: inline-flex; gap: 4px; align-items: center; }

/* stat grid */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 14px 12px; }
.grid2 .card { margin: 0; }
.stat b { display: block; font: 400 32px/1.05 var(--serif); margin-top: 6px; }
.stat b small { font: 500 13px var(--sans); color: var(--muted); margin-left: 3px; }
.stat p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.gauge { height: 6px; border-radius: 3px; background: #eceae3; margin-top: 10px; position: relative; overflow: hidden; }
.gauge i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; }
.texture { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.texture i:nth-child(1) { background: #b9774a; } .texture i:nth-child(2) { background: #d8b27a; } .texture i:nth-child(3) { background: #ece0b8; }
.tex-legend { display: flex; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.tex-legend span::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 4px; background: currentColor; }

/* charts */
svg.chart { display: block; width: 100%; overflow: visible; }
.chart text { font: 10.5px var(--sans); fill: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 8px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.box { width: 10px; height: 10px; border-radius: 3px; }

.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare td { padding: 9px 0; border-top: 1px solid var(--line); }
.compare tr:first-child td { border-top: 0; }
.compare td:nth-child(2), .compare td:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; width: 70px; }
.compare td:nth-child(3) { font-weight: 650; }
.compare th { font-size: 11px; font-weight: 600; color: var(--muted); text-align: right; letter-spacing: .06em; text-transform: uppercase; padding-bottom: 4px; }
.compare th:first-child { text-align: left; }
.up { color: var(--warm); } .down { color: var(--cool); }

/* crops */
.family { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 400 30px var(--serif); }
.family .meta small { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.family .meta h2 { font: 400 26px/1.1 var(--serif); margin-top: 2px; }
.family .meta p { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.seg { display: flex; gap: 6px; margin: 4px 14px 12px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; height: 34px; padding: 0 14px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface); box-shadow: var(--shadow); }
.seg button.on { background: var(--ink); color: #fff; }
.crop { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.crop:first-child { border-top: 0; }
.crop .em { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: #f3f1ea; flex: none; }
.crop .nm { flex: 1; min-width: 0; }
.crop .nm b { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.crop .nm b em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--orange); background: var(--orange-soft); border-radius: 5px; padding: 2px 5px; }
.crop .nm span { font-size: 12.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars { position: relative; height: 6px; border-radius: 3px; background: #efede6; margin-top: 7px; }
.bars i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.bars i.now { background: #d3d0c6; }
.bars i.later { height: 6px; }
.crop .sc { text-align: right; width: 58px; flex: none; }
.crop .sc b { font: 400 24px/1 var(--serif); display: block; }
.delta { font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.delta.pos { color: var(--good); } .delta.neg { color: var(--warm); } .delta.zero { color: var(--muted); }

/* sheet */
.scrim { position: absolute; inset: 0; z-index: 900; background: rgba(10,20,15,.38); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; z-index: 950; left: 0; right: 0; bottom: 0; max-height: 88%; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 28px 28px 0 0; transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.9,.25,1);
  box-shadow: 0 -10px 40px rgba(0,0,0,.18); }
.sheet.on { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: #cfcbc0; margin: 9px auto 4px; flex: none; }
.sheet .scroll { padding: 6px 0 calc(var(--safe-bottom) + 16px); }
.sheet-h { display: flex; align-items: center; gap: 14px; padding: 6px 18px 14px; }
.sheet-h .em { width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; font-size: 30px; background: var(--surface); box-shadow: var(--shadow); }
.sheet-h h2 { font: 400 28px/1.05 var(--serif); }
.sheet-h p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.x { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: #e8e5dc; display: grid; place-items: center; align-self: flex-start; }
.x svg { width: 16px; height: 16px; }
.factor { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 10px; align-items: center; padding: 8px 0; font-size: 13.5px; }
.factor .fb { height: 7px; border-radius: 4px; background: #efede6; position: relative; overflow: hidden; }
.factor .fb i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; }
.factor-h { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 10px; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.tipbox { display: flex; gap: 10px; background: var(--brand-soft); color: var(--brand-ink); border-radius: 16px; padding: 12px 14px; font-size: 14px; margin: 0 14px 12px; }
.tipbox svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* community */
.composer { display: flex; align-items: center; gap: 10px; width: calc(100% - 28px); margin: 2px 14px 12px; padding: 10px 12px 10px 10px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow); text-align: left; color: var(--muted); }
.composer .avatar { width: 36px; height: 36px; font-size: 13px; }
.composer .ph { flex: 1; }
.composer .pill { color: #fff; background: var(--brand); font-weight: 600; font-size: 13px; padding: 7px 12px; border-radius: 11px; }
.post { width: 100%; text-align: left; display: block; padding: 15px 16px; border-top: 1px solid var(--line); }
.post:first-child { border-top: 0; }
.post-h { display: flex; align-items: center; gap: 10px; }
.post-h .avatar { width: 34px; height: 34px; font-size: 12.5px; }
.post-h b { font-weight: 600; font-size: 14px; }
.post-h span { display: block; font-size: 12px; color: var(--muted); }
.post-h .tag { margin-left: auto; align-self: flex-start; }
.tag { font-size: 11.5px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.post h4 { margin: 10px 0 0; font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.post p { font-size: 14px; color: var(--ink-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-f { display: flex; gap: 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); align-items: center; }
.post-f span { display: inline-flex; align-items: center; gap: 5px; }
.post-f svg { width: 15px; height: 15px; }
.post-f .solved { color: var(--good); font-weight: 600; }
.ctx { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--ink-2); background: #f3f1ea; border-radius: 9px; padding: 5px 9px; }
.ctx svg { width: 13px; height: 13px; color: var(--orange); }
.answer { padding: 14px 16px; border-top: 1px solid var(--line); }
.answer:first-child { border-top: 0; }
.answer p { font-size: 14px; color: var(--ink-2); margin-top: 8px; white-space: pre-line; }
.post-h .badge, .badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--brand); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 1px; }
.badge.ai { background: var(--orange); }
.helpful { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: #f3f1ea; }
.helpful.on { color: var(--brand); background: var(--brand-soft); }
.helpful svg { width: 14px; height: 14px; }
.reply { display: flex; gap: 8px; padding: 10px 14px calc(var(--safe-bottom) + 6px); border-top: 1px solid var(--line); background: var(--bg); }
.reply input { flex: 1; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 0 14px; outline: none; }
.reply button { width: 44px; height: 44px; border-radius: 14px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.reply button svg { width: 18px; height: 18px; }

.foot { font-size: 11.5px; color: var(--muted); padding: 6px 22px 26px; line-height: 1.5; }
.foot a { color: inherit; }
.empty { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.toast { position: absolute; z-index: 999; left: 50%; bottom: calc(var(--safe-bottom) + 76px); transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 550; padding: 10px 16px; border-radius: 14px; transition: .3s; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.skeleton { background: linear-gradient(90deg, #eceae3 0%, #f6f5f0 50%, #eceae3 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
