:root {
  --green: #1f6e33;
  --green-soft: rgba(31, 110, 51, 0.12);
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --field: #f2f2f7;
  --orange: #c45c00;
  --orange-text: #a14600;
  --red: #c62828;
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --green: #4cb86a;
    --green-soft: rgba(76, 184, 106, 0.16);
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f2f2f7;
    --muted: #a1a1a6;
    --line: #38383a;
    --field: #2c2c2e;
    --orange: #ff9f45;
    --orange-text: #ffb066;
    --red: #ff6b6b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 30px; line-height: 1.15; margin: 6px 0 4px; letter-spacing: -0.02em; }
h2, h1.as-h2 { font-size: 20px; line-height: 1.3; margin: 0 0 6px; letter-spacing: normal; }
h3, h2.sec { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 26px 4px 8px; font-weight: 600; }
p { margin: 6px 0; }
.boot { padding: 80px 16px; text-align: center; color: var(--muted); }

/* Layout */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top-inner { max-width: 720px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.tabs { margin-left: auto; display: flex; gap: 4px; }
.tab {
  border: 0; background: none; padding: 8px 12px; border-radius: 999px; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 15px; position: relative;
}
.tab.on { background: var(--green-soft); color: var(--green); }
.badge {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 17px; text-align: center;
}
main { max-width: 720px; margin: 0 auto; padding: 16px 16px 120px; }

@media (max-width: 640px) {
  /* A blur on the header would pin the fixed tab bar inside it. */
  .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .tabs {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    margin: 0; justify-content: space-around; padding: 6px;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  }
  .tab { flex: 1; padding: 10px 4px; font-size: 13px; }
  .brand span { font-size: 16px; }
}

/* Cards and rows */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card.tight { padding: 0; overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line);
  background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; cursor: pointer;
}
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .sub { color: var(--muted); font-size: 15px; }
.row .end { text-align: right; white-space: nowrap; }
.chev::after { content: "›"; color: var(--muted); font-size: 22px; margin-left: 4px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--green-soft); color: var(--green);
}
.pill.warn { background: rgba(255, 149, 0, 0.16); color: var(--orange-text, var(--orange)); }
.pill.gray { background: var(--field); color: var(--muted); }

/* Forms */
label.field, div.field { display: block; margin: 12px 0 0; }
label.field > span, div.field > span { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px 2px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; background: var(--field); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); }
textarea { min-height: 84px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1.3fr 0.6fr 1fr; gap: 10px; }
.seg { display: flex; background: var(--field); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 9px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--muted);
}
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }

.btn {
  display: block; width: 100%; padding: 15px 18px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--green); color: #fff; font-weight: 700; font-size: 17px; text-align: center; text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.soft { background: var(--green-soft); color: var(--green); }
.btn.plain { background: none; color: var(--green); padding: 10px; }
.btn.danger { background: none; color: var(--red); padding: 10px; }
.btn + .btn { margin-top: 10px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin-top: 0; }

.error { color: var(--red); font-size: 15px; margin-top: 10px; }
.notice { color: var(--green); font-size: 15px; margin-top: 10px; font-weight: 600; }
.price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.price .amount { font-size: 28px; font-weight: 800; }
.services { display: grid; gap: 8px; }
.service {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; text-align: left; width: 100%;
}
.service.on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.service .grow { flex: 1; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.them { align-self: flex-start; background: var(--card); }
.bubble.me { align-self: flex-end; background: var(--green); color: #fff; }
.bubble img { display: block; max-width: 240px; border-radius: 12px; margin: 2px 0; }
.stamp { font-size: 12px; color: var(--muted); align-self: center; margin: 10px 0 2px; }
.composer {
  position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0; background: var(--bg);
}
@media (max-width: 640px) { .composer { bottom: calc(70px + env(safe-area-inset-bottom)); } }
.composer textarea { min-height: 44px; max-height: 140px; border-radius: 22px; padding: 11px 16px; }
.composer .btn { width: auto; border-radius: 22px; padding: 0 18px; }

.photos { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.photos img { width: 140px; height: 140px; object-fit: cover; border-radius: 12px; flex: none; }

/* Payment step */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.45); display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--card); width: 100%; max-width: 520px; max-height: 92vh; overflow: auto;
  border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
}
@media (min-width: 641px) { .overlay { align-items: center; } .sheet { border-radius: 20px; } }
#payment-element { margin: 14px 0; min-height: 120px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { margin-top: 30px; text-align: center; font-size: 13px; color: var(--muted); }
.footer a { color: var(--muted); }

/* ---- Phase 2 and 3 ---- */
.title { font-weight: 600; }
.card > .title:first-child { margin-bottom: 4px; }
.back { width: auto; display: inline-block; padding: 6px 2px; margin: -4px 0 4px; font-weight: 600; }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.head-row h1, .head-row h2 { margin-bottom: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; }
.close { border: 0; background: var(--field); width: 32px; height: 32px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); flex: none; }
.sheet.wide { max-width: 720px; }
.lightbox { align-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; }
.photos img { cursor: zoom-in; }
.thumb { position: relative; flex: none; display: inline-block; }
.thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; display: block; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.6); color: #fff; cursor: pointer; line-height: 1; }
.photos + .btn { margin-top: 8px; }

.choices { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 560px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.choice.on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; background: var(--green-soft); }
/* The savings tag sits at the bottom of its own card, clear of the card above. */
.choice .tag { position: static; display: inline-block; margin-top: 10px; padding: 3px 10px; font-size: 13px; }
.tag { position: absolute; top: -9px; right: 10px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.price .amount span, .per { font-size: 15px; font-weight: 600; color: var(--muted); }

.stars { display: flex; gap: 4px; margin: 8px 0; }
.stars button { border: 0; background: none; cursor: pointer; color: var(--line); padding: 0 2px; line-height: 1; min-width: 44px; min-height: 44px; }
.stars button.on { color: #f5a623; }
.tips .seg { flex-wrap: wrap; }

.receipt-doc { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--card); }
.lines { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.lines td { padding: 6px 0; border-top: 1px solid var(--line); }
.lines .amt { text-align: right; white-space: nowrap; }
.lines .total td { font-weight: 800; border-top: 2px solid var(--text); }
.note-box { background: var(--green-soft); border-radius: 12px; padding: 10px 12px; font-size: 15px; margin: 10px 0; }
.code { font-size: 24px; font-weight: 800; letter-spacing: 0.08em; margin-top: 8px; }

/* Crew */
.job { cursor: pointer; }
.job:hover, .row:hover { background: color-mix(in srgb, var(--field) 50%, transparent); }
.card.job:hover { background: var(--card); box-shadow: 0 0 0 2px var(--green-soft); }
.stop { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.addr { display: inline-block; margin-top: 8px; font-size: 15px; text-decoration: none; }
.addr::before { content: "📍 "; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--field); font-size: 13px; font-weight: 600; }
.job .btn-row { margin-top: 12px; }
.btn.sm { padding: 9px 14px; font-size: 15px; border-radius: 11px; width: auto; flex: 1; }
.btn-row .btn.sm { flex: 1; }
.btn.sm-link { padding: 2px 0; font-size: 14px; width: auto; display: inline; }
.btn.icon { width: 44px; padding: 0; flex: none; }
.btn.danger-solid { background: var(--red); color: #fff; }
.btn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.btn-grid .btn { margin-top: 0; padding: 12px 10px; font-size: 15px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.facts span { background: var(--field); border-radius: 8px; padding: 3px 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.warn-card { box-shadow: 0 0 0 1.5px var(--orange) inset; }
.warn-text { color: var(--orange); font-weight: 600; }
.day-label { padding: 10px 16px 4px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; border-top: 1px solid var(--line); }
.day-label:first-child { border-top: 0; }
.badge.inline { position: static; display: inline-block; vertical-align: 2px; margin-left: 4px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
select.inline { width: auto; padding: 8px 12px; font-size: 15px; }
.inline-num { width: 80px !important; padding: 8px 10px !important; font-size: 15px; }
a.row { text-decoration: none; color: inherit; }
.row .end.btn-row { display: flex; gap: 6px; align-items: center; }
.who { font-size: 12px; color: var(--muted); margin: 4px 6px 0; }
.bubble .time { display: block; font-size: 11px; opacity: 0.65; margin-top: 2px; text-align: right; }
.receipt { align-self: flex-end; font-size: 12px; color: var(--muted); margin-right: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.big { width: 14px; height: 14px; flex: none; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--text); }
.toggle { align-items: flex-start; }
.toggle input { margin-top: 3px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.tile-value { font-size: 26px; font-weight: 800; margin-top: 2px; letter-spacing: -0.01em; }
.card .row { padding-left: 0; padding-right: 0; }
.card.tight .row { padding-left: 16px; padding-right: 16px; }
.card > .price + .price { margin-top: 6px; }

@media (min-width: 900px) {
  main, .top-inner { max-width: 860px; }
}

@media print {
  body * { visibility: hidden; }
  .receipt-doc, .receipt-doc * { visibility: visible; }
  .receipt-doc { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
  .overlay { background: none; position: static; }
}
.head-row > .btn, .head-row > a.btn { flex: none; width: auto; margin-top: 0; }

/* ---- App polish: tab icons, greeting, day strip, empty states ---- */
.tab { display: inline-flex; align-items: center; gap: 7px; }
.tab .icon { flex: none; }
@media (min-width: 641px) { .tab .icon { width: 18px; height: 18px; } }
@media (max-width: 640px) {
  .tabs { padding: 5px; }
  .tab { flex-direction: column; gap: 2px; padding: 7px 2px 6px; font-size: 11px; border-radius: 18px; }
  .tab .icon { width: 22px; height: 22px; }
  .badge { top: 0; right: calc(50% - 22px); }
}
.top { border-bottom-color: color-mix(in srgb, var(--line) 60%, transparent); }
.brand img { box-shadow: 0 1px 3px rgba(0,0,0,0.25); }

.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 4px 0 14px; }
.hello h1 { margin: 2px 0 0; }
.tiles .tile { border: 0; text-align: left; cursor: default; color: inherit; font: inherit; }
.tiles button.tile[onclick], .tiles .tile.warn { cursor: pointer; }
.tile.warn .tile-value { color: var(--orange); }
.tile { box-shadow: 0 1px 2px rgba(0,0,0,0.04); }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 2px; border-radius: 14px;
  border: 0; background: var(--card); color: inherit; cursor: pointer; font: inherit;
}
.day .dow { font-size: 12px; font-weight: 600; color: var(--muted); }
.day .dnum { font-size: 20px; font-weight: 800; line-height: 1.2; }
.day .dcount { font-size: 11px; font-weight: 600; color: var(--green); white-space: nowrap; }
.day .dcount.zero { color: var(--muted); opacity: 0.6; }
.day.on { background: var(--green); color: #fff; }
.day.on .dow, .day.on .dcount { color: rgba(255,255,255,0.85); opacity: 1; }
@media (max-width: 420px) { .day .dcount { font-size: 10px; } .day .dnum { font-size: 18px; } }

.empty { text-align: center; padding: 30px 20px; }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.empty-title { font-size: 18px; font-weight: 700; }
.empty .btn-row { flex-wrap: wrap; }
.empty .btn.sm { flex: none; }
a.btn.sm { display: inline-block; }

/* Brand accent in dark mode, matching the home page */
@media (prefers-color-scheme: dark) {
  :root { --green: #6fd13a; --green-soft: rgba(111, 209, 58, 0.15); }
  .btn:not(.soft):not(.plain):not(.danger):not(.danger-solid), .day.on, .stop, .bubble.me { color: #0b0b0b; }
  .day.on .dow, .day.on .dcount { color: rgba(0,0,0,0.7); }
}
@media (max-width: 640px) {
  .hello { flex-wrap: wrap; align-items: flex-start; }
  .hello h1 { font-size: 27px; }
  .tiles { gap: 8px; }
  .tile { padding: 10px 14px; border-radius: 14px; }
  .tile-value { font-size: 22px; }
}

/* ---- Uniform forms and alignment ----
   One left edge: section titles, labels, and hints line up with the text
   inside cards; every box and button is the same height and shape. */
h3, h2.sec { margin: 28px 16px 8px; }
label.field > span, div.field > span { margin: 0 0 6px; font-weight: 500; }
.card > p.muted.small, label.field + p.muted.small, .card p.small { line-height: 1.45; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=url], select {
  display: block; width: 100%; max-width: 100%; min-width: 0; height: 48px; padding: 0 14px; line-height: 48px;
  border-radius: 12px; border: 1px solid transparent; background: var(--field); outline: none;
  -webkit-appearance: none; appearance: none; font-size: 17px;
}
textarea { padding: 12px 14px; border-radius: 12px; font-size: 17px; display: block; max-width: 100%; }
/* iPhone Safari gives date fields a built-in minimum width and centers the text. */
input[type=date] { text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: 0.6; }
select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select.inline { height: 40px; line-height: 40px; padding: 0 34px 0 14px; font-size: 15px; width: auto; background-color: var(--card); background-position: right 12px center; }
.inline-num { height: 40px !important; line-height: 40px !important; }
label.field input, label.field select, label.field textarea { margin: 0; }
.grid2 > *, .grid3 > * { min-width: 0; }
.grid2 label.field, .grid3 label.field { margin-top: 12px; }

.seg { border-radius: 12px; padding: 3px; }
.seg button { min-height: 42px; padding: 0 6px; border-radius: 9px; }
.service { padding: 14px 16px; border-radius: var(--radius); min-height: 64px; }
.services { gap: 10px; }
.btn { min-height: 50px; padding: 0 18px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; }
.btn.plain, .btn.danger { min-height: 44px; }
.btn.sm { min-height: 40px; padding: 0 14px; }
/* Small text buttons (Edit, Remove): they look the same, with a finger-sized area around them. */
.btn.sm-link { min-height: 40px; display: inline-flex; align-items: center; padding: 0 8px; margin: -9px -8px; }
.btn.icon { min-height: 44px; height: 44px; }
.composer .btn { min-height: 44px; height: 44px; }
.composer textarea { min-height: 44px; padding: 10px 16px; }
a.btn.sm { display: inline-flex; }
.back.btn { display: inline-flex; min-height: 44px; padding: 0 2px; justify-content: flex-start; }
.btn-grid .btn { min-height: 46px; padding: 0 10px; }
.check { min-height: 32px; }
@media (max-width: 640px) {
  main { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 28px; }
}
@media (max-width: 400px) {
  .grid3 { grid-template-columns: 1fr 1fr; column-gap: 10px; }
  .grid3 > :first-child { grid-column: 1 / -1; }
  .days { gap: 4px; }
  .day { padding: 8px 0; border-radius: 12px; }
  .day .dow { font-size: 11px; }
}
@media (max-width: 360px) {
  .grid2:not(.keep) { grid-template-columns: 1fr; }
  .btn-row { flex-wrap: wrap; }
}

.grid2, .grid3 { row-gap: 0; }

/* Lawn measuring on the map */
.measure-btn { margin-top: 10px; }
.measure-map { position: relative; height: min(60vh, 520px); border-radius: 14px; overflow: hidden; background: #1c1c1e; cursor: crosshair; }
.measure-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.measure-tip { text-align: center; font-size: 15px; margin: 12px 0 2px; min-height: 3em; line-height: 1.5; display: flex; align-items: center; justify-content: center; }
.measure-total { text-align: center; font-size: 24px; font-weight: 800; color: var(--green); margin: 2px 0 8px; }
.measure .btn-row .btn { flex: 1; }
.measure-dot { width: 14px; height: 14px; border-radius: 50%; background: #ffd60a; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.5); pointer-events: none; }
@media (max-width: 640px) { .measure-map { height: 52vh; } }

/* ---- Work mode ---- */
.progress-row { display: flex; align-items: center; gap: 12px; margin: 0 2px 12px; }
.progress { flex: 1; height: 8px; border-radius: 99px; background: var(--card); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .4s; }
.map-card { margin-bottom: 10px; }
.route-map, .outline-map { width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--field); }
.route-actions { flex-wrap: wrap; margin-bottom: 12px; }
.route-actions .btn { flex: 1 1 200px; }
.stop-card { border: 2px solid transparent; }
.stop-card.live { border-color: var(--orange); }
.stop-nav { display: flex; align-items: center; justify-content: space-between; margin: -8px -8px 6px; }
.stop-nav .btn.icon { width: 40px; min-height: 40px; height: 40px; color: var(--text); }
.stop-address { font-size: 17px; font-weight: 600; margin: 10px 0 12px; }
.fact-strong { background: rgba(255,149,0,0.16) !important; color: var(--orange) !important; }
.stop-actions { margin-top: 14px; }
.stop-actions .btn-row .btn { flex: 1; }
.onsite { display: inline-block; font-weight: 700; color: var(--orange); font-size: 15px; }
.done-card { text-align: center; }
.done-card .tiles { text-align: left; }
.stop-row { padding: 8px 8px 8px 12px; gap: 6px; cursor: default; }
.stop-row.on { background: var(--green-soft); }
.plainbtn { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 4px 0; min-width: 0; }
.plainbtn > span:last-child { min-width: 0; }
.sub.block { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop.done { background: var(--field); color: var(--muted); }
.stop-row .stop { flex: none; margin: 0; }
.reorder { display: flex; flex: none; }
.reorder .btn.icon { width: 36px; min-height: 36px; height: 36px; color: var(--muted); font-size: 18px; }

/* Checklist */
.checklist { display: grid; gap: 6px; margin-top: 8px; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--field); cursor: pointer; font-size: 16px; }
.step input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.step.on span { color: var(--muted); text-decoration: line-through; }

/* ---- Owner dashboard ---- */
.kpi { position: relative; }
.change { display: inline-block; font-size: 12px; font-weight: 700; margin-top: 2px; }
.change.good { color: var(--green); }
.change.bad { color: var(--red); }
.chart { margin: 8px 0 4px; }
.chart svg { width: 100%; height: 190px; display: block; overflow: visible; }
.chart-read { min-height: 24px; font-size: 15px; margin-bottom: 4px; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.chart .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .bar { fill: var(--green); opacity: 0.85; }
.chart .bar.on { opacity: 1; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.grid-2 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2 > .card { margin-bottom: 12px; } }
.grid-2 > .card .price + .price { margin-top: 6px; }
.rank { display: grid; gap: 10px; margin-top: 8px; }
.rank-label { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.rank-track { height: 8px; border-radius: 99px; background: var(--field); margin-top: 4px; overflow: hidden; }
.rank-track span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.aging { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.age { background: var(--field); border-radius: 12px; padding: 10px 12px; }
.age.late b { color: var(--red); }
.big-stat { font-size: 34px; font-weight: 800; margin: 4px 0 0; }
.stars-text { font-size: 20px; color: #f5a623; letter-spacing: 1px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 6px 6px 6px 0; }
.data-table td { padding: 9px 6px 9px 0; border-top: 1px solid var(--line); }
.data-table th:not(:first-child), .data-table td:not(:first-child) { text-align: right; white-space: nowrap; }
@media (max-width: 480px) { .data-table th:nth-child(3), .data-table td:nth-child(3) { display: none; } }
@media (min-width: 900px) { .tabs .tab { padding: 8px 12px; } }
@media (max-width: 640px) { .tab { font-size: 10.5px; } }
.stars-off { color: var(--line); }
.card .tile { background: var(--field); box-shadow: none; }

/* ---- Computer layouts (customer side and wide pages) ---- */
@media (min-width: 1000px) {
  .top-inner { max-width: 1120px; }
  main { max-width: 860px; }
  main.screen-book, main.screen-visits, main.screen-account, main.screen-more-dashboard, main.screen-route { max-width: 1120px; }
  main.screen-book > h1, main.screen-book > h1 + p { max-width: none; }

  /* Book: the form on the left, the summary and button stay in view on the right. */
  .book-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
  .book-summary { position: sticky; top: 84px; padding-top: 34px; }
  .services { grid-template-columns: 1fr 1fr; }

  /* My visits: two columns under the next-visit card. */
  .visits-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: start; }

  /* Account: cards side by side. */
  .account-grid { columns: 2; column-gap: 16px; }
  .account-grid > * { break-inside: avoid; }

  /* Route on a computer: map and stop side by side. */
  main.screen-route .map-card .route-map { height: 360px !important; }

  .row:hover { background: color-mix(in srgb, var(--field) 60%, transparent); }
  .btn:not(:disabled):hover { filter: brightness(1.05); }
  .service:hover { border-color: var(--green); }
}
.summary-card { padding-bottom: 10px; }
.summary-head { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.summary-lines > div { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.summary-lines > div:first-child { border-top: 0; }
/* Both sides may wrap, so a long label or address never pushes the price out of the card. */
.summary-lines span { color: var(--muted); flex: 0 1 auto; }
.summary-lines b { font-weight: 600; text-align: right; flex: 0 1 auto; }
/* Prices never split across lines. */
.summary-lines b, .price .amount { overflow-wrap: normal; word-break: keep-all; }
.summary-lines b:only-child { margin-left: auto; }
@media (max-width: 999px) { .summary-card { display: none; } }

.next-visit { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; color: inherit; font: inherit; cursor: pointer; margin-top: 10px; }
.next-date { flex: none; width: 58px; height: 62px; border-radius: 14px; background: var(--green); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.next-date span { font-size: 12px; font-weight: 700; text-transform: uppercase; opacity: .9; }
.next-date b { font-size: 26px; }
@media (prefers-color-scheme: dark) { .next-date { color: #0b0b0b; } }
.next-visit .grow { min-width: 0; }
.next-visit .muted.small:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sign in: on a computer, the brand on one side and the form on the other. */
.auth { max-width: 440px; }
.auth-brand { display: none; }
@media (min-width: 900px) {
  .auth { max-width: 1040px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; min-height: calc(100vh - 40px); padding-top: 20px; }
  .auth-brand { display: block; background: #000; border-radius: 28px; padding: 36px 36px 30px; color: #fff; }
  .auth-brand img { width: 100%; height: auto; display: block; }
  .auth-brand ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; font-size: 16px; color: #d1d1d6; }
  .auth-brand li::before { content: "✓ "; color: #7ddc1f; font-weight: 800; }
  .auth-panel { max-width: 420px; width: 100%; justify-self: center; }
  .auth-head { margin-top: 0 !important; }
}
.empty > .btn { display: inline-flex; width: auto; }

/* Full business name in the header: one line on computers, two lines on phones. */
.brand-name b { font-weight: 700; }
.brand-name > span { font-weight: 700; }
@media (max-width: 900px) {
  .brand-name { display: flex; flex-direction: column; line-height: 1.1; }
  .brand-name > span { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
}

/* More: room for wide tools (dashboard, calendar) on a computer */
@media (min-width: 1000px) { main.screen-more { max-width: 1120px; } }

/* Booking: what's included */
.service-info { padding: 0; margin-top: 10px; }
.service-info summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.service-info summary::-webkit-details-marker { display: none; }
.service-info summary::after { content: "›"; color: var(--muted); font-size: 22px; transform: rotate(90deg); transition: transform .2s; margin-left: auto; }
.service-info[open] summary::after { transform: rotate(-90deg); }
.service-info summary .muted { font-weight: 400; text-align: right; }
.service-info ul { margin: 0; padding: 0 16px 14px 34px; display: grid; gap: 4px; font-size: 15px; }

/* Schedule header actions */
.hello-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hello-actions .btn.sm { flex: none; }

/* Owner calendar */
@media (min-width: 1000px) { main.screen-more-calendar { max-width: 1240px; } }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { margin: 0 6px; min-width: 170px; text-align: center; }
.cal-nav .btn.sm { flex: none; width: 40px; padding: 0; font-size: 20px; }
.cal-nav .btn.plain.sm { width: auto; font-size: 15px; }
.cal-filters { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cal-legend { margin: 0 0 10px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; text-align: center; padding: 4px 0; }
.cal-day { background: var(--card); border-radius: 10px; min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: default; border: 2px solid transparent; min-width: 0; }
.cal-day.other { background: var(--bg); }
.cal-day.other .cal-date span { color: var(--muted); }
.cal-day.past { background: color-mix(in srgb, var(--card) 70%, var(--bg)); }
.cal-day.today { border-color: var(--green); }
.cal-day.closed { background: repeating-linear-gradient(135deg, var(--card), var(--card) 6px, var(--field) 6px, var(--field) 12px); }
.cal-day.over { border-color: var(--orange); background: rgba(255,149,0,0.10); }
.cal-date { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; }
.cal-count { font-size: 11px; font-weight: 700; color: var(--muted); }
.cal-off { font-size: 11px; color: var(--muted); font-weight: 600; }
.cal-jobs { display: grid; gap: 3px; min-width: 0; }
.cal-job { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 3px 6px 3px 8px; font: inherit; font-size: 12px; font-weight: 600; color: var(--text);
  background: color-mix(in srgb, var(--team) 16%, var(--card)); box-shadow: inset 3px 0 0 var(--team); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; }
.cal-job.done { opacity: 0.55; text-decoration: line-through; cursor: pointer; }
.cal-job.hold { box-shadow: inset 3px 0 0 var(--team), inset 0 0 0 1px var(--orange); }
.cal-more { font-size: 11px; color: var(--muted); font-weight: 600; padding-left: 4px; cursor: pointer; }
@media (max-width: 760px) {
  .cal-day { min-height: 64px; padding: 4px; }
  .cal-job { font-size: 0; padding: 0; height: 6px; border-radius: 3px; background: var(--team); box-shadow: none; }
  .cal-jobs { grid-template-columns: repeat(auto-fill, minmax(10px, 1fr)); gap: 2px; }
  .cal-more, .cal-off { font-size: 9px; }
  .cal-nav h2 { min-width: 0; font-size: 17px; }
}
@media (max-width: 760px) { .cal-job, .cal-more { pointer-events: none; } .cal-day { cursor: pointer; } }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.account-who { min-width: 0; }
.account-who .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-row .btn.sm { flex: none; width: auto; }

/* No signal / saved job steps */
.queue-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--green-soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.queue-banner.offline { background: rgba(255,149,0,0.16); }
.queue-banner > div { display: flex; flex-direction: column; gap: 2px; font-size: 15px; min-width: 0; }
.queue-banner span { color: var(--muted); font-size: 14px; }
.queue-banner .btn.sm { flex: none; width: auto; }
.queue-problem { color: var(--red) !important; }

/* Add-ons on a job */
.addon-list { display: grid; gap: 8px; margin-top: 8px; }
.addon { background: var(--field); border-radius: 12px; padding: 12px; }
.addon-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.addon-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; flex: none; }
.addon-dot.going { border-color: var(--orange); background: var(--orange); }
.addon-dot.done { border-color: var(--green); background: var(--green); }
.addon-photos { margin-top: 10px; }
.photo-pair { display: flex; gap: 12px; flex-wrap: wrap; }
.photo-pair > * { flex: none; }

/* Drawing on photos */
.thumb-draw { position: absolute !important; left: 4px; bottom: 4px; top: auto !important; right: auto !important; width: auto !important; height: auto !important; border-radius: 8px !important; padding: 3px 7px; font-size: 12px; font-weight: 700; }
.markup-wrap { background: #000; border-radius: 12px; overflow: hidden; display: flex; justify-content: center; }
.markup-canvas { display: block; max-width: 100%; max-height: 62vh; touch-action: none; cursor: crosshair; }
.markup-tools { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.markup-colors { display: flex; gap: 8px; margin-right: auto; }
.markup-colors .swatch { border-color: var(--line); }
.markup-colors .swatch.on { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.markup-tools .btn.sm { flex: none; width: auto; }

/* Weather on the Schedule */
.weather { display: grid; gap: 8px; grid-template-columns: 1fr; margin-bottom: 12px; }
@media (min-width: 700px) { .weather { grid-template-columns: 1fr 1fr; } }
.weather-day { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 10px 14px; }
.weather-day.rainy { box-shadow: inset 0 0 0 1.5px var(--orange); }
.weather-icon { font-size: 26px; line-height: 1; flex: none; }
.weather-day .grow { min-width: 0; }
.weather-day .sub { color: var(--muted); font-size: 14px; }
.weather-day .btn.sm { flex: none; width: auto; }
.markup-tools .btn + .btn, .btn-row .btn + .btn { margin-top: 0; }

/* ---- Phones: a docked tab bar and message box, nothing showing through ---- */
@media (max-width: 640px) {
  :root { --tabbar: 64px; }
  .tabs {
    left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-radius: 0; border: 0;
    border-top: 1px solid var(--line); background: var(--card); box-shadow: 0 -4px 18px rgba(0,0,0,0.06);
    backdrop-filter: none; -webkit-backdrop-filter: none; align-items: stretch;
  }
  /* Safari's floating toolbar sits below the bar; keep the same solid color under it too. */
  .tabs::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 160px; background: var(--card); }
  .tab { border-radius: 14px; justify-content: center; }
  main { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 28px); }

  /* The message box sits right on top of the tab bar, full width. */
  .composer {
    position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); z-index: 9;
    padding: 8px 12px; margin: 0; background: var(--bg); border-top: 1px solid var(--line); align-items: flex-end;
  }
  main:has(.composer) .footer { display: none; }
  main:has(.composer) { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 88px); }
  .chat-end { scroll-margin-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 84px); }
  .badge { top: 2px; right: calc(50% - 24px); }
}
/* Typing on a phone: the keyboard is up, so the tab bar is put away and the message box sits on the keyboard. */
@media (max-width: 640px) and (pointer: coarse) {
  html.typing .tabs { display: none; }
  html.typing .composer { bottom: 0; }
  html.typing main { padding-bottom: 28px; }
  html.typing main:has(.composer) { padding-bottom: 88px; }
  html.typing .chat-end { scroll-margin-bottom: 84px; }
}
.composer textarea { resize: none; }

/* ---- Computers: the header lines up with the page under it ---- */
@media (min-width: 1000px) {
  main { max-width: 960px; }
  .top-inner { max-width: 960px; }
  body:has(main.screen-book) .top-inner, body:has(main.screen-visits) .top-inner, body:has(main.screen-account) .top-inner,
  body:has(main.screen-more) .top-inner, body:has(main.screen-more-dashboard) .top-inner, body:has(main.screen-route) .top-inner { max-width: 1120px; }
  body:has(main.screen-more-calendar) .top-inner { max-width: 1240px; }
}
/* Search boxes and fields sitting right on the page get a card background so they stand out. */
main > input[type=text], main > input[type=email], main > input[type=date], .head-row > input[type=date] { background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }

/* Free maps (Leaflet) */
.route-map .leaflet-container, .route-map.leaflet-container, .outline-map.leaflet-container, .measure-map.leaflet-container { font: inherit; background: var(--field); }
.route-pin { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #1f6e33; color: #fff; font-weight: 700; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.route-pin.current { background: #e07b1a; width: 34px; height: 34px; margin: -3px; font-size: 14px; }
.route-pin.done { background: #c7c7cc; color: #444; }
.leaflet-control-attribution { font-size: 10px; }
/* Keep the map's own layers and controls inside the map box (under the header and tab bar). */
.route-map, .outline-map, .measure-map { position: relative; z-index: 0; isolation: isolate; }
.lawn-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--green-soft); }
.lawn-size { font-size: 22px; font-weight: 800; color: var(--green); }

/* Alerts: on/off switches */
.switch-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line, rgba(60, 60, 67, 0.12)); cursor: default; }
.alerts h2 + .switch-row { border-top: 0; padding-top: 4px; }
label.switch-row { cursor: pointer; }
.switch-row .grow { flex: 1; min-width: 0; }
.switch-row .title { font-weight: 600; }
.switch-row .sub, .switch-row .sub.block { color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 2px; white-space: normal; overflow: visible; text-overflow: clip; }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 51px; height: 31px; margin: 0; border-radius: 16px; background: rgba(120, 120, 128, 0.32); cursor: pointer; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: 0.5; cursor: default; }
.switch:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.export-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.export-row .btn { flex: 1 1 220px; margin: 0; }

/* Keyboard focus: a clear ring on whatever has it (not on mouse clicks). */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.sheet:focus { outline: none; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--green); color: #fff; padding: 10px 14px; border: 0; border-radius: 10px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.skip:focus { top: 10px; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px var(--green-soft); }
main:focus { outline: none; }

/* Deleting a message: swipe left on a phone; hover or tab on a computer. */
.msg-row { position: relative; display: flex; align-items: center; gap: 6px; touch-action: pan-y; }
.msg-row.me { justify-content: flex-end; }
.msg-row .bubble { transition: transform 0.2s ease; }
.msg-delete { display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
@media (hover: none) {
  .msg-row { overflow: hidden; }
  .msg-delete { position: absolute; right: 0; top: 2px; bottom: 2px; width: 80px; border-radius: 14px; background: #ff3b30; color: #fff; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
  .msg-delete span { display: none; }
  .msg-row.open .msg-delete { opacity: 1; pointer-events: auto; }
  .msg-row.open .bubble { transform: translateX(-88px); }
}
@media (hover: hover) {
  .msg-delete { order: -1; background: none; color: var(--muted); padding: 6px; border-radius: 8px; opacity: 0; }
  .msg-row.them .msg-delete { order: 1; }
  .msg-delete span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .msg-row:hover .msg-delete, .msg-delete:focus-visible { opacity: 1; }
  .msg-delete:hover { color: #ff3b30; background: rgba(255, 59, 48, 0.1); }
}
.who.me { text-align: right; }

/* Account: a settings menu, like the iPhone's */
.account-menu, .account-page { max-width: 640px; }
.profile-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; color: inherit; }
.profile-card .grow { flex: 1; min-width: 0; }
.profile-card .title { font-weight: 700; font-size: 19px; }
.profile-card .sub { color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.set-row { color: inherit; text-decoration: none; font: inherit; }
.set-row .sub.block { white-space: normal; }
.set-icon { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; }
.set-icon.danger { background: rgba(255, 59, 48, 0.12); color: #d70015; }
@media (hover: hover) { .set-row:hover { background: var(--field); } }
.account-menu .card.tight, .account-page .card.tight { overflow: hidden; }
.alerts .switch-row:first-child { border-top: 0; padding-top: 4px; }

/* Crew: one row of quick actions (call, text, directions, message) */
.quick-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
.qa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 600; text-decoration: none; }
@media (hover: hover) { .qa:hover { filter: brightness(0.96); } }
.qa:active { transform: scale(0.98); }
a.job-who { display: flex; width: fit-content; align-items: center; gap: 6px; margin-top: 12px; font-size: 18px; font-weight: 600; color: inherit; text-decoration: none; }
a.job-who .chev { margin-left: 0; }
.contact-lines { display: grid; gap: 6px; margin-top: 10px; font-size: 15px; }
.contact-lines div { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.contact-lines .icon { flex: none; color: var(--muted); }
.avatar.sm { width: 40px; height: 40px; font-size: 14px; }
.sub.strong { color: var(--text); font-weight: 600; }
.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; }
.inline-form .btn { width: auto; margin-top: 0; padding: 0 22px; }
.credit-card { display: flex; align-items: center; gap: 12px; }
.credit-card .sub { color: var(--muted); font-size: 14px; }

/* Booking: pick which property */
.place-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip-btn { border: 1.5px solid var(--line, #d2d2d7); background: var(--card); color: inherit; font: inherit; font-size: 15px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-btn.on { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.prop-row { align-items: center; }
.prop-row .btn.sm { flex: none; width: auto; min-width: 0; margin-top: 0; padding: 6px 8px; min-height: 40px; }
.prop-row .grow { flex: 1; }
.prop-row .grow { min-width: 0; }

/* First-visit welcome */
.welcome-steps { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 16px; }
.welcome-steps li { display: flex; gap: 12px; align-items: flex-start; }
.welcome-steps .set-icon { width: 40px; height: 40px; border-radius: 11px; }

/* Business settings: the untaxed-services list in two columns when there's room */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }
.btn.plain.danger, .btn.sm-link.danger { color: var(--red, #d70015); background: none; }

/* Status labels stay on one line; the text beside them wraps instead. */
.pill { white-space: nowrap; }
.head-row > .pill, .next-visit > .pill { flex: none; }
.head-row > h1.as-h2 { margin: 0; }

/* A row of buttons above a list (month and + Add) keeps its distance from the list. */
.head-row + .card { margin-top: 12px; }
/* Customers: filters and the crew's tags */
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 8px; }
.filter-chips .chip-btn { flex: none; min-height: 40px; font-size: 14px; padding: 6px 12px; }
.chip-count { opacity: 0.6; font-weight: 600; margin-left: 2px; }
.tag-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.crew-tag { background: var(--field); color: var(--muted); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }

/* Itemized quotes: the lines to read, and the crew's editor */
.quote-lines { list-style: none; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.quote-lines li { display: flex; align-items: baseline; gap: 12px; }
.quote-lines .grow { flex: 1; min-width: 0; }
.ql-label { display: block; font-weight: 600; overflow-wrap: anywhere; }
.ql-detail { display: block; color: var(--muted); font-size: 14px; }
.ql-amount { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ql-editor { margin-top: 12px; display: grid; gap: 10px; }
.ql-row { background: var(--field); border-radius: 14px; padding: 10px; display: grid; gap: 8px; }
.ql-top { display: flex; gap: 6px; align-items: center; }
.ql-top input { flex: 1; min-width: 0; background: var(--card); }
.ql-top .btn.icon { flex: none; width: 44px; min-height: 44px; margin: 0; padding: 0; color: var(--muted); }
.ql-nums { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: end; }
.ql-nums label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); min-width: 0; }
.ql-nums label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql-nums input, .ql-nums select { background: var(--card); min-width: 0; width: 100%; padding-left: 12px; padding-right: 8px; }
.ql-sum { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); padding: 0 4px; }
.ql-sum b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.ql-total { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (min-width: 620px) {
  .ql-nums { grid-template-columns: 110px 1fr 1fr 130px; }
  .ql-sum { grid-column: auto; display: grid; gap: 3px; justify-content: stretch; text-align: right; padding: 0 4px 10px; }
}

/* A tab that's a link to another page (Home) looks like the rest. */
a.tab { text-decoration: none; }

/* Text it: the ready-written texts for a visit. */
button.qa { border: 0; width: 100%; font-family: inherit; cursor: pointer; }
.text-option { border-top: 1px solid var(--line); padding: 14px 0; }
.text-option p { margin: 6px 0 10px; color: var(--muted); overflow-wrap: anywhere; }
.text-option .btn-row .btn { margin-top: 0; }

/* An outline that changes a mow's price: the choice, stacked. */
.price-change .btn { margin-top: 8px; }

/* The job's Money card: where the money stands, one main button, the rest tucked away. */
.money-status { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.money-status.good { color: var(--green); font-weight: 600; }
.money-status.warn { color: var(--warn, #a35a00); }
.card.money > .btn { margin-top: 12px; }
.invoice-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 10px; }
.invoice-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; }
/* Side by side: no pulled-in edges (they made the two overlap on phones). */
.invoice-actions .btn, .invoice-actions .btn.sm-link { width: auto; min-height: 44px; padding: 0; margin: 0; }
.money-more { margin-top: 12px; border-top: 1px solid var(--line); }
.money-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 600; color: var(--green); }
.money-more > summary::-webkit-details-marker { display: none; }
.money-more > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 6px 0 0; transition: transform .15s; }
.money-more[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.money-more .set-row { padding-left: 0; padding-right: 0; }

/* My visits: what each "Needs you" row is waiting on, and Show more. */
.need-row .need-text { color: var(--warn, #a35a00); font-weight: 600; font-size: 15px; margin-top: 2px; }
.need-row .end b { font-size: 16px; }
.more-row { justify-content: center; color: var(--green); font-weight: 600; min-height: 48px; }
.more-row .grow { text-align: center; }

/* Photos on a phone: Take a photo and Choose photos side by side. */
.photo-add .btn-row { margin-top: 6px; }
.photo-add .btn-row .btn { margin: 0; flex: 1; white-space: nowrap; font-size: 15px; padding-left: 8px; padding-right: 8px; }

/* Tips: 15% / 20% / 25% chips with the amount under each, like the app. */
.tip-chips { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 8px 0 4px; }
.tip-chips button { min-height: 52px; border: 0; border-radius: 12px; background: var(--green-soft); color: var(--green); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 2px; line-height: 1.2; }
.tip-chips button b { font-size: 15px; }
.tip-chips button span { font-size: 13px; }
.tip-chips button.on { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .tip-chips button.on { color: #06210d; } }
.tip-prompt { text-align: left; }
.tip-prompt h2 { margin: 6px 0 2px; font-size: 22px; }
.tip-prompt .done-mark { width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; }
.tip-prompt .photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tip-prompt .good-text { color: var(--green); font-weight: 600; margin-top: 12px; }

/* Disputes: the choices, and where one stands. */
.choice-list { display: grid; gap: 8px; margin-top: 8px; }
.choice-list button { text-align: left; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.choice-list button.on { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 600; }
.dispute-card.open { border-left: 4px solid var(--orange); }

/* Kind-of-work colors on the Schedule: a stripe on each job, a dot by the
   service, dots under each day, and the day's mix. */
.card.job.svc { box-shadow: inset 5px 0 0 var(--svc); padding-left: 22px; }
.card.job.svc:hover { box-shadow: inset 5px 0 0 var(--svc), 0 0 0 2px var(--green-soft); }
.svc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--svc); margin-right: 6px; vertical-align: 1px; }
.job .svc-dot { background: var(--svc); }
.svc-mix { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 2px 12px; }
.svc-chip { display: inline-flex; align-items: center; font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--svc) 14%, var(--card)); color: var(--text); }
.day .ddots { display: flex; gap: 2px; justify-content: center; min-height: 6px; margin-top: 3px; flex-wrap: wrap; max-width: 40px; }
.day .ddots span { width: 6px; height: 6px; border-radius: 50%; }
.day.on .ddots span { box-shadow: 0 0 0 1.5px rgba(255,255,255,0.9); }

/* A small link button under something else at the end of a row (Remove under
   the team picker): keep it clear of what's above it. */
.row .end .btn.sm-link { margin: 4px -8px 0 0; }

/* Legal links read as one piece, not split across lines. */
.legal-links a { white-space: nowrap; }

/* The All-Inclusive Plan stands out at the top of the services. */
.service.featured { border: 1.5px solid var(--green); }
.all-in-pays { margin-top: 8px; }
.allin-promo { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 10px 0 0; padding: 12px 14px; border: 1.5px dashed var(--green); border-radius: 14px; background: var(--green-soft); color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.allin-promo .tag { flex: none; }
.service .tag, .allin-promo .tag { position: static; display: inline-block; }
@media (prefers-color-scheme: dark) { .tag { color: #06210d; } }

/* Sign-up: "I agree to the Terms…" (links stay tappable, text wraps under the box). */
.check.agree { align-items: flex-start; font-size: .95rem; line-height: 1.4; }
.check.agree input { flex: none; margin-top: 1px; }

/* Chat: one round + for photos (like iMessage), with a small menu above it. */
.attach { position: relative; flex: none; align-self: flex-end; }
.attach-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--green-soft); color: var(--green); }
.attach-btn:hover { filter: brightness(.96); }
.attach-btn:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.attach-btn[aria-expanded="true"] svg { transform: rotate(45deg); }
.attach-btn svg { transition: transform .15s; }
.attach-menu { position: absolute; left: 0; bottom: 54px; z-index: 30; min-width: 250px; max-width: calc(100vw - 32px); padding: 6px; border-radius: 16px;
  background: var(--card); box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.06); }
.attach-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: 10px;
  background: none; color: inherit; font: inherit; font-weight: 500; text-align: left; cursor: pointer; white-space: nowrap; }
.attach-menu button svg { color: var(--green); }
.attach-menu button:hover, .attach-menu button:focus-visible { background: rgba(120,120,128,.14); outline: none; }

.sub-head { font-size: 1rem; margin: 20px 0 4px; }

/* Calendar: "By service" / "By team" stay on one line each. */
.cal-filters .seg { flex: none; }
.cal-filters .seg button { white-space: nowrap; padding: 0 12px; }

/* Service agreements: suggestion chips, the month picker, the scope text. */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.chip-row .chip-btn, .month-grid .chip-btn { min-height: 40px; font-size: 14px; padding: 6px 12px; }
.month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.month-grid .chip-btn { padding: 6px 0; text-align: center; }
.scope-text { white-space: pre-wrap; margin-top: 10px; background: var(--field, rgba(120,120,128,.08)); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.contract-inv { flex-wrap: wrap; }
.contract-inv select.inline { width: auto; min-height: 40px; }
/* Commercial requests */
.lead .lead-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 15px; margin: 10px 0; }
.lead .lead-meta dt { color: var(--muted, #6e6e73); }
.lead .lead-meta dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Arrival times and Rain delay */
.day-tools { margin: 0 0 12px; gap: 8px; }
.day-tools .btn { width: auto; flex: none; }
.arrival-row, .rain-row { flex-wrap: wrap; gap: 8px 12px; }
.arrival-row .stop-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.arrival-row select.inline, .rain-row select.inline { width: auto; min-height: 44px; max-width: 100%; }
.arrival-row .updown { display: flex; gap: 2px; }
.arrival-row .updown .btn { width: 44px; min-height: 44px; padding: 0; font-size: 18px; }
.rain-row .rain-pick { display: flex; align-items: center; min-height: 44px; }
.rain-row .rain-pick input { width: 22px; height: 22px; accent-color: var(--green); }
.good-text { color: var(--green); font-weight: 600; }
.arrival-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--green); font-weight: 600; }
.arrival-row .grow, .rain-row .grow { flex: 1 1 220px; min-width: 0; }
.arrival-row select.inline, .rain-row select.inline { flex: 1 1 170px; }
@media (max-width: 560px) { .arrival-row select.inline, .rain-row select.inline { margin-left: 38px; } }
.handbook-search { margin: 12px 0 14px; }
.handbook { display: grid; gap: 10px; }
.handbook-sec { padding: 0; }
.handbook-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.handbook-head .title { font-weight: 600; }
.handbook-head .chev::after { display: inline-block; transform: rotate(90deg); transition: transform .15s; }
.handbook-head .chev.up::after { transform: rotate(-90deg); }
.handbook-list { margin: 0; padding: 0 18px 14px 34px; display: grid; gap: 10px; line-height: 1.5; }
.handbook-list b { font-weight: 600; }
.handbook-head .grow { flex: 1 1 auto; min-width: 0; }
.handbook-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.handbook-head .chev { flex: none; width: 22px; text-align: center; }
.handbook-head .chev::after { margin-left: 0; }
.seg.wrap-seg { flex-wrap: wrap; }
.seg.wrap-seg button { flex: 1 1 calc(50% - 3px); min-height: 44px; }
.leaf-add span { line-height: 1.45; }
.price-row { align-items: center; }
.price-input { position: relative; flex: none; width: 108px; }
.price-input .dollar { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.price-input input { padding-left: 24px; text-align: right; min-height: 44px; width: 100%; }
.price-input .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.upgrade-row { align-items: center; gap: 12px; }
.upgrade-row .btn { flex: none; width: auto; }
@media (max-width: 520px) { .upgrade-row { flex-wrap: wrap; } .upgrade-row .btn { width: 100%; } }
.upgrade-lines { margin-top: 12px; }
.bush-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.bush-sizes .field > span { font-size: 14px; }
@media (max-width: 420px) { .bush-sizes { grid-template-columns: 1fr; } }
.allin-lines > div:last-child { font-weight: 600; }
.inline-btn { width: auto; display: inline-flex; min-height: 36px; margin-left: 6px; padding: 4px 10px; }
.estimate-q .est-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 420px) { .estimate-q .est-counts { grid-template-columns: 1fr; } }
.estimate-q .est-count > span { font-size: 14px; }
.seg-hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.seg button.on .seg-hint { color: inherit; opacity: .8; }
.crew-estimate { margin: 12px 0 4px; padding: 12px; border-radius: 12px; background: var(--field); }
.crew-estimate .btn { margin-top: 10px; width: auto; }
.price-input.pct input { padding-left: 12px; padding-right: 26px; }
.price-input.pct .pct-sign { left: auto; right: 12px; }
/* A small link button at the end of a heading row keeps its larger tap area inside the row. */
.head-row > .btn.sm-link { margin-right: 0; margin-left: 0; }
/* VIP: customers on the All-Inclusive Plan. */
.vip-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .03em; vertical-align: middle;
  color: #5c4400; background: linear-gradient(135deg, #ffe08a, #f5c04a); border: 1px solid #e0a92a; white-space: nowrap; line-height: 1.5; }
.vip-badge.large { font-size: 14px; padding: 3px 10px; flex: none; }
.vip-note { color: #7a5a00; margin-top: 6px; }
@media (prefers-color-scheme: dark) { .vip-note { color: #f5c04a; } }
/* Crew ratings */
.crew-row { align-items: center; gap: 12px; }
.crew-scores { display: flex; gap: 14px; flex: none; text-align: right; }
.crew-scores .score { display: flex; flex-direction: column; font-weight: 700; color: #b07d00; white-space: nowrap; }
.crew-scores .score.qa { color: var(--green, #1f6e33); }
.crew-scores small { font-size: 11px; font-weight: 400; color: var(--muted); }
@media (max-width: 420px) { .crew-scores { gap: 8px; } .crew-row .avatar { display: none; } }
.crew-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 8px; }
.crew-stats > div { background: var(--field); border-radius: 12px; padding: 10px; text-align: center; }
.crew-stats b { display: block; font-size: 18px; white-space: nowrap; }
.crew-stats span { font-size: 12px; color: var(--muted); }
@media (max-width: 420px) { .crew-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.chip-btn.bad.on { background: #fdecea; color: #b3261e; border-color: #f2b8b5; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mini-tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #e6f4ea; color: #1f6e33; }
.mini-tag.bad { background: #fdecea; color: #b3261e; }
.crew-row .sub, .crew-page .sub { white-space: normal; overflow: visible; text-overflow: clip; }
.crew-page .row .grow { min-width: 0; }
.row-action { flex: none; width: auto; }
.nowrap { white-space: nowrap; }
.review-stars { color: #b07d00; letter-spacing: 1px; }
