:root {
  --green: #1B5E3B; --green-dark: #154b2f; --sand: #C8956C; --sand-light: #E8D5B7; --bg: #F8F5F0;
  --text: #333333; --sub: #888888; --line: #ebe6dd; --white: #fff; --danger: #E74C3C;
  --team-C: #3498DB; --team-CP: #C8956C; --team-AB: #1B5E3B; --team-AP: #8E44AD;
  --serif: "Songti SC", "Noto Serif SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --topbar-h: calc(max(0.8rem, env(safe-area-inset-top)) + 2.25rem + 0.85rem);
  --tabbar-h: calc(3.6rem + env(safe-area-inset-bottom));
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.share-img { position: absolute; left: -9999px; top: 0; width: 300px; height: 300px; }
.page { max-width: 640px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + 1rem); }
.loading, .empty { text-align: center; color: var(--sub); padding: 3rem 1rem; }
.empty img { width: 96px; margin: 0 auto 0.6rem; opacity: 0.8; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--green); color: #fff; height: var(--topbar-h);
  padding: max(0.8rem, env(safe-area-inset-top)) 1rem 0.85rem; display: flex; align-items: center; gap: 0.8rem; }
.topbar .title { font: 600 1.25rem/2.25rem var(--serif); flex: 1; text-align: center; letter-spacing: 0.02em; }
.topbar.sub .title { text-align: left; }
.topbar .round { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.topbar .spacer { width: 2.25rem; flex: none; }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 底部 tab */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom); display: flex; justify-content: center; }
.tabbar-inner { width: 100%; max-width: 640px; display: flex; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; font-size: 0.72rem; color: var(--sub); padding: 0.35rem 0; }
.tab .icon { width: 1.35rem; height: 1.35rem; }
.tab.active { color: var(--green); }
.tab.active .pill { background: rgba(27,94,59,0.1); border-radius: 999px; padding: 0.25rem 1rem; }
.tab .pill { padding: 0.25rem 1rem; }
.tab.active::after { content: ""; width: 1.2rem; height: 3px; border-radius: 2px; background: var(--sand); margin-top: 0.1rem; }

/* 右下角浮动返回键（子页），顶栏返回不好按时用 */
.fab-back { position: fixed; z-index: 25; right: max(1rem, calc(50% - 320px + 1rem)); bottom: calc(var(--tabbar-h) + 1rem);
  width: 3rem; height: 3rem; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25); border: 2px solid rgba(255,255,255,0.7); }
.fab-back .icon { width: 1.4rem; height: 1.4rem; }
.fab-back:active { transform: scale(0.94); }

/* 通用 */
.wrap { padding: 0 1rem; }
.card { background: var(--white); border-radius: 16px; padding: 1rem; box-shadow: 0 2px 12px rgba(0,0,0,0.05); margin: 0.8rem 1rem; }
.section-title { display: flex; align-items: center; gap: 0.5rem; margin: 1.2rem 1rem 0.5rem; font-weight: 700; font-size: 1.05rem; }
.section-title::before { content: ""; width: 4px; height: 1.1rem; background: var(--sand); border-radius: 2px; }
.section-title .more { margin-left: auto; font-weight: 400; font-size: 0.8rem; color: var(--sub); }
.sub { color: var(--sub); font-size: 0.85rem; }
.tag { display: inline-block; font-size: 0.7rem; line-height: 1; padding: 0.3rem 0.5rem; border-radius: 999px; background: var(--sand-light); color: #7a5a3a; }
.tag.team-C { background: rgba(52,152,219,0.15); color: #1f6fa3; }
.tag.team-CP { background: rgba(200,149,108,0.2); color: #8a5a2e; }
.tag.team-AB { background: rgba(27,94,59,0.12); color: var(--green); }
.tag.team-AP { background: rgba(142,68,173,0.12); color: #6c3483; }
.tag.team-all { background: #eee; color: #666; }
.notice-box { background: #f6efe3; border-left: 3px solid var(--sand); border-radius: 8px; padding: 0.6rem 0.8rem; font-size: 0.88rem; color: #6b4e2e; margin-top: 0.6rem; }
.btn { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.85rem; background: var(--green); color: #fff; border: 0; }
.btn.ghost { background: transparent; border: 1px solid var(--green); color: var(--green); }
.btn.sand { background: var(--sand); }
.row { display: flex; align-items: center; gap: 0.75rem; }
.divider { height: 1px; background: var(--line); margin: 0.6rem 0; }
.md h2 { font: 700 1.1rem/1.5 var(--serif); margin: 1.2rem 0 0.4rem; color: var(--green); }
.md h3 { font-size: 1rem; margin: 1rem 0 0.3rem; }
.md p { margin: 0.5rem 0; }
.md ul, .md ol { padding-left: 1.3rem; margin: 0.5rem 0; }
.md img { border-radius: 10px; margin: 0.6rem 0; }
.md a { color: var(--green); text-decoration: underline; }

/* 队伍选择器 */
.team-select { display: flex; gap: 0.5rem; margin: 0.8rem 1rem 0; }
.team-select .chip { flex: 1; text-align: center; padding: 0.5rem 0; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 0.9rem; color: var(--sub); }
.team-select .chip.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
.team-select .label { font-size: 0.8rem; color: var(--sub); align-self: center; flex: none; }

/* 首页 hero */
.hero { position: relative; color: #fff; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.2rem 1rem 1.2rem;
  background: linear-gradient(160deg, #2a7a52, var(--green) 55%, #7a5a3a); overflow: hidden; }
.hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,0.55) 100%); }
.hero > * { position: relative; z-index: 1; }
.hero .kicker { display: inline-flex; align-items: center; gap: 0.3rem; border: 1px solid rgba(255,255,255,0.6); border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.75rem; margin-bottom: 0.6rem; width: max-content; }
.hero h1 { font: 700 1.8rem/1.25 var(--serif); margin: 0 0 0.5rem; }
.hero .meta { display: flex; gap: 1rem; font-size: 0.85rem; opacity: 0.95; margin-bottom: 0.7rem; }
.countdown { display: inline-flex; align-items: baseline; gap: 0.4rem; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.85rem; width: max-content; }
.countdown b { font-size: 1.1rem; color: #f3c98b; font-variant-numeric: tabular-nums; }
.weather-bar { display: flex; align-items: center; gap: 0.75rem; }
.weather-bar .t { font-size: 1.2rem; font-weight: 700; }
.weather-bar .go { margin-left: auto; font-size: 0.75rem; color: var(--sand); border: 1px solid var(--sand-light); border-radius: 999px; padding: 0.2rem 0.6rem; }
.pinned { display: flex; align-items: center; gap: 0.6rem; background: #f6efe3; border: 1px solid var(--sand-light); border-radius: 12px; padding: 0.7rem 0.9rem; margin: 0.8rem 1rem 0; font-size: 0.92rem; }
.pinned .icon { color: var(--sand); flex: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 1rem 1rem 0.6rem; }
.entry { background: #fff; border-radius: 16px; padding: 1rem; box-shadow: 0 2px 12px rgba(0,0,0,0.05); display: block; }
.entry .ic { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.7rem; }
.entry .ic .icon { width: 1.4rem; height: 1.4rem; }
.entry b { display: block; font-size: 1rem; }
.entry span { font-size: 0.78rem; color: var(--sub); }
.ic.green { background: rgba(27,94,59,0.1); color: var(--green); }
.ic.sand { background: rgba(200,149,108,0.18); color: #8a5a2e; }
.ic.blue { background: rgba(52,152,219,0.12); color: #1f6fa3; }
.ic.purple { background: rgba(142,68,173,0.12); color: #6c3483; }
.ic.red { background: rgba(231,76,60,0.1); color: #b03a2e; }
.ic.orange { background: rgba(230,126,34,0.12); color: #a04e0a; }
.ic.teal { background: rgba(22,160,133,0.12); color: #0e6655; }
.ic.gray { background: #eee; color: #555; }
.footer { text-align: center; color: var(--sub); font-size: 0.75rem; padding: 1.5rem 1rem 0.5rem; letter-spacing: 0.08em; }
.footer .line { width: 3rem; height: 1px; background: var(--sand); margin: 0 auto 0.8rem; }
.footer a.admin { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.8rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; background: #fff; letter-spacing: 0; }

/* 行程 */
.day-tabs { position: sticky; top: var(--topbar-h); z-index: 20; background: var(--bg); display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.6rem 1rem; scrollbar-width: none; box-shadow: 0 8px 14px -12px rgba(0,0,0,0.28); }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: none; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.9rem; min-width: 4.4rem; line-height: 1.2; }
.day-tab b { display: block; font-size: 0.85rem; }
.day-tab span { font-size: 0.68rem; color: var(--sub); }
.day-tab.active { background: var(--green); border-color: var(--green); color: #fff; }
.day-tab.active span { color: rgba(255,255,255,0.8); }
.day-head h2 { font: 700 1.05rem/1.4 var(--serif); color: var(--green); margin: 0 0 0.3rem; display: flex; align-items: center; gap: 0.4rem; }
.timeline { padding-left: 0.2rem; }
.tl-item { position: relative; padding: 0 0 1rem 1.3rem; border-left: 2px solid var(--sand-light); }
.tl-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.tl-item::before { content: ""; position: absolute; left: -7px; top: 0.35rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--sand); }
.tl-item .time { font-size: 0.78rem; color: var(--sand); font-weight: 700; display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.tl-item .name { font-weight: 600; margin: 0.15rem 0; }
.tl-item .loc { font-size: 0.8rem; color: var(--sub); }
.tl-item .loc a { color: var(--green); }
.tl-item .detail { font-size: 0.88rem; color: #555; margin-top: 0.2rem; }

/* 列表行（地点/联络/手册） */
.rows .item { display: flex; align-items: center; gap: 0.8rem; background: #fff; border-radius: 14px; padding: 0.9rem 1rem; margin: 0.6rem 1rem; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.rows .item .ic { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.rows .item .body { flex: 1; min-width: 0; }
.rows .item b { display: block; }
.rows .item .chev { color: #bbb; }
.place-actions { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.subtabs { display: flex; gap: 0.5rem; padding: 0.6rem 1rem; position: sticky; top: var(--topbar-h); background: var(--bg); z-index: 20; }
.subtabs .chip { padding: 0.35rem 0.9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 0.85rem; }
.subtabs .chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.cat { margin: 0.6rem 1rem; background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.05); overflow: hidden; }
.cat summary { list-style: none; display: flex; align-items: center; padding: 0.8rem 1rem; font-weight: 600; cursor: pointer; }
.cat summary::-webkit-details-marker { display: none; }
.cat summary .n { margin-left: auto; font-size: 0.75rem; color: var(--sub); font-weight: 400; }
.cat .ci { display: flex; gap: 0.6rem; padding: 0.6rem 1rem; border-top: 1px solid var(--line); font-size: 0.9rem; }
.cat .ci .q { margin-left: auto; flex: none; }
.cat .ci small { display: block; color: var(--sub); font-size: 0.78rem; }
.fee-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.fee-table td { padding: 0.5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fee-table td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.fee-table small { display: block; color: var(--sub); font-size: 0.75rem; }
.wx-day { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.wx-day .d { width: 4.5rem; flex: none; }
.wx-day .r { margin-left: auto; font-variant-numeric: tabular-nums; }
.wx-now { text-align: center; padding: 0.5rem 0; }
.wx-now .big { font-size: 3rem; font-weight: 700; line-height: 1; }
.tel { color: var(--green); font-weight: 600; }
@media (min-width: 641px) { .page { box-shadow: 0 0 40px rgba(0,0,0,0.06); } }
