/* ══════════════════════════════════════════════════════════════════
   assets/homework.css —— 作业助手（/homework · /homework-cx）共用样式

   为什么单独一个文件：
     两个作业页面的信息结构几乎一致（概览 → 待提交 → 最近提交 → 预览弹层），
     以前各自内联一份 CSS，改一处忘一处就会出现「两个页面长得不像」。
     这里只放作业页专用组件；设计 token 仍来自 assets/ux.css。

   移动端硬约束（AGENTS.md §5.8）：
     · 文本列 flex:1 + min-width:0，操作按钮另起一行，320 宽不逐字竖排
     · 底部弹层只有一个滚动容器 + max-height:92dvh + safe-area
     · 行内链接不套 44px 触控盒
     · iOS 输入框 16px（页面内 @supports 规则）
     · 状态文案/颜色统一走映射，不散落三元表达式

   ★ 改完本文件必须把 homework.html / homework-cx.html 里的
     `/assets/homework.css?v=...` 版本号加一：静态资源是
     Cache-Control: max-age=86400，不换版本号用户最长 24 小时看不到新样式。
   ══════════════════════════════════════════════════════════════════ */

:root {
  --hw-radius: 16px;
  --hw-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 34px -18px rgba(16, 24, 40, .28);
  --hw-line: #e9ecf1;
  --hw-line-soft: #f1f3f6;
  --hw-fill: #f2f4f7;
  --hw-blue-soft: #e8f3ff;
  --hw-green-soft: #eefbf1;
  --hw-amber-soft: #fff7e8;
  --hw-red-soft: #fff1f0;
}

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

html, body { margin: 0; }

body {
  background: var(--c-bg, #f5f6f8);
  color: var(--c-text, #1d2129);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
}
body.lock { overflow: hidden; }

a { color: var(--c-primary-text, #0b5fd1); text-decoration: none; }

.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px; }

/* ── 顶栏 ───────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid #eef0f3;
  padding-top: env(safe-area-inset-top);
}
.hd {
  height: 54px; display: flex; align-items: center; justify-content: center;
  gap: 8px; position: relative; padding: 0 56px;
}
.hd h1 {
  font-size: 16px; font-weight: 600; margin: 0; letter-spacing: .2px;
  max-width: 100%; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hd .back { position: absolute; left: 6px; }
.hd .tools { position: absolute; right: 6px; display: flex; align-items: center; gap: 2px; }

.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; color: var(--c-text, #1d2129);
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
  flex-shrink: 0;
}
.icon-btn:active { background: var(--hw-fill); }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.icon-btn.spin svg { animation: hw-spin .8s linear infinite; }
@keyframes hw-spin { to { transform: rotate(360deg); } }

/* ── 平台切换 ───────────────────────────────────────────────────── */
.seg {
  display: flex; gap: 4px; padding: 4px; margin: 14px 0 12px;
  background: #eceef2; border-radius: 13px;
}
.seg-item {
  flex: 1; min-width: 0; height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--c-text-2, #4e5969); text-decoration: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.seg-item.on {
  background: #fff; color: var(--c-text, #1d2129);
  box-shadow: 0 1px 4px rgba(16, 24, 40, .12);
}
.seg-item:active { opacity: .85; }

/* ── 概览卡 ─────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(158deg, #ffffff 12%, #f7fbff 100%);
  border: 1px solid #e6eef9; border-radius: 18px;
  padding: 16px; box-shadow: var(--hw-shadow);
}
.hero-row { display: flex; align-items: flex-start; gap: 14px; }
.hero-cell { flex: 1; min-width: 0; }
.hero-cell.right { text-align: right; flex: 0 1 auto; }
.hero-cap { font-size: 13px; color: var(--c-text-3, #667085); line-height: 1.4; }
.hero-num {
  display: flex; align-items: baseline; gap: 4px; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.hero-cell.right .hero-num { justify-content: flex-end; }
.hero-num b { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.8px; }
.hero-num span { font-size: 13px; color: var(--c-text-3, #667085); }
.hero-num.money { font-size: 24px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; }
.hero-num.money.low { color: var(--c-danger-text, #d32029); }
.hero-link { font-size: 12.5px; font-weight: 600; display: inline-block; margin-top: 2px; }

.hero-quota { margin-top: 14px; }
.quota-top {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--c-text-3, #667085);
}
.quota-top b { color: var(--c-text, #1d2129); font-variant-numeric: tabular-nums; }
.quota-bar { height: 6px; border-radius: 99px; background: #e9eef6; overflow: hidden; margin-top: 6px; }
.quota-bar i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #4d9bff, #1677ff);
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
}
.quota-bar i.full { background: linear-gradient(90deg, #ffb35c, #d25f00); }

.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 99px;
  background: #fff; border: 1px solid #e5e6eb; color: var(--c-text-2, #4e5969);
  white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.tag.ok { background: #f1fcf4; border-color: #c9f2d2; color: #0a7a22; }
.tag.off { background: #f7f8fa; color: var(--c-text-3, #667085); }
.tag.warn { background: #fff9ee; border-color: #ffe3b8; color: #8a4b00; }

/* 账号选择：原生 select 铺满整行（保留系统选择器 + 48px 触控区） */
.acc-line {
  position: relative; display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e3e8f0;
  min-height: 34px; font-size: 13px; color: var(--c-text-2, #4e5969);
}
.acc-line .h2-t { flex-shrink: 0; white-space: nowrap; font-size: 12px; color: var(--c-text-3, #667085); }
#accName {
  flex: 1; min-width: 0; font-weight: 600; color: var(--c-text, #1d2129);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-line .chev { color: var(--c-text-3, #667085); font-size: 13px; flex-shrink: 0; }
.acc-line select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; border: 0; padding: 0; margin: 0; cursor: pointer; font-size: 16px;
}
.acc-line.single select,
.acc-line.single .chev { display: none; }

/* ── 提示条（同一时刻只留一条主提示，AGENTS.md §5.8.1 M）────── */
.notice {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 12px; padding: 11px 12px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.7; border: 1px solid transparent;
  word-break: break-word;
}
.notice .ico { flex-shrink: 0; line-height: 1.5; }
.notice b { font-weight: 600; }
.notice .notice-act { font-weight: 600; white-space: nowrap; margin-left: 2px; }
.notice.info { background: #f2f8ff; border-color: #d6e8ff; color: #0b4ea2; }
.notice.warn { background: #fff9ee; border-color: #ffe3b8; color: #8a4b00; }
.notice.err { background: #fff2f0; border-color: #ffd6d1; color: #a8071a; }

/* ── 分区标题 ───────────────────────────────────────────────────── */
.sec-hd {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 2px 8px; min-height: 24px;
}
.sec-hd h2 { font-size: 15px; font-weight: 600; margin: 0; }
.count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  background: var(--hw-blue-soft); color: var(--c-primary-text, #0b5fd1);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.sec-hd .grow { flex: 1; }

/* ── 作业卡片 ───────────────────────────────────────────────────── */
.hw {
  background: #fff; border: 1px solid var(--hw-line); border-radius: var(--hw-radius);
  padding: 14px; margin-bottom: 10px;
  transition: border-color .18s ease;
}
.hw.urgent { border-color: #ffd9d4; }
.hw-title {
  font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--c-text, #1d2129);
  word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.chip {
  font-size: 11.5px; line-height: 1; padding: 5px 8px; border-radius: 6px;
  background: var(--hw-fill); color: var(--c-text-2, #4e5969);
  white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.chip.type { background: var(--hw-blue-soft); color: #0b5fd1; font-weight: 600; }
.chip.type.test { background: var(--hw-green-soft); color: #0a7a22; }
.chip.course { max-width: min(100%, 200px); }

.due {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; line-height: 1; white-space: nowrap;
  color: var(--c-text-3, #667085);
}
.due::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.due.soon { color: #b25a00; }
.due.today, .due.over { color: var(--c-danger-text, #d32029); font-weight: 600; }

.hw-btn {
  width: 100%; height: 44px; margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #d6e8ff; border-radius: 10px;
  background: #f4f9ff; color: var(--c-primary-text, #0b5fd1);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.hw-btn:active { background: var(--hw-blue-soft); }
.hw-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── 骨架屏 ─────────────────────────────────────────────────────── */
.sk {
  background: #fff; border: 1px solid var(--hw-line); border-radius: var(--hw-radius);
  padding: 14px; margin-bottom: 10px; overflow: hidden;
}
.sk i {
  display: block; height: 14px; border-radius: 6px; margin-bottom: 9px;
  background: linear-gradient(90deg, #eef1f5 25%, #f8fafc 37%, #eef1f5 63%);
  background-size: 400% 100%;
  animation: hw-shimmer 1.3s ease infinite;
}
.sk i.w70 { width: 70%; }
.sk i.w40 { width: 40%; height: 12px; }
.sk i.w100 { width: 100%; height: 36px; border-radius: 10px; margin: 14px 0 0; }
@keyframes hw-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ── 空状态 ─────────────────────────────────────────────────────── */
.empty {
  padding: 34px 18px; text-align: center;
  color: var(--c-text-3, #667085); font-size: 13.5px; line-height: 1.75;
}
.empty-ico {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  background: #eef5ff; color: #1677ff;
  display: flex; align-items: center; justify-content: center;
}
.empty-ico svg { width: 26px; height: 26px; }
.empty b { display: block; font-size: 15px; color: var(--c-text, #1d2129); margin-bottom: 4px; }
.empty .btn { max-width: 220px; margin: 16px auto 0; }
.empty.small { padding: 22px 12px; }

/* ── 最近提交 ───────────────────────────────────────────────────── */
.panel {
  background: #fff; border: 1px solid var(--hw-line); border-radius: var(--hw-radius);
  padding: 2px 14px;
}
.rec { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--hw-line-soft); }
.rec:last-child { border-bottom: 0; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 7px; }
.rec-main { flex: 1; min-width: 0; }
.rec-title {
  font-size: 14px; line-height: 1.45; color: var(--c-text, #1d2129);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rec-sub {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--c-text-3, #667085); margin-top: 2px;
}
.rec-msg {
  font-size: 12px; line-height: 1.6; margin-top: 4px; color: var(--c-text-3, #667085);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.rec-msg.err { color: #a8071a; }
.rec-st {
  flex-shrink: 0; white-space: nowrap; margin-top: 2px;
  font-size: 12px; font-weight: 600;
}

/* ── 一键完成 ───────────────────────────────────────────────────── */
.cta {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #eef6ff, #f8fbff);
  border: 1px solid #d9e9ff; border-radius: var(--hw-radius);
  padding: 14px; margin-bottom: 12px;
}
.cta-txt { flex: 1; min-width: 0; }
.cta-txt b { display: block; font-size: 14px; }
.cta-txt span {
  display: block; margin-top: 2px; font-size: 12px; line-height: 1.6;
  color: var(--c-text-3, #667085);
}
.cta .btn { width: auto; flex: 0 0 auto; height: 42px; padding: 0 16px; border-radius: 12px; font-size: 13.5px; }

.batch {
  background: #fff; border: 1px solid var(--hw-line); border-radius: var(--hw-radius);
  padding: 14px; margin-bottom: 12px;
}
.batch.sticky {
  position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 20;
  box-shadow: var(--hw-shadow); border-color: #d9e9ff;
}
.batch-top { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.batch-top .pct {
  margin-left: auto; color: var(--c-primary-text, #0b5fd1);
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.batch-bar { height: 8px; border-radius: 99px; background: #eef1f5; overflow: hidden; margin-top: 10px; }
.batch-bar i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #4d9bff, #1677ff);
  transition: width .35s ease;
}
.batch-now {
  margin-top: 8px; font-size: 12.5px; color: var(--c-text-3, #667085);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.batch-list { margin-top: 8px; max-height: 176px; overflow-y: auto; overscroll-behavior: contain; }
.b-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; font-size: 12.5px; }
.b-ico { flex-shrink: 0; width: 16px; text-align: center; line-height: 1.5; }
.b-txt { flex: 1; min-width: 0; }
.b-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-m { margin-top: 2px; font-size: 11.5px; line-height: 1.55; color: var(--c-text-3, #667085); word-break: break-word; }
.batch-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.batch-foot .linkish {
  font-size: 12.5px; font-weight: 600; color: var(--c-primary-text, #0b5fd1);
  background: none; border: 0; padding: 6px 0; cursor: pointer; font-family: inherit;
}

/* ── 按钮 ───────────────────────────────────────────────────────── */
.btn {
  width: 100%; height: 46px; border: 0; border-radius: 12px;
  background: var(--c-primary, #1677ff); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px;
}
.btn:active { background: #0e5fd8; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--hw-fill); color: var(--c-text, #1d2129); flex: 0 0 88px; }
.btn.ghost:active { background: #e5e8ee; }
.btn .spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: hw-spin .7s linear infinite;
}

/* ── 底部弹层 ───────────────────────────────────────────────────── */
.mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, .48);
  display: none; align-items: flex-end; justify-content: center;
}
.mask.on { display: flex; }
.mask.center { align-items: center; padding: 20px; }

.sheet {
  display: flex; flex-direction: column;
  width: 100%; max-width: 560px; max-height: 92dvh;
  background: #fff; border-radius: 20px 20px 0 0;
  animation: hw-up .26s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.sheet:focus { outline: none; }
.sheet::before {
  content: ''; flex-shrink: 0; width: 36px; height: 4px; border-radius: 99px;
  background: #e2e5ea; margin: 8px auto 0;
}
@keyframes hw-up {
  from { transform: translateY(28px); opacity: .5; }
  to { transform: translateY(0); opacity: 1; }
}
.sheet-hd {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--hw-line-soft);
  flex-shrink: 0;
}
.sheet-hd-txt { flex: 1; min-width: 0; }
.sheet-hd b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 16px; line-height: 1.4; word-break: break-word;
}
.sheet-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sheet-x { margin: -6px -8px 0 0; font-size: 17px; color: var(--c-text-2, #4e5969); }
.sheet-bd {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 6px;
}
.sheet-ft {
  flex-shrink: 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hw-line-soft); background: #fff;
  box-shadow: 0 -10px 24px -20px rgba(16, 24, 40, .5);
}
.sheet-price { font-size: 12px; line-height: 1.65; color: var(--c-text-3, #667085); margin-bottom: 10px; }
.sheet-price b { color: var(--c-text, #1d2129); }
.sheet-price.err { color: #a8071a; }
.sheet-acts { display: flex; gap: 10px; }
.sheet-acts .btn:not(.ghost) { flex: 1; min-width: 0; }

/* ── 题目 ───────────────────────────────────────────────────────── */
.pv-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pv-chip {
  font-size: 11.5px; line-height: 1; padding: 5px 9px; border-radius: 99px;
  background: #f5f7fa; color: var(--c-text-2, #4e5969); white-space: nowrap;
}
.pv-chip.ok { background: var(--hw-green-soft); color: #0a7a22; }
.pv-chip.ai { background: var(--hw-blue-soft); color: #0b5fd1; }

.q {
  border: 1px solid var(--hw-line); border-radius: 14px;
  padding: 12px; margin-bottom: 10px; background: #fff;
}
.q-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.q-no {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  background: var(--hw-fill); color: var(--c-text-2, #4e5969);
  font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.q-hd .grow { flex: 1; min-width: 0; }
.q-type { font-size: 11.5px; color: var(--c-text-3, #667085); white-space: nowrap; }
.q-st {
  flex-shrink: 0; white-space: nowrap;
  font-size: 11.5px; font-weight: 600; padding: 3px 7px; border-radius: 6px;
}
.q-st.ok { background: var(--hw-green-soft); color: #0a7a22; }
.q-st.ai { background: var(--hw-blue-soft); color: #0b5fd1; }
.q-st.need { background: var(--hw-amber-soft); color: #8a4b00; }

.qt { font-size: 14px; line-height: 1.72; color: var(--c-text, #1d2129); word-break: break-word; }
.qt .katex-display { margin: 8px 0; }
.opt {
  display: flex; gap: 6px; margin-top: 6px;
  font-size: 13.5px; line-height: 1.65; color: var(--c-text-2, #4e5969);
  word-break: break-word;
}
.opt b { flex-shrink: 0; color: var(--c-text, #1d2129); font-weight: 600; }

.q input, .q textarea {
  width: 100%; margin-top: 10px; padding: 10px 12px;
  border: 1px solid #e3e6eb; border-radius: 10px;
  background: #fbfcfe; color: var(--c-text, #1d2129);
  font: inherit; font-size: 14px; line-height: 1.6;
  outline: none; appearance: none;
}
.q textarea { min-height: 104px; resize: vertical; }
.q input:focus, .q textarea:focus { background: #fff; border-color: var(--c-primary, #1677ff); }
.q input.bad, .q textarea.bad { border-color: var(--c-danger, #f53f3f); background: #fffafa; }
.q-foot {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 6px; font-size: 11.5px; color: var(--c-text-3, #667085);
}
.q-foot .grow { flex: 1; }

/* ── 确认弹窗 ───────────────────────────────────────────────────── */
.dialog {
  width: 100%; max-width: 400px; background: #fff; border-radius: 18px;
  padding: 20px; box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .45);
  animation: hw-pop .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes hw-pop {
  from { transform: scale(.96); opacity: .4; }
  to { transform: scale(1); opacity: 1; }
}
.dialog h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.dialog .dlg-sub { margin-top: 6px; font-size: 13px; line-height: 1.65; color: var(--c-text-3, #667085); }
.dlg-rows { margin: 14px 0 0; border-top: 1px solid var(--hw-line-soft); }
.dlg-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--hw-line-soft); font-size: 13.5px;
}
.dlg-row span { color: var(--c-text-2, #4e5969); }
.dlg-row b { font-variant-numeric: tabular-nums; text-align: right; }
.dlg-row b.warn { color: #b25a00; }
.dlg-row b.err { color: var(--c-danger-text, #d32029); }
.dlg-acts { display: flex; gap: 10px; margin-top: 18px; }
.dlg-acts .btn:not(.ghost) { flex: 1; min-width: 0; }
.dlg-note { margin-top: 10px; font-size: 12px; line-height: 1.6; color: #a8071a; }
.dlg-note.info { color: var(--c-text-3, #667085); }

/* ── Toast ──────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px);
  display: flex; align-items: flex-start; gap: 8px;
  max-width: min(92vw, 440px);
  padding: 10px 16px; border-radius: 12px;
  background: rgba(29, 33, 41, .94); color: #fff;
  font-size: 13.5px; line-height: 1.6; text-align: left;
  opacity: 0; pointer-events: none; z-index: 200;
  transition: opacity .22s ease, transform .22s ease;
  word-break: break-word;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast .ico { flex-shrink: 0; line-height: 1.5; }
.toast.ok { background: #1b7a35; }
.toast.err { background: #c62828; }
.toast.warn { background: #a3560a; }

/* ── 窄屏微调（320 是底线）────────────────────────────────────── */
@media (max-width: 379px) {
  .wrap { padding: 0 12px; }
  .hero { padding: 14px; }
  .hero-num b { font-size: 30px; }
  .hero-num.money { font-size: 21px; }
  .cta { flex-direction: column; align-items: stretch; }
  .cta .btn { width: 100%; }
  .btn.ghost { flex-basis: 80px; }
  .sheet-bd { padding: 12px 14px 4px; }
  .sheet-hd, .sheet-ft { padding-left: 14px; padding-right: 14px; }
}

@media (hover: hover) {
  .hw:hover { border-color: #d6e8ff; }
  .hw-btn:hover { background: var(--hw-blue-soft); }
}
