
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
:root{--bg:#eef3fb;--card:#fff;--line:#d8dde7;--text:#14243d;--muted:#667085;--red:#ef4444;--blue:#2f80ed;--green:#22c55e;--gold:#f6c65b}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;color:var(--text);-webkit-text-size-adjust:100%;text-size-adjust:100%}img{max-width:100%;display:block}button{font-family:inherit}.page-shell{width:100%;max-width:430px;margin:0 auto;padding:0 10px 24px;overflow-x:hidden}
.site-hero__fixed{padding:10px 0}.site-hero__banner,.result-panel,.module-card,.result-ad-strip{border-radius:18px;overflow:hidden}.site-hero__banner{background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.08)}.site-hero__main img,.hero-placeholder{width:100%;aspect-ratio:760/200;object-fit:contain}.hero-placeholder{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#fff;font-size:28px;font-weight:700}
.site-notice{display:flex;gap:10px;align-items:center;background:#fff;padding:10px 12px;border-radius:14px;margin:12px 0;box-shadow:0 8px 24px rgba(15,23,42,.05)}.site-notice__marquee{overflow:hidden;white-space:nowrap;flex:1;position:relative}.site-notice__ticker{display:inline-block;white-space:nowrap;padding-left:100%;animation:notice-wheel 18s linear infinite;will-change:transform}.site-notice__ticker::after{content:"";display:inline-block;padding-right:64px}@keyframes notice-wheel{from{transform:translateX(0)}to{transform:translateX(-100%)}}

.result-panel{background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.06);padding:10px}.result-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;background:#f6f7f9;border:1px solid #cfd7e4;border-radius:14px;overflow:hidden}.result-tabs__item{cursor:pointer;border:none;border-right:1px solid #cfd7e4;background:transparent;padding:12px 6px;transition:.2s}.result-tabs__item:last-child{border-right:none}.result-tabs__item.is-active{background:linear-gradient(180deg,#22c55e,#17a34a);color:#fff}.result-tabs__name,.result-tabs__date{display:block;font-size:12px;font-weight:700}.result-tabs__name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.result-panel__body{margin-top:10px;padding:14px 16px;border-radius:0;overflow:hidden}.result-panel__issue-row{display:flex;gap:16px;flex-wrap:wrap;align-items:center;justify-content:space-between}.result-panel__issue{font-size:15px;font-weight:700;color:#111827}.result-panel__countdown{font-size:14px;color:#e53935;font-weight:700}.result-panel__history{cursor:pointer;border:none;background:transparent;color:#0b9d3e;font-weight:700;padding:0}.result-balls{display:flex;flex-wrap:wrap;align-items:flex-start;gap:14px;margin:18px 0 10px}.result-balls__item{text-align:center;min-width:58px}.lottery-ball{width:54px;height:54px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:20px;border:none;box-shadow:0 4px 10px rgba(0,0,0,.12)}.lottery-ball--red{background:var(--red)}.lottery-ball--blue{background:var(--blue)}.lottery-ball--green{background:var(--green)}.lottery-ball__number{color:#fff}.result-balls__label{margin-top:6px;font-size:13px}.result-balls__plus{font-size:34px;font-weight:800;line-height:54px;color:#b6bcc7}.result-panel__footer{color:#ef4444;font-size:13px;text-align:center;font-weight:700}.result-panel__reveal{font-size:13px;text-align:right;color:#0f766e;font-weight:700;margin-top:8px}

.result-ad-strip{display:grid;grid-template-columns:1fr 1fr;gap:10px;background:transparent;margin:14px 0}.result-ad-strip__item{background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 8px 24px rgba(15,23,42,.05)}.result-ad-strip__item img{width:100%;height:100px;object-fit:contain}

.module-card{background:#eef1f8;padding:10px 10px 14px;box-shadow:0 8px 24px rgba(15,23,42,.04);margin-bottom:14px;border:1px solid #d4dbe8}.module-header{position:relative;background:linear-gradient(180deg,#0c3a69,#092850);color:#f9d25e;border-radius:16px;padding:18px 20px;text-align:center;margin-bottom:10px;border:4px solid #ecd39b;overflow:hidden}.module-header::before,.module-header::after{content:"";position:absolute;top:6px;bottom:6px;width:120px;pointer-events:none;opacity:.9}.module-header::before{left:8px;background:radial-gradient(circle at 20px 20px,transparent 0 10px,#d9b46d 11px 13px,transparent 14px),radial-gradient(circle at 56px 12px,transparent 0 10px,#d9b46d 11px 13px,transparent 14px),linear-gradient(135deg,transparent 20%,#d9b46d 21% 23%,transparent 24% 100%),linear-gradient(180deg,transparent 38%,#d9b46d 39% 41%,transparent 42% 100%);background-repeat:no-repeat}.module-header::after{right:8px;transform:scaleX(-1);background:radial-gradient(circle at 20px 20px,transparent 0 10px,#d9b46d 11px 13px,transparent 14px),radial-gradient(circle at 56px 12px,transparent 0 10px,#d9b46d 11px 13px,transparent 14px),linear-gradient(135deg,transparent 20%,#d9b46d 21% 23%,transparent 24% 100%),linear-gradient(180deg,transparent 38%,#d9b46d 39% 41%,transparent 42% 100%);background-repeat:no-repeat}.module-header__title{position:relative;z-index:1;font-size:20px;font-weight:800;line-height:1.2}.module-header__subtitle{position:relative;z-index:1;font-size:12px;color:#fff7c7;margin-top:6px;font-weight:700}.module-card--poster .module-header__subtitle{display:block}

.poster-template{background:#f8f8f8;border-radius:14px;padding:8px}.poster-template__body{border-radius:14px;padding:6px}.poster-template__image-wrap{position:relative;width:100%;border-radius:10px;overflow:hidden;background:#fff;container-type:inline-size}.poster-template__image{display:block;width:100%;height:100%;object-fit:contain}.poster-template__placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#fff;font-size:18px;color:#64748b}.poster-template__overlay{position:absolute;inset:0}.poster-scene__slot{position:absolute;display:flex;overflow:visible}.poster-scene__slot-text{width:100%;height:100%;display:flex;line-height:1.02;white-space:pre-wrap;word-break:keep-all;overflow-wrap:normal;padding:0;box-sizing:border-box;-webkit-text-size-adjust:100%;text-size-adjust:100%}.poster-scene__slot-text > span{display:block;width:100%;font-size:calc(var(--slot-font-size,16) / var(--scene-width,630) * 100cqw);line-height:inherit;transform:translateZ(0)}
.poster-template--poster_1 .poster-template__body{border:4px solid #3347ff;box-shadow:inset 0 0 0 4px #17d755,inset 0 0 0 8px #ff4444}.poster-template--poster_2 .poster-template__body{border:5px solid #7a3aed;background:#fff5f5}.poster-template--poster_3 .poster-template__body{border:5px solid #eab308;background:#fff}.poster-template--poster_4 .poster-template__body{border:5px solid #0891b2;background:#f0fdfa}.poster-template--poster_5 .poster-template__body{border:5px solid #b7b7b7;background:#f8fafc}.poster-template--poster_6 .poster-template__body{border:5px solid #c2a46a;background:#fffef8}

.text-template{background:#efe9da;border-radius:14px;padding:10px}.text-template__list{display:grid;gap:6px}.text-entry{background:transparent}.text-entry__content{border:2px solid #3f3f46;border-radius:14px;padding:12px 14px;text-align:center;font-size:20px;line-height:1.7;background:#fff;color:#111}.text-entry--empty .text-entry__content{color:#64748b;font-size:16px}

.history-modal[hidden]{display:none}.history-modal{position:fixed;inset:0;z-index:99}.history-modal__mask{position:absolute;inset:0;background:rgba(15,23,42,.45)}.history-modal__dialog{position:relative;z-index:1;width:min(980px,96vw);max-height:80vh;overflow:auto;background:#fff;border-radius:18px;margin:4vh auto;padding:16px;box-shadow:0 20px 40px rgba(15,23,42,.2)}.history-modal__head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.history-modal__close{border:none;background:#eef2ff;color:#1d4ed8;border-radius:10px;padding:6px 12px;cursor:pointer}.history-row{padding:12px 0;border-bottom:1px solid var(--line)}.history-row__issue{font-weight:800;color:#74c69d}.history-row__meta{color:var(--muted);font-size:13px;margin-top:4px}.history-row__numbers{margin-top:8px;font-family:Consolas,monospace}.history-row__balls{display:flex;flex-wrap:nowrap;gap:8px;align-items:flex-start;overflow-x:auto;padding-bottom:6px}.history-row__balls .result-balls__item{min-width:62px;flex:0 0 62px}.history-row__balls .lottery-ball{width:54px;height:54px;font-size:18px}.history-row__balls .result-balls__label{font-size:12px;line-height:1.2;word-break:keep-all;white-space:nowrap}.history-row__balls .result-balls__plus{font-size:28px;line-height:54px;flex:0 0 18px}.history-empty{padding:20px 0;color:var(--muted);text-align:center}

@media (max-width:640px){.page-shell{padding:0 8px 24px}.result-tabs{grid-template-columns:repeat(4,1fr)}.result-tabs__name,.result-tabs__date{font-size:11px}.lottery-ball{width:48px;height:48px;font-size:18px}.result-balls{gap:10px}.result-balls__item{min-width:52px}.module-header{padding:14px 12px}.module-header__title{font-size:18px}.module-header::before,.module-header::after{width:80px}.text-entry__content{font-size:16px;padding:10px 8px}.history-modal__dialog{width:98vw;padding:12px;margin:2vh auto}.history-row__balls{gap:4px}.history-row__balls .result-balls__item{min-width:42px;flex-basis:42px}.history-row__balls .lottery-ball{width:38px;height:38px;font-size:15px}.history-row__balls .result-balls__label{font-size:10px}.history-row__balls .result-balls__plus{font-size:18px;line-height:38px;flex-basis:10px}}


/* v6.1 overrides */
.site-hero__banner{background:#fff;}
.site-hero__main img{width:100%;height:auto;aspect-ratio:auto;object-fit:contain;}
.result-panel__body{border:none;padding:14px 16px 6px;}
.result-balls{gap:18px;}
.result-balls__item{min-width:58px}
.lottery-ball{box-shadow:none;border:none !important;color:#fff !important;}
.lottery-ball__number{color:#fff !important;}
.result-ad-stack{display:flex;flex-direction:column;gap:6px;margin:10px 0 14px;}
.result-ad-stack__item{display:block;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.result-ad-stack__item img{width:100%;height:auto;display:block;object-fit:contain;}
.text-entry__content{background:#fff !important;color:#000 !important;font-weight:700;border:2px solid #4b5563;border-radius:14px;padding:18px 16px;}

/* text template reference-style refinement */
.module-card--text{background:#efe9da;border:1px solid #d8ccb1;padding:8px 8px 12px;}
.module-card--text .module-header{margin-bottom:10px;}
.text-template{background:transparent;padding:0;border-radius:0;}
.text-template__list{display:grid;gap:6px;}
.text-entry--structured .text-entry__content{background:#fff !important;color:#111 !important;border:1.5px solid #2f3542;border-radius:14px;padding:8px 12px;text-align:center;line-height:1.45;box-shadow:none;}
.text-entry__headline{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;font-size:14px;font-weight:700;}
.text-entry__issue{color:#2563eb;}
.text-entry__result{color:#111;}
.text-entry__body{margin-top:6px;font-size:14px;font-weight:700;color:#111;word-break:break-word;overflow-wrap:anywhere;}
.text-entry__hit{display:inline-block;background:#ffb54a;color:#d91f12;padding:0 3px;border-radius:4px;line-height:1.2;}
.text-entry--empty .text-entry__content{font-size:14px;}
@media (max-width:640px){
  .text-entry--structured .text-entry__content{padding:8px 8px;border-radius:12px;}
  .text-entry__headline{gap:8px;font-size:13px;}
  .text-entry__body{font-size:13px;}
}

.text-template__summary{max-width:360px;margin:0 auto 10px;padding:10px 14px;background:#fff;border:2px solid #2f3542;border-radius:0;text-align:left;font-size:15px;line-height:1.7;font-weight:700}
.text-template__summary-line{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.text-template__summary-label{color:#ff8a00}
.text-template__summary-values{color:#111827}
.text-entry__open{color:#d91f12}
.text-entry__line + .text-entry__line{margin-top:4px}
/* ===== 文字模板：分类标题居中 ===== */
.text-template-header {
    text-align: center;
    font-size: 16px;
    margin-bottom: 8px;
}

/* ===== 天肖/地肖/男肖/女肖 标签样式 ===== */
.text-template-tag {
    display: inline-block;
    background: #ffe600;
    color: #d40000;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}


.site-reference{background:transparent;padding:4px 4px 12px;margin-top:8px}
.site-reference__title{margin:6px 10px 10px;color:#ff0000;font-size:28px;font-weight:800;line-height:1.2}
.site-reference__image-wrap{background:#fff;border:1px solid #d9d9d9;padding:4px;overflow:auto}
.site-reference__image{display:block;width:100%;height:auto}
.site-reference__text{margin:16px 10px 0;color:#111;font-size:18px;line-height:1.9;white-space:normal;word-break:break-word}
@media (max-width:640px){
  .site-reference__title{font-size:18px;margin:4px 4px 8px}
  .site-reference__text{font-size:14px;line-height:1.75;margin:12px 4px 0}
}


/* mobile-first: keep desktop preview close to phone width */
body{min-width:320px}
.module-header__title{font-size:18px}
.module-header__subtitle{font-size:12px}
.text-entry__content{font-size:16px}

/* show poster image and overlay text at the same time */
.poster-template__image-wrap{background:#f3f4f6}
.poster-template__image,.poster-template__overlay{opacity:1;transition:none}
.poster-template__image-wrap.is-loading .poster-template__image,
.poster-template__image-wrap.is-loading .poster-template__overlay{opacity:1}
.poster-template__image-wrap.is-ready .poster-template__image,
.poster-template__image-wrap.is-ready .poster-template__overlay{opacity:1}
.poster-template__image-wrap.is-loading::after{content:none;display:none}

@media (min-width:641px){
  .page-shell{padding:0 8px 24px}
  .module-header{padding:14px 12px}
  .module-header::before,.module-header::after{width:80px}
  .result-tabs__name,.result-tabs__date{font-size:11px}
  .lottery-ball{width:48px;height:48px;font-size:18px}
  .result-balls{gap:10px}
  .result-balls__item{min-width:52px}
}

/* poster micro-tuning */
.poster-template--poster_4 .poster-template__overlay .poster-scene__slot:nth-child(5){transform:translateX(-6%)}
.poster-template--poster_4 .poster-template__overlay .poster-scene__slot:nth-child(5) .poster-scene__slot-text > span{display:flex;align-items:center;justify-content:center}
.poster-template--poster_3 .poster-template__overlay .poster-scene__slot:nth-child(3){width:18.5% !important;transform:translateX(-2%)}
.poster-template--poster_3 .poster-template__overlay .poster-scene__slot:nth-child(3) .poster-scene__slot-text > span{letter-spacing:.04em;white-space:nowrap}
.poster-template--poster_3 .poster-template__overlay .poster-scene__slot:nth-child(7){transform:translateX(8%)}

/* floating tools */
.site-tools{position:fixed;right:12px;bottom:90px;z-index:120;display:flex;flex-direction:column;gap:10px}
.site-tools__btn{
    width:54px;
    height:54px;
    border:none;
    border-radius:50%;
    color:#fff;
    font-size:24px;
    font-weight:700;
    box-shadow:0 8px 20px rgba(15,23,42,.22);
    cursor:pointer;

    /* ✅ 核心：强制居中 */
    display:flex;
    align-items:center;
    justify-content:center;
    line-height:1;
}
.site-tools__btn--top{background:#39d26a}.site-tools__btn--nav{background:#f3a614}.site-tools__btn--notice{background:#9b4ef5;font-size:24px}
.site-tools__menu[hidden],.notice-modal[hidden]{display:none}
.site-tools__menu{position:absolute;right:62px;bottom:64px;width:150px;max-height:300px;overflow:auto;background:#fff;border:1px solid #d6dde8;border-radius:16px;box-shadow:0 10px 28px rgba(15,23,42,.16);padding:8px}
.site-tools__menu-list{display:flex;flex-direction:column}
.site-tools__nav-item{border:none;border-bottom:1px solid #e7edf7;background:#fff;padding:10px 6px;text-align:left;font-size:14px;color:#111827;cursor:pointer}
.site-tools__nav-item:last-child{border-bottom:none}
.notice-modal{position:fixed;inset:0;z-index:130}
.notice-modal__mask{position:absolute;inset:0;background:rgba(15,23,42,.45)}
.notice-modal__dialog{position:relative;z-index:1;width:min(448px,64.4vw);margin:12vh auto;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 20px 40px rgba(15,23,42,.2)}
.notice-modal__head{display:flex;justify-content:space-between;align-items:center;background:#22c55e;color:#fff;padding:14px 18px;font-size:24px;font-weight:700}
.notice-modal__close{border:none;background:#fff;color:#374151;width:34px;height:34px;border-radius:50%;font-size:24px;line-height:1;cursor:pointer}
.notice-modal__body{padding:24px 18px;font-size:18px;line-height:1.8;color:#111;white-space:pre-wrap;background:#f8fafc}
@media (max-width:640px){
  .site-tools{right:10px;bottom:86px;gap:9px}
  .site-tools__btn{
      width:50px;
      height:50px;
      font-size:22px;
      display:flex;
      align-items:center;
      justify-content:center;
  }
  .site-tools__btn--notice{font-size:22px}
  .site-tools__menu{right:58px;bottom:58px;width:138px;max-height:260px}
  .notice-modal__dialog{width:92vw;margin:10vh auto}
  .notice-modal__head{font-size:20px;padding:12px 14px}
  .notice-modal__body{padding:18px 14px;font-size:15px;line-height:1.7}
}


/* one-line result balls */
.result-balls{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;align-items:start;margin:18px 0 10px}
.result-balls__item{min-width:0;width:100%;text-align:center}
.lottery-ball{width:42px;height:42px;font-size:18px;margin:0 auto}
.result-balls__label{margin-top:5px;font-size:12px;line-height:1.2;word-break:keep-all}
.result-balls__plus{display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:800;line-height:1;color:#b6bcc7;min-height:42px}
.result-balls__status{grid-column:1 / -1;text-align:center;font-size:20px;font-weight:800;color:#ef4444;padding:18px 0}
@media (max-width:640px){
  .result-balls{gap:6px}
  .lottery-ball{width:38px;height:38px;font-size:16px}
  .result-balls__label{font-size:11px}
  .result-balls__plus{font-size:24px;min-height:38px}
}

.result-balls__item--opening .lottery-ball--pending{background:#f3f4f6;border:2px dashed #cbd5e1;color:#334155;box-shadow:none}.result-balls__item--opening .lottery-ball__number{color:#334155!important}.result-balls__item--opening .result-balls__label{visibility:hidden}

/* ===== 顶部快速导航 ===== */
.quick-nav-bar{margin:6px 0 8px}
.quick-nav-bar[hidden]{display:none}
.quick-nav-bar__list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;align-items:flex-start}
.quick-nav-bar__item{width:100%;border:none;border-radius:999px;background:#b2368a;color:#fff;padding:8px 2px;font-size:11px;font-weight:700;line-height:1.15;cursor:pointer;box-shadow:0 3px 8px rgba(178,54,138,.14);white-space:normal;overflow:hidden;text-overflow:ellipsis;min-height:34px;word-break:break-all}


@media (max-width:430px){
  .page-shell{padding:0 10px 24px;}
  .result-panel{padding:10px;}
  .result-panel__body{padding:12px 10px 6px;}
  .result-panel__issue-row{gap:10px;}
  .result-balls{gap:8px;justify-content:space-between;grid-template-columns:repeat(8,minmax(0,1fr));}
  .result-balls__item{min-width:44px;flex:0 0 auto;}
  .lottery-ball{width:44px;height:44px;font-size:17px;}
  .result-balls__label{font-size:11px;line-height:1.2;}
  .module-card{padding:8px 8px 12px;}
  .module-header{padding:12px 10px;}
  .module-header__title{font-size:17px;}
  .text-entry__content{font-size:15px;line-height:1.6;padding:10px 8px;}
}
@media (max-width:390px){
  .page-shell{padding:0 8px 22px;}
  .result-tabs__item{padding:10px 4px;}
  .result-tabs__name,.result-tabs__date{font-size:10px;}
  .result-panel__issue{font-size:14px;}
  .result-panel__countdown,.result-panel__history{font-size:13px;}
  .result-balls{gap:6px;grid-template-columns:repeat(8,minmax(0,1fr));}
  .result-balls__item{min-width:40px;}
  .lottery-ball{width:40px;height:40px;font-size:16px;}
  .result-balls__label{font-size:10px;}
  .quick-nav-bar__list{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;}
  .quick-nav-bar__item{padding:7px 2px;font-size:10px;min-height:32px;}
}

/* ===== 电脑端适配：前台 ===== */
@media (min-width:641px){
  body{min-width:0}
  .page-shell{width:min(calc(100vw - 32px),980px);max-width:none;padding:0 16px 32px}
  .site-hero__fixed{padding:16px 0 10px}
  .site-notice{margin:14px 0}
  .quick-nav-bar__list{display:flex;flex-wrap:wrap;gap:6px}
  .quick-nav-bar__item{flex:0 0 96px;width:96px;padding:7px 6px;font-size:12px;min-height:32px}
  .result-panel{padding:16px}
  .result-tabs__item{padding:16px 8px}
  .result-tabs__name,.result-tabs__date{font-size:16px}
  .result-panel__issue{font-size:28px}
  .result-panel__countdown{font-size:22px}
  .result-panel__history{font-size:18px}
  .result-panel__footer{font-size:18px}
  .result-balls{display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:space-between;gap:14px;margin:24px 0 12px}
  .result-balls__item{flex:0 1 auto;min-width:0;width:auto}
  .lottery-ball{width:64px;height:64px;font-size:26px}
  .result-balls__plus{display:flex;align-items:center;justify-content:center;min-height:64px;font-size:38px;line-height:1}
  .result-balls__label{font-size:16px;margin-top:8px;white-space:nowrap}
  .result-ad-stack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0 18px}
  #live-blocks{display:block}
  #live-blocks > .module-card,#live-blocks > .site-reference,#live-blocks > .mixed-ad-block{margin-bottom:18px}
  .module-card{padding:12px 12px 16px}
  .module-header{padding:18px 20px}
  .module-header::before,.module-header::after{width:120px}
  .module-header__title{font-size:24px}
  .module-header__subtitle{font-size:14px}
  .text-entry--structured .text-entry__content{padding:12px 16px}
  .text-entry__headline{font-size:18px}
  .text-entry__body{font-size:18px}
  .text-template__summary{max-width:520px;font-size:18px}
  .site-reference__title{font-size:32px}
  .site-reference__text{font-size:20px}
  .site-tools{right:18px;bottom:26px}
  .site-tools__menu{right:72px;bottom:74px;width:190px;max-height:420px}
}

/* ===== 后台桌面适配 ===== */
@media (min-width:961px){
  .admin-shell{display:grid;grid-template-columns:260px minmax(0,1fr)}
  .admin-side{position:sticky;top:0;min-height:100vh;overflow:auto;padding:24px 18px}
  .admin-main{padding:28px}
  .admin-nav a{padding:12px 14px;font-size:15px}
  .grid-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .two-col{grid-template-columns:minmax(360px,480px) minmax(0,1fr)}
  .text-editor-layout{grid-template-columns:minmax(380px,460px) minmax(0,1fr)}
  .poster-editor-layout{grid-template-columns:minmax(360px,420px) minmax(0,1fr)}
  .table-card{overflow:auto}
  table{min-width:900px}
}


.notice-modal__body{white-space:normal;overflow:auto;max-height:70vh;padding:0;background:#fff}
.notice-modal__body .popup-notice__viewport{padding:0;background:#fff}
.notice-modal__body .popup-notice__panel{position:relative;width:100%;margin:0 auto;background:#fff;border-radius:0;overflow:hidden;box-shadow:none;border:none}
.notice-modal__body .popup-notice__close{position:absolute;right:10px;top:8px;border:none;background:transparent;color:#111;width:34px;height:34px;border-radius:50%;font-size:28px;line-height:1;cursor:pointer;z-index:3}
.notice-modal__body .popup-notice__headline{background:#18b64b;color:#fff;padding:14px 44px 14px 16px;text-align:center}
.notice-modal__body .popup-notice__headline p{margin:0}
.notice-modal__body .popup-notice__primary,.notice-modal__body .popup-notice__info{margin:0;padding:14px 16px 6px;position:relative;text-align:center;background:#fff}
.notice-modal__body .popup-notice__primary p,.notice-modal__body .popup-notice__info p{margin:0 0 10px}
.notice-modal__body .popup-notice__primary p:last-child,.notice-modal__body .popup-notice__info p:last-child{margin-bottom:0}
.notice-modal__body .popup-notice__footer{background:#fff;padding:14px 12px 16px;text-align:center;color:#444;font-size:13px}
.notice-modal__body .popup-notice__footer p{margin:0}
@media (max-width:640px){
  .notice-modal__body .popup-notice__panel{width:100%;border:none;border-radius:0}
  .notice-modal__body .popup-notice__primary,.notice-modal__body .popup-notice__info{padding:14px 12px 6px}
}



/* popup notice v2.2 exact-match tune */
.notice-modal[hidden]{display:none}
.notice-modal{position:fixed;inset:0;z-index:120}
.notice-modal__mask{position:absolute;inset:0;background:rgba(15,23,42,.45)}
.notice-modal__dialog{position:relative;z-index:1;width:min(504px,64vw);margin:5vh auto;max-height:90vh;overflow:auto;background:transparent;border:none;box-shadow:none}
.notice-modal__body{background:transparent;padding:0}
.notice-modal__body .popup-notice__viewport{padding:0;background:transparent}
.notice-modal__body .popup-notice__panel{position:relative;width:100%;max-width:none;background:#ffffff;border:none;border-radius:18px;overflow:hidden;box-shadow:0 22px 48px rgba(15,23,42,.22);transform-origin:top center}
.notice-modal__body .popup-notice__close{position:absolute;right:14px;top:12px;border:none;background:#f3f4f6;color:#374151;width:40px;height:40px;border-radius:999px;font-size:32px;line-height:1;cursor:pointer;z-index:5;padding:0}
.notice-modal__body .popup-notice__headline{background:#18b64b;color:#fff;padding:28px 68px 22px 18px;text-align:left}
.notice-modal__body .popup-notice__headline p{margin:0}
.notice-modal__body .popup-notice__headline strong,.notice-modal__body .popup-notice__headline span{font-size:20px !important;font-weight:700 !important}
.notice-modal__body .popup-notice__primary,.notice-modal__body .popup-notice__info{margin:18px;padding:28px 20px 24px;position:relative;text-align:center;border-radius:16px}
.notice-modal__body .popup-notice__primary{background:#edd083;border-left:8px solid #ec9f14}
.notice-modal__body .popup-notice__info{background:#dfe4ec;border-left:8px solid #4b98db}
.notice-modal__body .popup-notice__primary p,.notice-modal__body .popup-notice__info p{margin:0 0 14px}
.notice-modal__body .popup-notice__primary p:last-child,.notice-modal__body .popup-notice__info p:last-child{margin-bottom:0}
.notice-modal__body .popup-notice__footer{background:#eef1f4;padding:18px 12px 20px;text-align:center;color:#5b6777;font-size:13px}
.notice-modal__body .popup-notice__footer p{margin:0}
@media (max-width:640px){
  .notice-modal__dialog{width:min(94vw,430px);margin:4vh auto}
  .notice-modal__body .popup-notice__panel{border-radius:16px}
  .notice-modal__body .popup-notice__headline{padding:18px 58px 16px 16px}
  .notice-modal__body .popup-notice__headline strong,.notice-modal__body .popup-notice__headline span{font-size:18px !important}
  .notice-modal__body .popup-notice__close{right:10px;top:10px;width:36px;height:36px;font-size:28px}
  .notice-modal__body .popup-notice__primary,.notice-modal__body .popup-notice__info{margin:16px;padding:24px 12px 20px}
}

/* ===== 开奖区球体样式：按波色图球 ===== */
.lottery-ball{
  background-position:center;
  background-repeat:no-repeat;
  background-size:100% 100%;
  background-color:transparent !important;
  border:none !important;
  box-shadow:none !important;
  color:#000 !important;
  opacity:0;
  transition:opacity 0s linear;
}
.ball-assets-ready .lottery-ball{opacity:1;}
.lottery-ball--red{background-image:url('../img/ball-red.png');}
.lottery-ball--blue{background-image:url('../img/ball-blue.png');}
.lottery-ball--green{background-image:url('../img/ball-green.png');}
.lottery-ball__number{
  color:#000 !important;
  font-weight:800;
  line-height:1;
}
.result-balls__item--opening .lottery-ball--pending{
  opacity:1;
  background-image:none;
  background:#f3f4f6 !important;
  border:2px dashed #cbd5e1 !important;
  box-shadow:none !important;
}
.result-balls__item--opening .lottery-ball__number{color:#000 !important;}


/* ===== mobile adaptive fix v4 ===== */
@media (max-width:640px){
  .page-shell{padding:0 10px 24px !important;}
  .result-panel{padding:12px !important;}
  .result-panel__body{padding:12px 12px 8px !important;}
  .result-panel__issue-row{display:grid !important;grid-template-columns:1fr auto !important;align-items:center !important;gap:8px 12px !important;}
  .result-panel__issue{font-size:15px !important;}
  .result-panel__countdown{justify-self:end !important;font-size:14px !important;white-space:nowrap !important;}
  .result-panel__history{grid-column:1 / -1 !important;justify-self:start !important;font-size:14px !important;}
  .result-balls{display:grid !important;grid-template-columns:repeat(8,minmax(0,1fr)) !important;gap:8px !important;align-items:start !important;justify-items:center !important;margin:18px 0 10px !important;}
  .result-balls__item{min-width:0 !important;width:100% !important;display:flex !important;flex-direction:column !important;align-items:center !important;}
  .lottery-ball{width:min(11vw,50px) !important;height:min(11vw,50px) !important;min-width:40px !important;min-height:40px !important;font-size:18px !important;}
  .result-balls__plus{display:flex !important;align-items:center !important;justify-content:center !important;min-height:min(11vw,50px) !important;font-size:26px !important;line-height:1 !important;}
  .result-balls__label{margin-top:5px !important;font-size:11px !important;line-height:1.15 !important;white-space:nowrap !important;word-break:keep-all !important;}
  .quick-nav-bar__list{grid-template-columns:repeat(auto-fit,minmax(64px,1fr)) !important;gap:8px !important;}
  .quick-nav-bar__item{font-size:11px !important;min-height:36px !important;padding:8px 4px !important;}
}
@media (max-width:390px){
  .page-shell{padding:0 8px 22px !important;}
  .result-balls{gap:7px !important;}
  .lottery-ball{width:min(10.5vw,46px) !important;height:min(10.5vw,46px) !important;min-width:38px !important;min-height:38px !important;font-size:16px !important;}
  .result-balls__plus{min-height:min(10.5vw,46px) !important;font-size:22px !important;}
  .result-balls__label{font-size:10px !important;}
}


/* ===== mobile result balls spacing fix v6 ===== */
@media (max-width: 768px){
  .result-balls{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:0 !important;
    margin:18px 0 10px !important;
  }
  .result-balls__item{
    flex:0 0 clamp(36px, 11vw, 54px) !important;
    width:clamp(36px, 11vw, 54px) !important;
    min-width:0 !important;
    text-align:center !important;
  }
  .lottery-ball{
    width:clamp(36px, 11vw, 54px) !important;
    height:clamp(36px, 11vw, 54px) !important;
    min-width:36px !important;
    min-height:36px !important;
    font-size:clamp(16px, 4.4vw, 20px) !important;
    margin:0 auto !important;
  }
  .result-balls__plus{
    flex:0 0 clamp(10px, 4vw, 18px) !important;
    width:clamp(10px, 4vw, 18px) !important;
    min-height:clamp(36px, 11vw, 54px) !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:clamp(18px, 5vw, 28px) !important;
    line-height:1 !important;
  }
  .result-balls__label{
    margin-top:5px !important;
    font-size:clamp(10px, 2.8vw, 13px) !important;
    line-height:1.15 !important;
    white-space:nowrap !important;
    letter-spacing:0 !important;
  }
}
@media (max-width: 430px){
  .result-panel__body{padding-left:10px !important;padding-right:10px !important;}
  .result-balls{padding:0 2px !important;}
  .result-balls__item{
    flex-basis:clamp(34px, 10.6vw, 44px) !important;
    width:clamp(34px, 10.6vw, 44px) !important;
  }
  .lottery-ball{
    width:clamp(34px, 10.6vw, 44px) !important;
    height:clamp(34px, 10.6vw, 44px) !important;
    min-width:34px !important;
    min-height:34px !important;
  }
  .result-balls__plus{
    flex-basis:clamp(9px, 3.8vw, 14px) !important;
    width:clamp(9px, 3.8vw, 14px) !important;
  }
  .result-balls__label{font-size:10px !important;}
}
@media (min-width: 641px) and (max-width: 1024px){
  .page-shell{max-width:720px !important;}
  .result-balls{justify-content:space-between !important;}
  .result-balls__item{flex-basis:62px !important;width:62px !important;}
  .lottery-ball{
    width:62px !important;height:62px !important;min-width:62px !important;min-height:62px !important;font-size:24px !important;
  }
  .result-balls__plus{
    flex-basis:18px !important;width:18px !important;min-height:62px !important;font-size:34px !important;
  }
  .result-balls__label{font-size:14px !important;}
}

.mixed-ad-block{padding:12px}.mixed-ad-block--standalone{background:transparent;border:none;box-shadow:none;padding:0;margin:0 0 18px}.mixed-ad-block__link{display:block}.mixed-ad-block__media{display:block;width:100%;max-width:100%;border-radius:12px}.module-card--ad .module-header__title{font-size:22px}

/* ===== final result balls adaptive fix ===== */
.result-panel__body{overflow:visible !important;}
.result-balls{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:clamp(4px,1vw,10px) !important;
  margin:18px 0 10px !important;
}
.result-balls__item{
  flex:1 1 0 !important;
  min-width:0 !important;
  width:auto !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  text-align:center !important;
}
.lottery-ball{
  width:clamp(40px, 8.6vw, 58px) !important;
  height:clamp(40px, 8.6vw, 58px) !important;
  min-width:40px !important;
  min-height:40px !important;
  margin:0 auto !important;
  font-size:clamp(18px, 3.6vw, 24px) !important;
}
.result-balls__plus{
  flex:0 0 clamp(10px, 2.8vw, 20px) !important;
  width:clamp(10px, 2.8vw, 20px) !important;
  min-height:clamp(40px, 8.6vw, 58px) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:clamp(20px, 4.4vw, 34px) !important;
  line-height:1 !important;
}
.result-balls__label{
  margin-top:6px !important;
  font-size:clamp(10px, 2.1vw, 14px) !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
}
@media (max-width: 430px){
  .page-shell{padding:0 8px 24px !important;}
  .result-panel{padding:10px !important;}
  .result-panel__body{padding:12px 8px 6px !important;}
  .result-balls{gap:clamp(5px,1.6vw,8px) !important;}
  .lottery-ball{
    width:clamp(40px, 10.3vw, 46px) !important;
    height:clamp(40px, 10.3vw, 46px) !important;
    min-width:40px !important;
    min-height:40px !important;
    font-size:clamp(17px, 4.6vw, 20px) !important;
  }
  .result-balls__plus{
    flex-basis:clamp(10px, 4vw, 14px) !important;
    width:clamp(10px, 4vw, 14px) !important;
    min-height:clamp(40px, 10.3vw, 46px) !important;
    font-size:clamp(20px, 5vw, 24px) !important;
  }
  .result-balls__label{font-size:clamp(10px, 2.7vw, 12px) !important;}
}
@media (min-width: 431px) and (max-width: 900px){
  .page-shell{max-width:min(100vw, 760px) !important;}
  .result-panel__body{padding:14px 14px 8px !important;}
  .result-balls{gap:clamp(8px,1.4vw,12px) !important;}
  .lottery-ball{
    width:clamp(46px, 8vw, 56px) !important;
    height:clamp(46px, 8vw, 56px) !important;
    min-width:46px !important;
    min-height:46px !important;
  }
  .result-balls__plus{
    flex-basis:clamp(12px, 2.6vw, 18px) !important;
    width:clamp(12px, 2.6vw, 18px) !important;
    min-height:clamp(46px, 8vw, 56px) !important;
  }
}

/* ===== unified mobile layout fix (ios/android consistent) ===== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
@media (max-width:900px){
  html,body{-webkit-text-size-adjust:100% !important;text-size-adjust:100% !important;}
  .page-shell{
    width:100% !important;
    max-width:430px !important;
    margin:0 auto !important;
    padding:0 8px 24px !important;
  }
  .result-panel{padding:10px !important;}
  .result-panel__body{padding:12px 10px 8px !important;}
  .result-tabs{grid-template-columns:repeat(4,1fr) !important;}
  .result-tabs__item{padding:12px 4px !important;min-height:72px !important;}
  .result-tabs__name,.result-tabs__date{font-size:11px !important;line-height:1.15 !important;}
  .result-panel__issue-row{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:8px 10px !important;
    align-items:center !important;
  }
  .result-panel__history{grid-column:1 / -1 !important;justify-self:start !important;}
  .result-balls{
    display:flex !important;
    flex-wrap:nowrap !important;
    justify-content:space-between !important;
    align-items:flex-start !important;
    gap:4px !important;
    margin:16px 0 10px !important;
  }
  .result-balls__item{
    flex:1 1 0 !important;
    min-width:0 !important;
    width:auto !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
  }
  .lottery-ball{
    width:42px !important;
    height:42px !important;
    min-width:42px !important;
    min-height:42px !important;
    font-size:18px !important;
    margin:0 auto !important;
  }
  .result-balls__plus{
    flex:0 0 12px !important;
    width:12px !important;
    min-height:42px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:22px !important;
    line-height:1 !important;
  }
  .result-balls__label{
    margin-top:5px !important;
    font-size:10px !important;
    line-height:1.15 !important;
    white-space:nowrap !important;
    word-break:keep-all !important;
  }
  .quick-nav-bar__list{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:6px !important;
  }
  .quick-nav-bar__item{
    width:100% !important;
    min-width:0 !important;
    min-height:36px !important;
    padding:8px 2px !important;
    font-size:11px !important;
    line-height:1.15 !important;
    white-space:normal !important;
    word-break:break-all !important;
  }
}
@media (max-width:390px){
  .page-shell{padding:0 6px 22px !important;}
  .lottery-ball{width:40px !important;height:40px !important;min-width:40px !important;min-height:40px !important;font-size:17px !important;}
  .result-balls__plus{flex-basis:10px !important;width:10px !important;min-height:40px !important;font-size:20px !important;}
  .result-tabs__item{padding:10px 3px !important;min-height:68px !important;}
  .result-tabs__name,.result-tabs__date{font-size:10px !important;}
  .quick-nav-bar__list{gap:5px !important;}
  .quick-nav-bar__item{font-size:10px !important;min-height:34px !important;padding:7px 2px !important;}
}


/* ===== fix: 开奖区四个 tab 强制同一行 ===== */
.result-tabs{grid-template-columns:repeat(4,minmax(0,1fr)) !important}
.result-tabs__item{min-width:0}
.result-tabs__name,.result-tabs__date{white-space:normal;word-break:break-all}
@media (max-width:900px){
  .result-tabs{grid-template-columns:repeat(4,minmax(0,1fr)) !important}
  .result-tabs__item{padding:10px 3px !important;min-height:68px !important}
  .result-tabs__name,.result-tabs__date{font-size:10px !important;line-height:1.12 !important}
}
@media (max-width:390px){
  .result-tabs__item{padding:9px 2px !important;min-height:64px !important}
  .result-tabs__name,.result-tabs__date{font-size:9px !important;line-height:1.1 !important}
}


/* ===== 强制开奖区四个一行（最终覆盖） ===== */
.result-tabs{display:flex !important;flex-wrap:nowrap !important;align-items:stretch !important;}
.result-tabs__item{flex:1 1 var(--result-tab-width,25%) !important;width:var(--result-tab-width,25%) !important;max-width:var(--result-tab-width,25%) !important;min-width:0 !important;display:block !important;}
.result-tabs__name,.result-tabs__date{white-space:normal !important;word-break:break-all !important;}
@media (max-width:640px){
  .result-tabs{display:flex !important;flex-wrap:nowrap !important;}
  .result-tabs__item{flex:1 1 var(--result-tab-width,25%) !important;width:var(--result-tab-width,25%) !important;max-width:var(--result-tab-width,25%) !important;padding:10px 3px !important;}
}

/* ===== taxakai.top 文字模板颜色修正：期数蓝色，“开”一行红色 ===== */
.module-card--text .text-entry__issue-cell,
.module-card--text .text-entry__issue{
  color:#0057ff !important;
}
.module-card--text .text-entry__open-row,
.module-card--text .text-entry__open{
  color:#ff0000 !important;
}

/* ===== 命中资料黄底：只标记资料内容，不改后面的开奖结果 ===== */
.text-entry__body-row--hit,
.text-entry__line--hit,
.forum-data-row__content--hit{
  background:#fff100 !important;
  -webkit-box-decoration-break:clone;
  box-decoration-break:clone;
}
.forum-data-row__content--hit{
  padding:0 3px !important;
  border-radius:2px !important;
}

/* ===== 精准命中黄底：只给单个命中数据加黄底，不整行变黄 ===== */
.text-entry__hit,
.forum-data-row__hit{
  display:inline-block !important;
  background:#fff100 !important;
  color:inherit !important;
  padding:0 3px !important;
  border-radius:2px !important;
  line-height:1.2 !important;
  -webkit-box-decoration-break:clone;
  box-decoration-break:clone;
}
.text-entry__body-row--hit,
.text-entry__line--hit,
.forum-data-row__content--hit{
  background:transparent !important;
  padding:0 !important;
}
