/* ===== 基础 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #0066cc;
  --primary-dark: #0052a3;
  --accent: #ff6600;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e4ea;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius: 4px;
  --logo-ratio: 256 / 144;
  --logo-height: 64px;
  --sticky-top: 0px;
}

html { font-size: 14px; }

[hidden] {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.page-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; width: 100%; }

a { color: var(--text); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

.loading-text, .empty-text, .error-text {
  color: var(--text-light);
  text-align: center;
  padding: 20px;
  font-size: 13px;
}
.error-text { color: #e53935; }

.btn-text {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 12px;
}
.btn-text:hover { color: #fff; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  opacity: 0.7;
}
.btn-icon:hover { opacity: 1; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
}

/* ===== 顶栏（hao123 风格） ===== */
.utility-bar {
  position: relative;
  z-index: 320; /* 高于侧栏广告(300)与粘性搜索区(100)，避免「7天天气」被挡 */
  background: #f7f7f7;
  border-bottom: 1px solid #ebebeb;
  font-size: 12px;
  color: #666;
  min-height: 30px;
  line-height: 30px;
  overflow: visible;
}
.utility-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 30px;
  padding: 2px 0;
  overflow: visible;
}
.utility-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: visible;
}
.utility-weather {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  min-width: 0;
  flex-shrink: 1;
  z-index: 1;
}
.weather-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  max-width: 100%;
  color: #333;
  line-height: 1.4;
}
.weather-inline .wi-loading,
.weather-inline .wi-error { color: #999; }
.weather-inline .wi-city {
  font-weight: 600;
  color: var(--primary);
  margin-right: 2px;
}
.weather-inline .wi-now {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}
.weather-inline .wi-temp { color: #e65100; }
.weather-inline .wi-cond { font-weight: 500; color: #444; }
.weather-inline .wi-part { color: #555; }
.weather-inline .wi-part .wi-label {
  color: #999;
  margin-right: 3px;
}
.weather-inline .wi-tomorrow { color: #777; }
.weather-inline > .wi-city::after,
.weather-inline > .wi-now::after,
.weather-inline > .wi-part:not(:last-child)::after {
  content: '|';
  color: #ddd;
  margin: 0 6px;
}
.utility-calendar {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.utility-calendar .ci-lunar { color: #888; margin: 0 6px; }
.util-sep { color: #ddd; user-select: none; }
.util-link {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-size: 12px;
  padding: 0;
  white-space: nowrap;
  font-family: inherit;
}
.util-link:hover { text-decoration: underline; }
.util-link--forecast {
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}
.util-link--forecast .forecast-arrow {
  margin-left: 1px;
  font-size: 11px;
}
.util-icon { font-size: 11px; }
.utility-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
  max-width: 50%;
}
.utility-user {
  flex-shrink: 0;
  white-space: nowrap;
}
.utility-right a { color: #666; font-size: 12px; }
.utility-right a:hover { color: var(--primary); }
.utility-right .util-link { color: #666; }
.utility-right .util-link:hover { color: var(--primary); }

.weather-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 12px 14px;
  width: min(460px, 92vw);
  line-height: normal;
}
.weather-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.weather-popover-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.weather-popover .weather-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  border-top: none;
  padding-top: 0;
  margin-bottom: 8px;
}
.forecast-day.is-today {
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
}
.forecast-day .fd-cond {
  display: block;
  font-size: 10px;
  color: var(--text-light);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 冻结搜索区 ===== */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #ebebeb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.sticky-header.is-compact .search-hero {
  padding-top: 10px;
  padding-bottom: 8px;
}
.sticky-header.is-compact .logo-img {
  --logo-height: 48px;
}

/* ===== 页面主栏 ===== */
.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.page-main {
  width: 100%;
  min-width: 0;
}

/* ===== 悬浮广告（直接挂 body，fixed 定位） ===== */
.ad-popup {
  position: fixed !important;
  display: none !important;
  margin: 0;
  padding: 0;
  pointer-events: none;
  z-index: 300;
  overflow: visible !important;
  max-height: none !important;
}
.ad-popup.ad-popup-visible {
  display: block !important;
  pointer-events: auto;
}
.ad-popup--left {
  left: max(8px, calc(50vw - 600px - 172px)) !important;
  right: auto !important;
  top: var(--ad-side-top, 160px) !important;
  bottom: auto !important;
  width: 160px;
  max-height: min(400px, calc(100vh - var(--ad-side-top, 160px) - 120px));
  transform: none !important;
}
.ad-popup--right {
  right: max(8px, calc(50vw - 600px - 172px)) !important;
  left: auto !important;
  top: var(--ad-side-top, 160px) !important;
  bottom: auto !important;
  width: 160px;
  max-height: min(400px, calc(100vh - var(--ad-side-top, 160px) - 120px));
  transform: none !important;
}
.ad-popup--bottom {
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 16px !important;
  transform: translateX(-50%) !important;
  width: min(728px, calc(100vw - 32px));
  max-height: 90px;
  z-index: 301;
}
.ad-popup .ad-shell {
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.ad-popup--left .ad-shell,
.ad-popup--right .ad-shell {
  width: 160px;
}
.ad-popup--left img,
.ad-popup--right img {
  width: 100%;
  height: auto;
  max-height: min(380px, calc(100vh - var(--ad-side-top, 160px) - 140px));
  object-fit: contain;
  display: block;
}
.ad-popup--bottom .ad-shell {
  max-height: 90px;
  overflow: hidden;
}
.ad-popup--bottom .ad-shell-body {
  height: 90px;
  max-height: 90px;
  overflow: hidden;
}
.ad-popup--bottom img {
  width: 100%;
  height: 90px !important;
  max-height: 90px !important;
  object-fit: cover;
  display: block;
}
@media (max-width: 1280px) {
  .ad-popup--left { left: 8px !important; }
  .ad-popup--right { right: 8px !important; }
}
@media (max-width: 768px) {
  .ad-popup--left,
  .ad-popup--right {
    width: 120px;
  }
  .ad-popup--left .ad-shell,
  .ad-popup--right .ad-shell {
    width: 120px;
  }
}

/* ===== 搜索区 ===== */
.search-hero {
  background: #fff;
  padding: 20px 0 12px;
}
.search-brand-row {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 740px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img {
  height: var(--logo-height);
  width: calc(var(--logo-height) * 256 / 144);
  max-width: 100%;
  aspect-ratio: var(--logo-ratio);
  display: block;
  object-fit: contain;
  object-position: left center;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.search-form { flex: 1; min-width: 0; }
.search-box {
  position: relative;
  display: flex;
  background: var(--card);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  overflow: hidden;
}
.search-box input {
  flex: 1; border: none; outline: none;
  padding: 10px 14px; font-size: 15px; color: var(--text);
  background: transparent;
  position: relative;
  z-index: 1;
}
.search-box button {
  position: relative;
  z-index: 1;
  background: var(--accent); color: #fff; border: none;
  padding: 0 32px; font-size: 15px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.search-box button:hover { filter: brightness(0.95); }
.search-placeholder-rotator {
  position: absolute;
  left: 14px;
  right: 96px;
  top: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.15s ease;
}
.search-box.is-focused .search-placeholder-rotator,
.search-box.has-value .search-placeholder-rotator {
  opacity: 0;
  visibility: hidden;
}
.search-placeholder-track {
  will-change: transform;
  transition: transform 0.45s ease;
}
.search-placeholder-item {
  height: var(--search-ph-item-h, 42px);
  line-height: var(--search-ph-item-h, 42px);
  color: #999;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-engines {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}
.search-engines label { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.search-engines input[type="radio"] { accent-color: var(--primary); }
.hot-links-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  padding: 0 8px;
}
#ad-hot_right.ad-slot--compact {
  margin: 8px auto 0;
  max-width: 300px;
  justify-content: center;
}
.hot-links-label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff6600, #ff8833);
  padding: 2px 8px;
  border-radius: 3px;
}
.hot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-size: 12px;
}
.hot-links a { color: #666; }
.hot-links a:hover { color: var(--primary); }
.hot-links a.hot-top { color: #e65100; font-weight: 600; }
.hot-links a.hot-top:hover { color: #bf360c; }
.hot-badge {
  display: inline-block;
  font-size: 10px;
  line-height: 14px;
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 700;
  vertical-align: 1px;
}
.hot-badge--pre { margin-right: 3px; }
.hot-badge--suf { margin-left: 3px; }
.hot-badge-热 { background: #ff4400; color: #fff; }
.hot-badge-爆 { background: #e53935; color: #fff; }
.hot-badge-新 { background: #ff9800; color: #fff; }
.hot-badge-荐 { background: #2196f3; color: #fff; }
.hot-badge-火 { background: #ff5722; color: #fff; }
.hot-badge-default { background: #999; color: #fff; }

/* ===== 广告位 ===== */
.ad-slot {
  text-align: center;
  overflow: hidden;
  position: relative;
}
.ad-shell {
  position: relative;
  width: 100%;
  line-height: 0;
}
.ad-shell-body {
  width: 100%;
}
.ad-close {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.ad-close:hover { background: rgba(0, 0, 0, 0.65); }
.ad-tag {
  position: absolute;
  bottom: 2px;
  right: 2px;
  z-index: 3;
  font-size: 10px;
  line-height: 14px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  pointer-events: none;
  letter-spacing: 0.5px;
}
.ad-slot.is-empty,
.ad-slot.is-loading,
.ad-slot:not(.has-content):not(.ad-popup-visible) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  border: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.ad-slot[hidden]:not(.ad-popup-visible) {
  display: none !important;
}
.ad-slot .ad-shell {
  position: relative;
  line-height: 0;
  overflow: hidden;
}
.ad-slot:not(.ad-popup) .ad-shell-body {
  overflow: hidden;
}
.ad-slot .ad-unit + .ad-unit { margin-top: 0; }
.ad-slot .ad-item {
  display: block;
  line-height: 0;
  border-radius: 4px;
  overflow: hidden;
}
.ad-slot--strip img,
.ad-slot--inline img,
.ad-slot--banner img,
.ad-slot--footer img {
  width: 100%;
  height: var(--ad-body-h);
  max-height: var(--ad-body-h);
  object-fit: cover;
  display: block;
}
.ad-slot--utility img,
.ad-slot--compact img {
  width: auto;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.ad-slot--banner {
  margin: 0 auto;
  padding: 0;
  --ad-body-h: 72px;
  max-width: 1200px;
}
.ad-slot--banner .ad-shell-body {
  height: var(--ad-body-h);
  max-height: var(--ad-body-h);
  overflow: hidden;
}
.ad-slot--strip,
.ad-slot--inline {
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 0;
  contain: layout size style;
  overflow: hidden !important;
  box-sizing: border-box;
}
.ad-slot--strip {
  border-top: 1px solid var(--border);
  background: #fafafa;
  --ad-body-h: 56px;
  height: 56px !important;
  max-height: 56px !important;
}
.ad-slot--strip .ad-shell,
.ad-slot--strip .ad-shell-body,
.ad-slot--strip .ad-item,
.ad-slot--strip img {
  height: 56px !important;
  max-height: 56px !important;
}
.ad-slot--inline {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  --ad-body-h: 64px;
  height: 64px !important;
  max-height: 64px !important;
}
.ad-slot--inline .ad-shell,
.ad-slot--inline .ad-shell-body,
.ad-slot--inline .ad-item,
.ad-slot--inline img {
  height: 64px !important;
  max-height: 64px !important;
}
.ad-slot--footer {
  margin: 16px auto 0;
  --ad-body-h: 56px;
  height: var(--ad-body-h);
  max-height: var(--ad-body-h);
  overflow: hidden;
}
.ad-slot--footer .ad-shell-body {
  height: var(--ad-body-h);
  max-height: var(--ad-body-h);
  overflow: hidden;
}
/* 无内容时通栏/条带不占高度（需高于上方固定高度规则） */
.ad-slot.ad-slot--banner.is-empty,
.ad-slot.ad-slot--banner.is-loading,
.ad-slot.ad-slot--banner:not(.has-content):not(.ad-popup-visible),
.ad-slot.ad-slot--strip.is-empty,
.ad-slot.ad-slot--strip.is-loading,
.ad-slot.ad-slot--strip:not(.has-content):not(.ad-popup-visible),
.ad-slot.ad-slot--inline.is-empty,
.ad-slot.ad-slot--inline.is-loading,
.ad-slot.ad-slot--inline:not(.has-content):not(.ad-popup-visible),
.ad-slot.ad-slot--footer.is-empty,
.ad-slot.ad-slot--footer.is-loading,
.ad-slot.ad-slot--footer:not(.has-content):not(.ad-popup-visible) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  border: none !important;
  background: transparent !important;
}
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  background: #e8e8e8;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  color: #999;
  font-size: 11px;
}
.ad-ph-label { color: #888; }

.ad-slot--utility .ad-close {
  width: 14px;
  height: 14px;
  font-size: 12px;
  top: 0;
  right: 0;
}
.ad-slot--utility .ad-tag {
  font-size: 9px;
  line-height: 12px;
  padding: 0 2px;
  bottom: 0;
  right: 0;
}
.ad-slot--compact .ad-close {
  width: 16px;
  height: 16px;
  font-size: 13px;
}
.ad-slot--compact .ad-tag {
  font-size: 9px;
  line-height: 12px;
}
.ad-slot--side .ad-close { top: 4px; right: 4px; }
.ad-slot--side .ad-tag { bottom: 4px; right: 4px; }
.ad-popup--bottom .ad-close {
  top: 4px;
  right: 6px;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 16px;
}

/* ===== 小部件（通用） ===== */
.widget-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
}
.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.widget-title { font-weight: 600; font-size: 14px; color: var(--primary); }

/* 天气 */
.weather-main { display: flex; align-items: center; gap: 16px; }
.weather-icon { font-size: 42px; }
.weather-temp { font-size: 32px; font-weight: 700; color: var(--text); }
.weather-condition { font-size: 14px; color: var(--text-light); }
.weather-detail {
  margin-top: 12px;
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--text-light);
}

/* 日历 */
.calendar-month { font-size: 13px; color: var(--text-light); }
.calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 12px; color: var(--text-light);
  margin-bottom: 4px;
}
.calendar-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; gap: 2px;
}
.calendar-days .day {
  padding: 4px; font-size: 13px; border-radius: 4px;
}
.calendar-days .day.other-month { color: #ccc; }
.calendar-days .day.today {
  background: var(--primary); color: #fff; font-weight: 700;
}
.calendar-today {
  margin-top: 10px; font-size: 12px; color: var(--text-light);
  text-align: center; border-top: 1px solid var(--border); padding-top: 8px;
}

/* ===== 快捷入口 + 导航面板 ===== */
.nav-panel { margin-top: 0; margin-bottom: 24px; }
.quick-strip {
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 14px 12px 10px;
}
.quick-nav {
  background: var(--card);
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 14px 12px 10px;
}
.quick-list { list-style: none; display: flex; flex-wrap: wrap; }
.quick-list li { width: calc(100% / 10); text-align: left; }
.quick-list a {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 4px;
  padding: 6px 4px; border-radius: var(--radius); transition: background 0.2s;
}
.quick-list a:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.quick-icon {
  width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 700;
}
.link-icon { width: 16px; height: 16px; border-radius: 3px; object-fit: contain; background: #f5f5f5; padding: 1px; flex-shrink: 0; }
.link-icon-sm { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; border-radius: 2px; }
.default-icon { background: var(--primary); }
.nav-block-title small { display: block; font-size: 11px; font-weight: normal; color: var(--text-light); margin-top: 2px; }
/* 保留旧类名兼容 */
.search-section { display: none; }
.top-bar { display: none; }
.header-widgets { display: none; }
.ad-slot--utility {
  display: inline-flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  max-width: 88px;
  max-height: 26px;
  margin-left: 2px;
  overflow: hidden;
}
.ad-slot--utility .ad-placeholder {
  min-height: 22px;
  max-height: 24px;
  padding: 1px 6px;
  gap: 0;
  font-size: 10px;
  line-height: 1.2;
  border-radius: 2px;
}
.ad-slot--utility .ad-ph-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ad-slot--utility .ad-ph-size { display: none; }
.ad-slot--utility img { max-height: 24px; width: auto; }
.ad-slot--compact {
  flex-shrink: 0;
  max-width: 160px;
  max-height: 36px;
  margin-left: auto;
}
.ad-slot--compact img { max-height: 32px; width: auto; height: auto; }

.weather-widget { overflow: hidden; }
.weather-forecast {
  min-width: 0;
  overflow: hidden;
}
.widget-actions { display: flex; gap: 10px; align-items: center; }
.btn-link-sm { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; padding: 0; }
.btn-link-sm:hover { text-decoration: underline; }
.weather-tabs { display: flex; gap: 8px; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.tab-btn { background: none; border: 1px solid var(--border); padding: 4px 14px; border-radius: 20px; cursor: pointer; font-size: 12px; }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.forecast-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.forecast-day {
  flex: 0 0 auto;
  min-width: 68px;
  text-align: center;
  font-size: 11px;
  padding: 8px 4px;
  background: color-mix(in srgb, var(--primary) 5%, var(--card));
  border-radius: var(--radius);
}
.fd-date { display: block; white-space: nowrap; }
.fd-icon { font-size: 18px; display: block; margin: 4px 0; }
.fd-temp { font-weight: 600; color: var(--text); }

/* 日历扩展 */
.calendar-extra { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 12px; }
.cal-solar { font-weight: 600; margin-bottom: 4px; }
.cal-lunar { color: var(--text-light); margin-bottom: 8px; }
.cal-zodiac { display: flex; flex-direction: column; gap: 4px; }
.zodiac-badge { color: var(--primary); font-weight: 600; }
.zodiac-fortune { color: var(--text-light); line-height: 1.5; }

/* 用户登录 */
.user-greeting { color: #666; font-size: 12px; margin-right: 6px; }
.modal-auth { max-width: 400px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.auth-tab {
  flex: 1; min-width: 88px; padding: 10px 6px; background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; font-size: 13px; color: var(--text-light);
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.auth-sms-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: stretch; }
.auth-sms-row .modal-input { flex: 1; margin-bottom: 0; }
.auth-sms-row .btn-secondary { white-space: nowrap; }
.auth-hint { font-size: 12px; color: var(--text-light); margin: -4px 0 10px; }
.auth-error { color: #e53935; font-size: 13px; margin-bottom: 10px; }
.btn-block { width: 100%; padding: 10px; margin-top: 4px; }

.quick-name { font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 分类导航（hao123 行式 + 折叠） ===== */
.nav-categories-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  position: relative;
  z-index: 1;
}
.nav-rows {
  background: var(--card);
  position: relative;
  z-index: 1;
}
.nav-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #f0f0f0;
  min-height: 34px;
  line-height: 34px;
}
.nav-row:last-child { border-bottom: none; }
.nav-row-label {
  flex-shrink: 0;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #008080;
  border-right: 1px solid #f5f5f5;
}
.nav-row-links {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  padding: 2px 0;
  line-height: 28px;
}
.nav-row-links a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: #333;
  padding: 0 10px;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-row-links a:hover { color: #008080; }
.nav-row-links a.nav-link-hot { color: #e60000; }
.nav-row-links a.nav-link-hot:hover { color: #c40000; }
.nav-panel.is-booting {
  /* 启动期间整块先不展示，避免广告大图溢出叠在分类上 */
}
.nav-panel.is-booting .ad-slot {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
}
.nav-link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 2px;
  vertical-align: middle;
}
.nav-link-icon--ph {
  display: inline-block;
  background: #eee;
  border-radius: 2px;
}
.nav-row-more {
  flex-shrink: 0;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #f5f5f5;
}
.nav-more-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #008080;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.nav-more-link:hover { text-decoration: underline; color: #006666; }

.nav-expand-bar {
  text-align: center;
  padding: 10px 0 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
}
.nav-expand-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}
.nav-expand-btn:hover {
  color: #008080;
  background: color-mix(in srgb, #008080 6%, transparent);
}
.nav-expand-icon { font-size: 12px; line-height: 1; }

/* ===== 资讯推荐 ===== */
.news-section {
  margin: 0 auto 20px;
}
.news-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.news-panel-head {
  padding: 12px 16px 0;
}
.news-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  padding: 10px 12px 0;
  border-bottom: 1px solid #f0f0f0;
  overflow-x: auto;
}
.news-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.news-tab:hover { color: #008080; }
.news-tab.active {
  color: #008080;
  font-weight: 600;
  border-bottom-color: #008080;
}
.news-featured-wrap { padding: 12px 16px 0; }
.news-featured {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff5f5 0%, #fff8f0 100%);
  border: 1px solid #ffe0d0;
  border-radius: 6px;
  transition: box-shadow 0.2s;
}
.news-featured:hover {
  box-shadow: 0 2px 12px rgba(230, 0, 0, 0.08);
}
.news-featured-body { flex: 1; min-width: 0; }
.news-featured-title {
  font-size: 18px;
  font-weight: 700;
  color: #e60000;
  line-height: 1.4;
  margin-bottom: 8px;
}
.news-featured-summary {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-list {
  list-style: none;
  padding: 8px 0;
}
.news-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #fafafa; }
.news-item-thumb {
  width: 120px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: cover;
  background: #eee;
}
.news-item-thumb--ph {
  display: block;
  background: linear-gradient(135deg, #e8e8e8, #f5f5f5);
}
.news-item-body { flex: 1; min-width: 0; }
.news-item-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item:hover .news-item-title { color: var(--primary); }
.news-item-summary {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item-meta {
  font-size: 12px;
  color: #aaa;
}
.news-empty {
  padding: 24px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* 保留旧类名兼容 */
.nav-grid { display: none; }
.nav-block { display: none; }

/* ===== 底部 ===== */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 20px 0; text-align: center;
  color: var(--text-light); font-size: 12px;
}
.footer-beian { margin-top: 6px; }
.footer-beian a {
  color: var(--text-light);
  text-decoration: none;
}
.footer-beian a:hover { color: var(--primary); }

/* ===== 主题面板 ===== */
.theme-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3); z-index: 100;
}
.theme-panel {
  position: fixed; top: 0; right: 0;
  width: 320px; height: 100vh;
  background: var(--card);
  box-shadow: -4px 0 20px rgba(0,0,0,0.12);
  z-index: 101;
  display: flex; flex-direction: column;
}
.theme-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.theme-panel-header h3 { font-size: 16px; }
.theme-panel-body { padding: 20px; overflow-y: auto; flex: 1; }
.theme-section { margin-bottom: 24px; }
.theme-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.theme-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); cursor: pointer; font-size: 12px;
}
.preset-btn:hover { border-color: var(--primary); }
.preset-colors { display: flex; gap: 4px; }
.preset-colors i { width: 16px; height: 16px; border-radius: 50%; display: block; }
.theme-colors { display: flex; flex-direction: column; gap: 10px; }
.theme-colors label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.theme-colors input[type="color"] {
  width: 40px; height: 28px; border: 1px solid var(--border);
  border-radius: 4px; cursor: pointer; padding: 0;
}
.theme-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== 弹窗 ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.modal-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  width: 90%; max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.modal-header h3 { font-size: 16px; }
.modal-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; margin-bottom: 16px;
  background: var(--card); color: var(--text);
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .quick-list li { width: calc(100% / 8); }
  .nav-row-label { width: 48px; font-size: 12px; }
  .nav-row-more { width: 52px; }
}
@media (max-width: 768px) {
  .utility-inner { flex-wrap: wrap; height: auto; padding: 4px 0; }
  .utility-left { flex-wrap: wrap; line-height: 22px; }
  .utility-right { width: 100%; justify-content: flex-end; line-height: 22px; max-width: 100%; }
  .utility-calendar { display: none; }
  .search-brand-row { flex-direction: column; gap: 14px; }
  .logo-img { --logo-height: 52px; object-position: center; }
  .search-form { width: 100%; }
  .hot-links { justify-content: flex-start; }
  .quick-list li { width: calc(100% / 4); }
  .nav-row { flex-wrap: wrap; line-height: 28px; }
  .nav-row-label {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    justify-content: flex-start;
    padding-left: 12px;
    line-height: 28px;
  }
  .nav-row-more {
    width: 100%;
    border-left: none;
    justify-content: flex-end;
    padding-right: 12px;
    line-height: 28px;
  }
  .news-item-thumb {
    width: 96px;
    height: 64px;
  }
  .news-featured {
    flex-direction: column;
  }
  .news-featured .news-item-thumb {
    width: 100%;
    height: 160px;
  }
}
@media (max-width: 480px) {
  .quick-list li { width: calc(100% / 3); }
}
