/* ==========================================================================
   澳门开机号 · 手机端前台样式（mobile.css）· 黑金版
   --------------------------------------------------------------------------
   版式来源：m01.pnbo888.net 手机模板
     /public/css/layout_lightblue/public.css
     /public/css/layout_lightblue/home.css
     /public/css/layout_lightblue/banner.css

   ▍版式一律不动：rem 方案、卡片圆角、间距、球径、按钮胶囊、栅格断点
     全部沿用模板原值（unit → rem，375px 视口下 1rem = 100px）。

   ▍只换配色：模板的「浅蓝白 + #C42017 红」换成站点的「夜蓝黑 + 金」。
     调色板集中在下面的 :root 里，以后想再换主题改这一段就行。

   模板原值 → 黑金映射一览
     #efeff4 页面底      → #0b101a（带金色光晕）
     #fff    卡片        → linear-gradient(180deg,#202b3f,#26334a)
     #f0f0f0 卡片描边    → rgba(217,164,65,.18) 金线
     #C42017 主色/标题   → #ecc96a 金（次要文字 #a7b4c8）
     白底描边球          → 实心径向渐变球（红/蓝/绿/金）
     白底红边按钮        → 金色描边胶囊 / 实心金胶囊
   ========================================================================== */

/* ---------- 基础重置（取自 public.css） ---------- */
body, dd, div, dl, dt, fieldset, form, h1, h2, h3, h4, h5, h6, img, input, li, ol, p, pre, td, textarea, th, ul {
  padding: 0; margin: 0;
}
* { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { border: 0; }
table { border-collapse: collapse; }
button, input, textarea { font-family: inherit; }

/* ==========================================================================
   调色板
   ========================================================================== */
:root {
  --app-w: min(100vw, 430px);

  --gold: #d9a441;
  --gold-soft: #ecc96a;
  --gold-deep: #b8862c;
  --gold-glow: rgba(217, 164, 65, .35);

  --red: #c0392b;
  --red-soft: #ffb3a8;

  --green: #1ab246;
  --green-soft: #7ee0a0;
  --green-deep: #0e7a30;

  --night: #131a26;
  --night-2: #1b2436;
  --page: #0b101a;
  --panel: #202b3f;
  --panel-2: #26334a;

  --ink: #eef2f8;
  --ink-dim: #a7b4c8;
  --ink-faint: #5d6b82;

  --line: rgba(217, 164, 65, .18);
  --line-soft: rgba(238, 242, 248, .08);
}

/* ---------- rem 基准（模板原方案，1rem = 视口宽的 26.66667%） ---------- */
html { font-size: calc(var(--app-w) * 0.2666667); }
@media screen and (max-width: 320px) { html { font-size: 85.33px; } }

body {
  font-family: "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  /* ⚠ html 上的 26.66667vw 只是 rem 换算基准（375px 视口下 1rem = 100px），
     不能被正文继承。不在这里重置的话，body 的 font-size 会变成 104px，
     任何 inline / inline-flex 元素都会撑出一个上百像素高的行框 ——
     之前开机号卡片无端多出 96px 空白就是这个原因。 */
  font-size: .14rem;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(ellipse 60vw 40vh at 50% -5%, rgba(217, 164, 65, .10) 0%, transparent 65%),
    linear-gradient(160deg, #0d1320 0%, #131a26 45%, #0b101a 100%);
  background-attachment: fixed;
  /* ⚠ 这里**绝对不能**加 transform / filter / will-change:transform / perspective / contain。
     只要 body 上有一个，body 就会变成所有 position:fixed 后代的「包含块」，
     于是 #modal 的 inset:0 不再是「铺满视口」，而是「铺满整个文档」——
     弹窗会被定位到页面最底部，用户点完按钮要往下滚几百像素才能看到内容。
     2026-10-16 踩过这个坑：原来这里写着 translateZ(0)，就是这个原因。
     GPU 加速的那点收益挪到 .pagediv 上了（#modal 是它的兄弟节点，不受影响）。 */
}
/* 手机列：PC 上收成一条居中窄列，两侧留深色底 */
.bodybox {
  width: var(--app-w);
  margin: 0 auto;
  min-height: 6.67rem;
  background: linear-gradient(180deg, #101725 0%, #131a26 40%, #0b101a 100%);
  overflow: auto;
  height: auto;
  box-shadow: 0 0 .3rem rgba(0, 0, 0, .55), 0 0 0 1px rgba(217, 164, 65, .10);
}
/* 金纹点阵背景装饰 */
.bodybox::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: radial-gradient(rgba(217, 164, 65, .07) 1px, transparent 1px);
  background-size: .26rem .26rem;
}
/* 内容层。translateZ(0) 是原来挂在 body 上的 GPU 加速提示，
   挪到这里是因为它会让元素成为 fixed 后代的包含块 ——
   而 #modal 是 .pagediv 的兄弟节点，放这儿动不到弹窗。
   （.bodybox::before 那个 fixed 点阵装饰在 .pagediv 里面，
     改成相对 .pagediv 定位，视觉上一样。） */
.pagediv {
  min-height: 6.67rem;
  position: relative;
  z-index: 1;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ==========================================================================
   1. 顶部栏（模板 .headbox）
   ========================================================================== */
.bodybox .headbox {
  width: 100%;
  height: .64rem;
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--night-2) 100%);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
.bodybox .headbox #logodiv188 { flex: 1; padding-left: .14rem; display: flex; align-items: center; min-width: 0; }
.bodybox .headbox .logo-text {
  font-size: .19rem;
  font-weight: bold;
  letter-spacing: .01rem;
  background: linear-gradient(180deg, #fff8e6 0%, var(--gold-soft) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px .06rem var(--gold-glow));
}
.bodybox .headbox .logo-text em {
  font-style: normal;
  display: block;
  font-size: .1rem;
  font-weight: normal;
  color: var(--ink-faint);
  letter-spacing: .004rem;
  margin-top: .015rem;
  -webkit-text-fill-color: var(--ink-faint);
}
#menubtn { flex-shrink: 0; padding-right: .12rem; }
.header-table { border-collapse: collapse; }
.header-table td { padding: 0; }
.ht-top { vertical-align: middle; }
.ht-top td { padding: 0 0 0 .11rem; }
.ht-top span {
  font-size: .11rem;
  color: var(--ink-dim);
  white-space: nowrap;
}
.ht-top span:active { color: var(--gold-soft); }

/* ==========================================================================
   2.5 数据兜底提示条（主站连不上、走本地缓存时显示）
   ========================================================================== */
.stale-bar {
  display: flex;
  align-items: center;
  gap: .06rem;
  padding: .08rem .13rem;
  font-size: .115rem;
  line-height: 1.5;
  color: #ffd98a;
  background: rgba(217, 164, 65, .14);
  border-bottom: 1px solid var(--line);
  border-left: .03rem solid var(--gold);
}
.stale-bar::before {
  content: "⚠";
  flex-shrink: 0;
  font-size: .13rem;
  color: var(--gold-soft);
}
.stale-bar .stale-text { flex: 1; }
.stale-bar .stale-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--gold-soft);
  font-size: .19rem;
  line-height: 1;
  padding: 0 .02rem;
  cursor: pointer;
  opacity: .7;
}
.stale-bar .stale-close:active { opacity: 1; }

/* ==========================================================================
   3. 横幅（模板 .bannerbox；原站 4 图轮播 → 本站金色标题栏）
   ========================================================================== */
.bodybox .bannerbox {
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(217, 164, 65, .20), rgba(0, 0, 0, 0) 55%),
    linear-gradient(180deg, var(--panel) 0%, var(--night-2) 100%);
  padding: .16rem .14rem .18rem;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.bodybox .bannerbox::after {
  content: "";
  position: absolute;
  right: -.2rem; top: -.36rem;
  width: 1.2rem; height: 1.2rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 164, 65, .18), transparent 65%);
  pointer-events: none;
}
.banner-title {
  font-size: .2rem;
  font-weight: bold;
  letter-spacing: .02rem;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #fff8e6 0%, var(--gold-soft) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px .1rem var(--gold-glow));
}
.banner-sub {
  font-size: .115rem;
  color: var(--ink-dim);
  margin-top: .06rem;
  letter-spacing: .01rem;
  position: relative;
  z-index: 1;
}
.banner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .06rem;
  margin-top: .12rem;
  position: relative;
  z-index: 1;
}
.banner-tag {
  font-size: .11rem;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .03rem .11rem;
  background: rgba(217, 164, 65, .07);
}
.banner-tag b {
  font-weight: bold;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

/* 强制刷新按钮：和 banner-tag 同款圆角胶囊，强调「可点」 */
.banner-refresh {
  font-family: inherit;
  font-size: .11rem;
  line-height: 1.4;
  color: var(--gold-soft);
  border: 1px solid rgba(217, 164, 65, .38);
  border-radius: 1rem;
  padding: .03rem .11rem;
  background: rgba(217, 164, 65, .13);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s, border-color .18s, color .18s, transform .1s;
}
.banner-refresh:hover { background: rgba(217, 164, 65, .22); border-color: rgba(217, 164, 65, .58); }
.banner-refresh:active { transform: scale(.95); }
.banner-refresh:disabled { cursor: default; }

/* 刷新中：压暗 + 呼吸，避免用户以为没点上 */
.banner-refresh.is-busy {
  color: var(--ink-faint);
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, .04);
  animation: kjh-refresh-pulse .9s ease-in-out infinite;
}
@keyframes kjh-refresh-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* 成功 / 失败：短促变色后自动恢复，不用弹窗打断 */
.banner-refresh.is-done {
  color: var(--green-soft);
  border-color: rgba(26, 178, 70, .5);
  background: rgba(26, 178, 70, .16);
}
.banner-refresh.is-fail {
  color: var(--red-soft);
  border-color: rgba(192, 57, 43, .55);
  background: rgba(192, 57, 43, .18);
}
@media (prefers-reduced-motion: reduce) {
  .banner-refresh { transition: none; }
  .banner-refresh.is-busy { animation: none; }
}

/* ==========================================================================
   4. 公告条（模板 .bodybox .notice）
   ========================================================================== */
.bodybox .notice {
  width: 100%;
  min-height: .36rem;
  position: relative;
  padding: .08rem .1rem .08rem .3rem;
  background: rgba(217, 164, 65, .06);
  border-bottom: 1px solid var(--line-soft);
  border-left: .03rem solid var(--gold);
  display: flex;
  align-items: flex-start;
  gap: .06rem;
}
.bodybox .notice::before {
  content: "";
  display: inline-block;
  width: .08rem;
  height: .08rem;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 .08rem var(--gold-soft);
  position: absolute;
  top: .15rem;
  left: .13rem;
}
.notice-wrapper { flex: 1; min-width: 0; }
.notice-title {
  font-size: .115rem;
  font-weight: bold;
  color: var(--gold-soft);
  letter-spacing: .005rem;
  line-height: 1.5;
}
#noticeT {
  color: var(--ink-dim);
  display: block;
  font-size: .115rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.notice-close {
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--ink-faint);
  font-size: .18rem;
  line-height: 1;
  padding: 0 .02rem;
  cursor: pointer;
}
.notice-close:active { color: var(--gold); }

/* ==========================================================================
   5. 彩种列表（模板 .info_box-lottery-list —— 间距与圆角原样保留）
   ========================================================================== */
.info_box-lottery-list {
  background: transparent;
  padding: .1rem .12rem;
  margin-top: 0;
  box-sizing: border-box;
}
.lottery-list { padding: 0; margin: 0; }

/* ---------- 澳门开机号卡片（样式在 .lottery-card 之后定义，见下方） ---------- */
/* 带 #3d / #pl3 锚点进来时，定位到的卡片闪一下 */
.lottery-card.is-flash { animation: cardFlash 1.6s ease both; }
@keyframes cardFlash {
  0%, 100% { box-shadow: 0 .12rem .3rem rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05); }
  35%      { box-shadow: 0 0 .3rem var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, .05); }
}

.lottery-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border-radius: .1rem;
  margin-bottom: .1rem;
  padding: .14rem .14rem .12rem;
  border: 1px solid var(--line-soft);
  box-shadow: 0 .12rem .3rem rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  box-sizing: border-box;
  transition: border-color .22s, box-shadow .22s;
  animation: cardIn .32s ease both;
}
/* 顶部金线（原来的招牌元素，保留） */
.lottery-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: .03rem;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft), var(--gold));
  opacity: .85;
}
/* 右上角金色光晕 */
.lottery-card::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 1.6rem; height: .8rem;
  background: radial-gradient(closest-side, rgba(217, 164, 65, .10), transparent);
  pointer-events: none;
}
.lottery-card:active { border-color: var(--line); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(.1rem); }
  to   { opacity: 1; transform: translateY(0); }
}
.lottery-card:last-child { margin-bottom: 0; }

/* 带 #3d / #pl3 锚点进来时，定位到的卡片闪一下 */
.lottery-card.is-flash { animation: cardFlash 1.6s ease both; }
@keyframes cardFlash {
  0%, 100% { box-shadow: 0 .12rem .3rem rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05); }
  35%      { box-shadow: 0 0 .3rem var(--gold-glow), inset 0 1px 0 rgba(255, 255, 255, .05); }
}

.lottery-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .1rem;
  padding: 0 .02rem;
  font-weight: bold;
  font-size: .14rem;
  font-family: "Microsoft JhengHei", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.lottery-card-header .lottery-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: .1rem;
  padding-left: .11rem;
  text-align: left;
  color: var(--gold-soft);
  position: relative;
}
/* 标题前的小金条 */
.lottery-card-header .lottery-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: .04rem; height: .15rem;
  border-radius: .03rem;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
}
.lottery-card-header .lottery-date {
  flex-shrink: 0;
  font-size: .13rem;
  text-align: right;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
/* 澳门开机号专属：期号后面跟一个金色小标签 */
.lottery-note {
  display: inline-block;
  margin-left: .05rem;
  padding: 0 .06rem;
  border-radius: .06rem;
  font-size: .1rem;
  font-weight: bold;
  color: #201403;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  vertical-align: middle;
  box-shadow: 0 .01rem .04rem var(--gold-glow);
}

.lottery-card-balls {
  text-align: left;
  padding: .08rem .02rem;
  min-height: .44rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.lottery-card-balls .result_num {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  align-content: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: .06rem;
}
.lottery-card-balls .result_num li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  height: auto;
  width: .34rem;
  min-width: .34rem;
  line-height: normal;
  font-size: .14rem;
  font-weight: 600;
  flex-shrink: 0;
}
.lottery-card-balls .result_num li i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: .34rem;
  height: .34rem;
  min-width: .34rem;
  min-height: .34rem;
  border-radius: 50%;
  font-size: .15rem;
  font-weight: bold;
  font-family: "Microsoft JhengHei", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-style: normal;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  color: #fff;
  border: none;
  box-shadow: inset 0 -.03rem 0 rgba(0, 0, 0, .22), 0 .04rem .1rem rgba(0, 0, 0, .35);
}
/* 球面高光 */
.lottery-card-balls .result_num li i::after {
  content: "";
  position: absolute;
  top: .05rem; left: .07rem;
  width: .1rem; height: .05rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: rotate(-20deg);
  pointer-events: none;
}
.lottery-card-balls .result_num .blue > i  { background: radial-gradient(circle at 32% 28%, #7cc4ff, #2a6fd6 60%, #12418c); }
.lottery-card-balls .result_num .red > i   { background: radial-gradient(circle at 32% 28%, #ff8a80, var(--red) 60%, #7d120c); }
.lottery-card-balls .result_num .green > i { background: radial-gradient(circle at 32% 28%, #8ce8a0, #2ea65a 60%, #126232); }
.lottery-card-balls .result_num .gold > i  { background: radial-gradient(circle at 32% 28%, #ffe3a0, var(--gold) 60%, #8a6417); color: #201403; }

.lottery-card-balls .result_num .add { width: .16rem; min-width: .16rem; align-self: center; }
.lottery-card-balls .result_num .add > i {
  width: .16rem; min-width: .16rem; height: .34rem; min-height: .34rem;
  border: none; background: transparent; box-shadow: none; color: var(--ink-dim);
  font-size: .18rem; line-height: .34rem;
}
.lottery-card-balls .result_num .add > i::after { display: none; }
.lottery-card-balls .result_num .add i::before { content: "+"; }
.lottery-card-balls .result_num li p {
  display: block;
  width: .34rem;
  font-size: .09rem;
  font-weight: normal;
  color: var(--ink-dim);
  margin: .03rem 0 0;
  line-height: 1.1;
  white-space: nowrap;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 快乐8：10 列网格 */
.lottery-card-balls .result_num.bgbg13 {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: .05rem .04rem;
  max-width: 100%;
}
.lottery-card-balls .result_num.bgbg13 li { flex: unset; width: 100%; min-width: 0; max-width: none; margin: 0; }
.lottery-card-balls .result_num.bgbg13 li i { width: 100%; height: auto; aspect-ratio: 1; min-width: 0; min-height: 0; font-size: .13rem; }
/* 双色球 / 七乐彩 / 大乐透：一行不换行 */
.lottery-card-balls .result_num.ssq-result,
.lottery-card-balls .result_num.qlc-result,
.lottery-card-balls .result_num.dlt-result { flex-wrap: nowrap; justify-content: flex-start; gap: .05rem; }
.lottery-card-balls .result_num.ssq-result li,
.lottery-card-balls .result_num.qlc-result li,
.lottery-card-balls .result_num.dlt-result li { width: .34rem; min-width: .34rem; flex-shrink: 0; }
.lottery-card-balls .result_num.ssq-result li.red.ssq-ball + li.blue.ssq-ball,
.lottery-card-balls .result_num.qlc-result li.red.ssq-ball + li.blue.ssq-ball,
.lottery-card-balls .result_num.dlt-result li.red.ssq-ball + li.blue.ssq-ball { margin-left: .06rem; }
.lottery-card-balls .result_num.ssq-result li.ssq-ball i,
.lottery-card-balls .result_num.qlc-result li.ssq-ball i,
.lottery-card-balls .result_num.dlt-result li.ssq-ball i {
  width: .34rem; height: .34rem; min-width: .34rem; min-height: .34rem; font-size: .15rem;
}
/* 开奖号里的红蓝球按原模板也是描边球，这里统一改成实心渐变 */

/* 待开 / 维护 / 空态 */
.lottery-card-balls--empty {
  font-size: .12rem;
  color: var(--ink-dim);
  padding: .1rem .02rem;
  min-height: .44rem;
  display: flex;
  align-items: center;
}
.lottery-empty {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border-radius: .1rem;
  padding: .4rem .22rem;
  text-align: center;
  color: var(--ink-dim);
  font-size: .13rem;
  line-height: 1.9;
  border: 1px dashed var(--line);
}
.lottery-empty b { display: block; color: var(--gold-soft); font-size: .15rem; margin-bottom: .08rem; letter-spacing: .005rem; }
.lottery-empty .lottery-empty__tip { display: block; white-space: pre-wrap; font-size: .12rem; color: var(--ink-dim); }
.lottery-loading {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border-radius: .1rem;
  padding: .5rem .2rem;
  text-align: center;
  color: var(--ink-dim);
  font-size: .13rem;
  border: 1px solid var(--line-soft);
}
.lottery-spinner {
  display: inline-block;
  width: .3rem; height: .3rem;
  border: .03rem solid rgba(217, 164, 65, .25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
  margin-right: .06rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   6. 卡片按钮（模板 .lottery-card-btns —— 尺寸/胶囊/间距原样）
   ========================================================================== */
.lottery-card-btns {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: .08rem;
  margin-top: .12rem;
  padding: .1rem .02rem .02rem;
  border-top: 1px solid var(--line-soft);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.lottery-card-btns .lottery-btn {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: .12rem;
  border-radius: 1rem;
  padding: .06rem .04rem;
  white-space: nowrap;
  font-weight: bold;
  font-family: "Microsoft JhengHei", "PingFang SC", "Microsoft YaHei", sans-serif;
  box-sizing: border-box;
  line-height: 1.3;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
  /* 默认 = 金色描边胶囊 */
  color: var(--gold-soft);
  border: 1px solid var(--gold);
  background: rgba(217, 164, 65, .10);
}
.lottery-card-btns .lottery-btn:active,
.lottery-card-btns .lottery-btn:hover {
  background: var(--gold);
  color: #201403;
  box-shadow: 0 .04rem .14rem var(--gold-glow);
}
/* 历史类：红描边（对应原来的 .history-btn） */
.lottery-card-btns .lottery-btn.is-ghost {
  color: var(--red-soft);
  border-color: var(--red);
  background: rgba(192, 57, 43, .12);
}
.lottery-card-btns .lottery-btn.is-ghost:active,
.lottery-card-btns .lottery-btn.is-ghost:hover {
  background: var(--red);
  color: #fff;
  box-shadow: 0 .04rem .14rem rgba(192, 57, 43, .4);
}
/* 实心金：主入口按钮 */
.lottery-card-btns .lottery-btn.is-solid {
  color: #201403;
  border-color: transparent;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 .03rem .12rem var(--gold-glow);
}
.lottery-card-btns .lottery-btn.is-solid:active,
.lottery-card-btns .lottery-btn.is-solid:hover {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  color: #201403;
  box-shadow: 0 .05rem .18rem var(--gold-glow);
}

/* 绿色描边（历史记录类） */
.lottery-card-btns .lottery-btn.is-green {
  color: var(--green-soft);
  border-color: var(--green);
  background: rgba(26, 178, 70, .12);
}
.lottery-card-btns .lottery-btn.is-green:active,
.lottery-card-btns .lottery-btn.is-green:hover {
  background: var(--green);
  color: #fff;
  box-shadow: 0 .04rem .14rem rgba(26, 178, 70, .45);
}

/* 实心绿（开奖数据类） */
.lottery-card-btns .lottery-btn.is-solid-green {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, #2ecb60, var(--green));
  box-shadow: 0 .03rem .12rem rgba(26, 178, 70, .45);
}
.lottery-card-btns .lottery-btn.is-solid-green:active,
.lottery-card-btns .lottery-btn.is-solid-green:hover {
  background: linear-gradient(180deg, #2ecb60, var(--green-deep));
  color: #fff;
  box-shadow: 0 .05rem .18rem rgba(26, 178, 70, .55);
}

/* ==========================================================================
   7. 弹窗（底部抽屉，黑金配色）
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-body {
  position: relative;
  background: linear-gradient(180deg, var(--panel) 0%, var(--night-2) 100%);
  border: 1px solid var(--line);
  border-radius: .16rem .16rem 0 0;
  width: var(--app-w);
  /* 走势图整块约 700px 高，84vh 在 844px 视口下只有 646px 可用，进去还得再滚一下。
     给到 92 之后「点开即见」。
     ⚠ 用 dvh 而不是纯 vh：手机上 vh 是按「地址栏收起时」的最大高度算的，
     用 92vh 有可能比实际可见区还高，会把弹窗头部（含关闭按钮）顶出屏幕。
     dvh 是动态视口高度，地址栏收放都准。老浏览器拿上面的 84vh 兜底。 */
  max-height: 84vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -.04rem .3rem rgba(0, 0, 0, .6);
  animation: modalIn .24s ease both;
  overflow: hidden;
  align-self: flex-end;
  /* 全面屏底部的横条别压到内容 */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* 弹窗打开时锁住背后的页面，避免用户滑到一半弹窗还在、背后却滚走了 */
html.modal-open,
html.modal-open body { overflow: hidden; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(.4rem); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .16rem .16rem .12rem;
  border-bottom: 1px solid var(--line-soft);
  flex-shrink: 0;
  position: relative;
}
.modal-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: .02rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .6;
}
.modal-title {
  font-size: .16rem;
  font-weight: bold;
  letter-spacing: .005rem;
  color: var(--gold-soft);
}
.modal-close {
  border: 1px solid var(--line-soft);
  background: none;
  width: .3rem; height: .3rem;
  border-radius: 50%;
  font-size: .2rem;
  line-height: 1;
  color: var(--ink-dim);
  cursor: pointer;
}
.modal-close:active { color: #fff; border-color: var(--red); background: rgba(192, 57, 43, .25); }
.modal-content {
  /* 底部内边距从 .2rem 收窄到 .12rem：走势图 + 提示 + 保存链接刚好卡在
     视口边界上，省下这几个像素就不用再滚那一下了。 */
  padding: .12rem .16rem .12rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* 始终预留滚动条位置：走势图要按容器实际宽度画，滚动条忽有忽无会让
     量出来的宽度飘，图就被压扁了 */
  scrollbar-gutter: stable;
}
.history-item {
  padding: .12rem .04rem;
  border-bottom: 1px solid var(--line-soft);
  border-radius: .1rem;
}
.history-item:last-child { border-bottom: none; }
.history-item-head {
  display: flex;
  align-items: center;
  gap: .06rem;
  margin-bottom: .1rem;
}
.history-issue {
  font-size: .13rem;
  font-weight: bold;
  color: var(--gold-soft);
  background: rgba(217, 164, 65, .12);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .02rem .1rem;
}
.history-date {
  font-size: .11rem;
  color: var(--ink-dim);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.history-balls { display: flex; flex-wrap: wrap; gap: .05rem; }

/* 历史里的开机号小球（红渐变实心球，沿用原站开机号样式） */
.kjh-nums { display: flex; flex-wrap: wrap; gap: .05rem; }
.kjh-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: .3rem; height: .3rem;
  border-radius: 50%;
  color: #fff;
  font-size: .14rem;
  font-weight: bold;
  font-style: normal;
  position: relative;
  background: radial-gradient(circle at 32% 28%, #ff8a80, var(--red) 60%, #7d120c);
  box-shadow: inset 0 -.03rem 0 rgba(0, 0, 0, .22), 0 .02rem .06rem rgba(0, 0, 0, .35);
}
.kjh-num::after {
  content: "";
  position: absolute;
  top: .04rem; left: .06rem;
  width: .09rem; height: .05rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: rotate(-20deg);
}

/* 特开存档块 */
.kjh-special {
  margin-top: .14rem;
  padding: .12rem;
  border: 1px dashed var(--line);
  border-radius: .1rem;
  background: rgba(217, 164, 65, .06);
}
.kjh-special-title {
  display: inline-block;
  font-size: .13rem;
  font-weight: bold;
  color: #201403;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border-radius: .06rem;
  padding: .02rem .1rem;
  margin-bottom: .08rem;
  box-shadow: 0 .02rem .06rem var(--gold-glow);
}
.kjh-special-tip { font-size: .115rem; color: var(--ink-dim); line-height: 1.7; margin-bottom: .06rem; }
.kjh-special-row {
  display: flex;
  align-items: center;
  gap: .08rem;
  padding: .06rem 0;
  border-top: 1px solid var(--line-soft);
}
.kjh-special-row:first-of-type { border-top: none; }
.kjh-special-date {
  font-size: .115rem;
  color: var(--gold-soft);
  min-width: .8rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- 弹窗内的号码行（复用模板 result_num）---------- */
ul.result_num {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: .06rem;
}
ul.result_num > li {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: .3rem;
  min-width: .3rem;
  flex-shrink: 0;
  font-size: .13rem;
  font-weight: 600;
  line-height: normal;
}
ul.result_num > li > i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: .3rem; height: .3rem;
  min-width: .3rem; min-height: .3rem;
  border-radius: 50%;
  color: #fff;
  font-style: normal;
  font-size: .13rem;
  font-weight: bold;
  position: relative;
  box-shadow: inset 0 -.02rem 0 rgba(0, 0, 0, .22), 0 .02rem .06rem rgba(0, 0, 0, .3);
}
ul.result_num > li > i::after {
  content: "";
  position: absolute;
  top: .04rem; left: .06rem;
  width: .09rem; height: .05rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: rotate(-20deg);
}
ul.result_num > li.blue > i  { background: radial-gradient(circle at 32% 28%, #7cc4ff, #2a6fd6 60%, #12418c); }
ul.result_num > li.red > i   { background: radial-gradient(circle at 32% 28%, #ff8a80, var(--red) 60%, #7d120c); }
ul.result_num > li.green > i { background: radial-gradient(circle at 32% 28%, #8ce8a0, #2ea65a 60%, #126232); }
ul.result_num > li.gold > i  { background: radial-gradient(circle at 32% 28%, #ffe3a0, var(--gold) 60%, #8a6417); color: #201403; }

/* ==========================================================================
   8. 走势图 / 走势表（深色金）
   ========================================================================== */
.paper-trend {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* 画布比容器宽时从左边缘开始滑；用 center 的话滚动区两头都会被裁掉一段 */
  text-align: left;
  padding-bottom: .02rem;
}
/* ⚠ 这里**绝对不能**再写 max-width:100%：
   trend.js 现在按固定格子宽度绘制（手机 16px/格 → 画布约 520px），
   本来就比容器宽，靠 .paper-trend 横向滚动看 十位 / 个位。
   一旦把画布压回容器宽度（355px），格子会缩回 10.7px、数字重新糊成 8px ——
   这正是这次要修掉的问题。要限制宽度只能改 trend.js 里的 CELL 常量。 */
.paper-trend canvas { display: block; max-width: none; }

/* 走势图横向滑动提示 */
.trend-swipe-hint {
  font-size: .105rem;
  color: var(--ink-faint);
  text-align: center;
  padding: .07rem 0 .02rem;
  letter-spacing: .01rem;
}

/* 「保存为图片」（放在滚动容器外面，滑动时始终可见） */
.trend-download {
  text-align: center;
  padding: .12rem 0 .02rem;
}
.trend-download a {
  font-size: .115rem;
  color: var(--gold-soft);
  text-decoration: none;
  border-bottom: 1px dashed rgba(217, 164, 65, .45);
  padding-bottom: .01rem;
}
.trend-download a:active { color: var(--gold); }
.paper-trend-title {
  font-size: .14rem;
  font-weight: bold;
  color: var(--gold-soft);
  padding: .06rem 0 .04rem .1rem;
  margin-bottom: .06rem;
  border-left: .03rem solid var(--gold);
  text-align: left;
}
.trend-wrap { padding: .04rem 0; }
.trend-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.trend-table { border-collapse: collapse; font-size: .105rem; white-space: nowrap; color: var(--ink); }
.trend-table th, .trend-table td { border: 1px solid var(--line-soft); padding: .03rem .02rem; text-align: center; }
.trend-table .issue-col {
  position: sticky;
  left: 0;
  background: var(--night-2);
  font-weight: bold;
  min-width: .6rem;
  z-index: 1;
  color: var(--gold-soft);
}
.trend-table .group-label { background: rgba(217, 164, 65, .14); color: var(--gold-soft); font-weight: bold; }
.trend-table .num-head { background: var(--night-2); color: var(--ink-dim); font-weight: normal; min-width: .22rem; }
.trend-table .num-cell { min-width: .22rem; color: transparent; }
.trend-table .num-cell.hit-red { background: rgba(192, 57, 43, .5); color: #fff; font-weight: bold; }
.trend-table .num-cell.hit-blue { background: rgba(42, 111, 214, .5); color: #fff; font-weight: bold; }

/* 号码分布表是 30~49 列的矩阵，窄屏上天生放不下，只能横向滑动 ——
   给个提示，并把格子压紧一点，让一屏能多看几列 */
.trend-hint {
  display: none;
  text-align: center;
  font-size: .105rem;
  color: var(--ink-faint);
  padding: .08rem 0 0;
  letter-spacing: .01rem;
}
@media (max-width: 480px) {
  .trend-hint { display: block; }
  /* 原来窄屏把字压到 .095rem（≈9.9px），手机上偏小、数字容易看串。
     列宽是由 .num-cell 的 min-width 兜底的，所以字号提到 ~11px
     并不会把表撑宽 —— 属于纯收益。 */
  .trend-table { font-size: .105rem; }
  .trend-table th, .trend-table td { padding: .03rem .015rem; }
  .trend-table .num-head, .trend-table .num-cell { min-width: .19rem; }
  .trend-table .issue-col { min-width: .48rem; font-size: .105rem; }
}

/* ==========================================================================
   9. 页脚
   ========================================================================== */
.mfoot {
  padding: .24rem .16rem .3rem;
  text-align: center;
  color: var(--ink-faint);
  font-size: .11rem;
  line-height: 1.9;
  letter-spacing: .005rem;
  border-top: 1px solid var(--line-soft);
}
.mfoot b { color: var(--gold-deep); font-weight: bold; }
