:root {
  --bg: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f7f8fd;
  --surface-3: #eef1f9;
  --text: #161a2b;
  --muted: #646c82;
  --muted-2: #9aa1b8;
  --border: #e9ecf6;
  --border-strong: #dde1f0;
  --primary: #5b4be8;
  --primary-2: #8b5cf6;
  --primary-soft: #eee9ff;
  --gold: #c8902f;
  --gold-2: #e9c46a;
  --good: #18a558;
  --good-soft: #e7f7ee;
  --weak: #e06615;
  --weak-soft: #fdeee3;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(31,38,80,.05), 0 4px 14px -8px rgba(31,38,80,.12);
  --shadow: 0 2px 6px rgba(31,38,80,.05), 0 18px 44px -22px rgba(31,38,80,.28);
  --shadow-lg: 0 30px 70px -30px rgba(31,38,80,.4);
  --font: 'Noto Sans SC', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --serif: 'Noto Serif SC', 'Songti SC', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

/* 背景极光（更克制、更高级） */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(860px 520px at 8% -6%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(760px 520px at 102% -2%, rgba(232, 196, 106, 0.16), transparent 55%),
    radial-gradient(900px 700px at 50% 118%, rgba(91, 75, 232, 0.10), transparent 60%),
    linear-gradient(180deg, #f6f7fc, #eceff8);
}

/* ---------- 顶部栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 13px clamp(14px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(233, 236, 246, 0.9);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-mark {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(150deg, #8b5cf6, #5b4be8);
  border-radius: 13px;
  box-shadow: 0 8px 20px -6px rgba(91, 75, 232, 0.55), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-text h1 {
  font-family: var(--serif); font-weight: 900; font-size: 21px;
  letter-spacing: 1px; line-height: 1.1;
  background: linear-gradient(94deg, #5b4be8, #8b5cf6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.slogan { font-size: 11px; color: var(--muted); letter-spacing: .6px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.quota-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  background: rgba(255,255,255,.7);
  border: 1px solid var(--border);
  padding: 7px 13px; border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.quota-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(200,144,47,.16); }
.avatar-btn {
  font-family: var(--font); font-size: 14px; font-weight: 600;
  color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #5b4be8, #8b5cf6);
  border: none; padding: 9px 18px; border-radius: 12px;
  box-shadow: 0 10px 22px -10px rgba(91, 75, 232, 0.65), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .15s, box-shadow .2s;
}
.avatar-btn:active { transform: translateY(1px); }

/* ---------- 布局 ---------- */
.container {
  max-width: 760px; margin: 0 auto;
  padding: 20px clamp(14px, 4vw, 24px) 110px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ---------- 主视觉 ---------- */
.hero { text-align: center; padding: 30px 18px 10px; }
.hero-badge {
  display: inline-block;
  font-size: 12.5px; font-weight: 600; color: #5b4be8;
  background: linear-gradient(135deg, #f1ecff, #ece4ff);
  border: 1px solid #e2dbff;
  padding: 6px 15px; border-radius: 999px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.hero-title {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(30px, 8.5vw, 44px); line-height: 1.22;
  letter-spacing: 1px;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, #c8902f, #e9c46a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 500px; margin: 14px auto 0; color: var(--muted); font-size: 15px; }
.hero-stats { display: flex; justify-content: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-stats div {
  background: rgba(255,255,255,.7);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 12px 22px;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}
.hero-stats strong { font-size: 20px; color: #5b4be8; font-weight: 900; }
.hero-stats span { font-size: 12px; color: var(--muted); }

/* ---------- 控制台 ---------- */
.console {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}
.chip-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 10px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  font-family: var(--font); font-size: 13.5px; font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.chip:active { transform: scale(.96); }
.chip-cat.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #5b4be8, #8b5cf6);
  box-shadow: 0 8px 18px -7px rgba(91,75,232,.6);
}
.chip-diff.active {
  color: #9a6a16; border-color: rgba(200,144,47,.45);
  background: linear-gradient(135deg, #fbf1d8, #f7e7c2);
}
.btn-shuffle {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  color: var(--text); cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 13px; border-radius: var(--radius-sm);
  transition: all .18s;
}
.btn-shuffle:hover { background: var(--surface-2); border-color: var(--primary-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-shuffle:active { transform: translateY(1px); }

/* ---------- 卡片通用 ---------- */
.scenario-card, .answer-section, .result-card, .reference-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  animation: rise .45s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.scenario-top { display: flex; flex-direction: column; gap: 10px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 4px 12px; border-radius: 999px; font-weight: 600; letter-spacing: .3px; }
.badge-cat { color: #fff; background: linear-gradient(135deg, #e9c46a, #c8902f); }
.badge-diff { color: #5b4be8; background: var(--primary-soft); border: 1px solid #e2dbff; }
.scenario-title { font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.4; }
.scenario-body { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; color: #c8902f; letter-spacing: .5px; font-weight: 600; }
.field-text { font-size: 15px; color: var(--text); }
.speech { display: flex; gap: 10px; align-items: flex-start; }
.speech-avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-soft); color: #5b4be8;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.speech-text {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  padding: 12px 15px; font-size: 15px; position: relative;
}

/* 骨架屏（替代转圈） */
.scenario-loading { padding: 6px 0; }
.skeleton { display: flex; flex-direction: column; gap: 14px; }
.skel-badges { display: flex; gap: 8px; }
.skel-badges span { height: 22px; width: 64px; border-radius: 999px; }
.skel-badges span:last-child { width: 48px; }
.skel-title { height: 24px; width: 80%; border-radius: 8px; }
.skel-line { height: 14px; width: 100%; border-radius: 7px; }
.skel-line.short { width: 62%; }
.skel-badges span, .skel-title, .skel-line {
  background: linear-gradient(100deg, #eef1f9 30%, #f6f8fd 50%, #eef1f9 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* spinner（评分按钮 / 海报兜底仍用） */
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(91,75,232,.2);
  border-top-color: #5b4be8;
  border-radius: 50%; animation: spin .8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 回答 ---------- */
.answer-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.answer-head h3 { font-size: 16px; font-weight: 700; }
.hint { font-size: 12px; color: var(--muted-2); }
.answer-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  transition: border-color .2s, box-shadow .2s;
}
.answer-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
#answerInput {
  width: 100%; min-height: 130px; resize: vertical;
  background: transparent; border: none; color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.7;
  padding: 12px 14px;
}
#answerInput:focus { outline: none; }
#answerInput::placeholder { color: var(--muted-2); }
.answer-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 8px 12px 6px; border-top: 1px solid var(--border);
}
.counter { font-size: 12px; color: var(--muted-2); }
.answer-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font); font-size: 14.5px; font-weight: 600;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  padding: 11px 18px; transition: transform .15s, box-shadow .22s, background .2s, opacity .2s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #5b4be8, #8b5cf6);
  box-shadow: 0 12px 24px -12px rgba(91,75,232,.75), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn-primary:not(:disabled):hover { box-shadow: 0 16px 30px -12px rgba(91,75,232,.9); transform: translateY(-1px); }
.btn-soft { color: #5b4be8; background: var(--primary-soft); border: 1px solid #e2dbff; }
.btn-soft:not(:disabled):hover { background: #e4def9; }
.btn-ghost { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-block { width: 100%; }

/* ---------- 评分结果 ---------- */
.result-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.score-ring { position: relative; width: 112px; height: 112px; flex: none; }
.score-ring svg { transform: rotate(-90deg); width: 112px; height: 112px; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ring-fg {
  fill: none; stroke: var(--gold); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327;
  transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1), stroke .4s;
}
.score-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-num span { font-size: 36px; font-weight: 900; line-height: 1; }
.score-num small { display: block; font-size: 12px; color: var(--gold); margin-top: 3px; letter-spacing: 1px; font-weight: 700; }
.result-summary { flex: 1; min-width: 200px; }
.result-summary h3 { font-size: 16px; margin-bottom: 6px; }
.analysis { font-size: 14.5px; color: var(--text); }
.model-note { font-size: 11.5px; color: var(--muted-2); margin-top: 8px; }

.feedback-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
.feedback-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 15px 17px; }
.feedback-col h4 { display: flex; align-items: center; gap: 7px; font-size: 14px; margin-bottom: 8px; }
.feedback-col.good h4 { color: var(--good); }
.feedback-col.weak h4 { color: var(--weak); }
.feedback-col .ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.feedback-col ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.feedback-col li { font-size: 13.5px; color: var(--text); padding-left: 16px; position: relative; line-height: 1.6; }
.feedback-col li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; }
.feedback-col.good li::before { background: var(--good); }
.feedback-col.weak li::before { background: var(--weak); }

.suggestion {
  margin-top: 14px; background: linear-gradient(120deg, #f1ecff, #fbf3df);
  border: 1px solid #e6e2ff; border-radius: var(--radius-sm); padding: 15px 17px;
}
.suggestion h4 { font-size: 14px; color: #5b4be8; margin-bottom: 6px; }
.suggestion p { font-size: 14px; }
.deep { margin-top: 12px; background: var(--surface-2); border: 1px dashed rgba(200,144,47,.6); border-radius: var(--radius-sm); padding: 15px 17px; }
.deep h4 { font-size: 13px; color: #b07c2a; margin-bottom: 6px; }
.deep p { font-size: 14px; }
.result-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 参考回答 ---------- */
.ref-warn {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
  background: var(--weak-soft); border: 1px solid #f6d9c4;
  border-radius: var(--radius-sm); padding: 10px 13px; margin-bottom: 14px;
}
.ref-tag {
  color: #fff; background: linear-gradient(135deg, #f0a868, var(--weak));
  padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 11.5px;
}
.ref-body p { font-size: 15px; line-height: 1.85; color: var(--text); white-space: pre-wrap; }
.ref-tips { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 13.5px; color: #b07c2a; }
.ref-tips::before { content: '💡 思路要点：'; font-weight: 700; }

/* ---------- 底部操作条（移动端）---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.9); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.bottombar .btn { flex: 1; }
.bottombar .btn-soft { flex: none; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(18, 22, 40, 0.46); backdrop-filter: blur(3px); }
.modal-panel {
  position: relative; width: 100%; max-width: 420px;
  background: var(--surface); border-radius: 26px; padding: 26px;
  box-shadow: var(--shadow-lg);
  animation: pop .28s cubic-bezier(.2,.9,.3,1.2) both;
  max-height: 90vh; overflow-y: auto;
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--surface-2); color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .2s;
}
.modal-close:hover { background: var(--surface-3); }

/* 登录/注册 */
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; font-family: var(--font); font-size: 15px; font-weight: 600;
  color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 13px; padding: 11px; cursor: pointer;
  transition: all .18s;
}
.auth-tab.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, #5b4be8, #8b5cf6); box-shadow: 0 8px 18px -8px rgba(91,75,232,.6); }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-form input {
  font-family: var(--font); font-size: 15px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 13px; padding: 13px 15px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-form input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.auth-err { color: #dc2626; font-size: 13px; min-height: 18px; }
.auth-tip { text-align: center; font-size: 12.5px; color: var(--muted-2); margin-top: 14px; }

/* 账户 */
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.account-avatar {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 21px; color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #5b4be8);
  box-shadow: 0 10px 22px -10px rgba(91,75,232,.6), inset 0 1px 0 rgba(255,255,255,.3);
}
.account-head h3 { font-size: 16px; word-break: break-all; }
.plan-pill { display: inline-block; font-size: 12px; font-weight: 600; color: #5b4be8; background: var(--primary-soft); border: 1px solid #e2dbff; padding: 2px 10px; border-radius: 999px; margin-top: 4px; }
.plan-pill.pro { color: #b07c2a; background: #fbf3df; border-color: rgba(200,144,47,.4); }
.account-quota { display: flex; align-items: baseline; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 15px; padding: 15px 17px; margin-bottom: 16px; }
.account-quota span { font-size: 13px; color: var(--muted); }
.account-quota strong { font-size: 27px; color: #5b4be8; font-weight: 900; }
.account-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.history-head h4 { font-size: 14px; }
.link-btn { background: none; border: none; color: var(--muted-2); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.history-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.history-list li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 11px 13px; }
.history-list .h-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-list .h-title { font-size: 13.5px; font-weight: 600; }
.history-list .h-score { font-size: 13px; font-weight: 800; color: #c8902f; flex: none; }
.history-list .h-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.history-empty { font-size: 13px; color: var(--muted-2); text-align: center; padding: 12px; }

/* 定价 */
.pricing-title { text-align: center; font-family: var(--serif); font-size: 21px; margin-bottom: 20px; }
.plans { display: flex; flex-direction: column; gap: 14px; }
.plan-card { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 19px; }
.plan-card h4 { font-size: 16px; margin-bottom: 6px; }
.plan-price { font-size: 30px; font-weight: 900; color: var(--text); margin-bottom: 12px; }
.plan-price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan-card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.plan-card li { font-size: 13.5px; color: var(--text); padding-left: 22px; position: relative; line-height: 1.5; }
.plan-card li::before { content: '✓'; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.plan-pro { background: linear-gradient(160deg, #fff, #faf6ff); border-color: #ddd4ff; box-shadow: 0 14px 34px -16px rgba(139,92,246,.5); }
.plan-pro .plan-price { color: #5b4be8; }
.plan-flag { position: absolute; top: -10px; right: 16px; font-size: 11.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #5b4be8, #8b5cf6); padding: 3px 12px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.pricing-note { font-size: 12px; color: var(--muted-2); text-align: center; margin-top: 16px; line-height: 1.6; }

/* ---------- 页脚 ---------- */
.site-footer { text-align: center; padding: 30px 16px 38px; color: var(--muted-2); font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
.foot-sub { font-size: 11.5px; opacity: .85; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%);
  background: #161a2b; color: #fff; padding: 11px 20px; border-radius: 12px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); z-index: 70;
  max-width: 88vw; text-align: center;
  animation: toastIn .3s ease;
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 桌面增强 ---------- */
@media (min-width: 640px) {
  .feedback-grid { grid-template-columns: 1fr 1fr; }
  .container { gap: 18px; }
}
@media (min-width: 768px) {
  .bottombar { display: none !important; }
  .container { padding-top: 28px; padding-bottom: 60px; }
  .hero { padding-top: 36px; }
  .scenario-card, .answer-section, .result-card, .reference-card { padding: 28px; }
}

/* ---------- 邀请横幅 ---------- */
.invite-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(120deg, #fbf3df, #f7e7c2);
  border: 1px solid #ecd9a8; border-radius: var(--radius); padding: 15px 17px;
  box-shadow: var(--shadow-sm);
}
.ib-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ib-gift { font-size: 26px; flex: none; }
.ib-text { display: flex; flex-direction: column; min-width: 0; }
.ib-text strong { font-size: 14.5px; color: #9a6a16; line-height: 1.3; }
.ib-text span { font-size: 12px; color: #b07c2a; margin-top: 2px; }
.invite-banner .btn-soft { flex: none; color: #9a6a16; background: #fff; border-color: #e7cf95; }
.invite-banner .btn-soft:hover { background: #fffdf7; }

/* ---------- 分享弹窗 ---------- */
.share-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; text-align: center; }
.share-sub strong { color: #5b4be8; }
.poster-wrap { position: relative; display: flex; justify-content: center; }
.poster-img {
  width: 100%; max-width: 320px; height: auto; border-radius: 20px;
  box-shadow: var(--shadow-lg); display: block;
}
.poster-qr {
  position: absolute; left: 31.67%; top: 77.78%; width: 36.67%; height: 17.78%;
  object-fit: contain; pointer-events: none;
  border-radius: 8px;
}
#posterCanvas { display: none; }
/* 轻量提示：不遮挡海报，仅做二维码加载态 */
.poster-loading {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; font-size: 12.5px; font-weight: 500;
  background: rgba(22, 26, 43, 0.72); backdrop-filter: blur(4px);
  padding: 8px 14px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.poster-loading .spinner { width: 15px; height: 15px; border-width: 2px; border-color: rgba(255,255,255,.3); border-top-color: #fff; }
.share-link {
  display: flex; gap: 8px; margin-top: 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 6px; align-items: center;
}
.share-link input {
  flex: 1; min-width: 0; border: none; background: transparent; color: var(--text);
  font-family: var(--font); font-size: 13px; padding: 8px 10px;
}
.share-link input:focus { outline: none; }
.share-tip { font-size: 12px; color: var(--muted-2); text-align: center; margin-top: 12px; line-height: 1.6; }
.share-tip strong { color: #18a558; }
#savePosterBtn { margin-top: 8px; }

/* ---------- 账户-邀请看板 ---------- */
.referral-box {
  margin-top: 16px; background: linear-gradient(160deg, #fff, #faf6ff);
  border: 1px solid #e6ddff; border-radius: 18px; padding: 17px;
}
.referral-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.referral-head h4 { font-size: 14px; }
.ref-code { font-size: 12px; color: var(--muted); }
.ref-code b { color: #5b4be8; font-family: monospace; font-size: 13px; letter-spacing: 1px; }
.referral-stats { display: flex; gap: 12px; margin-bottom: 14px; }
.referral-stats div {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 13px; padding: 12px; text-align: center;
}
.referral-stats strong { display: block; font-size: 22px; color: #5b4be8; font-weight: 900; }
.referral-stats span { font-size: 11.5px; color: var(--muted); }
.referral-note { font-size: 11.5px; color: var(--muted-2); text-align: center; margin-top: 10px; }
