:root{
  --bg:#fdf8f1; --surface:#fffdf9; --ink:#3d3229; --muted:#8a7a68;
  --accent:#e4573d; --accent2:#f2a541; --line:#f0e2cf; --radius:22px;
  --shadow:0 12px 32px rgba(190,130,60,.14);
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",sans-serif;background:var(--bg);color:var(--ink);min-height:100vh;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;padding:14px 20px;background:rgba(253,248,241,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.brand{font-weight:800;font-size:18px}
.nav-btn{background:none;border:none;font-size:15px;color:var(--muted);cursor:pointer;padding:6px 10px;border-radius:10px}
.nav-btn:hover{color:var(--ink);background:#f7ecda}
main{flex:1;width:100%;max-width:640px;margin:0 auto;padding:24px 16px 48px}
.view.hidden{display:none}
.hero{text-align:center;padding:18px 0 8px}
.hero h1{font-size:28px;letter-spacing:.5px}
.hero-sub{color:var(--muted);margin-top:8px;font-size:14px}
.section-title{font-size:19px;margin:26px 0 12px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;margin-bottom:14px}
.today-card{text-align:center;padding:28px 20px}
.today-card .day-tag{display:inline-block;background:#fdeeda;color:#b96a12;font-size:12px;font-weight:700;padding:4px 12px;border-radius:999px;margin-bottom:10px}
.today-card h3{font-size:22px;margin-bottom:6px}
.today-card p{color:var(--muted);font-size:14px;margin-bottom:16px}
.btn{display:inline-block;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:15px;font-weight:600;padding:11px 22px;border-radius:999px;cursor:pointer;transition:transform .08s ease, box-shadow .15s ease}
.btn:hover{box-shadow:var(--shadow)}
.btn:active{transform:scale(.97)}
.btn.primary{background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;border:none}
.btn:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.quiz-row{display:flex;align-items:center;gap:12px;padding:16px 18px}
.quiz-row .info{flex:1}
.quiz-row .info h4{font-size:16px;margin-bottom:3px}
.quiz-row .info p{color:var(--muted);font-size:13px}
.pill{font-size:12px;font-weight:700;padding:4px 10px;border-radius:999px;white-space:nowrap}
.pill.done{background:#e6f5e3;color:#3d7a34}
.pill.now{background:#fdeeda;color:#b96a12}
.pill.locked{background:#f1ece4;color:#a2947f}
.back-btn{background:none;border:none;color:var(--muted);font-size:14px;cursor:pointer;margin-bottom:16px}
.progress-wrap{margin-bottom:22px}
.progress-meta{display:flex;justify-content:space-between;font-size:13px;color:var(--muted);margin-bottom:8px}
.progress-bar{height:8px;background:#f3e7d3;border-radius:99px;overflow:hidden}
#progress-fill{height:100%;width:0;background:linear-gradient(90deg,var(--accent),var(--accent2));border-radius:99px;transition:width .3s ease}
.question-text{font-size:22px;line-height:1.5;margin-bottom:20px}
.options{display:flex;flex-direction:column;gap:12px}
.option-btn{text-align:left;background:var(--surface);border:1.5px solid var(--line);border-radius:16px;padding:16px 18px;font-size:16px;cursor:pointer;color:var(--ink);transition:border-color .12s, background .12s}
.option-btn:hover{border-color:var(--accent2);background:#fff8ec}
.scale-note{font-size:12px;color:var(--muted);text-align:center;margin-top:4px}
/* 结果海报卡 */
.poster{background:linear-gradient(180deg,#fff6e8 0%,#fffdf9 55%,#fdf1e2 100%);border:1px solid var(--line);border-radius:28px;box-shadow:0 18px 44px rgba(190,130,60,.20);padding:30px 24px 22px;text-align:center;max-width:420px;margin:6px auto 18px}
.poster-quiz{font-size:13px;color:var(--muted);letter-spacing:1px;margin-bottom:12px}
.poster-mascot-wrap{width:224px;height:224px;margin:0 auto 10px;border-radius:50%;overflow:hidden;border:6px solid #fff;box-shadow:0 10px 26px rgba(190,130,60,.25);background:#f7ecda}
.poster-mascot-wrap img{width:100%;height:100%;object-fit:cover}
.poster-badge{display:inline-block;background:var(--accent);color:#fff;font-size:12px;font-weight:700;padding:4px 14px;border-radius:999px;margin-bottom:10px}
.poster-name{font-size:34px;letter-spacing:1px;margin-bottom:12px}
.poster-blurb{font-size:15px;line-height:1.8;color:#5c4c3b;padding:0 6px}
.poster-rarity{margin-top:16px;font-size:14px;font-weight:700;color:#b96a12}
.poster-date{margin-top:4px;font-size:12px;color:var(--muted)}
.poster-brand{margin-top:16px;padding-top:12px;border-top:1px dashed var(--line);font-size:12px;color:var(--muted)}
.result-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.disclaimer{text-align:center;color:var(--muted);font-size:12px;margin-top:16px}
.archive-hint{color:var(--muted);font-size:13px;margin-bottom:16px;line-height:1.6}
.attempt-head{display:flex;justify-content:space-between;align-items:center;cursor:pointer;gap:10px}
.attempt-head .meta{flex:1}
.attempt-head h4{font-size:16px;margin-bottom:3px}
.attempt-head p{color:var(--muted);font-size:13px}
.attempt-detail{margin-top:14px;border-top:1px dashed var(--line);padding-top:14px;display:none}
.attempt-detail.open{display:block}
.qa{margin-bottom:12px}
.qa .q{font-size:14px;font-weight:600;margin-bottom:3px}
.qa .a{font-size:14px;color:#b96a12}
.attempt-actions{margin-top:8px;display:flex;gap:10px}
.empty{text-align:center;color:var(--muted);padding:36px 0;font-size:14px;line-height:1.8}
.footer{padding:18px 16px 26px;text-align:center;color:var(--muted);font-size:12px;display:flex;flex-direction:column;gap:6px}
.footer a{color:var(--muted)}
.doc{max-width:680px;margin:0 auto;padding:28px 20px 60px;line-height:1.9;font-size:15px}
.doc h1{font-size:24px;margin-bottom:6px}
.doc h2{font-size:17px;margin:22px 0 6px}
.doc p,.doc li{color:#5c4c3b}
.doc .updated{color:var(--muted);font-size:13px;margin-bottom:10px}
.doc a{color:var(--accent)}
@media (max-width:480px){.poster-name{font-size:29px}.hero h1{font-size:24px}}
