/* RoveCheck demo app. Layout follows the app's own width (container queries),
   so the same app reads as a phone inside the device frame and as an office tool full screen. */

.ig-shell {
  container: ig / inline-size;
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.45;
}
.ig {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "banner" "main" "nav";
}

/* ---------- chrome ---------- */
.ig-banner {
  grid-area: banner;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 6px 14px;
  background: var(--flag-soft);
  border-bottom: 1px solid var(--rule);
  font: 500 10.5px/1.3 var(--f-mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ig-banner-flag { width: 9px; height: 11px; background: var(--flag); clip-path: polygon(0 0, 100% 50%, 0 100%); flex: none; }
.ig-banner-sp { flex: 1; }
.ig-banner-link {
  background: none; border: 0; padding: 2px 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink);
  text-decoration: underline; text-underline-offset: 2px;
}
.ig-main { grid-area: main; overflow-y: auto; overflow-x: hidden; min-height: 0; overscroll-behavior: contain; outline: none; }
.ig-nav {
  grid-area: nav;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--panel);
  border-top: 1px solid var(--rule);
  padding: 4px 4px max(6px, env(safe-area-inset-bottom, 0px));
}
.in-phone .ig-nav { padding-bottom: 24px; }
.ig-brand, .ig-navlinks { display: none; }
.ig-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px 5px; border: 0; border-radius: var(--r-m); background: none; cursor: pointer;
  color: var(--ink-3); font: 700 11.5px/1.15 var(--f-body); text-align: center;
}
.ig-tab svg { width: 25px; height: 25px; }
.ig-tab[aria-current="page"] { color: var(--flag); }
.glyph-dot { fill: var(--flag); }

@container ig (min-width: 820px) {
  .ig { grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "nav banner" "nav main"; }
  .ig-nav { display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--rule); padding: 18px 12px; }
  .ig-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font: 700 21px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
  .ig-brand .wordmark-glyph { width: 28px; height: 28px; }
  .ig-brand b { color: var(--flag); }
  .ig-tab { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 12px; font-size: 15px; color: var(--ink-2); text-align: left; }
  .ig-tab:hover { background: var(--sunk); }
  .ig-tab[aria-current="page"] { background: var(--flag-soft); color: var(--ink); }
  .ig-tab[aria-current="page"] svg { color: var(--flag); }
  .ig-navlinks { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--rule); }
  .ig-navlinks p { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
  .ig-navlinks a { padding: 5px 0; color: var(--ink-2); text-decoration: none; font-size: 14px; }
  .ig-navlinks a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
}

/* ---------- shared view type ---------- */
.view { padding: 18px 16px 32px; max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
@container ig (min-width: 820px) { .view { padding: 28px 36px 56px; gap: 22px; } }
.eyebrow { font: 500 11px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 4px; }
.v-title { font: 700 30px/1 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
@container ig (min-width: 820px) { .v-title { font-size: 40px; } }
.v-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lede { color: var(--ink-2); max-width: 62ch; }
.mini-h { display: block; font: 700 12.5px/1.2 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.meta { font-size: 12px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.hint { font-size: 13px; color: var(--ink-3); }
.err { font-size: 14px; color: var(--bad); background: var(--bad-soft); padding: 9px 11px; border-radius: var(--r-s); }
.okline { display: flex; gap: 6px; align-items: center; color: var(--ok); font-size: 14px; font-weight: 700; }
.okline svg { width: 18px; height: 18px; }
.back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; background: none; border: 0; padding: 4px 6px 4px 0; color: var(--ink-2); font-weight: 700; cursor: pointer; }
.back svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--line); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; font-size: 14px; cursor: pointer; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.count { font: 500 11.5px var(--f-mono); color: var(--ink-3); }
.empty { padding: 28px 16px; text-align: center; border: 1.5px dashed var(--rule); border-radius: var(--r-l); display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-m); border: 1.5px solid transparent;
  font: 700 15px/1 var(--f-body); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn svg { width: 19px; height: 19px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--flag); color: var(--flag-ink); }
.btn-primary:hover { background: var(--flag-hover); }
.btn-primary:disabled { background: var(--sunk); color: var(--ink-3); cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--panel); border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-quiet { background: var(--sunk); color: var(--ink); }
.btn-quiet:hover { background: var(--rule); }
.btn-ghost:disabled, .btn-quiet:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.btn-block { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font: 700 12px/1.3 var(--f-body); }
.pill svg { width: 14px; height: 14px; flex: none; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-info, .pill-auto { background: var(--line-soft); color: var(--line); }
.pill-manual { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-3); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill-info .pill-dot { animation: pulse 1s ease-in-out infinite alternate; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--rule); background: var(--panel); color: var(--ink);
  font: 700 14px/1 var(--f-body); cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-pressed="true"] .count { color: inherit; opacity: .75; }
.chips.is-static .chip { cursor: default; min-height: 32px; font-weight: 400; font-size: 13.5px; }
.chip em { font: 500 10px var(--f-mono); font-style: normal; text-transform: uppercase; letter-spacing: .05em; color: var(--flag); }
.chip-edit { cursor: default; padding-right: 5px; }
.chip-edit button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--sunk); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.chip-edit button svg { width: 14px; height: 14px; }

textarea, input[type="text"], select {
  width: 100%; font: 16px/1.4 var(--f-body); color: var(--ink); background: var(--panel);
  border: 1.5px solid var(--rule); border-radius: var(--r-m); padding: 11px 12px;
}
select { padding-right: 30px; }
textarea { resize: vertical; min-height: 84px; }
textarea:focus, input[type="text"]:focus, select:focus { border-color: var(--line); outline: none; box-shadow: 0 0 0 3px var(--line-soft); }
select:disabled { opacity: .6; }
.sel, .txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sel > span, .txt > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* ---------- capture: camera ---------- */
.cap-layout { height: 100%; display: flex; }
.cam-col { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cam { position: relative; flex: 1; min-height: 420px; background: #050807; overflow: hidden; }
.cam-view { position: absolute; inset: 0; }
.cam-view .photo-svg { width: 100%; height: 100%; display: block; }
.cam-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .26) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .26) 1px, transparent 1px);
  background-size: 33.34% 33.34%; background-position: -1px -1px;
}
.cam-gps {
  position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 12px; border: 0; cursor: pointer; text-align: left;
  background: rgba(8, 12, 11, .74); color: #FFFFFF; backdrop-filter: blur(6px);
}
.cam-gps small { display: block; font: 500 10px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.cam-gps b { font-size: 14px; }
.cam-gps > svg { width: 18px; height: 18px; }
.cam-label {
  position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%);
  padding: 4px 10px; border-radius: 4px; background: rgba(8, 12, 11, .62); color: #FFFFFF;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.cam-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 116px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 24px;
  background: linear-gradient(to top, rgba(5, 8, 7, .86), rgba(5, 8, 7, 0));
}
.cam-thumb { justify-self: start; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .88); padding: 0; background: #222; cursor: pointer; }
.cam-thumb svg { width: 100%; height: 100%; display: block; }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #FFFFFF; background: transparent; padding: 5px; cursor: pointer; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #FFFFFF; transition: transform .12s; }
.shutter:hover span { transform: scale(.94); }
.shutter:active span { transform: scale(.86); }
.shutter:focus-visible { outline-color: #FFFFFF; outline-offset: 4px; }
.cam-count { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; color: #FFFFFF; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.cam-count b { font-size: 22px; letter-spacing: 0; line-height: 1; }
.cap-hint { padding: 10px 16px; text-align: center; font-size: 13px; color: var(--ink-2); background: var(--panel); border-top: 1px solid var(--rule); }
.cap-aside { display: none; }

.scen-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--panel); }
.cam-gps .scen-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.dot-clear { background: var(--ok); }
.dot-nosub { background: var(--line); }
.dot-edge { background: var(--warn); }
.dot-none { background: var(--warn); }
.dot-outside { background: var(--bad); }
.scen-list { display: flex; flex-direction: column; gap: 8px; }
.scen {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; cursor: pointer;
  border-radius: var(--r-m); border: 1.5px solid var(--rule); background: var(--panel);
}
.scen:hover { border-color: var(--ink-3); }
.scen[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.scen-txt { display: flex; flex-direction: column; min-width: 0; }
.scen-txt b { font-size: 15px; }
.scen-txt small { font-size: 13px; color: var(--ink-3); }
.scen-status { margin-top: 3px; font: 500 10.5px/1.4 var(--f-mono); font-style: normal; letter-spacing: .03em; }
.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-info { color: var(--line); }
.tone-bad { color: var(--bad); }

@container ig (min-width: 820px) {
  .cap-layout { height: auto; min-height: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 36px 40px; gap: 44px; align-items: flex-start; justify-content: center; }
  .cam-col { flex: 0 0 380px; height: 680px; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-2); border: 1px solid var(--rule); }
}
@container ig (min-width: 1080px) {
  .cap-aside { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; padding-top: 8px; }
}

/* ---------- capture: review ---------- */
.rev { padding-top: 10px; }
.rev-top { display: flex; justify-content: space-between; align-items: center; }
.rev-grid { display: grid; gap: 18px; }
.rev-photo { position: relative; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%; background: var(--sunk); }
.rev-photo .photo-svg { width: 100%; height: 100%; display: block; }
.rev-stamp {
  position: absolute; right: 8px; bottom: 8px; padding: 5px 8px; border-radius: 6px;
  background: rgba(8, 12, 11, .74); color: #FFFFFF; font-size: 10.5px; line-height: 1.45; text-align: right;
}
.rev-form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rev-why { margin-top: -10px; text-align: center; }
.dest { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-l); background: var(--panel); border: 1.5px solid var(--rule); }
.dest-clear { border-color: var(--ok); }
.dest-edge, .dest-none { border-color: var(--warn); }
.dest-outside { border-color: var(--bad); }
.dest-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dest-case { font-size: 11px; color: var(--ink-3); letter-spacing: .03em; }
.dest-prompt { font-size: 14px; font-weight: 700; margin-top: -2px; }
.dest-grid { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 12px; align-items: start; }
.dest-grid.no-map { grid-template-columns: minmax(0, 1fr); }
.dest-map { border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--rule); aspect-ratio: 4 / 3; }
.dest-map .map-svg { width: 100%; height: 100%; display: block; }
.dest-pick { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.dest-name { font: 700 19px/1.05 var(--f-display); text-transform: uppercase; letter-spacing: .01em; }
.dest-area { display: flex; gap: 4px; align-items: center; font-weight: 700; color: var(--line); }
.dest-area svg { width: 16px; height: 16px; flex: none; }
.opts { display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 4px 0; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); border: 1.5px solid var(--rule); background: var(--paper); font-weight: 700; cursor: pointer; text-align: left; }
.opt .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink-3); flex: none; transition: border-width .12s; }
.opt[aria-checked="true"] { border-color: var(--ink); }
.opt[aria-checked="true"] .radio { border: 6px solid var(--ink); }
.pickers { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@container ig (min-width: 1100px) {
  .rev-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 28px; }
  .rev-photo { position: sticky; top: 0; }
  .dest-grid { grid-template-columns: 180px minmax(0, 1fr); }
}

/* ---------- capture: saved ---------- */
.saved-card { display: grid; gap: 18px; }
.saved-photo { position: relative; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4 / 3; }
.saved-photo .photo-svg { width: 100%; height: 100%; display: block; }
.saved-check { position: absolute; right: 12px; top: 12px; width: 46px; height: 46px; border-radius: 50%; background: var(--ok); color: var(--panel); display: grid; place-items: center; animation: pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.saved-check svg { width: 26px; height: 26px; }
.saved-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.saved-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--ink-3); font-weight: 700; font-size: 13px; padding-top: 1px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@container ig (min-width: 1100px) { .saved-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 36px; } }

/* ---------- neighborhoods ---------- */
.nb-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.nb-card {
  display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 10px; border-radius: var(--r-l); background: var(--panel); border: 1.5px solid var(--rule);
  text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.nb-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow-1); }
.nb-pic, .nbd-pic { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-m); overflow: hidden; background: var(--sunk); }
.nb-pic svg, .nb-pic img, .nbd-pic svg, .nbd-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-tag { position: absolute; left: 4px; bottom: 4px; font-size: 9px; padding: 2px 5px; border-radius: 3px; background: rgba(8, 12, 11, .72); color: #FFFFFF; letter-spacing: .05em; text-transform: uppercase; }
.pic-empty {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: repeating-linear-gradient(135deg, var(--sunk) 0 8px, var(--paper) 8px 16px); color: var(--ink-3);
}
.pic-empty span { font: 700 26px/1 var(--f-display); color: var(--ink-2); }
.pic-empty small { font-size: 11px; }
.nb-body { min-width: 0; }
.nb-body h2 { font: 700 21px/1.05 var(--f-display); text-transform: uppercase; letter-spacing: .01em; margin-bottom: 4px; }
.nb-body p { font-size: 13px; }
.nb-body p + p { margin-top: 2px; }
.nb-go svg { width: 22px; height: 22px; color: var(--ink-3); display: block; }
.foot-note { text-align: center; }

.nbd-head { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: center; }
.nbd-head .btn { grid-column: 1 / -1; justify-self: start; }
@container ig (min-width: 820px) {
  .nbd-head { grid-template-columns: 150px minmax(0, 1fr) auto; }
  .nbd-head .btn { grid-column: auto; justify-self: end; }
}
.nbd-title .meta { margin-top: 6px; }
.seg { display: inline-flex; align-self: flex-start; padding: 4px; gap: 4px; background: var(--sunk); border-radius: 12px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 20px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.nbd-map { display: grid; gap: 16px; }
@container ig (min-width: 1100px) { .nbd-map { grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr); align-items: start; } }
.map-frame { border-radius: var(--r-l); overflow: hidden; border: 1.5px solid var(--rule); background: var(--map-bg); }
.map-frame .map-svg { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.map-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; align-items: flex-start; }
.map-side > * { width: 100%; }
.map-side > .btn { width: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg { display: inline-block; width: 26px; height: 0; flex: none; }
.lg-outer { border-top: 2.5px solid var(--line); }
.lg-area { border-top: 3px dotted var(--line); }
.lg-none { border-top: 2px dashed var(--ink-3); }
.area-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.area-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--panel); border: 1.5px solid var(--rule); cursor: pointer; text-align: left; }
.area-row.is-static { cursor: default; }
.area-row[aria-pressed="true"] { border-color: var(--flag); background: var(--flag-soft); }
.area-name { flex: 1; font-weight: 700; min-width: 0; }

/* map linework */
.map-svg { font-family: var(--f-mono); }
.m-bg { fill: var(--map-bg); }
.m-green { fill: var(--map-green); }
.m-edge { fill: none; stroke: var(--map-edge); stroke-width: 14; }
.m-road { fill: none; stroke: var(--map-road); stroke-width: 11; }
.m-roadlabel { font-size: 7px; letter-spacing: .14em; fill: var(--ink-3); }
.m-bldg, .m-play { fill: var(--map-bldg); }
.m-water { fill: var(--map-water); }
.m-trail { fill: none; stroke: var(--map-bldg); stroke-width: 3; stroke-dasharray: 5 4; }
.m-court { fill: var(--map-green); stroke: var(--map-edge); stroke-width: 1.5; }
.m-court-line { stroke: var(--map-edge); stroke-width: 1.5; }
.m-tree { fill: var(--map-tree); }
.m-outer { fill: var(--line); fill-opacity: .05; stroke: var(--line); stroke-width: 2.5; stroke-linejoin: round; }
.m-area { fill: var(--line); fill-opacity: .08; stroke: var(--line); stroke-width: 2.6; stroke-dasharray: .1 6; stroke-linecap: round; stroke-linejoin: round; transition: fill-opacity .15s; }
.m-area[data-act] { cursor: pointer; }
.m-area[data-act]:hover { fill-opacity: .18; }
.m-area.is-dim { fill-opacity: .03; }
.m-area.is-hl { fill: var(--flag); fill-opacity: .18; stroke: var(--flag); }
.m-label rect { fill: var(--panel); fill-opacity: .94; stroke: var(--rule); }
.m-label text { font-size: 9px; font-weight: 500; fill: var(--ink); }
.m-label.is-hl rect { stroke: var(--flag); }
.m-acc { fill: var(--line); fill-opacity: .16; stroke: var(--line); stroke-opacity: .55; stroke-width: 1; }
.m-dot-ring { fill: var(--panel); }
.m-dot { fill: var(--line); }
.m-draft { fill: none; stroke: var(--line); stroke-width: 2.5; stroke-dasharray: 6 4; }
.m-draft.is-area { stroke-dasharray: .1 6; stroke-linecap: round; stroke-width: 2.8; }
.m-vertex { fill: var(--panel); stroke: var(--line); stroke-width: 2; }
.m-vertex.is-first { fill: var(--line); }
.m-pin circle { fill: var(--flag); stroke: var(--panel); stroke-width: 2; }
.m-pin text { font-size: 9px; font-weight: 500; fill: var(--flag-ink); }

/* history */
.hist { display: flex; flex-direction: column; gap: 22px; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container ig (min-width: 820px) { .filters { display: flex; } .filters .sel { width: 230px; } }
.hgroup { display: flex; flex-direction: column; gap: 10px; }
.hgroup-title { display: flex; align-items: baseline; gap: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); font: 700 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.pgrid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@container ig (min-width: 600px) { .pgrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); } }
.pcard { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px; background: var(--panel); border: 1.5px solid var(--rule); border-radius: var(--r-l); }
@container ig (min-width: 600px) { .pcard { grid-template-columns: minmax(0, 1fr); align-content: start; } }
.pcard-img { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; align-self: start; padding: 0; border: 0; border-radius: var(--r-m); overflow: hidden; background: var(--sunk); cursor: zoom-in; }
.pcard-img svg { width: 100%; height: 100%; display: block; transition: opacity .2s; }
.pcard-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }
.pcard-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pcard-desc { font-size: 14.5px; line-height: 1.35; }
.pcard-area { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--line); }
.pcard-area svg { width: 15px; height: 15px; flex: none; }
.pcard-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pcard-pills .pill { font-size: 11px; padding: 2px 8px; }
.pcard .btn-sm { margin-top: 2px; }
.pcard.is-ex { background: var(--paper); border-style: dashed; border-color: var(--ink-3); }
.pcard.is-ex .pcard-img svg { opacity: .35; filter: grayscale(1); }
.pcard.is-ex .pcard-desc { color: var(--ink-3); }
.ex-tag { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 3px 6px; border-radius: 4px; background: var(--ink); color: var(--paper); font: 700 11px/1.3 var(--f-body); text-align: center; }
.pcard.is-new { animation: newflash 2.2s ease-out; }
.tagchip { padding: 2px 8px; border-radius: 4px; background: var(--ink); color: var(--paper); font: 700 11px/1.4 var(--f-body); text-transform: uppercase; letter-spacing: .04em; }

/* steps (wizard and generator) */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.steps li { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-start; gap: 8px; padding-top: 10px; border-top: 3px solid var(--rule); color: var(--ink-3); }
.steps li.is-on { border-color: var(--flag); color: var(--ink); }
.steps li.is-done { border-color: var(--ink); color: var(--ink-2); }
.steps li > button { display: flex; gap: 8px; align-items: flex-start; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; min-width: 0; }
.steps li > button:hover .step-t { text-decoration: underline; text-underline-offset: 3px; }
.step-n { font: 500 12px/1.45 var(--f-mono); flex: none; }
.step-t { font-weight: 700; font-size: 13.5px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.step-t small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); }
@container ig (max-width: 520px) { .create .step-t { font-size: 12px; } }

/* generator */
.date-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.date-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; background: var(--panel); border: 1.5px solid var(--rule); border-radius: var(--r-l); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.date-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow-1); }
.date-card > svg { width: 22px; height: 22px; color: var(--ink-3); }
.date-block { display: flex; flex-direction: column; align-items: center; width: 66px; padding: 7px 0 6px; border-radius: var(--r-m); background: var(--ink); color: var(--paper); }
.date-block .dow { font: 500 11px/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.date-block .dd { font: 700 32px/1 var(--f-display); }
.date-block .mon { font: 500 10px/1.2 var(--f-mono); }
.date-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.date-info span { font-size: 13.5px; color: var(--ink-2); }
.rv { display: flex; flex-direction: column; gap: 18px; }
.rv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.rv-title h2 { font: 700 28px/1 var(--f-display); text-transform: uppercase; }
.rv-counts { display: flex; gap: 6px; margin: 0; }
.rv-counts div { min-width: 76px; padding: 8px 12px; border-radius: var(--r-m); background: var(--panel); border: 1.5px solid var(--rule); }
.rv-counts dt { font: 500 10.5px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.rv-counts dd { margin: 0; font: 700 28px/1.05 var(--f-display); }
.notice { padding: 10px 12px; border-radius: var(--r-m); font-size: 14px; }
.notice-warn { background: var(--warn-soft); border: 1.5px solid var(--warn); }
.chips.filter { gap: 6px; }
.chips.filter .chip { min-height: 36px; font-size: 13.5px; }
.rv-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 16px; border-radius: var(--r-l); border: 1.5px dashed var(--ink-3); background: var(--sunk); }
.rv-foot-txt { flex: 1 1 280px; min-width: 0; }
.rv-foot h3 { font: 700 19px/1.1 var(--f-display); text-transform: uppercase; margin-bottom: 4px; }
.rv-foot p { font-size: 14px; color: var(--ink-2); }
.rv-foot .btn { white-space: normal; text-align: left; }

/* new neighborhood */
.form-col { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.pic-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pic-prev { position: relative; width: 140px; aspect-ratio: 4 / 3; border-radius: var(--r-m); overflow: hidden; border: 1.5px solid var(--rule); }
.pic-prev svg, .pic-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--line); outline-offset: 2px; }
.draw-wrap { display: grid; gap: 16px; }
@container ig (min-width: 1100px) { .draw-wrap { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); align-items: start; } }
.draw-map { cursor: crosshair; }
.draw-tools { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.add-row { align-items: flex-end; }
.grow { flex: 1; min-width: 160px; }
.wiz-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--rule); }

/* ---------- filing case cards (handoff v0.4, section 10.4) ----------
   Shared by the showcase and the handoff. Order, names, labels and tones come from FILING_CASES in data.js. */
.go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--flag); text-decoration-thickness: 2px; }
.go:hover { color: var(--flag); }
.go svg { width: 16px; height: 16px; }
.cases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1140px) { .cases { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); } }
.case { display: flex; flex-direction: column; min-width: 0; background: var(--paper); border: 1.5px solid var(--rule); border-radius: var(--r-l); overflow: hidden; }
.case-map { position: relative; aspect-ratio: 4 / 3; border-bottom: 1.5px solid var(--rule); background: var(--map-bg); }
.case-map .map-svg { width: 100%; height: 100%; display: block; }
.case-map .nosig { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--paper) 55%, transparent); font: 500 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); text-align: center; }
.case-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.case-body .pill { align-self: flex-start; }
.case h3 { font: 700 21px/1.02 var(--f-display); text-transform: uppercase; }
.case p { font-size: 14px; color: var(--ink-2); }
.case { break-inside: avoid; }

/* ---------- sheet, toast, flash ---------- */
.ig-sheetwrap { position: absolute; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.ig-sheetwrap[hidden] { display: none; }
.ig-scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .2s ease-out; }
.ig-sheet {
  position: relative; width: 100%; max-height: 90%; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--panel); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-2);
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
.in-phone .ig-sheet { padding-bottom: 34px; }
@container ig (min-width: 820px) {
  .ig-sheetwrap { align-items: center; }
  .ig-sheet { width: min(640px, 92%); max-height: 88%; border-radius: 22px; }
}
.sheet-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sunk); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.sheet-x svg { width: 18px; height: 18px; }
.sheet-title { font: 700 24px/1.1 var(--f-display); text-transform: uppercase; padding-right: 44px; }
.sheet-photo { margin: -22px -18px 0; aspect-ratio: 4 / 3; overflow: hidden; flex: none; }
.sheet-photo svg { width: 100%; height: 100%; display: block; }
.sheet-photo + .sheet-body .sheet-title { padding-right: 0; }
.sheet-body { display: flex; flex-direction: column; gap: 12px; }
.pri { display: inline-block; padding: 1px 6px; border-radius: 4px; font: 700 11px/1.4 var(--f-body); text-transform: uppercase; letter-spacing: .03em; }
.pri-high { background: var(--bad-soft); color: var(--bad); }
.pri-medium { background: var(--warn-soft); color: var(--warn); }
.pri-low { background: var(--sunk); color: var(--ink-2); }

.ig-toast {
  position: absolute; left: 50%; bottom: 100px; z-index: 50; max-width: min(92%, 440px);
  padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 700; text-align: center; box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s;
}
.ig-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@container ig (min-width: 820px) { .ig-toast { bottom: 28px; left: calc(50% + 118px); } }
.ig-shell.is-flash::after { content: ""; position: absolute; inset: 0; z-index: 70; background: #FFFFFF; pointer-events: none; animation: flash .4s ease-out forwards; }

@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { from { opacity: 1; } to { opacity: .3; } }
@keyframes newflash { 0%, 30% { box-shadow: 0 0 0 4px var(--flag); } 100% { box-shadow: 0 0 0 0 transparent; } }

