/* Seventara Farmers — mobile-first, large touch targets, works on low-end Android. */
:root {
  --green-900: #143a26;
  --green: #1f5f3b;
  --green-600: #2a7a4b;
  --green-50: #e9f3ec;
  --leaf: #4f9d5d;
  --cream: #f7f3ea;
  --sand: #efe8d8;
  --card: #ffffff;
  --ink: #1b271f;
  --muted: #5b6a60;
  --line: #e2dccd;
  --turmeric: #f2b632;
  --turmeric-50: #fdf3d9;
  --red: #b3261e;
  --red-50: #fbe9e7;
  --amber: #8a5300;
  --pos: #1e6b3a;
  --radius: 14px;
  --tap: 52px;
  --shadow: 0 1px 2px rgba(20, 40, 25, .06), 0 2px 8px rgba(20, 40, 25, .05);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Mangal", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; }
a { color: var(--green); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.12rem; display: flex; align-items: center; gap: .45rem; }
h3 { font-size: 1rem; }
p { margin: .3rem 0; }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hint { color: var(--muted); font-size: .88rem; margin: .35rem 0 0; }
.boot { display: grid; place-items: center; min-height: 80vh; color: var(--green); font-weight: 600; }
.noscript { padding: 2rem; text-align: center; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem;
  background: var(--green); color: #fff; padding: .45rem .6rem; min-height: 58px;
  padding-top: calc(.45rem + env(safe-area-inset-top));
}
.top-title { flex: 1; font-size: 1.15rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-logo { border-radius: 9px; margin: 0 .2rem; }
.topbar .icon-btn { color: #fff; }
.topbar .icon-btn:hover { background: rgba(255,255,255,.12); }
main { max-width: 640px; margin: 0 auto; padding: .9rem .8rem 1.2rem; outline: none; }
main.bare { padding-top: 1.2rem; }
.banner { text-align: center; font-size: .88rem; padding: .45rem .8rem; font-weight: 600; }
.sample-banner { background: var(--turmeric-50); color: var(--amber); }
.env-banner { background: #e8eef9; color: #234a8c; }
.offline-banner { background: #3a3a3a; color: #fff; }
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,.05);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600;
}
.nav-item .ico { width: 26px; height: 26px; }
.nav-item.on { color: var(--green); }
.nav-item.on .ico { background: var(--green-50); border-radius: 12px; padding: 2px; width: 46px; }
.sync-chip {
  display: inline-flex; align-items: center; gap: .25rem; border: 0; border-radius: 99px; background: var(--turmeric);
  color: #3b2a00; font-weight: 700; padding: .3rem .65rem; min-height: 36px; font-size: .9rem;
}
.sync-chip .ico { width: 18px; height: 18px; }

/* ---------- Icons ---------- */
.ico, .ico-lg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-lg { width: 30px; height: 30px; }
.chev { color: #9aa59d; width: 20px; height: 20px; }

/* ---------- Cards & lists ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem; box-shadow: var(--shadow); border: 1px solid #ece6d9; }
.card-soft { background: var(--sand); box-shadow: none; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.card-head h2 { margin: 0; }
.cards { list-style: none; padding: 0; margin: 0; }
.link-card { display: flex; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.link-card:active { background: #fbfaf6; }
.link-card h2 { margin-bottom: .15rem; }
.meta-line { font-size: .9rem; color: var(--muted); }
.money-line { font-size: .92rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.list { list-style: none; padding: 0; margin: .3rem 0 0; }
.list > li + li { border-top: 1px solid #f0ebe0; }
.list-item {
  display: flex; align-items: center; gap: .75rem; min-height: var(--tap); padding: .55rem .1rem; width: 100%;
  color: inherit; text-decoration: none; background: none; border: 0; text-align: left; font: inherit;
}
.list-item a { color: inherit; text-decoration: none; }
.list-item .grow, .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-item strong { font-weight: 650; }
.list-item .muted { font-size: .9rem; overflow-wrap: anywhere; }
.list.compact .list-item { min-height: 46px; padding: .4rem .1rem; }
.link, .tappable { cursor: pointer; }
.tappable:active, .link:active { background: #faf8f2; }
.list-item.inactive { opacity: .55; }
.task.overdue .muted { color: var(--red); font-weight: 600; }
.amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos { color: var(--pos); }
.neg { color: var(--red); }
.warn { color: var(--amber); }
.pill-row { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem; }
.pill { background: var(--green-50); color: var(--green); border-radius: 99px; padding: .05rem .6rem; font-size: .82rem; font-weight: 600; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: .12rem .5rem; margin-left: .4rem; background: #eef0ec; color: var(--muted); vertical-align: middle; white-space: nowrap; }
.badge.sample { background: var(--turmeric-50); color: var(--amber); }
.badge.todo { background: var(--turmeric-50); color: var(--amber); }
.badge.danger { background: var(--red-50); color: var(--red); }
.status { font-weight: 650; }
.st-growing { color: var(--pos); }
.st-planned { color: #36589a; }
.st-harvested { color: var(--amber); }
.st-closed { color: var(--muted); }
.crop-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--leaf); flex: none; margin-right: .1rem; }
.crop-dot.big { width: 40px; height: 40px; border-radius: 12px; }
.crop-dot[data-crop="sugarcane"] { background: #6aa84f; }
.crop-dot[data-crop="wheat"] { background: #d9a93a; }
.crop-dot[data-crop="paddy"] { background: #8bbf5a; }
.crop-dot[data-crop="mustard"] { background: #f2c230; }
.crop-dot[data-crop="potato"] { background: #b68b5a; }
.crop-dot[data-crop="cotton"] { background: #c9c3b6; }
.crop-dot[data-crop="maize"] { background: #e8b923; }
.dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: .45rem .8rem; margin: .4rem 0 0; }
.dl dt { color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.notice { background: var(--green-50); border-left: 4px solid var(--green); padding: .75rem .9rem; border-radius: 10px; margin-bottom: .9rem; font-weight: 600; }
.empty { text-align: center; padding: 1.1rem .5rem; color: var(--muted); }
.empty .btn { margin-top: .6rem; }
.error-box { background: var(--red-50); color: var(--red); border-radius: var(--radius); }
.loading { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 2.5rem 0; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .55rem; margin: .5rem 0; }
.tile { background: #faf8f3; border: 1px solid #efe9dc; border-radius: 12px; padding: .6rem .7rem; display: flex; flex-direction: column; }
.tile-label { font-size: .82rem; color: var(--muted); }
.tile-value { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* ---------- Home ---------- */
.hello h1 { margin-bottom: 0; }
.hello { margin: .2rem .1rem .8rem; }
.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-bottom: .9rem; }
.quick {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 92px;
  background: var(--green); color: #fff; border: 0; border-radius: var(--radius); font: inherit; font-weight: 650; font-size: .92rem;
  padding: .5rem; box-shadow: var(--shadow); text-align: center;
}
.quick:active { background: var(--green-900); }
.onboarding .steps { padding-left: 1.3rem; margin: .4rem 0 1rem; }
.onboarding .steps li { margin: .35rem 0; }
.small-link { font-weight: 650; text-decoration: none; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; }
.sub { font-size: .95rem; margin: .9rem 0 .1rem; color: var(--muted); }
.tick {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--leaf); background: #fff; color: var(--leaf);
  display: grid; place-items: center; flex: none; cursor: pointer;
}
.tick:active { background: var(--green-50); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: var(--tap); padding: .6rem 1.1rem;
  border-radius: 12px; border: 2px solid transparent; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  background: #eef0ec; color: var(--ink);
}
.btn-block { width: 100%; margin-top: .6rem; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:active { background: var(--green-900); }
.btn-secondary { background: var(--green-50); color: var(--green); border-color: #cfe3d5; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: #f0c9c5; }
.btn-small { min-height: 40px; padding: .3rem .75rem; font-size: .88rem; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.busy::after { content: ''; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-row { display: flex; gap: .6rem; margin-top: 1rem; }
.btn-row .btn { flex: 1; }
.btn-col { display: flex; flex-direction: column; gap: .5rem; margin-top: .8rem; }
.btn-col .btn-block { margin-top: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; flex: none; text-decoration: none; font-size: 1.1rem;
}
.icon-btn:hover { background: #f1eee6; }
.link-btn { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; margin-top: .4rem; }
.fab-like { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); box-shadow: 0 4px 14px rgba(31,95,59,.3); }

/* ---------- Segmented tabs & chips ---------- */
.seg { display: flex; gap: .35rem; overflow-x: auto; padding: .15rem 0 .7rem; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-btn {
  flex: 1 0 auto; text-align: center; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .4rem .9rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); font: inherit;
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.seg-btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.count { background: rgba(0,0,0,.12); border-radius: 99px; padding: 0 .45rem; font-size: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  min-height: 46px; padding: .4rem .95rem; border-radius: 99px; border: 2px solid var(--line); background: #fff; font: inherit;
  font-weight: 600; color: var(--ink); cursor: pointer;
}
.chip.on { border-color: var(--green); background: var(--green-50); color: var(--green); }
.lang-switch { display: flex; justify-content: flex-end; gap: .4rem; }
.lang-switch .chip { min-height: 40px; padding: .25rem .8rem; }

/* ---------- Forms ---------- */
.form { display: flex; flex-wrap: wrap; gap: 0 .7rem; }
.form > * { flex: 1 1 100%; }
.field { margin-bottom: .85rem; }
.field.half { flex: 1 1 calc(50% - .35rem); min-width: 140px; }
.field > label, .field > span { display: block; font-weight: 650; margin-bottom: .3rem; }
.req { color: var(--red); }
.control-wrap { display: flex; align-items: stretch; gap: .35rem; }
.prefix { display: inline-flex; align-items: center; padding: 0 .7rem; background: var(--sand); border: 2px solid var(--line); border-radius: 12px; font-weight: 650; color: var(--muted); }
input[type=text], input[type=tel], input[type=password], input[type=date], input[type=email], input[type=search], select, textarea {
  width: 100%; min-height: var(--tap); border: 2px solid var(--line); border-radius: 12px; padding: .55rem .75rem; font: inherit;
  background: #fff; color: var(--ink);
}
textarea { min-height: 92px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.2rem; }
input:focus, select:focus, textarea:focus { border-color: var(--green-600); outline: none; box-shadow: 0 0 0 3px rgba(42,122,75,.18); }
.invalid { border-color: var(--red) !important; }
.field-err { color: var(--red); font-size: .88rem; font-weight: 600; margin: .3rem 0 0; }
.form-error { background: var(--red-50); color: var(--red); padding: .7rem .85rem; border-radius: 10px; font-weight: 600; margin-bottom: .8rem; }
.form-heading { margin: .6rem 0 .1rem; font-size: 1rem; color: var(--green); border-top: 1px solid var(--line); padding-top: .8rem; }
.form-heading + .hint { margin: 0 0 .7rem; }
.check-label { display: flex !important; gap: .65rem; align-items: flex-start; font-weight: 500 !important; }
.check-label input { width: 26px; height: 26px; margin: 0; flex: none; accent-color: var(--green); }
.mic { background: var(--green-50); color: var(--green); border-radius: 12px; width: var(--tap); height: auto; min-height: var(--tap); }
.mic.listening { background: var(--red); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.privacy-note { background: var(--green-50); padding: .6rem .75rem; border-radius: 10px; margin-bottom: .6rem; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .6rem; }
.filters label span { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .2rem; }
.search { display: flex; gap: .5rem; margin-bottom: .5rem; }
.toggles { display: flex; flex-direction: column; }
.toggle { display: flex; align-items: center; gap: .75rem; min-height: var(--tap); position: relative; cursor: pointer; border-top: 1px solid #f0ebe0; }
.toggle:first-child { border-top: 0; }
.toggle > span:first-child { flex: 1; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 52px; height: 30px; border-radius: 99px; background: #cfd5cf; position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + .switch { background: var(--green); }
.toggle input:checked + .switch::after { transform: translateX(22px); }
.toggle input:focus-visible + .switch { outline: 3px solid var(--turmeric); outline-offset: 2px; }

/* ---------- Auth ---------- */
.auth { max-width: 460px; margin: 0 auto; }
.brand-hero { text-align: center; margin: .6rem 0 1rem; }
.brand-logo { border-radius: 20px; box-shadow: var(--shadow); }
.brand-hero h1 { margin: .5rem 0 .1rem; color: var(--green-900); }
.tagline { color: var(--muted); }
.recovery .code-box, .code-box {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: .12em;
  text-align: center; background: var(--turmeric-50); border: 2px dashed var(--turmeric); border-radius: 12px; padding: .9rem; margin: .8rem 0; user-select: all;
}
.warn-text { color: var(--red); font-weight: 600; }

/* ---------- Sheet dialog ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92vh; border-radius: 20px 20px 0 0;
  background: #fff; color: var(--ink); box-shadow: 0 -8px 30px rgba(0,0,0,.2); overflow: hidden; display: flex; flex-direction: column;
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet::backdrop { background: rgba(15, 25, 18, .5); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: .7rem .6rem .4rem 1rem; border-bottom: 1px solid #f0ebe0; }
.sheet-head h2 { margin: 0; }
.sheet-body { padding: .8rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet-context { margin: -.2rem 0 .7rem; }
.confirm-msg { font-size: 1.02rem; }
.pick { cursor: pointer; }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 20px; } }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(84px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: .4rem; z-index: 60; pointer-events: none; }
.toast { background: #1d2a22; color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-weight: 600; max-width: 92vw; opacity: 0; transform: translateY(10px); transition: all .25s; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--red); }
.toast-warn { background: #7a4a00; }

/* ---------- Reports ---------- */
.report-list { list-style: none; padding: 0; margin: 0; }
.report-row { background: #fff; border: 1px solid #ece6d9; border-radius: var(--radius); padding: .8rem; margin-bottom: .6rem; box-shadow: var(--shadow); }
.report-row.total { background: var(--green-50); border-color: #cfe3d5; }
.report-title { display: flex; flex-direction: column; margin-bottom: .4rem; }
.report-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: .35rem .7rem; }
.rn { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); }
.rn b { font-size: 1.02rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.rn b.pos { color: var(--pos); } .rn b.neg { color: var(--red); } .rn b.warn { color: var(--amber); }
.print-only { display: none; }
.audit-details { display: block; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; margin-top: .2rem; }

@media print {
  .topbar, .bottomnav, .banner, .no-print, #toasts, .btn { display: none !important; }
  .print-only { display: block; }
  body, :root { background: #fff; font-size: 12pt; }
  .shell { padding: 0; }
  main { max-width: none; padding: 0; }
  .report-row { box-shadow: none; break-inside: avoid; border-color: #bbb; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
   v0.2 visual refresh — friendlier, picture-led, fewer words on screen
   ===================================================================== */
:root { --blue: #2f6db3; --blue-50: #e7f0fb; --orange: #c2410c; --orange-50: #fdeee6; --amber-50: #fdf4dc; }
body { background: linear-gradient(180deg, #f3efe4 0, var(--cream) 320px); }

/* Header */
.topbar { background: linear-gradient(135deg, #1b5536, #24704a); box-shadow: 0 2px 10px rgba(20,60,35,.18); gap: .35rem; }
.top-title { font-size: 1.2rem; letter-spacing: .1px; }
.env-pill { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.35); font-size: .7rem; font-weight: 800; letter-spacing: .08em; padding: .15rem .5rem; border-radius: 99px; }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--turmeric); color: #3b2a00; font-weight: 800; text-decoration: none; flex: none; margin-left: .15rem; font-size: 1.05rem; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.avatar.on { box-shadow: 0 0 0 3px #fff; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.8rem; box-shadow: none; }
.banner { padding: .35rem .8rem; font-size: .82rem; }

/* Bottom bar with centre + button */
.bottomnav { align-items: flex-end; border-radius: 18px 18px 0 0; border-top: 0; box-shadow: 0 -4px 18px rgba(20,40,25,.10); }
.nav-item { min-height: 62px; font-size: .76rem; }
.nav-item.on .ico { width: 48px; }
.nav-fab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .76rem; font-weight: 700; color: var(--green); padding: 0 0 8px; transform: translateY(-14px); margin-bottom: -14px;
}
.nav-fab .ico-fab { width: 58px; height: 58px; padding: 14px; border-radius: 50%; background: linear-gradient(135deg, #f5c04a, #e9a417); color: #2f2100; stroke-width: 2.6; fill: none; stroke: currentColor; box-shadow: 0 6px 16px rgba(233,164,23,.45); border: 4px solid #fff; }
.nav-fab:active .ico-fab { transform: scale(.95); }

/* Action sheet from + */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.action-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; border: 0; border-radius: 18px; padding: .9rem; min-height: 120px; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.action-tile strong { font-size: 1.05rem; }
.action-tile span:last-child { font-size: .8rem; color: var(--muted); }
.action-emoji { font-size: 1.9rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.75); margin-bottom: .35rem; font-weight: 800; }
.action-links { display: flex; gap: .6rem; margin-top: .9rem; }
.action-links .btn { flex: 1; font-size: .92rem; padding: .5rem; }
.a-cost { background: var(--orange-50); } .a-cost .action-emoji, .a-cost .quick-emoji { color: var(--orange); }
.a-work { background: var(--blue-50); }
.a-harvest { background: var(--amber-50); }
.a-sale { background: var(--green-50); }

/* Home */
.hero { position: relative; margin: -0.9rem -.8rem 1rem; padding: 1.2rem 1.1rem 1.4rem; color: #fff; border-radius: 0 0 26px 26px; overflow: hidden;
  background: linear-gradient(160deg, #24704a 0%, #1b5536 60%, #164a2e 100%); }
.hero::after { content: ''; position: absolute; right: -10px; bottom: -6px; width: 190px; height: 110px; background: url(/icons/fields.svg) no-repeat right bottom / contain; opacity: .9; pointer-events: none; }
.hero h1 { font-size: 1.6rem; margin: .1rem 0 .55rem; position: relative; z-index: 1; }
.hero-date { opacity: .85; margin: 0; font-size: .9rem; position: relative; z-index: 1; }
.season-chip { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 99px; padding: .25rem .75rem; font-size: .88rem; font-weight: 600; position: relative; z-index: 1; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-bottom: 1rem; }
.quick { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: .65rem; min-height: 72px; border: 0; border-radius: 18px; padding: .6rem .8rem;
  font: inherit; font-weight: 700; font-size: .98rem; color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.quick:active { transform: scale(.98); }
.quick-emoji { font-size: 1.6rem; width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.8); font-weight: 800; }
.section { margin-bottom: 1rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 .15rem .5rem; }
.section-head h2 { margin: 0; }
.crop-scroller { display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .1rem .8rem .5rem; margin: 0 -.8rem; scrollbar-width: none; }
.crop-scroller::-webkit-scrollbar { display: none; }
.crop-card { flex: 0 0 78%; max-width: 300px; scroll-snap-align: start; background: #fff; border-radius: 18px; padding: .9rem; box-shadow: var(--shadow); border: 1px solid #ece6d9; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: .6rem; }
.crop-scroller .crop-card:only-child { flex-basis: 100%; max-width: none; }
.crop-card-top { display: flex; gap: .7rem; align-items: center; }
.crop-card-top strong { font-size: 1.08rem; }
.crop-card-money { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: .5rem; font-size: .9rem; color: var(--muted); }
.crop-card-money b { font-size: 1.05rem; }
.small { font-size: .84rem; }
.setup h2 { margin-bottom: .6rem; }
.setup-steps { list-style: none; padding: 0; margin: 0 0 .5rem; }
.setup-steps li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; color: var(--muted); font-weight: 600; }
.setup-steps li.current { color: var(--ink); }
.setup-steps li.done { color: var(--pos); text-decoration: line-through; text-decoration-color: rgba(30,107,58,.4); }
.step-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; flex: none; background: #fff; }
.setup-steps li.current .step-dot { border-color: var(--turmeric); background: var(--turmeric-50); }
.setup-steps li.done .step-dot { background: var(--pos); border-color: var(--pos); color: #fff; }
.btn-lg { min-height: 58px; font-size: 1.05rem; border-radius: 14px; }
.money-card h2 { margin-bottom: .2rem; }
.money-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .5rem 0; }
.stat { background: #faf8f3; border-radius: 14px; padding: .55rem .5rem; text-align: center; display: flex; flex-direction: column; gap: .1rem; }
.stat b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .74rem; color: var(--muted); line-height: 1.2; }
.soon-list { list-style: none; padding: 0; margin: 0; }
.soon-item { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; }
.soon-item + .soon-item { border-top: 1px solid rgba(0,0,0,.06); }
.soon-emoji { font-size: 1.5rem; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(255,255,255,.7); border-radius: 12px; flex: none; }
.soon-item .muted { font-size: .84rem; }

/* Pictures: crop badges & emoji circles */
.crop-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 1.3rem; flex: none; background: #e8f3df; line-height: 1; }
.crop-badge.sm { width: 28px; height: 28px; font-size: 1rem; border-radius: 8px; vertical-align: middle; }
.crop-badge.lg { width: 54px; height: 54px; font-size: 1.8rem; border-radius: 16px; }
.crop-badge.xl { width: 66px; height: 66px; font-size: 2.2rem; border-radius: 18px; }
.crop-badge[data-crop="wheat"], .crop-badge[data-crop="maize"] { background: #fbf0cf; }
.crop-badge[data-crop="mustard"] { background: #fdf3c2; }
.crop-badge[data-crop="sugarcane"], .crop-badge[data-crop="berseem"] { background: #e3f1d8; }
.crop-badge[data-crop="paddy"] { background: #edf5d6; }
.crop-badge[data-crop="potato"], .crop-badge[data-crop="groundnut"] { background: #f3e7d8; }
.crop-badge[data-crop="tomato"], .crop-badge[data-crop="onion"] { background: #fbe3df; }
.crop-badge[data-crop="cotton"] { background: #eef1f5; }
.emoji-circle { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem; flex: none; background: #f1eee6; font-weight: 800; }
.emoji-circle.big { width: 54px; height: 54px; font-size: 1.6rem; border-radius: 16px; }
.ec-cost { background: var(--orange-50); color: var(--orange); }
.ec-work { background: var(--blue-50); }
.ec-harvest, .ec-warn { background: var(--amber-50); }
.ec-sale, .ec-field { background: var(--green-50); }
.ec-farm { background: #f3eadb; }
h2 .emoji-circle { width: 34px; height: 34px; font-size: 1rem; }

/* Progress */
.crop-progress { display: flex; flex-direction: column; gap: .3rem; margin: .35rem 0; }
.progress { display: block; height: 9px; border-radius: 99px; background: #ece7da; overflow: hidden; }
.progress-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7cc35f, #2a7a4b); }

/* Crop list & crop page */
.link-card { gap: .9rem; }
.variety { font-weight: 500; font-size: .92rem; }
.status-pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: .12rem .6rem; border-radius: 99px; background: #eef0ec; color: var(--muted); }
.status-pill.st-growing { background: var(--green-50); color: var(--pos); }
.status-pill.st-planned { background: var(--blue-50); color: var(--blue); }
.status-pill.st-harvested { background: var(--amber-50); color: var(--amber); }
.money-line { align-items: center; gap: .6rem; }
.cycle-title { display: flex; gap: .8rem; align-items: flex-start; }
.cycle-title h2 { margin: 0 0 .1rem; font-size: 1.25rem; }
.cycle-title .grow > * { display: block; }
.plain-link { text-decoration: none; font-weight: 600; color: var(--green) !important; }
.cycle-status { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: center; margin: .7rem 0 .2rem; font-size: .88rem; }
.net-box { display: flex; justify-content: space-between; align-items: center; border-radius: 16px; padding: .75rem .95rem; margin: .7rem 0 .2rem; }
.net-box span { font-weight: 600; }
.net-box strong { font-size: 1.55rem; font-variant-numeric: tabular-nums; }
.net-pos { background: var(--green-50); color: var(--pos); }
.net-neg { background: var(--red-50); color: var(--red); }
.net-neutral { background: #f6f2e8; color: var(--ink); }
.tab-btn { flex-direction: column; gap: 0; min-height: 60px; border-radius: 16px; padding: .35rem .6rem; flex: 1 1 0; }
.tab-emoji { font-size: 1.2rem; line-height: 1.2; font-weight: 800; }
.seg { gap: .4rem; }

/* Forms */
.chip-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.chip-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; border-radius: 14px; min-height: 78px; padding: .4rem .25rem; text-align: center; font-size: .82rem; line-height: 1.15; }
.chip-icon { font-size: 1.6rem; line-height: 1.1; }
.chip-tile.on { box-shadow: 0 0 0 1px var(--green) inset; }
.field-big input { font-size: 1.5rem; font-weight: 700; min-height: 60px; }
.field-big .prefix { font-size: 1.3rem; }
details.more { margin: .2rem 0 .8rem; border: 2px dashed var(--line); border-radius: 14px; }
details.more > summary { list-style: none; cursor: pointer; min-height: var(--tap); display: flex; align-items: center; padding: 0 1rem; font-weight: 700; color: var(--green); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '+'; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green-50); margin-right: .6rem; font-size: 1.1rem; }
details.more[open] > summary::before { content: '−'; }
details.more[open] { border-style: solid; background: #fdfcf8; }
.more-body { display: flex; flex-wrap: wrap; gap: 0 .7rem; padding: .2rem .9rem .3rem; }
.more-body > * { flex: 1 1 100%; }
.more-body > .half { flex: 1 1 calc(50% - .35rem); }
.sheet-context { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-weight: 600; }
dialog.sheet { border-radius: 24px 24px 0 0; }
.sheet-head { padding-top: 1rem; position: relative; }
.sheet-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #ddd6c6; }

/* Auth */
main.bare { padding-top: 0; }
.brand-hero { margin: 0 -.8rem 1rem; padding: .9rem 1rem 2.4rem; color: #fff; border-radius: 0 0 28px 28px; position: relative; overflow: hidden;
  background: linear-gradient(165deg, #24704a 0%, #1b5536 70%); }
.brand-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 70px; background: url(/icons/fields.svg) no-repeat center bottom / cover; opacity: .5; pointer-events: none; }
.brand-hero h1 { color: #fff; position: relative; z-index: 1; }
.brand-hero .tagline { color: rgba(255,255,255,.88); position: relative; z-index: 1; }
.brand-logo { box-shadow: 0 6px 18px rgba(0,0,0,.25); border-radius: 22px; position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; position: relative; z-index: 1; min-height: 40px; }
.hero-top .lang-switch { margin-left: auto; }
.brand-hero .chip { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
.brand-hero .chip.on { background: #fff; color: var(--green); border-color: #fff; }
.hero-points { list-style: none; padding: 0; margin: 1rem auto .2rem; display: inline-flex; flex-direction: column; gap: .35rem; text-align: left; position: relative; z-index: 1; font-weight: 600; font-size: .95rem; }
.brand-hero + .card { margin-top: -1.6rem; position: relative; z-index: 2; border-radius: 20px; }

/* Farms / profile */
.big-empty { padding: 1.6rem 1rem; }
.empty-emoji { font-size: 3rem; }
.profile-hero { display: flex; align-items: center; gap: .9rem; margin: .2rem .1rem 1rem; }
.profile-hero h2 { margin: 0; font-size: 1.3rem; }
.profile-hero p { margin: 0; color: var(--muted); }

/* Reports bars */
.bars { display: flex; flex-direction: column; gap: .25rem; margin: .2rem 0 .6rem; }
.bar-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); }
.bar { display: block; height: 10px; background: #f1ede3; border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; }
.bar-fill.neg { background: #e8826f; } .bar-fill.pos { background: #4f9d5d; }
@media print { .profile-hero, .hero { display: none; } }
.control-wrap > .chips, .control-wrap > input, .control-wrap > select, .control-wrap > textarea { flex: 1 1 auto; min-width: 0; }

/* ---------- v0.3 Marketplace ---------- */
.status-pill.mk-active, .status-pill.mk-accepted, .status-pill.mk-verified, .status-pill.mk-completed { background: var(--green-50); color: var(--pos); }
.status-pill.mk-pending, .status-pill.mk-reserved, .status-pill.mk-paused { background: var(--amber-50); color: var(--amber); }
.status-pill.mk-rejected, .status-pill.mk-cancelled, .status-pill.mk-removed { background: var(--red-50); color: var(--red); }
.status-pill.mk-sold { background: var(--blue-50); color: var(--blue); }
.market-notice { font-weight: 500; font-size: .88rem; background: #f6f2e8; border-left-color: var(--turmeric); margin-top: .4rem; }
.offer-alert { color: var(--amber); font-weight: 700; }
.listing-big { font-size: 1.02rem; }
.listing-notes { background: #faf8f3; border-radius: 12px; padding: .6rem .75rem; margin-top: .5rem; }
.btn-sell { background: linear-gradient(135deg, #f5c04a, #e9a417); color: #2f2100; margin: 0 0 .9rem; box-shadow: 0 4px 12px rgba(233,164,23,.3); }
.sell-btn { margin-top: 0; margin-bottom: .9rem; }
.farms-link { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; font-weight: 700; padding: .75rem 1rem; }
.market-alert { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; background: var(--amber-50); border-color: #f3dfa7; }
.market-alert strong { font-size: 1.02rem; }
.verify-card { background: var(--amber-50); border-color: #f3dfa7; }
.price-guide { background: var(--blue-50); border-color: #cfe0f5; }
.sort-chips { flex-wrap: nowrap; overflow-x: auto; margin-bottom: .7rem; scrollbar-width: none; }
.sort-chips .chip { flex: none; min-height: 40px; padding: .25rem .8rem; font-size: .88rem; text-decoration: none; display: inline-flex; align-items: center; }
.live-total { font-size: 1.3rem; font-weight: 800; color: var(--pos); background: var(--green-50); border-radius: 14px; padding: .7rem .9rem; margin: .2rem 0 .4rem; text-align: center; }
.buyer-line { display: flex; gap: .8rem; align-items: center; margin-bottom: .6rem; }
.buyer-line p { margin: 0; }
.offer-price { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; white-space: nowrap; }
.count-badge { background: var(--turmeric); color: #3b2a00; border-radius: 99px; padding: 0 .55rem; font-size: .85rem; margin-left: .3rem; }
.contact-card .btn-lg { margin-top: .6rem; }
.sell-context { display: flex; gap: .8rem; align-items: center; }
.sell-context p { margin: 0; }
.buyer-link { justify-content: center; font-size: .92rem; }
.offer-review .dl { margin: .6rem 0 1rem; }
.admin-buyer, .admin-dispute { align-items: flex-start; flex-wrap: wrap; }
.admin-dispute .grow > span, .admin-buyer .grow > span { display: block; }
.cycle-title .grow > .status-pill { display: table; margin-top: .2rem; }
.admin-buyer .grow, .admin-dispute .grow { flex: 1 1 100%; }

/* ---------- v0.4 Buy / sell board ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.board-search { display: flex; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 99px; padding: 0 .4rem 0 .9rem; margin-bottom: .7rem; box-shadow: var(--shadow); }
.board-search input { border: 0 !important; box-shadow: none !important; background: transparent; min-height: 50px; padding-left: .5rem; }
.search-ico { font-size: 1.1rem; }
.board-actions { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; margin: 0 -.8rem .7rem; padding: 0 .8rem; }
.board-actions::-webkit-scrollbar { display: none; }
.ba { flex: none; display: inline-flex; align-items: center; gap: .3rem; min-height: 44px; padding: .3rem .9rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; font-size: .92rem; }
.ba-primary { background: linear-gradient(135deg, #f5c04a, #e9a417); border-color: transparent; color: #2f2100; }
.cat-row { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin: 0 -.8rem .6rem; padding: .1rem .8rem .3rem; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-chip { flex: none; display: flex; flex-direction: column; align-items: center; gap: .15rem; width: 76px; padding: .45rem .2rem; border-radius: 16px; border: 2px solid transparent; background: #fff; font: inherit; font-size: .74rem; font-weight: 600; color: var(--ink); cursor: pointer; line-height: 1.15; text-align: center; box-shadow: var(--shadow); }
.cat-chip.on { border-color: var(--green); background: var(--green-50); color: var(--green); }
.cat-emoji { font-size: 1.6rem; }
.board-bar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .1rem .1rem .6rem; }
.sort-select select { min-height: 42px; font-size: .9rem; padding-top: .3rem; padding-bottom: .3rem; border-radius: 99px; }
.bgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
@media (min-width: 560px) { .bgrid { grid-template-columns: repeat(3, 1fr); } }
.bcard { background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); border: 1px solid #ece6d9; display: flex; flex-direction: column; }
.bcard:active { transform: scale(.985); }
.bcard-photo { position: relative; aspect-ratio: 1 / 1; background: #f1ede3; }
.bcard-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { display: grid; place-items: center; font-size: 3rem; width: 100%; height: 100%; background: #eef3e8; }
.ph-tractors, .ph-implements { background: #f3ece1; } .ph-seeds, .ph-fodder { background: #e7f2df; } .ph-crops { background: #fbf2d6; } .ph-irrigation { background: #e5eff9; }
.kind-badge { position: absolute; top: .45rem; left: .45rem; font-size: .72rem; font-weight: 800; padding: .15rem .55rem; border-radius: 99px; background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.k-rent { background: var(--blue); color: #fff; } .k-wanted { background: var(--orange); color: #fff; } .k-sold { left: auto; right: .45rem; background: #333; color: #fff; }
.saved-dot { position: absolute; bottom: .4rem; right: .45rem; font-size: 1rem; }
.bcard-body { padding: .5rem .6rem .65rem; display: flex; flex-direction: column; gap: .1rem; }
.bcard-price { font-size: 1.05rem; }
.bcard-title { font-size: .9rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-meta, .bcard-stats { font-size: .76rem; color: var(--muted); }
.bulk-banner { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; background: var(--blue-50); border-color: #cfe0f5; }
.bulk-intro { margin: 0 .1rem .7rem; }

/* Post form photos */
.field-label { display: block; font-weight: 650; margin-bottom: .4rem; }
.photo-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #f1ede3; }
.thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .9rem; cursor: pointer; }
.thumb-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; border: 2px dashed var(--leaf); background: var(--green-50); color: var(--green); font-weight: 700; font-size: .8rem; cursor: pointer; }
.add-emoji { font-size: 1.7rem; }

/* Item page */
.item-page { padding-bottom: 76px; }
.photo-wrap { position: relative; margin: -.9rem -.8rem .8rem; background: #1b1b1b; }
.photo-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; }
.photo-strip::-webkit-scrollbar { display: none; }
.strip-img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; }
.photo-strip .ph { flex: 0 0 100%; font-size: 5rem; }
.photo-count { position: absolute; bottom: .6rem; right: .7rem; background: rgba(0,0,0,.6); color: #fff; border-radius: 99px; padding: .1rem .6rem; font-size: .8rem; font-weight: 700; }
.photo-wrap .kind-badge { top: .7rem; left: .7rem; font-size: .8rem; }
.item-price-row { display: flex; align-items: center; gap: .6rem; }
.item-price { font-size: 1.7rem; color: var(--green-900); }
.item-title { font-size: 1.2rem; margin: .2rem 0 .5rem; }
.pill-warn { background: var(--amber-50); color: var(--amber); }
.item-desc { white-space: pre-wrap; background: #faf8f3; border-radius: 12px; padding: .7rem .8rem; margin-top: .7rem; }
.seller-card { display: flex; gap: .8rem; align-items: center; }
.seller-card .grow > * { display: block; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.4rem; box-shadow: none; }
.safety ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.safety li { margin: .2rem 0; font-size: .92rem; }
.report-link { color: var(--muted); background: none; border: 0; font: inherit; cursor: pointer; display: flex; margin: 0 auto 1rem; }
.action-bar { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 19; display: flex; align-items: center; gap: .45rem; padding: .55rem .8rem; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.06); max-width: 640px; margin: 0 auto; }
.action-bar .icon-btn { font-size: 1.35rem; background: #f6f2e8; }
.grow-btn { flex: 1; min-height: 50px; }
.call-btn { min-height: 50px; padding: .4rem .8rem; }
.quick-msgs { margin-bottom: .7rem; }
.quick-msgs .chip { min-height: 40px; font-size: .88rem; padding: .25rem .8rem; }

/* Chats */
.chat-list { list-style: none; padding: .2rem .6rem; }
.chat-list li + li { border-top: 1px solid #f0ebe0; }
.chat-row { display: flex; align-items: center; gap: .7rem; padding: .65rem 0; text-decoration: none; color: inherit; }
.chat-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; font-size: 1.5rem; }
.chat-top { display: flex; justify-content: space-between; gap: .4rem; }
.chat-item, .chat-last { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-last { font-size: .9rem; color: var(--muted); }
.chat-row.unread .chat-last { color: var(--ink); font-weight: 700; }
.chat-page { display: flex; flex-direction: column; min-height: calc(100vh - 200px); padding-bottom: 70px; }
.chat-head { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; padding: .6rem .8rem; }
.chat-head .grow > * { display: block; }
.chat-safety { text-align: center; font-size: .8rem; color: var(--amber); background: var(--amber-50); border-radius: 99px; padding: .25rem .8rem; margin: 0 auto .7rem; }
.msgs { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.msg { max-width: 82%; padding: .5rem .75rem .35rem; border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: #d9f2dd; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.msg-time { display: block; text-align: right; font-size: .7rem; color: var(--muted); margin-top: .1rem; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 19; display: flex; gap: .45rem; padding: .5rem .7rem; background: #fff; border-top: 1px solid var(--line); max-width: 640px; margin: 0 auto; }
.composer textarea { min-height: 48px; max-height: 120px; resize: none; border-radius: 24px; padding: .7rem 1rem; }
.send-btn { width: 50px; height: 50px; flex: none; border-radius: 50%; border: 0; background: var(--green); color: #fff; font-size: 1.3rem; cursor: pointer; }
.nav-item { position: relative; }
.nav-badge { position: absolute; top: 6px; left: calc(50% + 8px); background: var(--red); color: #fff; font-size: .68rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
