/* KH88 v0.8.2.3 — 倒计时与开奖时间等宽，手机端轻量右上微调 */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* 电脑端保持 v0.8.2.1 已确认正常的右侧开奖区位置与样式。 */
.tw-home-page .tw-next-panel{
  top:auto!important;
  bottom:8px!important;
  right:24px!important;
  width:330px!important;
  text-align:center!important;
}
.tw-home-page .tw-next-title{justify-content:center!important}
.tw-home-page .tw-countdown-wrap{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr)!important;
  align-items:center!important;
  justify-content:stretch!important;
  column-gap:8px!important;
  width:300px!important;
  margin-top:8px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.tw-home-page .tw-countdown-box{width:100%!important}
.tw-home-page .tw-cutoff{
  box-sizing:border-box;
  display:grid!important;
  grid-template-columns:1fr!important;
  justify-items:center!important;
  align-items:center;
  gap:5px;
  width:300px;
  min-width:0;
  max-width:100%;
  margin:9px auto 0!important;
  padding:8px 15px 9px;
  border:1px solid rgba(255,228,98,.82);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(7,29,91,.96),rgba(8,49,137,.93));
  box-shadow:0 7px 18px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.18);
  color:#fff;
  line-height:1.12;
  white-space:nowrap;
  text-align:center!important;
  text-shadow:0 1px 2px rgba(0,0,0,.5);
}
.tw-home-page .tw-cutoff-label{
  display:flex!important;
  align-items:center;
  justify-content:center;
  gap:9px;
  width:100%;
  color:#ffe879;
  font-size:16px!important;
  font-weight:900;
  letter-spacing:1.8px;
}
.tw-home-page .tw-cutoff-label::before,
.tw-home-page .tw-cutoff-label::after{
  content:"";
  width:32px;
  height:1px;
  background:linear-gradient(90deg,transparent,#ffe879);
}
.tw-home-page .tw-cutoff-label::after{background:linear-gradient(90deg,#ffe879,transparent)}
.tw-home-page .tw-cutoff strong{
  display:flex!important;
  align-items:baseline;
  justify-content:center;
  gap:8px;
  margin:0;
  color:#fff;
  font-size:20px!important;
  font-weight:900;
  font-variant-numeric:tabular-nums;
  letter-spacing:.5px;
}
.tw-home-page .tw-cutoff-time{color:#fff3a4}

/* 电脑端开奖球与加号微调 */
.tw-home-page .draw-ball{
  width:50px!important;
  height:50px!important;
  font-size:21px!important;
}

.tw-home-page .draw-number-item{
  min-width:50px!important;
}

.tw-home-page .draw-plus{
  align-self:center!important;
  margin:0 -2px!important;
  font-size:27px!important;
  line-height:1!important;
  transform:translateY(-7px)!important;
}

/* 手机端只保留一套布局。不同手机按真实可用宽度自然缩放元素，
 * 不再使用 414px 固定画布、transform 或 JS 改页面高度。 */
@media (max-width:600px){
  body.tw-home-page{overflow-x:hidden!important;background:#04102f}
  .tw-home-page .tw-top-banner-shell,
  .tw-home-page .tw-site-shell{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }
  .tw-home-page .tw-site-shell{
    background-size:960px auto!important;
    background-position:center top!important;
  }
  .tw-home-page .tw-hero{
    position:relative!important;
    height:231px!important;
    min-height:231px!important;
    padding:0 8px!important;
  }
  .tw-home-page .tw-header{
    height:68px!important;
    display:grid!important;
    grid-template-columns:88px 1fr!important;
    align-items:center!important;
    gap:0!important;
  }
  .tw-home-page .tw-logo-link{width:88px!important;min-width:88px!important}
  .tw-home-page .tw-site-logo{width:100%!important;max-height:64px!important;object-fit:contain!important}
  .tw-home-page .tw-main-nav{display:none!important}

  .tw-home-page .tw-next-panel{
    top:auto!important;
    bottom:19px!important;
    left:auto!important;
    right:2px!important;
    width:min(286px,calc(100% - 92px))!important;
    max-width:286px!important;
    text-align:center!important;
  }
  .tw-home-page .tw-next-title{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    white-space:nowrap!important;
    font-size:clamp(14px,4.05vw,17px)!important;
    line-height:1!important;
  }
  .tw-home-page .tw-next-title .site-title{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:inherit!important;
  }
  .tw-home-page .tw-next-title strong{
    flex:0 0 auto;
    padding:4px clamp(8px,2.8vw,12px)!important;
    font-size:clamp(14px,3.8vw,16px)!important;
  }
  .tw-home-page .tw-next-title em{font-size:clamp(17px,4.5vw,19px)!important}
  .tw-home-page .tw-countdown-wrap{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr)!important;
    justify-content:stretch!important;
    column-gap:clamp(3px,1.1vw,5px)!important;
    width:100%!important;
    margin-top:12px!important;
  }
  .tw-home-page .tw-countdown-wrap>b{font-size:clamp(20px,5.5vw,23px)!important;line-height:1}
  .tw-home-page .tw-countdown-box{
    width:100%!important;
    height:clamp(44px,12.8vw,53px)!important;
    border-radius:7px!important;
  }
  .tw-home-page .tw-countdown-box span{
    font-size:clamp(29px,8.3vw,35px)!important;
    letter-spacing:1px!important;
  }
  .tw-home-page .tw-cutoff{
    gap:3px;
    width:100%!important;
    min-width:0!important;
    margin:17px auto 0!important;
    padding:6px 7px 7px!important;
    border-radius:8px;
  }
  .tw-home-page .tw-cutoff-label{
    font-size:clamp(13px,3.6vw,15px)!important;
    letter-spacing:1px!important;
  }
  .tw-home-page .tw-cutoff-label::before,
  .tw-home-page .tw-cutoff-label::after{width:clamp(16px,5vw,25px)}
  .tw-home-page .tw-cutoff strong{
    gap:5px!important;
    font-size:clamp(15px,4.15vw,17px)!important;
    letter-spacing:0!important;
  }

  /* 重要：开奖区继续使用原网站背景中的橙色弧带，绝不覆盖成整块橙色。 */
  .tw-home-page .tw-current-draw{
    min-height:158px!important;
    margin:0!important;
    padding:11px 7px 8px!important;
    background:transparent!important;
    clip-path:none!important;
  }
  .tw-home-page .tw-current-inner{
    position:relative!important;
    z-index:1!important;
    width:max-content!important;
    max-width:100%!important;
    margin:0 auto!important;
    text-align:left!important;
  }
  .tw-home-page .tw-current-issue{
    width:max-content!important;
    margin-left:0!important;
    padding:4px 22px!important;
    font-size:17px!important;
  }
  .tw-home-page .tw-draw-ball-area{
    min-height:72px!important;
    margin-top:4px!important;
    place-items:start!important;
  }
  .tw-home-page .draw-balls-v3{
    width:max-content!important;
    max-width:100%!important;
    justify-content:flex-start!important;
    gap:1px!important;
  }
  .tw-home-page .draw-number-item{
  flex:0 0 auto!important;
  min-width:clamp(42px,11.2vw,47px)!important;
  gap:3px!important;
}
  .tw-home-page .draw-ball{
  width:clamp(45px,12.3vw,50px)!important;
  height:clamp(45px,12.3vw,50px)!important;
  font-size:clamp(16px,4.2vw,18px)!important;
  line-height:1!important;
}
  .tw-home-page .draw-attribute{font-size:clamp(14px,4vw,16px)!important;line-height:1.1!important}
  .tw-home-page .draw-plus{
  align-self:center!important;
  font-size:23px!important;
  line-height:1!important;
  margin:0 -6px!important;
  transform:translateY(-11px)!important;
}
  .tw-home-page .tw-lower-content{padding:70px 10px 24px!important}
}

@media (min-width:601px) and (max-width:820px){
  .tw-home-page .tw-next-panel{right:12px!important;bottom:8px!important;width:320px!important}
  .tw-home-page .tw-countdown-wrap,.tw-home-page .tw-cutoff{width:292px!important;min-width:0}
}

/* 电脑端与手机端共用同一张长背景，只绘制一次。 */
@media (min-width:821px){
  .tw-home-page .tw-site-shell{
    background-position:center top!important;
  }
}
