:root {
  --orange: #ff7a45;
  --orange-d: #f2611f;
  --orange-l: #fff1e8;
  --green: #14b89a;
  --green-d: #0e9c83;
  --green-l: #e6f8f4;
  --yellow: #faad14;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --ink: #1f2937;
  --ink2: #4b5563;
  --ink3: #9ca3af;
  --line: #eceef2;
  --bg: #f6f7f9;
  --card: #ffffff;
  --danger: #e5484d;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(17, 24, 39, .05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* 横竖屏切换 / 弹窗内容过宽时，避免出现整页横向滚动条。
     用 clip 而不是 hidden：hidden 会把 body 变成滚动容器，导致 position: sticky 失效 */
  overflow-x: clip;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--orange-d); }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
  background: linear-gradient(135deg, var(--orange) 0%, #ff9a62 55%, var(--green) 160%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(255, 122, 69, .22);
}
.topbar .tb-title { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.topbar .tb-sub { font-size: 11px; opacity: .88; }
.topbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-btn {
  border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.16);
  color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px;
  cursor: pointer; position: relative;
}
.tb-btn:active { transform: scale(.97); }
.dot {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #e5484d; color: #fff; border-radius: 999px;
  font-size: 10px; line-height: 16px; text-align: center;
  border: 1.5px solid #fff;
}

.page {
  padding: 14px 14px 96px;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
  max-width: 720px; margin: 0 auto;
}

/* 卡片 */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px;
}
.card-hd { display: flex; align-items: center; margin-bottom: 10px; }
.card-hd h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-hd .hd-right { margin-left: auto; font-size: 12px; color: var(--ink3); }

/* 英雄区 */
.hero {
  background: linear-gradient(135deg, #ff8c42 0%, #ffa751 40%, #22c1a4 100%);
  border-radius: 18px; padding: 18px 16px; color: #fff;
  margin-bottom: 12px; box-shadow: 0 6px 20px rgba(255,140,66,.25);
}
.hero h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.hero .hero-sub { font-size: 12px; opacity: .92; }
.hero-stats { display: flex; margin-top: 14px; gap: 8px; }
.hero-stat { flex: 1; background: rgba(255,255,255,.18); border-radius: 12px; padding: 8px 6px; text-align: center; }
.hero-stat b { display: block; font-size: 19px; line-height: 1.25; }
.hero-stat span { font-size: 11px; opacity: .9; }

/* 打卡项卡片 */
.item-card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  margin-bottom: 10px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px;
  border-left: 4px solid var(--orange);
}
.item-card.green { border-left-color: var(--green); }
.item-card.yellow { border-left-color: var(--yellow); }
.item-card.done { opacity: .82; }
.item-icon {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: var(--orange-l);
}
.item-card.green .item-icon { background: var(--green-l); }
.item-card.yellow .item-icon { background: #fff8e6; }
.item-main { flex: 1; min-width: 0; }
.item-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.item-desc { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.item-act { flex: none; }

/* 徽标 */
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 18px;
}
.badge.valid { background: var(--green-l); color: var(--green-d); }
.badge.pending_review, .badge.ai_checking { background: #eef2ff; color: #4f46e5; }
.badge.rejected { background: var(--orange-l); color: var(--orange-d); }
.badge.expired, .badge.reversed { background: #f3f4f6; color: #6b7280; }
.badge.appealing { background: #fef3c7; color: #b45309; }
.badge.gold { background: #fef3c7; color: #b7791f; }
.badge.silver { background: #f1f5f9; color: #64748b; }
.badge.bronze { background: #fff7ed; color: #c2410c; }

/* 按钮 */
.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 10px; padding: 9px 16px; cursor: pointer;
  font-size: 14px; font-weight: 600; transition: transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-primary:disabled { background: #fdba74; border-color: #fdba74; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-block { display: block; width: 100%; padding: 12px; font-size: 15px; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--ink2); }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: #fff; color: var(--ink); outline: none;
}
.input:focus { border-color: var(--orange); }
.input[readonly], .mail-ro {
  background: #f5f6fa; color: var(--ink2); border-style: dashed;
}
.mail-ro {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; word-break: break-all;
}
.hint { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.hint.warn { color: var(--orange-d); }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 10px 0; }
.check input { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: var(--orange); }

/* 底部导航 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.tabbar button {
  flex: 1; border: 0; background: none; padding: 7px 0 6px; cursor: pointer;
  color: var(--ink3); font-size: 10.5px; position: relative;
}
.tabbar button .ti { display: block; font-size: 19px; line-height: 1.3; }
.tabbar button.on { color: var(--orange); font-weight: 700; }
.tabbar .dot { top: 2px; right: 50%; margin-right: -20px; }

/* 列表 */
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 600; }
.row-sub { font-size: 12px; color: var(--ink3); margin-top: 1px; }
.row-right { flex: none; font-size: 13px; }

/* 进度条 */
.bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--green)); border-radius: 999px; }

/* 表格：窄屏可横向滚动 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; }
table.tb { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 420px; }
table.tb th, table.tb td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tb th { color: var(--ink3); font-weight: 600; background: #fafbfc; }
table.tb td.wrap { white-space: normal; min-width: 150px; }

/* 角色徽章 */
.rbadge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: #eef0f3; color: var(--ink2);
}
.rbadge.r-system_admin { background: #fdecea; color: #b42318; }
.rbadge.r-school_admin { background: #fff2e0; color: #b35c00; }
.rbadge.r-college_admin { background: #e6f4ff; color: #1668a8; }
.rbadge.r-reviewer { background: #e9f7ee; color: #1a7f45; }

/* 个人资料信息行 */
.plist { display: flex; flex-direction: column; }
.prow {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.prow:last-child { border-bottom: 0; }
.pk { flex: none; width: 88px; font-size: 13px; color: var(--ink3); }
.pv {
  flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink);
  word-break: break-all;
}

/* 题目单行列表 */
.qtable { display: flex; flex-direction: column; border: 0.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.qrow {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff;
}
.qrow:last-child { border-bottom: 0; }
.qrow.off { background: #f7f8fa; }
.qrow.off .qrow-stem, .qrow.off .qrow-opts { opacity: .6; }
.qrow-l { flex: 1; min-width: 0; }
.qrow-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qrow-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.qmeta { font-size: 11.5px; color: var(--ink3); background: #f0f2f5; padding: 1px 7px; border-radius: 999px; }
.qrow-stem { font-size: 13.5px; line-height: 1.5; color: var(--ink); word-break: break-word; }
.qrow-opts {
  display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px;
  font-size: 12px; color: var(--ink2);
}
.qo b { color: var(--ink3); margin-right: 2px; font-weight: 600; }
.qrow-acts { display: flex; gap: 6px; }
.qe-opts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px;
}
@media (max-width: 380px) { .qe-opts { grid-template-columns: minmax(0, 1fr); } }

/* 题目列表 */
.qlist { display: flex; flex-direction: column; gap: 10px; }
.qitem {
  border: 0.5px solid var(--line); border-radius: var(--radius, 10px);
  padding: 10px 12px; background: #fff;
}
.qitem.off { background: #f7f8fa; opacity: .72; }
.qitem-hd {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--ink3); margin-bottom: 5px;
}
.qtype {
  padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.qtype.t-single { background: #e6f4ff; color: #1668a8; }
.qtype.t-multiple { background: #fff2e0; color: #b35c00; }
.qtype.t-judge { background: #e9f7ee; color: #1a7f45; }
.qoff { color: #b42318; background: #fdecea; padding: 1px 7px; border-radius: 999px; }
.qans { margin-left: auto; font-weight: 600; color: var(--ink2); }
.qstem { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.qopts {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 6px; font-size: 12.5px; color: var(--ink2);
}
.qacts { display: flex; gap: 8px; margin-top: 9px; }

/* 列表分页 */
.grid-2 {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10px;
}
@media (max-width: 340px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 12px;
}
.pager-txt { font-size: 12.5px; color: var(--ink3); }
.pager .btn-sm[disabled] { opacity: .45; cursor: not-allowed; }

/* 空态 */
.empty { text-align: center; padding: 40px 20px; color: var(--ink3); }
.empty .e-ico { font-size: 40px; }
.empty .e-txt { margin-top: 8px; font-size: 13px; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(17,24,39,.45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  /* 内容高于屏幕时整层可滚，避免小屏/横屏下弹窗顶部被裁掉 */
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 440px;
  max-height: 86vh;
  max-height: 86dvh;              /* 移动端地址栏伸缩时按真实可视高度算 */
  margin: auto;                    /* 与 .mask 的滚动配合，超长时上下都留有边距 */
  display: flex; flex-direction: column;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.modal-hd { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-hd b { font-size: 15px; }
.modal-x { margin-left: auto; border: 0; background: none; font-size: 17px; color: var(--ink3); cursor: pointer; }
.modal-bd { padding: 16px; overflow-y: auto; }
.modal-ft { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.modal-ft .btn { flex: 1; }
/* 底部按钮尚未挂上的瞬间（如「加载中…」）不留一条空白分隔条 */
.modal-ft:empty { display: none; }
.confirm-text { font-size: 14px; line-height: 1.6; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(14px);
  background: rgba(31,41,55,.94); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-size: 13.5px; z-index: 90;
  opacity: 0; pointer-events: none; transition: all .22s; max-width: 84vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: rgba(20,184,154,.96); }
.toast.err { background: rgba(229,72,77,.96); }

/* 答题 */
.q-stem { font-size: 15px; font-weight: 600; line-height: 1.6; margin-bottom: 10px; }
.q-opt {
  display: flex; align-items: flex-start; gap: 9px;
  border: 1.5px solid var(--line); border-radius: 11px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer; background: #fff;
}
.q-opt.on { border-color: var(--orange); background: var(--orange-l); }
.q-opt.right { border-color: var(--green); background: var(--green-l); }
.q-opt.wrong { border-color: var(--danger); background: #fef2f2; }
.q-opt .q-k {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: #f1f3f6; color: var(--ink2);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.q-opt.on .q-k { background: var(--orange); color: #fff; }
.q-anal {
  background: var(--green-l); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; margin-top: 8px; color: #0f5f52; line-height: 1.6;
}

/* 上传 */
.up-box {
  border: 2px dashed #f3b08a; border-radius: 14px;
  padding: 26px 16px; text-align: center; background: var(--orange-l); cursor: pointer;
}
.up-box.g { border-color: #7fdcc8; background: var(--green-l); }
.up-ico { font-size: 34px; }
.up-txt { font-size: 13px; color: var(--ink2); margin-top: 6px; }
/* 已选文件条：只显示文件名，不渲染图片预览 */
.file-chip {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.fc-ico { flex: none; font-size: 17px; line-height: 1; }
.fc-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 13px; color: var(--ink); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fc-size { flex: none; font-size: 12px; color: var(--ink3); }
.fc-del {
  flex: none; cursor: pointer;
  border: 1px solid #f0b6ad; background: #fff5f3; color: var(--danger);
  font-size: 12px; line-height: 1; padding: 6px 11px; border-radius: 999px;
}
.fc-del:hover { background: #ffeae6; }
.fc-del:active { transform: scale(.97); }

/* 打卡凭证多图选择：缩略图网格 + 放大 + 单张删除 */
.shot-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 10px;
}
.shot { position: relative; min-width: 0; }
.shot-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 10px; background: #eef1f5;
  border: 1px solid var(--line); cursor: zoom-in; display: block;
}
.shot-meta {
  margin-top: 3px; font-size: 11px; color: var(--ink3);
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shot-del {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; line-height: 1; padding: 0;
  border-radius: 999px; border: 1px solid #f0b6ad;
  background: rgba(255, 245, 243, .94); color: var(--danger);
  font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.shot-del:hover { background: #ffeae6; }
.shot-del:active { transform: scale(.94); }
/* 单张凭证：只占一格但放大显示，便于确认清晰度 */
.shot-grid.one { grid-template-columns: minmax(0, 132px); }
.shot-grid.one .shot-img { aspect-ratio: 3 / 4; }
.shot-grid.one .shot-meta { white-space: normal; line-height: 1.35; }

/* 详情 */
.kv { display: flex; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink3); flex: none; width: 84px; }
.kv .v { flex: 1; word-break: break-all; }

/* 荣誉 */
.medal-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.medal {
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--line); background: #fff;
}
.medal.gold { border-color: #f5c445; background: #fffbeb; color: #b7791f; }
.medal.silver { border-color: #cbd5e1; background: #f8fafc; color: #64748b; }
.medal.bronze { border-color: #e0a06a; background: #fff7ed; color: #c2410c; }
.medal.lock { color: var(--ink3); }

/* 登录页 */
.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;              /* 移动端地址栏收起/展开时高度不再溢出 */
  display: flex; flex-direction: column;
  justify-content: center; padding: 24px 18px; max-width: 460px; margin: 0 auto;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo .l-ico { font-size: 46px; }
.auth-logo h1 { font-size: 21px; margin: 8px 0 3px; color: var(--ink); font-weight: 800; }
.auth-logo p { margin: 0; font-size: 13px; color: var(--ink3); }
.seg {
  display: flex; background: #eef0f3; border-radius: 10px; padding: 3px; margin-bottom: 14px;
}
.seg button {
  flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink2); cursor: pointer;
}
.seg button.on { background: #fff; color: var(--orange-d); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* 邮箱：只读展示（随账号自动补全），不可直接编辑 */
.mail-lock .input, .mail-view {
  background: #f6f7f9;
  color: var(--ink2);
  border-style: dashed;
}
.link-btn {
  border: 0; background: none; padding: 6px 8px;
  color: var(--orange-d); font-size: 12.5px; cursor: pointer;
  /* 触控目标不小于 32px：手机上「忘记密码」这类文字链太小会点不中 */
  min-height: 32px; display: inline-flex; align-items: center;
}
.row-gap { display: flex; gap: 8px; align-items: stretch; }
.row-gap .input { flex: 1; min-width: 0; }
.btn-send {
  flex: none; padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--orange); color: var(--orange-d);
  background: var(--orange-l); border-radius: 10px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.btn-send:disabled { opacity: .6; cursor: not-allowed; }

/* 图形验证码画布：点击换一张 */
.cap {
  flex: none; width: 104px; height: 38px;
  border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line);
  display: block;
}
.cap:active { transform: scale(.98); }

/* 三页签时字号略收，避免 390px 下换行 */
.seg.seg-3 button { font-size: 13px; padding: 8px 4px; white-space: nowrap; }
.seg.seg-2 button { font-size: 13.5px; }
/* 禁用按钮：不可点且视觉上明确不可用（验证码未发出、取不到邮箱等场景） */
.btn-disabled, .btn[disabled] {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}

/* 审核工作台：列表式工单（左侧缩略图 + 右侧信息，整行可点进入审核） */
.rv-list { display: flex; flex-direction: column; gap: 8px; }
.rv-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 12px; padding: 10px;
  box-shadow: var(--shadow); cursor: pointer;
}
.rv-row:active { transform: scale(.995); }
.rv-thumb {
  position: relative; flex: none; width: 64px; height: 64px;
  border-radius: 10px; overflow: hidden; background: #eef1f5;
  display: flex; align-items: center; justify-content: center;
}
.rv-ph { font-size: 22px; opacity: .45; }
.rv-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; background: #eef1f5;
}
.rv-main { flex: 1; min-width: 0; }
.rv-l1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rv-type { font-size: 13.5px; font-weight: 600; }
.rv-seq { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--ink3); }
.rv-date { font-size: 12px; color: var(--ink3); margin-left: auto; }
.rv-l2, .rv-l3 { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-l2 { font-size: 12.5px; color: var(--ink2); }
.rv-l3 { font-size: 12px; color: var(--ink3); }
.rv-arrow { flex: none; color: var(--ink3); font-size: 18px; line-height: 1; }
.wk-img { width: 100%; border-radius: 10px; display: block; margin: 8px 0; background: #f3f4f6; }

/* 我的记录：凭证缩略图（点击放大） */
.rec-pics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rec-thumb {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
  background: #eef1f5; display: block; cursor: zoom-in;
}

/* 我的记录：科普答题明细（次数 + 每次总数/答对数） */
.quiz-box { background: #f8f9fb; border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.qb-hd { font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.qb-hd b { color: var(--green-d); }
.qa-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 0; }
.qa-row + .qa-row { border-top: 1px dashed var(--line); }
.qa-no { color: var(--ink3); flex: none; }
.qa-score { flex: 1; min-width: 0; color: var(--ink2); }
.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 10px 0; }
.reason-grid .btn { font-size: 12.5px; padding: 8px; }
.reason-grid .btn.on { background: var(--orange); border-color: var(--orange); color: #fff; }

/* 管理端 */
/* 管理端顶部区：顶栏 + 页签整体吸顶。
   旧写法给页签写死 top:52px 去对齐顶栏高度，横屏下顶栏变矮就会错位；
   改成外层容器吸顶，内部两块都恢复常规流。 */
.admin-head {
  position: sticky; top: 0; z-index: 30;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.admin-head .topbar { position: static; }
.admin-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.admin-tabs button {
  flex: none; border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.admin-tabs button.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat-box { background: #fff; border-radius: 12px; padding: 13px; box-shadow: var(--shadow); }
.stat-box b { display: block; font-size: 22px; color: var(--green-d); line-height: 1.3; }
.stat-box span { font-size: 12px; color: var(--ink3); }
.banner {
  background: #fff7e6; border: 1px solid #ffe1a8; color: #a15c00;
  border-radius: 10px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 10px;
}

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg) } }

@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .reason-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==================== 横竖屏 / 多尺寸适配 ==================== */

/* 竖屏窄机（≤380px，如 iPhone SE/mini、部分安卓小屏）：
   两列并排的输入框/按钮会挤到换行或截断，统一改单列 */
@media (max-width: 380px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .reason-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h2 { font-size: 18px; }
  .hero-stat b { font-size: 17px; }
  .qrow { padding: 9px 10px; }
  /* 窄机：缩略图略收，给文字留出宽度 */
  .rv-thumb { width: 56px; height: 56px; }
  .rv-l1 { gap: 5px; }
  .rec-thumb { width: 56px; height: 56px; }
  .qa-row { flex-wrap: wrap; }
}

/* 横屏且高度很小（手机横放：可用高度通常只有 320~430px）：
   纵向空间是稀缺资源 —— 压缩一切上下留白，让核心内容能一屏装下 */
@media (orientation: landscape) and (max-height: 560px) {
  .topbar { padding-top: 6px; padding-bottom: 6px; }
  .topbar .tb-title { font-size: 15px; }
  .topbar .tb-sub { display: none; }          /* 副标题高度换内容 */
  .page { padding-top: 10px; padding-bottom: 68px; }
  .admin-tabs { padding: 6px 12px; }

  /* 登录/激活页：横屏时纵向居中会让表单被顶出屏幕，改为顶部对齐可滚动 */
  .auth-wrap { justify-content: flex-start; padding-top: 12px; padding-bottom: 18px; }
  .auth-logo { margin-bottom: 10px; }
  .auth-logo .l-ico { font-size: 32px; }
  .auth-logo h1 { font-size: 18px; margin: 4px 0 2px; }
  .seg { margin-bottom: 10px; }

  .card { padding: 11px 12px; margin-bottom: 10px; }
  .hero { padding: 12px 14px; border-radius: 14px; }
  .hero h2 { font-size: 17px; }
  .hero-stats { margin-top: 8px; }
  .hero-stat { padding: 6px 4px; }
  .hero-stat b { font-size: 16px; }
  .item-card { padding: 9px 11px; }
  .item-icon { width: 36px; height: 36px; border-radius: 11px; font-size: 19px; }
  .field { margin-bottom: 8px; }
  .input, select.input, textarea.input { padding: 8px 11px; }
  .up-box { padding: 12px; }
  .up-ico { font-size: 24px; }
  .empty { padding: 24px 16px; }
  .empty .e-ico { font-size: 30px; }

  /* 弹窗：横屏下高度更宝贵，放大可用高度并减少内边距 */
  .mask { padding: 8px; align-items: flex-start; }
  .modal { max-height: 94vh; max-height: 94dvh; }
  .modal-hd { padding: 10px 14px; }
  .modal-bd { padding: 12px 14px; }
  .modal-ft { padding: 9px 14px; }

  .tabbar button { padding: 3px 0 2px; }
  .tabbar button .ti { font-size: 17px; }
  .toast { bottom: 64px; }

  /* 宽而矮：统计/原因是多列显示的好时机 */
  .reason-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }

  /* 审核工单列表：横屏下压缩行高，一屏能看到更多工单 */
  .rv-row { padding: 8px; gap: 9px; }
  .rv-thumb { width: 52px; height: 52px; }

  /* 我的记录：横屏时凭证缩略图与答题明细同步收紧 */
  .rec-thumb { width: 52px; height: 52px; }
  .quiz-box { padding: 6px 9px; }
  .qa-row { padding: 3px 0; }
}

/* 大屏（平板横屏、电脑）：放宽主内容宽度，避免中间一条窄带 */
@media (min-width: 900px) {
  .page { max-width: 880px; }
  .auth-wrap { max-width: 520px; }
  .mask { padding: 28px; }
}

/* 大屏且矮（笔记本电脑、平板横屏）：弹窗可以更宽，减少内部滚动 */
@media (min-width: 900px) and (max-height: 620px) {
  .modal { max-width: 560px; max-height: 90vh; max-height: 90dvh; }
}

/* 触屏精细度补偿：指针不便时放大可点区域 */
@media (pointer: coarse) {
  .tb-btn { padding: 7px 14px; }
  .admin-tabs button { padding: 8px 14px; }
  .q-opt { padding: 12px; }
}