:root {
  --bg: #f7f4ed;
  --paper: rgba(255, 255, 255, 0.88);
  --ink: #111827;
  --muted: #5b6472;
  --line: rgba(15, 23, 42, 0.08);
  --brand: #0f766e;
  --brand-deep: #164e63;
  --brand-soft: #e5f5f2;
  --accent: #c0841e;
  --radius: 24px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scrollbar-gutter: stable both-edges;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@view-transition {
  navigation: auto;
}
body {
  font-family: "PingFang SC", "MiSans", "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 15%, rgba(15, 118, 110, 0.09), transparent 40%), radial-gradient(circle at 85% 80%, rgba(192, 132, 30, 0.12), transparent 45%), var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-family: "PingFang SC", "MiSans", "HarmonyOS Sans SC", "Source Han Sans SC", "Microsoft YaHei", Arial, sans-serif; margin: 0; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(1200px, 92vw); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(10px); background: rgba(247, 244, 237, 0.84); border-bottom: 1px solid var(--line); }
.topbar .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; border-radius: 14px; }
.brand .name { font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; font-size: 20px; line-height: 1; }
.brand .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 999px; font-size: 14px; color: #374151; transition: all 160ms ease; }
.nav a:hover, .nav a.active { background: white; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06); color: #0f172a; }
.nav a.nav-start { background: rgba(15, 118, 110, 0.1); color: #0f766e; font-weight: 700; }
.nav a.nav-start:hover, .nav a.nav-start.active { background: rgba(15, 118, 110, 0.16); box-shadow: none; }
.lang-switch { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 2px; }
.lang-switch button { border: none; background: transparent; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; }
.lang-switch button.active { background: #0f766e; color: #fff; }
.btn { border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; font-weight: 700; cursor: pointer; background: white; color: var(--ink); }
.btn.primary { color: white; border: none; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); box-shadow: 0 14px 34px rgba(5, 150, 105, 0.28); }
.btn, .lang-switch button, .option { min-height: 44px; }
.page { padding: 38px 0 64px; }
.page { animation: pageIn .18s ease-out; }
@keyframes pageIn { from { opacity: .92; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.type-card .image img,
.thumb-mini img,
.result-side .thumb img,
.type-preview .thumb img { aspect-ratio: 1 / 1; object-fit: contain; }
.hero { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 24px; align-items: stretch; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid rgba(15, 118, 110, 0.2); background: rgba(255, 255, 255, 0.86); padding: 8px 14px; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: #0f766e; font-weight: 700; }
.hero h1 { margin-top: 16px; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.12; text-align: left; }
.hero h1 .line { display: block; white-space: nowrap; }
html[lang="en"] .hero h1 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.08; }
html[lang="en"] .hero h1 .line { white-space: normal; }
.lead { margin-top: 14px; font-size: clamp(16px, 2.2vw, 20px); line-height: 1.9; color: var(--muted); }
.hero-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.kpi-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 20px; background: var(--paper); padding: 14px; }
.kpi .k { font-size: 12px; color: #64748b; letter-spacing: 0.12em; text-transform: uppercase; }
.kpi .v { margin-top: 6px; font-size: 22px; font-weight: 800; }
.card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.panel { padding: 18px; }
.stack { display: grid; gap: 12px; }
.type-preview { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; }
.type-preview .thumb { border-radius: 14px; padding: 8px; background: rgba(15, 23, 42, 0.06); }
.ticker-wrap { height: 560px; min-height: 320px; overflow: hidden; border-radius: 20px; align-self: start; }
.ticker-track { display: grid; gap: 10px; animation: tickerDown 38s linear infinite; }
.ticker-card { border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 18px; padding: 10px; background: transparent; box-shadow: none; }
.ticker-card:hover { border-color: rgba(15, 118, 110, 0.35); background: rgba(255,255,255,0.28); }
@keyframes tickerDown { 0% { transform: translateY(-46%); } 100% { transform: translateY(0); } }
.section-title { margin-top: 46px; margin-bottom: 14px; }
.section-title p { margin: 0; text-transform: uppercase; letter-spacing: 0.16em; color: #64748b; font-size: 12px; font-weight: 700; }
.section-title h2 { margin-top: 10px; font-size: clamp(28px, 4vw, 46px); }
.grid-5 { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.faq-item, .model-item { border: 1px solid var(--line); border-radius: 20px; background: rgba(255, 255, 255, 0.9); padding: 16px; }
.faq-item h3, .model-item h3 { font-size: 24px; }
.faq-item p, .model-item p { margin: 12px 0 0; color: var(--muted); line-height: 1.8; font-size: 14px; }
.quiz-wrap { max-width: 860px; margin: 0 auto; }
.quiz-head { margin-bottom: 12px; }
.progress { height: 10px; border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, 0.08); }
.progress .bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--brand), #0ea5e9); }
.options { margin-top: 14px; display: grid; gap: 10px; }
.option {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  line-height: 1.65;
  font-size: 17px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.option.active { border-color: #0f766e; background: #f0fffb; }
.option:hover { border-color: rgba(15, 118, 110, 0.35); background: #f7fffe; }
.quiz-actions { margin-top: 12px; display: flex; justify-content: space-between; gap: 10px; }
.result-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.result-side .thumb { border-radius: 20px; background: linear-gradient(180deg, #f7faf9, #eff5f2); padding: 12px; border: 1px solid var(--line); }
.result-side .code { margin-top: 10px; font-size: 28px; font-weight: 800; }
.result-main .meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.meta .item { border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #fff; }
.dim-table { margin-top: 8px; display: grid; gap: 6px; }
.dim-row { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(15, 23, 42, 0.12); padding-bottom: 5px; font-size: 14px; }
.list { margin: 0; padding-left: 20px; line-height: 1.8; }
.types-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.type-card { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff; display: grid; grid-template-rows: auto 1fr; transition: transform .2s ease, box-shadow .2s ease; }
.type-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14); }
.type-card .image { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f7faf9, #eff5f2); padding: 12px; }
.type-card .image img { width: 100%; max-width: 190px; margin: 0 auto; }
.type-card .body { padding: 14px; }
.type-card .code { font-size: 12px; color: #0f766e; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; }
.top3 { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.top3 .cardx { border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 12px; }
.top3 .cardx.top-1 { background: linear-gradient(135deg, #fff8e1, #fff); border-color: rgba(180, 83, 9, 0.28); }
.top3 .cardx.top-2 { background: linear-gradient(135deg, #f8fafc, #fff); border-color: rgba(71, 85, 105, 0.25); }
.top3 .cardx.top-3 { background: linear-gradient(135deg, #fff1e8, #fff); border-color: rgba(194, 65, 12, 0.25); }
.rank-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.rank-table th, .rank-table td { border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: left; vertical-align: middle; }
.rank-table th { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; }
.rank-table .thumb-mini { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(180deg, #f7faf9, #eff5f2); padding: 5px; }
.rank-row { cursor: pointer; transition: background .15s ease; }
.rank-row:hover { background: rgba(15, 23, 42, 0.03); }
.rank-name { font-size: 18px; font-weight: 800; }
.rank-code { font-size: 12px; color: #0f766e; letter-spacing: .12em; text-transform: uppercase; }
.rank-badge { display: inline-flex; min-width: 32px; justify-content: center; border-radius: 999px; padding: 4px 8px; font-weight: 800; }
.rank-badge.top1 { background: #f59e0b; color: #111827; }
.rank-badge.top2 { background: #94a3b8; color: #111827; }
.rank-badge.top3 { background: #f97316; color: #111827; }
.profile-stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 12px; }
.profile-box { border: 1px solid var(--line); background: rgba(255,255,255,.85); border-radius: 16px; padding: 12px; }
.profile-box h3 { font-size: 18px; margin-bottom: 8px; }
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed rgba(15,23,42,.1); }
.profile-row:last-child { border-bottom: 0; }
.home-inline-stats { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.7); padding: 12px; overflow-x: auto; }
.home-inline-stats .label { display: inline-flex; align-items: center; height: 40px; color: #64748b; font-size: 13px; line-height: 1; flex: 0 0 auto; }
.home-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; background: #fff; font-size: 13px; white-space: nowrap; height: 40px; line-height: 1; flex: 0 0 auto; }
.home-chip strong { display: inline-flex; align-items: center; font-size: 16px; line-height: 1; }
.home-chip.top1 { border-color: rgba(180,83,9,.3); background: #fffbeb; }
.home-chip.top2 { border-color: rgba(71,85,105,.3); background: #f8fafc; }
.home-chip.top3 { border-color: rgba(194,65,12,.3); background: #fff7ed; }
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.48); display: none; align-items: center; justify-content: center; z-index: 99; }
.modal.show { display: flex; }
.modal .box { width: min(680px, 92vw); background: #fff; border-radius: 20px; border: 1px solid var(--line); padding: 18px; }
.form-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: #475569; }
.field select { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.footer { border-top: 1px solid var(--line); padding: 26px 0 30px; color: #64748b; font-size: 13px; }
.footer #siteFooterText { min-height: 140px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 20px; }
.footer-grid strong { color: #0f172a; display: block; margin-bottom: 8px; }
.footer-grid p { margin: 0; line-height: 1.8; }
.footer-grid a { display: block; margin-bottom: 6px; color: #475569; }
.footer-copy { margin-top: 14px; padding-top: 10px; border-top: 1px dashed rgba(15,23,42,.12); }
.rank-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rank-table { min-width: 680px; }
@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .types-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-grid { grid-template-columns: 1fr; }
  .top3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .container { width: min(1200px, 94vw); }
  .topbar .inner { padding: 10px 0; gap: 10px; }
  .brand img { width: 38px; height: 38px; }
  .brand .name { font-size: 18px; letter-spacing: 0.12em; }
  .brand .sub { font-size: 12px; }
  .nav { display: none; }
  .lang-switch { transform: scale(.96); transform-origin: right center; }
  .kpi-grid, .result-main .meta, .form-grid { grid-template-columns: 1fr; }
  .grid-2, .types-grid, .grid-3, .profile-stats, .footer-grid { grid-template-columns: 1fr; }
  .page { padding-top: 20px; padding-bottom: 44px; }
  .hero { gap: 14px; }
  .hero h1 { font-size: clamp(34px, 12vw, 48px); line-height: 1.08; margin-top: 12px; }
  .lead { font-size: 16px; line-height: 1.75; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { flex: 1 1 100%; width: 100%; justify-content: center; text-align: center; }
  .kpi .v { font-size: 30px; }
  .ticker-wrap { height: 380px; min-height: 300px; }
  .type-preview { grid-template-columns: 72px 1fr; }
  .type-preview .thumb { padding: 6px; }
  .type-preview h3 { font-size: 20px !important; }
  .section-title { margin-top: 30px; }
  .section-title h2 { font-size: clamp(26px, 9vw, 34px); }
  .quiz-wrap { border-radius: 18px; }
  .option { padding: 12px; line-height: 1.55; font-size: 16px; }
  .quiz-actions { flex-direction: column-reverse; }
  .quiz-actions .btn { width: 100%; }
  .result-grid { gap: 12px; }
  .result-side .code { font-size: 24px; }
  .modal .box { max-height: 86vh; overflow-y: auto; border-radius: 16px; }
  .home-inline-stats { gap: 8px; padding: 10px; }
  .home-inline-stats .label { height: 36px; font-size: 12px; }
  .home-chip { height: 36px; padding: 0 12px; font-size: 12px; }
  .home-chip strong { font-size: 14px; }
  .rank-name { font-size: 16px; }
  .footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
}
