/* 独裁预言家 · 样式。只用系统字体，不向任何第三方请求字体。 */
:root {
  --paper: #F4EFE3; --paper2: #EAE3D2; --card: #FBF8F1; --ink: #1A1A1A; --muted: #4A453B; --muted2: #5A5448;
  --line: #C9C0AD; --line2: #DDD5C3; --red: #B3261E; --red-d: #7F1A15; --gold: #C9A24B; --gold2: #E2BD62; --dark2: #262420;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", "Noto Serif CJK TC", "PMingLiU", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
}
html[lang="zh-Hant"] { --serif: "Songti TC", "Noto Serif CJK TC", "PMingLiU", "MingLiU", Georgia, serif; --sans: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.6; -webkit-text-size-adjust: 100%; }
a { color: var(--red); } a:hover { color: var(--red-d); }
button, input, select { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--serif); }

/* 顶栏 */
.top { background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; align-items: baseline; gap: 10px; color: var(--paper); text-decoration: none; }
.logo:hover { color: var(--paper); }
html[lang="en"] .logo-en { display: none; }
.logo-cn { font-family: var(--serif); font-weight: 900; font-size: 22px; letter-spacing: 2px; }
.logo-en { font-size: 11px; letter-spacing: 4px; font-weight: 700; color: #E06A60; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav-a { color: var(--paper); text-decoration: none; padding: 10px 12px; font-size: 15px; }
.nav-a:hover { color: #fff; text-decoration: underline; }
.lang select { background: transparent; color: var(--paper); border: 1px solid #5A5448; padding: 8px 10px; min-height: 44px; cursor: pointer; }
.lang option { color: var(--ink); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); }
.btn:hover { background: #333; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-d); border-color: var(--red-d); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold2); color: var(--ink); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }

/* 首页 */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; padding-top: 64px; padding-bottom: 44px; }
.hero-text { flex: 1 1 560px; display: flex; flex-direction: column; gap: 18px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 3px; color: var(--red); }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 7vw, 68px); line-height: 1.12; }
.hero p { margin: 0; font-size: 18px; color: var(--muted); max-width: 640px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.stamp { flex: 0 0 210px; height: 210px; border: 6px solid var(--red); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-12deg); color: var(--red); text-align: center; margin: 0 auto; }
.stamp b { font-family: var(--serif); font-size: 34px; font-weight: 900; line-height: 1.15; }
.stamp small { font-size: 11px; font-weight: 700; letter-spacing: 2px; margin-top: 6px; }
.stats { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--paper2); }
.stats-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; padding-top: 24px; padding-bottom: 24px; }
.stat b { display: block; font-family: var(--serif); font-size: 38px; font-weight: 900; line-height: 1.2; }
.stat span { font-size: 15px; color: var(--muted); }
.sec { padding-top: 56px; padding-bottom: 40px; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.sec h2 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 900; }
.sub { font-size: 15px; color: var(--muted); }
.seg { display: inline-flex; border: 2px solid var(--ink); }
.seg button { background: transparent; color: var(--ink); border: 0; padding: 10px 16px; min-height: 44px; cursor: pointer; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.ccard { background: var(--card); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.ccard-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ccard-meta { font-size: 13px; font-weight: 700; color: var(--red); letter-spacing: 1px; }
.ccard-name { font-family: var(--serif); font-size: 28px; font-weight: 900; line-height: 1.2; }
.ccard-score { text-align: right; }
.ccard-score b { display: block; font-family: var(--serif); font-size: 21px; }
.ccard-score span { font-size: 12px; color: var(--muted2); }
.ccard-people { font-size: 15px; color: var(--muted); }
.ccard-people b { color: var(--ink); }
.ccard-top-pred { border-top: 1px solid var(--line2); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.small { font-size: 13px; color: var(--muted2); }
.bar { height: 8px; background: #E5DDCB; }
.bar i { display: block; height: 8px; background: var(--red); }
.between { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.ccard .btn { margin-top: auto; }
.rules { background: var(--card); border: 2px solid var(--ink); padding: 28px; }
.rules ol { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; color: var(--muted); font-size: 16px; }

/* 国家页 */
.chero { display: flex; flex-wrap: wrap; gap: 36px; justify-content: space-between; align-items: flex-end; padding-top: 52px; padding-bottom: 28px; }
.chero-l { flex: 1 1 480px; display: flex; flex-direction: column; gap: 10px; }
.chero h1 { margin: 0; font-family: var(--serif); font-weight: 900; font-size: clamp(56px, 9vw, 92px); line-height: 1.05; }
.facts { flex: 1 1 420px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--ink); background: var(--card); }
.facts div { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.facts .wide { grid-column: 1 / -1; border-right: 0 !important; border-bottom: 0; }
.facts span { font-size: 13px; color: var(--muted2); }
.facts b { font-size: 17px; }
.qs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 18px; align-items: start; padding-bottom: 40px; }
.q { background: var(--card); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.q-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted2); }
.badge { font-size: 12px; font-weight: 700; background: var(--red); color: #fff; padding: 3px 8px; }
.badge-gold { background: var(--gold); color: var(--ink); }
.badge-gray { background: #8A8170; }
.q h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 900; line-height: 1.35; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 11px 14px; text-align: left; font-size: 16px; cursor: pointer; color: var(--ink); background: #fff; border: 1px solid var(--line); }
.opt:hover { border-color: var(--ink); }
.opt .fill { position: absolute; left: 0; top: 0; bottom: 0; background: #EFE8D8; }
.opt .lbl, .opt .pct { position: relative; }
.opt .lbl { display: flex; gap: 10px; align-items: center; }
.opt .dot { flex: 0 0 14px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #8A8170; }
.opt .pct { font-weight: 700; color: var(--muted); }
.opt[aria-pressed="true"] { border: 2px solid var(--ink); font-weight: 700; }
.opt[aria-pressed="true"] .fill { background: #F2C9C4; }
.opt[aria-pressed="true"] .dot { background: var(--red); border: 3px solid var(--ink); }
.opt.hit { border: 2px solid #2E7D32; }
.rule { font-size: 13px; color: var(--muted2); }
.submit-bar { background: var(--ink); color: var(--paper); position: sticky; bottom: 0; z-index: 5; }
.submit-in { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.submit-in b { font-family: var(--serif); font-size: 24px; }
.submit-in .small { color: #B8AF9C; }
.msg { font-size: 14px; color: #E06A60; }

/* 结果页 */
.res { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-top: 44px; padding-bottom: 60px; }
.res-l { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.res-r { flex: 1 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.res h1 { margin: 0; font-family: var(--serif); font-weight: 900; font-size: 40px; line-height: 1.2; }
.cert-img { width: 100%; height: auto; border: 1px solid var(--line); background: #fff; display: block; }
.box { background: var(--card); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.box h2 { margin: 0; font-family: var(--serif); font-size: 22px; }
.claim { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; font-weight: 700; letter-spacing: 3px; background: #fff; border: 2px dashed var(--red); padding: 10px 14px; text-align: center; user-select: all; }
.list { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); font-size: 15px; }
.list span { color: var(--muted); }
.dark { background: var(--ink); color: var(--paper); padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.dark h2 { margin: 0; font-family: var(--serif); font-weight: 900; font-size: 28px; line-height: 1.3; }
.dark p { margin: 0; color: #D8D0BE; }
.dark .kicker { color: var(--gold2); }
.dark .small { color: #B8AF9C; }
.amts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.amts button { min-height: 48px; font-size: 17px; font-weight: 700; cursor: pointer; background: transparent; color: var(--paper); border: 1px solid #4A4538; }
.amts button[aria-pressed="true"] { background: var(--gold); color: var(--ink); border: 2px solid var(--gold); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #B8AF9C; }
.field input { background: var(--dark2); border: 1px solid #4A4538; color: var(--paper); padding: 12px 14px; font-size: 16px; }
.light .field { color: var(--muted); }
.light .field input { background: #fff; color: var(--ink); border-color: var(--line); }
.pay { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; background: var(--dark2); padding: 18px; }
.qr { flex: 0 0 172px; width: 172px; height: 172px; background: #fff; padding: 8px; }
.qr { position: relative; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; background: #fff; padding: 5px; border-radius: 8px; }
.qr-logo i { display: block; width: 100%; height: 100%; background: #0000FF; border-radius: 6px; box-shadow: inset 0 0 0 7px #0000FF, inset 0 0 0 20px #fff; }
.pay-info { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pay-amt { font-size: 22px; font-weight: 700; }
.addr { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; color: #D8D0BE; }
.warn { font-size: 13px; color: var(--gold2); }
.ok { color: #8FD694; font-weight: 700; }
.err { color: #FF8A80; font-size: 14px; }
.status-hit { color: #2E7D32; font-weight: 700; }
.status-miss { color: #8A8170; font-weight: 700; }
.center { text-align: center; }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* 页脚 */
.foot { background: var(--ink); color: #B8AF9C; margin-top: 0; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-top: 32px; padding-bottom: 32px; font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot-tag { font-family: var(--serif); color: var(--paper); font-size: 16px; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 36px; }
  .stamp { flex-basis: 160px; height: 160px; }
  .stamp b { font-size: 26px; }
  .amts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { border-right: 0; }
  .res h1 { font-size: 30px; }
  .submit-in { padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .submit-in .small { display: none; }
  .submit-in b { font-size: 18px; }
  .submit-in .btn { width: 100%; }
}
