/* RanchOS Capture — iOS "Liquid Glass" look.
   Frosted translucent surfaces over a soft ranch gradient, big rounded
   corners, big tap targets and big type. Selected states stay solid
   deep green so they read in full sun. */
:root {
  --green: #0b3d2e;
  --green-dark: #072a20;
  --gold: #d4af37;
  --ink: #16211c;
  --muted: #5c6b63;
  --red: #b3261e;
  --amber: #9a6a00;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-line: rgba(255, 255, 255, 0.65);
  --field-line: rgba(11, 61, 46, 0.16);
  --glass-shadow: 0 10px 30px rgba(7, 42, 32, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --blur: blur(20px) saturate(170%);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1100px 480px at 85% -80px, rgba(212, 175, 55, 0.20), rgba(212, 175, 55, 0) 60%),
    radial-gradient(900px 520px at -10% 30%, rgba(11, 61, 46, 0.14), rgba(11, 61, 46, 0) 55%),
    linear-gradient(168deg, #e8f0e9 0%, #eef3ec 45%, #e2ecdf 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  padding-bottom: 118px;
}
.hidden { display: none !important; }
.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* Top bar — frosted deep green glass */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(9, 51, 38, 0.72); color: #fff;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 6px 24px rgba(7, 42, 32, 0.25);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.topbar-title { font-size: 22px; font-weight: 700; letter-spacing: 0.3px; }
.sync-pill {
  border: 1px solid rgba(212, 175, 55, 0.9); background: rgba(255, 255, 255, 0.10); color: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: 17px; min-height: 40px;
}

/* Sticky Save on Capture (audit F1): once a photo exists, Save rides
   above the tab bar — no scrolling to the bottom of the form. */
.cap-save-bar {
  position: fixed; left: 10px; right: 10px; bottom: 112px; z-index: 40;
}

/* Pull-to-update banner (v24): follows the finger at the top of a screen */
html, body { overscroll-behavior-y: none; }
.ptr-banner {
  position: fixed; top: 0; left: 50%; z-index: 60;
  transform: translate(-50%, -70px);
  background: var(--green); color: #fff; font-size: 17px; font-weight: 700;
  padding: 12px 20px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 10px 26px rgba(7, 42, 32, 0.35); pointer-events: none;
}
.ptr-banner.armed { background: var(--gold); color: var(--ink); }
.cap-save-bar .save-btn { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); }

/* "Name: X — tap to change" line on Capture (audit F11). */
.name-line {
  display: block; background: none; border: none; padding: 2px 0 6px;
  color: var(--muted); font-size: 17px; font-weight: 600; cursor: pointer;
}
.refresh-hint { margin: 0 0 8px; color: var(--muted); font-size: 17px; }

/* "Who are you?" role picker on Capture (Wayo, 2026-12-01) — three
   big buttons until answered, then a quiet role line like the name. */
.role-q { font-size: 22px; font-weight: 700; }
.role-row { margin: 6px 0 2px; }
.role-row .seg-btn { min-height: 64px; font-size: 20px; }

/* Take-down button in the record sheet (audit F3) — quiet, below Close. */
.danger-btn { color: #b3261e; margin-top: 10px; }
.sync-pill.pending { background: var(--gold); color: var(--green-dark); font-weight: 700; }

/* Layout */
main { padding: 14px 14px 8px; max-width: 640px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }
.screen-title { font-size: 26px; margin: 4px 0 10px; }
.label { font-size: 19px; font-weight: 600; margin: 18px 0 8px; }
.label-inline { font-weight: 600; align-self: center; }
.opt { color: var(--muted); font-weight: 400; font-size: 17px; }
.msg { min-height: 22px; color: var(--green); font-weight: 600; }
.empty { color: var(--muted); }
.pad-top { margin-top: 20px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.banner {
  background: rgba(255, 247, 221, 0.66); border: 1px solid rgba(212, 175, 55, 0.65); border-radius: 16px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  padding: 10px 12px; margin-bottom: 12px; font-size: 17px;
}
.linkbtn { background: none; border: none; color: var(--green); font-weight: 700; font-size: 17px; text-decoration: underline; padding: 0; }

/* Segmented buttons — glass pills, solid green when picked */
.seg { display: flex; gap: 8px; margin: 8px 0; }
.seg-btn {
  flex: 1; min-height: 56px; border-radius: 16px; border: 1px solid var(--glass-line);
  background: var(--glass); color: var(--green); font-size: 18px; font-weight: 600; padding: 8px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
}
.seg-btn.selected {
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px rgba(7, 42, 32, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Photo */
.big-photo-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; color: #fff;
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark));
  font-size: 26px; font-weight: 700; border-radius: 22px; padding: 22px 12px; margin: 12px 0 8px;
  box-shadow: 0 12px 26px rgba(7, 42, 32, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-art { width: 44px; height: 44px; flex: none; }
.btn-art svg { filter: brightness(0) invert(1); }
.photo-row { display: flex; align-items: center; gap: 12px; }
.photo-preview { max-width: 45%; border-radius: 16px; border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); }
/* Guest licenses: the photo fills the slot so it reads at arm's length. */
.lic-slot { margin-bottom: 8px; }
.lic-photo { width: 100%; border-radius: 16px; border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); display: block; }
.small-btn {
  display: inline-block; background: var(--glass); border: 1px solid var(--glass-line); color: var(--green);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  border-radius: 14px; padding: 10px 14px; font-size: 18px; font-weight: 600; min-height: 52px;
}
.small-btn.wide { display: block; width: 100%; margin-top: 10px; text-align: center; }
.small-btn.big-tap { min-height: 56px; }

/* Category groups + chips — picture-first tiles: a big drawing on top,
   the word under it. The drawing is the label; the word backs it up. */
.art { display: block; flex: none; }
.art svg { display: block; width: 100%; height: 100%; }
.group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.group-btn {
  min-height: 128px; border-radius: 18px; border: 1px solid var(--glass-line);
  background: var(--glass-strong); color: var(--green);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  font-size: 20px; font-weight: 700; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.group-btn .art { width: 72px; height: 72px; }
.group-btn.selected {
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px rgba(7, 42, 32, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip {
  min-height: 112px; border-radius: 16px; border: 1px solid var(--glass-line);
  background: var(--glass); font-size: 18px; font-weight: 600; padding: 10px 8px; color: var(--ink);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center;
}
.chip .art { width: 58px; height: 58px; }
.chip.selected {
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px rgba(7, 42, 32, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
/* On a picked (solid green) tile the drawing flips to white so it
   still reads at a glance in full sun. */
.group-btn.selected .art svg, .chip.selected .art svg { filter: brightness(0) invert(1); }

/* Inputs */
.text-input {
  width: 100%; font-size: 18px; padding: 13px 12px; border: 1px solid var(--field-line);
  border-radius: 14px; background: var(--glass-strong); margin: 4px 0 6px; color: var(--ink);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.note-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.find-row { display: flex; gap: 8px; align-items: stretch; }
.find-row .grow { flex: 1; }
textarea.text-input { resize: vertical; }

/* Save */
.save-btn {
  display: block; width: 100%; min-height: 62px; margin-top: 16px;
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff; border: none; border-radius: 20px;
  font-size: 22px; font-weight: 700;
  box-shadow: 0 12px 26px rgba(7, 42, 32, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.save-btn:active { background: var(--green-dark); }

/* Lane feeding (v30): two big feed buttons, then four length buttons. */
.feed-btn-row, .feed-feet-row { display: flex; gap: 10px; margin-top: 12px; }
.feed-feet-row { flex-wrap: wrap; }
.feed-btn {
  flex: 1 1 40%; min-height: 64px; border: none; border-radius: 16px;
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff;
  font-size: 24px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(7, 42, 32, 0.3);
}
.feed-btn:active { background: var(--green-dark); }
.feed-btn.selected { box-shadow: 0 0 0 4px #d4af37, 0 8px 20px rgba(7, 42, 32, 0.3); }
.feed-btn.feet-btn { font-size: 20px; min-height: 58px; }

/* "I got one!" harvest (v40): the biggest button in the app — an
   animal is down, the hunter has one free hand and no patience for
   small targets. Species chips reuse .chip; the pickup cards reuse
   the list-card/done-btn shapes. */
.harvest-btn {
  display: block; width: 100%; min-height: 92px; border: none; border-radius: 20px;
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff;
  font-size: 34px; font-weight: 800; letter-spacing: 0.01em;
  box-shadow: 0 12px 26px rgba(7, 42, 32, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.harvest-btn:active { background: var(--green-dark); }
.harvest-art { font-size: 40px; }
/* Season mark under a species name (TPWD table in app.js) — plain
   words, display-only; red only for Out of season. */
.hv-season { display: block; font-size: 17px; font-weight: 700; opacity: 0.85; }
.hv-season.out { color: var(--red); opacity: 1; }
.chip.selected .hv-season.out { color: #ffb3ab; }

/* Fishing-guide bookings (v32): big date field, people row, on/off
   guide toggle, and an emoji thumb for the booking cards. */
.bk-date { font-size: 20px; font-weight: 600; min-height: 58px; }
.bk-people-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.bk-people-btn { flex: 1 1 12%; font-size: 22px; min-height: 60px; }
.bk-toggle {
  display: block; width: 100%; min-height: 60px; margin: 8px 0; border-radius: 16px;
  border: 1.5px solid var(--field-line); background: var(--glass); color: var(--ink);
  font-size: 19px; font-weight: 700; padding: 10px 12px;
}
.bk-toggle.selected {
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff; border-color: transparent;
  box-shadow: 0 0 0 4px #d4af37, 0 8px 20px rgba(7, 42, 32, 0.3);
}
.emoji-thumb {
  width: 96px; height: 96px; flex: none; border-radius: 12px;
  background: rgba(255, 255, 255, 0.65); border: 1px solid var(--field-line);
  display: flex; align-items: center; justify-content: center; font-size: 52px;
}

/* Guided outing activity picks (v33): text-only chips, a little
   shorter than the picture chips but still a big, easy tap. */
.ot-activity-btn { min-height: 84px; font-size: 20px; }

/* Guest meal confirmations (v34): one row per meal on the guest
   card — name left, big "I'm in" right; once in, seats + a kitchen
   note open under the name. The kitchen count board in Requests
   prints each meal's total big and plain, with who is in below. */
.meal-row { padding: 10px 0; border-top: 1px solid var(--field-line); }
.meal-row:not(.in) { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meal-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meal-name { font-size: 22px; font-weight: 800; }
.meal-out-btn { margin-top: 10px; }
.meal-block { padding: 8px 0; border-top: 1px solid var(--field-line); }
.meal-total { font-size: 24px; font-weight: 800; }
.meal-who { font-size: 18px; margin-top: 4px; line-height: 1.5; }

/* Suggestion box (recognition stub) */
.suggest {
  border: 1.5px dashed rgba(154, 106, 0, 0.55); background: rgba(255, 253, 244, 0.66); border-radius: 16px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  padding: 10px 12px; margin: 10px 0; font-size: 17px;
}
.suggest button { margin-left: 8px; }

/* Cards / lists — frosted glass panels */
.card {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  padding: 14px; margin: 10px 0;
}
.card-title { font-size: 20px; margin: 0 0 10px; }
.card-list { display: flex; flex-direction: column; gap: 8px; }
.list-card {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: 18px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow); color: var(--ink);
  padding: 12px; display: flex; gap: 12px; align-items: center; text-align: left; width: 100%;
}
.list-card img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex: none; }
.list-card img.covey-thumb { width: 120px; height: 88px; }
.art-thumb {
  width: 96px; height: 96px; flex: none; border-radius: 12px;
  background: rgba(255, 255, 255, 0.65); border: 1px solid var(--field-line);
  display: flex; align-items: center; justify-content: center;
}
.art-thumb .art { width: 76px; height: 76px; }
.list-card .lc-main { flex: 1; min-width: 0; }
.list-card .lc-title { font-weight: 700; font-size: 19px; }
.list-card .lc-sub { color: var(--muted); font-size: 17px; }
.list-card .lc-note { font-size: 18px; white-space: pre-wrap; overflow-wrap: break-word; }
.list-card .inline-thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; margin: 6px 6px 0 0; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.photo-tile { position: relative; display: inline-block; }
.photo-tile img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; display: block; }
.photo-tile .tile-video { display: inline-block; padding: 24px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.08); font-weight: 600; }
.photo-tile .tile-x { position: absolute; top: 2px; right: 2px; width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.board-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.board-photo-grid a { display: block; border-radius: 12px; overflow: hidden; }
.board-photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.board-photo-grid .gp-cap { font-size: 17px; color: var(--muted); padding: 4px 2px 0; }
.badge {
  flex: none; font-size: 17px; font-weight: 700; border-radius: 999px; padding: 5px 10px;
  border: 1.5px solid var(--field-line); color: var(--muted); background: rgba(255, 255, 255, 0.35);
}
.badge.ok { border-color: var(--green); color: var(--green); }
.badge.work { border-color: var(--amber); color: var(--amber); }
.badge.urgent { border-color: var(--red); color: var(--red); }
.badge.wait { border-color: var(--gold); color: var(--amber); }
.badge.open { border-color: var(--red); color: var(--red); background: rgba(253, 236, 235, 0.8); }

/* Requests */
.req-banner {
  display: block; width: 100%; text-align: left; margin-bottom: 12px;
  background: rgba(253, 236, 235, 0.78); border: 1.5px solid var(--red); color: var(--red);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: 16px; padding: 12px 14px; font-size: 18px; font-weight: 700;
}
.list-card.done { opacity: 0.6; }
.lc-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: none; }
.done-btn {
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff; border: none; border-radius: 14px;
  padding: 12px 18px; font-size: 18px; font-weight: 700; min-height: 56px;
  box-shadow: 0 8px 20px rgba(7, 42, 32, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.done-btn:active { background: var(--green-dark); }

/* Cow page */
.cow-head { display: flex; gap: 14px; }
.cow-photo { width: 150px; height: 150px; object-fit: cover; border-radius: 14px; flex: none; }
.cow-lines { font-size: 18px; display: flex; flex-direction: column; gap: 4px; }
.cow-tag { font-size: 30px; font-weight: 800; }
.due-line { font-weight: 700; color: var(--green); }
.event-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.event-btn {
  min-height: 104px; border-radius: 18px; border: 1.5px solid rgba(11, 61, 46, 0.45);
  background: var(--glass); color: var(--green); font-size: 20px; font-weight: 700; padding: 10px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.evt-art { width: 48px; height: 48px; }
.event-btn:active { background: var(--green); color: #fff; }
.event-btn:active .evt-art svg { filter: brightness(0) invert(1); }
.stage-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.stage-btn {
  flex: 1; min-height: 56px; min-width: 64px; border-radius: 14px;
  border: 1.5px solid rgba(154, 106, 0, 0.5); background: rgba(255, 253, 244, 0.66); font-size: 20px; font-weight: 700; color: var(--ink);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

/* Herd table */
table.simple { width: 100%; border-collapse: collapse; font-size: 18px; }
table.simple td, table.simple th { padding: 6px 4px; border-bottom: 1px solid var(--field-line); text-align: left; }
table.simple tr:last-child td { border-bottom: none; }
.big-num { font-size: 26px; font-weight: 800; }

/* Tab bar — floating glass pill */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; max-width: 616px; margin: 0 auto;
  background: var(--glass-strong); border: 1px solid var(--glass-line); border-radius: 30px;
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 16px 38px rgba(7, 42, 32, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  padding: 6px;
}
.tab-btn {
  flex: 1; background: none; border: none; border-radius: 24px; padding: 7px 0 5px;
  color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-height: 68px; position: relative;
}
.tab-art { width: 34px; height: 34px; }
.tab-btn span { font-size: 17px; font-weight: 700; text-align: center; line-height: 1.12; }
.tab-btn.active { color: var(--green); background: rgba(11, 61, 46, 0.10); }
.tab-btn .tab-badge {
  position: absolute; top: 2px; right: 16%;
  background: var(--red); color: #fff; font-size: 15px; font-weight: 800;
  border-radius: 999px; min-width: 21px; height: 21px; line-height: 21px;
  padding: 0 5px; text-align: center;
}

/* Sheets — glass panel over a blurred dim */
.sheet {
  position: fixed; inset: 0; z-index: 40; background: rgba(10, 22, 17, 0.38);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-card {
  background: var(--glass-strong); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--glass-line); border-bottom: none;
  border-radius: 26px 26px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 38px rgba(7, 42, 32, 0.3);
}
.sheet-photo { width: 100%; border-radius: 16px; margin-bottom: 10px; }
.sheet-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sheet-thumbs img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; }
.choice-row { display: flex; gap: 8px; margin: 6px 0; }
.choice-btn {
  flex: 1; min-height: 56px; border-radius: 14px; border: 1px solid var(--glass-line);
  background: var(--glass); color: var(--green); font-size: 18px; font-weight: 700;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
}
.choice-btn.selected {
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff; border-color: transparent;
}

/* Dark mode — the glass goes dark with the phone */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef3ef;
    --muted: #a9bab0;
    --glass: rgba(22, 34, 28, 0.55);
    --glass-strong: rgba(22, 34, 28, 0.74);
    --glass-line: rgba(255, 255, 255, 0.20);
    --field-line: rgba(255, 255, 255, 0.22);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    --green: #7fc7a8;
  }
  body {
    background:
      radial-gradient(1100px 480px at 85% -80px, rgba(212, 175, 55, 0.10), rgba(212, 175, 55, 0) 60%),
      radial-gradient(900px 520px at -10% 30%, rgba(127, 199, 168, 0.10), rgba(127, 199, 168, 0) 55%),
      linear-gradient(168deg, #0d1512 0%, #101b16 45%, #0c1712 100%);
  }
  .msg { color: #7fc7a8; }
  .chip { color: var(--ink); }
  .badge { background: rgba(0, 0, 0, 0.25); }
  .seg-btn, .group-btn, .small-btn, .choice-btn, .event-btn { color: #cfe8da; }
  .seg-btn.selected, .group-btn.selected, .chip.selected, .choice-btn.selected { color: #fff; }
  .linkbtn { color: #7fc7a8; }
  .due-line { color: #7fc7a8; }
  .tab-btn.active { color: #cfe8da; background: rgba(255, 255, 255, 0.10); }
  .banner { background: rgba(80, 64, 10, 0.5); color: #f3e5bb; }
  .suggest, .stage-btn { background: rgba(60, 50, 16, 0.5); color: #f3e5bb; }
  .req-banner { background: rgba(90, 22, 18, 0.55); color: #ffb4ac; }
  .badge.open { background: rgba(90, 22, 18, 0.55); color: #ffb4ac; }
}

/* Compass — Back to camp */
.compass-btn {
  width: 100%; padding: 18px; border: none; border-radius: 16px;
  background: var(--green); color: #fff; font-size: 22px; font-weight: 700;
  cursor: pointer;
}
.compass-btn:active { background: var(--green-dark); }
.compass-ring {
  width: 180px; height: 180px; margin: 14px auto; border-radius: 50%;
  border: 3px solid var(--field-line); background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  overflow: hidden;
}
.compass-dial {
  width: 100%; height: 100%; display: flex; justify-content: center;
  transition: transform 0.15s linear;
}
.compass-needle {
  width: 0; height: 0; margin-top: 14px;
  border-left: 26px solid transparent; border-right: 26px solid transparent;
  border-bottom: 84px solid var(--green);
}
.compass-dist { text-align: center; font-size: 30px; font-weight: 700; color: var(--ink); }
.compass-sub { text-align: center; color: var(--muted); font-size: 18px; margin-top: 4px; }

/* ---- map (Leaflet, satellite) ---- */
#mapEl { height: 62vh; min-height: 320px; border-radius: 14px; overflow: hidden; isolation: isolate; z-index: 0; margin-top: 10px; background: #22301f; }
.pin-emoji { display: block; font-size: 32px; line-height: 44px; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pin-dot { display: block; width: 24px; height: 24px; margin: 2px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.pin-dot-white { display: block; width: 24px; height: 24px; margin: 2px; border-radius: 50%; background: #fff; border: 3px solid #333; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.leaflet-popup-content { font-family: inherit; font-size: 17px; line-height: 1.45; }

/* Floating map key (v27) — plain solid card, per the house rule that
   information never sits on transparency. */
.map-legend {
  background: rgba(255, 255, 255, 0.97); color: var(--ink);
  border: 1px solid var(--glass-line); border-radius: 14px;
  padding: 10px 12px; font-size: 17px; font-weight: 600; line-height: 1.25;
  box-shadow: 0 8px 22px rgba(7, 42, 32, 0.3); max-width: 240px;
}
.map-legend .lg-title { font-size: 17px; font-weight: 800; color: var(--green); margin-bottom: 4px; }
.map-legend .lg-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.map-legend .lg-emoji { font-size: 19px; width: 26px; text-align: center; }
.map-legend .lg-quail { width: 34px; height: 23px; object-fit: cover; border-radius: 5px; }
.map-legend .lg-photo {
  width: 26px; height: 26px; border-radius: 6px; background: #dfe9df;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
}
.map-legend .lg-dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); display: inline-block; flex: none; }
.map-legend .lg-white { background: #fff; border-color: #fff; box-shadow: 0 0 0 2px #333; margin: 0 5px; }
.map-legend .lg-sub { font-size: 17px; font-weight: 600; color: var(--muted); margin: 1px 0 4px; }
.map-btn-row { display: flex; gap: 8px; margin-top: 10px; }
.map-btn-row .small-btn { flex: 1; }

/* Big quail picture on the covey card — Wayo 2026-11-30: quail means
   the big quail picture, never a small one. */
.quail-big { display: block; width: 100%; height: auto; border-radius: 14px; margin-bottom: 10px; }
.chip .quail-chip-img { width: 96px; height: 70px; object-fit: cover; border-radius: 10px; flex: none; }
.chip .feed-chip-art { font-size: 36px; line-height: 1.1; flex: none; }
.quail-pin { border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
/* Covey divIcon wrap: quail picture + the marker's badge (Mitch's
   coveys carry Mitch's mark, like every photo pin). */
.quail-pin-wrap { background: transparent; border: none; }
.quail-pin-wrap .quail-pin-img { display: block; width: 84px; height: 56px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.45); }
/* Map layer chips (O-2) wrap above the map. */
.map-layer-row { flex-wrap: wrap; }
/* Per-person picture/initials next to their name in lists (Wayo,
   2026-12-01): one stored picture per person, shown everywhere
   their name appears; initials until they add theirs. */
.avatar-pic, .avatar-initials {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  vertical-align: middle; margin-right: 7px;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.avatar-pic { object-fit: cover; background: #fff; }
.avatar-initials { background: #14532d; color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.avatar-preview { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.4); }
.photo-pin { border-radius: 12px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); object-fit: cover; background: #fff; }
/* Photo pin wrapper (divIcon): the photo plus the uploader badge.
   The wrapper itself stays invisible — no Leaflet div-icon box. */
.photo-pin-wrap { background: transparent; border: none; }
.photo-pin-wrap .photo-pin { display: block; width: 56px; height: 56px; }
/* Who-uploaded badge on a photo pin (Wayo, 2026-12-01): a solid
   dark-green circle in the pin's corner, bold white letter(s) —
   sized to read at a glance, never tiny. */
.pin-badge {
  position: absolute; right: -7px; bottom: -7px;
  min-width: 28px; height: 28px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; background: #14532d; color: #fff;
  border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.55);
  font-size: 14px; font-weight: 800; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: center;
}
/* Picture variant of the badge: the uploader's own avatar/Memoji
   fills the circle when the app holds one for them. */
.pin-badge-pic { padding: 0; overflow: hidden; background: #fff; }
.pin-badge-pic img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
/* Legend's sample of the same badge. */
.map-legend .lg-badge {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: #14532d; color: #fff; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
  font-size: 14px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.map-popup-photo { width: 180px; max-width: 100%; border-radius: 10px; display: block; margin-top: 6px; }

/* Onboarding flow (2026-12-01): a full-screen gate over the whole app
   until the phone agrees to the current terms version. Pages 1–2 keep
   the app's older-eyes floor (nothing under ~18pt, big tap targets);
   Page 3 is Apple's terms screen: clean white, big title, plain
   system text in a scrolling area, quiet Disagree + big filled Agree.
   The overlay is always light — Apple's terms look — even in dark
   mode, and it sits above everything (tab bar, sheets, pull banner). */
.onboarding {
  position: fixed; inset: 0; z-index: 80; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff; color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body.ob-gated .tabbar { display: none; }
.ob-page {
  max-width: 560px; margin: 0 auto; min-height: 100%;
  padding: calc(24px + env(safe-area-inset-top)) 22px calc(32px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.ob-brand { font-size: 22px; font-weight: 800; color: var(--green); margin: 0 0 4px; letter-spacing: 0.3px; }
.ob-title { font-size: 32px; font-weight: 700; margin: 0 0 10px; color: #1d1d1f; }
.ob-note { font-size: 19px; color: #5c6b63; margin: 6px 0 14px; }
.ob-msg { min-height: 24px; font-size: 19px; font-weight: 600; color: var(--red); margin: 8px 0 0; }
.ob-role-list { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 6px; }
.ob-role-btn {
  min-height: 72px; border-radius: 18px; border: 1px solid var(--field-line);
  background: #f2f6f2; color: var(--green); font-size: 24px; font-weight: 700;
  padding: 12px; cursor: pointer;
}
.ob-role-btn:active { background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff; }
.ob-label { font-size: 20px; font-weight: 600; margin: 16px 0 4px; color: #1d1d1f; }
.ob-input {
  width: 100%; font-size: 21px; padding: 15px 14px; margin: 4px 0 6px;
  border: 1px solid #c9d4cc; border-radius: 14px; background: #fff; color: #1d1d1f;
}
.ob-primary-btn {
  display: block; width: 100%; min-height: 64px; margin-top: 20px;
  background: linear-gradient(165deg, #0f4f3a, var(--green-dark)); color: #fff;
  border: none; border-radius: 20px; font-size: 23px; font-weight: 700; cursor: pointer;
  box-shadow: 0 12px 26px rgba(7, 42, 32, 0.3);
}
.ob-quiet-btn {
  display: block; width: 100%; min-height: 56px; margin-top: 8px;
  background: none; border: none; color: var(--green);
  font-size: 19px; font-weight: 600; cursor: pointer;
}
/* Page 3 — Apple's terms screen. */
.ob-terms-page { background: #fff; }
.ob-terms-title { font-size: 30px; font-weight: 700; color: #000; margin: 6px 0 14px; }
.ob-terms {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  border-top: 1px solid #d2d2d7; border-bottom: 1px solid #d2d2d7;
  padding: 16px 2px; font-size: 19px; line-height: 1.5; color: #1d1d1f;
  white-space: pre-wrap; min-height: 220px;
}
.ob-terms-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 16px;
}
.ob-disagree-btn {
  background: none; border: none; color: #0066cc; font-size: 19px;
  padding: 14px 10px; cursor: pointer;
}
.ob-agree-btn {
  background: #0071e3; color: #fff; border: none; border-radius: 980px;
  font-size: 20px; font-weight: 600; padding: 15px 42px; min-height: 58px; cursor: pointer;
}
.ob-agree-btn:active { background: #0060c9; }
.ob-agree-btn:disabled { opacity: .45; }

/* Ten-angle audit fixes (2026-12-01) */
/* Terms laid out to be read (T2): headings + paragraphs, same words. */
.ob-terms { white-space: normal; }
.ob-terms-h { font-size: 23px; font-weight: 800; margin: 22px 0 8px; }
.ob-terms-h4 { font-size: 20px; font-weight: 700; margin: 16px 0 6px; }
.ob-terms-p { margin: 0 0 12px; }
/* Meal rows: the top line carries name + action; the menu sits under it (§13). */
.meal-row:not(.in) { display: block; }
.meal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.menu-line { font-size: 20px; line-height: 1.4; margin: 8px 0; }
.menu-none { color: #6b7a70; }
.allergy-line { font-weight: 800; color: #7a1f0d; }
.allergy-known { font-size: 20px; }
/* Kitchen display (H4): across-the-room type on plain light cards. */
.kitchen-view .kd-block {
  background: #ffffff; border: 2px solid #0b3d2e; border-radius: 14px;
  padding: 18px; margin: 14px 0;
}
.kd-meal { font-size: 30px; font-weight: 800; }
.kd-menu { font-size: 30px; line-height: 1.35; margin: 8px 0; }
.kd-none { color: #6b7a70; }
.kd-count { font-size: 36px; font-weight: 800; margin-top: 6px; }
.kd-who { font-size: 26px; line-height: 1.4; margin-top: 10px; }
.kd-allergy { font-weight: 800; color: #7a1f0d; }
