.footprint-overlay {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  background:
    radial-gradient(circle at 70% 22%, rgba(25, 108, 122, 0.13), transparent 34%),
    linear-gradient(160deg, #07131b, #081924 55%, #061019);
  color: #eef7f8;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.footprint-overlay[hidden] {
  display: none;
}

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

.footprint-overlay button {
  font: inherit;
}

.footprint-head {
  position: absolute;
  z-index: 8;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) 16px 30px;
  background: linear-gradient(to bottom, rgba(4, 13, 19, 0.94), transparent);
  pointer-events: none;
}

.footprint-head button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(196, 226, 230, 0.17);
  border-radius: 50%;
  background: rgba(8, 24, 33, 0.8);
  color: #edf7f8;
  cursor: pointer;
  pointer-events: auto;
}

.footprint-head svg {
  width: 18px;
  height: 18px;
}

.footprint-brand {
  text-align: center;
  pointer-events: auto;
}

.footprint-brand strong {
  display: block;
  font-family: "Songti SC", "SimSun", serif;
  font-size: 17px;
}

.footprint-brand span {
  display: block;
  margin-top: 2px;
  color: #7f9da6;
  font-family: Georgia, serif;
  font-size: 7px;
  font-weight: 700;
}

.footprint-stage {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background:
    linear-gradient(rgba(119, 164, 177, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 164, 177, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 64% 42%, rgba(14, 107, 122, 0.12), transparent 42%);
  background-size: 42px 42px, 42px 42px, auto;
  touch-action: none;
}

.footprint-stage::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(5, 16, 23, 0.5), transparent 22%, transparent 64%, rgba(4, 12, 18, 0.68)),
    linear-gradient(90deg, rgba(3, 10, 15, 0.52), transparent 22%, transparent 80%, rgba(3, 10, 15, 0.52));
  content: "";
  pointer-events: none;
}

.footprint-map-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.footprint-map-svg.is-dragging {
  cursor: grabbing;
}

.footprint-country,
.footprint-city {
  transition: fill 0.18s ease, stroke 0.18s ease, filter 0.18s ease;
}

.footprint-country {
  fill: #102632;
  stroke: #35505e;
  stroke-width: 0.7;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}

.footprint-country:hover {
  fill: #183846;
}

.footprint-country.is-visited {
  fill: #087d8c;
  stroke: #75dce7;
  stroke-width: 1.25;
  filter: drop-shadow(0 0 5px rgba(70, 212, 229, 0.75));
}

.footprint-city {
  fill: #102632;
  stroke: #2b4653;
  stroke-width: 0.35;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
}

.footprint-city:hover {
  fill: #183945;
}

.footprint-city.is-visited {
  fill: #087d8c;
  stroke: #74dae5;
  stroke-width: 1.25;
  filter: drop-shadow(0 0 4px rgba(70, 212, 229, 0.7));
}

.footprint-province-outline {
  fill: none;
  stroke: rgba(144, 188, 198, 0.42);
  stroke-width: 0.55;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.footprint-south-sea-dashes {
  fill: rgba(116, 168, 180, 0.68);
}

.footprint-sansha {
  fill: #344f5b;
  stroke: rgba(135, 190, 201, 0.55);
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}

.footprint-sansha.is-visited {
  fill: #087d8c;
  stroke: #76dce6;
  stroke-width: 1;
}

.footprint-map-label {
  fill: #e9f8fa;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(3, 15, 21, 0.82);
  stroke-linejoin: round;
  text-anchor: middle;
  pointer-events: none;
}

.footprint-map-label.country {
  paint-order: stroke;
}

.footprint-map-caption {
  position: absolute;
  z-index: 3;
  top: 74px;
  left: 18px;
  color: rgba(198, 226, 231, 0.55);
  font-family: Georgia, serif;
  font-size: 8px;
  font-weight: 700;
  pointer-events: none;
}

.footprint-controls {
  position: absolute;
  z-index: 5;
  top: 50%;
  right: 13px;
  display: grid;
  gap: 4px;
  transform: translateY(-50%);
}

.footprint-controls button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(151, 195, 204, 0.2);
  border-radius: 9px;
  background: rgba(7, 24, 33, 0.78);
  color: #d9ecef;
  cursor: pointer;
  font-size: 18px;
}

.footprint-sheet {
  position: relative;
  z-index: 6;
  margin-top: auto;
  padding: 12px 16px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(128, 184, 195, 0.18);
  border-radius: 14px 14px 0 0;
  background: rgba(9, 29, 39, 0.92);
  box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.footprint-tabs {
  display: grid;
  width: min(286px, 78%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: -2px auto 12px;
  padding: 3px;
  border: 1px solid rgba(134, 186, 196, 0.14);
  border-radius: 999px;
  background: rgba(3, 15, 22, 0.44);
}

.footprint-tab {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7798a1;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.footprint-tab.active {
  background: #0f7f8e;
  color: white;
}

.footprint-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.footprint-summary-copy span {
  display: block;
  color: #8aa8af;
  font-size: 9px;
  font-weight: 700;
}

.footprint-summary-copy strong {
  display: block;
  margin-top: 3px;
  color: #eaf9fb;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  line-height: 1;
}

.footprint-summary-copy strong em {
  margin: 0 3px;
  color: #7fd7df;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-style: normal;
}

.footprint-summary-meta {
  flex: 1;
  max-width: 245px;
  color: #86a3ab;
  font-size: 8px;
  line-height: 1.6;
  text-align: right;
}

.footprint-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.footprint-actions button {
  min-height: 38px;
  flex: 1;
  border: 1px solid rgba(115, 190, 202, 0.25);
  border-radius: 8px;
  background: rgba(13, 47, 59, 0.82);
  color: #d9edf0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.footprint-actions button.primary {
  border-color: #148394;
  background: #0d7c8b;
  color: white;
}

.footprint-picker {
  position: absolute;
  z-index: 10;
  right: 12px;
  bottom: calc(100% + 8px);
  left: 12px;
  padding: 14px;
  border: 1px solid rgba(126, 190, 201, 0.22);
  border-radius: 12px;
  background: rgba(8, 27, 37, 0.98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.footprint-picker[hidden] {
  display: none;
}

.footprint-picker h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

.footprint-picker-row {
  display: flex;
  gap: 7px;
}

.footprint-picker select,
.footprint-picker input {
  min-width: 0;
  min-height: 36px;
  flex: 1;
  padding: 0 9px;
  border: 1px solid rgba(137, 190, 200, 0.2);
  border-radius: 7px;
  outline: 0;
  background: #0d2935;
  color: #e4f2f4;
  font: inherit;
  font-size: 9px;
}

.footprint-picker button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: #0c8090;
  color: white;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}

.footprint-picker button:disabled {
  cursor: default;
  opacity: 0.42;
}

.footprint-picker-note {
  margin: 8px 0 0;
  color: #75949c;
  font-size: 8px;
}

.footprint-toast {
  position: fixed;
  z-index: 1210;
  bottom: 180px;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 9px 13px;
  border-radius: 7px;
  background: #071820;
  color: #e3f2f4;
  font-size: 9px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

@media (min-width: 760px) {
  .footprint-overlay {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }

  .footprint-shell {
    position: relative;
    display: flex;
    width: min(1180px, 100%);
    height: min(860px, calc(100vh - 48px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(115, 170, 181, 0.2);
    border-radius: 14px;
    background: #07131b;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
  }

  .footprint-head {
    position: absolute;
    padding: 18px 20px 34px;
  }

  .footprint-sheet {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    width: auto;
    margin: 0;
    border: 1px solid rgba(128, 184, 195, 0.2);
    border-radius: 12px;
  }

  .footprint-stage {
    min-height: 0;
  }
}

@media (max-width: 759px) {
  .footprint-shell {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
  }

  .footprint-stage {
    flex: 1;
  }

  .footprint-sheet {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

.footprint-picker-head {
  position: sticky;
  z-index: 2;
  top: -14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -14px -14px 12px;
  padding: 14px;
  border-bottom: 1px solid rgba(89, 109, 101, 0.16);
  background: rgba(247, 243, 234, 0.98);
  backdrop-filter: blur(10px);
}

.footprint-picker-head span {
  color: #947550;
  font-family: Georgia, serif;
  font-size: 8px;
  font-weight: 700;
}

.footprint-picker-head h3 {
  margin: 3px 0 0;
}

.footprint-picker-head > button {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(88, 105, 96, 0.2);
  border-radius: 50%;
  background: white;
  color: #31574d;
  cursor: pointer;
  font-size: 22px;
}

.footprint-picker-done {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: #2d6f63;
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.footprint-share-preview {
  position: fixed;
  z-index: 1400;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 27, 23, 0.68);
  backdrop-filter: blur(8px);
}

.footprint-share-panel {
  display: flex;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(224, 213, 190, 0.7);
  border-radius: 12px;
  background: #f7f3ea;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.footprint-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(93, 109, 99, 0.14);
  background: #fffdf8;
}

.footprint-share-head span {
  display: block;
  color: #8b7656;
  font-family: Georgia, serif;
  font-size: 8px;
}

.footprint-share-head strong {
  display: block;
  margin-top: 2px;
  color: #24483f;
  font-size: 15px;
}

.footprint-share-head button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(92, 108, 99, 0.2);
  border-radius: 50%;
  background: white;
  color: #36574f;
  cursor: pointer;
  font-size: 22px;
}

.footprint-share-image {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 12px;
  background: #e7e1d5;
}

.footprint-share-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(49, 42, 30, 0.16);
}

.footprint-share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px max(14px, env(safe-area-inset-bottom));
  background: #fffdf8;
}

.footprint-share-actions button {
  min-height: 42px;
  border: 1px solid rgba(69, 103, 92, 0.24);
  border-radius: 8px;
  background: white;
  color: #31584e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.footprint-share-actions button.primary {
  border-color: #2d6f63;
  background: #2d6f63;
  color: white;
}

@media (max-width: 759px) {
  .footprint-picker {
    position: fixed;
    z-index: 1220;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    max-height: 72vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px;
    border-radius: 14px;
  }

  .footprint-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .footprint-picker select,
  .footprint-picker input,
  .footprint-picker button {
    min-height: 42px;
    font-size: 12px;
  }

  .footprint-picker-note {
    font-size: 11px;
  }

  .footprint-share-preview {
    padding: 8px;
  }

  .footprint-share-panel {
    max-height: calc(100vh - 16px);
  }

  .footprint-share-image {
    padding: 8px;
  }
}

/* Court Archive theme: aligned with the experience-card visual language. */
.footprint-overlay {
  background:
    linear-gradient(rgba(97, 82, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 82, 58, 0.035) 1px, transparent 1px),
    linear-gradient(150deg, #f1ede3, #e7e2d5 58%, #ece6d9);
  background-size: 42px 42px, 42px 42px, auto;
  color: #1b2a25;
}

.footprint-head {
  background: linear-gradient(to bottom, rgba(245, 242, 234, 0.98), rgba(245, 242, 234, 0));
}

.footprint-head button {
  border-color: rgba(87, 72, 48, 0.2);
  background: rgba(250, 247, 239, 0.92);
  color: #25483f;
  box-shadow: 0 5px 14px rgba(56, 45, 28, 0.08);
}

.footprint-brand strong {
  color: #163b34;
}

.footprint-brand span {
  color: #8a7453;
}

.footprint-stage {
  background:
    linear-gradient(rgba(99, 82, 54, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 82, 54, 0.055) 1px, transparent 1px),
    linear-gradient(145deg, #f7f3e9, #ebe5d8);
  background-size: 42px 42px, 42px 42px, auto;
}

.footprint-stage::after {
  background:
    linear-gradient(to bottom, rgba(246, 242, 233, 0.82), transparent 18%, transparent 72%, rgba(226, 219, 205, 0.52)),
    linear-gradient(90deg, rgba(244, 240, 231, 0.62), transparent 18%, transparent 82%, rgba(244, 240, 231, 0.62));
}

.footprint-country,
.footprint-city {
  fill: #ddd5c5;
  stroke: #a79a82;
}

.footprint-country:hover,
.footprint-city:hover {
  fill: #d1c7b4;
}

.footprint-country.is-visited {
  fill: #2e766b;
  stroke: #4aa9a3;
  stroke-width: 0.8;
  filter: drop-shadow(0 0 3px rgba(52, 172, 184, 0.52));
  stroke-linejoin: round;
}

.footprint-country {
  stroke: #ddd5c5;
  stroke-width: 1.2;
}

.footprint-country-boundaries {
  fill: none;
  stroke: rgba(102, 121, 114, 0.44);
  stroke-width: 0.5;
  stroke-linejoin: round;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.footprint-china-province-base {
  fill: #ddd5c5;
  stroke: #ddd5c5;
  stroke-width: 1.2;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
}

.footprint-province-boundaries {
  fill: none;
  stroke: rgba(97, 116, 109, 0.5);
  stroke-width: 0.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.footprint-taiwan-province-outline {
  fill: none;
  stroke: rgba(97, 116, 109, 0.5);
  stroke-width: 0.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.footprint-visited-cities {
  filter: drop-shadow(0 0 3px rgba(52, 172, 184, 0.52));
}

.footprint-city {
  stroke: #ddd5c5;
  stroke-width: 1.35;
  shape-rendering: geometricPrecision;
  stroke-linejoin: round;
}

.footprint-city.is-visited {
  fill: #2e766b;
  stroke: #4aa9a3;
  stroke-width: 0.8;
  filter: none;
  stroke-linejoin: round;
}

.footprint-city-boundaries {
  fill: none;
  stroke: rgba(107, 126, 119, 0.42);
  stroke-width: 0.46;
  stroke-linejoin: round;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.footprint-province-outline {
  stroke: rgba(112, 96, 70, 0.48);
}

.footprint-south-sea-dashes {
  fill: rgba(98, 84, 62, 0.58);
}

.footprint-sansha {
  fill: #d8cfbe;
  stroke: rgba(100, 85, 61, 0.55);
}

.footprint-sansha.is-visited {
  fill: #2e766b;
  stroke: #174e47;
}

.footprint-map-label {
  fill: #4d321b;
  stroke: none;
  paint-order: normal;
  font-weight: 800;
  letter-spacing: 0;
  dominant-baseline: middle;
}

.footprint-map-label.country {
  fill: #4d321b;
}

.footprint-map-caption {
  color: rgba(92, 76, 51, 0.7);
  font-size: 9px;
}

.footprint-controls button {
  border-color: rgba(89, 72, 44, 0.22);
  background: rgba(250, 247, 239, 0.93);
  color: #31594f;
  box-shadow: 0 5px 14px rgba(58, 45, 28, 0.08);
}

.footprint-sheet {
  border-top-color: rgba(91, 74, 47, 0.14);
  background: rgba(244, 240, 231, 0.96);
  box-shadow: 0 -18px 42px rgba(67, 52, 31, 0.12);
}

.footprint-tabs {
  border-color: rgba(91, 74, 47, 0.16);
  background: rgba(226, 219, 205, 0.58);
}

.footprint-tab {
  color: #736a5a;
  font-size: 12px;
}

.footprint-tab.active {
  background: #174c43;
  color: #f8f5ed;
}

.footprint-summary-copy span {
  color: #7d715d;
  font-size: 10px;
}

.footprint-summary-copy strong {
  color: #173d36;
  font-size: 30px;
}

.footprint-summary-copy strong em {
  color: #34786f;
  font-size: 12px;
}

.footprint-summary-copy strong {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: "Bahnschrift", "DIN Alternate", "Arial", sans-serif;
}

.footprint-summary-copy strong b {
  color: #173d36;
  font-size: 34px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.footprint-summary-copy strong em {
  margin: 0 7px 0 3px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
}

.footprint-summary-meta {
  color: #776e5e;
  font-size: 9px;
}

.footprint-actions button {
  border-color: rgba(82, 66, 41, 0.25);
  background: rgba(255, 252, 244, 0.8);
  color: #42584f;
  font-size: 11px;
}

.footprint-actions button.primary {
  border-color: #174c43;
  background: #174c43;
  color: white;
}

.footprint-picker {
  border-color: rgba(86, 69, 43, 0.2);
  background: rgba(249, 246, 238, 0.99);
  box-shadow: 0 14px 34px rgba(58, 43, 23, 0.18);
}

.footprint-picker h3 {
  color: #1c3e36;
  font-size: 14px;
}

.footprint-picker select,
.footprint-picker input {
  border-color: rgba(87, 70, 43, 0.18);
  background: #eee8da;
  color: #2d3c36;
  font-size: 10px;
}

.footprint-picker button {
  background: #2e766b;
  color: white;
  font-size: 10px;
}

.footprint-picker-note {
  color: #81745f;
  font-size: 9px;
}

.footprint-toast {
  background: #173d36;
  color: #f8f5ed;
  font-size: 10px;
}

@media (min-width: 760px) {
  .footprint-shell {
    border-color: rgba(91, 74, 47, 0.18);
    background: #eee9de;
    box-shadow: 0 30px 90px rgba(50, 40, 26, 0.22);
  }

  .footprint-sheet {
    border-color: rgba(91, 74, 47, 0.18);
  }
}

@media (max-width: 759px) {
  .footprint-picker select,
  .footprint-picker input,
  .footprint-picker button,
  .footprint-picker-done {
    font-size: 12px;
  }

  .footprint-picker-note {
    font-size: 11px;
  }
}
