:root {
  color: #202522;
  background: #e8ebe6;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  letter-spacing: 0;
  --paper: #f8f7f2;
  --paper-strong: #fffefa;
  --ink: #202522;
  --muted: #6f766f;
  --line: #dfe1db;
  --forest: #365f53;
  --forest-soft: #e2ebe6;
  --cinnabar: #b94a3c;
  --gold: #bc8437;
  --aqua: #177d85;
  --shadow: 0 12px 36px rgba(35, 43, 39, 0.16);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.app-shell,
#map {
  width: 100%;
  height: 100%;
}

#map {
  background: #dfe7df;
}

.topbar {
  position: fixed;
  z-index: 1000;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 60px;
  display: grid;
  grid-template-columns: 220px minmax(260px, 560px) 1fr;
  align-items: center;
  gap: 22px;
  padding: 7px 9px 7px 12px;
  border: 1px solid rgba(51, 65, 58, 0.13);
  border-radius: 7px;
  background: rgba(248, 247, 242, 0.95);
  box-shadow: 0 7px 24px rgba(36, 43, 39, 0.13);
  backdrop-filter: blur(14px);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #fffaf1;
  background: var(--cinnabar);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
  line-height: 1;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.search-box {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px 0 13px;
  border: 1px solid #d8dad4;
  border-radius: 5px;
  background: var(--paper-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(54, 95, 83, 0.12);
}

.search-box > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--forest);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #909690;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #dadcd6;
  border-radius: 5px;
  background: var(--paper-strong);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
  color: inherit;
  text-decoration: none;
}

.icon-button:hover {
  color: var(--forest);
  border-color: #b8c6bf;
  background: var(--forest-soft);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.search-clear {
  width: 28px;
  height: 28px;
  display: none;
  border: 0;
  background: transparent;
}

.search-clear.visible {
  display: grid;
}

.search-clear svg {
  width: 15px;
  height: 15px;
}

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

.breadcrumb {
  position: fixed;
  z-index: 800;
  top: 88px;
  left: 16px;
  max-width: calc(100vw - 500px);
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  overflow-x: auto;
  border: 1px solid rgba(51, 65, 58, 0.13);
  border-radius: 5px;
  background: rgba(248, 247, 242, 0.94);
  box-shadow: 0 5px 16px rgba(36, 43, 39, 0.1);
  scrollbar-width: none;
}

.breadcrumb::-webkit-scrollbar {
  display: none;
}

.breadcrumb button {
  max-width: 190px;
  padding: 6px 8px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb button:hover,
.breadcrumb button[aria-current="page"] {
  color: var(--ink);
}

.breadcrumb button[aria-current="page"] {
  font-weight: 700;
}

.breadcrumb-separator {
  color: #a6aba5;
  font-size: 12px;
}

.map-meta {
  position: fixed;
  z-index: 800;
  left: 16px;
  bottom: 34px;
  display: flex;
  gap: 6px;
}

.grade-legend {
  position: fixed;
  z-index: 800;
  left: 16px;
  bottom: 70px;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 9px;
  border: 1px solid rgba(51, 65, 58, 0.15);
  border-radius: 4px;
  background: rgba(248, 247, 242, 0.92);
  box-shadow: 0 3px 12px rgba(36, 43, 39, 0.08);
  color: #4f5852;
  font-size: 10px;
}

.grade-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7b827d;
}

.legend-dot.grade-5a {
  background: var(--cinnabar);
}

.legend-dot.grade-4a {
  background: var(--gold);
}

.legend-dot.grade-3a {
  background: var(--forest);
}

.legend-dot.place-personal {
  background: var(--aqua);
}

.level-chip,
.source-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(51, 65, 58, 0.15);
  border-radius: 4px;
  background: rgba(248, 247, 242, 0.92);
  color: #4f5852;
  font-size: 11px;
  box-shadow: 0 3px 12px rgba(36, 43, 39, 0.08);
}

.level-chip {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.result-panel {
  position: fixed;
  z-index: 900;
  top: 88px;
  right: 16px;
  bottom: 16px;
  width: min(430px, calc(100vw - 32px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 58, 0.14);
  border-radius: 7px;
  background: rgba(248, 247, 242, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.result-panel.location-reviewing {
  display: none;
}

.panel-grip {
  display: none;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.panel-heading {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--cinnabar);
  font-size: 10px;
  font-weight: 800;
}

.panel-heading h1 {
  max-width: 280px;
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 27px;
  line-height: 1.16;
}

.result-summary {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.data-badge {
  height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 0 7px;
  border: 1px solid #cad7d0;
  border-radius: 4px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 10px;
}

.data-badge svg {
  width: 12px;
  height: 12px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.panel-add-button {
  width: 30px;
  height: 30px;
  color: #fff;
  border-color: var(--cinnabar);
  background: var(--cinnabar);
}

.panel-add-button:hover {
  color: #fff;
  border-color: #923a30;
  background: #9f4034;
}

.panel-add-button svg {
  width: 16px;
  height: 16px;
}

.filters {
  padding: 14px 22px 15px;
  border-bottom: 1px solid var(--line);
}

.filter-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: #4e5651;
  font-size: 12px;
  font-weight: 700;
}

.filter-label svg {
  width: 14px;
  height: 14px;
}

.filter-selects {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;
}

.filter-select,
.sort-control {
  position: relative;
  min-width: 0;
}

.filter-select {
  width: 116px;
  flex: 0 0 116px;
}

.filter-select select,
.sort-control select {
  height: 32px;
  max-width: 136px;
  padding: 0 27px 0 9px;
  overflow: hidden;
  appearance: none;
  border: 1px solid #d8dad4;
  border-radius: 4px;
  outline: 0;
  background: var(--paper-strong);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-select select {
  width: 100%;
  max-width: none;
}

.multi-filter {
  position: relative;
  width: 82px;
  flex: 0 0 82px;
}

.multi-filter summary {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px 0 9px;
  border: 1px solid #d8dad4;
  border-radius: 4px;
  background: var(--paper-strong);
  color: #5b635e;
  font-size: 11px;
  list-style: none;
  cursor: pointer;
}

.multi-filter summary::-webkit-details-marker {
  display: none;
}

.multi-filter summary b {
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-size: 9px;
}

.multi-filter summary b[hidden] {
  display: none;
}

.multi-filter summary svg {
  width: 13px;
  height: 13px;
  margin-left: auto;
  transition: transform 140ms ease;
}

.multi-filter[open] summary svg {
  transform: rotate(180deg);
}

.multi-filter.active summary {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--forest-soft);
}

.multi-filter.inactive summary {
  color: #8a908c;
  background: #f1f1ed;
}

.multi-filter-menu {
  position: absolute;
  z-index: 1100;
  top: 37px;
  left: 0;
  width: 154px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #d8dad4;
  border-radius: 5px;
  background: var(--paper-strong);
  box-shadow: 0 10px 24px rgba(36, 43, 39, 0.16);
}

.multi-filter:last-child .multi-filter-menu {
  right: 0;
  left: auto;
}

.multi-filter-menu label {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px;
  border-radius: 3px;
  color: #515954;
  font-size: 11px;
  cursor: pointer;
}

.multi-filter-menu label:hover {
  background: var(--forest-soft);
}

.multi-filter-menu input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--forest);
}

.filter-select svg,
.sort-control svg {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 13px;
  height: 13px;
  pointer-events: none;
  transform: translateY(-50%);
}

.list-toolbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.sort-control select {
  height: 28px;
  border-color: transparent;
  background: transparent;
  color: #4d5550;
}

.result-list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: #c2c7c1 transparent;
  scrollbar-width: thin;
}

.attraction-row {
  position: relative;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 19px 15px 22px;
  border-bottom: 1px solid #e4e5df;
  outline: 0;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.attraction-row:hover,
.attraction-row:focus-visible,
.attraction-row.active {
  background: #fffefa;
  box-shadow: inset 3px 0 0 var(--cinnabar);
}

.place-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1px solid #cad4ce;
  border-radius: 50%;
  color: var(--forest);
  background: #edf2ef;
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
}

.place-copy {
  min-width: 0;
}

.place-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.place-title-line h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
  margin-top: -4px;
}

.row-icon-button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #929791;
}

.row-icon-button svg {
  width: 15px;
  height: 15px;
}

.save-button {
  margin: 0;
}

.save-button:hover,
.save-button.saved {
  color: var(--cinnabar);
  background: #f7e9e6;
}

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

.delete-button:hover {
  color: #a33e34;
  background: #f7e9e6;
}

.place-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 5px 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-location svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.place-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.place-meta span {
  height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 3px;
  color: #6a716d;
  background: #eff0ec;
  font-size: 9px;
}

.place-meta .manual-badge {
  color: var(--aqua);
  background: #e3f0f0;
  font-weight: 700;
}

.place-meta .official-badge {
  color: var(--forest);
  background: var(--forest-soft);
  font-weight: 700;
}

.place-meta .tag-badge {
  color: #5c5550;
  background: #eee9e2;
}

.place-meta .grade-badge {
  color: #fff;
  font-weight: 800;
}

.place-meta .grade-badge.grade-5a {
  background: var(--cinnabar);
}

.place-meta .grade-badge.grade-4a {
  background: var(--gold);
}

.place-meta .grade-badge.grade-3a {
  background: var(--forest);
}

.place-note {
  margin: 8px 0 0;
  color: #59615c;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.load-more {
  height: 42px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #f2f2ed;
  color: var(--forest);
  font-size: 11px;
  font-weight: 700;
}

.load-more:hover {
  background: var(--forest-soft);
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 30px;
  text-align: center;
}

.empty-state > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--forest);
  background: var(--forest-soft);
}

.empty-state svg {
  width: 22px;
  height: 22px;
}

.empty-state h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.text-button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.text-button.secondary {
  border: 1px solid #d8dad4;
  background: #fff;
}

.text-button.primary {
  color: #fff;
  border: 1px solid var(--forest);
  background: var(--forest);
}

.toast {
  position: fixed;
  z-index: 2000;
  left: 50%;
  bottom: 28px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 5px;
  color: #fff;
  background: rgba(32, 37, 34, 0.94);
  box-shadow: 0 7px 20px rgba(32, 37, 34, 0.2);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.token-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: min(90dvh, 760px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(51, 65, 58, 0.18);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: 0 22px 70px rgba(26, 32, 29, 0.25);
}

.token-dialog::backdrop {
  background: rgba(28, 35, 31, 0.48);
  backdrop-filter: blur(3px);
}

.dialog-content {
  padding: 22px;
}

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

.attraction-dialog {
  width: min(620px, calc(100vw - 32px));
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.form-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #4d5550;
  font-size: 11px;
  font-weight: 700;
}

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

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #d5d8d1;
  border-radius: 4px;
  outline: 0;
  background: #fff;
  font-weight: 400;
}

.form-field input,
.form-field select {
  height: 40px;
}

.form-field textarea {
  min-height: 76px;
  padding-top: 9px;
  padding-bottom: 9px;
  resize: vertical;
  line-height: 1.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(54, 95, 83, 0.12);
}

.tag-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #4d5550;
  font-size: 11px;
  font-weight: 700;
}

.tag-field legend {
  margin-bottom: 7px;
  padding: 0;
}

.tag-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.tag-options label {
  position: relative;
  min-width: 0;
}

.tag-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-options span {
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d5d8d1;
  border-radius: 4px;
  background: #fff;
  color: #666d68;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}

.tag-options input:focus-visible + span {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(54, 95, 83, 0.12);
}

.tag-options input:checked + span {
  border-color: var(--forest);
  background: var(--forest-soft);
  color: var(--forest);
  font-weight: 700;
}

.location-query-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 7px;
}

.location-query-control .icon-button {
  width: 40px;
  height: 40px;
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.location-results:empty {
  display: none;
}

.location-results {
  display: grid;
  gap: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #d9dcd5;
  border-radius: 5px;
  background: #fff;
}

.location-results > p {
  margin: 0;
  padding: 9px 11px;
  border-bottom: 1px solid #e6e7e2;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.location-results > button {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 11px;
  border: 0;
  border-bottom: 1px solid #e6e7e2;
  background: transparent;
  text-align: left;
}

.location-results > button:last-child {
  border-bottom: 0;
}

.location-results > button:hover {
  background: var(--forest-soft);
}

.location-results > button span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.location-results > button strong,
.location-results > button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-results > button strong {
  font-size: 12px;
}

.location-results > button small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.location-results > button em {
  align-self: center;
  color: #7b827d;
  font-family: Consolas, monospace;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.location-loading,
.location-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  text-align: center;
}

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

.coordinate-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.coordinate-tools svg {
  width: 14px;
  height: 14px;
}

.split-actions {
  justify-content: space-between;
}

.split-actions > div {
  display: flex;
  gap: 8px;
}

.center-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.center-button svg {
  width: 14px;
  height: 14px;
}

.text-button.danger {
  color: #fff;
  border: 1px solid #a33e34;
  background: #a33e34;
}

.delete-dialog {
  width: min(400px, calc(100vw - 32px));
  text-align: center;
}

.delete-dialog h2 {
  margin: 13px 0 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 24px;
}

.delete-dialog .dialog-actions {
  justify-content: center;
}

.delete-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  color: #a33e34;
  background: #f7e9e6;
}

.delete-icon svg {
  width: 20px;
  height: 20px;
}

.location-review {
  position: fixed;
  z-index: 1200;
  right: 16px;
  bottom: 16px;
  left: 16px;
  width: min(660px, calc(100vw - 32px));
  min-height: 70px;
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  padding: 12px 14px 12px 16px;
  border: 1px solid rgba(51, 65, 58, 0.18);
  border-radius: 7px;
  background: rgba(248, 247, 242, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
}

.location-review.visible {
  display: grid;
}

.review-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.review-copy p {
  margin: 0;
  color: var(--cinnabar);
  font-size: 9px;
  font-weight: 800;
}

.review-copy strong,
.review-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-copy strong {
  font-size: 14px;
}

.review-copy span {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.review-actions {
  display: flex;
  gap: 8px;
}

.location-picking {
  cursor: crosshair;
}

.location-picking .leaflet-overlay-pane,
.location-picking .leaflet-overlay-pane * {
  pointer-events: none;
}

.review-marker-wrap {
  border: 0;
  background: transparent;
}

.review-map-marker {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 7px;
  background: var(--aqua);
  box-shadow: 0 6px 16px rgba(25, 69, 72, 0.32);
  transform: rotate(-45deg);
}

.review-map-marker span {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.dialog-header h2 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 25px;
}

.dialog-note {
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.token-field {
  display: grid;
  gap: 7px;
  color: #4d5550;
  font-size: 11px;
  font-weight: 700;
}

.token-field input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #d5d8d1;
  border-radius: 4px;
  outline: 0;
  background: #fff;
  font-weight: 400;
}

.token-field input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(54, 95, 83, 0.12);
}

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

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

.leaflet-control-zoom {
  margin-left: 16px !important;
  margin-bottom: 74px !important;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 58, 0.15) !important;
  border-radius: 5px !important;
  box-shadow: 0 5px 16px rgba(36, 43, 39, 0.12) !important;
}

.leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 34px !important;
  color: var(--forest) !important;
  background: rgba(248, 247, 242, 0.95) !important;
}

.leaflet-control-attribution {
  max-width: calc(100vw - 480px);
  background: rgba(248, 247, 242, 0.82) !important;
  font-size: 8px !important;
}

.region-tooltip {
  padding: 7px 9px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: rgba(31, 39, 35, 0.94) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(31, 39, 35, 0.18) !important;
  font-size: 11px;
}

.region-tooltip::before {
  border-top-color: rgba(31, 39, 35, 0.94) !important;
}

.region-tooltip strong,
.region-tooltip span {
  display: block;
}

.region-tooltip span {
  margin-top: 2px;
  color: #cbd7d1;
  font-size: 9px;
}

.place-marker-wrap {
  border: 0;
  background: transparent;
}

.place-marker {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 6px;
  color: #fff;
  background: #7b827d;
  box-shadow: 0 4px 10px rgba(65, 44, 38, 0.28);
  transform: rotate(-45deg);
  transition: transform 150ms ease;
}

.place-marker-wrap.grade-5a .place-marker {
  background: var(--cinnabar);
}

.place-marker-wrap.grade-4a .place-marker {
  background: var(--gold);
}

.place-marker-wrap.grade-3a .place-marker {
  background: var(--forest);
}

.place-marker-wrap.place-personal .place-marker {
  background: var(--aqua);
}

.place-marker i {
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  transform: rotate(45deg);
}

.place-marker-wrap:hover .place-marker {
  transform: rotate(-45deg) scale(1.13);
}

.place-popup .leaflet-popup-content-wrapper {
  border-radius: 5px;
  box-shadow: 0 8px 28px rgba(33, 41, 37, 0.18);
}

.place-popup .leaflet-popup-content {
  min-width: 176px;
  margin: 14px 16px;
}

.popup-content p {
  margin: 0 0 5px;
  color: var(--cinnabar);
  font-size: 9px;
  font-weight: 800;
}

.popup-content h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.popup-content span {
  color: var(--muted);
  font-size: 10px;
}

.popup-content em {
  display: block;
  margin-top: 6px;
  color: #59615c;
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
}

.popup-content small {
  display: block;
  margin-top: 5px;
  color: #75807a;
  font-family: Consolas, monospace;
  font-size: 9px;
}

@media (max-width: 820px) {
  .topbar {
    top: 8px;
    left: 8px;
    right: 8px;
    height: 54px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 6px 7px;
  }

  .brand {
    gap: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand-copy {
    display: none;
  }

  .search-box {
    height: 38px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .topbar-actions .icon-button,
  .dialog-header .icon-button {
    width: 38px;
    height: 38px;
  }

  #locate-button {
    display: none;
  }

  .breadcrumb {
    top: 70px;
    left: 8px;
    max-width: calc(100vw - 16px);
  }

  .result-panel {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: min(54dvh, 560px);
    grid-template-rows: 22px auto auto auto minmax(0, 1fr) auto;
    transition: height 220ms ease;
  }

  .result-panel.collapsed {
    height: 88px;
  }

  .result-panel.collapsed > :not(.panel-grip):not(.panel-header) {
    display: none;
  }

  .result-panel.collapsed .panel-header {
    padding-top: 4px;
    border-bottom: 0;
  }

  .result-panel.collapsed .panel-heading h1,
  .result-panel.collapsed .result-summary,
  .result-panel.collapsed .data-badge {
    display: none;
  }

  .panel-grip {
    width: 100%;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .panel-grip span {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #c4c7c1;
  }

  .panel-header {
    padding: 10px 16px 12px;
  }

  .panel-heading h1 {
    max-width: 220px;
    font-size: 22px;
  }

  .result-summary {
    margin-top: 4px;
  }

  .filters {
    padding: 10px 16px 11px;
  }

  .filter-row {
    align-items: flex-start;
  }

  .filter-selects {
    flex: 1;
  }

  .filter-select {
    width: 112px;
    flex: 0 0 112px;
  }

  .filter-select select {
    width: 100%;
    max-width: none;
  }

  .list-toolbar {
    height: 40px;
    padding: 0 16px;
  }

  .attraction-row {
    padding: 13px 14px 12px 16px;
  }

  .map-meta {
    top: 116px;
    bottom: auto;
    left: 8px;
  }

  .grade-legend {
    top: 151px;
    bottom: auto;
    left: 8px;
  }

  .leaflet-control-zoom {
    margin-left: 8px !important;
    margin-bottom: calc(54dvh + 18px) !important;
  }

  .leaflet-control-attribution {
    display: none;
  }

  .toast {
    bottom: calc(54dvh + 22px);
  }

  .location-review {
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
  }
}

@media (max-width: 420px) {
  .topbar-actions #token-button {
    width: 36px;
  }

  .filter-label {
    display: none;
  }

  .filter-selects {
    width: 100%;
  }

  .data-badge {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dialog-content {
    padding: 18px;
  }

  .form-grid {
    gap: 11px 9px;
  }

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

  .split-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .split-actions > div {
    justify-content: flex-end;
  }

  .center-button {
    justify-content: center;
  }

  .location-results > button {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .location-review {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
