/* World · 城市风物志 — visual system */
:root {
  --accent: #6c8cff;
  --bg: #0b0d14;
  --bg-2: #11141f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f8;
  --text-dim: #aab2c5;
  --text-faint: #7b8398;
  --gold: #ffcf5c;
  --teal: #3ad6b4;
  --gray: #9aa3b5;
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --maxw: 1180px;
  --font: 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', 'Noto Sans SC', sans-serif;
}
:root[data-theme='light'] {
  --bg: #f5f6fb;
  --bg-2: #ffffff;
  --surface: rgba(20, 26, 48, 0.035);
  --surface-2: rgba(20, 26, 48, 0.06);
  --border: rgba(20, 26, 48, 0.1);
  --border-strong: rgba(20, 26, 48, 0.18);
  --text: #161a26;
  --text-dim: #4b5468;
  --text-faint: #7b8398;
  --shadow: 0 18px 44px -24px rgba(40, 50, 90, 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(120, 90, 255, 0.16), transparent 55%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 16px clamp(16px, 4vw, 40px);
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: padding .25s ease, border-color .25s ease, background .25s ease;
}
.site-header.scrolled { padding-top: 10px; padding-bottom: 10px; border-color: var(--border); }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 800; }
.brand-globe { font-size: 1.6rem; filter: drop-shadow(0 2px 8px rgba(108,140,255,.5)); animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-text { font-size: 1.2rem; line-height: 1; display: flex; flex-direction: column; gap: 2px; }
.brand-text small { font-family: var(--font); font-weight: 400; font-size: .62rem; letter-spacing: .32em; color: var(--text-faint); text-transform: uppercase; }
.crumbs { display: flex; align-items: center; gap: 8px; flex: 1; font-size: .9rem; overflow: hidden; flex-wrap: wrap; }
.crumb { color: var(--text-dim); padding: 3px 4px; border-radius: 7px; transition: color .15s; white-space: nowrap; }
.crumb:hover { color: var(--text); }
.crumb.current { color: var(--text); font-weight: 600; }
.crumb-sep { color: var(--text-faint); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.05rem; flex: none;
  transition: background .2s, transform .2s;
}
.theme-toggle:hover { background: var(--surface-2); transform: rotate(180deg); }

/* ---------- layout ---------- */
.app { max-width: var(--maxw); margin: 0 auto; padding: clamp(18px, 4vw, 40px); }
.app.fade { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.loading { padding: 80px 0; text-align: center; color: var(--text-faint); }

/* ---------- hero ---------- */
.hero { position: relative; border-radius: 26px; overflow: hidden; margin-bottom: 34px;
  border: 1px solid var(--border); box-shadow: var(--shadow); }
.hero-inner { position: relative; padding: clamp(34px, 6vw, 72px) clamp(24px, 5vw, 56px); z-index: 1; }
.hero-world {
  background:
    radial-gradient(700px 360px at 78% 18%, rgba(108,140,255,.55), transparent 60%),
    radial-gradient(600px 360px at 12% 90%, rgba(58,214,180,.4), transparent 60%),
    linear-gradient(135deg, #1a1f3a, #0d1020);
}
.hero-city, .hero-district {
  background:
    radial-gradient(680px 360px at 82% 12%, color-mix(in srgb, var(--accent) 65%, transparent), transparent 62%),
    radial-gradient(520px 320px at 8% 96%, color-mix(in srgb, var(--accent) 32%, #6a3cff), transparent 60%),
    linear-gradient(135deg, #1a1f33, #0c0e18);
}
.hero::after { content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .05; }
.hero-kicker { margin: 0 0 14px; font-size: .72rem; letter-spacing: .36em; text-transform: uppercase; color: rgba(255,255,255,.7); font-weight: 600; }
.hero-title { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.02;
  font-size: clamp(2.3rem, 6vw, 4.4rem); color: #fff; display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.hero-en { font-size: .34em; font-weight: 600; letter-spacing: .06em; color: rgba(255,255,255,.62); }
.hero-sub, .hero-tagline { margin: 18px 0 0; color: rgba(255,255,255,.86); font-size: clamp(1rem, 2.2vw, 1.3rem); max-width: 40ch; }
.hero-tagline { font-weight: 500; }
.hero-blurb { margin: 14px 0 0; color: rgba(255,255,255,.66); max-width: 62ch; font-size: .98rem; }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats span { color: rgba(255,255,255,.7); font-size: .85rem; }
.hero-stats b { display: block; font-family: var(--display); font-size: 1.7rem; color: #fff; font-weight: 800; }
.district-hero-emoji { font-size: 3.2rem; margin-bottom: 6px; filter: drop-shadow(0 6px 16px rgba(0,0,0,.45)); }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-countries { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-cities { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-districts { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid-themes { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-spots { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.card {
  position: relative; display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s, background .25s;
}
a.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.card-body { flex: 1; min-width: 0; }
.card-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.18rem; }
.card-title small { font-family: var(--font); font-weight: 400; font-size: .72rem; color: var(--text-faint); letter-spacing: .05em; display: block; margin-top: 2px; }
.card-meta { margin: 8px 0 0; color: var(--text-dim); font-size: .82rem; }
.card-arrow { color: var(--text-faint); font-size: 1.3rem; transition: transform .25s, color .25s; flex: none; }
a.card:hover .card-arrow { transform: translateX(4px); color: var(--accent); }

.country-flag { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.country-card::before, .city-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 40%, #6a3cff)); opacity: .8; }

.city-card { --accent: #6c8cff; padding: 24px; flex-direction: column; align-items: stretch; min-height: 168px; }
.city-card-glow { position: absolute; inset: -40% 50% auto -40%; height: 220px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 50%, transparent), transparent 70%); opacity: .35; pointer-events: none; }
.city-tagline { margin: 10px 0 0; color: var(--text); font-weight: 500; }
.city-card .card-arrow { position: absolute; right: 20px; bottom: 18px; }

.district-card { flex-direction: column; align-items: flex-start; text-align: left; min-height: 150px; }
.district-emoji { font-size: 2rem; }
.district-card .card-title { font-size: 1.05rem; }

.theme-card { flex-direction: column; align-items: flex-start; cursor: default; }
.theme-card:hover { transform: none; }
.theme-title { margin: 0 0 8px; font-family: var(--display); font-size: 1rem; font-weight: 600; }
.theme-summary { margin: 0; color: var(--text-dim); font-size: .82rem; }

.block-title { font-family: var(--display); font-size: 1.25rem; margin: 38px 0 16px; display: flex; align-items: center; gap: 8px; }

/* ---------- district detail ---------- */
.district-intro {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 24px; color: var(--text-dim);
}
.district-intro p { margin: 0 0 8px; }
.district-intro p:last-child { margin: 0; }
.district-intro strong { color: var(--text); }

.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; position: sticky; top: 70px; z-index: 5; }
.filter-label { color: var(--text-faint); font-size: .85rem; }
.chip {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-dim);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: .82rem; font-family: var(--font);
  font-weight: 500; transition: all .18s; backdrop-filter: blur(8px);
}
.chip:hover { color: var(--text); border-color: var(--text-faint); }
.chip.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.chip-s.active { background: var(--gold); border-color: var(--gold); color: #2a210a; }
.chip-a.active { background: var(--teal); border-color: var(--teal); color: #06241d; }
.chip-b.active { background: var(--gray); border-color: var(--gray); color: #1a1d24; }

.spot-section { margin-bottom: 38px; }
.spot-section-title { font-family: var(--display); font-size: 1.1rem; margin: 0 0 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.spot-section-title .count { font-size: .72rem; color: var(--text-faint); background: var(--surface-2);
  border: 1px solid var(--border); padding: 1px 9px; border-radius: 999px; font-family: var(--font); }

.spot-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative;
  transition: transform .2s, border-color .2s, box-shadow .2s; overflow: hidden;
}
.spot-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gray); opacity: .8; }
.spot-card.tier-S::before { background: linear-gradient(var(--gold), #ff9d4d); }
.spot-card.tier-A::before { background: var(--teal); }
.spot-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.spot-head { display: flex; align-items: flex-start; gap: 10px; }
.tier-badge { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: .8rem; color: #1a1d24; background: var(--gray); }
.tier-badge.tier-S { background: linear-gradient(135deg, var(--gold), #ff9d4d); color: #2a1c04; box-shadow: 0 4px 12px rgba(255,180,60,.3); }
.tier-badge.tier-A { background: var(--teal); color: #052019; }
.spot-name { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.35; }
.spot-stars { color: var(--gold); font-size: .82rem; letter-spacing: 1px; margin-top: -4px; }
.spot-view { margin: 0; color: var(--text-dim); font-size: .86rem; }
.spot-fields { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.spot-fields li { display: flex; gap: 10px; font-size: .82rem; }
.fk { flex: none; width: 38px; color: var(--text-faint); font-size: .76rem; padding-top: 1px; }
.fv { color: var(--text-dim); min-width: 0; }
.spot-notes { margin: 2px 0 0; padding-left: 18px; color: var(--text-faint); font-size: .8rem; display: flex; flex-direction: column; gap: 3px; }
.spot-foot { margin-top: auto; padding-top: 6px; }
.map-link { font-size: .8rem; color: var(--accent); border: 1px solid var(--border-strong); padding: 4px 12px;
  border-radius: 999px; display: inline-block; transition: background .18s; }
.map-link:hover { background: var(--surface-2); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .85em; }

.section-head h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 6px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head h1 small { font-family: var(--font); font-weight: 400; font-size: .42em; color: var(--text-faint); letter-spacing: .1em; }
.section-head p { color: var(--text-dim); margin: 0 0 28px; }

.notfound { text-align: center; padding: 90px 0; }
.notfound h1 { font-family: var(--display); font-size: 4rem; margin: 0; color: var(--accent); }
.notfound a { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { max-width: var(--maxw); margin: 40px auto 0; padding: 28px clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--border); color: var(--text-faint); font-size: .82rem; display: flex; gap: 10px; align-items: center; }
.site-footer .dot { opacity: .5; }

@media (max-width: 640px) {
  .crumbs { font-size: .8rem; }
  .hero-stats { gap: 18px; }
  .filter-bar { top: 62px; }
}
