:root {
  --bg: #f6f7f4;
  --panel: #ffffff;
  --panel-soft: #f0f3ee;
  --text: #17211b;
  --muted: #657169;
  --border: #d9ded7;
  --shadow: 0 18px 55px rgba(23, 33, 27, 0.18);
  --green: #178344;
  --green-bg: #9cffb8;
  --yellow: #d29d22;
  --yellow-bg: #fbf0cf;
  --red: #b6473c;
  --red-bg: #f8dfdc;
  --focus: #266b58;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
}

body.star-wars-mode {
  --bg: #020617;
  --panel: #07111f;
  --panel-soft: #111827;
  --text: #e5f0ff;
  --muted: #9fb0c9;
  --border: rgba(148, 163, 184, 0.34);
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.58);
  --focus: #38bdf8;
  background: #020617;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
}

.access-gate {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #fff;
}

.access-error {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  margin: 0;
  color: #8f2f25;
  font-size: 13px;
  font-weight: 700;
}

.user-button-wrap {
  display: flex;
  flex: 0 0 auto;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 36px;
  border: 1px solid rgba(217, 222, 215, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(23, 33, 27, 0.1);
}

body.star-wars-mode .user-button-wrap {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(7, 17, 31, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

.sidebar {
  display: flex;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

body.star-wars-mode .sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.16), transparent 26%),
    radial-gradient(circle at 90% 18%, rgba(239, 68, 68, 0.12), transparent 24%),
    #07111f;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

.header-copy {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.header-main-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.sidebar-header h1 {
  flex: 0 0 auto;
  white-space: nowrap;
}

.address-count {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.disclaimer-note {
  display: flex;
  min-height: 26px;
  flex: 1 1 auto;
  align-items: center;
  overflow: hidden;
  max-width: none;
  margin: 0;
  padding: 8px;
  border: 1px solid #e8c85d;
  border-radius: 3px;
  background: #fff3a3;
  box-shadow: 0 2px 0 rgba(129, 100, 18, 0.16);
  color: #4c3b0b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
}

body.star-wars-mode .disclaimer-note {
  border-color: rgba(250, 204, 21, 0.72);
  background: #fef08a;
  color: #322500;
}

.mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  background: var(--panel-soft);
}

.mode-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}

.mode-option {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.mode-option.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(23, 33, 27, 0.12);
}

.mode-option:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

body.star-wars-mode .mode-toggle {
  background: rgba(2, 6, 23, 0.66);
}

body.star-wars-mode .mode-option.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(248, 113, 113, 0.13)), #0f172a;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.28), 0 0 16px rgba(56, 189, 248, 0.16);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button:hover,
.icon-button:focus-visible,
.vote-tab:hover,
.filter-dropdown-button:hover,
.filter-option:hover,
.status-dropdown-button:hover,
.status-dropdown-option:hover,
.address-row:hover {
  border-color: #b7c0b7;
  background: #f8faf6;
}

body.star-wars-mode .icon-button:hover,
body.star-wars-mode .icon-button:focus-visible,
body.star-wars-mode .vote-tab:hover,
body.star-wars-mode .filter-dropdown-button:hover,
body.star-wars-mode .filter-option:hover,
body.star-wars-mode .status-dropdown-button:hover,
body.star-wars-mode .status-dropdown-option:hover,
body.star-wars-mode .address-row:hover {
  border-color: rgba(125, 211, 252, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin: 14px 14px 10px;
}

.search-wrap {
  position: relative;
  min-width: 0;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-wrap input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px 0 38px;
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--focus);
  background: var(--panel);
}

.clear-filters-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.clear-filters-button:hover,
.clear-filters-button:focus-visible {
  border-color: var(--focus);
  background: #eef5f0;
  color: var(--text);
  outline: none;
}

body.star-wars-mode .clear-filters-button:hover,
body.star-wars-mode .clear-filters-button:focus-visible {
  background: rgba(15, 23, 42, 0.92);
}

.vote-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 0 14px 8px;
}

.vote-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.vote-tab span[data-count-vote] {
  color: var(--muted);
}

.vote-tab.active {
  border-color: var(--focus);
  background: #e6eee9;
}

body.star-wars-mode .vote-tab.active {
  background: rgba(14, 116, 144, 0.26);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.18);
}

.vote-tab-symbol {
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
}

.filter-dropdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--border);
}

.filter-dropdown {
  position: relative;
  min-width: 0;
}

.filter-dropdown.is-open {
  z-index: 580;
}

.filter-dropdown-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.filter-dropdown-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-dropdown-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.filter-dropdown-menu {
  position: absolute;
  z-index: 520;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(23, 33, 27, 0.18);
  padding: 6px;
}

.filter-menu-close {
  display: none;
}

.filter-option {
  display: grid;
  grid-template-columns: 16px auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.filter-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--focus);
}

.filter-option-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-option-count {
  color: var(--muted);
}

.storage-status {
  position: fixed;
  z-index: 2300;
  top: 14px;
  left: 50%;
  width: min(420px, calc(100vw - 28px));
  margin: 0;
  border: 1px solid #d7ded8;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f5f8f5;
  box-shadow: 0 14px 42px rgba(23, 33, 27, 0.18);
  color: #3d493f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  transform: translateX(-50%);
}

.storage-status[data-tone="error"] {
  border-color: #e7bbb5;
  background: #fff0ee;
  color: #8f2f25;
}

.storage-status[data-tone="loading"] {
  border-color: #d8d1b8;
  background: #fff9e8;
  color: #6f5715;
}

.storage-status[data-tone="ready"] {
  border-color: #b8ddc3;
  background: #effbf2;
  color: #22673b;
}

.storage-status[data-emphasis="admin"] {
  z-index: 2600;
  top: 50%;
  width: min(720px, calc(100vw - 32px));
  border-width: 2px;
  border-radius: 14px;
  padding: 28px 56px 28px 30px;
  box-shadow: 0 28px 90px rgba(23, 33, 27, 0.34);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  transform: translate(-50%, -50%);
}

.storage-status-message {
  display: block;
}

.storage-status-close {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.storage-status-close:hover,
.storage-status-close:focus-visible {
  background: rgba(143, 47, 37, 0.1);
  outline: none;
}

body.star-wars-mode .storage-status[data-emphasis="admin"] {
  border-color: rgba(248, 113, 113, 0.74);
  background: #1f0b12;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.7), 0 0 36px rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

body.star-wars-mode .storage-status-close:hover,
body.star-wars-mode .storage-status-close:focus-visible {
  background: rgba(254, 202, 202, 0.1);
}

.address-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.address-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 60px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.address-row.active {
  border-color: var(--focus);
  background: #eef5f0;
}

body.star-wars-mode .address-row.active {
  background: rgba(14, 116, 144, 0.24);
}

.address-main {
  min-width: 0;
}

.address-main strong,
.address-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-main strong {
  font-size: 13px;
  line-height: 1.25;
}

.address-main span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.status-symbol {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.status-symbol-green {
  color: var(--green);
}

.status-symbol-light-green {
  color: #93e88d;
}

.status-symbol-yellow {
  color: var(--yellow);
}

.status-symbol-grey {
  color: #77807a;
}

.status-symbol-red {
  color: var(--red);
}

.status-symbol-star-wars {
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.status-symbol-image {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.map-region {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #fff;
}

#map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(rgba(230, 235, 232, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 235, 232, 0.42) 1px, transparent 1px),
    #fff;
  background-size: 42px 42px;
  cursor: grab;
  outline: none;
  overscroll-behavior: contain;
  touch-action: none;
  user-select: none;
}

body.star-wars-mode #map {
  background:
    linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
    url("./assets/star-wars-background.jpg") center / cover no-repeat,
    #020617;
}

#map.is-grabbing {
  cursor: grabbing;
}

.parcel-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  touch-action: none;
}

body.star-wars-mode .parcel-svg {
  background: transparent;
}

.parcel-shape {
  fill: #e5e9e4;
  fill-opacity: 0.78;
  stroke: rgba(67, 82, 70, 0.82);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill-opacity 140ms ease, stroke-width 140ms ease, opacity 140ms ease;
}

body.star-wars-mode .parcel-shape {
  fill-opacity: 0.94;
  stroke: rgba(255, 255, 255, 0.9);
}

.parcel-shape:hover,
.parcel-shape:focus-visible {
  fill-opacity: 0.92;
  stroke: var(--focus);
  stroke-width: 2;
  outline: none;
}

.parcel-shape.selected {
  fill-opacity: 0.96;
  stroke: #0077ff;
  stroke-width: 5;
}

body.star-wars-mode .parcel-shape:hover,
body.star-wars-mode .parcel-shape:focus-visible {
  stroke: #67e8f9;
}

body.star-wars-mode .parcel-shape.selected {
  stroke: #38bdf8;
}

.parcel-marker {
  cursor: pointer;
  outline: none;
  transition: opacity 140ms ease;
}

.marker-symbol {
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(23, 33, 27, 0.38));
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  stroke: #fff;
  stroke-width: 0.55;
  paint-order: stroke;
}

.marker-symbol-dot {
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(23, 33, 27, 0.38));
  stroke: #fff;
  stroke-width: 1.35;
}

.parcel-shape.status-next-president,
.parcel-shape.status-council,
.parcel-shape.status-proxy-volunteer,
.parcel-shape.status-verified-freedom-voter {
  fill: var(--green-bg);
}

.parcel-shape.status-likely-freedom-voter,
.parcel-shape.status-undecided-neutral {
  fill: #f7e6ac;
}

.parcel-shape.status-unknown-status,
.parcel-shape.status-requested-privacy {
  fill: #e2e6e1;
}

.parcel-shape.status-possible-opp-spy {
  fill: #efc1bb;
}

.parcel-shape.status-opp-voter,
.parcel-shape.status-opp-leader {
  fill: #e49a91;
}

body.star-wars-mode .parcel-shape.status-next-president,
body.star-wars-mode .parcel-shape.status-council,
body.star-wars-mode .parcel-shape.status-proxy-volunteer,
body.star-wars-mode .parcel-shape.status-verified-freedom-voter {
  fill: #16a34a;
}

body.star-wars-mode .parcel-shape.status-likely-freedom-voter {
  fill: #86efac;
}

body.star-wars-mode .parcel-shape.status-unknown-status,
body.star-wars-mode .parcel-shape.status-requested-privacy {
  fill: #050505;
}

body.star-wars-mode .parcel-shape.status-possible-opp-spy,
body.star-wars-mode .parcel-shape.status-opp-voter,
body.star-wars-mode .parcel-shape.status-opp-leader {
  fill: #b91c1c;
}

.parcel-marker.status-next-president,
.parcel-marker.status-council,
.parcel-marker.status-proxy-volunteer,
.parcel-marker.status-verified-freedom-voter {
  color: var(--green);
}

.parcel-marker.status-likely-freedom-voter {
  color: #93e88d;
}

.parcel-marker.status-undecided-neutral {
  color: var(--yellow);
}

.parcel-marker.status-unknown-status,
.parcel-marker.status-requested-privacy {
  color: #747d77;
}

.parcel-marker.status-possible-opp-spy,
.parcel-marker.status-opp-voter,
.parcel-marker.status-opp-leader {
  color: var(--red);
}

.marker-symbol-image {
  filter: drop-shadow(0 1px 2px rgba(23, 33, 27, 0.38));
  pointer-events: none;
}

.street-label-path {
  fill: none;
  stroke: none;
}

.street-label {
  alignment-baseline: central;
  dominant-baseline: central;
  fill: #111;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  pointer-events: none;
  stroke: none;
  text-transform: uppercase;
}

body.star-wars-mode .street-label {
  fill: #f8fafc;
  stroke: rgba(2, 6, 23, 0.96);
  stroke-width: 3px;
  paint-order: stroke;
}

.hidden-map-item {
  display: none;
  pointer-events: none;
}

.zoom-controls {
  position: absolute;
  z-index: 460;
  top: 68px;
  right: 14px;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(217, 222, 215, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(23, 33, 27, 0.12);
}

body.star-wars-mode .zoom-controls {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(7, 17, 31, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.zoom-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.zoom-button:last-child {
  border-bottom: 0;
}

.zoom-button:hover,
.zoom-button:focus-visible {
  background: #eef5f0;
  outline: none;
}

body.star-wars-mode .zoom-button:hover,
body.star-wars-mode .zoom-button:focus-visible {
  background: rgba(14, 116, 144, 0.28);
}

.reset-zoom-button {
  position: absolute;
  z-index: 460;
  right: 70px;
  top: 68px;
  min-width: 74px;
  min-height: 48px;
  border: 1px solid rgba(217, 222, 215, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(23, 33, 27, 0.12);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

body.star-wars-mode .reset-zoom-button {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(7, 17, 31, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
}

.reset-zoom-button:hover,
.reset-zoom-button:focus-visible {
  background: #eef5f0;
  outline: none;
}

body.star-wars-mode .reset-zoom-button:hover,
body.star-wars-mode .reset-zoom-button:focus-visible {
  background: rgba(14, 116, 144, 0.28);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(23, 33, 27, 0.28);
}

.modal {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: calc(50% + 160px);
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-right: 56px;
  margin-bottom: 18px;
}

.modal-title-copy {
  min-width: 0;
}

.modal-status-hero {
  --modal-status-hero-image-size: 76px;
  display: grid;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  place-items: center;
  margin-top: 2px;
  overflow: hidden;
  padding: 10px;
}

.modal-status-hero-green {
  color: var(--green);
}

.modal-status-hero-light-green {
  color: #93e88d;
}

.modal-status-hero-yellow {
  color: var(--yellow);
}

.modal-status-hero-grey {
  color: #747d77;
}

.modal-status-hero-red {
  color: var(--red);
}

.modal-status-hero-image {
  display: block;
  width: var(--modal-status-hero-image-size);
  height: var(--modal-status-hero-image-size);
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.modal-status-hero-dot {
  display: block;
  width: 46px;
  height: 46px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 3px 8px rgba(23, 33, 27, 0.28);
}

.modal-status-hero-emoji {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  font-size: 46px;
  line-height: 1;
}

.modal-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.modal h2 {
  margin: 6px 0 0;
  font-size: 25px;
  line-height: 1.14;
  letter-spacing: 0;
}

.property-details {
  display: grid;
  gap: 14px;
  margin: 0 0 22px;
}

.property-details div {
  min-width: 0;
}

.property-details dt,
.status-editor legend {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.property-details dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.property-details a {
  color: var(--focus);
  font-weight: 700;
  text-decoration: none;
}

.property-details a:hover {
  text-decoration: underline;
}

.edit-log-section {
  display: grid;
  gap: 8px;
  margin: -2px 0 22px;
}

.edit-log-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.edit-log-toggle {
  justify-self: start;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.edit-log-toggle:hover,
.edit-log-toggle:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.edit-log-panel {
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px;
  background: var(--panel-soft);
}

.edit-log-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.edit-log-list li,
.edit-log-empty {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.edit-log-emphasis {
  font-style: italic;
  font-weight: 800;
}

.status-editor {
  margin: 0;
  border: 0;
  padding: 0;
}

.status-dropdown {
  position: relative;
}

.status-dropdown-button {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: #f4f8fb;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

body.star-wars-mode .status-dropdown-button {
  background: rgba(15, 23, 42, 0.9);
}

.status-dropdown-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.status-dropdown-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

#statusDropdownValue,
.status-dropdown-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.dropdown-caret {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.status-dropdown-menu {
  position: static;
  z-index: 1100;
  display: grid;
  max-height: min(360px, 42vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-top: 8px;
  padding: 6px;
}

.status-dropdown-option {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.status-dropdown-option.active {
  background: #e9f2fb;
}

body.star-wars-mode .status-dropdown-option.active {
  background: rgba(14, 116, 144, 0.3);
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(420px, 1fr);
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-header {
    gap: 10px;
    padding: 12px 12px 8px;
  }

  .header-copy {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 6px;
  }

  .header-main-row {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .sidebar-header h1 {
    flex: 0 0 auto;
    font-size: 20px;
  }

  .address-count {
    margin: 0;
    text-align: right;
    white-space: nowrap;
  }

  .disclaimer-note {
    max-width: none;
    height: auto;
    margin: 0;
    min-height: 0;
    padding: 8px;
    font-size: 11px;
  }

  .mode-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
  }

  .mode-toggle {
    margin-top: 0;
  }

  .mode-option {
    min-height: 28px;
  }

  .user-button-wrap {
    position: static;
    z-index: auto;
    align-self: stretch;
    min-width: 42px;
    min-height: 36px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(23, 33, 27, 0.1);
  }

  .search-row {
    margin: 8px 10px 6px;
  }

  .search-wrap input {
    height: 38px;
  }

  .clear-filters-button {
    min-height: 38px;
  }

  .vote-tabs {
    gap: 5px;
    padding: 0 10px 6px;
  }

  .vote-tab {
    min-height: 32px;
    gap: 4px;
    padding: 0 5px;
    font-size: 10px;
  }

  .clear-filters-button {
    padding: 0 10px;
  }

  .filter-dropdown-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 10px 8px;
  }

  .filter-dropdown-button {
    min-height: 36px;
    padding: 0 9px;
  }

  .filter-dropdown.is-open {
    z-index: 2100;
  }

  .filter-dropdown-menu {
    position: fixed;
    z-index: 2100;
    inset: 12px;
    display: block;
    max-height: none;
    overflow: auto;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 18px 70px rgba(23, 33, 27, 0.32);
  }

  .filter-menu-close {
    position: sticky;
    top: 0;
    z-index: 1;
    display: block;
    width: 100%;
    min-height: 44px;
    margin-bottom: 8px;
    border: 1px solid var(--focus);
    border-radius: 8px;
    background: var(--focus);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
  }

  .filter-option {
    min-height: 42px;
    font-size: 13px;
  }

  .filter-option-text {
    white-space: normal;
  }

  .address-list {
    display: none;
  }

  .app-shell.mobile-search-active .address-list {
    position: fixed;
    z-index: 1500;
    inset: 112px 0 0;
    display: block;
    overflow: auto;
    border-top: 1px solid var(--border);
    background: var(--panel);
    padding: 10px 14px 24px;
    box-shadow: 0 -12px 36px rgba(23, 33, 27, 0.12);
  }

  .app-shell.mobile-search-active .address-row {
    min-height: 64px;
  }

  .map-region {
    min-height: 560px;
  }

  body.star-wars-mode #map {
    background: #020617;
  }

  body.star-wars-mode #map::before {
    position: absolute;
    inset: -12px;
    z-index: 0;
    content: "";
    background:
      linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
      url("./assets/star-wars-background.jpg") center / cover no-repeat,
      #020617;
    filter: blur(3px);
    pointer-events: none;
    transform: scale(1.03);
  }

  .reset-zoom-button {
    display: none !important;
  }

  .modal {
    left: 50%;
    padding: 20px;
  }

  .modal-heading {
    gap: 10px;
    margin-right: 48px;
  }

  .modal-status-hero {
    --modal-status-hero-image-size: 54px;
    width: 70px;
    height: 70px;
    flex-basis: 70px;
    padding: 8px;
  }

  .modal-status-hero-dot {
    width: 34px;
    height: 34px;
  }

  .modal-status-hero-emoji {
    font-size: 36px;
  }

}
