/* 前台统一主题：速度仪表盘方向
 * 双色即语义：--fast 青 = 不限速，--slow 琥珀 = 限速。
 * 不引任何 webfont / 外站 CDN（用户在国内，且图标一律内联 SVG）。
 */

:root {
  --ink: #0F1836;
  --ink-2: #5A6480;
  --ink-3: #8C94AC;
  --paper: #EEF1F7;
  --surface: #FFFFFF;
  --line: #D7DDE9;
  --line-soft: #E7EBF3;
  --fast: #0AA5C4;
  --fast-deep: #07829B;
  --slow: #D98324;
  --good: #12A150;
  --danger: #D64545;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 18px 40px -24px rgba(15, 24, 54, .38);

  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
             "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas,
              "Noto Sans Mono", "Courier New", monospace;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--fast);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- 页头 ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
}
.brand-mark svg { width: 15px; height: 15px; display: block; }

.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }

.head-nav { display: flex; align-items: center; gap: 4px; }

.head-nav a,
.head-nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.head-nav a:hover,
.head-nav button:hover { color: var(--fast-deep); background: rgba(10, 165, 196, .08); }
.head-nav a.is-here { color: var(--ink); font-weight: 600; }

/* ---------- 主区 ---------- */

.main { flex: 1 0 auto; padding: 56px 20px 64px; }

.page-title { margin: 0 0 20px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }

/* 用户菜单（右上角头像下拉） */
.user-menu { position: relative; margin-left: 8px; }
.head-nav .avatar-btn {
  position: relative;
  overflow: hidden;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--fast);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.head-nav .avatar-btn:hover { background: var(--fast-deep); }
/* 真实头像盖在首字上方，加载失败移除后露出首字 */
.head-nav .avatar-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.head-nav .avatar-btn svg { width: 18px; height: 18px; display: block; }
.head-nav .avatar-btn.is-guest { background: var(--line); }
.head-nav .avatar-btn.is-guest:hover { background: var(--ink-3); }
.user-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 250px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  z-index: 50;
}
.user-name { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--ink); word-break: break-all; }
.user-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 12.5px; }
.user-info dt { color: var(--ink-3); }
.user-info dd { margin: 0; text-align: right; color: var(--ink); font-family: var(--font-num); word-break: break-all; }
.user-info .hot { color: var(--slow); }
.user-drop-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.user-drop-links a { font-size: 13px; color: var(--fast-deep); }
.user-drop-links a:hover { text-decoration: underline; }

/* ---------- 控制台 ---------- */

.console {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}

.hero { text-align: center; padding: 6px 0 0; }

.hero h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 700;
}
.hero p { margin: 12px auto 0; max-width: 42em; color: var(--ink-2); }

/* 输入与按钮同一行，按钮不换行 */
.entry {
  margin-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 14px;
  align-items: stretch;
}

.entry textarea {
  width: 100%;
  min-height: 78px;
  padding: 14px 16px;
  border: 2px solid var(--fast);
  border-radius: var(--r-md);
  background: #F2FAFC;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 0 0 4px rgba(10, 165, 196, .1);
}
.entry textarea::placeholder { color: var(--ink-3); }
.entry textarea:focus {
  outline: none;
  border-color: var(--fast-deep);
  box-shadow: 0 0 0 5px rgba(10, 165, 196, .22);
  background: #fff;
}
/* 多行时滚动条与输入框风格统一（Firefox / Chrome+Safari） */
.entry textarea { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.entry textarea::-webkit-scrollbar { width: 8px; }
.entry textarea::-webkit-scrollbar-track { background: transparent; }
.entry textarea::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
  border: 2px solid #F2FAFC;
}

.hint { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.hint .ok { font-family: var(--font-num); color: var(--fast-deep); word-break: break-all; }
.hint .bad { color: var(--danger); }

.btn-go {
  width: 100%;
  min-height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-md);
  background: var(--fast);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .15s, transform .06s;
}
.btn-go:hover { background: var(--fast-deep); }
.btn-go:active { transform: translateY(1px); }
.btn-go[disabled] { opacity: .62; cursor: default; }

/* ---------- 签名件：速度仪表盘 ---------- */

.gauge {
  margin: 0;
  display: flex;
  flex-direction: column;
  margin-top: 112px;
  padding: 16px 20px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, #FBFCFE 0%, #F4F7FB 100%);
}

.gauge-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gauge-note { font-size: 11px; color: var(--ink-3); }

.plot { display: block; width: 100%; height: 180px; margin: 12px 0 4px; }
.plot .grid line { stroke: var(--line-soft); stroke-width: 1; }
.plot .fill-fast { fill: rgba(10, 165, 196, .09); stroke: none; }
.plot .line-slow { fill: none; stroke: var(--slow); stroke-width: 2; stroke-linecap: round; }
.plot .line-fast { fill: none; stroke: var(--fast); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.plot .line-slow,
.plot .line-fast,
.plot .fill-fast { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .9s cubic-bezier(.2,.7,.3,1) .12s forwards; }
.plot .line-slow { animation-duration: .55s; }
.plot .fill-fast { stroke-dasharray: none; stroke-dashoffset: 0; animation: fade .7s ease-out .5s forwards; opacity: 0; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

.legend { list-style: none; margin: 0; padding: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px 40px; }
.lg { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); }
.lg .tick { width: 14px; height: 3px; border-radius: 2px; align-self: center; }
.lg.fast .tick { background: var(--fast); }
.lg.slow .tick { background: var(--slow); }
.lg b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 600; color: var(--ink); }
.lg.fast b { color: var(--fast-deep); }
.lg .unit { font-family: var(--font-num); font-size: 10px; letter-spacing: .1em; color: var(--ink-3); }

/* 进度区：独立卡片，任务运行时显示在速度对照图上方 */
.live { margin: 20px 0 0; padding: 14px 20px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.live-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.live-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.live-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.track { margin-top: 8px; height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.bar { height: 100%; width: 0; border-radius: 99px; background: var(--fast); transition: width .4s ease; }
.live-msg { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); min-height: 1.6em; }

/* ---------- 结果区 ---------- */

/* 结果区：醒目边框，包裹转存文件信息与高速下载入口 */
.result {
  margin-top: 20px;
  padding: 18px 20px;
  border: 2px solid var(--fast);
  border-radius: var(--r-md);
  background: #F2FAFC;
  box-shadow: 0 0 0 4px rgba(10, 165, 196, .1);
}
.result-head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.result-head svg { width: 18px; height: 18px; color: var(--good); }
.result p { margin: 8px 0 0; color: var(--ink-2); }
.files { margin-top: 10px; font-family: var(--font-num); font-size: 13px; color: var(--fast-deep); word-break: break-all; }
.meta { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.meta .num { color: var(--ink); }
.warn { margin-top: 8px; font-size: 13px; color: var(--danger); }
.actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--fast); color: #fff; }
.btn-primary:hover { background: var(--fast-deep); }
.btn-quiet { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--fast); color: var(--fast-deep); }

/* ---------- 套餐 ---------- */

.page-lead { margin: -12px 0 22px; font-size: 14px; color: var(--ink-2); }

/* 「两个条件」面板：判据同 addTask 的闸门，登录后原地变成本账号的额度读数 */
.gate {
  margin: 0 0 22px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #FBFCFE 0%, #F4F7FB 100%);
}
.gate-title { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.gate-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; }
.gate-and { align-self: center; font-size: 12px; color: var(--ink-3); }
.gate-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  padding: 11px 14px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--good);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.gate-item.is-warn { border-left-color: var(--slow); }
.gate-label { font-size: 13px; color: var(--ink-2); }
.gate-value { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; color: var(--ink); }
.gate-item.is-warn .gate-value { color: var(--slow); }
.gate-guest { margin: 0; font-size: 14px; color: var(--ink-2); }
.gate-guest a { margin-left: 4px; font-weight: 600; color: var(--fast-deep); }
.gate-guest a:hover { text-decoration: underline; }

/* 套餐本来就叫「卡」，所以每一档画成一张储值卡：芯片 + 闪电标 + 压印面额。
 * 整张卡就是购买按钮（.plan 即 .buy-btn），少一层点击目标，键盘可聚焦。 */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }

.plan {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-height: 160px;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(152deg, #FFFFFF 0%, #F3F7FC 100%);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.plan:hover { border-color: var(--fast); transform: translateY(-2px); box-shadow: 0 14px 26px -18px rgba(15, 24, 54, .55); }
.plan[disabled] { opacity: .58; cursor: default; transform: none; }

.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-name { font-size: 15px; font-weight: 700; letter-spacing: .1em; }
.plan-mark { width: 15px; height: 15px; flex: none; color: var(--ink-3); transition: color .15s; }
.plan:hover .plan-mark { color: var(--fast); }

/* 有效期最长的一档：青色描边 + 角标顶掉闪电标的位置，不叠不挤 */
.plan.is-best { border-color: var(--fast); box-shadow: 0 0 0 4px rgba(10, 165, 196, .1); }
.plan.is-best:hover { box-shadow: 0 0 0 4px rgba(10, 165, 196, .1), 0 14px 26px -18px rgba(15, 24, 54, .55); }
.plan-tag {
  flex: none;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--fast);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .04em;
}

.plan-price { display: flex; align-items: baseline; gap: 3px; color: var(--ink); }
.plan-price .cur { font-size: 15px; color: var(--ink-2); }
.plan-price .amt { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 700; letter-spacing: -.02em; }

.plan-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }

/* 储值卡芯片：两道压痕就够读出是芯片，不引图片 */
.plan-chip {
  position: relative;
  width: 27px;
  height: 20px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(160deg, #F8FAFD 0%, #DFE5EF 100%);
}
.plan-chip::before,
.plan-chip::after { content: ""; position: absolute; }
.plan-chip::before { inset: 5px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan-chip::after { inset: 0 8px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

.plan-go { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--fast-deep); }
.plan-go .arrow { transition: transform .15s; }
.plan:hover .plan-go .arrow { transform: translateX(3px); }

/* 计费说明：细线两栏，刻意压住，风头留给上面那排卡 */
.notes { margin-top: 30px; }
.notes-title { margin: 0 0 2px; font-size: 15px; font-weight: 700; }
.notes-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 34px; margin: 0; }
.notes-list > div { padding: 13px 0; border-top: 1px solid var(--line); }
.notes-list dt { font-size: 14px; font-weight: 600; }
.notes-list dd { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }

/* ---------- 资讯 ---------- */

.posts { display: flex; flex-direction: column; gap: 12px; }
.post {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .15s;
}
.post:hover { border-color: var(--fast); }
.post-thumb { width: 116px; height: 78px; flex: none; overflow: hidden; border-radius: var(--r-sm); background: var(--line-soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { min-width: 0; flex: 1; }
.post-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.post h2 { margin: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post time { font-family: var(--font-num); font-size: 12px; color: var(--ink-3); flex: none; }
.post p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .views { margin-top: 8px; font-family: var(--font-num); font-size: 11px; color: var(--ink-3); }

.article { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.article h1 { margin: 0; font-size: clamp(21px, 3vw, 28px); line-height: 1.3; letter-spacing: -.01em; }
.article-meta { margin-top: 10px; display: flex; gap: 18px; font-family: var(--font-num); font-size: 12px; color: var(--ink-3); }

.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 13px; color: var(--ink-2); }
.back:hover { color: var(--fast-deep); }

/* 富文本（后台编辑器产出 / 教程正文） */
.rich { margin-top: 20px; line-height: 1.85; }
.rich > *:first-child { margin-top: 0; }
.rich p { margin: 0 0 1em; }
.rich h1, .rich h2, .rich h3 { margin: 1.6em 0 .6em; line-height: 1.35; font-weight: 700; }
.rich h1 { font-size: 20px; } .rich h2 { font-size: 18px; } .rich h3 { font-size: 16px; }
.rich img { height: auto; border-radius: var(--r-sm); }
.rich a { color: var(--fast-deep); text-decoration: underline; }
.rich ul, .rich ol { padding-left: 1.4em; margin: 0 0 1em; }
.rich li { margin: .3em 0; }
.rich blockquote { margin: 1em 0; padding: .6em 1em; border-left: 3px solid var(--fast); background: #F6F9FC; color: var(--ink-2); }
.rich code { font-family: var(--font-num); font-size: .92em; background: var(--line-soft); padding: .12em .4em; border-radius: 4px; }
.rich pre { overflow-x: auto; padding: 14px; border-radius: var(--r-sm); background: var(--ink); color: #E6EBF5; }
.rich pre code { background: none; padding: 0; color: inherit; }
.rich table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rich th, .rich td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.table-scroll { overflow-x: auto; }

/* 分页（ThinkPHP bootstrap 分页器结构） */
.pagination { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: var(--font-num);
  font-size: 13px;
  color: var(--ink-2);
}
.pagination li a:hover { border-color: var(--fast); color: var(--fast-deep); }
.pagination li.active span { background: var(--fast); border-color: var(--fast); color: #fff; }
.pagination li.disabled span { opacity: .45; }

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 24, 54, .55);
}
.modal-box {
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 70px -20px rgba(15, 24, 54, .5);
}
.modal-box.wide { max-width: 720px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-x {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-sm);
  background: none; color: var(--ink-3);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.modal-x:hover { background: var(--line-soft); color: var(--ink); }
.modal-body { padding: 22px 20px; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; }
.modal-frame { flex: 1; min-height: 58vh; border: 0; width: 100%; }

.qr-lead { margin: 0 0 16px; text-align: center; font-size: 13px; color: var(--ink-2); }
.qr-frame {
  width: 214px;
  height: 214px;
  margin: 0 auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.qr-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-wait { width: 100%; height: 100%; display: grid; place-items: center; border-radius: var(--r-sm); background: #F6F8FC; font-size: 13px; color: var(--ink-3); text-align: center; padding: 12px; }
.qr-status { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ink-2); word-break: break-all; }
.qr-refresh {
  display: block;
  margin: 12px auto 0;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--fast-deep);
  font-size: 13px;
  cursor: pointer;
}
.qr-refresh:hover { text-decoration: underline; }

/* ---------- 页脚 / 客服 / toast ---------- */

.site-foot {
  flex: none;
  padding: 24px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  font-size: 13px;
  color: var(--ink-2);
}
.site-foot p { margin: 0; }
.site-foot p + p { margin-top: 6px; }
.site-foot a { color: var(--fast-deep); }
.site-foot a:hover { text-decoration: underline; }

.kefu {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 50;
  width: 54px;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(15, 24, 54, .7);
}
.kefu svg { width: 19px; height: 19px; }
.kefu span { font-size: 10px; line-height: 1; }
.kefu:hover { background: var(--fast-deep); }
.kefu.share { bottom: 148px; cursor: pointer; }

/* 弹窗 iframe 内嵌的文章页（如使用教程）：隐藏整页框架元素 */
.in-frame .site-head, .in-frame .site-foot, .in-frame .back { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 80;
  max-width: calc(100vw - 40px);
  padding: 11px 20px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 16px 34px -14px rgba(15, 24, 54, .8);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .console { padding: 22px 18px; }
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry textarea { min-height: 104px; }
  .btn-go { min-height: 54px; }
  .plot { height: 168px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .head-inner { min-height: 54px; gap: 8px; }
  .brand { min-width: 0; }
  .brand-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
  .head-nav { gap: 0; }
  .head-nav a, .head-nav button { padding: 0 6px; font-size: 13px; }
  .head-nav .avatar-btn { font-size: 14px; }
  .main { padding: 32px 14px 48px; }
  .wrap { padding: 0 14px; }
  .console { padding: 18px 14px; border-radius: var(--r-md); }
  .plot { height: 140px; }
  .live-num { font-size: 22px; }
  .post { flex-direction: column; }
  .post-thumb { width: 100%; height: 150px; }
  .article { padding: 20px 16px; }
  .kefu { right: 14px; bottom: 76px; }
  .kefu.share { bottom: 138px; }
  .gate-pair { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .gate-and { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .plot .line-slow, .plot .line-fast { stroke-dashoffset: 0; }
  .plot .fill-fast { opacity: 1; }
}

/* ---------- 兼容层：现有 JS 直接切换的类名，必须放在最后 ---------- */

.hidden { display: none !important; }
.flex { display: flex; }
.bg-primary { background: var(--fast); }
.bg-gradient-blue { background: var(--fast); }
.bg-secondary { background: var(--good); }
.bg-danger { background: var(--danger); }
.text-danger { color: var(--danger); }
