:root {
  --blue: #315efb;
  --text: #222;
  --muted: #9195a3;
  --line: #f0f0f0;
  --bg: #f7f7f7;
  --width: 1190px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  min-width: 1190px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
button, input { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: var(--width); margin: 0 auto; }

.topbar, .searchbar { background: #fff; }
.topbar-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 14px; flex: none; }
.brand img { height: 33px; width: auto; display: block; }
.set-home { font-size: 12px; color: #808080; }
.set-home:hover { color: var(--blue); }

.tools { display: flex; align-items: center; gap: 14px; min-width: 0; }
.weather { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #333; }
.weather b { font-weight: 600; }
.loc { display: inline-flex; align-items: center; gap: 3px; color: #333; }
.w-item { display: flex; align-items: center; gap: 4px; line-height: 1.15; }
.w-item small { display: block; color: #888; font-size: 12px; }
.w-item strong { font-size: 13px; font-weight: 500; }
.sun {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #ffe27a, #ffb300);
  box-shadow: 0 0 0 2px rgba(255, 186, 0, .18);
  flex: none;
}
.aqi {
  font-size: 12px; color: #19a35b; border: 1px solid #b7e4c7;
  border-radius: 3px; padding: 0 3px; line-height: 16px;
}
.cal { font-size: 12px; color: #333; line-height: 1.35; }
.cal .lunar { color: #e14b4b; }
.cal a { color: #666; margin-left: 6px; }

.pills { display: flex; gap: 6px; }
.pill { position: relative; }
.pill > a {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border: 1px solid #e6e6e6; border-radius: 13px; font-size: 12px; color: #333; background: #fff;
}
.pill:hover > a { border-color: #c9d4ff; color: var(--blue); }
.drop {
  display: none; position: absolute; top: 28px; left: 0; z-index: 30;
  width: 168px; padding: 8px 0; background: #fff; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.pill:hover .drop { display: block; }
.drop a { display: block; padding: 6px 14px; font-size: 13px; color: #333; }
.drop a:hover { background: #f5f7ff; color: var(--blue); }
.login-btn { font-size: 13px; color: #333; padding-left: 4px; }

.search-inner { padding: 8px 0 6px; }
.search-row { display: flex; align-items: center; gap: 14px; height: 56px; }
.search-logo { width: 118px; height: 40px; object-fit: contain; flex: none; }
.search-form {
  flex: 1; max-width: 798px; height: 51px; display: flex; align-items: center;
  background: #fff; border: 1px solid #e3e5ea; border-radius: 15px; padding: 3px 3px 3px 0;
}
.search-form:focus-within { border-color: #7f97f8; box-shadow: 0 0 0 3px rgba(78,110,242,.08); }
.engine { position: relative; flex: none; }
.engine > button {
  border: 0; background: transparent; height: 44px; padding: 0 12px 0 16px;
  color: #333; font-size: 14px; cursor: pointer;
}
.engine > button::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: #999; transform: translateY(2px); }
.engine-menu {
  display: none; position: absolute; top: 46px; left: 8px; width: 96px; background: #fff;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 40; padding: 6px 0;
}
.engine.open .engine-menu { display: block; }
.engine-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: #fff;
  padding: 7px 14px; cursor: pointer; font-size: 13px;
}
.engine-menu button:hover, .engine-menu button.on { color: var(--blue); background: #f5f7ff; }
.search-form input {
  flex: 1; border: 0; outline: none; height: 42px; font-size: 16px; color: #222; background: transparent; min-width: 0;
}
.submit-button {
  width: 108px; height: 44px; border: 0; border-radius: 12px; color: #fff; font-size: 17px; cursor: pointer;
  background: linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);
}
.submit-button:hover { filter: brightness(1.05); }
.hot-side {
  width: 230px; flex: none; font-size: 13px; color: #333; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; min-height: 22px;
}
.hot-side .tag { flex: none; }
.tag {
  display: inline-block; font-size: 12px; line-height: 16px; padding: 0 3px; border-radius: 2px; color: #fff;
}
.tag.new { background: #ff4d4f; }
.tag.hot { background: #ff7a00; }

.shortcut-row { display: flex; align-items: center; gap: 18px; height: 32px; padding-left: 132px; }
.shortcut { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #333; }
.shortcut i {
  width: 16px; height: 16px; background-size: cover; background-position: center; border-radius: 3px; flex: none;
}
.ticker-row { display: flex; align-items: center; height: 28px; padding-left: 132px; overflow: hidden; }
.ticker { display: flex; gap: 22px; white-space: nowrap; animation: ticker 80s linear infinite; }
.ticker:hover { animation-play-state: paused; }
.ticker a { font-size: 13px; color: #555; }
.ticker a:hover { color: var(--blue); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.sheet { background: #fff; margin-top: 8px; border-radius: 2px; }
.gov {
  height: 34px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; font-size: 12px; color: #626675; border-bottom: 1px solid #f5f5f5;
}
.gov a:hover { color: var(--blue); }
.banner { display: block; height: 90px; margin: 10px 0 0; overflow: hidden; }
.banner img { width: 100%; height: 90px; object-fit: cover; display: block; }

.sites { position: relative; padding: 10px 16px 0; }
.site-grid {
  display: grid; grid-template-columns: repeat(9, 1fr); row-gap: 7px; column-gap: 6px;
}
.sites.collapsed .site-grid { max-height: 108px; overflow: hidden; }
.site { display: flex; align-items: center; min-width: 0; height: 22px; position: relative; font-size: 14px; }
.site-main, .site-sub { white-space: nowrap; }
.site-main {
  background-repeat: no-repeat; background-size: 18px 18px; background-position: left center;
  padding-left: 22px; line-height: 20px;
}
.site-main.noicon { padding-left: 0; }
.dot { color: #c8c8c8; margin: 0 3px; }
.more-caret { color: #bbb; font-size: 10px; margin-left: 2px; }
.site-more {
  display: none; position: absolute; top: 20px; left: 18px; z-index: 20; background: #fff;
  min-width: 110px; border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.12); padding: 6px 0;
}
.site:hover .site-more { display: block; }
.site-more a { display: block; padding: 5px 12px; font-size: 13px; }
.site-more a:hover { background: #f5f7ff; }
.expand-mask {
  position: absolute; left: 0; right: 0; bottom: 0; height: 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 60%);
  text-align: center;
}
.sites:not(.collapsed) .expand-mask { position: static; height: auto; background: none; padding: 6px 0 8px; }
.expand-mask button {
  border: 0; background: transparent; color: #626675; font-size: 12px; cursor: pointer;
}
.expand-mask button:hover { color: var(--blue); }
.add-site {
  position: absolute; right: 10px; top: 8px; width: 22px; height: 22px; border: 1px dashed #ccc;
  border-radius: 4px; background: #fff; color: #888; cursor: pointer; line-height: 18px;
}
.add-site:hover { color: var(--blue); border-color: var(--blue); }

.famous {
  height: 42px; display: flex; align-items: center; gap: 22px; padding: 0 16px;
  border-top: 1px solid var(--line);
}
.famous a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #333; }
.famous a:hover { color: var(--blue); }
.gicon {
  width: 18px; height: 18px; border-radius: 3px; display: inline-block;
  background: linear-gradient(135deg, #ff7a45, #d4380d); position: relative;
}
.gicon::after { content: "游"; color: #fff; font-size: 11px; position: absolute; inset: 0; text-align: center; line-height: 18px; }
.famous .hotword { color: #e10600; font-weight: 600; }
.flame { color: #e10600; font-size: 14px; }

.columns { display: flex; border-top: 1px solid var(--line); align-items: flex-start; }
.side { width: 280px; flex: none; padding: 0 8px 16px 12px; border-right: 1px solid #f5f5f5; }
.feed { flex: 1; min-width: 0; padding: 0 8px 20px 0; }
.tabs { display: flex; align-items: center; height: 40px; gap: 2px; }
.tabs button {
  border: 0; background: transparent; height: 40px; padding: 0 12px; font-size: 15px; color: #666; cursor: pointer; position: relative;
}
.side .tabs button { font-size: 14px; padding: 0 10px; }
.tabs button.on { color: #222; font-weight: 600; }
.tabs button.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; background: var(--blue); border-radius: 2px;
}
.feed .tabs { padding-left: 8px; border-bottom: 1px solid #f5f5f5; overflow: auto; }
.feed .tabs button { flex: none; }

.rank-row { border-radius: 4px; }
.rank-compact {
  display: flex; align-items: center; height: 32px; gap: 8px; padding: 0 4px; cursor: pointer;
}
.rank-row.on .rank-compact { display: none; }
.no { width: 18px; text-align: center; font-size: 15px; color: #999; font-weight: 600; flex: none; }
.no.n1 { color: #fe2d46; }
.no.n2 { color: #ff6600; }
.no.n3 { color: #faa90e; }
.rname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rheat { color: #b0b3bf; font-size: 12px; }
.rank-pop { display: none; gap: 10px; padding: 8px 4px; }
.rank-row.on .rank-pop { display: flex; }
.rank-pop img { width: 72px; height: 96px; object-fit: cover; border-radius: 4px; background: #f2f2f2; flex: none; }
.rank-pop b { display: block; font-size: 15px; margin-bottom: 6px; }
.rank-pop p { margin: 0 0 4px; color: #888; font-size: 12px; }

.topic-box { margin-top: 8px; border-top: 1px solid #f5f5f5; padding-top: 4px; }
.topic-list a {
  display: block; height: 30px; line-height: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; color: #333;
}
.topic-list a::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #d0d3dc; margin-right: 8px; vertical-align: middle; }
.topic-list a:hover { color: var(--blue); }

.bullets { padding: 8px 16px 0; }
.bullets a { display: block; line-height: 32px; font-size: 16px; font-weight: 600; color: #222; }
.bullets a::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff5a5a; margin-right: 8px; vertical-align: 2px; }
.bullets a:hover { color: var(--blue); }
.article { display: flex; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #f5f5f5; }
.article:hover { background: #fafbff; }
.article-body { flex: 1; min-width: 0; }
.article h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; line-height: 1.45; color: #222; }
.article:hover h3 { color: var(--blue); }
.article p { margin: 0 0 10px; color: #626675; font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: var(--muted); font-size: 12px; }
.meta span + span { margin-left: 12px; }
.article img { width: 155px; height: 100px; object-fit: cover; border-radius: 6px; flex: none; background: #f3f3f3; }
.headline-only { display: block; padding: 11px 16px; border-bottom: 1px solid #f5f5f5; font-size: 16px; }
.headline-only:hover { color: var(--blue); background: #fafbff; }

.footer { background: #fff; color: #9195a3; font-size: 12px; text-align: center; padding: 18px 16px 28px; line-height: 2; margin-top: 8px; }
.footer a { color: #9195a3; margin: 0 8px; }
.footer a:hover { color: var(--blue); }

.dock {
  position: fixed; right: 16px; top: 46%; z-index: 50; display: flex; flex-direction: column; gap: 8px;
}
.dock a, .dock button {
  width: 52px; min-height: 52px; border: 0; background: #fff; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08); color: #666; font-size: 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.dock a:hover, .dock button:hover { color: var(--blue); }
.dock .ic { font-size: 16px; line-height: 1; }

.side-ad {
  position: fixed; left: max(8px, calc(50vw - 735px)); top: 360px; width: 120px; z-index: 40;
  background: linear-gradient(180deg, #2f7bff, #1a4fe0); color: #fff; border-radius: 10px;
  text-align: center; padding: 12px 8px 14px; box-shadow: 0 8px 20px rgba(26,79,224,.25);
}
.side-ad .penguin {
  width: 72px; height: 72px; margin: 0 auto 8px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #ffe27a 0 16px, transparent 17px),
    radial-gradient(circle at 38% 40%, #222 0 3px, transparent 4px),
    radial-gradient(circle at 58% 40%, #222 0 3px, transparent 4px),
    #fff;
  position: relative;
}
.side-ad strong { display: block; font-size: 14px; margin-bottom: 8px; }
.side-ad span { display: inline-block; background: #ffcf33; color: #7a3b00; border-radius: 14px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.ribbon {
  position: fixed; right: 0; top: 0; z-index: 60; width: 92px; height: 92px; overflow: hidden; pointer-events: none;
}
.ribbon i {
  position: absolute; right: -28px; top: 16px; width: 120px; transform: rotate(45deg);
  background: #e10600; color: #fff; text-align: center; font-style: normal; font-size: 12px; line-height: 22px;
}

.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80;
  display: none; align-items: center; justify-content: center;
}
.mask.show { display: flex; }
.modal { width: 420px; background: #fff; border-radius: 12px; padding: 22px 24px 26px; position: relative; }
.modal h2 { margin: 0 0 14px; font-size: 18px; text-align: center; }
.modal .close {
  position: absolute; right: 12px; top: 10px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: #999;
}
.login-tabs { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.login-tabs button { border: 0; background: transparent; font-size: 15px; padding-bottom: 6px; cursor: pointer; color: #666; }
.login-tabs button.on { color: var(--blue); border-bottom: 2px solid var(--blue); }
.qr {
  width: 160px; height: 160px; margin: 0 auto 10px; border: 1px solid #eee; border-radius: 8px;
  background:
    linear-gradient(#222, #222) 18px 18px / 18px 18px no-repeat,
    linear-gradient(#222, #222) 124px 18px / 18px 18px no-repeat,
    linear-gradient(#222, #222) 18px 124px / 18px 18px no-repeat,
    repeating-linear-gradient(90deg, #222 0 6px, transparent 6px 10px),
    repeating-linear-gradient(#222 0 6px, transparent 6px 10px);
  background-blend-mode: normal;
}
.modal .tip { text-align: center; color: #888; font-size: 12px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field input { height: 40px; border: 1px solid #e5e5e5; border-radius: 6px; padding: 0 12px; font-size: 14px; }
.field button, .dialog-actions button.primary {
  height: 40px; border: 0; border-radius: 6px; background: var(--blue); color: #fff; cursor: pointer; font-size: 15px;
}
.toast {
  position: fixed; left: 50%; top: 72px; transform: translateX(-50%); background: rgba(0,0,0,.78);
  color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 90; font-size: 13px; display: none;
}
.toast.show { display: block; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.dialog-actions button { height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid #ddd; background: #fff; cursor: pointer; }

@media (max-width: 1500px) {
  .side-ad, .ribbon { display: none; }
}

.m-page { display: none; }
.m-back { display: none; }

@media (max-width: 1100px) {
  body { min-width: 0; background: #f2f2f2; }
  .topbar, .searchbar, .sheet, .footer, .side-ad, .dock, .ribbon { display: none !important; }
  .m-page { display: block; max-width: 640px; margin: 0 auto; min-height: 100vh; background: #f2f2f2; }
  .modal { width: calc(100vw - 32px); max-width: 420px; }
}

html.force-pc .m-page { display: none !important; }
@media (max-width: 1100px) {
  html.force-pc body { min-width: 1190px; }
  html.force-pc .topbar,
  html.force-pc .searchbar { display: block !important; }
  html.force-pc .sheet { display: block !important; }
  html.force-pc .footer { display: block !important; }
  html.force-pc .m-back {
    display: block;
    position: fixed;
    left: 12px;
    bottom: 16px;
    z-index: 70;
    border: 0;
    background: #315efb;
    color: #fff;
    border-radius: 16px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(49, 94, 251, .35);
  }
}

.m-head { background: #89a0ae; color: #fff; padding: 8px 12px 0; }
.m-head-top { height: 52px; display: flex; align-items: center; justify-content: space-between; }
.m-logo {
  font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.5px;
  font-family: Arial, "Helvetica Neue", sans-serif;
}
.m-logo:hover { color: #fff; }
.m-weather { display: flex; align-items: center; gap: 6px; color: #fff; }
.m-weather:hover { color: #fff; }
.m-wcity { font-size: 12px; line-height: 1.15; }
.m-wcity small { display: block; font-size: 12px; opacity: .95; }
.m-wicon {
  width: 26px; height: 26px; border-radius: 50%;
  background:
    radial-gradient(circle at 60% 62%, #d7e3ea 0 7px, transparent 8px),
    radial-gradient(circle at 38% 58%, #fff 0 8px, transparent 9px);
  position: relative;
}
.m-wicon::after {
  content: ""; position: absolute; left: 4px; right: 2px; bottom: 3px; height: 3px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.85) 0 2px, transparent 2px 4px);
}
.m-weather b { font-size: 32px; font-weight: 400; line-height: 1; }
.m-weather b small { font-size: 14px; }
.m-search {
  display: flex; align-items: center; height: 36px; background: #fff; border-radius: 2px; overflow: hidden;
}
.m-search input {
  flex: 1; border: 0; outline: none; height: 36px; padding: 0 10px; font-size: 15px; background: #fff; min-width: 0; color: #222;
}
.m-search button {
  flex: none; width: 78px; height: 36px; border: 0; border-left: 1px solid #e5e5e5;
  background: #f2f2f2; color: #222; font-size: 15px; cursor: pointer;
}
.m-ticker-wrap { height: 34px; overflow: hidden; display: flex; align-items: center; }
.m-ticker { display: flex; gap: 18px; white-space: nowrap; animation: ticker 70s linear infinite; }
.m-ticker a { color: #fff; font-size: 13px; }
.m-ticker a:hover { color: #fff; opacity: .85; }
.m-icons, .m-texts, .m-card, .m-news { background: #fff; }
.m-icons { display: grid; grid-template-columns: repeat(5, 1fr); padding: 12px 4px 4px; }
.m-icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 2px 10px; font-size: 12px; color: #333; min-width: 0;
}
.m-icon i {
  width: 42px; height: 42px; border-radius: 10px; background: #f4f4f4 center / cover no-repeat;
}
.m-icon span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-texts { display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px 6px 10px; }
.m-texts a {
  text-align: center; font-size: 14px; color: #222; line-height: 34px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-card { margin-top: 8px; }
.m-tabs { display: flex; align-items: center; height: 42px; padding: 0 8px; border-bottom: 1px solid #f0f0f0; }
.m-tabs button {
  border: 0; background: transparent; height: 42px; padding: 0 12px; font-size: 16px; color: #333; cursor: pointer; position: relative;
}
.m-tabs button.on { color: #2ea043; font-weight: 600; }
.m-tabs button.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: #2ea043;
}
.m-more { margin-left: auto; font-size: 13px; color: #888; }
.m-chips { display: flex; gap: 8px; padding: 12px; overflow: auto; }
.m-chips a {
  flex: none; height: 30px; line-height: 30px; padding: 0 12px; border: 1px solid #e6e6e6;
  border-radius: 16px; font-size: 13px; color: #333; background: #fff;
}
.m-row { display: flex; align-items: flex-start; padding: 0 8px 0 0; border-top: 1px solid #f5f5f5; min-height: 44px; }
.m-label { width: 52px; flex: none; color: #2ea043; font-size: 15px; line-height: 44px; text-align: center; }
.m-links { flex: 1; display: flex; flex-wrap: wrap; min-width: 0; }
.m-links a { width: 25%; line-height: 44px; text-align: center; font-size: 15px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-row .extra { display: none; flex-basis: 100%; width: 100%; }
.m-row.open .extra { display: flex; flex-wrap: wrap; }
.m-fold {
  width: 28px; flex: none; border: 0; background: transparent; color: #bbb; height: 44px; cursor: pointer; font-size: 12px;
}
.m-query { display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 4px 14px; }
.m-query a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; font-size: 13px; color: #333; }
.m-query i {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #d9d9d9; display: flex; align-items: center; justify-content: center;
  color: #666; font-style: normal; font-size: 14px;
}
.m-news { margin-top: 8px; }
.m-news a { display: block; padding: 12px 14px; border-bottom: 1px solid #f3f3f3; }
.m-news strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.45; color: #222; }
.m-news span { display: block; margin-top: 6px; color: #999; font-size: 12px; }
.m-foot { padding: 16px 12px 28px; text-align: center; color: #999; font-size: 12px; line-height: 1.9; background: #f2f2f2; }
.m-foot a { color: #666; margin: 0 6px; }
.m-foot .aqi { color: #19a35b; border-color: #b7e4c7; }
