/* 台灣彩券 - 对标 taiwanlottery.com */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --tw-teal: #007979;
  --tw-teal-dark: #006666;
  --tw-yellow: #efdd00;
  --tw-yellow-light: #fff9b0;
  --tw-red: #e60012;
  --tw-orange: #ff8550;
  --tw-footer: #2f373d;
  --tw-text: #2e2e2e;
  --tw-muted: #797979;
  --tw-hover: #e5f2f2;
  --header-h: 64px;
  --nav-h: 64px;
  --max-w: 1200px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--tw-text);
  background: #fff;
  padding-top: calc(var(--header-h) + var(--nav-h));
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.custom-container {
  width: calc(100% - 32px);
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-main { min-height: 50vh; }

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  font-size: 16px;
}
@media (min-width: 768px) { .site-header { font-size: 18px; } }

#top_bar {
  background: var(--tw-teal);
  height: var(--header-h);
}
.top-bar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
  max-width: none;
  padding: 0 16px;
}
@media (min-width: 768px) { .top-bar-inner { padding: 0 32px; } }

.menu-control {
  background: none; border: none; cursor: pointer;
  padding: 10px; margin-right: 8px; z-index: 2;
}
.menu-control img { height: 20px; filter: brightness(0) invert(1); }
@media (min-width: 768px) { .menu-control { display: none; } }

.logo {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
@media (min-width: 768px) {
  .logo { position: static; transform: none; flex-shrink: 0; }
  .top-bar-inner { justify-content: flex-start; gap: 24px; }
}
.logo img { height: 30px; width: auto; }

.top-tool {
  display: none;
  align-items: center;
  margin-left: auto;
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
}
@media (min-width: 768px) { .top-tool { display: flex; } }

.top-tool > .top-link,
.top-tool > .top-dropdown > .top-dropdown-toggle,
.top-tool > a.agency {
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 14px;
  white-space: nowrap;
  font-size: 16px;
  transition: background .2s;
}
.top-tool > .top-link:hover,
.top-tool > .top-dropdown:hover > .top-dropdown-toggle,
.top-dropdown-toggle:hover { background: rgba(0,0,0,.13); }

.top-tool .bar {
  width: 1px; height: 32px; background: #fff; flex-shrink: 0;
}

.top-tool a.agency {
  background: var(--tw-red);
  border-radius: 6px;
  height: auto;
  line-height: 28px;
  padding: 4px 16px;
  margin: 0 8px;
}
.top-tool a.agency:hover { background: #c4000f; }
.top-tool a.hotline {
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.top-tool a.hotline:hover { opacity: 0.9; }

.top-icon { width: 22px; height: 22px; margin-right: 6px; }
.charity-logo { width: 36px; height: 36px; margin-left: 12px; }

.top-dropdown { position: relative; }
.top-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%; right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #dadada;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,.1);
  z-index: 100;
  overflow: hidden;
}
.top-dropdown-panel a {
  display: block;
  color: #000;
  font-weight: 400;
  padding: 14px 20px;
  line-height: 1.4;
}
.top-dropdown-panel a:hover { background: var(--tw-hover); }
.top-dropdown:hover .top-dropdown-panel { display: block; }

#nav_bar {
  background: #fff;
  box-shadow: 0 0 8px rgba(0,0,0,.1);
  height: var(--nav-h);
}
#nav_bar nav { height: 100%; }

#main_menu {
  display: flex;
  height: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#main_menu::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  #main_menu { justify-content: center; padding: 0 24px; }
}

#main_menu > li {
  position: relative;
  flex-shrink: 0;
}
#main_menu > li > a {
  display: block;
  line-height: var(--nav-h);
  padding: 0 18px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
  font-size: 16px;
}
@media (min-width: 1024px) {
  #main_menu > li > a { padding: 0 22px; font-size: 17px; letter-spacing: 2px; }
}
#main_menu > li > a:hover,
#main_menu > li:hover > a { background: var(--tw-hover); }

#main_menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  z-index: 50;
  padding-top: 8px;
}
#main_menu > li:hover .sub-menu { display: block; }
#main_menu .sub-menu ul {
  background: #fff;
  border: 1px solid #dadada;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0,0,0,.1);
  max-height: 70vh;
  overflow-y: auto;
}
#main_menu .sub-menu a {
  display: block;
  padding: 12px 24px;
  font-weight: 400;
  font-size: 16px;
  color: #000;
  line-height: 1.4;
}
#main_menu .sub-menu a:hover { background: var(--tw-hover); }

/* Mobile nav drawer */
@media (max-width: 767px) {
  #nav_bar {
    position: fixed;
    top: var(--header-h);
    left: -100%; width: 100%;
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transition: left .35s ease;
  }
  #nav_bar.show { left: 0; }
  #main_menu { flex-direction: column; height: auto; }
  #main_menu > li > a { line-height: 52px; border-bottom: 1px solid #eee; }
  #main_menu .sub-menu {
    position: static; display: block; padding: 0;
  }
  #main_menu .sub-menu ul { border: none; box-shadow: none; border-radius: 0; }
  #main_menu .sub-menu a { padding-left: 36px; background: #f5f5f5; }
  #main_menu > li.hasChild > a { pointer-events: none; }
}

/* ========== HOME ========== */
.page-home .site-main { padding-bottom: 0; }

/* Hero 区域 - 全宽轮播 */
.home-hero-area {
  background: linear-gradient(180deg, #fff9b0 0%, #fffde7 40%, #fff 100%);
  padding: 24px 0 16px;
}
.home-hero-area--full {
  padding: 0 0 16px;
  background: #fff;
}

@media (max-width: 767px) {
  /* 手机导航抽屉不占位，去掉多余顶距；保留一小段留白 */
  body.page-home {
    padding-top: calc(var(--header-h) + 10px);
  }
  .page-home .home-hero-area--full {
    padding: 0 0 12px;
    background: transparent;
  }
}

.hero-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}
.hero-slides {
  display: flex;
  width: 100%;
  transition: transform .5s ease;
}
.hero-slide-link {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  display: block;
}
.hero-slide {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: #111;
}
.hero-slide-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

/* 手机：固定高度，图片铺满裁剪 */
@media (max-width: 767px) {
  .page-home .hero-slide {
    height: clamp(168px, 44vw, 240px);
  }
  .page-home .hero-slide-link,
  .page-home .hero-slide,
  .page-home .hero-slide-img {
    height: clamp(168px, 44vw, 240px);
  }
}

/* 电脑：限制高度，全宽铺满 */
@media (min-width: 768px) {
  .page-home .hero-slide {
    height: 360px;
  }
  .page-home .hero-slide-link,
  .page-home .hero-slide,
  .page-home .hero-slide-img {
    height: 360px;
  }
  .page-home .hero-tag-img {
    height: 36px;
  }
}

.hero-tag-img {
  position: absolute;
  top: 0; left: 0;
  height: 40px; width: auto;
  z-index: 2;
}

.hero-dots {
  display: flex; justify-content: center; gap: 8px;
  padding: 12px 0 4px;
  background: #fff;
}
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: none; background: #dadada; cursor: pointer; padding: 0;
}
.hero-dots button.active { background: var(--tw-teal); width: 24px; border-radius: 5px; }

/* 刮刮乐侧栏 */
.hero-scratch { min-width: 0; max-width: 100%; }
.scratch-panel {
  background: #fff;
  border: 2px solid #ffb3c1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.scratch-panel-title {
  background: #fff0f3;
  color: var(--tw-red);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  padding: 12px;
  border-bottom: 1px solid #ffd6de;
}
.scratch-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
}
.scratch-tabs button {
  flex: 1;
  padding: 10px;
  border: none;
  background: #f5f5f5;
  font-size: 14px;
  font-weight: 700;
  color: var(--tw-muted);
  cursor: pointer;
}
.scratch-tabs button.active {
  background: var(--tw-red);
  color: #fff;
}
.scratch-list { flex: 1; padding: 8px; overflow-y: auto; max-height: 280px; }
.scratch-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid #f0f0f0;
  transition: background .2s;
}
.scratch-item:hover { background: var(--tw-hover); }
.scratch-item img {
  width: 72px; height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.scratch-item-text { min-width: 0; }
.scratch-item-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--tw-text);
}
.scratch-item-text span {
  display: block;
  font-size: 12px;
  color: var(--tw-muted);
  margin-top: 2px;
}
.scratch-more {
  display: block;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--tw-teal);
  border-top: 1px solid #eee;
}

/* 头奖卡片 */
.home-jackpot {
  display: grid;
  gap: 16px;
  padding: 16px 0;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .home-jackpot { grid-template-columns: 1fr 1fr; } }
.jackpot-card { display: block; transition: transform .2s; }
.jackpot-card:hover { transform: translateY(-2px); }
.jackpot-card img { width: 100%; height: auto; border-radius: 12px; }

/* 快捷链接 */
.home-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding-bottom: 8px;
}
.quick-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--tw-orange);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  font-size: 15px;
  transition: background .2s;
}
.quick-link-btn:hover { background: #e67440; }
.quick-link-btn::after {
  content: '→';
  margin-left: 8px;
}

.home-banner-section { padding: 24px 0 8px; }

.hero-slide-body { text-align: center; color: #fff; }
.hero-slide-body h2 { font-size: 32px; font-weight: 900; letter-spacing: 2px; }
@media (min-width: 768px) { .hero-slide-body h2 { font-size: 48px; } }
.hero-cta {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 24px;
  border: 2px solid #fff;
  border-radius: 24px;
  font-weight: 700;
  font-size: 14px;
}

.home-section { padding: 48px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 {
  font-size: 26px; font-weight: 900;
  letter-spacing: 2px; color: var(--tw-text);
}
@media (min-width: 768px) { .section-head h2 { font-size: 32px; } }
.section-sub { color: var(--tw-muted); margin-top: 8px; font-size: 16px; }
.section-action { text-align: center; margin-top: 32px; }

.results-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 768px) {
  .results-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .results-cards { grid-template-columns: repeat(3, 1fr); }
}

.result-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #dadada;
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  transition: box-shadow .25s;
}
.result-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.result-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.result-card-head h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--tw-teal);
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.result-card-head h3 a:hover { text-decoration: underline; }
.result-period {
  font-size: 13px;
  color: var(--tw-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.result-card-balls {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 8px 0;
}
.result-card .ball-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
}
.result-card .ball.special {
  margin-top: 0;
  position: relative;
}
.result-date {
  text-align: center;
  font-size: 13px;
  color: var(--tw-muted);
  margin: 8px 0 0;
}
.result-card footer {
  margin-top: auto;
  padding-top: 8px;
}
.card-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  color: var(--tw-teal);
  font-weight: 700;
  font-size: 14px;
}
.result-card .empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  margin: 0;
}

@media (max-width: 767px) {
  .results-cards {
    gap: 12px;
  }
  .result-card {
    padding: 16px 14px;
  }
  .result-card-head {
    flex-direction: row;
    align-items: center;
  }
  .result-card-head h3 {
    font-size: 16px;
  }
  .result-period {
    font-size: 12px;
  }
  .result-card-balls {
    min-height: 56px;
    padding: 6px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }
  .result-card .ball-row {
    gap: 4px;
    flex-shrink: 0;
    justify-content: center;
    min-width: min(100%, max-content);
    margin: 0 auto;
  }
  .result-card .ball {
    width: 34px;
    height: 34px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .result-card .ball.special::before {
    font-size: 9px;
    transform: translate(-50%, -115%);
  }
}

.ball-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; align-items: center;
}
.ball {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 16px; font-weight: 700;
  background: url('/static/images/bg/ball.svg') center/cover no-repeat;
  color: #2e2e2e;
}
@media (min-width: 768px) { .ball { width: 48px; height: 48px; font-size: 18px; } }
.color-super .ball,
.result-card.color-super .ball {
  background-image: url('/static/images/bg/ball_super.svg');
  color: #fff;
}
.color-bigSmall .ball { background-image: url('/static/images/bg/ball_big_small.svg'); }
.color-singleDouble .ball {
  background-image: url('/static/images/bg/ball_single_double.svg');
  color: #fff;
}
.ball.special { position: relative; margin-top: 18px; }
.ball.special::before {
  content: '特別號';
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -130%);
  font-size: 11px; font-weight: 400; color: #000; white-space: nowrap;
}
.ball.mini { width: 30px; height: 30px; font-size: 13px; }

/* News panel */
.home-news { background: #fafafa; }
.news-panel {
  background: #fff;
  border: 1px solid #dadada;
  border-radius: 8px;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}
.news-tabs {
  display: flex;
  border-bottom: 2px solid #eee;
}
.news-tabs button {
  flex: 1;
  padding: 16px;
  border: none; background: none;
  font-size: 16px; font-weight: 700;
  color: var(--tw-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.news-tabs button.active {
  color: var(--tw-teal);
  border-bottom-color: var(--tw-teal);
  background: #fff;
}
.tab-panel { padding: 8px 0; }
.news-list-tw li a {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  transition: background .2s;
}
.news-list-tw li a:hover { background: var(--tw-hover); }
.news-list-tw .news-title { font-weight: 700; flex: 1; }
.news-list-tw time { color: var(--tw-muted); font-size: 14px; white-space: nowrap; }
.news-more { text-align: center; padding: 20px; }

/* News list page */
.page-news .news-panel-page { max-width: 900px; margin: 0 auto; }
.news-tabs-links { display: flex; border-bottom: 2px solid #eee; }
.news-tab-link {
  flex: 1;
  padding: 16px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--tw-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}
.news-tab-link:hover { color: var(--tw-teal); background: var(--tw-hover); }
.news-tab-link.active {
  color: var(--tw-teal);
  border-bottom-color: var(--tw-teal);
  background: #fff;
}
.page-news .pagination-wrap { border-top: 1px solid #f0f0f0; margin-top: 0; padding-top: 24px; }
.page-activity .page-intro {
  margin: 8px 0 0;
  font-size: 15px;
  color: #797979;
  text-align: center;
}
.news-panel-activity .news-list-tw li a:hover { background: #f0faf2; }

.home-promo-strip { background: var(--tw-teal); padding: 0; }
.promo-inner { display: grid; grid-template-columns: 1fr 1fr; }
.promo-item {
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  color: #fff; font-weight: 900; font-size: 18px;
  letter-spacing: 2px;
  border-right: 1px solid rgba(255,255,255,.2);
  transition: background .2s;
}
.promo-item:last-child { border-right: none; }
.promo-item:hover { background: rgba(0,0,0,.12); }
.promo-responsible { background: rgba(0,0,0,.08); }

.info-blocks-tw {
  display: grid; gap: 20px;
}
@media (min-width: 768px) { .info-blocks-tw { grid-template-columns: 1fr 1fr; } }
.info-card-tw {
  display: block;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 32px 32px 32px 100px;
  position: relative;
  transition: background .2s, box-shadow .2s;
}
.info-card-icon {
  position: absolute;
  left: 24px; top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
}
.info-card-tw:hover { background: var(--tw-hover); box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.info-card-tw h3 { font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.info-card-tw p { color: var(--tw-muted); }
.info-card-tw .arrow {
  position: absolute; right: 24px; top: 50%;
  transform: translateY(-50%);
  font-size: 24px; color: var(--tw-teal); font-weight: 700;
}

.home-app {
  text-align: center;
  padding: 56px 16px 80px;
  background: linear-gradient(180deg, #fff, var(--tw-hover));
}
.home-app h2 { font-size: 24px; font-weight: 900; margin-bottom: 16px; }
.home-app p { color: var(--tw-muted); max-width: 640px; margin: 0 auto 24px; line-height: 1.8; }

/* Buttons */
.btn-tw-primary {
  display: inline-block;
  padding: 12px 32px;
  background: var(--tw-teal);
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.btn-tw-primary:hover { background: var(--tw-teal-dark); }
.btn-tw-outline {
  display: inline-block;
  padding: 10px 40px;
  border: 2px solid var(--tw-teal);
  color: var(--tw-teal);
  border-radius: 6px;
  font-weight: 700;
}
.btn-tw-outline:hover { background: var(--tw-teal); color: #fff; }
.btn-sm { padding: 8px 20px; font-size: 14px; }

/* ========== SCRATCH PAGE ========== */
.page-hero-yellow {
  position: relative;
  background: var(--tw-yellow);
  padding: 48px 0 56px;
  margin-top: calc(-1 * (var(--header-h) + var(--nav-h)));
  padding-top: calc(var(--header-h) + var(--nav-h) + 48px);
  overflow: hidden;
}
.hero-watermark {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(40px, 8vw, 90px);
  font-weight: 900;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
  letter-spacing: 4px;
  pointer-events: none;
  user-select: none;
}
.page-hero-inner { position: relative; z-index: 1; text-align: center; }
.page-hero-yellow h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  letter-spacing: 2px;
}

.scratch-filter { margin-top: -28px; position: relative; z-index: 2; padding-bottom: 32px; }
.filter-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  padding: 28px 32px;
}
.filter-row { margin-bottom: 20px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--tw-text);
}
.filter-row input[type="search"],
.filter-row input[type="date"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #dadada;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
}
.filter-dates {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.filter-dates input[type="date"] { flex: 1; min-width: 140px; }

.scratch-list-section { padding-bottom: 80px; }
.scratch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.scratch-card-tw {
  border: 1px solid #dadada;
  border-radius: 8px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  background: #fff;
}
.scratch-card-tw:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.scratch-visual {
  height: 140px;
  background: #f5f5f5;
  position: relative;
  overflow: hidden;
}
.scratch-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scratch-visual.scratch-preview {
  background: linear-gradient(135deg, var(--tw-teal), #004d4d);
}
.scratch-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.35);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px; font-weight: 700;
}
.scratch-info { padding: 16px 20px; }
.scratch-info h3 { font-size: 18px; font-weight: 900; margin-bottom: 6px; }
.scratch-info p { font-size: 14px; color: var(--tw-muted); margin-bottom: 8px; }
.scratch-info strong { color: var(--tw-teal); font-size: 18px; }

/* ========== INNER PAGES ========== */
.page-header { text-align: center; padding: 40px 0 24px; }
.page-header h1 { font-size: 28px; font-weight: 900; color: var(--tw-teal); }
.breadcrumb { color: var(--tw-muted); font-size: 14px; margin-top: 8px; }
.breadcrumb a:hover { color: var(--tw-teal); }
.content-card {
  background: #fff;
  border: 1px solid #dadada;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
}
.article-content { line-height: 1.9; }
.article-content h3 { font-size: 18px; font-weight: 900; margin: 20px 0 10px; color: var(--tw-teal); }
.article-content p { margin-bottom: 12px; }
.article-content ul { margin: 12px 0 12px 24px; list-style: disc; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  text-align: center;
}
.data-table th { background: var(--tw-hover); font-weight: 700; }

.history-notice {
  margin-bottom: 20px;
  padding: 20px 24px;
  text-align: center;
}
.history-notice p { margin: 0; font-weight: 700; color: var(--tw-teal); font-size: 17px; }
.history-notice .section-sub { margin-top: 8px; font-weight: 400; color: var(--tw-muted); font-size: 14px; }

/* 台湾皇冠六合彩開獎直播球 */
.draw-live {
  margin-bottom: 24px;
  padding: 28px 20px 24px;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.draw-live-head h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--tw-teal);
  margin-bottom: 8px;
}
.draw-live-notice {
  font-size: 14px;
  color: var(--tw-muted);
  margin-bottom: 10px;
}
.draw-live-status {
  color: var(--tw-muted);
  font-size: 15px;
  margin-bottom: 24px;
}
.draw-live-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 88px;
}
.draw-balls-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.draw-plus {
  font-size: 28px;
  font-weight: 700;
  color: #999;
  line-height: 1;
  padding: 0 4px;
}
.draw-ball {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.08);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
@media (min-width: 768px) {
  .draw-ball { width: 72px; height: 72px; }
  .draw-ball-text { font-size: 24px; }
  .draw-ball.is-char .draw-ball-text { font-size: 18px; }
  .draw-plus { font-size: 32px; }
}
.draw-ball--green { border: 4px solid #2ecc71; }
.draw-ball--red { border: 4px solid #e74c3c; }
.draw-ball--blue { border: 4px solid #3498db; }
.draw-ball-text {
  font-size: 20px;
  font-weight: 900;
  color: #2e2e2e;
  line-height: 1;
}
.draw-ball.is-char .draw-ball-text {
  font-size: 16px;
  font-weight: 800;
}
.draw-ball.is-spinning {
  animation: drawSpin .6s ease-in-out;
}
.draw-ball.is-pop {
  transform: scale(1.15);
  animation: drawPop .45s ease-out;
}
.draw-ball.is-revealed {
  transform: scale(1);
}
@keyframes drawSpin {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.08); }
  100% { transform: rotateY(360deg) scale(1); }
}
@keyframes drawPop {
  0% { transform: scale(0.6); opacity: .5; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.draw-live-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.draw-countdown {
  font-size: 14px;
  color: var(--tw-teal);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 台湾皇冠六合彩開獎 · 手机端横排 */
@media (max-width: 767px) {
  .page-lottery-draw .draw-live {
    padding: 18px 10px 16px;
  }
  .page-lottery-draw .draw-live-head h2 {
    font-size: 18px;
  }
  .page-lottery-draw .draw-live-notice,
  .page-lottery-draw .draw-live-status {
    font-size: 13px;
  }
  .page-lottery-draw .draw-live-stage {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    min-height: auto;
  }
  .page-lottery-draw .draw-balls-main {
    flex-wrap: nowrap;
    gap: 4px;
    flex-shrink: 0;
  }
  .page-lottery-draw .draw-ball {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-width: 2px;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.08);
  }
  .page-lottery-draw .draw-ball-text {
    font-size: 14px;
  }
  .page-lottery-draw .draw-ball.is-char .draw-ball-text {
    font-size: 11px;
  }
  .page-lottery-draw .draw-plus {
    font-size: 16px;
    flex-shrink: 0;
    padding: 0 2px;
  }
  .page-lottery-draw .draw-countdown {
    font-size: 13px;
  }

  .page-lottery-draw .history-table-wrap {
    padding: 12px 6px 16px;
    overflow-x: visible;
  }
  .page-lottery-draw .history-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
  }
  .page-lottery-draw .history-table th,
  .page-lottery-draw .history-table td {
    padding: 10px 4px;
    font-size: 12px;
    vertical-align: middle;
    text-align: center;
  }
  .page-lottery-draw .history-table th:nth-child(2),
  .page-lottery-draw .history-table td.history-date-col {
    display: none;
  }
  .page-lottery-draw .history-period-cell {
    width: 28%;
    padding-right: 6px;
  }
  .page-lottery-draw .history-period-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    word-break: keep-all;
  }
  .page-lottery-draw .history-date-sub {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 400;
    color: var(--tw-muted);
    line-height: 1.3;
  }
  .page-lottery-draw .history-table th:nth-child(3),
  .page-lottery-draw .history-table td:nth-child(3) {
    width: 52%;
    padding-left: 6px;
    padding-right: 6px;
  }
  .page-lottery-draw .history-table th:nth-child(4),
  .page-lottery-draw .history-table td:nth-child(4) {
    width: 20%;
    padding-left: 4px;
  }
  .page-lottery-draw .history-table .ball-row {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 2px;
    margin: 0 auto;
  }
  .page-lottery-draw .history-table .ball.mini {
    width: 22px;
    height: 22px;
    font-size: 9px;
    flex-shrink: 0;
  }
  .page-lottery-draw .history-table .special-inline {
    margin: 0 auto;
  }
}

.history-row-new td {
  animation: historyRowIn .5s ease-out;
}
@keyframes historyRowIn {
  from { background: #e5f7f7; }
  to { background: transparent; }
}

.history-filter { margin-bottom: 20px; padding: 20px 24px; }
.filter-form-inline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.filter-form-inline label { font-weight: 700; color: var(--tw-teal); }
.filter-form-inline select {
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid #dadada;
  border-radius: 6px;
  font-size: 15px;
}
.history-table .type-link { color: var(--tw-teal); font-weight: 700; }
.history-table .type-link:hover { text-decoration: underline; }
.history-date-sub { display: none; }

/* 台湾皇冠六合彩历史表：桌面+手机各列居中 */
.page-lottery-draw .history-table {
  width: 100%;
  table-layout: fixed;
}
.page-lottery-draw .history-table th,
.page-lottery-draw .history-table td {
  text-align: center;
  vertical-align: middle;
}
.page-lottery-draw .history-period-cell,
.page-lottery-draw .history-period-label {
  text-align: center;
}
.page-lottery-draw .history-table .table-balls,
.page-lottery-draw .history-table .ball-row {
  justify-content: center;
  margin: 0 auto;
}
.page-lottery-draw .history-table .special-inline {
  display: inline-flex;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .page-lottery-draw .history-table th:nth-child(1),
  .page-lottery-draw .history-table td.history-period-cell { width: 14%; }
  .page-lottery-draw .history-table th:nth-child(2),
  .page-lottery-draw .history-table td.history-date-col { width: 14%; }
  .page-lottery-draw .history-table th:nth-child(3),
  .page-lottery-draw .history-table td:nth-child(3) { width: 58%; }
  .page-lottery-draw .history-table th:nth-child(4),
  .page-lottery-draw .history-table td:nth-child(4) { width: 14%; }
}

@media (max-width: 767px) {
  .page-lottery-draw .custom-container {
    width: 100%;
    max-width: 100%;
    padding: 0 8px;
  }
  .page-lottery-draw .content-card {
    padding-left: 8px;
    padding-right: 8px;
  }
}

.table-balls { justify-content: flex-start; }

/* 开奖历史表：号码横排（台湾皇冠六合彩 / 港澳彩共用） */
.page-lottery-draw .history-table .ball-row,
.page-lottery-draw .history-table .table-balls,
.page-lottery-draw .history-table .hkmo-table-balls,
.page-lottery-draw .history-table .marksix-balls-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
}
.page-lottery-draw .history-table .ball.mini {
  flex-shrink: 0;
  display: inline-flex;
}
.page-lottery-draw .history-table .history-balls-cell,
.page-lottery-draw .history-table .history-special-cell {
  overflow: hidden;
}
@media (min-width: 768px) {
  .page-taiwan-draw .history-table .marksix-balls-row {
    gap: 8px;
  }
  .page-taiwan-draw .history-table .ball.mini {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
  .page-taiwan-draw .history-table .marksix-ball-label {
    font-size: 12px;
    margin-top: 4px;
  }
  .page-taiwan-draw .history-table .history-balls-cell,
  .page-taiwan-draw .history-table .history-special-cell {
    overflow: visible;
    padding: 14px 8px;
  }
}

/* 港澳彩 · 彩种切换 */
.page-hkmo-draw .hkmo-type-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.hkmo-type-tabs {
  display: flex;
  gap: 8px;
}
.hkmo-type-tab {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid #dadada;
  background: #fff;
  color: #333;
  font-weight: 700;
  font-size: 14px;
}
.hkmo-type-tab.is-active {
  background: var(--tw-teal);
  border-color: var(--tw-teal);
  color: #fff;
}
.hkmo-year-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--tw-teal);
  font-size: 14px;
}
.hkmo-year-select select {
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid #dadada;
  border-radius: 6px;
  font-size: 14px;
}

.lottery-year-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  margin-bottom: 20px;
}
.lottery-year-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--tw-teal);
  font-size: 14px;
}
.lottery-year-select select {
  min-width: 108px;
  padding: 8px 12px;
  border: 1px solid #dadada;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}
.lottery-year-hint {
  font-size: 13px;
  color: #999;
}
.lottery-year-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.lottery-year-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--tw-teal);
  text-decoration: none;
}
.lottery-year-link:hover {
  text-decoration: underline;
}

/* 港澳彩 · 波色球 */
.hkmo-ball.hkmo-ball--red,
.hkmo-ball.hkmo-ball--blue,
.hkmo-ball.hkmo-ball--green {
  background-image: none;
  color: #fff;
  font-weight: 800;
  border: none;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.15), 0 2px 4px rgba(0,0,0,.12);
}
.hkmo-ball.hkmo-ball--red {
  background: radial-gradient(circle at 32% 28%, #ff8a80, #d32f2f 58%, #b71c1c);
}
.hkmo-ball.hkmo-ball--blue {
  background: radial-gradient(circle at 32% 28%, #82b1ff, #1976d2 58%, #0d47a1);
}
.hkmo-ball.hkmo-ball--green {
  background: radial-gradient(circle at 32% 28%, #a5d6a7, #388e3c 58%, #1b5e20);
}
.page-hkmo-draw .draw-ball.draw-ball--red {
  background: radial-gradient(circle at 32% 28%, #fff, #ffeaea 40%, #fff);
}
.page-hkmo-draw .draw-ball.draw-ball--blue {
  background: radial-gradient(circle at 32% 28%, #fff, #e3f2fd 40%, #fff);
}
.page-hkmo-draw .draw-ball.draw-ball--green {
  background: radial-gradient(circle at 32% 28%, #fff, #e8f5e9 40%, #fff);
}

/* 六合彩 · 号码 + 生肖标签 */
.marksix-ball-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  vertical-align: top;
}
.marksix-ball-label {
  font-size: clamp(9px, 2.2vw, 11px);
  color: #646566;
  margin-top: 2px;
  line-height: 1.15;
  white-space: nowrap;
}
.marksix-balls-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
}
.page-lottery-draw .history-table .marksix-ball-item {
  min-width: 0;
}
.page-lottery-draw .history-table .marksix-ball-item .ball.mini {
  margin: 0;
}
.page-lottery-draw .draw-live-stage {
  align-items: center;
}
.page-lottery-draw .draw-balls-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.page-lottery-draw .draw-live-stage .marksix-ball-item {
  align-items: center;
}
.page-lottery-draw .draw-live-stage .marksix-ball-item--special,
.page-lottery-draw .draw-live-stage .draw-plus {
  align-self: center;
}
.page-lottery-draw .draw-live-stage .draw-ball-label {
  min-height: 14px;
}
/* 等待开奖：前3绿、中3红、特码蓝 + 波浪动画 */
.page-taiwan-draw .draw-ball.is-waiting {
  animation: drawWaitFloat 1.8s ease-in-out infinite;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.12);
}
.page-taiwan-draw .draw-ball.is-waiting[data-index="0"] { animation-delay: 0s; }
.page-taiwan-draw .draw-ball.is-waiting[data-index="1"] { animation-delay: .12s; }
.page-taiwan-draw .draw-ball.is-waiting[data-index="2"] { animation-delay: .24s; }
.page-taiwan-draw .draw-ball.is-waiting[data-index="3"] { animation-delay: .36s; }
.page-taiwan-draw .draw-ball.is-waiting[data-index="4"] { animation-delay: .48s; }
.page-taiwan-draw .draw-ball.is-waiting[data-index="5"] { animation-delay: .6s; }
.page-taiwan-draw .draw-ball.is-waiting[data-index="6"] { animation-delay: .72s; }
.page-taiwan-draw .draw-ball.is-waiting.draw-ball--green {
  border: 4px solid #2ecc71;
  background: radial-gradient(circle at 32% 28%, #fff, #e8f5e9 42%, #fff);
}
.page-taiwan-draw .draw-ball.is-waiting.draw-ball--red {
  border: 4px solid #e74c3c;
  background: radial-gradient(circle at 32% 28%, #fff, #ffeaea 42%, #fff);
}
.page-taiwan-draw .draw-ball.is-waiting.draw-ball--blue {
  border: 4px solid #3498db;
  background: radial-gradient(circle at 32% 28%, #fff, #e3f2fd 42%, #fff);
}
.page-taiwan-draw .draw-ball.is-waiting .draw-ball-text {
  color: #2e2e2e;
}
@keyframes drawWaitFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: inset 0 -4px 8px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.1);
  }
  50% {
    transform: translateY(-7px) scale(1.06);
    box-shadow: inset 0 -4px 8px rgba(0,0,0,.06), 0 8px 20px rgba(0,121,121,.22);
  }
}
.page-taiwan-draw .draw-ball.is-revealed.draw-ball--red,
.page-taiwan-draw .draw-ball.is-revealed.draw-ball--blue,
.page-taiwan-draw .draw-ball.is-revealed.draw-ball--green {
  background: #fff;
}

@media (max-width: 767px) {
  .page-hkmo-draw .hkmo-type-bar {
    padding: 12px;
    margin-bottom: 16px;
  }
  .page-hkmo-draw .hkmo-type-tab {
    padding: 7px 14px;
    font-size: 13px;
  }
}

/* 台湾皇冠六合彩 · 規則介紹 */
.page-marksix-rules .marksix-rules-section {
  margin-bottom: 20px;
}
.page-marksix-rules .marksix-rules-title {
  font-size: 20px;
  color: var(--tw-teal);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(0,121,121,.15);
}
.page-marksix-rules .marksix-rules-desc,
.page-marksix-rules .marksix-rules-note {
  color: #555;
  line-height: 1.7;
  margin: 0 0 16px;
}
.page-marksix-rules .marksix-rules-list {
  margin: 0 0 12px;
  padding-left: 1.2em;
  line-height: 1.8;
}
.page-marksix-rules .marksix-color-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.page-marksix-rules .marksix-color-card {
  border-radius: 10px;
  padding: 14px 12px;
  background: #fafafa;
  border: 1px solid #eee;
}
.page-marksix-rules .marksix-color-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  text-align: center;
}
.page-marksix-rules .marksix-color-card--red h3 { color: #c62828; }
.page-marksix-rules .marksix-color-card--blue h3 { color: #1565c0; }
.page-marksix-rules .marksix-color-card--green h3 { color: #2e7d32; }
.page-marksix-rules .marksix-color-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}
.page-marksix-rules .marksix-zodiac-grid,
.page-marksix-rules .marksix-element-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.page-marksix-rules .marksix-zodiac-card,
.page-marksix-rules .marksix-element-card {
  background: #f8fafa;
  border: 1px solid #e8ecec;
  border-radius: 8px;
  padding: 10px 12px;
}
.page-marksix-rules .marksix-zodiac-card h3,
.page-marksix-rules .marksix-element-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--tw-teal);
}
.page-marksix-rules .marksix-zodiac-nums,
.page-marksix-rules .marksix-element-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #444;
  word-break: break-all;
}
.page-marksix-rules .marksix-rules-table-wrap {
  overflow-x: auto;
}
.page-marksix-rules .marksix-rules-table th {
  background: rgba(0,121,121,.08);
  font-size: 13px;
  white-space: nowrap;
}
.page-marksix-rules .marksix-rules-table td {
  font-size: 13px;
  vertical-align: middle;
}
.page-marksix-rules .marksix-rules-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 8px;
}
.page-lottery-draw .crown-latest-link--sub {
  margin-left: 12px;
}
@media (max-width: 767px) {
  .page-marksix-rules .marksix-color-groups {
    grid-template-columns: 1fr;
  }
  .page-marksix-rules .marksix-zodiac-grid,
  .page-marksix-rules .marksix-element-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.game-hero {
  background: linear-gradient(135deg, var(--tw-teal), #004d4d);
  color: #fff;
  padding: 32px 0 24px;
  margin-top: calc(-1 * (var(--header-h) + var(--nav-h)));
  padding-top: calc(var(--header-h) + var(--nav-h) + 32px);
}
.game-hero h1 { font-size: 32px; font-weight: 900; margin: 12px 0 8px; }
.game-tagline { opacity: .9; font-size: 17px; }
.game-price { color: var(--tw-yellow); font-weight: 700; margin-top: 8px; }
.breadcrumb.light { color: rgba(255,255,255,.75); font-size: 14px; margin-bottom: 8px; }

.game-tabs {
  display: flex; overflow-x: auto;
  border-bottom: 2px solid #dadada;
  background: #fff;
  position: sticky;
  top: calc(var(--header-h) + var(--nav-h));
  z-index: 10;
  margin-bottom: 32px;
}
.game-tabs a {
  padding: 14px 20px;
  white-space: nowrap;
  font-weight: 700;
  color: var(--tw-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.game-tabs a.active, .game-tabs a:hover {
  color: var(--tw-teal);
  border-bottom-color: var(--tw-teal);
}

.page-body { padding-bottom: 60px; }
.section-title { font-size: 22px; font-weight: 900; color: var(--tw-teal); margin-bottom: 20px; }
.draw-card { text-align: center; }

.pagination-wrap {
  display: flex;
  justify-content: center;
  margin: 32px 0 8px;
  padding: 0 16px;
}

ul.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.pagination > li {
  margin: 0;
  padding: 0;
}

ul.pagination > li > a,
ul.pagination > li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dadada;
  border-radius: 6px;
  background: #fff;
  color: var(--tw-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
}

ul.pagination > li > a:hover {
  background: var(--tw-hover);
  border-color: var(--tw-teal);
  color: var(--tw-teal);
}

ul.pagination > li.active > span {
  background: var(--tw-teal);
  color: #fff;
  border-color: var(--tw-teal);
  font-weight: 700;
}

ul.pagination > li.disabled > span {
  background: #f5f5f5;
  color: #bbb;
  border-color: #eee;
  cursor: not-allowed;
}

.empty-state { text-align: center; padding: 40px; color: var(--tw-muted); }

.sitemap-grid {
  display: grid; gap: 24px; margin-bottom: 60px;
}
@media (min-width: 768px) { .sitemap-grid { grid-template-columns: repeat(3, 1fr); } }
.sitemap-links a {
  display: block; padding: 10px 0;
  border-bottom: 1px solid #eee;
  color: var(--tw-teal); font-weight: 700;
}

/* 節制過度投注 / 負責任博彩 */
.rg-page h3 {
  margin: 28px 0 12px;
  font-size: 18px;
  color: var(--tw-teal);
}
.rg-page h3:first-child { margin-top: 0; }
.rg-list, .rg-checklist { margin: 12px 0 20px; padding-left: 1.4em; line-height: 1.85; }
.rg-list li, .rg-checklist li { margin-bottom: 8px; }
.rg-table { margin: 16px 0 24px; }
.rg-footnote {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #797979;
}

/* ========== 台湾皇冠六合彩 · 開獎資訊（金吊桶风格） ========== */
.page-crown-info .page-header--center { text-align: center; }
.page-crown-info .page-header h1 { font-size: clamp(22px, 4vw, 28px); }
.crown-latest-card { margin-bottom: 24px; padding: 20px 24px; }
.crown-latest-card--center {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 28px 32px 24px;
}
.crown-latest-head h2 { margin: 0 0 8px; font-size: clamp(20px, 3.5vw, 26px); color: #2e2e2e; }
.crown-latest-meta { margin: 0; font-size: 15px; color: #797979; }
.crown-latest-balls { margin: 20px auto; justify-content: center; flex-wrap: wrap; gap: 10px 12px; }
.crown-latest-balls--lg .ball {
  width: 52px;
  height: 52px;
  line-height: 52px;
  font-size: 20px;
  font-weight: 800;
}
.crown-latest-balls--lg .marksix-ball-label { font-size: 12px; margin-top: 6px; }
.crown-latest-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 24px; margin-top: 8px; }
.crown-special-wrap { margin-left: 4px; padding-left: 16px; border-left: 2px dashed #ccc; }
.crown-latest-link { font-weight: 700; color: var(--tw-teal); font-size: 15px; }

.crown-info-meta--top,
.crown-info-meta--mid {
  margin: 0 auto 14px;
  max-width: 720px;
  padding: 0 8px;
  font-size: 13px;
  color: #666;
  text-align: center;
}
.crown-info-meta--mid { margin-top: 28px; font-weight: 700; color: #333; }
.crown-info-list {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 8px;
}

/* 紫蓝渐变外框 + 白底内容（对标资讯站） */
.crown-info-section.crown-jdt-box {
  margin: 8px 0 12px;
  border-radius: 5px;
  overflow: hidden;
  background-image: linear-gradient(to right, #a92be2, #ae40e1, #b75fdf, #bd7eda, #b75fdf, #ae40e1, #a92be2);
  padding: 4px;
  box-shadow: none;
  border: none;
}
.crown-info-table-title {
  background: linear-gradient(transparent, #f7f3f3);
  border-bottom: 1px solid #738e9f;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  padding: 8px 10px;
  text-align: center;
  font-weight: 800;
  font-size: 26px;
  color: #111;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px #e5e5e5;
}
.crown-info-table-wrap {
  border: none;
  margin: 0;
  overflow-x: auto;
  background: #fff;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}
.crown-jdt-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 18pt;
  font-family: "Microsoft YaHei", "微软雅黑", Helvetica, sans-serif;
  font-weight: 700;
  text-align: center;
  color: #111;
}
.crown-jdt-table td,
.crown-jdt-table th {
  border: 1px solid #eee;
  padding: 10px 8px;
  vertical-align: middle;
  line-height: 1.55;
  color: #111;
  text-align: center;
  font-size: 18pt;
  font-weight: 800;
}
.crown-jdt-table .jdt-cell {
  text-align: center;
  background: #fff;
  font-size: 18pt;
}
.jdt-line1 {
  color: #111;
  font-weight: 800;
  font-size: 18pt;
  text-align: center;
}
.jdt-line2 {
  color: #0000ff;
  margin-top: 6px;
  font-weight: 800;
  font-size: 22pt;
  text-align: center;
}
.jdt-period { color: #111; font-size: 18pt; }
.jdt-pred {
  color: #0000ff;
  margin: 0 6px;
  font-size: 22pt;
  font-weight: 800;
}
.jdt-open { color: #111; font-size: 18pt; }
.jdt-footer {
  text-align: center;
  font-weight: 800;
  font-size: 16pt;
  padding: 10px 10px 12px;
  background: #fff;
  color: #111;
  border-top: 1px solid #eee;
}
.jdt-legend-row .jdt-legend {
  text-align: center;
  font-size: 15pt;
  color: #111;
  background: #fffef5;
}
.jdt-triple {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.jdt-triple-periods {
  width: 22%;
  text-align: center;
  font-weight: 800;
  line-height: 1.7;
  font-size: 17pt;
}
.jdt-triple-pred {
  flex: 1;
  text-align: center;
  color: #0000ff;
  font-weight: 800;
  font-size: 22pt;
  letter-spacing: 0.06em;
}
.jdt-triple-results {
  width: 28%;
  text-align: center;
  line-height: 1.7;
  font-weight: 800;
  font-size: 17pt;
}

/* 中 / 准：必须黄底（多次要求） */
.hit-mark,
.pred-zodiac.is-hit,
.crown-info-table .pred-zodiac.is-hit {
  background: #ffff00 !important;
  color: #c62828 !important;
  padding: 0 4px;
  border-radius: 2px;
  font-weight: 900;
}
.miss-mark {
  color: #9e9e9e;
  font-weight: 800;
  margin-left: 2px;
}
.result-suffix { margin-left: 2px; }

.crown-info-table .col-label {
  width: 30%;
  min-width: 100px;
  font-weight: 800;
  color: #111;
  white-space: nowrap;
  background: #fff;
  text-align: center;
  font-size: 18pt;
}
.crown-info-table .col-pred {
  width: 46%;
  text-align: center;
  color: #0000ff;
  font-weight: 800;
  font-size: 22pt;
  letter-spacing: 0.04em;
}
.crown-info-table .col-result {
  width: 24%;
  min-width: 72px;
  text-align: center;
  color: #222;
  font-weight: 800;
  white-space: nowrap;
  font-size: 18pt;
}
.crown-info-table .col-result.is-hit { color: #d32f2f; }
.crown-info-table .col-result.is-miss { color: #757575; }
.crown-info-table .col-result.is-pending { color: #f57c00; }
.crown-info-table tr.is-pending-row { background: #fff8e1 !important; }
.crown-info-table--kill th {
  padding: 8px 6px;
  font-size: 15pt;
  background: #f7f3f3;
  border: 1px solid #eee;
  color: #111;
  font-weight: 800;
  text-align: center;
}
.crown-cold-stats { padding: 14px; background: #fff; }
.crown-cold-title { font-weight: 800; margin: 0 0 10px; text-align: center; color: #111; font-size: 16pt; }
.crown-cold-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: 14pt; }
.cold-chip {
  display: inline-block;
  margin: 3px 5px 3px 0;
  padding: 2px 7px;
  background: #ffff00;
  border-radius: 3px;
  color: #c62828;
  font-weight: 800;
}
.crown-info-table--triple .col-periods {
  width: 22%;
  min-width: 68px;
  font-weight: 800;
  color: #111;
  background: #fff;
  text-align: center;
  line-height: 1.7;
  font-size: 17pt;
}
.crown-info-table--triple .col-pred-triple {
  width: 48%;
  text-align: center;
  font-size: 22pt;
}
.crown-info-table--triple .pred-tag { color: #0000ff; margin-right: 4px; font-weight: 800; }
.crown-info-table--triple .pred-paren { color: #d32f2f; font-weight: 800; }
.crown-info-table--triple .col-result-triple div {
  line-height: 1.7;
  color: #222;
  font-weight: 800;
  text-align: center;
  font-size: 17pt;
}
.crown-info-foot { text-align: center; margin: 28px 0 48px; }
@media (max-width: 640px) {
  .crown-info-list { padding: 0 4px; }
  .crown-info-table-title { font-size: 20px; }
  .crown-jdt-table,
  .crown-jdt-table td,
  .crown-jdt-table th,
  .crown-jdt-table .jdt-cell,
  .jdt-line1,
  .jdt-period,
  .jdt-open,
  .crown-info-table .col-label,
  .crown-info-table .col-result {
    font-size: 16pt;
  }
  .jdt-line2,
  .jdt-pred,
  .jdt-triple-pred,
  .crown-info-table .col-pred,
  .crown-info-table--triple .col-pred-triple {
    font-size: 19pt;
  }
  .jdt-triple-periods,
  .jdt-triple-results,
  .crown-info-table--triple .col-periods,
  .crown-info-table--triple .col-result-triple div {
    font-size: 14pt;
  }
  .jdt-footer { font-size: 14pt; }
  .crown-info-table td { padding: 8px 5px; }
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--tw-footer);
  color: #fff;
  font-size: 14px;
}
.footer-menu { padding: 40px 16px; max-width: var(--max-w); margin: 0 auto; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 24px;
}
.footer-nav > ul { flex: 1; min-width: 140px; }
.footer-nav > ul::before {
  content: attr(data-label);
  display: block; font-weight: 700;
  padding-bottom: 11px; margin-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,.45);
}
.footer-nav a {
  display: block; padding: 8px 0;
  color: rgba(255,255,255,.78);
  font-size: 14px;
}
.footer-nav a:hover { color: #fff; }

#copy_right {
  background:
    calc(70% + 57px) 0 / contain no-repeat url('/static/images/logo/ui_curve.svg'),
    linear-gradient(90deg, var(--tw-yellow) 70%, var(--tw-teal) 0);
  padding: 16px 20px;
}
@media (min-width: 1280px) {
  #copy_right {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 35px;
  }
}
#copy_right p:first-child { color: #000; font-size: 12px; }
#copy_right p:last-child { color: #fff; font-size: 12px; margin-top: 4px; }
@media (min-width: 1280px) { #copy_right p:last-child { margin-top: 0; } }

/* ui_curve fallback if missing */
#copy_right {
  background: linear-gradient(90deg, var(--tw-yellow) 70%, var(--tw-teal) 0);
}

/* ========== FLOATING ========== */
#floating {
  position: fixed; bottom: 0; right: 16px;
  z-index: 99;
  transform: translateY(60px);
  transition: transform .4s;
}
#floating.show { transform: translateY(0); }
#floating_go_top {
  background: var(--tw-teal);
  color: #fff;
  width: 52px; height: 52px;
  border: none; border-radius: 8px;
  cursor: pointer;
  font-size: 11px; font-weight: 900;
  padding-top: 18px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
@media (min-width: 768px) {
  #floating { right: 32px; }
  #floating_go_top { width: 60px; height: 60px; border-radius: 10px; }
}
