/* leafactivity 2.0 — one accent color, big type, lots of whitespace */
:root {
  --accent: #15803d;      /* the one accent: leaf green */
  --accent-dark: #0f5f2d;
  --accent-soft: #e8f5ec;
  --ink: #0b0f0c;
  --ink-2: #4b554e;
  --line: #e3e7e4;
  --bg: #ffffff;
  --bg-2: #f5f7f6;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius: 18px;
  font-size: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.35; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-dark); }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 18px 48px; }
.wide { max-width: 1200px; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
h1 { font-size: 2rem; line-height: 1.1; margin: 0 0 6px; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; margin: 0; letter-spacing: -.01em; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; color: var(--ink-2); min-width: 0; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-btn { border: 1.5px solid var(--line); background: var(--bg); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: .85rem; min-height: 40px; }
.sync { font-size: .8rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.dot.wait { background: var(--warn); }

/* generic */
.card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg); }
.section { margin-top: 26px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.btn { border: 0; border-radius: 14px; padding: 16px 20px; font-weight: 800; font-size: 1.05rem; min-height: 58px; background: var(--accent); color: #fff; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--bg-2); color: var(--ink); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--accent-dark); font-weight: 700; padding: 10px 4px; min-height: 44px; }
.input { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 16px; font-size: 1.15rem; background: var(--bg); min-height: 58px; }
.input:focus { outline: none; border-color: var(--accent); }
label.lbl { display: block; font-weight: 700; margin: 0 0 8px; }

/* crew chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.chip { border: 2px solid var(--line); background: var(--bg); border-radius: 999px; padding: 10px 18px; font-weight: 700; min-height: 50px; font-size: 1.05rem; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.lead { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.add { border-style: dashed; color: var(--accent-dark); }

/* property */
.prop-name { font-size: 1.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.prop-addr { color: var(--ink-2); margin-top: 4px; }
.kicker { font-size: .85rem; font-weight: 800; color: var(--ink-2); }

/* THE button */
.big { display: block; width: 100%; border: 0; border-radius: 28px; margin-top: 16px;
  min-height: 42vh; max-height: 420px; padding: 20px; color: #fff; background: var(--accent);
  font-size: clamp(2.6rem, 13vw, 4.2rem); font-weight: 900; letter-spacing: .01em; line-height: 1;
  box-shadow: 0 10px 30px rgba(21, 128, 61, .28); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.big.finish { background: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.big .sub { display: block; font-size: 1.15rem; font-weight: 700; margin-top: 16px; opacity: .9; letter-spacing: 0; }
.big:active { transform: scale(.985); }
.big[disabled] { opacity: .6; }

.note { font-size: .85rem; color: var(--ink-2); margin-top: 10px; text-align: center; }

/* hold button (lunch) */
.hold { position: relative; overflow: hidden; width: 100%; margin-top: 14px; border: 2px solid var(--line);
  background: var(--bg); border-radius: 18px; min-height: 66px; font-weight: 800; font-size: 1.1rem; user-select: none; -webkit-user-select: none; touch-action: none; }
.hold .fill { position: absolute; inset: 0; width: 0; background: var(--accent-soft); }
.hold .txt { position: relative; }
.hold.on { border-color: var(--warn); color: var(--warn); }
.hold.on .fill { background: #fdf0e1; }

/* jobs list */
.jobs { list-style: none; margin: 12px 0 0; padding: 0; }
.job { border-top: 1.5px solid var(--line); padding: 14px 0; }
.job:first-child { border-top: 0; }
.job-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.job-name { font-weight: 800; font-size: 1.05rem; }
.job-addr { color: var(--ink-2); font-size: .85rem; margin-top: 2px; }
.job-dur { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.times { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.time { border: 1.5px solid var(--line); background: var(--bg-2); border-radius: 12px; padding: 8px 14px; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 46px; min-width: 92px; }
.time.live { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 3px 9px; background: var(--bg-2); color: var(--ink-2); vertical-align: middle; }
.tag.green { background: var(--accent-soft); color: var(--accent-dark); }
.total { font-size: 1.6rem; font-weight: 900; font-variant-numeric: tabular-nums; }

/* bottom sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto; }
.sheet h2 { margin-bottom: 14px; font-size: 1.35rem; }
.opt { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1.5px solid var(--line); background: none; padding: 14px 4px; min-height: 60px; }
.opt b { display: block; }
.opt span { color: var(--ink-2); font-size: .85rem; }
.time-input { font-size: 2.4rem; font-weight: 800; text-align: center; padding: 14px; width: 100%; border: 2px solid var(--line); border-radius: 16px; }

/* landing */
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: 2.4rem; }
.linkbox { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 14px; }
.linkbox code { display: block; word-break: break-all; font-size: .82rem; background: var(--bg-2); padding: 10px; border-radius: 10px; margin: 8px 0 12px; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; min-height: 52px; padding: 12px; }

/* boss */
.boss-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .boss-grid { grid-template-columns: 1.3fr 1fr; } }
#map { height: 46vh; min-height: 300px; border-radius: var(--radius); border: 1.5px solid var(--line); z-index: 1; }
.status { display: inline-block; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .8rem; }
.st-working { background: var(--accent); color: #fff; }
.st-driving { background: #dbeafe; color: #1e40af; }
.st-lunch { background: #fdf0e1; color: var(--warn); }
.st-done, .st-off { background: var(--bg-2); color: var(--ink-2); }
.crew-card { margin-bottom: 14px; }
.tl { list-style: none; padding: 0; margin: 10px 0 0; }
.tl li { display: grid; grid-template-columns: max-content 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .92rem; align-items: baseline; }
.tl li:first-child { border-top: 0; }
.tl .tm { font-variant-numeric: tabular-nums; font-weight: 700; }
table.hours { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
table.hours th, table.hours td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.hours th:first-child, table.hours td:first-child { text-align: left; }
table.hours th { font-size: .8rem; color: var(--ink-2); }
.scroll-x { overflow-x: auto; }
.demo-banner { background: #fff7e6; color: #8a4b00; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: .9rem; margin-bottom: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; z-index: 99; max-width: 90vw; }

/* engagement + polish */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.big.finish { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 0 rgba(21,128,61,.45); } 50% { box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 12px rgba(21,128,61,0); } }
.big.pop { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
.clock { display: block; font-size: clamp(2rem, 11vw, 3rem); font-weight: 900; font-variant-numeric: tabular-nums; margin-top: 14px; letter-spacing: .02em; }
.live-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #4ade80; margin-right: 8px; vertical-align: middle; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: .85rem; background: var(--accent-soft); color: var(--accent-dark); }
.badge.warn { background: #fdf0e1; color: var(--warn); }
.summary { margin-top: 14px; border-radius: 22px; padding: 18px; background: var(--accent); color: #fff; }
.summary.soft { background: var(--accent-soft); color: var(--ink); }
.summary h3 { margin: 0 0 12px; font-size: 1.25rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat b { display: block; font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: .85rem; opacity: .85; }
.summary .badges .badge { background: rgba(255,255,255,.2); color: #fff; }
.empty { padding: 16px; border: 2px dashed var(--line); border-radius: 18px; margin-top: 12px; }
.empty b { display: block; margin-bottom: 6px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #fdf0e1; color: #7a3d06; font-weight: 700; margin-top: 8px; }
.alert.bad { background: #fde8e8; color: #8b1515; }
.alert.ok { background: var(--accent-soft); color: var(--accent-dark); }
.alerts-box { margin-bottom: 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.tl .tm { white-space: nowrap; }
@media (max-width: 600px) {
  .tl li { grid-template-columns: 1fr auto; row-gap: 2px; }
  .tl li > .tm:first-child { grid-column: 1 / -1; color: var(--ink-2); font-size: .85rem; }
  .hide-sm { display: none; }
}

/* ---------- Today's route ---------- */
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.route-count { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--accent-dark); white-space: nowrap; }
.progress { height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-top: 10px; border: 1.5px solid var(--line); }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.stops { list-style: none; margin: 12px 0 0; padding: 0; }
.stop { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 2px solid var(--line); background: var(--bg);
  border-radius: 18px; padding: 12px 14px; margin-top: 10px; min-height: 64px; }
button.stop:active { transform: scale(.99); }
.stop .num { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.15rem; border: 2.5px solid var(--line); color: var(--ink-2); background: var(--bg); font-variant-numeric: tabular-nums; }
.stop .body { min-width: 0; flex: 1; }
.stop .nm { font-weight: 800; font-size: 1.08rem; line-height: 1.2; overflow-wrap: anywhere; }
.stop .ad { color: var(--ink-2); font-size: .85rem; margin-top: 2px; overflow-wrap: anywhere; }
.stop .meta { font-size: .85rem; font-weight: 700; color: var(--ink-2); margin-top: 3px; font-variant-numeric: tabular-nums; }
.stop .nt { margin-top: 8px; background: #fff8e6; color: #6b4200; border-radius: 10px; padding: 8px 10px; font-size: .92rem; font-weight: 700; }
/* Today's route: watering day + storm/lightning notes per stop (stopinfo.js) */
.stopinfo { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.stopinfo .si { border-radius: 10px; padding: 6px 9px; font-size: .86rem; font-weight: 600; line-height: 1.3; background: #eef6ff; color: #12385e; }
.stopinfo .si.warn { background: #fff4d6; color: #6b4200; }
.stopinfo .si-s { display: block; font-size: .72rem; font-weight: 500; opacity: .8; margin-top: 2px; color: inherit; }
.stop.upcoming .stopinfo .si-s { display: none; }
.stop.done { border-color: transparent; background: var(--bg-2); min-height: 52px; padding: 8px 14px; margin-top: 6px; }
.stop.done .num { background: var(--accent); border-color: var(--accent); color: #fff; width: 34px; height: 34px; font-size: 1rem; }
.stop.done .nm { font-size: .98rem; color: var(--ink-2); }
.stop.current { border-color: var(--accent); background: var(--accent-soft); }
.stop.current .num { background: var(--accent); border-color: var(--accent); color: #fff; animation: blink 1.6s ease-in-out infinite; }
.stop.next { flex-direction: column; align-items: stretch; border: 3px solid var(--accent); box-shadow: 0 8px 24px rgba(21,128,61,.18); padding: 16px; }
.stop.next .row1 { display: flex; gap: 12px; align-items: center; }
.stop.next .num { width: 52px; height: 52px; font-size: 1.5rem; background: var(--accent); border-color: var(--accent); color: #fff; }
.stop.next .nm { font-size: 1.45rem; letter-spacing: -.01em; }
.stop .kick { font-size: .78rem; font-weight: 900; letter-spacing: .06em; color: var(--accent-dark); }
.dir-row { display: flex; gap: 10px; margin-top: 14px; }
.dir-row .btn { flex: 1; text-decoration: none; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; font-size: 1.15rem; }
.dir-row .btn.ghost { flex: 0 0 auto; font-size: .95rem; padding: 12px 14px; }
.stop.upcoming .num { border-style: solid; }
.stop .tagx { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: var(--bg-2); color: var(--ink-2); margin-left: 6px; vertical-align: 2px; }
.route-done { margin-top: 12px; padding: 16px; border-radius: 18px; background: var(--accent); color: #fff; font-weight: 900; font-size: 1.15rem; text-align: center; }
.add-stop { width: 100%; margin-top: 10px; border: 2px dashed var(--line); background: var(--bg); border-radius: 18px; min-height: 60px; font-weight: 800; color: var(--accent-dark); font-size: 1.05rem; }
.big.compact { min-height: 26vh; margin-top: 14px; }
#routeRest { margin-top: 8px; }
#routeRest .stops { margin-top: 4px; }
button.stop.done { cursor: pointer; }

/* boss route */
.rt-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rt-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); font-weight: 900; font-size: .85rem; color: var(--ink-2); padding: 0; min-height: 0; }
.rt-dot.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.rt-dot.current { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(21,128,61,.25); }
.rt-dot.next { border-color: var(--accent); color: var(--accent-dark); border-width: 3px; }
.rt-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-top: 12px; flex-wrap: wrap; }
.rt-sub { font-size: .88rem; color: var(--ink-2); margin-top: 6px; }
.sheet.wide { max-width: 640px; }
.plan-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; }
.plan-tabs .pill-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.plan-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.plan-tools .btn { min-height: 48px; padding: 10px 14px; font-size: .95rem; flex: 1 1 auto; }
.plist { list-style: none; margin: 10px 0 0; padding: 0; }
.pitem { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; margin-top: 8px; background: var(--bg); }
.pitem.dragging { box-shadow: 0 12px 30px rgba(0,0,0,.2); border-color: var(--accent); transform: scale(1.02); position: relative; z-index: 2; }
.pitem.locked { background: var(--bg-2); }
.pitem .handle { flex: 0 0 auto; width: 48px; min-height: 56px; border: 0; background: var(--bg-2); border-radius: 12px; touch-action: none; cursor: grab; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px 0; line-height: 1.1; }
.pitem .handle b { font-size: 1.05rem; color: var(--ink); }
.pitem .handle span { font-size: 1rem; }
.pitem .num { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1rem; }
.pitem.locked .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.pitem .body { flex: 1; min-width: 0; }
.pitem .nm { font-weight: 800; overflow-wrap: anywhere; }
.pitem .ad { font-size: .82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.pitem .nt { font-size: .85rem; background: #fff8e6; color: #6b4200; border-radius: 8px; padding: 4px 8px; margin-top: 4px; display: inline-block; }
.pitem .x { flex: 0 0 auto; width: 40px; height: 44px; padding: 0; border: 0; background: none; color: var(--danger); font-size: 1.2rem; }
.pin { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 14px;
  border: 3px solid #9ca3af; background: #fff; color: #374151; box-shadow: 0 2px 6px rgba(0,0,0,.35); font-family: system-ui, sans-serif; }
.pin.done { background: #15803d; border-color: #fff; color: #fff; }
.pin.current { background: #15803d; border-color: #fff; color: #fff; box-shadow: 0 0 0 5px rgba(21,128,61,.35), 0 2px 6px rgba(0,0,0,.35); }
.pin.next { border-color: #15803d; color: #0f5f2d; border-width: 4px; }
.pin.yard { background: #0b0f0c; border-color: #fff; color: #fff; font-size: 13px; }

.save-note { background: #fff4d6; color: #3b2a00; border: 2px solid #d4a72c; border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.save-note .sn-t { font-weight: 900; font-size: 1rem; }
.save-note .sn-s { font-size: .88rem; margin: 4px 0 10px; line-height: 1.35; }
.save-note .sn-b { display: block; text-align: center; text-decoration: none; min-height: 46px; padding: 12px; background: #d4a72c; color: #1d1600; font-weight: 800; border-radius: 12px; }
