:root {
  --navy: #0d1b3d;
  --navy-2: #152a5c;
  --blue: #1e6fff;
  --gold: #d4a017;
  --paper: #f4f7fb;
  --ink: #1a2332;
  --muted: #6b7a90;
  --line: rgba(255, 255, 255, 0.18);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #dfe6f0;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font: inherit; border: 0; background: none; cursor: pointer; }
input { font: inherit; }

.page {
  min-height: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--paper);
  padding-bottom: calc(24px + var(--safe-bottom));
  overflow: hidden;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(10px + var(--safe-top)) 16px 12px;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.topbar h1 { font-size: 17px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { width: 28px; height: 28px; color: #fff; font-size: 20px; line-height: 28px; }

.list { padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 8px rgba(13, 27, 61, 0.06);
}
.card-cover { height: 140px; background: #dbe4f3; object-fit: cover; width: 100%; }
.card-cover.ph { display: flex; align-items: center; justify-content: center; color: #8aa0c2; font-size: 14px; }
.card-body { padding: 12px 14px 14px; }
.card-title { font-size: 16px; font-weight: 650; line-height: 1.35; }
.card-meta { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* 专题首页 Banner：通栏大图。入口 logo 仍用 .entry-logo（48） */
.hub-banner {
  background: #fff;
  padding: 12px 16px 0;
}
.hub-banner img {
  width: 100%;
  height: 188px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #e8edf5;
}

.hero { background: #000; position: relative; }
.hero img { width: 100%; max-height: 220px; object-fit: cover; background: #000; }
.hero video { width: 100%; max-height: 280px; object-fit: contain; background: #000; display: block; }
.hero .ph { height: 180px; background: linear-gradient(160deg, #123 0%, #1e3a7a 100%); }

.tabs {
  position: sticky; top: calc(46px + var(--safe-top)); z-index: 15;
  display: flex; overflow-x: auto; background: #fff;
  border-bottom: 1px solid #e8edf5;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; padding: 12px 14px; font-size: 14px; color: var(--muted);
  position: relative; white-space: nowrap;
}
.tab.on { color: var(--blue); font-weight: 600; }
.tab.on::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--blue); border-radius: 1px;
}

.panel { padding: 16px; clear: both; }
.article { font-size: 15px; line-height: 1.85; color: #2c3544; overflow: hidden; }
.article::after { content: ""; display: block; clear: both; }
.article img, .article video {
  float: none !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 12px 0 !important;
  border-radius: 10px;
}
.article p { margin: 8px 0; }
.article a { color: var(--blue); }
.article h1, .article h2 { font-size: 18px; margin: 12px 0 8px; }
.article h3, .article h4 { font-size: 16px; margin: 12px 0 8px; }
.article ul, .article ol { margin: 8px 0 8px 1.4em; padding: 0; }
.article li { margin: 4px 0; }
.article table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.article th, .article td { border: 1px solid #e3e8ef; padding: 8px; text-align: left; word-break: break-word; }
.article blockquote {
  margin: 8px 0; padding: 8px 12px;
  background: #f5f7fb; border-left: 3px solid #c5d0e0; color: #5a6575;
}

.btn {
  display: block; width: 100%; height: 44px; border-radius: 8px;
  background: var(--blue); color: #fff; font-size: 16px; font-weight: 600;
}
.btn.ghost { background: #eef3fb; color: var(--blue); margin-top: 10px; }
.hint { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.plan {
  background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.plan b { font-size: 15px; }
.plan span { font-size: 12px; color: var(--muted); }
.cta { color: var(--blue); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.qr-block {
  text-align: center; margin: 0 0 16px; padding: 16px 12px;
  background: #fff; border-radius: 12px;
}
.qr-block img {
  width: 168px; height: 168px; margin: 0 auto 8px;
  background: #fff; border-radius: 8px;
}
.qr-block p { font-size: 13px; color: var(--muted); }
.qr-mini { text-align: center; flex-shrink: 0; }
.qr-mini img {
  width: 96px; height: 96px; margin: 0 auto 4px;
  background: #fff; border-radius: 6px;
}
.qr-mini span { display: block; font-size: 11px; color: var(--muted); }

.rank-wrap {
  margin: -16px; padding: 20px 16px 32px;
  background: linear-gradient(180deg, #1a6fe8 0%, #3aa0ff 55%, #e8f4ff 100%);
  min-height: 70vh;
}
.rank-title {
  text-align: center; color: #fff; font-size: 28px; font-weight: 800;
  letter-spacing: 4px; text-shadow: 0 2px 0 rgba(0,0,0,.12); margin: 8px 0 16px;
}
.rank-table { background: rgba(255,255,255,.12); border-radius: 12px; overflow: hidden; }
.rank-head, .rank-row {
  display: grid; grid-template-columns: 48px 1fr 1.4fr 52px;
  gap: 4px; align-items: center; padding: 10px 8px; font-size: 13px;
}
.rank-head { color: #dceaff; font-weight: 600; }
.rank-row { background: rgba(255,255,255,.92); color: var(--ink); margin: 0 0 2px; }
.rank-row:first-of-type { border-radius: 0; }
.no { text-align: center; font-weight: 700; }
.no.gold { color: #c9971a; }
.no.silver { color: #7d8b9c; }
.no.bronze { color: #b87333; }
.score { text-align: right; font-weight: 700; color: #1a5fd6; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.radar-card {
  margin-top: 16px; background: #fff; border-radius: 12px; padding: 14px;
}
.radar-card p { font-size: 13px; color: #3b4a63; line-height: 1.6; margin-bottom: 8px; }
.radar-svg { width: 100%; height: auto; }

.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.case { min-width: 0; cursor: pointer; }
.case-play-meta {
  margin: 16px 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  line-height: 22px;
}
.case-thumb {
  position: relative; border-radius: 12px; overflow: hidden; background: transparent;
  aspect-ratio: 16/10;
}
.case-thumb video, .case-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-ph { width: 100%; height: 100%; background: rgba(0,0,0,.2); }
.play {
  position: absolute; inset: 0; margin: auto; width: 36px; height: 36px;
  border-radius: 50%; background: rgba(0,0,0,.4); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  pointer-events: none;
}
.case-meta {
  position: absolute; left: 15px; right: 15px; bottom: 28px;
  text-align: left; pointer-events: none;
}
.case-on-img {
  font-size: 9px; line-height: 12px; color: var(--blue);
  text-align: left;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.case-under {
  margin-top: 8px; font-size: 14px; line-height: 20px; color: #fff;
  text-align: left; word-break: break-all;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.panel-cases .empty.cases-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255,255,255,.7);
}

/* 入口页：主题渐变底，案例白字可读（对齐 uni） */
#entry-page {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 38%, color-mix(in srgb, var(--blue) 40%, #fff) 100%);
  color: #fff;
}
#entry-page .tabs {
  background: color-mix(in srgb, var(--navy) 38%, transparent);
  border-bottom-color: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#entry-page .tab { color: rgba(255,255,255,.68); }
#entry-page .tab.on { color: #fff; }
#entry-page .article {
  background: rgba(255,255,255,.88); border-radius: 16px; padding: 18px 16px 24px; color: #2c3544;
}
/* 鸣谢单位：赞助 logo 居中、限宽，避免被通用 article img{width:100%} 拉爆 */
#entry-page .panel-thanks .article img,
#entry-page .panel-thanks .article img.thanks-logo {
  width: auto !important;
  max-width: 48% !important;
  max-height: 120px !important;
  height: auto !important;
  margin: 16px auto !important;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
}
#entry-page .panel .empty { color: rgba(255,255,255,.75); }

.dur {
  position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.55);
  color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px;
}

.empty { text-align: center; color: var(--muted); padding: 40px 16px; font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(20,28,45,.88); color: #fff; padding: 8px 14px; border-radius: 6px;
  font-size: 13px; z-index: 50; pointer-events: none;
}
.mask {
  position: fixed; inset: 0; background: rgba(10,16,32,.45); z-index: 40;
  display: flex; align-items: flex-end;
}
.sheet {
  width: 100%; background: #fff; border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(18px + var(--safe-bottom));
}
.sheet h3 { font-size: 16px; margin-bottom: 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; height: 42px; border: 1px solid #d7e0ee; border-radius: 8px; padding: 0 12px;
}
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row button { width: 110px; height: 42px; border-radius: 8px; background: #eef3fb; color: var(--blue); }
.agree { font-size: 13px; color: var(--muted); margin: 8px 0 12px; line-height: 1.5; }
.agree a { color: var(--blue); }
.loading { padding: 48px; text-align: center; color: var(--muted); }

.poster { width: 100%; border-radius: 10px; margin-bottom: 12px; background: #eef3fb; }
.section-title { font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.hub-intro {
  margin: 12px 16px 8px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 8px rgba(13, 27, 61, 0.06);
}
.hub-entries {
  padding: 8px 16px 24px;
  clear: both;
}
.entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 8px rgba(13, 27, 61, 0.06);
  border-left: 4px solid var(--entry-theme, var(--blue));
}
.entry-card::after {
  content: "›";
  margin-left: auto;
  color: #b7c3d6;
  font-size: 22px;
  line-height: 1;
}
.entry-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: #dbe4f3; flex-shrink: 0; }
.entry-logo.ph { width: 48px; height: 48px; }
.entry-name { font-size: 15px; font-weight: 650; }
.entry-meta { margin-top: 4px; font-size: 12px; color: var(--muted); }
