:root {
  --bg: #ffffff;
  --panel: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --blue: #0071e3;
  --blue-dark: #0077ed;
  --line: #d2d2d7;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.links {
  display: flex;
  gap: 20px;
}

.links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.links a:hover { color: var(--text); }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tz {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.tz select {
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  background: #fff;
  color: var(--text);
  max-width: 130px;
}

#navMember {
  display: flex;
  align-items: center;
  gap: 10px;
}

#navMember .who {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- buttons ---------- */

button {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  padding: 8px 18px;
  cursor: pointer;
  font-family: inherit;
}

button:hover { background: var(--blue-dark); }

button.ghost {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--line);
  font-size: 14px;
  padding: 5px 12px;
}

button.ghost:hover { background: var(--panel); }

button.sm { font-size: 13px; padding: 4px 10px; }

a.ghost {
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 12px;
}

a.ghost.sm { font-size: 13px; padding: 4px 10px; }

a.ghost:hover { background: var(--panel); }

/* ---------- layout ---------- */

main#app {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 22px 64px;
  min-height: 60vh;
}

main#app section { margin-bottom: 56px; }

main#app section.narrow { max-width: 520px; }

h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

h3 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }

footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.foot-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 22px 40px;
}

footer p { font-size: 13px; color: var(--faint); margin: 0; }

/* ---------- home ---------- */

.hero { text-align: left; }

/* 深色预测卡片（旧版卡片样式） */
.hero-card {
  background: #0b1526;
  border-radius: 18px;
  padding: 30px 28px;
  color: #fff;
  margin: 0 0 14px;
}

.hero-card .kicker { color: #8e9eb5; }

.hero-card .pred-main { color: #fff; }

.hero-sig {
  color: #93a3bb;
  font-size: 15px;
  margin: 0;
}

.hero-delayed {
  color: #ff9f0a;
  font-weight: 600;
  font-size: 15px;
  margin: 8px 0 0;
}

.prob-line { margin: 0 0 10px; }

/* 预测区：左右分栏大卡片（旧版样式） */
.pred-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-radius: 18px;
  overflow: hidden;
  margin: 0 0 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.pred-grid .hero-card { border-radius: 0; margin: 0; box-shadow: none; }

.side-panel {
  background: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.side-probs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-bottom: 14px;
}

.side-prob + .side-prob { border-left: 1px solid rgba(0, 0, 0, 0.08); padding-left: 18px; }

.sp-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.sp-top b { font-size: 22px; color: var(--blue); font-variant-numeric: tabular-nums; }

.pbar {
  height: 6px;
  background: #e9edf2;
  border-radius: 3px;
  overflow: hidden;
}

.pbar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.side-wait {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 14px;
  color: var(--muted);
}

.wait-num b { font-size: 28px; color: var(--text); font-variant-numeric: tabular-nums; }

.wait-num i { font-style: normal; font-size: 13px; color: var(--muted); margin: 0 8px 0 3px; }

.wait-num i:last-child { margin-right: 0; }

.side-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
  font-size: 13px;
}

.tz-note { font-size: 12.5px; color: var(--faint); margin: 0 0 12px; line-height: 1.6; }

.stat-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.banked-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.banked-left { display: flex; align-items: baseline; gap: 10px; }

.banked-left > span { font-size: 14px; color: var(--muted); }

.banked-left b { font-size: 22px; font-variant-numeric: tabular-nums; }

.banked-sub { font-size: 13.5px; }

/* 注册引导 CTA */
.cta-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(135deg, #0a2540 0%, #0071e3 100%);
  border-radius: 18px;
  padding: 26px 28px;
  margin: 0 0 12px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.28);
}

.cta-card h2 { margin: 0 0 6px; font-size: 20px; color: #fff; }

.cta-card p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.88); }

.cta-btn {
  display: inline-block;
  background: #fff;
  color: #0071e3;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 28px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.cta-btn:hover { background: #eef5ff; }

.cta-card[hidden] { display: none; }

.links a.ext::after {
  content: ' ↗';
  font-size: 11px;
  opacity: 0.6;
}

.kicker {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
}

.pred-main {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.notice {
  background: #fff8e7;
  border: 1px solid #f0d98c;
  border-radius: var(--radius);
  padding: 18px 22px;
}

.notice h2 { font-size: 17px; margin-bottom: 8px; }
.notice p { margin: 0; }

.more {
  display: inline-block;
  margin-top: 8px;
  font-size: 15px;
  color: var(--blue);
  text-decoration: none;
}

.more:hover { text-decoration: underline; }

/* ---------- heatmap ---------- */

.heat-wrap { overflow-x: auto; }

.heat {
  display: inline-block;
  min-width: 100%;
  padding: 4px 2px;
}

.hrow {
  display: grid;
  grid-template-columns: 30px repeat(24, minmax(16px, 1fr));
  gap: 3px;
  align-items: center;
  margin-bottom: 3px;
}

.hcorner { }

.hcol {
  font-size: 10px;
  color: var(--faint);
  text-align: center;
}

.hrowh {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  padding-right: 4px;
}

.cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: #f0f0f3;
  min-width: 14px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}

.sw {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.sw.r { background: rgba(0, 113, 227, 0.65); }
.sw.b { background: rgba(255, 159, 10, 0.65); }

/* ---------- stat cards ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .pred-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 22px;
}

.srow {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 15px;
}

.srow:first-of-type { border-top: none; }

.srow .k { color: var(--muted); }
.srow .v { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- lists ---------- */

.list { list-style: none; margin: 0; padding: 0; }

.list .tl {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
}

.list .tl p { margin: 10px 0 0; }

.tl-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge.done { background: rgba(0, 113, 227, 0.12); color: var(--blue); }
.badge.promised { background: rgba(255, 159, 10, 0.16); color: #b25e09; }
.badge.reply { background: rgba(0, 113, 227, 0.12); color: var(--blue); }

/* ---------- forms ---------- */

.auth { max-width: 420px; }

form label {
  display: block;
  margin-bottom: 16px;
  font-size: 15px;
}

form label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  font-size: 16px;
  font-family: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

textarea { resize: vertical; }

.msg {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.switch { margin-top: 18px; font-size: 15px; }
.switch a { color: var(--blue); text-decoration: none; }
.switch a:hover { text-decoration: underline; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 12px;
  font-size: 16px;
  cursor: pointer;
}

.row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--blue); }

.btns { display: flex; gap: 12px; margin-top: 8px; }

.radios { display: flex; gap: 20px; margin-bottom: 16px; }
.radios label { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.radios input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ---------- admin ---------- */

#rangeSel {
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  margin-bottom: 18px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 18px 8px;
  overflow-x: auto;
}

.bar {
  flex: 1;
  min-width: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.bar .fill {
  width: 70%;
  max-width: 34px;
  background: var(--blue);
  border-radius: 4px 4px 0 0;
  min-height: 3px;
}

.blabel {
  font-size: 10px;
  color: var(--faint);
  margin-top: 6px;
  white-space: nowrap;
}

.tbl-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

th { color: var(--muted); font-weight: 600; font-size: 13px; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .pred-main { font-size: 30px; }
  h1 { font-size: 26px; }
  .nav-inner { gap: 14px; }
  .links { gap: 14px; }
  .tz span { display: none; }
  main#app { padding-top: 28px; }
}
