/* === 地球护照 · 共享样式 === */
/* 每个公园页面通过覆盖 --hero-grad 和 --season-grad 来定制外观 */

:root {
  --bg: #0f172a;
  --c: #1e293b;
  --a: #38bdf8;
  --g: #f59e0b;
  --gr: #22c55e;
  --t: #e2e8f0;
  --m: #94a3b8;
  --r: 14px;
  --hero-grad: linear-gradient(135deg, #2d4a3a, #1a4a5a 50%, #3a3a1a);
  --season-grad: linear-gradient(135deg, rgba(245,158,11,.15), rgba(34,197,94,.1));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--t);
  min-height: 100vh;
}

/* 顶栏 */
.bar {
  position: sticky; top: 0; z-index: 99;
  background: rgba(15,23,42,.95);
  padding: 10px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.bar h1 { font-size: 17px; }
.bar .bc {
  background: var(--g); color: #000;
  padding: 3px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}

/* 季节状态条 */
.season {
  background: var(--season-grad);
  margin: 8px 14px; padding: 10px 14px; border-radius: var(--r);
  font-size: 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.season .sicon { font-size: 22px; }
.season .stext { flex: 1; min-width: 150px; }
.season .stag {
  background: var(--g); color: #000;
  padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 700;
}

/* 标签导航 */
.tabs {
  display: flex; margin: 8px 14px;
  background: var(--c); border-radius: var(--r); padding: 3px;
  overflow-x: auto;
}
.tabs button {
  flex-shrink: 0; padding: 8px 12px;
  border: none; background: none; color: var(--m);
  font-size: 12px; font-weight: 600; cursor: pointer;
  border-radius: 11px; transition: .2s; white-space: nowrap;
}
.tabs button.on { background: var(--a); color: #000; }

/* 页面容器 */
.pg {
  display: none; padding: 0 14px 120px;
  animation: fadeIn .3s;
}
.pg.on { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }

/* 卡片 */
.card {
  background: var(--c); border-radius: var(--r);
  padding: 14px; margin-bottom: 10px;
}
.card h3 { font-size: 15px; margin-bottom: 8px; }
.card p { font-size: 13px; line-height: 1.7; color: var(--m); }
.card.clickable { cursor: pointer; transition: .2s; }
.card.clickable:hover { background: #253349; }

/* Hero 区域 */
.hero {
  background: var(--hero-grad);
  border-radius: var(--r); padding: 20px 16px; margin-bottom: 10px;
}
.hero .badge {
  display: inline-block; background: var(--a); color: #000;
  padding: 3px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700; margin-bottom: 6px;
}
.hero h2 { font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.hero .sub { font-size: 12px; color: var(--m); margin-top: 2px; }
.hero .tag { font-size: 13px; color: var(--a); font-style: italic; margin-top: 4px; }

/* 按钮区 */
.btns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 10px;
}
.btns button {
  padding: 8px 12px; border: none; border-radius: 12px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}
.btns button.pr { background: rgba(56,189,248,.12); color: var(--a); }
.btns button:not(.pr) { background: rgba(245,158,11,.08); color: var(--g); }

/* UNESCO 认证卡片 */
.unesco-card {
  background: linear-gradient(135deg, rgba(56,189,248,.08), rgba(56,189,248,.02));
  border: 1px solid rgba(56,189,248,.25);
  border-radius: var(--r); padding: 16px; margin-bottom: 10px;
}
.unesco-card h3 { font-size: 15px; color: var(--a); margin-bottom: 10px; }
.unesco-card .uc-item { display: flex; gap: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.6; }
.unesco-card .uc-num { color: var(--a); font-weight: 700; min-width: 24px; }

/* 地质点/文化点网格 */
.g2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px;
}
.g2 div {
  background: rgba(255,255,255,.04); padding: 9px; border-radius: 10px;
  font-size: 11px; cursor: pointer; transition: .2s;
}
.g2 div:hover { background: rgba(56,189,248,.1); }

/* 物种展开列表 */
.sp {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer; transition: .2s;
}
.sp:last-child { border: none; }
.sp:hover {
  background: rgba(56,189,248,.04);
  margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px;
}
.sp .si { font-size: 22px; width: 30px; text-align: center; }
.sp .sn { font-size: 12px; font-weight: 600; }
.sp .sd { font-size: 10px; color: var(--m); }
.sp .sx { display: none; font-size: 11px; color: var(--a); margin-top: 4px; line-height: 1.5; }
.sp.expanded .sx { display: block; }
.sp.expanded .sd { display: none; }

/* 路线卡片 */
.route-card {
  background: var(--c); border-radius: var(--r); padding: 14px;
  margin-bottom: 10px; border-left: 3px solid var(--a);
}
.route-card h4 { font-size: 15px; margin-bottom: 4px; }
.route-card .rmeta {
  font-size: 11px; color: var(--m); margin-bottom: 8px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.route-card .rmeta span {
  background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 8px;
}

/* 摄影机位 */
.photo-spot {
  background: rgba(245,158,11,.06); border: 1px solid rgba(245,158,11,.15);
  border-radius: 10px; padding: 10px; margin-top: 8px;
}
.photo-spot .pshead { font-weight: 600; font-size: 13px; }
.photo-spot .psdetail { font-size: 11px; color: var(--m); margin-top: 4px; }

/* AI 聊天 */
.chat-box {
  display: flex; flex-direction: column;
  height: calc(100vh - 200px);
}
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 6px 0;
  display: flex; flex-direction: column; gap: 8px;
}
.chat-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 16px;
  font-size: 13px; line-height: 1.6; animation: msgIn .3s;
}
.chat-msg.u {
  align-self: flex-end; background: var(--a); color: #000;
  border-bottom-right-radius: 4px;
}
.chat-msg.a {
  align-self: flex-start; background: var(--c);
  border-bottom-left-radius: 4px;
}
.chat-msg.a .lbl {
  font-size: 11px; color: var(--a); margin-bottom: 2px; font-weight: 600;
}
.chips {
  display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0;
}
.chips span {
  background: rgba(56,189,248,.12); color: var(--a);
  border: 1px solid rgba(56,189,248,.2);
  padding: 5px 10px; border-radius: 14px;
  font-size: 11px; cursor: pointer;
}
.chat-in {
  display: flex; gap: 8px; padding: 8px 0;
}
.chat-in input {
  flex: 1; background: var(--c); border: 1px solid rgba(255,255,255,.1);
  color: var(--t); padding: 12px 16px; border-radius: 22px;
  font-size: 13px; outline: none;
}
.chat-in input:focus { border-color: var(--a); }
.chat-in button {
  background: var(--a); color: #000; border: none;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 18px; cursor: pointer; flex-shrink: 0;
}

/* 打卡列表 */
.ck-list { display: flex; flex-direction: column; gap: 8px; }
.ck-item {
  background: var(--c); border-radius: var(--r); padding: 14px;
  display: flex; align-items: center; gap: 12px;
  border: 2px solid transparent;
}
.ck-item.done {
  border-color: var(--gr); background: rgba(34,197,94,.06);
}
.ck-item .ci { font-size: 30px; }
.ck-item .cn { font-size: 14px; font-weight: 600; }
.ck-item .cd { font-size: 11px; color: var(--m); margin-top: 2px; }
.ck-item button {
  padding: 7px 14px; border-radius: 16px;
  font-size: 12px; font-weight: 600; border: none; cursor: pointer;
}
.ck-item button.go { background: var(--a); color: #000; }
.ck-item button.ok { background: var(--gr); color: #fff; }

/* 护照页 */
.pp-head { text-align: center; padding: 12px 0; }
.pp-head .ppi { font-size: 36px; }
.pp-head h2 { font-size: 16px; margin-top: 4px; }
.pp-head .pt { color: var(--m); font-size: 12px; margin-top: 2px; }

.pbar {
  height: 8px; background: rgba(255,255,255,.08);
  border-radius: 4px; margin: 10px 0; overflow: hidden;
}
.pbar div {
  height: 100%; background: linear-gradient(90deg, var(--a), var(--gr));
  border-radius: 4px; transition: width .5s;
}

.badges { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bdg {
  background: var(--c); border-radius: var(--r);
  padding: 14px 8px; text-align: center; opacity: .5;
  border: 2px solid rgba(255,255,255,.04);
}
.bdg.un {
  opacity: 1; filter: none;
  border-color: var(--g); background: rgba(245,158,11,.06);
}
.bdg .bi { font-size: 30px; }
.bdg .bn { font-size: 11px; font-weight: 700; margin-top: 4px; }
.bdg .bd { font-size: 10px; color: var(--m); margin-top: 2px; }

/* 照片墙 */
.photo-wall-title { font-size: 14px; font-weight: 700; margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.photo-cell { aspect-ratio: 1; border-radius: 10px; background: rgba(255,255,255,.04); border: 2px solid rgba(255,255,255,.06); overflow: hidden; position: relative; cursor: pointer; transition: .2s; display: flex; align-items: center; justify-content: center; }
.photo-cell:hover { border-color: var(--a); }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.photo-cell .ph-empty { font-size: 28px; opacity: .25; }
.photo-cell.has-photo { border-color: rgba(34,197,94,.3); }
.photo-viewer { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 300; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.photo-viewer img { max-width: 95vw; max-height: 90vh; border-radius: 12px; }
.photo-viewer .ph-close { position: absolute; top: 16px; right: 20px; color: #fff; font-size: 28px; cursor: pointer; z-index: 301; }
.ck-photo-btn { margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.15); color: var(--m); padding: 4px 10px; border-radius: 12px; font-size: 14px; cursor: pointer; transition: .2s; }
.ck-photo-btn:hover { border-color: var(--a); color: var(--a); }
.ck-photo-btn.has-photo { border-color: var(--gr); color: var(--gr); }

/* Toast */
.toast {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  background: var(--gr); color: #fff;
  padding: 10px 22px; border-radius: 22px;
  font-size: 13px; font-weight: 600; z-index: 200;
  animation: tIn .3s, tOut .3s 1.7s forwards;
}
@keyframes tIn { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } }
@keyframes tOut { to { opacity: 0; transform: translateX(-50%) translateY(-8px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }

/* 弹窗 */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .25s;
}
.modal {
  background: var(--c); border-radius: var(--r); padding: 20px;
  max-width: 360px; width: 90%; max-height: 80vh; overflow-y: auto;
  text-align: center;
}
.modal .micon { font-size: 50px; }
.modal h3 { font-size: 18px; margin: 8px 0 4px; }
.modal .mp { font-size: 13px; color: var(--m); line-height: 1.7; }
.modal .mtag {
  display: inline-block; background: rgba(56,189,248,.12); color: var(--a);
  font-size: 11px; padding: 3px 10px; border-radius: 10px; margin: 4px;
}
.modal .mbtn {
  display: block; width: 100%; margin-top: 12px; padding: 10px;
  border: none; border-radius: 20px; font-size: 14px;
  font-weight: 700; cursor: pointer;
}
.modal .mbtn.primary { background: var(--a); color: #000; }
.modal .mbtn.secondary { background: rgba(255,255,255,.08); color: var(--t); }

/* 高亮文字 */
.highlight { color: var(--g); font-weight: 600; }

/* 推荐列表 */
.reco-item {
  background: var(--c); border-radius: var(--r);
  padding: 10px 14px; margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px;
}

/* 响应式 */
@media (min-width: 500px) {
  .pg { max-width: 480px; margin: 0 auto; }
  .tabs { max-width: 480px; margin: 8px auto; }
  .season { max-width: 480px; margin: 8px auto; }
}

/* 省级/全国共享：返回链接、标签 */
.ah-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--a); text-decoration: none;
  margin-bottom: 10px; padding: 4px 12px; border-radius: 20px;
  background: rgba(56,189,248,.1);
  border: 1px solid rgba(56,189,248,.12);
}
.ah-back:hover {
  background: rgba(56,189,248,.2);
  border-color: rgba(56,189,248,.25);
}

/* 标签色系 */
.bdg-mix { background: linear-gradient(135deg,#d4a017,#2e7d32); color: #fff; }
.bdg-cul { background: rgba(212,160,23,.15); color: #d4a017; border: 1px solid rgba(212,160,23,.3); }
.bdg-geo { background: rgba(56,189,248,.12); color: var(--a); border: 1px solid rgba(56,189,248,.25); }
.bdg-bio { background: rgba(34,197,94,.12); color: var(--gr); border: 1px solid rgba(34,197,94,.25); }
.bdg-irr { background: rgba(99,102,241,.12); color: #818cf8; border: 1px solid rgba(99,102,241,.25); }
.bdg-iucn { background: rgba(245,158,11,.12); color: var(--g); border: 1px solid rgba(245,158,11,.25); }
.bdg-nat { background: rgba(34,197,180,.12); color: #2dd4bf; border: 1px solid rgba(34,197,180,.25); }

/* passport 分享预览 */
.pp-teaser {
  background: var(--c); border-radius: var(--r);
  padding: 14px; margin: 10px 14px 16px; text-align: center;
}
.pp-teaser h4 { font-size: 13px; margin-bottom: 8px; }
.pp-teaser .pp-icons { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.pp-teaser .pp-icon {
  font-size: 20px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(255,255,255,.04);
}
.pp-teaser .pp-link {
  display: inline-block; color: var(--a); font-size: 12px; font-weight: 600;
  text-decoration: none; padding: 6px 16px; border-radius: 16px;
  background: rgba(56,189,248,.08);
}
.pp-teaser .pp-link:hover { background: rgba(56,189,248,.15); }

/* 简易页问答卡片 */
.qa-section { margin: 0 14px 16px; }
.qa-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.qa-card { background: var(--c); border-radius: var(--r); padding: 0; margin-bottom: 6px; overflow: hidden; }
.qa-card summary { padding: 12px 14px; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.qa-card summary::-webkit-details-marker { display: none; }
.qa-card summary::after { content: '▸'; font-size: 12px; color: var(--a); transition: .2s; }
.qa-card[open] summary::after { transform: rotate(90deg); }
.qa-card .qa-answer { padding: 0 14px 14px; font-size: 12px; color: var(--m); line-height: 1.7; }
@media(min-width:500px){.qa-section{max-width:480px;margin-left:auto;margin-right:auto}}
