/* MyuanResearch 用户端 v4 —— CPX Research Publisher 同款规范
   依据 design-system/CPX-MASTER.md：Poppins / #4886ff / #f6f7fb / 白卡 5px 圆角 / 横向菜单 */

:root {
  --primary: #4886ff;
  --primary-dark: #1564ff;
  --primary-bg: #e9f1ff;
  --ink: #242e3e;
  --text: #535763;
  --text-nav: #474b55;
  --muted: #6c757d;
  --bg: #f6f7fb;
  --border: #e3eaef;
  --surface: #ffffff;
  --ok: #4c9a2a; --ok-bg: #eefae3;
  --warn: #c96a02; --warn-bg: #fef0dd;
  --danger: #d43a3e; --danger-bg: #fee9ea;
  --info: #2275d7; --info-bg: #e3f2fe;
  --gold: #fa7d03; --gold-bg: #fef0dd; --gold-ink: #824102;
  --radius: 5px;
  --shadow-card: 0 2px 5px rgba(0, 0, 0, .1);
  --shadow-pop: 0 6px 18px rgba(36, 46, 62, .12);
  --topbar-h: 70px;
  --font: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { color: var(--ink); margin: 0; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
.view { animation: view-in .18s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.brand-mark {
  display: inline-block; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 58%, 58% 58%, 58% 100%, 0 100%);
  flex: none;
}

/* ===== 顶栏（白色 70px fixed） ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--topbar-h);
  background: var(--surface);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; }
.logo-word { font-size: 16.5px; color: var(--ink); font-weight: 400; }
.logo-word b { font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 9px; font-size: 13px; background: #fff; color: var(--ink);
  font-family: inherit; cursor: pointer;
}
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 4px 13px 4px 4px; cursor: pointer; font-size: 13.5px;
  color: var(--ink); font-family: inherit;
}
.user-chip:hover { border-color: var(--primary); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #eef1f6; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12.5px;
}
.chev { color: var(--muted); font-size: 10px; }
.user-menu { position: relative; }
.dropdown {
  display: none; position: absolute; right: 0; top: 46px; min-width: 172px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-pop); padding: 6px; z-index: 50;
}
.user-menu.open .dropdown { display: block; }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 5px;
  border: 0; background: none; font-size: 13.5px; color: var(--ink);
  cursor: pointer; text-decoration: none !important; font-family: inherit;
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg); }
.dropdown-sep { height: 1px; background: var(--border); margin: 6px 8px; }

/* ===== 横向主导航（激活 = 蓝字 + 底部蓝线） ===== */
.hnav {
  position: fixed; top: var(--topbar-h); left: 0; right: 0; z-index: 39;
  display: flex; gap: 34px; align-items: stretch;
  padding: 0 28px; height: 50px;
  overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(to bottom, rgba(246,247,251,.97), rgba(246,247,251,.93));
  backdrop-filter: blur(6px);
}
.hnav::-webkit-scrollbar { display: none; }
.hnav a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-nav); font-size: 13px; font-weight: 400;
  text-decoration: none !important; white-space: nowrap;
  position: relative; padding: 0 2px;
}
.hnav a svg {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; opacity: .85;
}
.hnav a:hover { color: var(--primary); }
.hnav a.active { color: var(--primary); font-weight: 500; }
.hnav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--primary); border-radius: 2px 2px 0 0;
}

/* ===== 容器（1110px 居中） ===== */
.container {
  max-width: 1110px; margin: 0 auto;
  padding: calc(var(--topbar-h) + 50px + 26px) 24px 60px;
}
/* ===== 调查项目页全屏显示（取消 1110px 限宽，铺满视口） ===== */
#view-surveys .container { max-width: none; }
#view-records .container { max-width: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title { font-size: 18px; font-weight: 500; color: #060606; }
.breadcrumb { color: var(--muted); font-size: 12.5px; margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumb-home { color: var(--primary); font-size: 12px; }
.page-sub { color: var(--muted); font-size: 13.5px; margin: 5px 0 0; }
.page-sub.lead { margin: -8px 0 16px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--radius); border: 1px solid transparent;
  padding: 8px 17px; font-size: 14px; font-weight: 400; cursor: pointer;
  font-family: inherit; text-decoration: none !important;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-pop); }
.btn.ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.danger { background: #fff; border-color: #f6c4c5; color: var(--danger); }
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn.pill { border-radius: 999px; }
.btn.lg { padding: 11px 26px; font-size: 15px; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ===== 首页 hero（白卡 + CPX 令牌 + 迷你问卷卡视觉） ===== */
.hero {
  padding: 40px 42px; margin-bottom: 18px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center;
}
.hero-copy h1 { font-size: 30px; font-weight: 500; color: #060606; line-height: 1.3; letter-spacing: -.01em; margin-bottom: 12px; }
.hero-copy p { color: var(--text); font-size: 15px; max-width: 30em; margin: 0 0 20px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-points li { color: var(--text); font-size: 14px; padding-left: 30px; position: relative; }
.hero-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-bg); color: var(--primary);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.hero-visual { position: relative; min-height: 300px; }
.mini-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 18px 20px; position: absolute; right: 0; width: 280px;
}
.mini-card.top1 { top: 0; transform: rotate(2.4deg); z-index: 2; }
.mini-card.top2 { top: 148px; transform: rotate(-2deg); z-index: 1; }
.mini-head { display: flex; justify-content: space-between; margin-bottom: 9px; }
.mini-amount { font-size: 28px; font-weight: 400; color: #060606; font-variant-numeric: tabular-nums; line-height: 1.15; }
.mini-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.mini-bar { height: 5px; background: #eef1f6; border-radius: 999px; margin-top: 12px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.chip.hot { background: var(--gold-bg); color: var(--gold-ink); }
.hero-badge {
  position: absolute; left: -6px; bottom: 4px; z-index: 3;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 12px 19px; display: flex; flex-direction: column; box-shadow: var(--shadow-pop);
}
.hero-badge b { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hero-badge span { font-size: 12px; opacity: .8; margin-top: 1px; }

/* ===== 统计卡（CPX 风：图标 + 小标签 + 大数字） ===== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 16px 18px 14px;
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center; min-width: 0;
}
.stat .ico {
  grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
}
.stat .ico.blue { background: var(--primary-bg); color: var(--primary); }
.stat .ico.green { background: var(--ok-bg); color: var(--ok); }
.stat .ico.orange { background: var(--warn-bg); color: var(--warn); }
.stat .ico.teal { background: #e0f5f7; color: #0097a7; }
.stat .k { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v { font-size: 26px; font-weight: 400; color: #060606; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat .v.money { color: #060606; }
.stat .v.v-note { font-size: 13px; color: var(--text); font-weight: 400; }

/* ===== 步骤（CPX 卡片 + 编号） ===== */
.step-list { list-style: none; margin: 0; padding: 6px 25px 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step-list li { counter-increment: step; position: relative; }
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  font-size: 12px; font-weight: 600; color: var(--primary);
  display: block; margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.step-list b { display: block; font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.step-list span { color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ===== 问卷卡片 ===== */
.sort-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sort-label { font-size: 12.5px; color: var(--muted); }
.sort-chip {
  border: 1px solid var(--border); background: #fff; color: var(--text-nav);
  border-radius: var(--radius); padding: 6px 14px; font-size: 13px; cursor: pointer;
  font-family: inherit; transition: all .13s;
}
.sort-chip:hover { border-color: var(--primary); color: var(--primary); }
.sort-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.survey-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
#surveySkeleton .sk-card {
  height: 216px; border-radius: var(--radius);
  background: linear-gradient(100deg, #eef1f6 40%, #f7f9fc 50%, #eef1f6 60%);
  background-size: 300% 100%; animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

.survey-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 12px; position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.survey-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.survey-card .rib {
  position: absolute; top: 14px; right: -6px;
  background: var(--gold); color: var(--gold-ink);
  font-size: 11px; font-weight: 600; letter-spacing: .5px;
  padding: 3px 12px 3px 10px; border-radius: 5px 0 0 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.card-chips { display: flex; gap: 6px; flex-wrap: wrap; padding-right: 34px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.chip.cat { background: var(--primary-bg); color: var(--primary-dark); }
.chip.cam { background: var(--warn-bg); color: var(--warn); }
.payout { display: flex; align-items: baseline; gap: 8px; }
.payout .amt { font-size: 28px; font-weight: 400; color: #060606; font-variant-numeric: tabular-nums; line-height: 1.15; }
.payout .per { color: var(--muted); font-size: 12.5px; }
.meta-rows { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.meta-rows .row { display: flex; justify-content: space-between; align-items: baseline; }
.meta-rows .row span { font-size: 12.5px; }
.meta-rows .row b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.ir-track { height: 4px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.ir-track i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.stars { color: var(--gold); letter-spacing: 1.5px; font-size: 12px; }
.stars .cnt { color: var(--muted); margin-left: 5px; letter-spacing: 0; }
.survey-card .btn { margin-top: auto; }

/* ===== 卡片 ===== */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.card + .card { margin-top: 16px; }
.card-header { padding: 16px 25px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--ink); font-weight: 500; }
.card-body { padding: 20px 25px; }
.card h3 { font-size: 15px; font-weight: 500; margin: 0 0 14px; }

/* ===== 表格 ===== */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; background: #fafbfd; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td { color: var(--text); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f8fafd; }
.tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.neutral { background: #eef0f4; color: var(--muted); }

/* ===== 表单 ===== */
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 150px; margin: 0; }
.field span { font-size: 12px; font-weight: 500; color: var(--muted); }
.field input, .field select {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; color: var(--ink); background: #fff; font-family: inherit;
  transition: border-color .14s, box-shadow .14s;
}
.field input:disabled { background: #f1f3f7; color: var(--muted); cursor: not-allowed; }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(72, 134, 255, .18); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }

/* ===== 设置三页 ===== */
.settings-shell { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.settings-nav {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 8px; position: sticky; top: 140px;
  display: flex; flex-direction: column; gap: 2px;
}
.settings-nav a {
  padding: 10px 14px; border-radius: 5px; text-decoration: none !important;
  color: var(--text-nav); font-size: 13.5px; border-left: 2px solid transparent;
}
.settings-nav a b { font-weight: 500; }
.settings-nav a:hover { background: var(--bg); }
.settings-nav a.active { background: var(--primary-bg); border-left-color: var(--primary); color: var(--primary-dark); }
.settings-body { min-width: 0; }
.settings-body .card { max-width: 640px; }
.settings-body .card + .card { margin-top: 16px; }
.danger-zone .card-header { color: var(--danger); }

/* ===== 财务周期卡 ===== */
.period-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-card); margin-bottom: 13px; overflow: hidden;
}
.period-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 15px 20px; cursor: pointer; user-select: none; }
.period-head .p-title { font-size: 15px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.period-head .p-title small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 8px; }
.period-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.period-toggle { color: var(--muted); font-size: 12px; transition: transform .15s; }
.period-card.open .period-toggle { transform: rotate(180deg); }
.period-detail { border-top: 1px solid var(--border); display: none; }
.period-card.open .period-detail { display: block; animation: view-in .15s ease-out; }
.finance-note { color: var(--muted); font-size: 13px; margin-top: 14px; line-height: 1.6; }

/* ===== 认证页（CPX Signin：居中卡 + 胶囊按钮） ===== */
.auth-wrap { display: flex; justify-content: center; padding-top: 26px; padding-bottom: 40px; }
.auth-card { width: 420px; max-width: 100%; padding: 30px 30px 24px; display: flex; flex-direction: column; gap: 13px; }
.auth-card.wide { width: 640px; }
.login-title { font-size: 19px; font-weight: 500; color: #060606; }
.switch { text-align: center; color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }

/* ===== 杂项 ===== */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-art {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--primary-bg); position: relative;
}
.empty-art::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 19px;
  transform: translate(-50%, -50%);
  border: 2.5px solid #b9d2ff; border-radius: 4px;
}
.notice { background: var(--info-bg); color: #0b4a8b; border-radius: var(--radius); padding: 12px 20px; font-size: 13.5px; margin: 14px 0; }

/* ===== 分页 ===== */
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 0 0; }
.pagination .info { color: var(--muted); font-size: 12.5px; margin-right: auto; }
.pagination button {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 13px; cursor: pointer;
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.pagination-row { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; }
.pagination-row .pagination { padding: 0; }
.field-inline { flex-direction: row; align-items: center; gap: 6px; min-width: auto; }
.field-inline select { min-width: 76px; }
/* ===== 表格骨架 / 空行 ===== */
.sk-row .sk-line { height: 14px; border-radius: 6px; background: linear-gradient(100deg, #eef1f6 40%, #f7f9fc 50%, #eef1f6 60%); background-size: 300% 100%; animation: shimmer 1.3s infinite; }
.empty-cell { text-align: center; color: var(--muted); padding: 26px 0 !important; }
.quota-cell { white-space: nowrap; display: flex; gap: 14px; justify-content: flex-end; }
.quota-cell .q { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.quota-cell .q b { font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.quota-cell .q i { font-style: normal; font-size: 11px; color: var(--muted); }
.quota-cell .q-quota b { color: var(--gold); }
.quota-cell .q-done b { color: var(--ok); }
.quota-cell .q-click b { color: var(--info); }
.date-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 答题结果落地页 */
.date-created { color: var(--muted); }
.finish-card { max-width: 520px; margin: 70px auto; text-align: center; padding: 44px 36px; }
.finish-icon { font-size: 46px; line-height: 1; margin-bottom: 14px; color: var(--muted); }
.finish-icon.ok { color: var(--ok); }
.finish-icon.info { color: var(--info); }
.finish-icon.bad { color: var(--danger); }
.finish-title { font-size: 20px; margin: 0 0 8px; color: var(--ink); }
.finish-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }
.finish-amount { margin: 16px 0 4px; font-size: 14px; color: var(--muted); }
.finish-amount b { color: var(--gold); font-size: 24px; margin-left: 8px; }
.finish-no { color: var(--muted); font-size: 12.5px; margin: 10px 0 22px; min-height: 15px; }
.date-updated { color: var(--primary-dark); font-weight: 600; }

/* ===== 答题浮层（iframe 嵌入 CPX 问卷 + 顶部遮挡） ===== */
.survey-frame-mask { position: fixed; inset: 0; z-index: 95; background: #fff; }
.survey-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.survey-frame-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 64px; z-index: 2;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
}
.survey-frame-bar span { font-size: 13.5px; color: rgba(255,255,255,.85); }
.survey-frame-no {
  font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: rgba(255,255,255,.16); padding: 4px 12px; border-radius: 999px;
}
.survey-frame-bar .btn { margin-left: auto; }

/* ===== 答题落地页（复制地址打开） ===== */
#view-answer { position: fixed; inset: 0; z-index: 90; background: #fff; }
#view-answer.hidden { display: none; }
.answer-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.answer-frame-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 64px; z-index: 2;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
}
.answer-frame-bar span { font-size: 13.5px; color: rgba(255,255,255,.85); }
.answer-frame-bar .btn { margin-left: auto; }
.toast {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 22px; border-radius: var(--radius);
  font-size: 13.5px; z-index: 100; box-shadow: var(--shadow-pop); animation: toast-in .18s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.prose h2 { font-size: 16px; margin-top: 22px; }
.prose p { color: var(--text); }
.legal-links { display: flex; gap: 10px; margin: 8px 0 4px; }
.legal { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; white-space: pre-line; color: var(--text); font-size: 13.5px; line-height: 1.7; }
.site-footer { border-top: 1px solid var(--border); padding: 18px 0; color: var(--muted); font-size: 12.5px; background: var(--surface); margin-top: 20px; }
.site-footer .footer-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; padding-top: 0; padding-bottom: 0; }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(36, 46, 62, .45); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; animation: mask-in .14s ease-out; }
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 8px; width: 560px; max-width: 100%; max-height: 84vh;
  overflow: auto; padding: 24px; box-shadow: var(--shadow-pop);
  animation: modal-in .16s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0 0 14px; font-size: 16px; font-weight: 500; }
.modal .close-row { display: flex; justify-content: flex-end; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 26px 24px; }
  .hero-visual { display: none; }
  .step-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-shell { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
  .settings-nav a { flex: none; border-left: 0; border-bottom: 2px solid transparent; border-radius: 5px 5px 0 0; }
  .settings-nav a.active { border-bottom-color: var(--primary); background: none; }
  .hnav { gap: 22px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .container { padding: calc(var(--topbar-h) + 50px + 18px) 14px 50px; }
  .topbar { padding: 0 16px; }
  .stats { grid-template-columns: 1fr; }
  .auth-card.wide { padding: 22px 18px; }
}
