/* ============================================================
   晴历 · Apple 风安静科技
   - 系统字体栈 + 大字号留白
   - 毛玻璃(saturate) + 单一强调色
   - 昼夜自适应柔和渐变背景 + 柔光球
   - 侧栏：桌面右抽屉 / 手机底部 sheet
   ============================================================ */

/* ===== 设计令牌 ===== */
:root {
  --accent: #0abab5;          /* 蒂芙尼蓝 */
  --accent-soft: rgba(10,186,181,0.14);
  --radius: 22px;
  --radius-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "PingFang SC", "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif;
  --shadow-card: 0 10px 40px rgba(0,0,0,0.12);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* 白天主题 */
body[data-time="day"] {
  --bg-top: #9adbd6;
  --bg-mid: #c3ebe7;
  --bg-bot: #e8f7f5;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --card-bg: rgba(255,255,255,0.55);
  --card-border: rgba(255,255,255,0.7);
  --card-solid: rgba(255,255,255,0.82);
  --orb: radial-gradient(circle at 50% 45%, #ffffff 0%, #cdf3ef 28%, #8fd8d2 60%, #5fc4bd 100%);
  --orb-glow: rgba(129,216,208,0.5);
  --topbar-bg: rgba(255,255,255,0.6);
  --grain-op: 0.04;
}
/* 夜晚主题 */
body[data-time="night"] {
  --bg-top: #04181c;
  --bg-mid: #0a2a2d;
  --bg-bot: #0e3334;
  --text: #f5f5f7;
  --muted: #a1a1a8;
  --card-bg: rgba(16,46,48,0.5);
  --card-border: rgba(255,255,255,0.12);
  --card-solid: rgba(10,34,36,0.88);
  --orb: radial-gradient(circle at 50% 45%, #fff5 0%, #bfeee9 24%, #5fc4bd 58%, #2e8f89 100%);
  --orb-glow: rgba(95,196,189,0.3);
  --topbar-bg: rgba(8,30,32,0.6);
  --grain-op: 0.06;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-bot);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  letter-spacing: -0.01em;
  transition: color 0.6s ease;
}

/* ===== 背景层 ===== */
.bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-bot) 100%);
  transition: background 0.8s ease;
}
.bg-orb {
  position: absolute; top: 6%; left: 50%; width: min(52vw, 420px); aspect-ratio: 1/1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--orb);
  box-shadow: 0 0 120px 40px var(--orb-glow);
  filter: saturate(1.1);
  transition: background 0.8s ease, box-shadow 0.8s ease;
  animation: orbFloat 9s ease-in-out infinite;
}
@keyframes orbFloat { 50% { transform: translate(-50%, -2.4%); } }

.bg-stars { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; }
body[data-time="night"] .bg-stars { opacity: 1; }
.bg-stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: 0.8; }

.bg-grain { position: absolute; inset: 0; opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* 背景天气联动：蒂芙尼冷调渐变叠加（动画与过渡保持不变） */
.bg-tint { position: absolute; inset: 0; opacity: 0;
  transition: background 0.8s ease, opacity 0.8s ease; }
body[data-weather="sun"]      .bg-tint { opacity: .16; background: linear-gradient(180deg, #7fd0c8 0%, #b2e6e1 100%); }
body[data-weather="suncloud"] .bg-tint { opacity: .20; background: linear-gradient(180deg, #63b8b0 0%, #9fd8d2 100%); }
body[data-weather="cloud"]    .bg-tint { opacity: .28; background: linear-gradient(180deg, #5f8a88 0%, #8fb5b2 100%); }
body[data-weather="fog"]      .bg-tint { opacity: .28; background: linear-gradient(180deg, #8fa8a6 0%, #c0d4d2 100%); }
body[data-weather="rain"]     .bg-tint { opacity: .36; background: linear-gradient(180deg, #2f6b66 0%, #5b938e 100%); }
body[data-weather="snow"]     .bg-tint { opacity: .24; background: linear-gradient(180deg, #8fc2bd 0%, #c9eae6 100%); }
body[data-weather="thunder"]  .bg-tint { opacity: .40; background: linear-gradient(180deg, #1e3a3c 0%, #3d6360 100%); }

/* ===== 顶部导航 ===== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--topbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--card-border);
}
.brand { display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.05rem; font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
.brand-mark { color: var(--accent); }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: none;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 50%; cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.menu-btn:hover { background: rgba(10,186,181,0.2); }
.menu-btn:active { transform: scale(0.92); }

/* ===== 首页 ===== */
.home {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
  padding: 56px 22px 72px; text-align: center;
}
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: none; }
.date-hero {
  margin: 0; font-weight: 700;
  font-size: clamp(3.4rem, 13vw, 6rem); letter-spacing: -0.03em; line-height: 1;
  color: var(--text);
}
.date-sub { margin: 14px 0 0; color: var(--muted); font-size: 1.1rem; font-weight: 400; letter-spacing: 0.01em; }

/* 天气卡 */
.weather {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  width: 100%; max-width: 420px; margin: 38px auto 0; padding: 26px 28px;
  background: var(--card-bg);
  border: 0.5px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: background 0.6s ease;
}
.weather-top { display: flex; align-items: center; gap: 18px; }
.weather-ico { flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  color: #ffb02e; filter: drop-shadow(0 4px 10px rgba(255,170,40,0.35)); }
.weather-main { text-align: left; line-height: 1.12; }
.weather-temp { font-size: 3rem; font-weight: 600; letter-spacing: -0.03em; color: var(--text); }
.weather-temp .deg { font-size: 1.5rem; font-weight: 400; color: var(--muted); }
.weather-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  color: var(--muted); font-size: 0.98rem; margin-top: 6px; }
.weather-meta .sep { opacity: 0.45; }
.weather-meta .loc { display: inline-flex; align-items: center; gap: 3px; color: var(--text); font-weight: 500; }
.weather-meta .loc-ico { flex: 0 0 auto; transform: translateY(0.5px); color: var(--accent); }
.weather-detail { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
  font-size: 0.92rem; color: var(--muted); }
.weather-detail em { font-style: normal; color: var(--text); font-weight: 600; margin-left: 4px; }
.weather-search { display: flex; gap: 8px; width: 100%; max-width: 320px; }
.weather-search input {
  flex: 1; min-width: 0;
  background: rgba(127,127,127,0.12);
  border: 0.5px solid var(--card-border);
  border-radius: 980px; padding: 9px 16px;
  font-size: 0.9rem; font-family: inherit; color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.weather-search input::placeholder { color: var(--muted); }
.weather-search input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.btn-search {
  background: var(--accent); color: #fff; border: none; border-radius: 980px;
  padding: 0 20px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: transform 0.1s ease, filter 0.2s ease;
}
.btn-search:hover { filter: brightness(1.06); }
.btn-search:active { transform: scale(0.97); }
.weather.error #w-desc, .weather.error .weather-meta { color: #ff3b30; }

/* 空气质量 */
.weather-aqi { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px;
  font-size: 0.9rem; color: var(--muted); }
.weather-aqi em { font-style: normal; color: var(--text); font-weight: 600; margin: 0 2px; }
.weather-aqi .aqi-dot { width: 9px; height: 9px; border-radius: 50%;
  background: #34c759; color: #34c759; box-shadow: 0 0 8px currentColor; }
.weather-aqi i { font-style: normal; color: var(--accent); font-weight: 500; }

/* 生活指数 */
.weather-indices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 2px; }
.idx-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px;
  background: rgba(127,127,127,0.10); border-radius: 980px; font-size: 0.8rem; color: var(--text);
  border: 0.5px solid var(--card-border); }
.idx-chip b { font-weight: 600; color: var(--accent); margin-right: 2px; }
.idx-chip span { color: var(--muted); }

/* 24h 温度趋势 */
.weather-trend { width: 100%; max-width: 360px; margin-top: 4px; }
.trend-head { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; }
.trend-head span:last-child { color: var(--text); font-weight: 600; }
#w-trend { width: 100%; height: 72px; display: block; }

/* 快捷城市 */
.city-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: 460px; margin: 20px auto 0; }
.city-chip { padding: 7px 15px; border-radius: 980px; font-size: 0.86rem; cursor: pointer;
  background: var(--card-bg); border: 0.5px solid var(--card-border); color: var(--text);
  backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease; font-family: inherit; }
.city-chip:hover { background: rgba(10,186,181,0.14); }
.city-chip:active { transform: scale(0.96); }
.city-chip.active { background: var(--accent); color: #fff; border-color: transparent; }

/* 通用磨砂卡片 */
.card {
  background: var(--card-bg);
  border: 0.5px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 22px; transition: background 0.6s ease, transform 0.2s ease;
}

/* 首页农历黄历简略 */
.brief { max-width: 440px; margin: 26px auto 0; text-align: center; }
.brief-lunar { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.01em; color: var(--text); }
.brief-ganzhi { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.brief-yiji { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 16px 0 18px; font-size: 0.96rem; }
.brief-yiji .yi { color: var(--accent); }
.brief-yiji .ji { color: #ff453a; }
.brief-yiji em { font-style: normal; color: var(--text); margin-left: 4px; font-weight: 500; }
.btn-detail {
  display: inline-block;
  background: var(--accent-soft); color: var(--accent);
  border: none; border-radius: 980px; padding: 10px 22px;
  font-size: 0.92rem; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn-detail:hover { background: rgba(10,186,181,0.2); }
.btn-detail:active { transform: scale(0.97); }

/* 顶栏左组（搜索钮 + 品牌） */
.topbar-left { display: inline-flex; align-items: center; gap: 10px; }

/* 天气小百科（天气卡下方） */
.fact-card { max-width: 420px; margin: 22px auto 0; display: flex; align-items: baseline;
  justify-content: center; gap: 10px; text-align: center; }
.fact-k { font-weight: 600; color: var(--text); font-size: 0.95rem; white-space: nowrap; }
#wx-fact { color: var(--muted); font-size: 0.86rem; line-height: 1.6; }

/* 当前节气（日历黄历侧边栏内） */
.term-name { font-size: 1.35rem; font-weight: 600; color: var(--text); }
.term-desc { color: var(--muted); font-size: 0.88rem; margin-top: 4px; line-height: 1.6; }
.term-next { color: var(--accent); font-size: 0.84rem; margin-top: 8px; font-weight: 500; }

/* 搜索·热点 抽屉（左侧） */
.newsbar {
  position: fixed; top: 0; left: 0; height: 100dvh; width: 400px; max-width: 92vw;
  background: var(--card-solid);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-right: 0.5px solid var(--card-border);
  box-shadow: 20px 0 60px rgba(0,0,0,0.22);
  padding: 18px 20px 30px;
  padding-top: calc(18px + env(safe-area-inset-top));
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  transform: translateX(-100%); transition: transform 0.38s var(--ease);
  z-index: 50;
}
body.news-open .newsbar { transform: translateX(0); }
.web-search { display: flex; gap: 8px; }
.web-search input {
  flex: 1; min-width: 0;
  background: rgba(127,127,127,0.12);
  border: 0.5px solid var(--card-border);
  border-radius: 980px; padding: 9px 16px;
  font-size: 0.9rem; font-family: inherit; color: var(--text);
}
.web-search input::placeholder { color: var(--muted); }
.web-search input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.news-cap { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; }
.news-list { display: flex; flex-direction: column; gap: 8px; }
.news-item {
  display: block; padding: 11px 14px; border-radius: var(--radius-sm);
  background: rgba(127,127,127,0.08); text-decoration: none;
  color: var(--text); font-size: 0.9rem; line-height: 1.45;
  border: 0.5px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.news-item:hover { background: var(--accent-soft); border-color: var(--accent); }
.news-item .hot { color: var(--accent); font-weight: 600; margin-right: 6px; font-size: 0.8rem; }
.news-loading, .news-empty { color: var(--muted); font-size: 0.86rem; text-align: center; padding: 12px 0; }

/* ===== 出售页脚（Apple 脚注风） ===== */
.sale-footer {
  margin: 46px auto 0; max-width: 440px; text-align: center;
  padding: 18px 16px; color: var(--muted);
  font-size: 0.82rem; line-height: 1.7;
}
.sale-line { display: block; letter-spacing: 0.04em; opacity: 0.85; }
.sale-mail { display: inline-block; margin-top: 4px; color: var(--accent);
  text-decoration: none; font-weight: 500; border-bottom: 0.5px solid transparent;
  transition: border-color 0.2s ease; }
.sale-mail:hover { border-color: var(--accent); }

/* ===== 遮罩 + 侧栏 ===== */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none; transition: opacity 0.35s ease; z-index: 40;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
body.sidebar-open .backdrop { opacity: 1; pointer-events: auto; }

/* 桌面：右侧抽屉 */
.sidebar {
  position: fixed; top: 0; right: 0; height: 100dvh; width: 420px; max-width: 92vw;
  background: var(--card-solid);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-left: 0.5px solid var(--card-border);
  box-shadow: -20px 0 60px rgba(0,0,0,0.22);
  padding: 18px 20px 30px;
  padding-top: calc(18px + env(safe-area-inset-top));
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
  transform: translateX(100%); transition: transform 0.38s var(--ease);
  z-index: 50;
}
body.sidebar-open .sidebar { transform: translateX(0); }
.sheet-grab { display: none; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between;
  font-size: 1.1rem; font-weight: 600; letter-spacing: 0.02em; color: var(--text); padding: 2px 2px 0; }
.close-btn {
  width: 34px; height: 34px; border: none; background: rgba(127,127,127,0.16);
  border-radius: 50%; color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
}
.close-btn:hover { background: rgba(127,127,127,0.28); }
.close-btn:active { transform: scale(0.94); }

/* 日历 */
.cal-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-title { font-size: 1.2rem; font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
.cal-nav { width: 34px; height: 34px; border: none; background: rgba(127,127,127,0.14);
  border-radius: 50%; font-size: 1.2rem; line-height: 1; color: var(--text); cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease; }
.cal-nav:hover { background: rgba(127,127,127,0.26); }
.cal-nav:active { transform: scale(0.94); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-compact .cal-wk { text-align: center; color: var(--muted); font-size: 0.74rem; font-weight: 500; padding: 2px 0; }
.cal-compact .cal-cell {
  aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 0.9rem; color: var(--text);
  background: rgba(127,127,127,0.06); border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.cal-compact .cal-cell.empty { background: transparent; cursor: default; }
.cal-compact .cal-cell:not(.today):not(.empty):not(.selected):hover { background: rgba(10,186,181,0.14); }
.cal-compact .cal-cell.today { background: var(--accent); color: #fff; font-weight: 600; }
.cal-compact .cal-cell.selected { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }
.cal-hint { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 0.8rem; }

/* 黄历 */
.almanac { padding: 22px; }
.al-lunar { font-size: 1.5rem; font-weight: 600; letter-spacing: 0.01em; color: var(--text); }
.al-ganzhi { color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.al-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 12px; }
.al-tag { background: var(--accent-soft); color: var(--accent); padding: 5px 13px;
  border-radius: 980px; font-size: 0.84rem; font-weight: 500; }
.al-yiji { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.al-yi, .al-ji { background: rgba(127,127,127,0.08); border-radius: var(--radius-sm); padding: 14px; }
.al-yi .h, .al-ji .h { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.al-yi .h { color: var(--accent); }
.al-ji .h { color: #ff453a; }
.al-yi .c, .al-ji .c { font-size: 0.86rem; color: var(--text); line-height: 1.5; }
.al-chong { margin-top: 14px; padding-top: 12px; border-top: 0.5px solid var(--card-border);
  color: var(--muted); font-size: 0.86rem; }

/* ===== 欢迎页（Apple 激活风） ===== */
.welcome { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bot) 100%);
  overflow: hidden; transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease; }
.welcome.leave { opacity: 0; transform: scale(1.04); filter: blur(8px); pointer-events: none; }
#welcome-canvas { position: absolute; inset: 0; z-index: 1; }
.welcome-inner { position: relative; z-index: 2; text-align: center; padding: 24px;
  animation: welcomeIn 1.1s var(--ease) both; }
@keyframes welcomeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.welcome-mark { color: var(--accent); margin-bottom: 22px; animation: markPulse 3s ease-in-out infinite; }
@keyframes markPulse { 50% { transform: scale(1.06); opacity: 0.85; } }
.welcome-kicker { color: var(--accent); letter-spacing: 0.22em; font-size: 0.8rem; font-weight: 600; margin: 0 0 14px; }
.welcome-greeting { margin: 0; font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(2.8rem, 11vw, 5rem); color: var(--text); }
.welcome-sub { color: var(--muted); font-size: 1rem; margin: 16px auto 26px; max-width: 22em; }
.welcome-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 28px; }
.welcome-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  opacity: 0.35; animation: dotPulse 1.4s ease-in-out infinite; }
.welcome-dots span:nth-child(2) { animation-delay: 0.2s; }
.welcome-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse { 0%,100% { opacity: 0.3; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.15); } }
.welcome-enter {
  font-family: inherit; font-weight: 600; letter-spacing: 0.02em;
  font-size: 1.05rem; color: #fff;
  background: var(--accent); border: none; border-radius: 980px;
  padding: 13px 52px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(10,186,181,0.4);
  transition: transform 0.12s ease, filter 0.2s ease;
}
.welcome-enter:hover { filter: brightness(1.08); transform: translateY(-1px); }
.welcome-enter:active { transform: scale(0.97); }
.welcome-hint { margin-top: 18px; color: var(--muted); font-size: 0.8rem; opacity: 0.8; }

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .home { padding: 40px 16px 64px; }
  .topbar { padding: 10px 16px; }
  .weather { border-radius: 20px; padding: 22px; }
  .weather-main { text-align: center; }
  .weather-search { width: 100%; justify-content: center; }
  .card { padding: 18px; }

  /* 手机：底部上滑 sheet */
  .sidebar {
    top: auto; bottom: 0; right: 0; left: 0; width: 100%; height: 86dvh;
    max-width: 100%; border-left: none;
    border-top: 0.5px solid var(--card-border);
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -16px 50px rgba(0,0,0,0.3);
    padding-top: 10px;
    transform: translateY(100%);
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  body.sidebar-open .sidebar { transform: translateY(0); }
  .sheet-grab { display: block; width: 38px; height: 5px; border-radius: 3px;
    background: rgba(127,127,127,0.4); margin: 2px auto 8px; }
  .sidebar-head { padding-top: 0; }

  /* 手机：搜索·热点同样为底部上滑 sheet */
  .newsbar {
    top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 86dvh;
    border-right: none;
    border-top: 0.5px solid var(--card-border);
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -16px 50px rgba(0,0,0,0.3);
    padding-top: 10px;
    transform: translateY(100%);
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  body.news-open .newsbar { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
