/* Banner Locator
   Palette and type borrow from roadside signage: sign green, white legend,
   and Overpass, a typeface drawn from the US highway sign alphabet. */

@font-face {
  font-family: "Overpass";
  src: url("fonts/overpass-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17211d;
  --muted: #55625c;
  --bg: #f1f4f1;
  --surface: #ffffff;
  --line: #d3dbd6;
  --line-strong: #94a39b;
  --green: #0b6b4f;
  --green-dark: #084d39;
  --green-tint: #e2f0ea;
  --amber: #f2b01e;
  --slate: #68746e;
  --slate-tint: #e8ecea;
  --red: #b3261e;
  --red-tint: #fbeae8;
  --amber-tint: #fdf3d7;
  --boundary: #5b2a86;
  --radius: 10px;
  --tap: 46px;
  --nav-h: 62px;
  --font: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.45 var(--font);
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, p, ul, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1 { font-size: 1.6rem; line-height: 1.15; font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; line-height: 1.25; font-weight: 700; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 10px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.icon { flex: none; }

/* ---------- top bar and navigation ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 6px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  background: var(--green); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; margin-right: auto; }
.brand:hover { color: #fff; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { font-weight: 750; font-size: 1.05rem; }
.brand-district { font-size: 0.8rem; opacity: 0.88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.signout { margin: 0; }
.signout-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 6px 10px;
  background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.55); border-radius: 8px; cursor: pointer;
}
.signout-btn:hover { background: var(--green-dark); }
.signout-btn span { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 400px) { .signout-btn span { display: none; } }

/* phones: the navigation is a tab bar within thumb reach */
.mainnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line-strong);
}
.nav-link {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 0.72rem; font-weight: 600;
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-current { color: var(--green); }
.nav-link.is-current .nav-label { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.nav-new .nav-icon {
  display: grid; place-items: center; width: 40px; height: 32px;
  background: var(--green); color: #fff; border-radius: 8px;
}
.nav-new, .nav-new.is-current { color: var(--green-dark); }

.page {
  max-width: 1120px; margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}
.is-app .page { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px); }

@media (min-width: 860px) {
  .topbar { gap: 20px; padding-top: 0; padding-bottom: 0; }
  .brand { margin-right: 12px; }
  .mainnav {
    position: static; height: auto; padding: 0; flex: 1; justify-content: flex-start; gap: 2px;
    background: transparent; border: 0; align-self: stretch;
  }
  .nav-link {
    flex: none; flex-direction: row; gap: 7px; padding: 0 13px; min-height: 56px;
    color: #fff; font-size: 0.95rem; opacity: 0.88; border-bottom: 4px solid transparent; border-top: 4px solid transparent;
  }
  .nav-link:hover { color: #fff; opacity: 1; background: var(--green-dark); }
  .nav-link.is-current { color: #fff; opacity: 1; border-bottom-color: #fff; }
  .nav-link.is-current .nav-label { text-decoration: none; }
  .nav-link .icon { width: 19px; height: 19px; }
  .nav-new .nav-icon { width: auto; height: auto; background: transparent; display: inline; }
  .nav-new, .nav-new.is-current { color: #fff; }
  .is-app .page { padding: 28px 24px 56px; }
}

/* ---------- headings and messages ---------- */

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.page-head .badge { margin-top: 4px; }
.crumb { font-size: 0.88rem; color: var(--muted); margin-bottom: 4px; }

.alert { padding: 12px 14px; border-radius: 8px; border: 1.5px solid; margin-bottom: 14px; font-weight: 550; }
.alert-success { background: var(--green-tint); border-color: var(--green); color: var(--green-dark); }
.alert-warning { background: var(--amber-tint); border-color: #b9820a; color: #5c4000; }
.alert-error { background: var(--red-tint); border-color: var(--red); color: #7d1a14; }

.hint { font-size: 0.86rem; color: var(--muted); margin-top: 6px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 10px 2px; border-radius: 999px; font-size: 0.84rem; font-weight: 700; border: 1.5px solid;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge-active { background: var(--green-tint); color: var(--green-dark); border-color: var(--green); }
.badge-removed { background: var(--slate-tint); color: #414c47; border-color: var(--slate); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 8px 16px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: 8px;
  font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn .icon { width: 19px; height: 19px; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-small { min-height: 38px; padding: 5px 12px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: 0.6; cursor: progress; }

/* ---------- cards and forms ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card > h2 { margin-bottom: 12px; }
.card > legend, fieldset.card > legend {
  float: left; width: 100%; font-size: 1.1rem; font-weight: 700; margin-bottom: 12px;
}
fieldset.card > legend + * { clear: both; }
.optional { font-size: 0.82rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.count { font-weight: 500; color: var(--muted); margin-left: 4px; }

.form { max-width: 720px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label { display: block; font-weight: 650; margin-bottom: 5px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"],
.field input[type="date"], .field input[type="search"], .field select, .field textarea, .search input, .perpage select {
  width: 100%; min-height: 48px; padding: 10px 12px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 8px;
  font-size: 1rem; -webkit-appearance: none; appearance: none;
}
.field select, .perpage select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2317211d' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input[readonly] { background: var(--bg); color: var(--muted); border-style: dashed; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--red); border-width: 2px; background: #fffafa; }
.field-error { color: var(--red); font-weight: 600; font-size: 0.9rem; margin-top: 5px; }
.field-row { display: grid; gap: 0 12px; }
/* Fields that sit side by side keep their inputs on one line even when one label
   wraps to two lines or one field shows an error underneath. */
.field-row > .field { margin-bottom: 14px; display: flex; flex-direction: column; }
.field-row > .field > label { flex: 1 0 auto; display: flex; align-items: flex-end; }
@supports (grid-template-rows: subgrid) {
  .field-row > .field { display: grid; grid-template-rows: subgrid; grid-row: span 3; align-content: start; }
  .field-row > .field > label { display: block; align-self: end; }
}
.field-row-csz { grid-template-columns: 1fr 1fr; }
.field-row-csz .field:first-child { grid-column: 1 / -1; }
.field-row-2 { grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) {
  .field-row-csz { grid-template-columns: 1fr 96px 150px; }
  .field-row-csz .field:first-child { grid-column: auto; }
}

.radio-row { display: grid; gap: 8px; }
@media (min-width: 560px) { .radio-row { grid-template-columns: 1fr 1fr; } }
.radio, .check {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; min-height: var(--tap);
  border: 1.5px solid var(--line-strong); border-radius: 8px; cursor: pointer; font-weight: 650;
}
.radio input, .check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); flex: none; }
.radio small, .check small { display: block; font-weight: 400; color: var(--muted); font-size: 0.86rem; }
.radio:has(input:checked) { border-color: var(--green); background: var(--green-tint); }
.radio:has(input:disabled), .check:has(input:disabled) { opacity: 0.65; cursor: default; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.card .form-actions { margin-top: 18px; }
.form-actions .btn-primary { flex: 1; }
@media (min-width: 560px) { .form-actions .btn-primary { flex: none; min-width: 180px; } }

/* ---------- dashboard ---------- */

.tally { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tally-cell {
  display: flex; flex-direction: column; padding: 14px clamp(11px, 3.6vw, 16px) 12px; border-radius: var(--radius);
  text-decoration: none; min-width: 0;
}
.tally-num { font-size: clamp(2.6rem, 13vw, 4.4rem); line-height: 0.95; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tally-label { font-size: clamp(0.86rem, 4vw, 1.05rem); font-weight: 700; margin-top: 6px; white-space: nowrap; }
.tally-sub { font-size: 0.86rem; opacity: 0.9; }
/* the active count is set like a guide sign: green field, white legend, inset white border */
.tally-active { background: var(--green); color: #fff; box-shadow: inset 0 0 0 3px var(--green), inset 0 0 0 5px #fff; }
.tally-active:hover { background: var(--green-dark); color: #fff; box-shadow: inset 0 0 0 3px var(--green-dark), inset 0 0 0 5px #fff; }
.tally-removed { background: var(--surface); color: #3d4843; border: 1.5px solid var(--line-strong); }
.tally-removed:hover { color: var(--ink); border-color: var(--ink); }

.mapcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mapcard-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.map-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 4px 12px 4px 8px;
  border: 1.5px solid var(--line-strong); border-radius: 999px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.chip input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.chip:has(input:checked) { border-color: var(--ink); }
.chip-key { cursor: default; border-style: dashed; padding-left: 12px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ink); }
.dot-active { background: var(--green); }
.dot-removed { background: var(--slate); }
.line-swatch { width: 22px; height: 0; border-top: 3px solid var(--boundary); }
.map-hint { padding: 10px 14px 12px; margin: 0; }

.map { width: 100%; background: #e4e9e5; position: relative; }
.map-dashboard { height: min(64vh, 560px); min-height: 340px; }
.map-form { height: 250px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.map-view { height: 280px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 860px) { .map-dashboard { height: 640px; } .map-form { height: 320px; } }
.map-message {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  color: var(--muted); font-weight: 550; background: #e4e9e5;
}
.map-popup { font: 400 0.92rem/1.4 var(--font); color: var(--ink); max-width: 240px; }
.map-popup strong { display: block; font-size: 1rem; }
.map-popup a { display: inline-block; margin-top: 6px; font-weight: 700; }

/* ---------- posts list ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.segmented { display: inline-flex; border: 1.5px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.segmented a { padding: 0 16px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-weight: 650; }
.segmented a + a { border-left: 1.5px solid var(--line-strong); }
.segmented a.is-current { background: var(--ink); color: #fff; }
.search { display: flex; gap: 6px; flex: 1 1 240px; margin: 0; }
.search input { min-height: 46px; flex: 1; min-width: 0; }
.search .btn { padding: 8px 12px; }

.list-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.list-count { margin-right: auto; }
.perpage { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.92rem; }
.perpage select { width: auto; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font-size: 0.86rem; font-weight: 700; color: var(--muted); padding: 11px 12px; border-bottom: 1.5px solid var(--line-strong); white-space: nowrap; }
.data-table th.num { text-align: right; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr.is-off td { color: var(--muted); }
.cell-address a { font-weight: 700; color: var(--ink); text-decoration: none; }
.cell-address a:hover { text-decoration: underline; }
.cell-address span { display: block; color: var(--muted); font-size: 0.9rem; }
.cell-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.cell-date, .cell-email { white-space: nowrap; }
.cell-actions { white-space: nowrap; text-align: right; }
.cell-actions form { display: inline; }
.cell-actions .btn + .btn, .cell-actions .btn + form, .cell-actions form + .btn { margin-left: 4px; }

/* phones: each row becomes a card */
@media (max-width: 859px) {
  .table-wrap { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table thead { position: absolute; left: -9999px; }
  .data-table tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  }
  .data-table td { padding: 0; border: 0; text-align: left; }
  .data-table td.num { text-align: left; }
  .data-table td[data-label]::before { content: attr(data-label); display: block; font-size: 0.78rem; font-weight: 650; color: var(--muted); margin-bottom: 1px; }
  .data-table .cell-address, .data-table .cell-name, .data-table .cell-email, .data-table .cell-actions { grid-column: 1 / -1; }
  .data-table td.cell-address::before, .data-table td.cell-name::before,
  .data-table td.cell-id::before, .data-table td.cell-status::before { display: none; }
  /* post cards: number and status share the top line, then the address, then the facts */
  .posts-table .cell-id { order: 1; align-self: center; font-weight: 650; }
  .posts-table .cell-status { order: 2; justify-self: end; }
  .posts-table .cell-address { order: 3; margin-top: -4px; }
  .posts-table .cell-date { order: 4; }
  .posts-table .cell-count { order: 5; }
  .posts-table .cell-user { order: 6; }
  .posts-table .cell-photos { order: 7; }
  .posts-table .cell-actions { order: 8; }
  .cell-address a, .cell-name { font-size: 1.08rem; font-weight: 700; }
  .cell-email { white-space: normal; overflow-wrap: anywhere; }
  .data-table td.cell-actions { display: flex; gap: 8px; text-align: left; padding-top: 2px; }
  .cell-actions form { display: contents; }
  .cell-actions .btn { flex: 1; margin: 0 !important; }
}

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.pagination-range { color: var(--muted); font-size: 0.92rem; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pagination a, .pagination span.is-current, .pagination span.is-disabled {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 650;
}
.pagination a:hover { border-color: var(--ink); }
.pagination span.is-current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination span.is-disabled { color: #9aa5a0; border-color: var(--line); background: transparent; }
.pagination .gap { color: var(--muted); padding: 0 2px; }

.empty { background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 36px 20px; text-align: center; }
.empty h2 { font-size: 1.25rem; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 44ch; margin: 0 auto 16px; }

/* ---------- post form ---------- */

.suggest { position: relative; }
.suggest-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden;
  box-shadow: 0 10px 24px rgba(23, 33, 29, 0.22);
}
.suggest-list li[role="option"] {
  display: flex; flex-direction: column; justify-content: center; min-height: 50px; padding: 7px 12px;
  border-bottom: 1px solid var(--line); cursor: pointer; line-height: 1.25;
}
.suggest-list li[role="option"].is-active, .suggest-list li[role="option"]:hover { background: var(--green-tint); }
.suggest-main { font-weight: 650; }
.suggest-sub { font-size: 0.86rem; color: var(--muted); }
.suggest-credit { padding: 5px 12px; font-size: 0.74rem; color: var(--muted); text-align: right; background: var(--bg); }
#street { scroll-margin-top: 110px; }

.btn-locate { margin-bottom: 14px; border-color: var(--green); color: var(--green-dark); }
.formmap { margin-top: 2px; }
.formmap-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.pin-status { font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.pin-status.is-in { color: var(--green-dark); }
.pin-status.is-out { color: #8a5a00; }

.photo-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-file { flex: 1; position: relative; }
.btn-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.btn-file:focus-within { outline: 3px solid var(--amber); outline-offset: 2px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-grid:not(:empty) { margin: 12px 0 0; }
.photo-grid-existing { margin: 0 0 14px !important; }
.photo-grid li { position: relative; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.photo-remove { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 600; padding: 6px 2px; cursor: pointer; }
.photo-remove input { width: 18px; height: 18px; accent-color: var(--red); }
.photo-x {
  position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid #fff; background: var(--ink); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.photo-size { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 2px; }

/* ---------- post view ---------- */

.show-grid { display: grid; gap: 14px; }
.show-grid .card { margin: 0; }
@media (min-width: 860px) {
  .show-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .show-details { grid-column: 1; }
  .show-map { grid-column: 2; grid-row: 1 / span 2; }
  .show-photos { grid-column: 1; }
}
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.details dt { font-size: 0.84rem; font-weight: 650; color: var(--muted); }
.details dd { font-weight: 600; overflow-wrap: anywhere; }
.details dd .muted { display: block; font-weight: 400; font-size: 0.9rem; }
.details .details-wide { grid-column: 1 / -1; }
.details .details-wide dd { font-weight: 400; }
.big-num { font-size: 2.2rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.show-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.show-actions form { margin: 0; display: flex; }
.address-line { margin-bottom: 10px; font-weight: 600; }
.photo-grid-view { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-top: 0 !important; }
.photo-grid-view a { display: block; border-radius: 8px; }

.lightbox { border: 0; padding: 0; background: #0d1210; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; }
.lightbox::backdrop { background: #0d1210; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-close {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 2; min-height: 44px; padding: 8px 16px;
  background: #fff; color: var(--ink); border: 0; border-radius: 8px; font-weight: 700; cursor: pointer;
}

/* ---------- sign-in and notices ---------- */

.is-guest { background: var(--green); }
.is-guest .page { max-width: 420px; padding-top: 8vh; }
.login-sign { color: #fff; text-align: center; margin-bottom: 22px; }
.login-sign svg { margin: 0 auto 10px; }
.login-sign h1 { font-size: 2rem; }
.login-sign p { opacity: 0.9; margin-top: 4px; }
.login-form { background: var(--surface); border-radius: 12px; padding: 20px; box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 5px var(--green); }
.login-form .btn { margin-top: 4px; }
.login-form .hint { text-align: center; margin-top: 12px; }

.notice-page { text-align: center; padding: 8vh 0; }
.is-guest .notice-page { color: #fff; }
.notice-code { font-size: 4rem; font-weight: 800; line-height: 1; color: var(--line-strong); }
.is-guest .notice-code { color: rgba(255, 255, 255, 0.55); }
.notice-page h1 { margin: 8px 0; }
.notice-page p { margin-bottom: 16px; }
.is-guest .notice-page .btn-primary { background: #fff; color: var(--green-dark); border-color: #fff; }
