: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;
  --map-control-height: 40px;
  --select-caret-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23657169' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.plus-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: currentColor;
  line-height: 0;
}

.plus-icon::before,
.plus-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.plus-icon::before {
  width: 12px;
  height: 1.5px;
}

.plus-icon::after {
  width: 1.5px;
  height: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

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

html.modal-scroll-locked,
body.modal-scroll-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

body.modal-scroll-locked {
  touch-action: none;
}

body.modal-scroll-locked .modal,
body.modal-scroll-locked .log-modal,
body.modal-scroll-locked .townsq-modal,
body.modal-scroll-locked .townsq-thread-modal,
body.modal-scroll-locked .address-picker-modal,
body.modal-scroll-locked .property-action-modal,
body.modal-scroll-locked .admin-modal {
  touch-action: pan-y;
}

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;
}

.goose-chat-launcher {
  position: fixed;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 820;
  display: flex;
  width: 112px;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
}

.goose-chat-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(23, 33, 27, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.goose-chat-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--focus);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.goose-chat-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow:
    0 1px 0 var(--panel),
    0 0 5px var(--panel);
}

.goose-chat-launcher:hover .goose-chat-icon,
.goose-chat-launcher:focus-visible .goose-chat-icon {
  border-color: var(--focus);
  box-shadow: 0 10px 26px rgba(23, 33, 27, 0.25);
  transform: translateY(-2px);
}

.goose-chat-launcher:focus-visible {
  border-radius: 8px;
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

body.star-wars-mode .goose-chat-icon {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.58);
}

.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;
}

.invite-card {
  width: min(100%, 460px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 34px;
  background: #fff;
  box-shadow: 0 18px 56px rgba(23, 33, 27, 0.12);
}

.invite-card h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.05;
}

.invite-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.invite-form {
  display: grid;
  gap: 14px;
}

.invite-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invite-field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.invite-field input[readonly] {
  background: var(--panel-soft);
  color: var(--muted);
}

.invite-submit-button {
  width: 100%;
  border: 1px solid rgba(12, 82, 58, 0.32);
  border-radius: 8px;
  margin-top: 4px;
  padding: 15px 18px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
}

.invite-submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.invite-error {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
}

.user-button-wrap {
  display: flex;
  flex: 0 0 auto;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  gap: 10px;
  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);
}

.admin-panel-button {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-left: 0;
  padding: 0 8px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
  font-weight: 500;
}

.admin-panel-button:hover,
.admin-panel-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

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);
}

.map-sidebar-panel {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

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;
}

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

.view-toggle {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 1 1 auto;
  padding: 2px;
}

.mode-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.view-option {
  min-height: 22px;
}

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

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

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

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

body.star-wars-mode .view-option.active,
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,
.view-option:hover,
.view-option: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 .view-option:hover,
body.star-wars-mode .view-option: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: var(--map-control-height);
  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: var(--map-control-height);
  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);
}

.mobile-search-close {
  display: none;
}

.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: var(--map-control-height);
  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: repeat(3, 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: var(--map-control-height);
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  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: auto;
  display: grid;
  width: max-content;
  min-width: 100%;
  max-width: min(440px, calc(100vw - 40px));
  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: 7px 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.filter-option-plain {
  grid-template-columns: 16px minmax(0, 1fr) auto;
}

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

.filter-option-text {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.filter-option-count {
  align-self: center;
  color: var(--muted);
  justify-self: end;
  white-space: nowrap;
}

.task-sidebar-panel {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  border-bottom: 1px solid var(--border);
  padding: 14px;
}

.task-mobile-assignee-row {
  display: none;
}

.task-mobile-choice {
  display: none;
}

.task-search-row {
  display: block;
}

.task-filter-group {
  display: grid;
  gap: 7px;
}

.task-filter-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.task-page-add-button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.task-page-add-button:hover,
.task-page-add-button:focus-visible {
  border-color: var(--focus);
  background: #eef5f0;
  outline: none;
}

body.star-wars-mode .task-page-add-button:hover,
body.star-wars-mode .task-page-add-button:focus-visible {
  background: rgba(14, 116, 144, 0.24);
}

.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-closeable="true"] {
  min-height: 52px;
  padding-right: 54px;
}

.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[data-emphasis="mode"] {
  z-index: 2600;
  top: 50%;
  width: min(680px, calc(100vw - 32px));
  border-width: 2px;
  border-radius: 16px;
  padding: 24px 56px 24px 28px;
  background: #0b1020;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42), 0 0 42px rgba(14, 165, 233, 0.22);
  color: #e8f2ff;
  font-size: 24px;
  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[data-emphasis="mode"] {
  border-color: rgba(125, 211, 252, 0.72);
  background: rgba(3, 7, 18, 0.96);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.72), 0 0 46px rgba(56, 189, 248, 0.24);
  color: #f8fbff;
}

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-question-dot {
  border-radius: 999px;
  background: #93e88d;
  color: #090f0b;
  font-size: 12px;
  font-weight: 950;
}

.status-symbol-grey.status-symbol-question-dot {
  background: #77807a;
  color: #fff;
}

.status-symbol-yellow.status-symbol-question-dot {
  background: var(--yellow);
  color: #090f0b;
}

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

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

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

.status-symbol-red.status-symbol-question-dot {
  background: var(--red);
  color: #fff;
}

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

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

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

.map-region,
.tasks-view,
.list-view {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.tasks-view {
  overflow: auto;
  padding: 24px;
  background: #fff;
}

body.star-wars-mode .content-region,
body.star-wars-mode .tasks-view,
body.star-wars-mode .list-view {
  background: #020617;
}

.app-shell[data-current-view="list"] .address-list {
  display: none;
}

.list-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--panel);
}

.list-toolbar {
  z-index: 12;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  background: var(--panel);
}

.list-toolbar-copy {
  min-width: 0;
}

.list-toolbar-copy h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.list-toolbar-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.list-toolbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.list-export-csv,
.list-reset-columns {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--panel-soft);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.list-export-csv,
.list-reset-columns {
  cursor: pointer;
  white-space: nowrap;
}

.list-export-csv[hidden] {
  display: none;
}

.list-export-csv svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.list-table-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: var(--panel);
}

.list-table {
  width: max-content;
  min-width: 100%;
  font-size: 12px;
}

.list-grid-row {
  display: grid;
  grid-template-columns: var(--list-grid-template);
  width: max-content;
  min-width: 100%;
}

.list-cell {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.list-header-row {
  position: sticky;
  z-index: 6;
  top: 0;
}

.list-header-cell {
  z-index: 6;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 38px;
  align-items: center;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.list-data-row {
  min-height: 42px;
  outline: none;
}

.list-data-row:hover .list-data-cell,
.list-data-row:focus-visible .list-data-cell {
  background: #f7faf7;
}

body.star-wars-mode .list-data-row:hover .list-data-cell,
body.star-wars-mode .list-data-row:focus-visible .list-data-cell {
  background: #0c1828;
}

.list-data-cell {
  display: flex;
  min-height: 42px;
  align-items: center;
  overflow: hidden;
  padding: 5px 8px;
}

.list-cell-frozen {
  position: sticky;
  z-index: 4;
  left: var(--list-sticky-left);
}

.list-header-cell.list-cell-frozen {
  z-index: 8;
  background: var(--panel-soft);
}

.list-cell-frozen-edge {
  box-shadow: 7px 0 12px -10px rgba(23, 33, 27, 0.7);
}

.list-column-drag-handle,
.list-sort-button {
  display: flex;
  min-width: 0;
  min-height: 100%;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.list-column-drag-handle {
  justify-content: center;
  padding: 0 3px;
  cursor: grab;
  opacity: 0.42;
  touch-action: none;
}

.list-column-drag-handle:hover,
.list-column-drag-handle:focus-visible {
  opacity: 1;
  outline: none;
}

.list-column-drag-handle svg {
  width: 12px;
  height: 16px;
  fill: currentColor;
}

.list-sort-button {
  justify-content: space-between;
  gap: 6px;
  overflow: hidden;
  padding: 0 9px 0 2px;
  text-align: left;
}

.list-sort-button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-sort-indicator {
  flex: 0 0 auto;
  color: var(--focus);
  font-size: 13px;
}

.list-column-resizer {
  position: absolute;
  z-index: 3;
  top: 0;
  right: -4px;
  bottom: 0;
  width: 8px;
  cursor: col-resize;
  touch-action: none;
}

.list-column-resizer::after {
  position: absolute;
  top: 8px;
  right: 3px;
  bottom: 8px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  content: "";
}

.list-column-resizer:hover::after,
.list-column-resizer:focus-visible::after,
body.list-column-resizing .list-column-resizer::after {
  background: var(--focus);
}

body.list-column-resizing,
body.list-column-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.list-column-drag-source {
  opacity: 0.38;
}

.list-column-drag-ghost {
  position: fixed;
  z-index: 5000;
  top: 0;
  left: 0;
  min-width: 120px;
  border: 1px solid var(--focus);
  border-radius: 6px;
  padding: 8px 11px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  pointer-events: none;
  will-change: transform;
}

.list-drop-before::before,
.list-drop-after::after {
  position: absolute;
  z-index: 10;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--focus);
  content: "";
}

.list-drop-before::before {
  left: -2px;
}

.list-drop-after::after {
  right: -2px;
}

.list-cell-link,
.list-cell-control,
.list-count-button,
.list-county-link {
  min-width: 0;
  border: 0;
  color: var(--text);
  font: inherit;
}

.list-cell-link {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-address-link {
  color: var(--focus);
  font-weight: 800;
}

.list-cell-link:hover {
  text-decoration: underline;
}

.list-cell-control {
  display: flex;
  width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 7px;
  background: var(--panel-soft);
  cursor: pointer;
  text-align: left;
}

.list-cell-control:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.list-cell-control-label,
.list-cell-plain {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-status-control {
  justify-content: center;
  padding-inline: 4px;
  font-weight: 750;
}

.list-status-green,
.list-status-light-green {
  background: #e2f7e8;
}

.list-status-yellow {
  background: var(--yellow-bg);
}

.list-status-grey {
  background: #edf0ed;
}

.list-status-red {
  background: var(--red-bg);
}

body.star-wars-mode .list-status-green,
body.star-wars-mode .list-status-light-green {
  background: rgba(22, 163, 74, 0.24);
}

body.star-wars-mode .list-status-yellow {
  background: rgba(202, 138, 4, 0.25);
}

body.star-wars-mode .list-status-grey {
  background: #020617;
}

body.star-wars-mode .list-status-red {
  background: rgba(220, 38, 38, 0.28);
}

.list-cell-caret {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
}

.list-facebook-logo {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.list-facebook-state-marker {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.list-facebook-state-verified {
  background: #16834c;
}

.list-facebook-state-possible {
  background: #d59a16;
  color: #171d19;
}

.list-facebook-state-none {
  background: #c5433c;
}

.list-person-icon {
  display: inline-grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--focus);
}

.list-person-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.list-count-button {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-soft);
  cursor: pointer;
  font-weight: 850;
}

.list-count-button:hover,
.list-count-button:focus-visible,
.list-cell-control:hover,
.list-cell-control:focus-visible,
.list-reset-columns:hover,
.list-reset-columns:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.list-last-updated {
  color: var(--muted);
  font-size: 11px;
}

.list-county-link {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 9px;
  background: var(--panel-soft);
  color: var(--focus);
  font-weight: 800;
  text-decoration: none;
}

.list-county-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.list-cell-menu {
  position: fixed;
  z-index: 880;
  display: grid;
  width: max-content;
  min-width: 210px;
  max-width: min(390px, calc(100vw - 20px));
  max-height: min(410px, calc(100vh - 20px));
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(23, 33, 27, 0.24);
}

.list-cell-menu-option {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  padding: 7px 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
}

.list-cell-menu-option:hover,
.list-cell-menu-option:focus-visible,
.list-cell-menu-option.active {
  background: #e9f2fb;
  outline: none;
}

body.star-wars-mode .list-cell-menu-option:hover,
body.star-wars-mode .list-cell-menu-option:focus-visible,
body.star-wars-mode .list-cell-menu-option.active {
  background: rgba(14, 116, 144, 0.3);
}

.list-facebook-menu-status {
  margin: 0 0 4px;
  border-bottom: 1px solid var(--border);
  padding: 6px 8px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.list-facebook-add-option {
  gap: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  color: var(--focus);
}

#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: rgb(67, 82, 70);
  stroke-opacity: 0.28;
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill-opacity 140ms ease, stroke-opacity 140ms ease, stroke-width 140ms ease, opacity 140ms ease;
}

body.star-wars-mode .parcel-shape {
  fill-opacity: 0.94;
  stroke: #fff;
}

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

.parcel-shape.selected {
  fill-opacity: 0.96;
  stroke: #0077ff;
  stroke-opacity: 1;
  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;
}

.marker-symbol-question {
  fill: #090f0b;
  font-size: 13px;
  font-weight: 950;
  pointer-events: none;
}

.parcel-marker.status-unknown-status .marker-symbol-question {
  fill: #fff;
}

.parcel-marker.status-possible-opp-spy .marker-symbol-question,
.marker-symbol-question-dot-red .marker-symbol-question {
  fill: #fff;
}

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

.parcel-shape.status-undecided-neutral {
  fill: #f7e6ac;
}

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

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

.parcel-shape.status-requested-privacy,
.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 {
  fill: #050505;
}

body.star-wars-mode .parcel-shape.status-possible-opp-spy,
body.star-wars-mode .parcel-shape.status-requested-privacy {
  fill: #fca5a5;
}

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

.parcel-shape.filtered-out-map-item {
  fill: #fff;
  fill-opacity: 1;
}

body.star-wars-mode .parcel-shape.filtered-out-map-item {
  fill: #050505;
  fill-opacity: 1;
}

.parcel-shape.access-restricted-map-item {
  fill: #fff;
  fill-opacity: 1;
  cursor: default;
}

body.star-wars-mode .parcel-shape.access-restricted-map-item {
  fill: #050505;
  fill-opacity: 1;
}

.parcel-shape.access-restricted-map-item:hover,
.parcel-shape.access-restricted-map-item:focus-visible {
  stroke: rgb(67, 82, 70);
  stroke-opacity: 0.28;
  stroke-width: 0.7;
}

body.star-wars-mode .parcel-shape.access-restricted-map-item:hover,
body.star-wars-mode .parcel-shape.access-restricted-map-item:focus-visible {
  stroke: #fff;
  stroke-opacity: 0.28;
  stroke-width: 0.7;
}

.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;
  line-height: 0;
}

.zoom-button .plus-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.zoom-button .plus-icon::before {
  width: 14px;
}

.zoom-button .plus-icon::after {
  height: 14px;
}

.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);
}

.property-context-menu {
  position: fixed;
  z-index: 2500;
  display: grid;
  width: min(210px, calc(100vw - 16px));
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(23, 33, 27, 0.24);
}

.property-context-menu.has-submenu {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.property-context-menu.has-submenu.submenu-left {
  border-top-right-radius: 9px;
  border-bottom-right-radius: 9px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.property-context-menu p {
  margin: 0 0 3px;
  overflow: hidden;
  padding: 4px 7px 7px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-context-actions {
  display: grid;
  gap: 4px;
}

.property-context-menu button {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.property-context-menu button > span:first-child,
.property-context-choice {
  min-width: 0;
}

.property-context-menu button:hover,
.property-context-menu button:focus-visible,
.property-context-menu button.active {
  background: #e9f2fb;
  outline: none;
}

body.star-wars-mode .property-context-menu button:hover,
body.star-wars-mode .property-context-menu button:focus-visible,
body.star-wars-mode .property-context-menu button.active {
  background: rgba(14, 116, 144, 0.3);
}

.property-context-submenu {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  width: min(370px, calc(100vw - 40px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(23, 33, 27, 0.24);
}

.property-context-menu.submenu-left .property-context-submenu {
  right: calc(100% + 8px);
  left: auto;
}

.property-context-panel {
  display: grid;
  gap: 8px;
}

.property-context-panel-title {
  display: block;
  padding: 3px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.property-context-choice-list {
  display: grid;
  gap: 3px;
}

.property-context-choice {
  min-height: 34px;
  justify-content: flex-start;
  overflow-wrap: anywhere;
  white-space: normal;
}

.property-context-choice.active::after {
  content: "✓";
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--focus);
  font-weight: 950;
}

.property-context-task-panel {
  width: min(370px, calc(100vw - 40px));
}

.property-context-task-panel .task-template-panel,
.property-context-task-panel .task-form {
  margin: 0;
}

.property-context-task-panel .task-form-actions {
  grid-template-columns: 1fr;
}

.property-context-task-panel .task-save-template-button {
  grid-column: auto;
}

.log-modal-backdrop,
.townsq-modal-backdrop,
.townsq-thread-backdrop,
.address-picker-backdrop,
.property-action-backdrop,
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(23, 33, 27, 0.34);
}

body.star-wars-mode .log-modal-backdrop,
body.star-wars-mode .townsq-modal-backdrop,
body.star-wars-mode .townsq-thread-backdrop,
body.star-wars-mode .address-picker-backdrop,
body.star-wars-mode .property-action-backdrop,
body.star-wars-mode .admin-modal-backdrop {
  background: rgba(0, 0, 0, 0.62);
}

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

.log-modal,
.townsq-modal,
.townsq-thread-modal,
.address-picker-modal,
.property-action-modal,
.admin-modal {
  position: fixed;
  z-index: 1300;
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translate(-50%, -50%);
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.address-picker-backdrop {
  z-index: 2200;
}

.address-picker-modal {
  z-index: 2300;
}

.townsq-thread-backdrop {
  z-index: 2400;
}

.townsq-thread-modal {
  z-index: 2500;
  width: min(760px, calc(100vw - 32px));
}

.log-modal-header,
.townsq-modal-header,
.address-picker-header,
.property-action-header,
.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.log-modal h2,
.townsq-modal h2,
.townsq-thread-modal h2,
.address-picker-header h2,
.property-action-header h2,
.admin-modal-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
}

.admin-modal {
  width: min(860px, calc(100vw - 32px));
}

.admin-modal-header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-modal-body {
  display: grid;
  gap: 16px;
}

.admin-section {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.admin-section h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.admin-user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-field input {
  min-height: 42px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
}

.admin-field input:focus {
  border-color: var(--focus);
  outline: none;
}

.admin-street-access-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.admin-street-access-field legend {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-street-access-all,
.admin-street-access-option,
.admin-checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.admin-street-access-all {
  min-height: 40px;
  padding: 0 12px;
}

.admin-checkbox-field {
  min-height: 42px;
  padding: 0 12px;
  align-self: end;
}

.admin-street-access-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.admin-street-access-option {
  min-height: 36px;
  padding: 0 10px;
}

.admin-street-access-option:has(input:disabled) {
  opacity: 0.56;
}

.admin-street-access-field input[type="checkbox"],
.admin-checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--focus);
}

.admin-address-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.admin-address-button:hover,
.admin-address-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.admin-address-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

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

.admin-address-copy strong {
  font-size: 13px;
  font-weight: 900;
}

.admin-address-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.admin-address-caret {
  padding-left: 12px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 900;
}

.admin-choice .choice-dropdown-button {
  min-height: 42px;
}

.admin-choice-menu.choice-dropdown-menu {
  width: min(520px, calc(100vw - 32px));
}

.admin-form-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  justify-content: flex-end;
}

.admin-user-list {
  display: grid;
  gap: 8px;
}

.admin-add-user-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.admin-add-user-button:hover,
.admin-add-user-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.admin-archived-toggle-button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.admin-archived-toggle-button:hover,
.admin-archived-toggle-button:focus-visible {
  border-color: var(--focus);
  color: var(--text);
  outline: none;
}

.admin-archived-user-list {
  opacity: 0.78;
}

.admin-archived-user-list .admin-user-row {
  background: color-mix(in srgb, var(--panel) 72%, var(--muted) 8%);
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.admin-user-row > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-user-row strong,
.admin-user-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row span,
.admin-muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-user-row-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.admin-user-row-actions button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.admin-user-row-actions button:hover,
.admin-user-row-actions button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.admin-user-row-actions button.admin-delete-button {
  border-color: rgba(190, 58, 48, 0.32);
  background: rgba(190, 58, 48, 0.08);
  color: #9c2f28;
}

body.star-wars-mode .admin-user-row-actions button.admin-delete-button {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.22);
  color: #fecaca;
}

.admin-view-as-row {
  display: grid;
  max-width: 360px;
}

.admin-permission-list {
  display: grid;
  gap: 8px;
}

.admin-permission-item {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px;
  background: var(--panel);
}

.admin-error {
  margin: 0;
  color: #8f2f25;
  font-weight: 900;
}

.property-action-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}

.property-action-body {
  display: grid;
  gap: 12px;
}

.property-action-form {
  display: grid;
  gap: 12px;
}

.property-action-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.property-action-choice .choice-dropdown-button {
  min-height: 42px;
}

.log-modal .edit-log-panel {
  max-height: min(520px, 64vh);
}

.address-picker-search-wrap {
  margin-bottom: 12px;
}

.address-picker-list {
  display: grid;
  gap: 6px;
  max-height: min(520px, 58vh);
  overflow: auto;
}

.address-picker-option {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

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

.address-picker-option strong {
  font-size: 14px;
}

.address-picker-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.address-picker-option:hover,
.address-picker-option:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.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-question-dot {
  display: grid;
  place-items: center;
  background: #93e88d;
  color: #090f0b;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.modal-status-hero-grey .modal-status-hero-question-dot {
  background: currentColor;
  color: #fff;
}

.modal-status-hero-yellow .modal-status-hero-question-dot {
  background: var(--yellow);
  color: #090f0b;
}

.modal-status-hero-red .modal-status-hero-question-dot {
  background: var(--red);
  color: #fff;
}

.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,
.home-assignee-editor legend,
.tasks-header h3 {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.property-record-row dt {
  margin-bottom: 0;
  text-transform: none;
}

.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;
}

.log-tabs {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.log-tab {
  flex: 0 0 auto;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

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

.log-tab.active {
  background: rgba(39, 125, 102, 0.12);
}

body.star-wars-mode .log-tab.active {
  background: rgba(45, 212, 191, 0.14);
}

.townsq-activity-button.is-empty,
.facebook-activity-button.is-empty {
  border-color: color-mix(in srgb, var(--border) 75%, transparent);
  background: color-mix(in srgb, var(--panel-soft) 72%, var(--muted) 28%);
  color: var(--muted);
}

.townsq-activity-button,
.facebook-activity-button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.townsq-activity-button-logo {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
}

.townsq-activity-button span,
.facebook-activity-button span {
  min-width: 0;
}

.facebook-activity-button-logo {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.townsq-modal {
  width: min(720px, calc(100vw - 32px));
}

.townsq-modal-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.townsq-feed-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px;
  background: var(--panel-soft);
}

.townsq-feed-tab {
  min-width: 0;
  border: 0;
  border-radius: 5px;
  padding: 8px 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.townsq-feed-tab.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(23, 33, 27, 0.14);
}

body.star-wars-mode .townsq-feed-tab.active {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.42);
}

.townsq-activity-panel {
  max-height: min(620px, 68vh);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-soft);
}

.townsq-activity-list {
  display: grid;
}

.townsq-activity-item {
  min-width: 0;
  padding: 16px;
}

.townsq-activity-item + .townsq-activity-item {
  border-top: 1px solid var(--border);
}

.townsq-activity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.townsq-author-details {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.townsq-author-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #1877f2;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.townsq-author-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.townsq-author-link:hover,
.townsq-author-link:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.townsq-author-address {
  color: var(--muted);
  font-weight: 750;
}

.townsq-author-date {
  color: var(--muted);
}

body.star-wars-mode .townsq-author-link {
  color: #38bdf8;
}

.townsq-activity-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(39, 125, 102, 0.14);
  color: var(--focus);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.townsq-activity-badge.comment {
  background: rgba(96, 113, 103, 0.14);
  color: var(--muted);
}

.townsq-activity-item h3 {
  margin: 9px 0 7px;
  font-size: 20px;
  line-height: 1.25;
}

.townsq-activity-body {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 18px;
  line-height: 1.48;
  white-space: pre-wrap;
}

.townsq-thread-button {
  margin-top: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 11px;
  background: var(--panel);
  color: var(--focus);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.townsq-thread-button:hover,
.townsq-thread-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.townsq-thread-button:disabled {
  cursor: default;
  opacity: 0.5;
}

.townsq-thread-panel {
  max-height: min(650px, 72vh);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-soft);
}

.townsq-thread-entry {
  min-width: 0;
  padding: 16px;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.townsq-thread-entry.is-scroll-target {
  background: color-mix(in srgb, var(--focus) 14%, var(--panel-soft) 86%);
  box-shadow: inset 3px 0 0 var(--focus);
}

.townsq-thread-original-post {
  background: color-mix(in srgb, var(--panel) 72%, var(--panel-soft) 28%);
}

.townsq-thread-comments-heading {
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 11px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
}

.townsq-thread-entry + .townsq-thread-entry {
  border-top: 1px solid var(--border);
}

.townsq-activity-empty,
.townsq-activity-error {
  margin: 0;
  padding: 24px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.townsq-activity-error {
  color: #b42318;
}

.townsq-load-more-button {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 14px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.townsq-load-more-button:hover,
.townsq-load-more-button: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,
.home-assignee-editor {
  margin: 0 0 22px;
  border: 0;
  padding: 0;
}

.home-assignee-editor {
  margin-top: -10px;
}

.facebook-matches-section {
  display: grid;
  gap: 9px;
  margin: 0 0 22px;
}

.facebook-matches-section h3 {
  margin: 0;
}

.facebook-matches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.facebook-match-action-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  align-items: stretch;
}

.facebook-match-pill {
  display: inline-flex;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 6px 9px 6px 7px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.facebook-match-pill:hover,
.facebook-match-pill:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.facebook-match-pill:hover + .facebook-match-menu-button,
.facebook-match-pill:focus-visible + .facebook-match-menu-button {
  border-left-color: var(--focus);
}

.facebook-match-menu-button {
  display: grid;
  width: 32px;
  min-height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0 999px 999px 0;
  padding: 0;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
}

.facebook-match-menu-button:hover,
.facebook-match-menu-button:focus-visible,
.facebook-match-menu-button[aria-expanded="true"] {
  border-color: var(--focus);
  color: var(--text);
  outline: none;
}

.facebook-match-menu-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.facebook-match-add {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
}

.facebook-match-add {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  line-height: 0;
}

.facebook-match-add:hover,
.facebook-match-add:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.facebook-match-logo {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.facebook-match-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facebook-match-state {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--focus);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.facebook-match-state svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.facebook-match-verified {
  background: #168344;
}

.facebook-match-action-menu {
  position: fixed;
  z-index: 1370;
  display: grid;
  width: min(280px, calc(100vw - 24px));
  max-height: min(320px, calc(100dvh - 24px));
  gap: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 6px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(23, 33, 27, 0.24);
}

.facebook-match-menu-item {
  display: flex;
  min-height: 40px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
}

.facebook-match-menu-item > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.facebook-match-menu-item:hover,
.facebook-match-menu-item:focus-visible {
  background: #e9f2fb;
  outline: none;
}

.facebook-match-menu-item-primary {
  justify-content: flex-start;
  background: #1877f2;
  color: #fff;
}

.facebook-match-menu-item-primary:hover,
.facebook-match-menu-item-primary:focus-visible {
  background: #0f5fc9;
}

.facebook-match-menu-fb-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.facebook-profile-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1380;
  background: rgba(23, 33, 27, 0.2);
}

body.star-wars-mode .facebook-profile-popup-backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.facebook-profile-popup {
  position: fixed;
  z-index: 1390;
  top: 50%;
  left: 50%;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.facebook-profile-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.facebook-profile-popup-body {
  display: grid;
  gap: 14px;
}

.facebook-profile-popup-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding-right: 50px;
}

.facebook-profile-popup-logo,
.facebook-profile-action-fb-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
  font-weight: 900;
  line-height: 1;
}

.facebook-profile-popup-logo {
  width: 42px;
  height: 42px;
  font-size: 33px;
}

.facebook-profile-action-fb-icon {
  width: 22px;
  height: 22px;
  font-size: 18px;
}

.facebook-profile-popup-title-wrap {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.facebook-profile-popup-title-wrap h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  line-height: 1.08;
}

.facebook-profile-edit-name-button {
  width: fit-content;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.facebook-profile-edit-name-button:hover,
.facebook-profile-edit-name-button:focus-visible {
  border-color: var(--focus);
  color: var(--text);
  outline: none;
}

.facebook-profile-name-form {
  position: relative;
  min-width: 0;
}

.facebook-profile-name-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 78px 0 12px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 850;
}

.facebook-profile-name-form input:focus {
  border-color: var(--focus);
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-soft);
}

.facebook-profile-save-button {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  background: #1877f2;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.facebook-profile-popup-actions {
  display: grid;
  gap: 9px;
}

.facebook-profile-action-button {
  display: flex;
  min-height: 46px;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 12px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.facebook-profile-action-button > span:first-child {
  min-width: 0;
}

.facebook-profile-action-button:hover,
.facebook-profile-action-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.facebook-profile-action-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.facebook-profile-action-primary {
  justify-content: flex-start;
  background: #1877f2;
  color: #fff;
}

.facebook-profile-action-primary:hover,
.facebook-profile-action-primary:focus-visible {
  border-color: #0f5fc9;
  background: #0f5fc9;
}

.facebook-profile-action-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
}

.facebook-profile-action-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.facebook-profile-action-icon-danger {
  color: #c4423a;
}

.facebook-profile-action-icon-verified {
  color: #168344;
}

.facebook-profile-delete-confirmation {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(196, 66, 58, 0.35);
  border-radius: 10px;
  padding: 12px;
  background: rgba(196, 66, 58, 0.08);
}

.facebook-profile-delete-confirmation p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.facebook-profile-confirmation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.facebook-profile-confirm-delete,
.facebook-profile-confirm-cancel {
  justify-content: center;
  min-height: 42px;
  color: #fff;
}

.facebook-profile-confirm-delete {
  border-color: #b8322a;
  background: #c4423a;
}

.facebook-profile-confirm-cancel {
  border-color: #0f5fc9;
  background: #1877f2;
}

.notes-section {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

.notes-section,
.tasks-section {
  display: grid;
  gap: 12px;
}

.notes-header,
.tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notes-header h3,
.tasks-header h3 {
  margin: 0;
}

.add-note-button,
.add-task-button,
.task-save-button,
.task-action-button {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.add-note-button,
.add-task-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}

.add-note-button:hover,
.add-note-button:focus-visible,
.add-task-button:hover,
.add-task-button:focus-visible,
.task-save-button:hover,
.task-save-button:focus-visible,
.task-action-button:hover,
.task-action-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.add-note-button:disabled,
.add-task-button:disabled,
.task-save-button:disabled,
.task-action-button:disabled,
.note-field input:disabled,
.note-field textarea:disabled,
.task-field input:disabled,
.task-field textarea:disabled,
.task-field select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.notes-list,
.tasks-list {
  display: grid;
  gap: 10px;
}

.notes-empty,
.tasks-empty {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.note-card,
.note-form {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}

.note-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.note-card h4 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.25;
}

.note-description,
.note-byline {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.note-description {
  color: var(--text);
}

.note-byline {
  color: var(--muted);
  font-weight: 800;
}

.note-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.note-image-item {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.note-image-thumb {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0;
  background: #fff;
  cursor: zoom-in;
}

.note-image-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-image-grid-editable .note-image-item {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
}

.note-image-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(185, 28, 28, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #991b1b;
  cursor: pointer;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}

.note-image-field {
  display: grid;
  gap: 8px;
}

.note-image-upload {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.55);
}

.note-image-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.note-image-upload span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.note-image-upload strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.note-image-upload small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.note-image-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: rgba(0, 0, 0, 0.72);
}

.note-image-modal {
  position: fixed;
  z-index: 1901;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(860px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  transform: translate(-50%, -50%);
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 14px;
  background: rgba(7, 10, 15, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

.note-image-modal img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 116px);
  margin: 0 auto;
  object-fit: contain;
}

.note-image-modal p {
  min-height: 1em;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-image-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(7, 10, 15, 0.82);
  color: #fff;
}

.note-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.note-field {
  display: grid;
  gap: 5px;
}

.note-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.note-field input,
.note-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.note-field textarea {
  min-height: 70px;
  resize: vertical;
}

body.star-wars-mode .note-card,
body.star-wars-mode .note-form {
  background: rgba(15, 23, 42, 0.9);
}

body.star-wars-mode .facebook-match-pill {
  background: rgba(15, 23, 42, 0.9);
}

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

body.star-wars-mode .facebook-match-action-menu {
  background: #07101f;
}

body.star-wars-mode .facebook-match-menu-item:hover,
body.star-wars-mode .facebook-match-menu-item:focus-visible {
  background: rgba(14, 116, 144, 0.3);
}

body.star-wars-mode .facebook-match-menu-item-primary,
body.star-wars-mode .facebook-match-menu-item-primary:hover,
body.star-wars-mode .facebook-match-menu-item-primary:focus-visible {
  background: #1877f2;
}

body.star-wars-mode .facebook-match-add {
  background: rgba(15, 23, 42, 0.95);
}

body.star-wars-mode .facebook-match-uncertain {
  background: #38bdf8;
  color: #020617;
}

body.star-wars-mode .note-image-thumb,
body.star-wars-mode .note-image-remove,
body.star-wars-mode .note-image-upload strong {
  background: rgba(15, 23, 42, 0.95);
}

body.star-wars-mode .note-image-upload {
  background: rgba(15, 23, 42, 0.45);
}

body.star-wars-mode .note-field input,
body.star-wars-mode .note-field textarea {
  background: rgba(15, 23, 42, 0.9);
}

.task-template-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.task-template-panel-title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}

.task-start-options,
.task-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-template-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
}

.task-template-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-template-action-button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.task-template-action-button:hover,
.task-template-action-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.task-template-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.task-template-panel-actions {
  display: flex;
  justify-content: flex-end;
}

.task-template-panel-actions .task-template-action-button {
  min-width: 92px;
}

.task-template-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.task-card,
.task-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.task-card-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.task-card-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.task-card h4 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.25;
}

.task-meta,
.task-description {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
}

.task-description {
  color: var(--text);
}

.task-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.task-action-button,
.task-save-button {
  min-height: 32px;
  padding: 0 10px;
}

.task-action-delete {
  color: #b42318;
}

.task-icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.task-icon-action-button {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.task-icon-action-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-icon-action-button:hover,
.task-icon-action-button:focus-visible {
  border-color: var(--focus);
  color: var(--text);
  outline: none;
}

.task-icon-delete {
  border-color: #e7bbb5;
  background: #fff0ee;
  color: #b42318;
}

.task-icon-delete:hover,
.task-icon-delete:focus-visible {
  border-color: #b42318;
  color: #9f2e24;
}

body.star-wars-mode .task-action-delete {
  color: #fca5a5;
}

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

body.star-wars-mode .task-icon-delete {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.36);
  color: #fecaca;
}

.task-save-button {
  background: var(--focus);
  color: #fff;
}

.task-field {
  display: grid;
  gap: 5px;
}

.task-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-field input,
.task-field textarea,
.task-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.task-field textarea {
  min-height: 78px;
  resize: vertical;
}

body.star-wars-mode .task-field input,
body.star-wars-mode .task-field textarea,
body.star-wars-mode .task-field select {
  background: rgba(15, 23, 42, 0.9);
}

body.star-wars-mode .task-template-panel,
body.star-wars-mode .task-template-card,
body.star-wars-mode .task-template-action-button {
  background: rgba(15, 23, 42, 0.9);
}

.tasks-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) auto;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.tasks-page-header h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

.tasks-page-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.task-page-add-button {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-self: end;
  gap: 7px;
  padding: 0 13px;
}

.task-page-add-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.task-page-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  align-items: start;
}

.task-page-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.task-page-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(23, 33, 27, 0.08);
}

body.star-wars-mode .task-page-card {
  background: rgba(7, 17, 31, 0.94);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
}

.task-page-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.task-page-card-icon-actions {
  justify-self: end;
}

.task-page-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.task-complete-checkbox {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--focus);
  cursor: pointer;
}

.task-complete-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.task-page-title-display {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-page-description-display {
  margin: 0;
  overflow: visible;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
}

.task-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.task-page-card-actions {
  margin-top: 2px;
}

.task-page-input,
.task-page-textarea,
.task-page-select,
.task-address-button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
}

.task-page-input,
.task-page-select {
  min-height: 38px;
  padding: 0 10px;
}

.task-page-input {
  font-size: 15px;
  font-weight: 850;
}

.task-page-textarea {
  min-height: 82px;
  padding: 9px 10px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.38;
}

.task-page-input:focus,
.task-page-textarea:focus,
.task-page-select:focus,
.task-address-button:focus-visible {
  border-color: var(--focus);
  background: var(--panel);
  outline: none;
}

.task-page-controls-row,
.task-page-assignment-row {
  display: grid;
  gap: 7px;
}

.task-page-controls-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-page-assignment-row {
  grid-template-columns: minmax(0, 66fr) minmax(0, 34fr);
}

.task-page-select-field {
  display: grid;
  gap: 4px;
}

.task-page-field-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.task-page-control-shell,
.task-page-meta-box {
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
}

.task-page-control-shell {
  padding-left: 10px;
}

.task-page-meta-box {
  min-height: 30px;
  padding: 0 7px;
}

body.star-wars-mode .task-page-control-shell,
body.star-wars-mode .task-page-meta-box {
  background: rgba(15, 23, 42, 0.9);
}

.task-page-select {
  min-width: 0;
  min-height: 32px;
  flex: 1 1 auto;
  border: 0;
  background-color: transparent;
  font-size: 12px;
  font-weight: 800;
  padding: 0 34px 0 0;
}

.task-page-assignee-inline-select {
  font-weight: 650;
}

.task-person-icon,
.task-status-icon,
.task-map-pin-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.task-person-icon {
  width: 14px;
  height: 14px;
}

.task-person-icon::before,
.task-person-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--focus);
}

.task-person-icon::before {
  top: 1px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
}

.task-person-icon::after {
  bottom: 1px;
  width: 11px;
  height: 6px;
  border-radius: 999px 999px 3px 3px;
}

.task-status-icon {
  width: 15px;
  height: 15px;
  border: 2px solid var(--muted);
  border-radius: 999px;
}

.task-status-icon-done {
  border-color: var(--green);
  background: var(--green);
}

.task-status-icon-done::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.task-map-pin-icon {
  width: 15px;
  height: 17px;
  border: 2px solid var(--focus);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.task-map-pin-icon span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--focus);
  transform: translate(-50%, -50%);
}

.task-address-button {
  display: flex;
  min-height: 30px;
  min-width: 0;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0 7px;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
}

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

.task-address-caret {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.task-address-empty {
  border-color: var(--focus);
  color: var(--focus);
}

.task-page-delete-button {
  min-height: 30px;
  border: 1px solid #e7bbb5;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff0ee;
  color: #9f2e24;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.task-page-delete-button:hover,
.task-page-delete-button:focus-visible {
  border-color: #9f2e24;
  outline: none;
}

body.star-wars-mode .task-page-input,
body.star-wars-mode .task-page-textarea,
body.star-wars-mode .task-address-button {
  background: rgba(15, 23, 42, 0.9);
}

body.star-wars-mode .task-page-delete-button {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.36);
  color: #fecaca;
}

.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 {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.choice-dropdown {
  position: relative;
  width: 100%;
  min-width: 0;
}

.choice-dropdown.is-open {
  z-index: 700;
}

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

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

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

.choice-dropdown-value {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-dropdown-menu {
  position: absolute;
  z-index: 700;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  display: grid;
  width: max-content;
  min-width: 100%;
  max-width: min(440px, calc(100vw - 40px));
  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;
}

.choice-dropdown-menu-floating {
  z-index: 3200;
}

.choice-dropdown-option {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 8px 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.choice-dropdown-option.active,
.choice-dropdown-option:hover,
.choice-dropdown-option:focus-visible {
  background: #e9f2fb;
  outline: none;
}

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

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

.task-page-choice .choice-dropdown-button {
  min-height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.task-page-assignee-choice .choice-dropdown-button {
  cursor: pointer;
}

.task-form-choice .choice-dropdown-button,
.home-assignee-choice .choice-dropdown-button {
  min-height: 40px;
}

.task-filter-choice .choice-dropdown-button,
.task-sort-choice .choice-dropdown-button {
  min-height: 38px;
}

.task-assignee-filter-choice .choice-dropdown-menu,
.task-home-filter-choice .choice-dropdown-menu,
.task-assignee-filter-choice-menu.choice-dropdown-menu,
.task-home-filter-choice-menu.choice-dropdown-menu {
  width: min(430px, 50vw);
}

.dropdown-align-left > .filter-dropdown-menu,
.dropdown-align-left > .choice-dropdown-menu {
  left: 0;
  right: auto;
  transform: none;
}

.dropdown-align-center > .filter-dropdown-menu,
.dropdown-align-center > .choice-dropdown-menu {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.dropdown-align-right > .filter-dropdown-menu,
.dropdown-align-right > .choice-dropdown-menu {
  left: auto;
  right: 0;
  transform: none;
}

.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: 8px 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  white-space: normal;
}

.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) {
  .log-tabs {
    gap: 4px;
  }

  .log-tab {
    padding: 7px 6px;
    font-size: 10px;
  }

  .townsq-activity-button,
  .facebook-activity-button {
    gap: 4px;
  }

  .townsq-activity-button-logo,
  .facebook-activity-button-logo {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .facebook-activity-button-logo {
    font-size: 15px;
  }

  .goose-chat-launcher {
    right: 10px;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    width: 96px;
    gap: 4px;
  }

  .goose-chat-icon {
    width: 48px;
    height: 48px;
  }

  .goose-chat-icon svg {
    width: 28px;
    height: 28px;
  }

  .goose-chat-label {
    font-size: 11px;
  }
  :root {
    --map-control-height: 36px;
  }

  html,
  body {
    touch-action: pan-y;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(420px, 1fr);
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .sidebar {
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow: visible;
    touch-action: pan-y;
  }

  .map-sidebar-panel {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    touch-action: pan-y;
  }

  .sidebar-header {
    gap: 10px;
    padding: 12px 12px 8px;
    touch-action: pan-y;
  }

  .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;
  }

  .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;
  }

  .view-option {
    min-height: 22px;
    font-size: 10px;
  }

  .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: var(--map-control-height);
    font-size: 16px;
  }

  .clear-filters-button {
    min-height: var(--map-control-height);
  }

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

  .vote-tab {
    min-height: var(--map-control-height);
    gap: 4px;
    padding: 0 5px;
    font-size: 10px;
  }

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

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

  .filter-dropdown-button {
    min-height: var(--map-control-height);
    padding: 0 10px;
  }

  .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;
  }

  .task-sidebar-panel {
    flex: 0 0 auto;
    gap: 8px;
    overflow: visible;
    padding: 8px 10px;
    touch-action: pan-y;
  }

  .task-mobile-assignee-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .task-mobile-choice {
    display: block;
  }

  .task-mobile-choice .choice-dropdown-button,
  .task-filter-choice .choice-dropdown-button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 11px;
  }

  .task-assignee-filter-choice .choice-dropdown-menu,
  .task-home-filter-choice .choice-dropdown-menu {
    width: min(370px, 78vw);
  }

  .task-filter-group {
    display: none;
  }

  .app-shell.mobile-search-active .map-sidebar-panel {
    position: fixed;
    z-index: 3200;
    inset: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    background: var(--panel);
    overflow: hidden;
    padding-top: env(safe-area-inset-top, 0);
    touch-action: pan-y;
  }

  body.star-wars-mode .app-shell.mobile-search-active .map-sidebar-panel {
    background: var(--panel);
  }

  .app-shell.mobile-search-active .search-row {
    position: sticky;
    top: 0;
    z-index: 2;
    grid-template-columns: minmax(0, 1fr) auto auto;
    margin: 0;
    padding: 12px 12px 10px;
    border-bottom: 1px solid var(--border);
    background: var(--panel);
  }

  .app-shell.mobile-search-active .clear-filters-button {
    min-width: 92px;
  }

  .app-shell.mobile-search-active .mobile-search-close {
    display: grid;
    place-items: center;
    min-width: 42px;
    min-height: var(--map-control-height);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
  }

  .app-shell.mobile-search-active .mobile-search-close:hover,
  .app-shell.mobile-search-active .mobile-search-close:focus-visible {
    border-color: var(--focus);
    outline: none;
  }

  .app-shell.mobile-search-active .vote-tabs,
  .app-shell.mobile-search-active .filter-dropdown-row {
    display: none;
  }

  .app-shell.mobile-search-active .address-list {
    display: block;
    min-height: 0;
    overflow: auto;
    background: var(--panel);
    padding: 10px 12px calc(26px + env(safe-area-inset-bottom, 0px));
  }

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

  .content-region {
    height: auto;
    min-height: 560px;
    overflow: visible;
  }

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

  #map {
    min-height: 560px;
  }

  .tasks-view {
    height: auto;
    min-height: 560px;
    padding: 14px 10px 24px;
  }

  .tasks-page-header {
    grid-template-columns: minmax(70px, 1fr) minmax(132px, 0.9fr) auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }

  .tasks-page-header h2 {
    font-size: 22px;
  }

  .task-page-add-button {
    min-height: 36px;
    padding: 0 10px;
  }

  .task-page-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .task-page-card {
    padding: 10px;
  }

  .task-page-card-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .list-view {
    min-height: 560px;
  }

  .list-toolbar {
    align-items: flex-start;
    gap: 8px;
    padding: 9px 10px;
  }

  .list-toolbar-copy h2 {
    font-size: 18px;
  }

  .list-toolbar-copy p {
    font-size: 10px;
  }

  .list-toolbar-actions {
    gap: 5px;
  }

  .list-export-csv,
  .list-reset-columns {
    min-height: 32px;
    padding: 0 8px;
    font-size: 10px;
  }

  .list-header-cell {
    min-height: 36px;
  }

  .list-data-row,
  .list-data-cell {
    min-height: 40px;
  }

  .list-data-cell {
    padding: 4px 7px;
  }

  .list-cell-frozen,
  .list-header-cell.list-cell-frozen {
    position: relative;
    z-index: auto;
    left: auto;
  }

  .list-header-cell.list-cell-frozen {
    z-index: 6;
  }

  .app-shell[data-current-view="list"] .map-sidebar-panel {
    padding-bottom: 0;
  }

  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.9), rgba(0, 0, 0, 0.9)),
      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%;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 20px;
    touch-action: pan-y;
  }

  .log-modal,
  .townsq-modal,
  .townsq-thread-modal,
  .address-picker-modal,
  .property-action-modal,
  .admin-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 14px;
    touch-action: pan-y;
  }

  .townsq-feed-tab {
    padding: 8px 5px;
    font-size: 12px;
  }

  .townsq-thread-panel {
    max-height: calc(100dvh - 145px);
  }

  .admin-user-form {
    grid-template-columns: 1fr;
  }

  .admin-form-actions,
  .admin-user-row,
  .admin-user-row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-form-actions > button,
  .admin-user-row-actions > button {
    width: 100%;
  }

  .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;
  }

  .facebook-match-action-wrap {
    width: 100%;
  }

  .facebook-match-pill {
    width: auto;
  }

}
