/* v3.3 farm theme: field green / harvest gold / soil brown */
:root{--field:#2f6b1f;--field2:#3f7d20;--gold:#e0a526;--gold2:#f2c14e;--soil:#7a4b24;--soil2:#5c3a1c;
 --bg:#f6f3ea;--card:#fffdf8;--ink:#1f1a12;--mut:#5d5446;--line:#e4dccb;--acc:#2f6b1f;--acc2:#2f6b1f;--fert:#7a4b24;--spray:#0369a1;--mark:#f6d77a}
body.dark{--bg:#12100b;--card:#1f1c15;--ink:#f1ead9;--mut:#b9ae98;--line:#3a3326;--acc:#7cc35a;--acc2:#2f6b1f;--fert:#a0682f;--spray:#38bdf8;--mark:#8a6412;--s1:#1f1c15;--s0:#14120d;--s2:#2a261d;--bd:#4a4232;--tx:#f1ead9;--tm:#b9ae98}
header{border-bottom:4px solid var(--gold)!important}
.hero h1{background:linear-gradient(90deg,var(--field),var(--gold) 70%,var(--soil));-webkit-background-clip:text;background-clip:text;color:transparent}
body.dark .hero h1{background:linear-gradient(90deg,#9bd77a,var(--gold2));-webkit-background-clip:text;background-clip:text}
.stat{border-top:4px solid var(--gold)}.stat:nth-child(2){border-top-color:var(--soil)}.stat:nth-child(3){border-top-color:var(--field2)}
.qa button{background:var(--field)!important}.qa button:nth-child(3){background:var(--soil)!important}.qa button:nth-child(4){background:#5b4a32!important}.qa button:nth-child(5){background:#0369a1!important}
.qa .rep{background:#6d28d9!important}
.rcard.fert{border-left-color:var(--gold)}.rcard.spray{border-left-color:var(--spray)}
.nav-active{background:var(--field)!important;color:#fff!important}
.crop-ico{width:1.25em;height:1.25em;display:inline-block;vertical-align:-0.25em;margin-right:3px;flex:none}
.fchip .crop-ico{width:1.35em;height:1.35em}
/* glove-friendly tap targets */
main button,nav button,header button,#gs-bar button,.xchip,.fchip,.pdfb,.attb,.openb,.lm-pb button,main select,main input:not([type=checkbox]):not([type=radio]):not([type=range]){min-height:48px}
#gs-bar .gs-btn,header button{min-width:48px}
main input[type=checkbox],main input[type=radio]{width:24px;height:24px}
.rmeta .fchip{min-height:40px}
/* install + https hint */
.jb-install{min-height:44px;padding:0 14px;border-radius:999px;background:var(--gold);color:#1f1a12;font-weight:800;margin-right:6px}
.jb-https{background:#fef3c7;border:2px solid var(--gold);color:#422006;border-radius:14px;padding:10px 14px;margin:6px 0 10px;font-size:14px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.jb-https a{color:#14532d;text-decoration:underline}.jb-https button{margin-left:auto;min-height:40px;min-width:40px}
body.dark .jb-https{background:#2a2110;color:#fde68a}body.dark .jb-https a{color:#bef264}
/* sunlight high-contrast mode */
body.sun{--bg:#fff;--card:#fff;--ink:#000;--mut:#1a1a1a;--line:#000;--acc:#0a4d00;--acc2:#0a4d00;--fert:#5a2f00;--spray:#003d75;--mark:#ffe100;font-size:17px}
body.sun *{text-shadow:none!important;box-shadow:none!important}
body.sun :is(.bg-white,.bg-gray-50,.bg-green-50,.panel,.rcard,.stat,.xchip,.fchip,.gs-wrap,.form-section,input,select,textarea){background:#fff!important;color:#000!important;border:2px solid #000!important}
body.sun :is(.text-gray-400,.text-gray-500,.text-gray-600,.text-gray-700,.muted,.gs-s,.rmeta2,.xchip span,.rtag){color:#111!important}
body.sun :is(h1,h2,h3,b,label){color:#000!important;-webkit-text-fill-color:#000}
body.sun .hero h1{background:none;color:#000}
body.sun .qa button,body.sun .primary,body.sun .nav-active{background:#000!important;color:#fff!important;-webkit-text-fill-color:#fff}
body.sun header,body.sun nav{background:#fff!important;border-bottom:3px solid #000!important}
body.sun .jb-banner,body.sun .rrem{border:2px solid #000!important;color:#000!important;background:#fff8c4!important}
body.sun #gs-sun{outline:3px solid #000;background:#ffe100}
/* live map */
.lm-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin:4px 0 10px}.lm-top h2{font-size:24px;font-weight:800}
.lm-tog{display:flex;border:2px solid var(--field);border-radius:14px;overflow:hidden}.lm-tog button{padding:0 14px;font-weight:700;color:var(--field);background:var(--card)}.lm-tog button.on{background:var(--field);color:#fff}
body.dark .lm-tog button{color:#bef264!important}body.dark .lm-tog button.on{color:#fff!important}
.lm-wrap{position:relative}#lm-map{height:62vh;min-height:360px;border-radius:18px;border:2px solid var(--line);overflow:hidden}
.lm-fab{position:absolute;right:12px;bottom:18px;z-index:500;display:flex;flex-direction:column;gap:10px}
.lm-fab button{width:56px;height:56px;border-radius:999px;background:var(--card);border:2px solid var(--field);font-size:24px;box-shadow:0 6px 16px rgba(0,0,0,.25)}.lm-fab button.on{background:var(--gold)}
.lm-legend{display:flex;flex-wrap:wrap;gap:8px 14px;margin:10px 2px;font-size:14px;font-weight:600}.lm-legend span{display:inline-flex;align-items:center;gap:6px;text-transform:capitalize}.lm-legend i{width:18px;height:18px;border-radius:5px;border:1px solid #0006;display:inline-block}
.lm-note{font-size:14px;background:#fef3c7;border:1px solid var(--gold);color:#422006;border-radius:12px;padding:10px 12px}.lm-note:empty{display:none}body.dark .lm-note{background:#2a2110;color:#fde68a}
.lm-label span{background:rgba(255,255,255,.9);color:#111;font-weight:800;font-size:12px;padding:2px 6px;border-radius:6px;white-space:nowrap;border:1px solid #0003;display:inline-block;transform:translate(-50%,-50%)}
.lm-me span{display:block;width:22px;height:22px;border-radius:99px;background:#2563eb;border:4px solid #fff;box-shadow:0 0 0 3px rgba(37,99,235,.4)}
.lm-pop{min-width:220px;font-size:14px}.lm-pt{font-size:16px}.lm-ps{color:#555;margin:2px 0 6px}.lm-pl{padding:3px 0;border-top:1px solid #eee}
.lm-pb{display:grid;gap:6px;margin-top:8px}.lm-pb button{border-radius:12px;font-weight:800;padding:0 10px}.lm-log{background:var(--field);color:#fff}.lm-fp{border:2px solid var(--field)!important;color:var(--field);background:#fff}
body.dark .lm-ps{color:#cbd5e1}body.dark .lm-pl{border-color:#334155}body.dark .lm-fp{background:#1f1c15!important;color:#bef264!important}
/* readability + tap target fixes */
main button,nav button,header button,#gs-bar button,#tabbar button,.nav-btn,.touch-target,main select{min-height:48px!important}
header button,.gs-btn{min-width:48px!important}
.fchip i{background:var(--soil)!important;color:#fff!important}
body:not(.dark) .text-gray-400{color:#6b6458!important}
body:not(.dark) .text-gray-500{color:#58503f!important}
body:not(.dark) .text-gray-600{color:#4d4637!important}
.pill{background:var(--soil)!important;color:#fff!important}
body:not(.dark) .bg-sky-600{background:#0369a1!important}
body:not(.dark) .text-sky-600{color:#075985!important}
