:root {
  --home-green: #07c160;
  --home-red: #ef2b2d;
  --home-blue: #0755c1;
}

html,
body {
  background: #f4f4f4;
}

html.home-dashboard-root,
html.home-dashboard-root body {
  height: 100%;
  overflow: hidden;
}

body.home-dashboard-active {
  overflow: hidden;
}

body.home-dashboard-active .uni-tabbar,
body.home-dashboard-active uni-tabbar,
body.home-dashboard-active .uni-tabbar-bottom,
body.home-dashboard-active .flexdBtn,
body.home-dashboard-active .caidan,
body.home-dashboard-active .hr,
body.home-dashboard-active .tukutab,
body.home-dashboard-active .waterfull,
body.home-dashboard-active .kjdiv {
  display: none !important;
}

body.home-dashboard-active .uni-popup {
  display: none !important;
}

body.home-dashboard-active .indextop {
  position: relative;
  height: clamp(34px, 5.2dvh, 45px);
  justify-content: center !important;
  line-height: clamp(34px, 5.2dvh, 45px);
}

body.home-dashboard-active .indextop > uni-view:first-child,
body.home-dashboard-active .indextop > v-uni-view:first-child {
  display: none !important;
}

body.home-dashboard-active .indextop .title {
  position: absolute;
  left: 50%;
  width: auto;
  color: transparent !important;
  font-size: 0 !important;
  font-weight: 500;
  white-space: nowrap;
  transform: translateX(-50%);
}

body.home-dashboard-active .indextop .title::after {
  content: "三合彩";
  color: #222;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(16px, 4.6vw, 20px);
  font-weight: 500;
}

body.home-dashboard-active .banner {
  position: relative;
  margin-top: 2px;
  overflow: hidden;
}

body.home-dashboard-active .indexswiper,
body.home-dashboard-active .indexswiper .imgw100 {
  height: clamp(76px, 15dvh, 126px) !important;
}

body.home-dashboard-active .indexswiper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.home-banner-copy {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: clamp(16px, 5vw, 34px);
  width: 49%;
  color: #fff;
  pointer-events: none;
  transform: translateY(-50%);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

.home-banner-brand {
  display: flex;
  align-items: center;
  gap: clamp(7px, 2vw, 11px);
}

.home-banner-logo {
  position: relative;
  box-sizing: border-box;
  display: flex;
  width: clamp(37px, 10vw, 52px);
  height: clamp(37px, 10vw, 52px);
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffe271;
  border-radius: 50%;
  color: #fff4b2;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(22px, 6vw, 31px);
  font-weight: 900;
  line-height: 1;
  background: radial-gradient(circle at 35% 28%, #e4382f 0, #a4070b 55%, #4a0003 100%);
  box-shadow: 0 0 0 2px rgba(125, 31, 0, 0.9), 0 0 10px rgba(255, 184, 43, 0.65), inset 0 0 8px rgba(255, 220, 101, 0.5);
  text-shadow: 0 2px 1px rgba(72, 0, 0, 0.9);
}

.home-banner-logo::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 230, 125, 0.72);
  border-radius: 50%;
}

.home-banner-wordmark {
  min-width: 0;
}

.home-banner-name {
  color: #ffd83d;
  font-size: clamp(24px, 7.3vw, 38px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
  text-shadow: 0 2px 0 #7f2d00, 0 3px 7px rgba(0, 0, 0, 0.9);
}

.home-banner-subname {
  margin-top: 2px;
  color: #fff5cd;
  font-size: clamp(8px, 2.5vw, 12px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 1px;
  white-space: nowrap;
}

.home-banner-slogan {
  margin-top: clamp(2px, 0.7dvh, 6px);
  font-size: clamp(12px, 3.8vw, 19px);
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
}

.home-banner-badge {
  display: inline-block;
  margin-top: clamp(3px, 0.8dvh, 7px);
  padding: 2px clamp(8px, 2.8vw, 15px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-size: clamp(9px, 2.7vw, 13px);
  line-height: 1.3;
  white-space: nowrap;
}

.home-lottery-dashboard {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.8dvh, 8px);
  width: 100%;
  max-width: 720px;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(4px, 0.7dvh, 7px) 1.5%;
  overflow: hidden;
  background: #eee;
}

body.home-dashboard-active .home-lottery-dashboard ~ * {
  display: none !important;
}

.home-lottery-card {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--card-color);
  border-radius: 8px;
  background: #fff;
}

.home-lottery-card--macau {
  --card-color: var(--home-green);
}

.home-lottery-card--hongkong {
  --card-color: var(--home-red);
}

.home-lottery-card--sanhe {
  --card-color: var(--home-blue);
}

.home-lottery-title {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 clamp(27px, 4.3dvh, 36px);
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 0 clamp(10px, 3vw, 18px);
  color: #fff;
  font-size: clamp(14px, 3.8vw, 18px);
  font-weight: 700;
  background: var(--card-color);
}

.home-lottery-title .home-history {
  cursor: pointer;
  font-size: clamp(11px, 3.2vw, 14px);
  font-weight: 400;
}

.home-lottery-title .home-title-main {
  display: flex;
  align-items: baseline;
  gap: clamp(5px, 1.8vw, 10px);
}

.home-lottery-title .home-draw-date {
  font-size: clamp(10px, 2.8vw, 13px);
  font-weight: 400;
  opacity: 0.95;
}

.home-gallery-button {
  box-sizing: border-box;
  height: 21px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  color: var(--card-color);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 21px;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.home-gallery-button:active {
  opacity: 0.78;
}

.home-gallery-toolbar {
  box-sizing: border-box;
  display: none;
}

html.home-gallery-root,
html.home-gallery-root body {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

body.home-gallery-active {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f4f4f4;
}

body.home-gallery-active .indextop,
body.home-gallery-active .banner,
body.home-gallery-active .marquee_box,
body.home-gallery-active .kjdiv,
body.home-gallery-active .home-lottery-dashboard,
body.home-gallery-active .flexdBtn,
body.home-gallery-active .caidan,
body.home-gallery-active .hr,
body.home-gallery-active .uni-tabbar,
body.home-gallery-active uni-tabbar,
body.home-gallery-active .uni-tabbar-bottom,
body.home-gallery-active .flexdBtn ~ :not(.home-gallery-toolbar):not(.tukutab):not(.waterfull) {
  display: none !important;
}

body.home-gallery-active .home-gallery-toolbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  height: 48px;
  border-bottom: 1px solid #e7e7e7;
  background: #fff;
}

.home-gallery-back {
  height: 48px;
  padding: 0 12px;
  border: 0;
  color: #222;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.home-gallery-heading {
  overflow: hidden;
  color: #222;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.home-gallery-active .tukutab {
  display: flex !important;
  justify-content: center;
  margin-top: 8px;
  padding: 10px 0 12px;
  background: #fff;
}

body.home-gallery-active .tukutab > .item {
  box-sizing: border-box;
  flex: 0 0 42% !important;
  width: 42% !important;
  max-width: 180px;
  text-align: center;
}

body.home-gallery-active .tukutab > .item:nth-child(n + 3) {
  display: none !important;
}

body.home-gallery-active .tukutab .icoin {
  position: relative !important;
  display: block !important;
  box-sizing: border-box;
  width: 25px !important;
  height: 21px !important;
  margin: 0 auto 4px !important;
  padding: 0 !important;
  border: 2px solid #fff;
  border-radius: 3px !important;
  font-size: 0 !important;
}

body.home-gallery-active .tukutab .icoin::before {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  content: "" !important;
}

body.home-gallery-active .tukutab .icoin::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  height: 8px;
  background: linear-gradient(135deg, transparent 0 26%, #fff 27% 48%, transparent 49%),
    linear-gradient(45deg, transparent 0 38%, #fff 39% 64%, transparent 65%);
  content: "";
}

body.home-gallery-active .waterfull {
  display: flex !important;
  box-sizing: border-box;
  width: 97%;
  margin: 20px auto 0;
}

@media screen and (min-width: 900px) {
  body.home-gallery-active {
    max-width: 1120px;
  }

  body.home-gallery-active .home-gallery-toolbar {
    margin-top: 18px;
    border: 1px solid #e2e5e9;
    border-radius: 10px;
  }

  body.home-gallery-active .tukutab {
    overflow: hidden;
    border: 1px solid #e2e5e9;
    border-radius: 10px;
  }

  body.home-gallery-active .waterfull {
    gap: 14px;
    width: 100%;
    margin-top: 24px;
  }
}

.home-lottery-card .home-lottery-body.greenbox {
  display: block !important;
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff;
}

.home-lottery-card .home-lottery-body > uni-view,
.home-lottery-card .home-lottery-body > v-uni-view {
  display: block;
  height: 100%;
}

.home-lottery-card .home-lottery-body .inner98 {
  box-sizing: border-box;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 1px 0;
}

.home-lottery-card .line1 {
  flex: 0 0 auto;
  margin-top: 0 !important;
  font-size: clamp(10px, 2.9vw, 13px) !important;
}

.home-lottery-card .line1 .ls {
  display: none !important;
}

.home-lottery-card .line1 .qi {
  color: var(--card-color) !important;
}

.home-lottery-card .ballbox {
  flex: 0 0 auto;
  align-items: flex-start;
  margin-top: 0 !important;
}

.home-lottery-card .ballbox .item {
  display: flex;
  width: auto !important;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
}

.home-lottery-card .ballbox .ballgreen,
.home-lottery-card .ballbox .ballred,
.home-lottery-card .ballbox .ballblue {
  box-sizing: border-box;
  width: clamp(28px, 9.5vw, 50px) !important;
  height: clamp(28px, 9.5vw, 50px) !important;
  padding-left: 0 !important;
  color: #555 !important;
  font-size: clamp(12px, 3.5vw, 17px) !important;
  line-height: clamp(28px, 9.5vw, 50px) !important;
  text-align: center;
}

.home-lottery-card .ballbox .item .other {
  width: 100% !important;
  overflow: hidden;
  color: #555 !important;
  font-size: clamp(9px, 2.8vw, 12px) !important;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.home-lottery-card .ballbox .item .jia {
  width: 100%;
  color: #222 !important;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: clamp(17px, 4vw, 22px);
  line-height: clamp(28px, 9.5vw, 50px) !important;
  text-align: center;
}

.home-lottery-card .line2 {
  flex: 0 0 auto;
  margin-top: 0 !important;
  color: #f33 !important;
  font-size: clamp(9px, 2.65vw, 12px) !important;
  line-height: 1.35;
  white-space: nowrap;
}

@media (max-height: 680px) {
  body.home-dashboard-active .indexswiper,
  body.home-dashboard-active .indexswiper .imgw100 {
    height: 68px !important;
  }

  .home-banner-copy {
    left: 14px;
  }

  .home-banner-logo {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .home-banner-name {
    font-size: 20px;
  }

  .home-banner-subname {
    font-size: 8px;
  }

  .home-banner-slogan {
    margin-top: 2px;
    font-size: 11px;
  }

  .home-banner-badge {
    display: none;
  }

  .home-lottery-title {
    flex-basis: 25px;
  }

  .home-lottery-dashboard {
    gap: 3px;
    padding-top: 3px;
    padding-bottom: 3px;
  }

  .home-lottery-card .ballbox .ballgreen,
  .home-lottery-card .ballbox .ballred,
  .home-lottery-card .ballbox .ballblue {
    width: 27px !important;
    height: 27px !important;
    line-height: 27px !important;
  }

  .home-lottery-card .ballbox .item .jia {
    line-height: 27px !important;
  }
}

@media screen and (min-width: 900px) {
  html.home-dashboard-root,
  html.home-dashboard-root body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.home-dashboard-active {
    max-width: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    background: #eef1f5;
  }

  body.home-dashboard-active .indextop,
  body.home-dashboard-active .banner,
  body.home-dashboard-active .marquee_box,
  body.home-dashboard-active .home-lottery-dashboard {
    box-sizing: border-box;
    width: min(1120px, calc(100vw - 48px));
    max-width: 1120px;
    margin-right: auto;
    margin-left: auto;
  }

  body.home-dashboard-active .indextop {
    height: 48px;
    border-right: 1px solid #e5e8ec;
    border-left: 1px solid #e5e8ec;
    line-height: 48px;
    background: #fff;
  }

  body.home-dashboard-active .indextop .title::after {
    font-size: 20px;
  }

  body.home-dashboard-active .banner {
    height: clamp(190px, 24dvh, 250px);
    margin-top: 0;
    border-radius: 0 0 10px 10px;
  }

  body.home-dashboard-active .indexswiper,
  body.home-dashboard-active .indexswiper .imgw100 {
    height: 100% !important;
  }

  body.home-dashboard-active .indexswiper .swiper-item,
  body.home-dashboard-active .indexswiper uni-image.imgw100,
  body.home-dashboard-active .indexswiper .imgw100 > div {
    display: block;
    width: 100%;
    height: 100% !important;
  }

  body.home-dashboard-active .marquee_box {
    height: 34px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #e3e6ea;
    border-radius: 7px;
    background: #fff;
  }

  .home-banner-copy {
    left: clamp(28px, 4vw, 58px);
    width: 44%;
  }

  .home-banner-logo {
    width: 66px;
    height: 66px;
    font-size: 39px;
  }

  .home-banner-name {
    font-size: 50px;
  }

  .home-banner-subname {
    font-size: 14px;
  }

  .home-banner-slogan {
    margin-top: 8px;
    font-size: 20px;
  }

  .home-banner-badge {
    margin-top: 10px;
    padding: 3px 18px;
    font-size: 14px;
  }

  body.home-dashboard-active .home-lottery-dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    height: clamp(330px, 38dvh, 360px) !important;
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #e0e4e9;
    border-radius: 12px;
    background: #f7f8fa;
    box-shadow: 0 8px 26px rgba(35, 45, 58, 0.08);
  }

  .home-lottery-card {
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(25, 35, 48, 0.08);
  }

  .home-lottery-title {
    flex-basis: 42px;
    padding: 0 14px;
    font-size: 17px;
  }

  .home-lottery-title .home-history {
    font-size: 13px;
  }

  .home-lottery-title .home-draw-date {
    font-size: 12px;
  }

  .home-lottery-card .home-lottery-body .inner98 {
    width: 92%;
  }

  .home-lottery-card .line1 {
    font-size: 13px !important;
  }

  .home-lottery-card .ballbox .ballgreen,
  .home-lottery-card .ballbox .ballred,
  .home-lottery-card .ballbox .ballblue {
    width: 43px !important;
    height: 43px !important;
    font-size: 16px !important;
    line-height: 43px !important;
  }

  .home-lottery-card .ballbox .item .jia {
    font-size: 20px;
    line-height: 43px !important;
  }

  .home-lottery-card .ballbox .item .other {
    font-size: 11px !important;
  }

  .home-lottery-card .line2 {
    font-size: 10px !important;
  }
}

@media screen and (min-width: 900px) and (max-height: 760px) {
  body.home-dashboard-active .banner {
    height: 150px;
  }

  body.home-dashboard-active .home-lottery-dashboard {
    height: 330px !important;
  }

  .home-banner-logo {
    width: 52px;
    height: 52px;
    font-size: 31px;
  }

  .home-banner-name {
    font-size: 39px;
  }

  .home-banner-slogan {
    margin-top: 4px;
    font-size: 16px;
  }

  .home-banner-badge {
    margin-top: 5px;
    font-size: 12px;
  }
}
