:root {
  color-scheme: light;
  --ink: #151718;
  --muted: #5f696b;
  --paper: #f7f5ef;
  --white: #ffffff;
  --line: rgba(21, 23, 24, 0.14);
  --shadow: 0 24px 80px rgba(17, 24, 39, 0.12);
  --soft-shadow: 0 14px 36px rgba(17, 24, 39, 0.10);
  --teal: #0f9f8f;
  --red: #e2553f;
  --blue: #2f7fd4;
  --yellow: #c48700;
  --violet: #7863d9;
  --green: #3b8b4f;
  --orange: #df6b25;
  --pink: #dd5b88;
  --cyan: #1f8aa5;
  --radius: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22360%22%20height%3D%22220%22%20viewBox%3D%220%200%20360%20220%22%3E%3Cg%20transform%3D%22rotate%28-18%20180%20110%29%22%3E%3Ctext%20x%3D%2224%22%20y%3D%22120%22%20fill%3D%22rgba%2821%2C23%2C24%2C0.06%29%22%20font-size%3D%2218%22%20font-family%3D%22PingFang%20SC%2C%20Microsoft%20YaHei%2C%20Arial%2C%20sans-serif%22%3E%E9%95%BF%E9%A2%88%E9%B9%BF%E5%AD%A6%E9%95%BF%EF%BC%88%E6%B9%96%E5%8C%97%E5%B7%A5%E7%A8%8B%E5%AD%A6%E9%99%A2%EF%BC%89%40hgcjlxz%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fsvg%3E"),
    linear-gradient(90deg, rgba(21, 23, 24, .045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(21, 23, 24, .04) 1px, transparent 1px),
    var(--paper);
  background-repeat: repeat, repeat, repeat, repeat;
  background-position: center center, 0 0, 0 0, 0 0;
  background-size: 360px 220px, 44px 44px, 44px 44px, auto;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: .01ms !important;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(21, 23, 24, .07);
  font-family: "Cascadia Mono", Consolas, monospace;
}

#campusCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: .42;
  z-index: -2;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.topbar[data-elevated="true"] {
  background: rgba(247, 245, 239, .88);
  border-bottom-color: var(--line);
  box-shadow: 0 14px 36px rgba(21, 23, 24, .08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(21, 23, 24, .2);
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: .76rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(255, 255, 255, .46);
  backdrop-filter: blur(14px);
}

.topnav a {
  padding: 9px 15px;
  color: var(--muted);
  font-size: .92rem;
  transition: color .25s var(--ease), background .25s var(--ease);
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink);
  background: rgba(21, 23, 24, .06);
  outline: 0;
}

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

body:not(.owner-unlocked) .owner-only {
  display: none !important;
}

.owner-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  background: rgba(255, 255, 255, .74);
  color: var(--ink);
  font-weight: 800;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}

.owner-button:hover,
.owner-button:focus-visible {
  transform: translateY(-2px);
  background: var(--white);
  border-color: rgba(21, 23, 24, .28);
  outline: 0;
}

.owner-button.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.owner-button,
.icon-button,
.back-top,
.image-action,
.primary-link,
.secondary-link,
.nav-button,
.filter-chip,
.route-tab,
.upload-mini,
.map-clear,
.pin-choice,
.detail-button,
.chip-icon,
.tool-button,
.pin-delete,
.image-nav {
  border: 1px solid rgba(21, 23, 24, .16);
  border-radius: var(--radius);
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: rgba(255, 255, 255, .66);
  color: var(--ink);
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}

.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-2px);
  background: var(--white);
  border-color: rgba(21, 23, 24, .28);
  outline: 0;
}

.owner-button svg,
.icon-button svg,
.primary-link svg,
.secondary-link svg,
.route-tab svg,
.search-box svg,
.image-action svg,
.upload-mini svg,
.back-top svg,
.meta svg,
.slot-row svg,
.nav-button svg,
.map-clear svg,
.detail-button svg,
.chip-icon svg,
.tool-button svg,
.pin-delete svg,
.image-nav svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.hero {
  position: relative;
  display: grid;
  min-height: 94vh;
  align-items: center;
  padding: 116px 7vw 72px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--paper));
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 75% 20%, rgba(47, 127, 212, .30), transparent 24%),
    radial-gradient(circle at 15% 70%, rgba(15, 159, 143, .26), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, .75), rgba(247, 245, 239, .2));
  overflow: hidden;
}

.hero-media.has-image {
  background-size: cover;
  background-position: center;
}

.hero-media.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247, 245, 239, .92), rgba(247, 245, 239, .52), rgba(247, 245, 239, .15));
}

.hero-media[data-empty="true"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(21, 23, 24, .12) 34% 35%, transparent 35% 100%),
    repeating-linear-gradient(145deg, rgba(21, 23, 24, .055) 0 2px, transparent 2px 18px);
  mask-image: linear-gradient(90deg, transparent, #000 42%, #000);
  opacity: .75;
}

.hero-media.drag-over,
.image-slot.drag-over {
  outline: 2px solid var(--teal);
  outline-offset: -8px;
}

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

.image-action {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px);
  transition: transform .25s var(--ease), background .25s var(--ease);
}

.image-action:hover,
.image-action:focus-visible {
  transform: translateY(-2px);
  background: var(--white);
  outline: 0;
}

.hero-content {
  width: min(760px, 100%);
  position: relative;
  z-index: 3;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: 4.8rem;
  line-height: .98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin: 26px 0 0;
  color: #2f383a;
  font-size: 1.18rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}

.primary-link {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 20px 50px rgba(21, 23, 24, .18);
}

.secondary-link {
  background: rgba(255, 255, 255, .62);
  color: var(--ink);
}

.primary-link:hover,
.primary-link:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible {
  transform: translateY(-3px);
  outline: 0;
}

.secondary-link:hover,
.secondary-link:focus-visible {
  background: var(--white);
}

.hero-radar {
  position: absolute;
  right: 8vw;
  bottom: 16vh;
  width: 260px;
  height: 260px;
  pointer-events: none;
}

.hero-radar span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(21, 23, 24, .22);
  border-radius: 50%;
  animation: radar 4.8s infinite var(--ease);
}

.hero-radar span:nth-child(2) {
  animation-delay: .9s;
}

.hero-radar span:nth-child(3) {
  animation-delay: 1.8s;
}

@keyframes radar {
  0% {
    opacity: 0;
    transform: scale(.28);
  }
  18% {
    opacity: .75;
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

.route-strip,
.modules {
  position: relative;
  z-index: 2;
}

.route-strip {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 28px;
  align-items: stretch;
  padding: 52px 7vw;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .38);
  backdrop-filter: blur(10px);
}

.section-heading h2,
.lab-header h2 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p:last-child {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading.compact h2 {
  font-size: 1.8rem;
}

.route-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.route-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .62);
  color: var(--muted);
  transition: color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}

.route-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
}

.route-tab:hover,
.route-tab:focus-visible {
  transform: translateY(-2px);
  outline: 0;
}

.route-card {
  grid-column: 2;
  min-height: 132px;
  padding: 22px;
  border: 1px solid rgba(21, 23, 24, .14);
  background: rgba(255, 255, 255, .68);
  box-shadow: var(--soft-shadow);
}

.route-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.route-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.route-step {
  position: relative;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(247, 245, 239, .62);
  overflow: hidden;
}

.route-step::before {
  content: attr(data-number);
  position: absolute;
  right: 10px;
  bottom: -12px;
  color: rgba(21, 23, 24, .08);
  font-size: 3rem;
  font-weight: 900;
}

.command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(620px, 100%);
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(21, 23, 24, .18);
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--soft-shadow);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  background: rgba(255, 255, 255, .68);
  color: var(--muted);
  transition: color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}

.filter-chip.is-active {
  color: var(--paper);
  background: var(--ink);
}

.filter-chip.is-static {
  cursor: default;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  transform: translateY(-2px);
  outline: 0;
}

.modules {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  align-items: start;
  padding: 32px 7vw 110px;
}

.module-rail {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 12px;
  border: 1px solid rgba(21, 23, 24, .14);
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
}

.rail-title {
  padding: 8px 8px 12px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.module-nav {
  display: grid;
  gap: 6px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}

.nav-button::before {
  content: "";
  width: 7px;
  height: 26px;
  background: var(--nav-color, var(--ink));
  transform: scaleY(.35);
  transform-origin: center;
  transition: transform .25s var(--ease);
}

.nav-button.is-active {
  color: var(--ink);
  background: rgba(21, 23, 24, .06);
}

.nav-button.is-active::before {
  transform: scaleY(1);
}

.nav-button:hover,
.nav-button:focus-visible {
  color: var(--ink);
  transform: translateX(2px);
  outline: 0;
}

.module-stage {
  display: grid;
  gap: 46px;
}

.module-panel {
  scroll-margin-top: 96px;
  padding: 38px 0 18px;
  border-top: 1px solid var(--line);
}

.module-top {
  display: grid;
  grid-template-columns: minmax(240px, .68fr) minmax(560px, 1.32fr);
  gap: 32px;
  align-items: start;
}

.module-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}

.module-kicker span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--paper);
  background: var(--accent);
}

.module-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.module-tone {
  display: none;
}

.map-stage {
  position: relative;
  min-height: 260px;
  border: 1px solid rgba(21, 23, 24, .14);
  background:
    linear-gradient(90deg, rgba(21, 23, 24, .06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(21, 23, 24, .05) 1px, transparent 1px),
    rgba(255, 255, 255, .68);
  background-size: 28px 28px;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.map-stage::before {
  display: none;
}

.satellite-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(21, 23, 24, .14);
  background: rgba(255, 255, 255, .68);
  box-shadow: var(--soft-shadow);
}

.map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-head strong,
.map-head small {
  display: block;
}

.map-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .76rem;
}

.map-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  background: rgba(247, 245, 239, .72);
  color: var(--muted);
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.map-clear:hover,
.map-clear:focus-visible {
  color: var(--ink);
  background: var(--white);
  outline: 0;
}

.pin-bank {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pin-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  background: rgba(247, 245, 239, .72);
  color: var(--muted);
  transition: color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}

.pin-choice span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  background: rgba(21, 23, 24, .08);
  color: var(--ink);
  font-size: .75rem;
  font-weight: 800;
}

.pin-choice.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, rgba(21, 23, 24, .16));
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  color: var(--ink);
}

.pin-choice.has-pin::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.pin-choice:hover,
.pin-choice:focus-visible {
  transform: translateY(-2px);
  color: var(--ink);
  outline: 0;
}

.satellite-map {
  height: 520px;
  min-height: 520px;
  background: #d8d6ce;
}

.amap-campus-pin {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50% 50% 50% 3px;
  background: var(--pin);
  color: var(--paper);
  box-shadow: 0 8px 20px rgba(21, 23, 24, .32);
  transform: rotate(-45deg);
}

.amap-campus-pin span {
  display: block;
  font-weight: 900;
  transform: rotate(45deg);
}

.amap-pin-label {
  padding: 3px 7px;
  border: 1px solid rgba(21, 23, 24, .14);
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  font-size: 12px;
  box-shadow: 0 6px 14px rgba(21, 23, 24, .12);
}

.map-notice {
  display: grid;
  min-height: inherit;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

.map-notice strong {
  color: var(--ink);
}

.pin-list {
  min-height: 34px;
  padding: 10px;
  background: rgba(247, 245, 239, .72);
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.pin-list strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.pin-summary {
  display: grid;
  gap: 6px;
}

.pin-row {
  display: grid;
  grid-template-columns: 24px 1fr 34px;
  align-items: center;
  gap: 8px;
  padding: 6px;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}

.pin-row:hover,
.pin-row:focus-visible,
.pin-row.is-active {
  outline: 0;
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, .7));
  transform: translateY(-1px);
}

.pin-row.is-active b {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.pin-row b {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--accent);
  color: var(--paper);
  font-size: .72rem;
}

.pin-row span {
  min-width: 0;
}

.pin-row span strong,
.pin-row span small {
  display: block;
}

.pin-row small {
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: .68rem;
  overflow-wrap: anywhere;
}

.pin-delete,
.chip-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: rgba(255, 255, 255, .62);
  color: var(--muted);
}

.pin-delete:hover,
.pin-delete:focus-visible,
.chip-icon:hover,
.chip-icon:focus-visible {
  color: var(--ink);
  background: var(--white);
  outline: 0;
}

.map-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-node {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(21, 23, 24, .2);
  background: var(--paper);
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(21, 23, 24, .12);
  transform: translate(-50%, -50%);
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}

.map-node::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  width: max-content;
  max-width: 110px;
  padding: 4px 7px;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
  font-size: .73rem;
  text-align: center;
  transform: translateX(-50%);
}

.map-node:hover,
.map-node:focus-visible,
.map-node.is-active {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--accent);
  color: var(--paper);
  outline: 0;
}

.panel-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 12px;
}

.card-interaction-tip {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(21, 23, 24, .12));
  background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, .72));
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
}

.module-panel.has-picked-element .card-interaction-tip {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 13%, rgba(255, 255, 255, .82));
}

.element-tools {
  display: flex;
  flex: 1 1 620px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.element-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.element-token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(255, 255, 255, .5);
}

.element-token .filter-chip {
  border: 0;
  background: transparent;
}

.element-token .filter-chip.is-active {
  background: var(--ink);
}

.element-index {
  display: grid;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  place-items: center;
  background: rgba(21, 23, 24, .08);
  color: currentColor;
  font-size: .72rem;
  font-weight: 800;
}

.tool-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  background: var(--ink);
  color: var(--paper);
  transition: transform .25s var(--ease), background .25s var(--ease);
}

.tool-button:hover,
.tool-button:focus-visible {
  transform: translateY(-2px);
  outline: 0;
}

.tool-button.danger {
  background: #b8322a;
}

.gender-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(21, 23, 24, .16);
  background: rgba(255, 255, 255, .62);
}

.gender-toggle button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.gender-toggle button.is-active {
  background: var(--ink);
  color: var(--paper);
}


/* 双保险隐藏规则：防止 .place-card { display:flex; } 覆盖浏览器默认 hidden 样式 */
[hidden],
.place-card[hidden],
.place-card.is-filtered-out {
  display: none !important;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.place-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  display: flex;
  min-height: 468px;
  flex-direction: column;
  border: 1px solid rgba(21, 23, 24, .14);
  background: rgba(255, 255, 255, .74);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transform-style: preserve-3d;
  transition: opacity .5s var(--ease), transform .5s var(--ease), box-shadow .28s var(--ease);
}

.place-card.is-visible {
  opacity: 1;
  transform: translateY(0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}

.place-card:hover {
  box-shadow: var(--shadow);
}

.place-card.is-hidden-card {
  border-style: dashed;
  opacity: .74;
}

body.owner-unlocked .place-card.is-hidden-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background: repeating-linear-gradient(135deg, rgba(21, 23, 24, .06) 0 8px, transparent 8px 16px);
  pointer-events: none;
}

.hidden-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 7;
  padding: 6px 10px;
  border: 1px solid rgba(21, 23, 24, .16);
  background: rgba(21, 23, 24, .88);
  color: var(--paper);
  font-size: .76rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(21, 23, 24, .18);
}

.place-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(255, 255, 255, .48), transparent 26%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}

.place-card:hover::after {
  opacity: 1;
}

.image-slot {
  position: relative;
  min-height: 210px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent),
    repeating-linear-gradient(135deg, rgba(21, 23, 24, .06) 0 2px, transparent 2px 16px),
    rgba(247, 245, 239, .8);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.image-slot.has-image::before,
.image-slot.has-image::after {
  display: none;
}

.image-slot::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(21, 23, 24, .28);
}

.image-slot::after {
  content: attr(data-label);
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 7px 9px;
  background: rgba(255, 255, 255, .78);
  color: var(--muted);
  font-size: .8rem;
}

.image-stack.has-image {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, #fff), rgba(247, 245, 239, .8));
}

.image-stack.has-image::before,
.image-stack.has-image::after {
  content: "";
  position: absolute;
  display: block;
  border: 1px solid rgba(21, 23, 24, .14);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  box-shadow: 0 12px 30px rgba(21, 23, 24, .12);
  pointer-events: none;
}

.image-stack.has-image::before {
  inset: 28px 20px 18px 28px;
  transform: rotate(-2.8deg) translate(-5px, 4px);
  opacity: .58;
}

.image-stack.has-image::after {
  inset: 24px 26px 22px 20px;
  transform: rotate(2deg) translate(7px, 0);
  opacity: .48;
}

.image-stack-frame {
  position: absolute;
  inset: 18px;
  z-index: 1;
  pointer-events: none;
}

.image-slide {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .75);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 36px rgba(21, 23, 24, .20);
  opacity: 0;
  transform: translateX(18px) scale(.94) rotate(1.2deg);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}

.image-slide.is-prev,
.image-slide.is-next {
  opacity: .50;
  filter: saturate(.9);
}

.image-slide.is-prev {
  z-index: 2;
  transform: translate(-18px, 8px) scale(.94) rotate(-2.4deg);
}

.image-slide.is-next {
  z-index: 2;
  transform: translate(18px, 10px) scale(.94) rotate(2.2deg);
}

.image-slide.is-active {
  z-index: 3;
  opacity: 1;
  filter: none;
  transform: translate(0, 0) scale(1) rotate(0);
}

.image-nav-bar {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
}

.image-nav {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: rgba(255, 255, 255, .84);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(21, 23, 24, .16);
  pointer-events: auto;
  backdrop-filter: blur(12px);
  transition: transform .22s var(--ease), background .22s var(--ease);
}

.image-nav:hover,
.image-nav:focus-visible {
  transform: translateY(-2px);
  background: var(--white);
  outline: 0;
}

.image-count {
  position: absolute;
  left: 0;
  bottom: 0;
  min-width: 52px;
  padding: 6px 9px;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(255, 255, 255, .88);
  color: var(--ink);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: .72rem;
  text-align: center;
  box-shadow: 0 10px 22px rgba(21, 23, 24, .12);
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.card-upload {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}

.upload-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(21, 23, 24, .10);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(247, 245, 239, .68);
  color: var(--muted);
  font-size: .76rem;
}

.place-card h3 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.28;
}

.place-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.fact-list {
  display: none;
  gap: 9px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.place-card.is-expanded .fact-list {
  display: grid;
}

.fact-list li {
  position: relative;
  padding-left: 15px;
  color: #3b4446;
  font-size: .92rem;
  line-height: 1.6;
}

.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .66em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  background: var(--ink);
  color: var(--paper);
  transition: transform .25s var(--ease), background .25s var(--ease);
}

.detail-button.ghost {
  background: rgba(247, 245, 239, .8);
  color: var(--ink);
}

.detail-button:hover,
.detail-button:focus-visible {
  transform: translateY(-2px);
  outline: 0;
}

.place-card.is-expanded .detail-button svg {
  transform: rotate(180deg);
}

.place-card.is-expanded .detail-button.ghost svg {
  transform: none;
}

.slot-name {
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: .76rem;
  overflow-wrap: anywhere;
}

.pulse-button {
  width: 30px;
  height: 30px;
  border: 0;
  background: var(--accent);
  color: var(--paper);
  cursor: pointer;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 34%, transparent);
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 36%, transparent);
  }
  70% {
    box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px dashed rgba(21, 23, 24, .18);
  background: rgba(255, 255, 255, .54);
  color: var(--muted);
}

.module-panel.has-empty .empty-state {
  display: block;
}

.module-panel.has-empty .card-grid {
  display: none;
}

.image-lab {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  justify-items: end;
  background: rgba(21, 23, 24, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease);
}

.content-editor {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: end;
  background: rgba(21, 23, 24, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease);
}

.content-editor.is-open {
  opacity: 1;
  pointer-events: auto;
}

.content-editor-panel {
  width: min(540px, 100%);
  height: 100%;
  margin: 0;
  padding: 28px;
  border: 0;
  background: var(--paper);
  box-shadow: -30px 0 80px rgba(21, 23, 24, .18);
  transform: translateX(24px);
  transition: transform .28s var(--ease);
  overflow: auto;
}

.content-editor.is-open .content-editor-panel {
  transform: translateX(0);
}

.editor-fields {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.editor-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.editor-fields input,
.editor-fields select,
.editor-fields textarea {
  width: 100%;
  border: 1px solid rgba(21, 23, 24, .18);
  border-radius: var(--radius);
  padding: 10px 11px;
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  outline: 0;
}

.editor-fields textarea {
  resize: vertical;
}

.editor-fields input:focus,
.editor-fields select:focus,
.editor-fields textarea:focus {
  border-color: rgba(21, 23, 24, .36);
  background: var(--white);
}

.editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.image-lab.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lab-panel {
  width: min(520px, 100%);
  height: 100%;
  padding: 28px;
  background: var(--paper);
  box-shadow: -30px 0 80px rgba(21, 23, 24, .18);
  transform: translateX(24px);
  transition: transform .28s var(--ease);
  overflow: auto;
}

.image-lab.is-open .image-lab-panel {
  transform: translateX(0);
}

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

.lab-copy {
  margin: 18px 0 22px;
  color: var(--muted);
  line-height: 1.8;
}

.slot-list {
  display: grid;
  gap: 10px;
}

.slot-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(21, 23, 24, .14);
  background: rgba(255, 255, 255, .58);
}

.lab-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(21, 23, 24, .10);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
}

.lab-tools small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.slot-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.upload-mini.ghost {
  background: rgba(255, 255, 255, .76);
}

.upload-mini.danger {
  background: #3a1515;
  color: #fff;
}

.upload-mini:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.slot-thumb {
  width: 38px;
  height: 38px;
  background:
    linear-gradient(135deg, rgba(15, 159, 143, .24), transparent),
    rgba(21, 23, 24, .08);
  background-size: cover;
  background-position: center;
}

.slot-row strong {
  display: block;
  font-size: .92rem;
}

.slot-row small {
  display: block;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: .72rem;
  overflow-wrap: anywhere;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--soft-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-top {
    grid-template-columns: 1fr;
  }

  .satellite-map {
    height: 460px;
    min-height: 460px;
  }

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

  .route-card {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .topbar {
    height: 66px;
    padding: 0 16px;
  }

  .topnav {
    display: none;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding: 104px 22px 66px;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  .hero-copy {
    font-size: 1.02rem;
  }

  .hero-radar {
    right: -60px;
    bottom: 8vh;
  }

  .route-strip,
  .modules {
    padding-left: 22px;
    padding-right: 22px;
  }

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

  .command-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-pills {
    justify-content: flex-start;
  }

  .element-tools {
    flex-direction: column;
  }

  .tool-actions,
  .map-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .modules {
    display: block;
    padding-top: 20px;
  }

  .module-rail {
    position: sticky;
    top: 66px;
    z-index: 20;
    margin: 0 -22px 26px;
    border-left: 0;
    border-right: 0;
    overflow: auto;
  }

  .rail-title {
    display: none;
  }

  .module-nav {
    display: flex;
    min-width: max-content;
  }

  .nav-button {
    width: auto;
    white-space: nowrap;
  }

  .nav-button::before {
    width: 0;
    margin: 0;
  }

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

  .image-action {
    right: 18px;
    bottom: 18px;
  }
}

@media (max-width: 540px) {
  .hero h1 {
    font-size: 2.45rem;
  }

  .section-heading h2,
  .lab-header h2 {
    font-size: 1.75rem;
  }

  .module-title {
    font-size: 1.65rem;
  }

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

  .hero-actions,
  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .image-lab-panel {
    padding: 22px;
  }

  .satellite-map {
    height: 360px;
    min-height: 360px;
  }

  .slot-row {
    grid-template-columns: 34px 1fr;
  }

  .slot-row .upload-mini {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

/* === ChatGPT 修复补丁：图片双击展开、备份按钮、移动端稳定性 === */
.image-expand-hint {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  padding: 6px 9px;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(255, 255, 255, .84);
  color: var(--muted);
  font-size: .72rem;
  pointer-events: none;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 18px rgba(21, 23, 24, .10);
}

.image-nav-bar + .image-expand-hint,
.image-stack .image-nav-bar ~ .image-expand-hint {
  display: none;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 78px 22px 28px;
  background: rgba(12, 14, 15, .88);
  backdrop-filter: blur(18px);
}

.image-viewer.is-open {
  display: flex;
}

.image-viewer img {
  display: block;
  max-width: min(1180px, 94vw);
  max-height: calc(100vh - 122px);
  object-fit: contain;
  background: rgba(255, 255, 255, .05);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}

.image-viewer-toolbar {
  position: absolute;
  top: 18px;
  left: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.image-viewer-toolbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer-toolbar span {
  margin-left: auto;
  color: rgba(255, 255, 255, .74);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: .82rem;
}

.image-viewer-toolbar .icon-button {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.image-viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.image-viewer-nav.prev {
  left: 22px;
}

.image-viewer-nav.next {
  right: 22px;
}

.image-viewer-nav:hover,
.image-viewer-nav:focus-visible,
.image-viewer-toolbar .icon-button:hover,
.image-viewer-toolbar .icon-button:focus-visible {
  background: rgba(255, 255, 255, .26);
  outline: 0;
}

@media (max-width: 720px) {
  .image-viewer {
    padding: 72px 12px 22px;
  }

  .image-viewer-nav {
    width: 38px;
    height: 38px;
  }

  .image-viewer-nav.prev {
    left: 10px;
  }

  .image-viewer-nav.next {
    right: 10px;
  }

  .image-viewer-toolbar {
    left: 12px;
    right: 12px;
  }

  .top-actions {
    gap: 6px;
  }
}

@media (max-width: 720px) {
  .owner-button span {
    display: none;
  }

  .owner-button {
    width: 42px;
    padding: 0;
  }
}


/* 2026-06 修复：板块管理 + 图片单张管理 */
.rail-actions {
  display: grid;
  margin-top: 10px;
}

.rail-add-section {
  width: 100%;
  min-height: 42px;
}

.section-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tool-button.ghost {
  border: 1px solid rgba(21, 23, 24, .14);
  background: rgba(255, 255, 255, .76);
  color: var(--ink);
}

.image-manager {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  padding: 22px;
  background: rgba(21, 23, 24, .58);
  backdrop-filter: blur(8px);
}

.image-manager.is-open {
  display: grid;
  place-items: center;
}

.image-manager-panel {
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(21, 23, 24, .18);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  padding: 22px;
}

.image-manager-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.image-manager-list {
  display: grid;
  gap: 12px;
}

.image-manager-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(255, 255, 255, .72);
}

.manager-thumb {
  width: 132px;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(21, 23, 24, .12);
  background: rgba(21, 23, 24, .06) center / contain no-repeat;
}

.manager-info strong,
.manager-info small {
  display: block;
}

.manager-info small {
  margin-top: 4px;
  color: var(--muted);
}

.manager-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.image-manager-empty {
  display: grid;
  gap: 6px;
  padding: 24px;
  border: 1px dashed rgba(21, 23, 24, .24);
  background: rgba(255, 255, 255, .56);
  color: var(--muted);
}

.image-manager-empty strong {
  color: var(--ink);
}

@media (max-width: 760px) {
  .image-manager {
    padding: 10px;
  }

  .image-manager-panel {
    padding: 16px;
  }

  .image-manager-item {
    grid-template-columns: 1fr;
  }

  .manager-thumb {
    width: 100%;
  }

  .manager-actions {
    justify-content: flex-start;
  }
}
