/* ============================================================
   Public Sans — self-hosted (SIL OFL). No third-party font CDN:
   the app makes zero requests to Google, and the faces are
   precached by the SW so an offline install renders correctly.
   ============================================================ */

@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/PublicSans-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/PublicSans-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/PublicSans-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/PublicSans-ExtraBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/PublicSans-Black.ttf') format('truetype');
}

/* ============================================================
   MunchMark Tyler — design system
   Source of truth: design/MunchMark Tyler.dc.html
   Palette: deep green / warm neutrals / muted rose
   ============================================================ */

:root {
  --brand: #1E5C43;
  --ink: #22271F;
  --body: #3E443B;
  --body-2: #4A4F45;
  --sec: #6C7166;
  --muted: #9AA093;
  --muted-2: #8A8D83;

  --bg: #FBFAF7;
  --canvas: #ECE9E1;
  --card: #FFFFFF;
  --line: #E8E5DB;
  --line-soft: #F1EFE8;
  --chip: #F3F1EA;
  --skeleton: #EDEAE1;
  --dot: #D8D4C8;

  --green-tint: #E7F0EA;
  --green-deep: #1B5E36;
  --ok-bg: #E7F2E9;
  --ok-bd: #C4DECD;

  --warn-bg: #FBF1E2;
  --warn-bg-2: #FBF3E0;
  --warn-bd: #EBD6AE;
  --warn-fg: #8A5A0B;

  --stop-bg: #FAE9E7;
  --stop-bd: #F0CBC7;
  --stop-fg: #9C2B23;
  --repeat-bd: #E7A9A3;

  --rose-bg: #F6E9EC;
  --rose-fg: #9C4257;

  --grade-a: #1B8A4E;
  --grade-b: #B07C0C;
  --grade-c: #C75B12;
  --grade-d: #C0362C;
  --grade-f: #A32620;

  --radius-screen: 28px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;
  --font: 'Public Sans', -apple-system, system-ui, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}

button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:active { opacity: 0.82; }

a { color: var(--brand); text-decoration: none; }

input {
  font-family: inherit;
  font-size: 16px; /* prevents iOS zoom-on-focus */
}

/* ---------- App frame ---------- */

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
}
@media (min-width: 431px) {
  #app { box-shadow: 0 14px 36px rgba(32,36,31,0.14); }
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: var(--sat);
  padding-bottom: var(--sab); /* keep content clear of the home indicator */
  animation: screenIn 0.22s ease;
}
.screen.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--sab) + 8px); }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}

/* ---------- Tab bar ---------- */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  max-width: 430px;
  display: flex;
  border-top: 1px solid var(--line);
  background: #FFFFFF;
  padding: 10px 8px calc(10px + var(--sab));
  z-index: 40;
}
.tabbar[hidden] { display: none; }
.tabbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}
.tabbar button.active { color: var(--brand); font-weight: 800; }
.tabbar svg { display: block; }

/* ---------- Shared bits ---------- */

.app-header {
  padding: 22px 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-header .titles { display: flex; flex-direction: column; }
.app-header .name { font-size: 17px; font-weight: 900; letter-spacing: -0.01em; }
.app-header .sub { font-size: 12px; color: var(--sec); font-weight: 600; }

.page-title {
  padding: 22px 20px 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.section-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sec);
}

.grade-tile {
  border-radius: 12px;
  color: #FFFFFF;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Place card (home / results / saved lists) */
.place-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.place-card:active { background: #FCFBF8; }
.place-card .top { display: flex; gap: 12px; align-items: flex-start; }
.place-card .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.place-card .name { font-size: 17px; font-weight: 800; color: var(--ink); }
.place-card .meta { font-size: 13px; color: var(--sec); }
.place-card .grade-col { display: flex; flex-direction: column; align-items: center; gap: 1px; flex-shrink: 0; }
.place-card .grade-col.stale { opacity: 0.75; }
.place-card .grade-tile { width: 44px; height: 44px; font-size: 24px; }
.place-card .grade-word { font-size: 11px; font-weight: 800; margin-top: 3px; }
.place-card .grade-dem { font-size: 11px; color: var(--sec); }
.place-card .verdict { font-size: 13.5px; color: var(--body); line-height: 1.4; }
.place-card .note-stale {
  background: var(--warn-bg-2); color: var(--warn-fg);
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
}
.place-card .note-improved {
  background: var(--ok-bg); color: var(--green-deep);
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
}
.place-card .bottom {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); font-weight: 600;
}
.place-card .watching { font-size: 12px; font-weight: 800; color: var(--brand); }

/* Data footer */
.data-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 14px 20px 12px;
  font-size: 11px; color: var(--muted);
}
.demo-ribbon {
  background: var(--rose-bg); color: var(--rose-fg);
  font-weight: 800; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.05em;
}

/* Primary / secondary buttons */
.btn-primary {
  height: 52px; border: none; border-radius: 14px;
  background: var(--brand); color: #FFFFFF;
  font-size: 16px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
}
.btn-outline-brand {
  border: 1.5px solid var(--brand); border-radius: 14px;
  background: #FFFFFF; color: var(--brand);
  font-size: 14.5px; font-weight: 800; cursor: pointer;
}
.btn-outline {
  border: 1.5px solid var(--line); border-radius: 14px;
  background: #FFFFFF; color: var(--body-2);
  font-size: 14.5px; font-weight: 800; cursor: pointer;
}

/* Pills / chips */
.pill {
  border: none;
  background: var(--chip); color: var(--body-2);
  font-size: 13px; font-weight: 700; padding: 9px 14px;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.pill.green { background: var(--green-tint); color: var(--green-deep); }
.pill.rose { background: var(--rose-bg); color: var(--rose-fg); }
.pill.solid { background: var(--brand); color: #FFFFFF; }
.pill.outline { background: #FFFFFF; border: 1px solid var(--line); }

/* ---------- Splash ---------- */

.splash {
  min-height: 100dvh;
  background: var(--brand);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.splash .blob-1 {
  position: absolute; top: -70px; right: -70px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(180,88,107,0.30); filter: blur(50px);
}
.splash .blob-2 {
  position: absolute; bottom: -90px; left: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,0.10); filter: blur(50px);
}
.splash .title {
  margin-top: 24px; font-size: 32px; font-weight: 900;
  color: #FFFFFF; letter-spacing: -0.02em;
}
.splash .tagline {
  margin-top: 10px; font-size: 16px; color: rgba(255,255,255,0.85);
  text-align: center; max-width: 280px; line-height: 1.45;
}
.splash .foot {
  position: absolute; bottom: calc(36px + var(--sab));
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.splash .foot .region { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.8); }
.splash .foot .cities { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.65); }
.splash .foot .source { font-size: 11px; color: rgba(255,255,255,0.55); }
.splash .foot .demo {
  background: rgba(255,255,255,0.16); color: #FFFFFF; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; font-size: 10px; letter-spacing: 0.06em;
}

/* ---------- Onboarding ---------- */

.onboarding {
  min-height: 100dvh;
  padding: calc(20px + var(--sat)) 24px calc(28px + var(--sab));
  display: flex; flex-direction: column;
}
.onboarding .skip-row { display: flex; justify-content: flex-end; }
.onboarding .skip {
  border: none; background: none; font-size: 14px; font-weight: 700;
  color: var(--sec); padding: 8px 4px; cursor: pointer;
}
.onboarding .art {
  min-height: 236px; background: var(--chip); border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; margin-top: 8px; padding: 20px; text-align: left;
}
.onboarding h1 {
  margin: 28px 0 0; font-size: 23px; font-weight: 900;
  line-height: 1.25; letter-spacing: -0.01em;
}
.onboarding p { margin: 10px 0 0; font-size: 16px; color: var(--body-2); line-height: 1.5; }
.onboarding .spacer { flex: 1; }
.onboarding .dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.onboarding .dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--dot); transition: width .2s ease, background .2s ease; }
.onboarding .dots span.on { width: 20px; background: var(--brand); }

.ob-grade-card {
  background: #FFFFFF; border-radius: 16px;
  box-shadow: 0 8px 20px rgba(32,36,31,0.10);
  padding: 20px 26px; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.ob-grade-card .tile {
  width: 88px; height: 88px; border-radius: 20px; background: var(--grade-a);
  color: #FFFFFF; font-size: 52px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.ob-grade-card .word { font-size: 14px; font-weight: 800; color: var(--grade-a); }
.ob-grade-card .dem { font-size: 12px; color: var(--sec); }

.ob-scale { width: 100%; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.ob-scale .bar { display: flex; gap: 5px; width: 100%; }
.ob-scale .bar i { height: 14px; display: block; }
.ob-scale .ends {
  display: flex; justify-content: space-between; width: 100%;
  font-size: 12px; font-weight: 800; color: var(--sec);
}
.ob-scale .callout {
  background: #FFFFFF; border-radius: 12px; padding: 10px 16px;
  font-size: 13px; font-weight: 700; color: var(--ink);
  box-shadow: 0 4px 12px rgba(32,36,31,0.08);
}

.ob-vio-card {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 8px 20px rgba(32,36,31,0.08); max-width: 300px;
}

/* ---------- Home ---------- */

.searchbar {
  display: flex; align-items: center; gap: 10px;
  height: 54px; background: #FFFFFF;
  border: 1.5px solid var(--line); border-radius: 16px;
  padding: 0 16px; width: 100%; cursor: text; text-align: left;
}
.searchbar .ph { font-size: 16px; color: var(--muted); }

.stat-grid {
  padding: 18px 20px 0;
  display: flex; gap: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.stat-grid::-webkit-scrollbar { display: none; }
.stat-card {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 10px; display: flex; flex-direction: column; gap: 3px;
  flex: 0 0 auto; min-width: 118px; max-width: 150px; scroll-snap-align: start;
  text-align: left; cursor: pointer; font-family: inherit;
}
.stat-card:active { background: #FCFBF8; }
.feed-cap { font-size: 12px; font-weight: 600; color: #9AA093; }
.stat-card .num { font-size: 21px; font-weight: 900; color: var(--brand); }
.stat-card .lbl { font-size: 11px; color: var(--sec); line-height: 1.35; font-weight: 600; }

.quick-chips { padding: 14px 20px 0; display: flex; gap: 8px; flex-wrap: wrap; }

.list-head {
  padding: 22px 20px 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.list-head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: #FFFFFF; border: 1.5px solid var(--line); color: var(--brand);
  font-size: 12.5px; font-weight: 800; padding: 6px 12px; border-radius: 999px;
  cursor: pointer;
}
.list-head .t { font-size: 16px; font-weight: 900; }
.list-head .see-all { white-space: nowrap; }
.list-head .see-all {
  border: none; background: none; font-size: 13px; font-weight: 700;
  color: var(--brand); cursor: pointer; padding: 0;
}
.card-list { padding: 0 20px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Search ---------- */

.search-screen { background: var(--bg); }
.search-head { padding: 22px 20px 0; }
.search-field {
  display: flex; align-items: center; gap: 10px; height: 54px;
  background: #FFFFFF; border: 2px solid var(--brand); border-radius: 16px;
  padding: 0 16px; box-shadow: 0 4px 14px rgba(30,92,67,0.12);
}
.search-field input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-size: 16px; color: var(--ink); font-weight: 600; padding: 0;
}
.search-field input::placeholder { color: var(--muted); font-weight: 400; }
.search-field input::-webkit-search-cancel-button,
.search-field input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-field .cancel {
  border: none; background: none; font-size: 13px; font-weight: 700;
  color: var(--sec); cursor: pointer; padding: 4px 0 4px 8px; flex-shrink: 0;
}
.suggest-panel {
  margin-top: 8px; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 10px 26px rgba(32,36,31,0.10); overflow: hidden;
}
.suggest-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border: none; background: none; width: 100%; text-align: left; cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
}
.suggest-row:last-child { border-bottom: none; }
.suggest-row:active { background: #FCFBF8; }
.suggest-row .mini-tile {
  width: 34px; height: 34px; border-radius: 10px; font-size: 18px;
}
.suggest-row .area-ico {
  width: 34px; height: 34px; border-radius: 10px; background: var(--chip);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.suggest-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.suggest-row .l1 { font-size: 15px; font-weight: 800; color: var(--ink); }
.suggest-row .l1 mark { background: var(--green-tint); color: inherit; border-radius: 3px; }
/* one line, ellipsis — the street can be long and the row must not wrap */
.suggest-row .l2 {
  font-size: 12px; color: var(--sec);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-hint { padding: 20px 6px 0; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ---------- Results ---------- */

.results-head { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.query-bar {
  display: flex; align-items: center; gap: 10px; height: 48px;
  background: #FFFFFF; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 0 14px; width: 100%; cursor: pointer; text-align: left;
}
.query-bar .q { font-size: 15px; color: var(--ink); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.query-bar .edit { font-size: 13px; font-weight: 700; color: var(--brand); flex-shrink: 0; }

.filter-strip {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px;
}
.filter-strip::-webkit-scrollbar { display: none; }
.filter-strip .pill { flex-shrink: 0; padding: 8px 13px; }

.results-meta { display: flex; justify-content: space-between; align-items: center; }
.results-meta .count { font-size: 13px; color: var(--sec); font-weight: 700; }
.results-meta .count .sort-btn {
  border: none; background: none; padding: 0; font: inherit;
  color: var(--brand); font-weight: 700; cursor: pointer;
}
.seg {
  display: flex; background: var(--chip); border-radius: 10px; padding: 3px;
}
.seg button {
  border: none; background: none; font-size: 12px; font-weight: 700;
  color: var(--sec); padding: 5px 11px; border-radius: 8px; cursor: pointer;
}
.seg button.on {
  background: #FFFFFF; font-weight: 800; color: var(--ink);
  box-shadow: 0 1px 4px rgba(32,36,31,0.10);
}

.results-grid {
  padding: 14px 20px 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.grid-card {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; display: flex; flex-direction: column; gap: 7px;
  cursor: pointer; text-align: left;
}
.grid-card:active { background: #FCFBF8; }
.grid-card .top { display: flex; align-items: center; gap: 8px; }
.grid-card .grade-tile { width: 40px; height: 40px; border-radius: 11px; font-size: 22px; }
.grid-card .gw { display: flex; flex-direction: column; min-width: 0; }
.grid-card .word { font-size: 12px; font-weight: 800; }
.grid-card .dem { font-size: 11px; color: var(--sec); }
.grid-card .name { font-size: 14.5px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.grid-card .meta { font-size: 12px; color: var(--sec); line-height: 1.35; }
.grid-card .when { font-size: 11px; color: var(--muted); font-weight: 600; }

/* Skeleton */
@keyframes cpPulse { 0%,100% { opacity: .45; } 50% { opacity: .9; } }
.sk { background: var(--skeleton); animation: cpPulse 1.6s ease-in-out infinite; }
.skeleton-wrap { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sk-search { height: 48px; border-radius: 14px; }
.sk-chips { display: flex; gap: 8px; }
.sk-chips .sk { height: 34px; border-radius: 999px; }
.sk-card {
  background: #FFFFFF; border: 1px solid var(--skeleton); border-radius: 16px;
  padding: 16px; display: flex; gap: 14px;
}
.sk-card .lines { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.sk-card .lines .sk { height: 12px; border-radius: 6px; }
.sk-card .lines .sk:first-child { height: 16px; }
.sk-card .tile { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.sk-note { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 6px; }

/* Empty / error states */
.state-block {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 60px 44px; text-align: center;
}
.state-block .halo {
  width: 76px; height: 76px; border-radius: 50%; background: var(--chip);
  display: flex; align-items: center; justify-content: center;
}
.state-block .halo.rose { background: var(--rose-bg); }
.state-block .halo .bang { font-size: 30px; font-weight: 900; color: var(--rose-fg); }
.state-block h2 { margin: 0; font-size: 19px; font-weight: 900; }
.state-block p { margin: 0; font-size: 14.5px; color: var(--sec); line-height: 1.5; }
.state-block .fine { font-size: 12px; color: var(--muted); font-weight: 600; }
.state-block .btn-primary { width: auto; height: 48px; padding: 0 26px; border-radius: 13px; font-size: 14.5px; }
.state-block .btn-outline-brand { height: 48px; padding: 0 22px; border-radius: 13px; }

/* ---------- Filter sheet ---------- */

.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(32,36,31,0.45);
  z-index: 50; animation: fadeIn 0.2s ease;
  touch-action: none; /* swallow scroll gestures over the dimmed page */
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  margin: 0 auto; max-width: 430px;
  background: var(--bg); border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 32px rgba(32,36,31,0.22);
  padding: 14px 20px calc(24px + var(--sab));
  display: flex; flex-direction: column; gap: 20px;
  z-index: 51; max-height: 88dvh; overflow-y: auto;
  overscroll-behavior: contain; /* keep iOS from scrolling the page behind */
  outline: none;
  animation: sheetUp 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet .grabber { width: 44px; height: 5px; border-radius: 999px; background: var(--dot); align-self: center; flex-shrink: 0; }
.sheet .head { display: flex; justify-content: space-between; align-items: center; }
.sheet .head h2 { margin: 0; font-size: 20px; font-weight: 900; }
.sheet .head .reset {
  border: none; background: none; font-size: 14px; font-weight: 800;
  color: var(--brand); cursor: pointer; padding: 4px 0;
}
.sheet .group { display: flex; flex-direction: column; gap: 9px; }
.sheet .group-label {
  font-size: 13px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--sec);
}
.sheet .group-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.sheet .group-label-row .val { font-size: 15px; font-weight: 900; color: var(--brand); }

.seg-lg { display: flex; background: var(--chip); border-radius: 12px; padding: 4px; gap: 4px; }
.seg-lg button {
  flex: 1; text-align: center; border: none; background: none;
  color: var(--body-2); font-size: 14px; font-weight: 700;
  padding: 10px 0; border-radius: 9px; cursor: pointer;
}
.seg-lg button.on { background: var(--brand); color: #FFFFFF; font-weight: 800; }

.dem-slider { position: relative; height: 24px; display: flex; align-items: center; }
.dem-slider input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 24px; background: none; margin: 0;
}
.dem-slider input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: transparent; }
.dem-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF;
  border: 2.5px solid var(--brand);
  box-shadow: 0 2px 8px rgba(32,36,31,0.20);
  margin-top: -9px; cursor: pointer;
}
.dem-slider input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF;
  border: 2.5px solid var(--brand); box-shadow: 0 2px 8px rgba(32,36,31,0.20);
  cursor: pointer;
}
.dem-slider .track, .dem-slider .fill {
  position: absolute; left: 0; height: 6px; border-radius: 999px; pointer-events: none;
}
.dem-slider .track { right: 0; background: var(--line); }
.dem-slider .fill { background: var(--brand); }
.slider-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 700; }

.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toggle-row .txt { display: flex; flex-direction: column; gap: 2px; }
.toggle-row .t1 { font-size: 15px; font-weight: 800; }
.toggle-row .t2 { font-size: 12.5px; color: var(--sec); }
.switch {
  width: 52px; height: 32px; border-radius: 999px; background: var(--dot);
  position: relative; flex-shrink: 0; border: none; cursor: pointer;
  transition: background 0.18s ease; padding: 0;
}
.switch.on { background: var(--brand); }
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px;
  border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(32,36,31,0.25);
  transition: transform 0.18s ease;
}
.switch.on .knob { transform: translateX(20px); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-opt {
  background: #FFFFFF; border: 1.5px solid var(--line); color: var(--body-2);
  font-size: 13px; font-weight: 700; padding: 9px 14px; border-radius: 999px; cursor: pointer;
}
.chip-opt.on {
  background: var(--brand); border-color: var(--brand);
  color: #FFFFFF; font-weight: 800;
}

.toggle-group { display: flex; flex-direction: column; gap: 10px; }
.toggle-div { height: 1px; background: var(--line-soft); }

/* ---------- Detail ---------- */

.back-row {
  display: flex; align-items: center; gap: 8px; padding: 16px 20px 0;
  border: none; background: none; cursor: pointer; text-align: left;
}
.back-row .chev { font-size: 20px; color: var(--sec); line-height: 1; }
.back-row .lbl { font-size: 13px; font-weight: 700; color: var(--sec); }

.detail-hero { padding: 18px 20px 0; display: flex; gap: 16px; align-items: center; }
.detail-hero .grade-tile { width: 96px; height: 96px; border-radius: 24px; font-size: 56px; }
.detail-hero .grade-tile.stale { opacity: 0.75; box-shadow: none !important; }
.detail-hero .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-hero .name { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; line-height: 1.15; }
.detail-hero .gline { font-size: 15px; font-weight: 800; }
.detail-hero .when { font-size: 12.5px; color: var(--sec); font-weight: 600; }
.detail-hero .meta { font-size: 12.5px; color: var(--sec); }

.risk-banner {
  margin: 16px 20px 0; border-radius: 14px; padding: 12px 14px;
  font-size: 14.5px; font-weight: 800;
}
.risk-banner.ok { background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--green-deep); }
.risk-banner.warn { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn-fg); }
.risk-banner.stop { background: var(--stop-bg); border: 1px solid var(--stop-bd); color: var(--stop-fg); }

.stale-banner {
  margin: 16px 20px 0; background: var(--warn-bg-2);
  border: 1.5px solid var(--warn-bd); color: var(--warn-fg);
  border-radius: 14px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.stale-banner .t { font-size: 14.5px; font-weight: 800; }
.stale-banner .b { font-size: 13px; line-height: 1.45; font-weight: 600; }
.stale-banner .stale-request {
  margin-top: 2px; height: 42px; border: 1.5px solid var(--warn-bd);
  border-radius: 11px; background: #FFFFFF; color: var(--warn-fg);
  font-family: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
}

.detail-summary { padding: 12px 20px 0; font-size: 15px; color: var(--body); line-height: 1.5; }

.turnaround {
  margin: 10px 20px 0; background: #FFFFFF; border: 1.5px solid var(--ok-bd);
  border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.turnaround .lbl {
  font-size: 13px; font-weight: 800; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--green-deep);
}
.turnaround .row { display: flex; align-items: center; gap: 10px; }
.turnaround .pt { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.turnaround .pt .n {
  width: 40px; height: 40px; border-radius: 11px; color: #FFFFFF;
  font-size: 17px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.turnaround .pt .d { font-size: 10.5px; color: var(--sec); font-weight: 700; }
.turnaround .cap { font-size: 13px; color: var(--body); line-height: 1.4; margin-left: 4px; flex: 1; }

.vio-card {
  background: #FFFFFF; border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.vio-card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vio-card .t { font-size: 15px; font-weight: 800; line-height: 1.3; }
.vio-chip {
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0; letter-spacing: 0.03em;
}
.vio-card .why { font-size: 13.5px; color: var(--sec); line-height: 1.45; }
.vio-card .pts { font-size: 12px; font-weight: 800; color: var(--muted); }

.all-clear {
  margin: 10px 20px 0; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 16px;
  display: flex; align-items: center; gap: 12px;
}
.all-clear span { font-size: 14.5px; color: var(--body); line-height: 1.45; font-weight: 600; }

.low-toggle {
  margin: 14px 20px 0; width: calc(100% - 40px); height: 46px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #FFFFFF;
  color: var(--body-2); font-size: 14px; font-weight: 800; cursor: pointer;
}

.hist-head {
  padding: 24px 20px 0;
  display: flex; justify-content: space-between; align-items: center;
}
.trend-chip { font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 999px; }
.trend-chip.up { background: var(--ok-bg); color: var(--green-deep); }
.trend-chip.down { background: var(--stop-bg); color: var(--stop-fg); }
.trend-chip.flat { background: var(--chip); color: var(--body-2); }

.hist-card {
  margin: 10px 20px 0; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.hist-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hist-row .l { display: flex; flex-direction: column; }
/* §6: history dates are deep links to the official county report */
.hist-row .l a.d.link {
  color: #1E5C43; font-weight: 800; text-decoration: none;
}
.hist-row .l a.d.link:active { opacity: 0.7; }
.hist-toggle {
  align-self: center; border: none; background: none; cursor: pointer;
  color: #1E5C43; font-size: 13px; font-weight: 800; padding: 2px 10px;
}
.hist-chart-wrap { display: flex; flex-direction: column; gap: 8px; }
.hist-chart { width: 100%; height: auto; }
.hist-chart a { cursor: pointer; }
.hist-chart-cap { font-size: 12px; color: #6C7166; text-align: center; }
.hist-row .d { font-size: 13.5px; font-weight: 700; }
.hist-row .n { font-size: 12px; color: var(--muted); }
.hist-row .dem { font-size: 13px; font-weight: 900; }

.addr-card {
  margin: 20px 20px 0; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.addr-card .a { font-size: 14px; font-weight: 700; }
.addr-card .p { font-size: 13.5px; color: var(--sec); }
.addr-card a { font-size: 13.5px; font-weight: 800; }

.detail-actions { padding: 16px 20px 0; display: flex; gap: 10px; }
.detail-actions .btn-outline-brand { flex: 1; height: 50px; }
.detail-actions .btn-outline { flex: 1.4; height: 50px; }
.detail-actions .btn-outline.watching { border-color: var(--brand); color: var(--brand); }

.detail-disclaimer { padding: 18px 20px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ---------- Map ---------- */

.map-screen { background: #EDEFE4; position: relative; overflow: hidden; }
.map-world {
  position: absolute; inset: 0; transform-origin: 0 0; touch-action: none;
}
.map-canvas { position: absolute; inset: 0; overflow: hidden; }
.map-canvas .road { position: absolute; background: #FFFFFF; }
.map-canvas .road.shadow { box-shadow: 0 0 0 1px rgba(32,36,31,0.05); }
.map-canvas .park { position: absolute; background: #DDE7D4; }
.map-canvas .road-label { position: absolute; font-size: 10px; font-weight: 700; color: var(--muted); }
.map-canvas .area-label {
  position: absolute; font-size: 11px; font-weight: 800;
  color: var(--muted-2); letter-spacing: 0.08em;
}
.map-pin {
  position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid #FFFFFF; color: #FFFFFF;
  font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(32,36,31,0.25);
  cursor: pointer; padding: 0;
  transform: translate(-50%, -50%) scale(var(--invk, 1));
  transition: width 0.15s ease, height 0.15s ease, font-size 0.15s ease;
}
.map-pin.hot {
  width: 38px; height: 38px; border-width: 3px; font-size: 17px;
}
.map-pin.selected { z-index: 3; }
.map-overlay-top {
  /* .screen already pads for the notch — only design spacing here */
  position: relative; padding: 18px 16px 0;
  display: flex; flex-direction: column; gap: 10px; z-index: 2;
}
.map-search {
  display: flex; align-items: center; gap: 10px; height: 48px;
  background: #FFFFFF; border-radius: 14px; padding: 0 14px;
  box-shadow: 0 6px 18px rgba(32,36,31,0.14);
  border: none; width: 100%; cursor: pointer; text-align: left;
}
.map-search .q { font-size: 15px; color: var(--ink); font-weight: 600; }
.map-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.map-chips .pill { box-shadow: 0 4px 12px rgba(32,36,31,0.12); background: #FFFFFF; font-size: 12.5px; padding: 7px 12px; }
.map-chips .pill.solid { background: var(--brand); box-shadow: 0 4px 12px rgba(32,36,31,0.16); }
.map-stamp {
  align-self: flex-start; background: rgba(255,255,255,0.85); color: var(--sec);
  font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.map-stamp .demo { color: var(--rose-fg); }
.map-card {
  position: relative; margin: 0 16px 12px; background: #FFFFFF;
  border-radius: 18px; box-shadow: 0 12px 30px rgba(32,36,31,0.22);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
  z-index: 2; animation: cardUp 0.22s ease;
}
@keyframes cardUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.map-card .top { display: flex; gap: 12px; align-items: flex-start; }
.map-card .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.map-card .name { font-size: 16.5px; font-weight: 800; }
.map-card .meta { font-size: 12.5px; color: var(--sec); }
.map-card .gcol { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.map-card .grade-tile { width: 40px; height: 40px; border-radius: 11px; font-size: 22px; }
.map-card .gw { font-size: 10.5px; font-weight: 800; margin-top: 3px; }
.map-card .verdict { font-size: 13px; color: var(--body); line-height: 1.4; }
.map-card .btn-primary { height: 42px; border-radius: 11px; font-size: 14px; }

/* ---------- Saved ---------- */

.saved-note {
  margin: 12px 20px 0; background: var(--green-tint); border-radius: 12px;
  padding: 11px 14px; display: flex; align-items: center; gap: 10px;
}
.saved-note span { font-size: 13px; font-weight: 700; color: var(--green-deep); line-height: 1.4; }

/* ---------- Learn ---------- */

.learn-sub { padding: 6px 20px 0; font-size: 14px; color: var(--sec); line-height: 1.5; }
.scale-card {
  margin: 14px 20px 0; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.scale-row { display: flex; align-items: center; gap: 12px; }
.scale-row .grade-tile { width: 42px; height: 42px; border-radius: 11px; font-size: 22px; }
.scale-row .range { font-size: 15px; font-weight: 800; width: 74px; }
.scale-row .word { font-size: 14px; color: var(--sec); font-weight: 600; }
.cali-card {
  margin: 14px 20px 0; background: var(--green-tint); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column; gap: 6px;
}
.cali-card .t { font-size: 15px; font-weight: 900; color: var(--green-deep); }
.cali-card .b { font-size: 14px; color: #2E4A3A; line-height: 1.55; }
.learn-item {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 5px;
}
.learn-item .t { font-size: 15px; font-weight: 800; }
.learn-item .b { font-size: 13.5px; color: var(--sec); line-height: 1.5; }
.independent-card {
  margin: 18px 20px 0; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 5px;
}
.independent-card .t { font-size: 14px; font-weight: 900; }
.independent-card .b { font-size: 13px; color: var(--sec); line-height: 1.5; }

/* ---------- Contact / bug report ---------- */
.contact-card {
  margin: 18px 20px 0; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.contact-card .t { font-size: 15px; font-weight: 900; color: var(--ink); }
.contact-card .b { font-size: 13px; color: var(--sec); line-height: 1.5; }
.contact-card .btn-primary { margin-top: 4px; }
.fb-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-kind {
  height: 38px; padding: 0 14px; border-radius: 19px; border: 1.5px solid var(--line);
  background: #FFFFFF; font-family: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--sec); cursor: pointer;
}
.fb-kind.on { background: var(--green-tint); border-color: var(--brand); color: var(--brand); }
textarea.req-field { height: auto; min-height: 112px; padding: 12px 14px; resize: none; line-height: 1.5; }
.fb-send:disabled { opacity: 0.45; }
.fb-thanks {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 26px 8px 10px;
}
.fb-thanks .big {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green-tint);
  color: var(--brand); font-size: 26px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
}
.fb-thanks .t { font-size: 18px; font-weight: 900; color: var(--ink); }
.fb-thanks .b { font-size: 13.5px; color: var(--sec); line-height: 1.5; max-width: 280px; }
.fb-thanks .btn-primary { align-self: stretch; }

/* ---------- Request an inspection ---------- */

.req-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; border: none; border-top: 1px solid var(--line-soft);
  background: #F7F6F0; cursor: pointer; text-align: left; font-family: inherit;
}
.req-row .ico {
  width: 34px; height: 34px; border-radius: 10px; background: var(--green-tint);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.req-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.req-row .l1 { font-size: 14.5px; font-weight: 800; color: var(--brand); }
.req-row .l2 { font-size: 12px; color: var(--sec); }
.req-row .chev { color: var(--muted); font-size: 18px; flex-shrink: 0; }

.req-card {
  margin-top: 12px; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 8px; align-self: stretch; text-align: left;
}
.req-card .t { font-size: 15px; font-weight: 900; color: var(--ink); }
.req-card .b { font-size: 13px; color: var(--sec); line-height: 1.5; }
.req-card .btn-primary { margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }

.req-field {
  height: 50px; background: #FFFFFF; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 0 14px; font-family: inherit;
  font-size: 15px; font-weight: 600; color: var(--ink); box-sizing: border-box;
}
.req-field:focus { outline: none; border-color: var(--brand); }
.req-steps {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 11px;
}
.req-steps .step { display: flex; gap: 10px; align-items: flex-start; }
.req-steps .n {
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-tint);
  color: var(--brand); font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.req-steps .s { font-size: 13.5px; color: var(--body); line-height: 1.45; }
.req-close {
  border: none; background: none; font-size: 18px; font-weight: 700;
  color: var(--sec); cursor: pointer; padding: 0 2px;
}
.req-cta { display: flex; align-items: center; justify-content: center; gap: 8px; }
.req-cta:disabled { opacity: 0.5; cursor: default; }
.req-footnote { font-size: 11.5px; color: var(--muted); line-height: 1.5; text-align: center; }

/* ---------- Accounts ---------- */

/* Home-header account chip: person outline signed out, initials signed in */
.acct-chip {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #FFFFFF; color: var(--sec);
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 13px; font-weight: 900; cursor: pointer;
}
.acct-chip.in { background: var(--green-tint); border-color: var(--brand); color: var(--brand); }

.auth-screen { min-height: 100vh; display: flex; flex-direction: column; }
.auth-screen .back-row { align-self: flex-start; }
.auth-home {
  border: none; background: none; font-family: inherit; font-size: 13.5px;
  font-weight: 700; color: var(--sec); cursor: pointer; margin-top: 4px;
}

.signin-sub {
  padding: 0 2px; font-size: 13.5px; color: var(--sec); line-height: 1.55;
}
.si-sent {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 14px 8px 4px;
}
.si-sent .big {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green-tint);
  color: var(--brand); font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}
.si-sent .b { font-size: 14px; color: var(--body-2); line-height: 1.55; max-width: 290px; }
.si-resend { height: 48px; }
.si-resend:disabled { color: #9AA093; cursor: default; }
.si-send:disabled { opacity: 0.45; }

.acct-screen { padding-bottom: 30px; }
.acct-card {
  margin: 12px 20px 0; background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px;
}
.acct-id { display: flex; align-items: center; gap: 12px; }
.avatar-big {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  background: var(--green-tint); border: 1.5px solid var(--brand); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900;
}
.acct-id .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-id .e { font-size: 15px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.acct-id .m { font-size: 12.5px; color: var(--sec); }
.acct-sync { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--body-2); }
.acct-offline {
  margin: 12px 20px 0; padding: 12px 14px; border-radius: 12px;
  background: #F4F1E8; border: 1px solid var(--line);
  font-size: 13px; color: var(--sec); line-height: 1.5;
}
.acct-empty { padding: 14px 0 6px; font-size: 13px; color: var(--sec); line-height: 1.5; }
.acct-addrule {
  width: 100%; border: none; background: none; padding: 12px 0;
  font-family: inherit; font-size: 14px; font-weight: 800; color: var(--brand);
  cursor: pointer; text-align: left;
}
.acct-action {
  width: 100%; border: none; background: none; padding: 13px 0;
  font-family: inherit; font-size: 14.5px; font-weight: 800; color: var(--ink);
  cursor: pointer; text-align: left;
}
.acct-action.danger { color: #B3372B; }
.acct-action + .acct-action { border-top: 1px solid var(--line); }
.privacy-foot {
  padding: 18px 24px 8px; margin: 0; text-align: center;
  font-size: 12px; color: var(--sec); line-height: 1.5;
}
.rule-del {
  margin-left: 4px; border: none; background: none; color: #9AA093;
  font-size: 13px; cursor: pointer; padding: 6px;
}

/* Alert-rule builder */
.rule-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rule-chip {
  height: 38px; padding: 0 14px; border-radius: 19px; border: 1.5px solid var(--line);
  background: #FFFFFF; font-family: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--sec); cursor: pointer;
}
.rule-chip.on { background: var(--green-tint); border-color: var(--brand); color: var(--brand); }
.rule-chip.soon { opacity: 0.45; cursor: default; }
.rule-soon-note { font-size: 12px; color: var(--sec); padding-top: 2px; }
.rule-recap {
  background: var(--green-tint); border: 1px solid #C4DECD; border-radius: 14px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 3px;
}
.rule-recap .l { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.rule-recap .s { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.45; }

/* Delete-account sheet */
.del-list { display: flex; flex-direction: column; gap: 7px; }
.del-list .d { font-size: 14px; color: #B3372B; font-weight: 700; }
.del-safe {
  background: #F4F1E8; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; color: var(--body-2); line-height: 1.5;
}
.btn-danger {
  border: none; border-radius: 14px; background: #B3372B; color: #FFFFFF;
  font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
}
.btn-danger:disabled { opacity: 0.6; }

/* Detail hint + Saved banner */
.watch-hint {
  padding: 0 20px; font-size: 12.5px; color: var(--sec); line-height: 1.5;
}
.link-btn {
  border: none; background: none; padding: 0; font-family: inherit;
  font-size: inherit; font-weight: 800; color: var(--brand);
  cursor: pointer; text-decoration: underline;
}
.sync-banner {
  margin: 12px 20px 0; padding: 11px 14px; border-radius: 12px;
  background: var(--green-tint); border: 1px solid #C4DECD;
  display: flex; align-items: flex-start; gap: 10px;
}
.sync-banner .b { flex: 1; font-size: 13px; color: var(--body-2); line-height: 1.5; }
.sync-banner .x {
  border: none; background: none; color: var(--sec); font-size: 13px;
  cursor: pointer; padding: 2px;
}

/* ---------- Home: fresh strip / A2HS coach / feed end ---------- */
.fresh-pill {
  background: var(--green-tint); color: var(--brand);
  font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
}
.see-more-fresh {
  margin: 10px 20px 0; height: 42px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #FFFFFF;
  font-family: inherit; font-size: 13.5px; font-weight: 800; color: var(--brand);
  cursor: pointer;
}
.a2hs-card {
  margin: 18px 20px 0; padding: 13px 14px; border-radius: 14px;
  background: var(--green-tint); border: 1px solid #C4DECD;
  display: flex; align-items: flex-start; gap: 10px;
}
.a2hs-card .txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.a2hs-card .t { font-size: 14px; font-weight: 900; color: var(--ink); }
.a2hs-card .b { font-size: 12.5px; color: var(--body-2); line-height: 1.5; }
.a2hs-card .x {
  border: none; background: none; color: var(--sec); font-size: 13px;
  cursor: pointer; padding: 2px;
}
.feed-end-card {
  margin: 18px 20px 0; padding: 18px 16px; border-radius: 16px;
  border: 1.5px dashed var(--line); text-align: center;
  display: flex; flex-direction: column; gap: 5px;
}
.feed-end-card .t { font-size: 15px; font-weight: 900; color: var(--ink); }
.feed-end-card .b { font-size: 13px; color: var(--sec); line-height: 1.5; }

/* ---------- Share + report-a-change + reported-closed ---------- */
.detail-topbar { display: flex; align-items: center; justify-content: space-between; padding-right: 20px; }
.share-btn {
  display: flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #FFFFFF;
  color: var(--body-2); font-family: inherit; font-size: 12.5px; font-weight: 800;
  padding: 7px 13px; cursor: pointer;
}
.report-row {
  margin: 12px 20px 0; padding: 12px 14px; border-radius: 12px;
  border: 1.5px dashed var(--line); background: none; text-align: left;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--sec);
  cursor: pointer;
}
.closed-banner {
  margin: 16px 20px 0; padding: 13px 15px; border-radius: 14px;
  background: var(--warn-bg); border: 1px solid var(--warn-bd);
  display: flex; flex-direction: column; gap: 4px;
}
.closed-banner .t { font-size: 14px; font-weight: 900; color: var(--warn-fg); }
.closed-banner .b { font-size: 12.5px; color: var(--body-2); line-height: 1.5; }
.note-closed {
  background: var(--warn-bg); color: var(--warn-fg);
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
}

.privacy-link { color: var(--brand); font-weight: 800; text-decoration: underline; }

/* ---------- Web install invite ---------- */
.app-invite {
  margin: 16px 20px 0; padding: 14px 14px 14px 16px; border-radius: 16px;
  background: var(--green-tint); border: 1px solid #C4DECD;
  display: flex; align-items: center; gap: 12px;
}
.app-invite .txt { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.app-invite .t { font-size: 14.5px; font-weight: 900; color: var(--ink); }
.app-invite .b { font-size: 12.5px; color: var(--body-2); line-height: 1.45; }
.app-invite-go { height: 40px; padding: 0 14px; border-radius: 11px; font-size: 13.5px; display: flex; align-items: center; flex: none; }
.app-invite .x { border: none; background: none; color: var(--sec); font-size: 13px; cursor: pointer; padding: 2px; }
