/* ==================================================================
   然然福体研究院 · 开奖数据中心
   绿色主题 + 卡片式布局
   ================================================================== */

:root {
  --green: #07c160; --green-dark: #05a14e; --green-light: #e9f7ef;
  --orange: #f59a23; --orange-light: #fef4e6;
  --red: #e64340; --red-light: #fef1f0;
  --blue: #3aa2eb; --blue-light: #eef7fd;
  --purple: #8b5cf6;
  --border: #e6e6e6; --text-sub: #999; --text: #1a1a1a;
  --bg: #f5f6f7; --card: #fff;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,.05);
  --maxw: 1080px;
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--text); min-height: 100vh;
  font-size: 14px; line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ================= 顶部品牌栏（广告位） ================= */
.topbar {
  background: linear-gradient(135deg, #07c160, #05a14e);
  color: #fff; padding: 26px 28px 22px;
}
.topbar-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.topbar-brand {
  display: flex; align-items: center; gap: 16px; min-width: 0;
}
.topbar-mark {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.topbar-text h1 { font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.topbar-text p { font-size: 13px; opacity: .9; margin-top: 4px; }

/* 顶部中间焦点区：推荐 + 箭头 + 二维码 成组展示 */
.topbar-focus {
  display: flex; align-items: center; gap: 14px; margin: 0 auto;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px; padding: 10px 20px 10px 12px;
  box-shadow: 0 6px 22px rgba(0,0,0,.18);
  backdrop-filter: blur(3px);
}
.topbar-promo {
  display: inline-block; white-space: nowrap;
  background: linear-gradient(135deg, #ffe27a, #ffb800);
  color: #5a3c00;
  border-radius: 999px; padding: 12px 30px;
  font-size: 22px; font-weight: 800; letter-spacing: 3px;
  text-decoration: none; text-overflow: ellipsis; overflow: hidden; max-width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.6);
}
.topbar-promo:hover { filter: brightness(1.06); }
.topbar-arrow {
  display: inline-flex; align-items: center; flex-shrink: 0; margin: 0 -4px;
  animation: arrowNudge 1.2s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
@keyframes arrowNudge {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -2px); }
}
.topbar-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.topbar .refresh {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.45);
  color: #fff; height: 38px; padding: 0 20px; border-radius: 19px;
  font-size: 14px; cursor: pointer; transition: .2s;
}
.topbar .refresh:hover { background: rgba(255,255,255,.3); }
.topbar .refresh:disabled { opacity: .6; cursor: default; }
.topbar-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.topbar-qr-card {
  background: #fff; padding: 6px; border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
.topbar-qr {
  width: 104px; height: 104px; border-radius: 9px; overflow: hidden;
  background: #fafafa;
}
.topbar-qr img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.topbar-qr.empty {
  background: #f2f2f2; border: 1px dashed #bbb;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #999; text-align: center; line-height: 1.5;
}
.topbar-qr-cap { font-size: 12px; color: rgba(255,255,255,.95); letter-spacing: 2px; }

/* ================= Tabs ================= */
.tabs {
  display: flex; background: #fff; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.tab {
  flex: 1; height: 48px; line-height: 48px; text-align: center;
  font-size: 15px; color: #666; cursor: pointer;
  border-bottom: 3px solid transparent; user-select: none;
  transition: .2s;
}
.tab.active { color: var(--green); font-weight: 600; border-bottom-color: var(--green); }
.tab .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); margin-left: 5px; vertical-align: middle;
}

/* ================= 内容区 ================= */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }

.card {
  background: var(--card); border-radius: var(--radius); padding: 18px 18px 12px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-title { font-size: 16px; font-weight: 600; }
.badge {
  font-size: 11px; padding: 3px 10px; border-radius: 10px;
}
.badge.ok { background: var(--green-light); color: var(--green); }
.badge.wait { background: #f2f2f2; color: #999; }
.badge.orange { background: var(--orange-light); color: var(--orange); }
.badge.red { background: var(--red-light); color: var(--red); }
.badge.blue { background: var(--blue-light); color: var(--blue); }

.latest {
  border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
}
.latest.ydniu { background: var(--green-light); }
.latest.pinble { background: var(--orange-light); }
.latest.official { background: var(--red-light); }
.latest .l-row { display: flex; justify-content: space-between; font-size: 12px; color: #888; }
.latest .l-nums { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0; }
.ball {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.18);
}
.ball.green { background: var(--green); }
.ball.orange { background: var(--orange); }
.ball.red { background: var(--red); }
.ball.blue { background: var(--blue); }
.ball.empty { background: #ccc; }
.l-num-label { font-size: 11px; color: #999; text-align: center; margin-top: 6px; }
.win-line { font-size: 12px; color: #777; text-align: center; margin-top: 8px; }

/* 历史表 */
.hist-title { font-size: 13px; color: var(--text-sub); margin: 6px 2px 8px; }
table.hist { width: 100%; border-collapse: collapse; font-size: 13px; }
table.hist th {
  text-align: center; font-weight: 500; color: var(--text-sub);
  padding: 6px 4px; border-bottom: 1px solid var(--border); font-size: 12px;
}
table.hist td { text-align: center; padding: 8px 4px; border-bottom: 1px solid #f5f5f5; }
table.hist td.period { font-weight: 600; }
table.hist td.date { color: var(--text-sub); font-size: 12px; }
.mini-ball {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600; margin: 0 2px;
}
.mini-ball.green { background: var(--green); }
.mini-ball.orange { background: var(--orange); }
.mini-ball.red { background: var(--red); }
.mini-ball.blue { background: var(--blue); }
.mini-ball.grey { background: #b3b3b3; }
table.hist tr:hover td { background: #fafafa; }
.empty-tip { text-align: center; color: #bbb; padding: 30px 0; font-size: 13px; }

/* 卡片底部 */
.card-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed #eee;
}
.mini-label { font-size: 11px; color: var(--text-sub); white-space: nowrap; }
.mini-series {
  font-size: 11px; color: #666; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.btn-trend {
  border: 1px solid var(--green); background: #fff; color: var(--green);
  height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12px;
  cursor: pointer; white-space: nowrap; transition: .2s;
}
.btn-trend:hover { background: var(--green-light); }

/* 页脚 */
.footnote { text-align: center; color: #bbb; font-size: 11px; padding: 20px 0 30px; }

/* ================= 每日资料区 ================= */
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 600; margin: 10px 2px 14px;
}
.section-title::before { content: ''; width: 4px; height: 17px; border-radius: 2px; background: var(--green); }
.article-list { display: grid; gap: 14px; }
.article-card {
  background: #fff; border-radius: var(--radius); padding: 20px 22px 16px;
  box-shadow: var(--shadow); cursor: pointer; transition: .2s;
  border-left: 4px solid var(--green);
}
.article-card:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(0,0,0,.09); }
.article-card h4 { font-size: 16.5px; font-weight: 700; }
.article-card h4 .pin-flag { font-size: 11px; color: var(--green); border: 1px solid var(--green); border-radius: 4px; padding: 1px 6px; margin-left: 8px; font-weight: 500; vertical-align: 2px; }
.article-card .a-content { font-size: 14px; color: #666; margin-top: 8px; line-height: 1.7; white-space: pre-line; overflow: hidden; max-height: 110px; }
.article-card .a-imgs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.article-card .a-imgs img {
  width: 120px; height: 120px; object-fit: cover; border-radius: 10px;
  border: 1px solid #f0f0f0; flex-shrink: 0;
}
.article-card .a-imgs .more-flag {
  width: 120px; height: 120px; border-radius: 10px; background: #f5f6f7;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #999; flex-shrink: 0;
}
.article-card .meta { font-size: 12px; color: #aaa; margin-top: 12px; display: flex; gap: 10px; align-items: center; }
.article-card .meta .cat {
  background: var(--green-light); color: var(--green); border-radius: 4px;
  padding: 1px 8px; font-size: 11px;
}
.article-empty { color: #bbb; font-size: 13px; padding: 22px; text-align: center; }

/* 资料详情弹窗 */
.article-panel { max-width: 760px; }
.article-detail { padding: 20px 24px 26px; }
.article-detail-content { font-size: 15px; line-height: 1.9; color: #333; white-space: pre-line; word-break: break-word; }
.article-detail-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 18px; }
.article-detail-imgs img { width: 100%; border-radius: 10px; border: 1px solid #f0f0f0; }

/* ================= 走势图弹窗 ================= */
.trend-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.trend-panel {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 1120px;
  max-height: 92vh; display: flex; flex-direction: column; overflow: hidden;
}
.trend-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.trend-title { font-size: 16px; font-weight: 600; }
.trend-sub { font-size: 11px; color: var(--text-sub); margin-top: 3px; }
.trend-actions { display: flex; align-items: center; gap: 10px; }
.trend-close {
  border: 0; background: #f2f2f2; width: 30px; height: 30px;
  border-radius: 8px; cursor: pointer; font-size: 13px; color: #666;
}
.trend-close:hover { background: #e8e8e8; }
.trend-body { overflow: auto; padding: 0; flex: 1; }
.trend-body iframe { width: 100%; height: 100%; min-height: 70vh; border: 0; }

/* ================= 走势图独立页 ================= */
.trend-page-head {
  background: linear-gradient(135deg, #07c160, #05a14e); color: #fff; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.trend-page-head h1 { font-size: 18px; }
.trend-page-head .back {
  color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4);
  height: 32px; padding: 0 14px; border-radius: 16px; font-size: 13px;
}
.trend-page-head .back:hover { background: rgba(255,255,255,.3); }
.trend-toolbar {
  background: #fff; padding: 12px 16px; display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40;
}
.seg { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg span {
  padding: 6px 12px; font-size: 12px; color: #666; cursor: pointer;
  border-right: 1px solid var(--border); user-select: none; transition: .2s;
}
.seg span:last-child { border-right: 0; }
.seg span.on { background: var(--green); color: #fff; }
.seg span.dim { color: #ccc; cursor: not-allowed; }
.line-sw {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: #666; cursor: pointer; user-select: none; white-space: nowrap;
}
.line-sw input { accent-color: var(--green); margin: 0; cursor: pointer; }
.trend-page-body { padding: 16px; }

.tsec { margin-bottom: 22px; }
.tsec-title {
  font-size: 13px; font-weight: 600; color: #333; margin-bottom: 8px;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.tsec-title::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--green); }
.tsec-tip { font-size: 11px; color: #aaa; font-weight: 400; }

.twrap { overflow-x: auto; }
.tinner { position: relative; display: inline-block; }
.trend-lines { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; overflow: visible; }
table.trend { border-collapse: collapse; font-size: 11px; width: auto; position: relative; z-index: 1; }
table.trend th, table.trend td {
  border: 1px solid #f0f0f0; text-align: center;
  width: 24px; min-width: 24px; height: 24px; padding: 0;
}
table.trend th { background: #fafafa; color: #999; font-weight: 500; }
table.trend th.pos { background: #f3f9f5; color: var(--green); font-size: 11px; }
table.trend td.pd { color: #d5d5d5; font-size: 10px; }
table.trend td.m5 { color: var(--orange); }
table.trend td.m10 { color: var(--red); font-weight: 700; }
.hitdot {
  display: inline-flex; width: 18px; height: 18px; border-radius: 50%;
  align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 600; vertical-align: middle;
}
.hitdot.p1 { background: var(--green); }
.hitdot.p2 { background: var(--blue); }
.hitdot.p3 { background: var(--orange); }
table.trend td.period {
  background: #fafafa; color: #666; width: 48px; min-width: 48px; font-weight: 600;
}
table.trend td.sum, table.trend td.span { width: 32px; min-width: 32px; color: #555; font-weight: 600; }
table.trend tr.miss-row td { background: #fffaf3; color: #c98a2e; font-weight: 600; }
table.trend tr.stat-row td { background: #f8f8f8; color: #999; }
table.trend tbody tr:hover td { background: rgba(7,193,96,.06); }
table.trend tbody tr.miss-row:hover td { background: #fff5e8; }

.chart-box {
  border: 1px solid #f0f0f0; border-radius: 8px; padding: 8px;
  overflow-x: auto; background: #fff;
}
/* SVG 曲线图自适应：有 viewBox 时按容器宽度等比缩放 */
.chart-box svg { max-width: 100%; height: auto; display: block; }

/* 手机端：定位走势按位置拆分的小节 */
.tsec-block { margin-bottom: 16px; }
.tsec-block:last-child { margin-bottom: 0; }
.tsec-block h5 {
  font-size: 12.5px; font-weight: 600; color: var(--green);
  margin: 0 0 6px; display: flex; align-items: center; gap: 6px;
}
.tsec-block h5::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--green); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.stat-card { border: 1px solid #f0f0f0; border-radius: 8px; padding: 10px 12px; }
.stat-card h4 { font-size: 12px; color: #666; font-weight: 600; margin-bottom: 8px; }
.stat-note { font-size: 11px; color: #aaa; margin-top: 6px; line-height: 1.6; }
.bar-row { display: flex; align-items: center; gap: 6px; font-size: 11px; margin-bottom: 4px; color: #777; }
.bar-row .bl { width: 56px; color: #888; }
.bar-row .bt { flex: 1; height: 9px; background: #f4f4f4; border-radius: 5px; overflow: hidden; }
.bar-row .bf { height: 100%; border-radius: 5px; background: var(--green); }
.bar-row .bf.o { background: var(--orange); }
.bar-row .bf.r { background: var(--red); }
.bar-row .bf.b { background: var(--blue); }
.bar-row .bv { width: 44px; text-align: right; color: #666; font-variant-numeric: tabular-nums; }
table.mini-stats { width: 100%; font-size: 11px; }
table.mini-stats th { padding: 4px 2px; font-size: 11px; }
table.mini-stats td { padding: 4px 2px; border-bottom: 1px solid #f6f6f6; }
table.mini-stats td.hot { color: var(--red); font-weight: 600; }
.trend-empty { text-align: center; color: #bbb; font-size: 12px; padding: 30px 0; }

/* ================= 后台登录页 ================= */
.admin-login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0f9f4 0%, #e9f7ef 100%);
  padding: 20px;
}
.admin-login-card {
  background: #fff; border-radius: 16px; padding: 34px 30px 28px;
  width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(7,193,96,.12);
}
.admin-login-card .brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px;
}
.admin-login-card .brand-mark {
  width: 44px; height: 44px; border-radius: 50%; background: var(--green);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 700;
}
.admin-login-card h2 { font-size: 18px; }
.admin-login-card p { font-size: 12px; color: #999; margin-top: 4px; }
.admin-field {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 0 12px;
  margin-bottom: 12px; height: 46px; transition: .2s;
}
.admin-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.admin-field svg { width: 20px; height: 20px; fill: #bbb; flex-shrink: 0; }
.admin-field input { flex: 1; border: 0; outline: 0; font-size: 14px; background: transparent; }
.admin-err { color: var(--red); font-size: 12px; min-height: 18px; margin-bottom: 8px; }
.btn-primary {
  width: 100%; height: 44px; border-radius: 22px; background: var(--green); color: #fff;
  font-size: 15px; font-weight: 600; transition: .2s;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }

/* ================= 后台仪表盘 ================= */
.admin-app { min-height: 100vh; }
.admin-header {
  background: linear-gradient(135deg, #07c160, #05a14e); color: #fff;
  padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
}
.admin-header h1 { font-size: 17px; }
.admin-header .logout {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4);
  color: #fff; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 12px;
}
.admin-header .logout:hover { background: rgba(255,255,255,.3); }
.admin-tabs {
  display: flex; background: #fff; border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.admin-tab {
  padding: 12px 18px; font-size: 13px; color: #666; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.admin-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.admin-body { padding: 16px; max-width: var(--maxw); margin: 0 auto; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-card {
  background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.admin-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.admin-card h3::before { content: ''; width: 3px; height: 14px; background: var(--green); border-radius: 2px; }
.admin-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.admin-row label { font-size: 13px; color: #666; }
.admin-row input, .admin-row textarea, .admin-row select {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: 0;
}
.admin-row input:focus, .admin-row textarea:focus, .admin-row select:focus { border-color: var(--green); }
.admin-row textarea { width: 100%; min-height: 90px; resize: vertical; }
.admin-btn {
  background: var(--green); color: #fff; height: 34px; padding: 0 16px;
  border-radius: 17px; font-size: 13px; transition: .2s;
}
.admin-btn:hover { background: var(--green-dark); }
.admin-btn.ghost { background: #fff; color: var(--green); border: 1px solid var(--green); }
.admin-btn.ghost:hover { background: var(--green-light); }
.admin-btn.red { background: var(--red); }
.admin-btn.red:hover { background: #c0392b; }
.admin-tip { font-size: 12px; color: #999; margin-top: 6px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); color: #999; font-weight: 500; background: #fafafa; }
.admin-table td { padding: 8px; border-bottom: 1px solid #f5f5f5; }
.admin-table tr:hover td { background: #fafafa; }
.admin-table .nums { font-weight: 600; color: var(--green); }
.admin-table .actions { display: flex; gap: 6px; }
.admin-table .actions button { font-size: 12px; color: var(--green); }
.admin-table .actions button.red { color: var(--red); }

.qr-preview {
  width: 100px; height: 100px; border-radius: 8px; border: 1px solid var(--border);
  overflow: hidden; margin-top: 8px;
}
.qr-preview img { width: 100%; height: 100%; object-fit: cover; }

/* 资料配图上传网格 */
.art-img-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.art-img-grid .art-img-cell {
  position: relative; width: 100px; height: 100px; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--border); flex-shrink: 0;
}
.art-img-grid .art-img-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-img-grid .art-img-cell .rm {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; border: 0;
}
.art-img-grid .art-img-cell .rm:hover { background: var(--red); }
.art-upload-tip { font-size: 12px; color: #aaa; margin-top: 6px; }

/* 资料列表开关按钮（置顶/公开） */
.tg-btn {
  border: 1px solid var(--border); background: #f5f5f5; color: #999;
  border-radius: 12px; padding: 3px 12px; font-size: 12px; cursor: pointer;
  transition: .2s; white-space: nowrap;
}
.tg-btn:hover { border-color: #bbb; }
.tg-btn.pin.on { background: var(--green-light); color: var(--green); border-color: var(--green); font-weight: 600; }
.tg-btn.pub.on { background: var(--blue-light); color: var(--blue); border-color: var(--blue); font-weight: 600; }
.tg-btn:not(.on) { opacity: .75; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 13px; z-index: 200; opacity: 0; pointer-events: none; transition: .3s;
}
.toast.show { opacity: 1; }

/* ================= 响应式 ================= */
@media (max-width: 640px) {
  .topbar { padding: 16px 14px 14px; }
  .topbar-inner { flex-wrap: wrap; gap: 12px; }
  .topbar-text h1 { font-size: 19px; }
  .topbar-text p { font-size: 11px; }
  .topbar-mark { width: 42px; height: 42px; font-size: 19px; }
  .topbar-brand { flex: 1; min-width: 0; }
  .topbar-focus { order: 3; width: 100%; margin: 4px 0 0; gap: 8px; padding: 10px 10px; justify-content: center; }
  .topbar-promo { font-size: 18px; padding: 10px 22px; letter-spacing: 2px; }
  .topbar-arrow svg { width: 44px; height: 24px; }
  .topbar-qr { width: 88px; height: 88px; }
  .topbar-qr-card { padding: 5px; border-radius: 12px; }
  .topbar-qr-cap { font-size: 11px; }
  .topbar .refresh { height: 32px; padding: 0 13px; font-size: 12.5px; }
  .topbar-actions { flex-shrink: 0; }

  .tab { font-size: 14px; height: 44px; line-height: 44px; }
  .wrap { padding: 12px; }
  .cards { gap: 12px; }
  .card { padding: 14px; border-radius: 10px; }
  .card-title { font-size: 15px; }
  .ball { width: 40px; height: 40px; font-size: 19px; }
  .mini-ball { width: 20px; height: 20px; font-size: 11px; margin: 0 1px; }
  table.hist { font-size: 12px; }
  table.hist th { font-size: 11px; padding: 5px 2px; }
  table.hist td { padding: 7px 2px; }

  .trend-mask { padding: 0; align-items: stretch; }
  .trend-panel { max-width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
  .trend-head { padding: 10px 12px; position: relative; }
  .trend-title { font-size: 15px; }
  .trend-actions { gap: 8px; width: 100%; justify-content: space-between; }
  .trend-close { position: absolute; top: 8px; right: 8px; }
  .trend-body iframe { min-height: 100vh; }

  .trend-page-head { padding: 12px 14px; }
  .trend-page-head h1 { font-size: 16px; }
  .trend-toolbar { padding: 10px; }
  .seg span { padding: 5px 9px; font-size: 11.5px; }

  .admin-login-card { padding: 24px 20px; }
  .admin-header { padding: 12px 14px; }
  .admin-body { padding: 12px; }

  .article-card { padding: 16px 16px 13px; }
  .article-card h4 { font-size: 15.5px; }
  .article-card .a-content { font-size: 13.5px; max-height: 84px; }
  .article-card .a-imgs img, .article-card .a-imgs .more-flag { width: 96px; height: 96px; }
  .article-detail { padding: 16px 16px 22px; }
  .article-panel { max-width: 100%; max-height: 96vh; }

  .art-img-grid img, .art-img-grid .art-img-cell { width: 88px; height: 88px; }
}
