:root {
  --white: #ffffff;
  --ink: #090909;
  --cobalt: #0a36f5;
  --cobalt-dark: #0721a8;
  --cool: #f4f6fb;
  --muted: #545863;
  --line: #b8bdca;
  --soft-line: #d9dce4;
  --danger: #d31f1f;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Helvetica Neue Condensed Bold", sans-serif;
  --body: Arial, Helvetica, ui-sans-serif, system-ui, sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", "Courier New", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --scroll-progress: 0;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--white);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.4;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}

.topbar {
  position: relative;
  z-index: 10;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-height: 188px;
  border-bottom: 2px solid var(--ink);
  padding: 16px 24px 10px;
  background: var(--white);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-wordmark {
  display: block;
  white-space: nowrap;
  font-family: var(--display);
  font-size: clamp(88px, 10.5vw, 168px);
  line-height: 0.78;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  transform-origin: left top;
  animation: masthead-enter 900ms var(--ease) both;
}

.field-signal {
  position: relative;
  display: grid;
  flex: 0 0 330px;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  min-height: 130px;
  margin-left: 20px;
  padding: 16px 0 0 152px;
  color: var(--ink);
  animation: signal-enter 900ms 120ms var(--ease) both;
}

.field-signal::after {
  content: "";
  position: absolute;
  right: -70vw;
  bottom: 9px;
  left: 140px;
  height: 2px;
  background: var(--cobalt);
  transform: rotate(-1.7deg);
  transform-origin: left center;
}

.route-kink {
  position: absolute;
  top: 18px;
  left: 0;
  width: 142px;
  height: 104px;
  border-top: 3px solid var(--cobalt);
  border-right: 3px solid var(--cobalt);
  transform: skewX(-3deg);
}

.route-kink::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -1px;
  width: 47px;
  height: 3px;
  background: var(--cobalt);
  transform: rotate(-55deg);
  transform-origin: left center;
}

.route-kink::after {
  content: "";
  position: absolute;
  right: -9px;
  bottom: 34px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--cobalt);
  border-radius: 50%;
  background: var(--white);
}

.coordinates,
.field-label,
.eyebrow,
.place-columns,
.place-index,
.place-data,
.filters-toggle,
.chip,
.stats span,
label,
.route-status {
  font-family: var(--mono);
}

.coordinates {
  grid-column: 1;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-transform: uppercase;
}

.field-label {
  grid-column: 1;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
}

.topbar-actions,
.toolbar,
.view-switch,
.quick-filters,
.dialog-actions,
.detail-actions {
  display: flex;
  align-items: center;
}

.topbar-actions {
  position: relative;
  z-index: 2;
  gap: 8px;
  padding-top: 20px;
}

.topbar-actions > .icon-button {
  display: flex;
  width: auto;
  gap: 8px;
  padding: 0 11px;
}

.action-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  height: 4px;
  background: var(--cobalt);
  transform: scaleX(var(--scroll-progress));
  transform-origin: left center;
  pointer-events: none;
}

.icon-button,
.primary-action,
.switch-button,
.text-button,
.chip,
.save-button,
.details-button,
.danger-button,
.filters-toggle {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms var(--ease);
}

.icon-button {
  display: grid;
  width: 44px;
  place-items: center;
  padding: 0;
}

.icon-button svg,
.primary-action svg,
.switch-button svg,
.search-field svg,
.filters-toggle svg,
.save-button svg,
.details-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-action,
.switch-button,
.text-button,
.chip,
.save-button,
.danger-button,
.filters-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.primary-action {
  min-height: 48px;
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: var(--white);
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.text-button {
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--cobalt);
}

.danger-button {
  border-color: var(--danger);
  color: var(--danger);
}

.danger-text {
  color: var(--danger);
}

.icon-button:hover,
.switch-button:hover,
.chip:hover,
.save-button:hover,
.details-button:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.primary-action:hover {
  background: var(--cobalt-dark);
}

.switch-button.is-active,
.chip.is-active {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: var(--white);
}

.app-shell {
  width: 100%;
  margin: 0;
  padding: 0 0 48px;
}

.control-panel {
  padding: 16px 24px 20px;
  border-bottom: 1px solid var(--ink);
  background: var(--white);
}

.intro-row,
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-weight: 800;
}

h1 {
  max-width: none;
  margin-bottom: 0;
  font-size: clamp(46px, 4.8vw, 76px);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 0;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--cobalt);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stats {
  display: grid;
  flex: 0 0 min(360px, 31vw);
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  align-self: stretch;
  border-top: 1px solid var(--cobalt);
  border-bottom: 1px solid var(--cobalt);
}

.stats span {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 94px;
  padding: 10px 16px;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.stats span + span {
  border-left: 1px solid var(--cobalt);
}

.stats strong {
  color: var(--ink);
  font-family: var(--body);
  font-size: 35px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stats span:first-child strong,
.stats span:last-child strong {
  color: var(--cobalt);
}

.toolbar {
  gap: 24px;
  margin-top: 22px;
}

.search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 240px;
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--ink);
  transform: translateY(-50%);
}

.search-field input,
.filter-grid select,
.route-controls select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.bulk-textarea {
  width: 100%;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.search-field input {
  min-height: 48px;
  padding: 0 16px 0 48px;
  font-family: var(--mono);
  font-size: 13px;
}

.search-field input::placeholder {
  color: #777b84;
}

.view-switch {
  flex: 0 0 234px;
  gap: 0;
}

.switch-button {
  flex: 1;
  border-color: var(--ink);
}

.switch-button + .switch-button {
  border-left: 0;
}

.filter-grid,
.route-controls,
.form-grid {
  display: grid;
  gap: 14px;
}

.filter-grid {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  margin-top: 20px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select,
input,
textarea {
  color: var(--ink);
}

.filter-grid select,
.route-controls select,
.form-grid input,
.form-grid select,
.form-grid textarea {
  min-height: 40px;
  padding: 0 11px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
}

.form-grid textarea {
  min-height: 100px;
  padding-top: 12px;
  resize: vertical;
}

.filters-toggle {
  display: none;
  width: 100%;
  justify-content: flex-start;
  margin-top: 16px;
  font-family: var(--mono);
}

.filters-chevron {
  margin-left: auto;
  transition: transform 180ms var(--ease);
}

.filters-toggle[aria-expanded="true"] .filters-chevron {
  transform: rotate(180deg);
}

.quick-filters {
  gap: 12px;
  margin-top: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.quick-filters::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 38px;
  border-color: var(--cobalt);
  color: var(--cobalt);
  font-size: 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 1fr);
  align-items: start;
}

.content-grid.is-map-only {
  grid-template-columns: 1fr;
}

.content-grid.is-map-only .places-panel {
  display: none;
}

.content-grid.is-map-only .side-panel {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
  min-height: calc(100vh - 80px);
}

.content-grid.is-map-only .city-map,
.content-grid.is-map-only .google-map,
.content-grid.is-map-only .fallback-map {
  min-height: calc(100vh - 80px);
}

.places-panel {
  min-width: 0;
  border-right: 1px solid var(--ink);
  background: var(--white);
}

.panel-head {
  align-items: center;
  min-height: 58px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--ink);
}

.place-columns {
  display: grid;
  grid-template-columns: 56px minmax(220px, 2.4fr) minmax(90px, 0.8fr) minmax(104px, 1fr) 54px 90px 82px;
  min-height: 38px;
  align-items: center;
  border-bottom: 1px solid var(--soft-line);
  padding: 0 18px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.place-columns span:first-child {
  grid-column: 2;
}

.place-list {
  display: block;
}

.place-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(220px, 2.4fr) minmax(90px, 0.8fr) minmax(104px, 1fr) 54px 90px 82px;
  min-height: 102px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  background: var(--white);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms var(--ease),
    transform 560ms var(--ease),
    background 180ms ease;
}

.place-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--cobalt);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 240ms var(--ease);
}

.place-card:hover,
.place-card:focus-within {
  background: #f7f8ff;
}

.place-card:hover::before,
.place-card:focus-within::before {
  transform: scaleY(1);
}

.place-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.place-index {
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 800;
}

.place-primary {
  display: grid;
  min-width: 0;
  gap: 6px;
  border: 0;
  padding: 0 18px 0 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.place-primary strong {
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.place-primary > span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.place-data {
  min-width: 0;
  padding-right: 10px;
  overflow-wrap: anywhere;
  color: #31343a;
  font-size: 9px;
  line-height: 1.4;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.save-button,
.details-button {
  min-height: 38px;
  border: 0;
}

.save-button {
  display: grid;
  width: 38px;
  place-items: center;
  padding: 0;
}

.save-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.save-button svg {
  fill: transparent;
}

.save-button.is-saved {
  color: var(--cobalt);
}

.save-button.is-saved svg {
  fill: currentColor;
}

.details-button {
  display: grid;
  width: 32px;
  place-items: center;
  padding: 0;
}

.empty-state {
  margin: 28px;
  border: 1px dashed var(--cobalt);
  padding: 42px 24px;
  background: var(--white);
  text-align: center;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.side-panel {
  position: sticky;
  top: 4px;
  display: grid;
  min-width: 0;
  background: var(--white);
}

.city-map {
  position: relative;
  overflow: hidden;
  min-height: clamp(300px, 32vh, 430px);
  border-bottom: 1px solid var(--ink);
  background: var(--cool);
}

.google-map,
.map-fallback,
.fallback-map {
  position: absolute;
  inset: 0;
}

.google-map {
  z-index: 1;
  min-height: clamp(300px, 32vh, 430px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease);
}

.google-map.is-active {
  opacity: 1;
  pointer-events: auto;
}

.map-fallback {
  z-index: 2;
  opacity: 1;
  transition: opacity 180ms var(--ease);
}

.map-fallback.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.fallback-map {
  width: 100%;
  height: 100%;
  min-height: clamp(300px, 32vh, 430px);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(10, 54, 245, 0.05) 50%) 0 0 / 92px 92px,
    var(--cool);
}

.fallback-map text {
  fill: rgba(9, 9, 9, 0.45);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.river {
  fill: rgba(10, 54, 245, 0.12);
}

.road {
  fill: none;
  stroke: rgba(9, 9, 9, 0.17);
  stroke-width: 1;
  stroke-dasharray: 3 8;
}

.pin-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.map-pin {
  position: absolute;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--cobalt);
  color: var(--white);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 0 0 1px var(--cobalt);
  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    transform 180ms var(--ease);
}

.map-pin:hover,
.map-pin:focus-visible {
  z-index: 3;
  transform: translate(-50%, -50%) scale(1.25);
}

.map-pin.is-muted {
  opacity: 0.18;
}

.map-pin.is-saved {
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--cobalt);
}

.map-status {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--ink);
  padding: 10px 12px;
  background: var(--white);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.map-status strong {
  color: var(--ink);
  font-size: 10px;
}

.planner {
  min-width: 0;
  padding: 0 18px 18px;
  background: var(--white);
}

.planner .panel-head {
  margin: 0 -18px;
  border-bottom: 0;
}

.compact-head {
  align-items: center;
}

.route-controls {
  grid-template-columns: 1fr 130px;
  margin: 4px 0 18px;
}

.route-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-list li {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  border-top: 1px solid var(--cobalt);
  padding: 14px 10px 10px 0;
}

.route-list li::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cobalt);
}

.route-list > li + li {
  padding-left: 10px;
}

.route-list span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--cobalt);
  border-radius: 50%;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 850;
}

.route-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  line-height: 1.1;
}

.route-link {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  text-transform: none;
}

.route-list small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.route-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--cobalt);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

dialog {
  width: min(780px, calc(100% - 28px));
  max-height: min(88vh, 920px);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0;
  overflow: auto;
  background: var(--white);
  color: var(--ink);
  box-shadow: 16px 16px 0 rgba(10, 54, 245, 0.24);
}

dialog::backdrop {
  background: rgba(9, 9, 9, 0.7);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-color: var(--white);
  background: var(--cobalt);
  color: var(--white);
}

.detail-hero {
  display: flex;
  min-height: 150px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px;
  background: var(--cobalt);
  color: var(--white);
  font-family: var(--mono);
  text-transform: uppercase;
}

.detail-hero span {
  font-family: var(--display);
  font-size: 66px;
  line-height: 0.78;
}

.detail-hero strong {
  font-size: 10px;
  letter-spacing: 0.12em;
}

.detail-body,
.add-dialog form,
.import-dialog form {
  padding: 24px;
}

.detail-body h2 {
  max-width: 650px;
  margin: 12px 48px 12px 0;
  font-family: var(--body);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-transform: none;
}

.place-meta,
.tag-row,
.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-meta span,
.detail-tags span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--cobalt);
  padding: 2px 9px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.detail-note {
  margin: 24px 0;
  color: #2e3035;
  font-size: 19px;
  line-height: 1.45;
}

.detail-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.detail-actions .save-button {
  display: inline-flex;
  width: auto;
  padding: 0 12px;
  border: 1px solid var(--cobalt);
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-actions .save-button.is-saved {
  background: var(--cobalt);
  color: var(--white);
}

.detail-actions a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-bottom: 1px solid var(--cobalt);
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.detail-fact {
  min-height: 138px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 16px;
  background: var(--white);
}

.detail-fact strong {
  display: block;
  margin-bottom: 8px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-fact p {
  margin: 0;
}

.nearby-panel {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.nearby-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.nearby-item {
  display: grid;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px;
  background: var(--white);
  color: inherit;
  text-align: left;
}

.nearby-item:hover {
  background: var(--cool);
}

.nearby-item strong {
  line-height: 1.1;
}

.nearby-item span,
.dialog-head p,
.import-preview span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
}

.dialog-head {
  margin-bottom: 20px;
}

.dialog-head p:last-child {
  max-width: 620px;
  margin-bottom: 0;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.dialog-actions {
  justify-content: flex-end;
  gap: 14px;
  margin-top: 22px;
}

.bulk-textarea {
  min-height: 240px;
  padding: 14px;
  font-family: var(--mono);
  font-size: 12px;
  resize: vertical;
}

.import-preview {
  display: grid;
  gap: 4px;
  min-height: 62px;
  margin-top: 14px;
  border: 1px solid var(--cobalt);
  padding: 14px;
  background: var(--cool);
}

@keyframes masthead-enter {
  from {
    opacity: 0;
    transform: translateY(28px) scaleY(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

@keyframes signal-enter {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 1180px) {
  .topbar {
    min-height: 164px;
  }

  .field-signal {
    flex-basis: 270px;
    margin-left: 12px;
    padding-left: 132px;
  }

  .route-kink {
    width: 122px;
  }

  .field-signal::after {
    left: 120px;
  }

  .filter-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .place-columns {
    grid-template-columns: 50px minmax(210px, 2.2fr) minmax(82px, 0.8fr) minmax(94px, 1fr) 50px 82px 72px;
  }

  .place-card {
    grid-template-columns: 50px minmax(210px, 2.2fr) minmax(82px, 0.8fr) minmax(94px, 1fr) 50px 82px 72px;
  }
}

@media (max-width: 1320px) {
  .topbar-actions > .icon-button {
    display: grid;
    width: 44px;
    padding: 0;
  }

  .action-label {
    display: none;
  }
}

@media (max-width: 980px) {
  .topbar {
    min-height: 146px;
  }

  .field-signal {
    display: none;
  }

  .brand-wordmark {
    font-size: clamp(82px, 14vw, 126px);
  }

  .intro-row {
    display: grid;
  }

  .stats {
    width: 100%;
    max-width: 520px;
    flex-basis: auto;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .places-panel {
    border-right: 0;
  }

  .side-panel {
    position: static;
    border-top: 1px solid var(--ink);
  }

  .content-grid.is-map-only .side-panel {
    grid-template-columns: 1fr;
  }

  .content-grid.is-map-only .city-map,
  .content-grid.is-map-only .google-map,
  .content-grid.is-map-only .fallback-map {
    min-height: 65vh;
  }
}

@media (max-width: 720px) {
  .topbar {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: 0;
  }

  .topbar-actions {
    order: -1;
    width: 100%;
    min-height: 58px;
    justify-content: flex-end;
    border-bottom: 1px solid var(--ink);
    padding: 0;
  }

  .topbar-actions .icon-button {
    display: none;
  }

  .topbar-actions::before {
    content: "Dario’s List";
    margin-right: auto;
    padding-left: 18px;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .topbar-actions .primary-action {
    min-height: 58px;
    border-top: 0;
    border-bottom: 0;
    border-right: 0;
  }

  .brand {
    position: relative;
    display: grid;
    width: 100%;
    gap: 18px;
    padding: 34px 18px 26px;
  }

  .brand-wordmark {
    white-space: nowrap;
    font-size: clamp(70px, 20vw, 112px);
    line-height: 0.82;
  }

  .field-signal {
    display: grid;
    width: 100%;
    min-height: 106px;
    flex-basis: auto;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 8px 0 0 56%;
  }

  .route-kink {
    top: 2px;
    left: 51%;
    width: 80px;
    height: 88px;
  }

  .field-signal::after {
    right: -18px;
    bottom: 8px;
    left: 50%;
    transform: rotate(-3deg);
  }

  .coordinates {
    font-size: 10px;
    white-space: nowrap;
  }

  .field-label {
    margin-top: 8px;
    font-size: 11px;
  }

  .control-panel {
    padding: 24px 16px 18px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 60px);
    line-height: 0.94;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }

  .stats span {
    min-height: 82px;
    padding: 9px 5px;
  }

  .stats strong {
    font-size: 30px;
  }

  .toolbar {
    display: grid;
    gap: 12px;
    margin-top: 18px;
  }

  .search-field,
  .view-switch {
    width: 100%;
    min-width: 0;
  }

  .view-switch {
    flex-basis: auto;
  }

  .search-field input {
    min-height: 54px;
    font-size: 12px;
  }

  .switch-button {
    min-height: 54px;
  }

  .filters-toggle {
    display: flex;
    min-height: 52px;
  }

  .filter-grid {
    display: none;
    grid-template-columns: 1fr 1fr;
    margin-top: 12px;
  }

  .filter-grid.is-open {
    display: grid;
  }

  .quick-filters {
    margin-right: -16px;
  }

  .chip {
    min-height: 44px;
  }

  .panel-head {
    min-height: 56px;
    padding: 14px 16px;
  }

  .place-columns {
    display: none;
  }

  .place-card {
    grid-template-columns: 44px minmax(76px, 1fr) minmax(80px, 1.15fr) 42px minmax(70px, 1fr) 54px;
    min-height: 146px;
    align-items: start;
    padding: 16px 12px;
  }

  .place-index {
    grid-column: 1;
    grid-row: 1;
    padding-top: 2px;
    font-size: 12px;
  }

  .place-primary {
    grid-column: 2 / 6;
    grid-row: 1;
    min-height: 82px;
    padding-right: 6px;
  }

  .place-primary strong {
    font-size: 18px;
  }

  .place-primary > span {
    font-size: 10px;
    -webkit-line-clamp: 2;
  }

  .place-data {
    grid-row: 2;
    align-self: end;
    padding: 12px 5px 0 0;
    font-size: 8px;
  }

  .place-category {
    grid-column: 2;
  }

  .place-neighborhood {
    grid-column: 3;
  }

  .place-price {
    grid-column: 4;
  }

  .place-status {
    grid-column: 5;
  }

  .card-actions {
    grid-column: 6;
    grid-row: 1 / 3;
    align-self: stretch;
    flex-direction: column;
    justify-content: space-between;
  }

  .save-button,
  .details-button {
    min-width: 44px;
    min-height: 44px;
  }

  .city-map,
  .google-map,
  .fallback-map {
    min-height: 68vh;
  }

  .planner {
    padding: 0 16px 18px;
  }

  .planner .panel-head {
    margin: 0 -16px;
  }

  .route-controls,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .route-list {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid,
  .nearby-list {
    grid-template-columns: 1fr;
  }

  .detail-body,
  .add-dialog form,
  .import-dialog form {
    padding: 18px;
  }

  .detail-hero {
    min-height: 120px;
    padding: 18px;
  }

  .detail-hero span {
    font-size: 50px;
  }
}

@media (max-width: 430px) {
  .brand {
    padding-top: 28px;
  }

  .brand-wordmark {
    font-size: clamp(68px, 19vw, 86px);
  }

  .field-signal {
    min-height: 92px;
    padding-left: 54%;
  }

  .route-kink {
    left: 47%;
    width: 72px;
    height: 78px;
  }

  .place-card {
    grid-template-columns: 40px minmax(68px, 1fr) minmax(70px, 1.15fr) 36px minmax(68px, 1fr) 48px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .place-primary strong {
    font-size: 16px;
  }

  .place-data {
    font-size: 7.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .place-card {
    opacity: 1;
    transform: none;
  }
}

/* Production-facing information architecture */
.owner-only {
  display: none !important;
}

body.editor-mode .owner-only {
  display: flex !important;
}

body.editor-mode .detail-meta .owner-only {
  display: grid !important;
}

body:not(.editor-mode) .filter-status-owner,
body:not(.editor-mode) .place-status-owner {
  display: none;
}

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

.view-switch {
  flex-basis: 342px;
}

.guides-panel {
  min-width: 0;
  overflow: hidden;
  border-top: 1px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 49.95%, rgba(10, 54, 245, 0.06) 50%, transparent 50.05%),
    var(--white);
}

.guides-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
  gap: 40px;
  align-items: end;
  border-bottom: 2px solid var(--ink);
  padding: 42px 24px 30px;
}

.guides-head h2 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: clamp(60px, 8vw, 122px);
  line-height: 0.82;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.guides-head > p {
  max-width: 460px;
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
}

.guides-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.42fr) minmax(0, 1.58fr);
  min-height: 660px;
}

.guide-index {
  min-width: 0;
  border-right: 1px solid var(--ink);
  background: var(--white);
}

.guide-search {
  border-bottom: 1px solid var(--ink);
  padding: 18px;
}

.guide-search input {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 12px;
}

#guideList {
  max-height: 720px;
  overflow: auto;
}

.guide-index-item {
  display: grid;
  width: 100%;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.guide-index-item:hover,
.guide-index-item.is-active {
  background: var(--cobalt);
  color: var(--white);
}

.guide-index-item > span,
.guide-index-item > small {
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}

.guide-detail {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  min-width: 0;
  background: var(--white);
}

.guide-detail-head {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 620px;
  border-right: 1px solid var(--ink);
  padding: 36px 26px;
}

.guide-detail-head h3 {
  margin: 8px 0 18px;
  font-family: var(--display);
  font-size: clamp(68px, 7vw, 116px);
  line-height: 0.82;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.guide-detail-head > p:not(.eyebrow) {
  max-width: 540px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
}

.guide-moments,
.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.guide-moments span {
  border: 1px solid var(--cobalt);
  padding: 7px 9px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.guide-moments b {
  margin-left: 5px;
}

.guide-place-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-place-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 96px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
}

.guide-place-list > li > span {
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.guide-place-list button {
  display: grid;
  gap: 5px;
  border: 0;
  background: transparent;
  text-align: left;
}

.guide-place-list button strong {
  font-size: 17px;
  line-height: 1.1;
}

.guide-place-list button small,
.guide-place-list em,
.guide-method {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
}

.guide-place-list em {
  color: var(--cobalt);
  text-transform: uppercase;
}

.guide-method {
  grid-column: 2;
  margin: 0;
  border-top: 2px solid var(--ink);
  padding: 18px 20px;
  line-height: 1.6;
}

.guide-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 28px;
  align-items: end;
  border-top: 2px solid var(--ink);
  padding: 28px 24px 34px;
  font-family: var(--mono);
}

.site-footer div {
  display: grid;
}

.site-footer strong {
  font-family: var(--display);
  font-size: 30px;
  text-transform: uppercase;
}

.site-footer span,
.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.site-footer #connectionStatus {
  color: var(--cobalt);
  text-align: right;
}

.site-footer #connectionStatus.is-offline {
  color: var(--danger);
}

.site-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--cobalt);
}

.trust-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(10, 54, 245, 0.12) 50%, transparent 50.1%),
    var(--white);
}

.trust-page main {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(48px, 10vw, 140px) 0;
}

.trust-page h1 {
  max-width: 880px;
  margin: 14px 0 46px;
  font-family: var(--display);
  font-size: clamp(76px, 13vw, 176px);
  line-height: 0.78;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.trust-page section {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: 28px;
  border-top: 1px solid var(--ink);
  padding: 22px 0;
}

.trust-page h2,
.trust-page p {
  margin: 0;
}

.trust-page p {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
}

.trust-page .primary-action {
  display: inline-flex;
  margin-top: 30px;
  text-decoration: none;
}

@media (max-width: 620px) {
  .trust-page section {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.route-map-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid var(--cobalt);
  padding: 0 12px;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.detail-dialog {
  width: min(1180px, calc(100% - 28px));
}

.detail-dialog .detail-hero {
  min-height: 62px;
  align-items: center;
  padding: 14px 28px;
}

.detail-dialog .detail-hero span {
  font-size: 32px;
}

.detail-title-row {
  border-bottom: 2px solid var(--cobalt);
  padding-bottom: 22px;
}

.detail-title-row h2 {
  max-width: 900px;
  margin-top: 0;
  font-family: var(--display);
  font-size: clamp(56px, 7vw, 104px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  border-top: 1px solid var(--line);
}

.detail-meta span {
  display: grid;
  min-height: 58px;
  gap: 5px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 10px 12px 4px 0;
  color: var(--ink);
  font-size: 12px;
  text-transform: none;
}

.detail-meta b {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.detail-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0 12px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.detail-action:hover,
.detail-action.is-active {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: var(--white);
}

.detail-editorial {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.detail-editorial .detail-note {
  max-width: 860px;
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: clamp(18px, 2.3vw, 28px);
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-fact {
  min-height: 120px;
}

.detail-network {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 24px;
  border-top: 2px solid var(--ink);
}

.live-place-panel,
.detail-network .nearby-panel {
  margin: 0;
  border-top: 0;
  padding: 18px;
}

.live-place-panel {
  border-right: 1px solid var(--ink);
}

.live-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.live-head h3,
.nearby-panel h3 {
  margin: 4px 0 12px;
  font-size: 18px;
}

.live-head > span {
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.live-empty {
  border: 1px dashed var(--line);
  padding: 16px;
}

.live-empty strong,
.live-empty p {
  font-family: var(--mono);
  font-size: 10px;
}

.live-empty p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.live-photo {
  margin: 0 0 14px;
}

.live-photo img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

.live-photo figcaption {
  padding-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.live-facts {
  margin: 0;
}

.live-facts > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 9px;
}

.live-facts dt {
  font-weight: 800;
  text-transform: uppercase;
}

.live-facts dd {
  margin: 0;
}

.live-links {
  display: flex;
  gap: 14px;
  padding-top: 12px;
}

.live-links a {
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-network .nearby-list {
  grid-template-columns: 1fr;
}

.detail-network .nearby-item {
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  min-height: 60px;
  padding: 9px 4px;
}

.nearby-item > b,
.nearby-item > em {
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
}

.nearby-item > span {
  display: grid;
}

.nearby-item small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.detail-provenance,
.owner-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-top: 2px solid var(--ink);
  margin-top: 22px;
  padding-top: 16px;
}

.detail-provenance p {
  max-width: 540px;
  margin: 3px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
}

.app-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  max-width: 360px;
  border: 1px solid var(--white);
  padding: 13px 16px;
  background: var(--cobalt);
  color: var(--white);
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms var(--ease);
  pointer-events: none;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .guides-head,
  .guides-layout,
  .guide-detail {
    grid-template-columns: minmax(0, 1fr);
  }

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

  #guideList {
    display: flex;
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
  }

  .guide-index-item {
    min-width: 220px;
    border-right: 1px solid var(--line);
  }

  .guide-detail-head {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .guide-method {
    grid-column: 1;
  }

  .detail-actions {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .detail-network {
    grid-template-columns: 1fr;
  }

  .live-place-panel {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer #connectionStatus {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .view-switch {
    flex-basis: auto;
  }

  .switch-button {
    padding-inline: 8px;
    font-size: 9px;
  }

  .guides-head {
    gap: 18px;
    padding: 32px 16px 22px;
  }

  .guides-head h2 {
    font-size: clamp(48px, 14vw, 68px);
    overflow-wrap: anywhere;
  }

  .guide-detail-head {
    padding: 28px 16px;
  }

  .guide-detail-head h3 {
    font-size: clamp(60px, 20vw, 94px);
  }

  .guide-place-list li {
    grid-template-columns: 32px 1fr;
    padding: 14px 12px;
  }

  .guide-place-list em {
    grid-column: 2;
    padding-top: 6px;
  }

  .detail-dialog {
    width: calc(100% - 12px);
    max-height: 96vh;
  }

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

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

  .detail-title-row h2 {
    font-size: clamp(52px, 18vw, 80px);
  }

  .detail-dialog .detail-hero {
    min-height: 58px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }

  .site-footer #connectionStatus {
    grid-column: 1;
  }
}
