:root {
  color-scheme: dark;
  --bg: #12141A;
  --surface: #292a2d;
  --line: #ffffff20;
  --text: #f4f3ef;
  --muted: #aaaeb4;
  --yellow: #ffd54f;
  font: 16px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 17px;
  background: #ffffff08;
  color: inherit;
  font-size: .875rem;
  cursor: pointer;
}
button:hover { border-color: var(--yellow); }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.hero {
  position: relative;
  min-height: clamp(320px, 42vh, 470px);
  padding: 88px 20px 52px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  background: linear-gradient(180deg, #18191c22 32%, #12141Aa0 72%, var(--bg)), url("../assets/ditu.jpg") center top / cover no-repeat;
}
.hero-search { width: min(100%, 560px); text-align: center; }
.hero-search p { margin: 16px 0; color: #d5d5d7; font-size: .875rem; }
.hero-search strong { color: var(--yellow); }
.search {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 17px;
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.search:focus-within { border-color: var(--yellow); }
.search svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--yellow); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; min-width: 0; padding: 8px 0; outline: none; border: 0; background: transparent; color: var(--text); font-size: .95rem; }
.hero-actions { display: flex; justify-content: center; gap: 10px; }
.hero-actions button {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.hero-actions button:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px #ffd54f52;
}
.hero-actions .primary {
  color: #12141A;
  background: linear-gradient(90deg, #f1cf51 0%, #ffe484 100%);
  border-color: transparent;
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(215px, 17%, 370px);
  min-height: 480px;
  padding: 0 clamp(16px, 2vw, 40px);
}
.atlas { min-width: 0; padding: 25px clamp(12px, 3vw, 64px) 16px; }
.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--yellow);
  font-size: .95rem;
  font-weight: 600;
}
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 6px; background: var(--yellow); }
.canvas { position: relative; }
#map { display: block; width: 100%; height: clamp(480px, 57vw, 780px); }
.province { fill: #303236; stroke: #55595f; stroke-width: .7; stroke-linejoin: round; }
.boundary { fill: #74777b; stroke: none; }
.city { cursor: pointer; }
.city:focus { outline: none; }
.city .city-dot { fill: #ffe082; stroke: #ffe08235; stroke-width: 8; }
.city:hover .city-dot, .city:focus-visible .city-dot { stroke: #ffe08280; stroke-width: 12; }
.city text { fill: var(--text); font-size: 15px; paint-order: stroke; stroke: var(--bg); stroke-width: 4; stroke-linejoin: round; }
.city-leader { stroke: #ffe08285; stroke-width: 1; pointer-events: none; }
.city .number { fill: var(--yellow); }
.alliance { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 26px; padding: clamp(42px, 14vw, 230px) 16px 30px; }
.alliance-logo { width: min(100%, 176px); height: auto; }
.members { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.members[hidden] { display: none; }
.member { display: grid; place-items: center; gap: 6px; min-height: 66px; border-radius: 12px; text-align: center; padding: 7px; overflow-wrap: anywhere; }
.member img { display: block; width: 48px; height: 42px; object-fit: contain; }
.selection { position: absolute; inset: 15px 0 auto auto; width: min(330px, 100%); max-height: calc(100% - 30px); overflow: auto; background: #292a2df8; border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; box-shadow: 0 12px 32px #0007; }
.selection h2 { margin: 0 32px 12px 0; font-size: 1.1rem; }
.selection > button { float: right; border: 0; padding: 0 5px; font-size: 1.4rem; }
.selection p, .work small { color: var(--muted); }
.work { display: flex; gap: 12px; width: 100%; text-align: left; padding: 12px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.work img { width: 48px; height: 60px; object-fit: cover; border-radius: 6px; }
.work small { display: block; font-size: .8rem; }
.map-bottom { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.sync-status { color: var(--muted); font-size: .8125rem; }
.sync-status:empty { display: none; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .atlas { padding-inline: 0; }
  #map { height: auto; aspect-ratio: 960 / 790; }
  .city text { font-size: 21px; }
  .selection { inset: 4px 0 auto auto; max-height: calc(100% - 8px); }
  .alliance { padding: 24px 0; }
  .alliance-logo { width: 112px; }
}


.catalog {
  width: min(100%, 1180px);
  margin-inline: auto;
  padding: 36px 16px 48px;
}
.catalog .section-title { margin-bottom: 16px; }
.catalog-message { color: var(--muted); }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
@media (min-width: 768px) {
  .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
.catalog-card {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #272b30;
  text-align: left;
}
.catalog-card:hover { background: #30353b; }
.catalog-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e8eaed;
}
.catalog-cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catalog-cover.cover-missing {
  display: grid;
  place-items: center;
  background: #292a2d;
  color: var(--muted);
}
.catalog-body { display: block; padding: 12px 14px 14px; }
.catalog-name,
.catalog-meta {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-name {
  margin: 0 0 6px;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  -webkit-line-clamp: 2;
}
.catalog-meta {
  min-height: 1.45em;
  font-size: .72rem;
  line-height: 1.45;
  color: #9a9fa5;
  -webkit-line-clamp: 1;
}
@media (max-width: 760px) {
  .catalog { padding-top: 20px; }
}

.site-footer {
	background: var(--bg);
	color: var(--muted);
	font-size: 0.8125rem;
	line-height: 1.55;
	margin-top: 32px;
	padding: 40px 18px 36px;
	border-top: 1px solid rgba(0, 0, 0, 0.55);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.site-footer a {
	color: var(--yellow);
	text-decoration: none;
}
.site-footer a:hover {
	color: #ffe082;
	text-decoration: underline;
}
.footer-inner {
	max-width: 1180px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}
.footer-center {
	max-width: 42rem;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 14px;
}
.footer-brand-row {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.footer-brand-left {
	flex: 1 1 280px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 220px;
}
.footer-brand-right {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
}
.footer-logo-img {
	display: block;
	width: 200px;
	max-width: min(200px, 72vw);
	height: auto;
	margin: 0;
	object-fit: contain;
}
.footer-miniapp-img {
	display: block;
	width: 150px;
	max-width: min(150px, 42vw);
	height: auto;
	margin: 2px 0 0;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	object-fit: contain;
}
.footer-miniapp-tip {
	max-width: 9em;
	font-size: 0.82rem;
	line-height: 1.45;
	color: rgba(206, 206, 206, 0.92);
	text-align: left;
}
@media (max-width: 640px) {
	.footer-brand-row {
		justify-content: center;
	}
	.footer-brand-right {
		width: 100%;
		justify-content: center;
	}
	.footer-miniapp-tip {
		text-align: center;
	}
}
.footer-legal {
	margin: 0;
	font-size: 0.75rem;
	color: rgba(206, 206, 206, 0.88);
	line-height: 1.7;
	text-align: center;
}
.footer-social {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 6px;
	margin-top: 4px;
}
.footer-social .social-sep {
	color: rgba(206, 206, 206, 0.35);
	font-size: 0.7rem;
	user-select: none;
	padding: 0 2px;
}
.social-link {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--yellow);
	padding: 4px 6px;
	border-radius: 6px;
	transition: color 0.15s, background 0.15s;
}
.footer-social a:hover {
	color: #ffe082;
	background: rgba(241, 207, 81, 0.08);
	text-decoration: none;
}

/* 站点备案（公安备案待展示时可复用原样式扩展） */
.footer-beian {
	max-width: 1180px;
	margin: 28px auto 0;
	padding: 22px 18px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	text-align: center;
}
.footer-beian-line {
	margin: 0;
	font-size: 0.72rem;
	line-height: 1.7;
	color: rgba(206, 206, 206, 0.75);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 12px;
}
.footer-beian a {
	color: rgba(206, 206, 206, 0.85);
	text-decoration: none;
}
.footer-beian a:hover {
	color: #ffe082;
	text-decoration: underline;
}
.footer-gongan-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.footer-gongan-badge {
	width: 16px;
	height: 16px;
	display: inline-block;
	vertical-align: middle;
	object-fit: contain;
}


html:has(.store-dialog[open]) { overflow: hidden; }
.store-dialog {
  width: min(440px, 94vw);
  max-width: none;
  max-height: 92vh;
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #2a2b2f;
  color: var(--text);
  box-shadow: 0 24px 80px #0009;
}
.store-dialog[open] { display: flex; flex-direction: column; }
.store-dialog::backdrop { background: #0c0c0ec7; backdrop-filter: blur(3px); }
.detail-cover {
  flex: none;
  width: 100%;
  aspect-ratio: 1;
  max-height: 58vh;
  max-height: 58dvh;
  background: #292a2d;
}
.detail-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 16px 0;
  scrollbar-width: thin;
}
.detail-content:focus-visible { outline-offset: -2px; }
.detail-content h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.35;
}
.detail-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 10px;
  font-size: .875rem;
  color: var(--muted);
}
.detail-category { color: var(--yellow); }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 5px 12px;
  margin: 0;
}
.detail-field {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
  padding: 6px 0;
  border-bottom: 1px solid #ffffff0f;
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.detail-field-full { grid-column: 1 / -1; display: block; }
.detail-field dt { color: var(--muted); font-weight: 600; font-size: .8125rem; }
.detail-field dt::after { content: "："; }
.detail-field dd { min-width: 0; margin: 0; white-space: pre-line; }
.detail-field-full dt { margin-bottom: 5px; }
.detail-actions { flex: none; padding: 12px 16px 14px; }
.detail-actions button {
  width: 100%;
  border-radius: 10px;
  background: #ffffff09;
}

.city .city-pulse {
  fill: none;
  stroke: #ffe082;
  stroke-width: 1.2;
  opacity: 0;
  pointer-events: none;
}
.city:hover text, .city:focus-visible text { fill: #ffe082; }

@media (prefers-reduced-motion: no-preference) {
  .city-enter {
    animation: city-reveal 400ms ease-out var(--city-delay, 0ms) both;
  }
  .city-enter .city-pulse {
    animation: city-ripple 800ms ease-out calc(var(--city-delay, 0ms) + 140ms);
  }
  .city .city-dot { transition: stroke 180ms ease, stroke-width 180ms ease; }
  .selection:not([hidden]) { animation: panel-reveal 200ms ease-out both; }
  .catalog-card {
    transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
  }
  .catalog-cover img { transition: transform 340ms ease-out; }
  @media (hover: hover) and (pointer: fine) {
    .catalog-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 10px 24px #0005;
    }
    .catalog-card:hover img { transform: scale(1.035); }
  }
  .store-dialog[open] { animation: panel-reveal 230ms ease-out both; }
  .store-dialog[open]::backdrop { animation: backdrop-reveal 210ms ease-out both; }
}

@keyframes city-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes city-ripple {
  from { r: 5px; opacity: .65; }
  to { r: 21px; opacity: 0; }
}
@keyframes panel-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes backdrop-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.city-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.city-filters[hidden] { display: none; }
.city-filter {
  padding: 5px 12px;
  font-size: .8125rem;
  color: var(--text);
}
.city-filter[aria-pressed="true"] {
  border-color: #ffe082;
  background: #ffe082;
  color: #242015;
}
.catalog-card { position: relative; }
.catalog-location {
  position: absolute;
  top: 9px;
  left: 9px;
  max-width: calc(100% - 18px);
  padding: 3px 8px;
  border-radius: 6px;
  background: #12141aed;
  color: #ffe082;
  font-size: .75rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
