/*
 * 96開獎網 新版視覺（2026）— 共用核心
 * 由 page_start() 自動插入到每個頁面的 </head> 之前（見 app/lib/Seo.php 的 injectTheme）。
 * 內容：設計變數、字型、頁首與導覽列、公告列、頁尾、共用元件（卡片、按鈕、號碼球、表格、提示）。
 * 電腦版舊版面的覆寫在 theme-pc.css，手機版在 theme-mobile.css。
 */
:root {
  --brand: #f98701;
  --brand-600: #e07400;
  --brand-700: #c25e00;
  --brand-50: #fff6ea;
  --brand-100: #ffe8c9;
  --ink: #1c2530;
  --text: #333d4a;
  --muted: #6b7786;
  --line: #e5e8ed;
  --line-strong: #d4d9e0;
  --bg: #f3f4f7;
  --card: #ffffff;
  --blue: #1f7ae0;
  --red: #e5484d;
  --green: #1f9d57;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, .12);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Inter", "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, var(--font);
}

html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); -webkit-font-smoothing: antialiased; }
body, button, input, select, textarea, table, th, td, p, a, b, i, span, li, h1, h2, h3, h4 { font-family: var(--font); }
i { font-style: normal; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid #ffb04d; outline-offset: 2px; }

/* ============================ 頁首與導覽列 ============================ */
.kj519_header { background: none; position: relative; z-index: 600; }
.kj519_header .kj519_header2 {
  background: linear-gradient(180deg, #ffa133 0%, var(--brand) 100%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 4px 14px rgba(249, 135, 1, .18);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 0 max(16px, calc((100% - 1000px) / 2));
  min-height: 60px;
}
.kj519_header .kj519_header_d { width: auto; margin: 0; flex: none; display: flex; align-items: center; height: auto; }
.kj519_header .kj519_header_d:after { display: none; }
.kj519_header .kj519_logo {
  display: block; float: none; width: 157px; height: 40px;
  background: url("/96/res/themes/images/site4/kj96_head_logo.png") no-repeat left center / contain;
}
.kj519_header .kj519_banner { display: none; }
.kj519_header .kj519_nav { flex: 1; width: auto; background: none; border: 0; min-width: 0; }
.kj519_nav .kj519_nav_d { width: auto; margin: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; height: auto; }
.kj519_nav .kj519_nav_d:after { display: none; }
.kj519_header .kj519_nav a {
  float: none; display: block; height: 36px; line-height: 36px; padding: 0 11px; margin: 0 1px;
  font-size: 15px; font-weight: 500; color: #fff; text-decoration: none; white-space: nowrap; border-radius: 8px;
  transition: background-color .15s;
}
.kj519_header .kj519_nav a:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.kj519_header .kj519_nav a.hover { background: #fff; color: var(--brand-700); font-weight: 700; }
#kjw_try { display: none; }

.nav-more { position: relative; display: block; }
.kj519_header .kj519_nav a.nav-more-btn { padding-right: 24px; }
.nav-more-btn:after { content: ""; position: absolute; right: 10px; top: 16px; border: 4px solid transparent; border-top-color: currentColor; }
.nav-more-menu {
  display: none; position: absolute; right: 0; top: 100%; padding-top: 8px; min-width: 190px; z-index: 700;
}
.nav-more-menu:before { content: ""; position: absolute; inset: 8px 0 0 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.nav-more:hover .nav-more-menu, .nav-more:focus-within .nav-more-menu { display: block; }
.kj519_header .kj519_nav .nav-more-menu a {
  position: relative; color: var(--text); height: 38px; line-height: 38px; margin: 0 6px; padding: 0 12px; font-weight: 400; border-radius: 8px;
}
.kj519_header .kj519_nav .nav-more-menu a:first-child { margin-top: 6px; }
.kj519_header .kj519_nav .nav-more-menu a:last-child { margin-bottom: 6px; }
.kj519_header .kj519_nav .nav-more-menu a:hover { background: var(--brand-50); color: var(--brand-700); }
.kj519_header .kj519_nav .nav-more-menu a.hover { background: var(--brand-50); color: var(--brand-700); font-weight: 700; }

.nav-toggle { display: none; margin-left: auto; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .65); color: #fff; border-radius: 8px; padding: 6px 14px; font-size: 15px; cursor: pointer; }

/* 公告列 */
.notic_nav { width: 100%; height: auto; background: var(--brand-50); border-bottom: 1px solid var(--brand-100); font-size: 14px; color: #8a5200; }
.notic_nav_content {
  width: auto; max-width: 1000px; margin: 0 auto; padding: 8px 16px 8px 16px; box-sizing: content-box;
  background: none; color: #8a5200; line-height: 1.5; text-align: left;
}
.notic_nav_content .text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 46px; position: relative; }
.notic_nav_content .text:before {
  content: "公告"; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  background: var(--brand); color: #fff; font-size: 12px; line-height: 1; padding: 4px 7px; border-radius: 6px; font-weight: 700;
}
.notic_nav_content .text b { font-weight: 500; font-size: 14px; color: #8a5200; }
.notic_nav marquee { display: block; }

/* 窄螢幕（自適應頁面：部落格、網站地圖） */
@media (max-width: 760px) {
  .kj519_header .kj519_header2 { flex-wrap: wrap; padding: 0 16px; min-height: 56px; gap: 0; }
  .kj519_header .kj519_header_d { flex: 1 1 100%; height: 56px; }
  .nav-toggle { display: block; }
  .kj519_header .kj519_nav { flex: 1 1 100%; display: none; padding-bottom: 12px; }
  .kj519_header.nav-open .kj519_nav { display: block; }
  .kj519_nav .kj519_nav_d { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; justify-content: stretch; }
  .kj519_header .kj519_nav a { height: 40px; line-height: 40px; background: rgba(255, 255, 255, .12); }
  .nav-more { grid-column: 1 / -1; }
  .nav-more-btn { display: none !important; }
  .nav-more-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; position: static; padding: 0; min-width: 0; }
  .nav-more-menu:before { display: none; }
  .kj519_header .kj519_nav .nav-more-menu a { color: #fff; margin: 0 !important; height: 40px; line-height: 40px; background: rgba(255, 255, 255, .12); }
  .notic_nav_content .text { white-space: normal; }
}

/* ============================ 頁尾 ============================ */
.kj519_footer { background: #18212b; color: #aab4c0; margin-top: 40px; padding: 0; background-image: none; }
.kj519_footer .kj519_footer_d { width: auto; max-width: 1000px; margin: 0 auto; padding: 28px 16px; display: flex; gap: 28px; align-items: flex-start; height: auto; }
.kj519_footer .kj519_footer_d:after { display: none; }
.kj519_footer .kj519_footer_d > a { flex: none; }
.kj519_footer .kj519_f_logo { display: block; float: none; width: 150px; height: 40px; margin: 0; background: url("/96/res/themes/images/site4/kj96_foot_logo.png") no-repeat left center / contain; opacity: .9; }
.kj519_footer .kj519_f_text { flex: 1; float: none; width: auto; margin: 0; padding: 0; background: none; font-size: 13.5px; line-height: 1.9; color: #aab4c0; }
.kj519_footer .kj519_f_text a { color: #e7ebf0; text-decoration: none; }
.kj519_footer .kj519_f_text a:hover { color: #fff; text-decoration: underline; }
.kj519_footer .kj519_f_contact { flex: none; float: none; width: auto; margin: 0; padding: 0; background: none; }
.kj519_footer .kj519_f_contact .online img { width: 96px; height: 96px; border-radius: 8px; display: block; margin-bottom: 10px; }
.kj519_footer .kj519_f_contact a { text-decoration: none; }
.kj519_footer .kj519_f_contact span.kj519_f_email {
  display: inline-block; float: none; width: auto; height: auto; margin: 0; padding: 8px 16px; background: none; background-image: none;
  border: 1px solid #3a4756; border-radius: 100px; color: #e7ebf0; font-size: 13.5px; line-height: 1.4;
}
.kj519_footer .kj519_f_contact span.kj519_f_email b { font-weight: 500; }
.kj519_footer .kj519_f_contact a:hover span.kj519_f_email { border-color: var(--brand); color: #fff; }
@media (max-width: 760px) {
  .kj519_footer .kj519_footer_d { flex-direction: column; gap: 14px; }
}

/* 右側快捷按鈕 */
.kj519_topAndContact {
  position: fixed; right: 18px; bottom: 90px; top: auto; left: auto; margin: 0; width: auto; height: auto; z-index: 500;
  display: flex; flex-direction: column; gap: 8px; background: none; border: 0;
}
.kj519_topAndContact a {
  display: block; width: 56px; height: auto; min-height: 0; padding: 30px 0 7px; margin: 0; box-sizing: border-box;
  background: #fff; background-image: none; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  font-size: 12px; line-height: 1.2; color: var(--muted); text-align: center; text-decoration: none; text-indent: 0; position: relative; overflow: hidden;
}
.kj519_topAndContact a:before {
  content: ""; position: absolute; left: 50%; top: 8px; width: 20px; height: 20px; margin-left: -10px;
  background: var(--muted); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.kj519_topAndContact a:hover { border-color: var(--brand); color: var(--brand-700); }
.kj519_topAndContact a:hover:before { background: var(--brand); }
.kj519_tac_app { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm0 3v12h10V5H7zm5 15.2a1.1 1.1 0 1 0 0-2.2 1.1 1.1 0 0 0 0 2.2z'/%3E%3C/svg%3E"); }
.kj519_tac_online { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h4v5h-1v3h6v5h1v5h-5v-5h2v-3H7v3h2v5H4v-5h1v-5h6V8h-1V3zm-4 15v1h1v-1H6zm11 0v1h1v-1h-1zM12 5v1h0V5z'/%3E%3C/svg%3E"); }
.kj519_tac_top { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4l8 8h-5v8H9v-8H4l8-8z'/%3E%3C/svg%3E"); }
.kj519_tac_icon1 { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.6 13.4a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1 1.4 1.4 1-1a2 2 0 1 1 2.9 2.9l-3 3a2 2 0 0 1-2.9 0l-1.4 1.4zm2.8-2.8a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1-1.4-1.4-1 1a2 2 0 1 1-2.9-2.9l3-3a2 2 0 0 1 2.9 0l1.4-1.4z'/%3E%3C/svg%3E"); }

/* ============================ 共用元件 ============================
 * 所有尺寸都乘上 --u：電腦版與自適應頁面 --u = 1px；手機版舊版面以 0.5 倍縮放呈現，--u = 2px，
 * 所以同一組 class 在兩種版面看起來一樣大。完整範例見 /styleguide.php。
 */
:root { --u: 1px; }
body[data-dv="mobile"] { --u: 2px; }

.ui-wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; box-sizing: content-box; }
.ui-card { background: var(--card); border: calc(var(--u) * 1) solid var(--line); border-radius: calc(var(--u) * 12); box-shadow: var(--shadow); box-sizing: border-box; }
.ui-card-pad { padding: calc(var(--u) * 18) calc(var(--u) * 20); }
.ui-stack > * + * { margin-top: calc(var(--u) * 14); }
.ui-title { display: flex; align-items: center; gap: calc(var(--u) * 10); margin: calc(var(--u) * 22) 0 calc(var(--u) * 12); font-size: calc(var(--u) * 17); font-weight: 700; color: var(--ink); line-height: 1.4; }
.ui-title:before { content: ""; width: calc(var(--u) * 4); height: calc(var(--u) * 17); border-radius: calc(var(--u) * 2); background: var(--brand); flex: none; }
.ui-title small { font-size: calc(var(--u) * 13); font-weight: 400; color: var(--muted); }
.ui-muted { color: var(--muted); }
.ui-note { margin: calc(var(--u) * 12) 0; padding: calc(var(--u) * 10) calc(var(--u) * 14); background: #f6f7f9; border-radius: calc(var(--u) * 8); color: var(--muted); font-size: calc(var(--u) * 13.5); line-height: 1.7; }
.ui-alert { margin: calc(var(--u) * 14) 0; padding: calc(var(--u) * 11) calc(var(--u) * 16); background: #fff8e1; border: calc(var(--u) * 1) solid #f3d38a; border-radius: calc(var(--u) * 8); color: #7a5200; font-size: calc(var(--u) * 14.5); line-height: 1.6; }
.ui-alert.is-ok { background: #e9f7ef; border-color: #a9dfc0; color: #14693b; }
.ui-alert.is-err { background: #fdecec; border-color: #f3b4b4; color: #a12626; }
.ui-404 { max-width: 520px; margin: 48px auto; text-align: center; }
.ui-404-code { margin: 0 0 4px; font: 800 64px/1.1 var(--font-num); color: var(--brand); letter-spacing: .04em; }
.ui-404 .ui-title { justify-content: center; }
.ui-empty { padding: calc(var(--u) * 36) calc(var(--u) * 16); text-align: center; color: var(--muted); font-size: calc(var(--u) * 15); }

/* 連結膠囊、分頁、按鈕、輸入框、工具列 */
.ui-chips { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 8); list-style: none; margin: 0; padding: 0; }
.ui-chip {
  display: inline-flex; align-items: center; gap: calc(var(--u) * 6); padding: calc(var(--u) * 7) calc(var(--u) * 14); border: calc(var(--u) * 1) solid var(--line); border-radius: 100vw; background: #fff;
  color: var(--text); font-size: calc(var(--u) * 14); line-height: 1.3; text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .15s, color .15s, background-color .15s;
}
.ui-chip:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-50); text-decoration: none; }
.ui-chip.is-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.ui-tabs { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 6); margin: 0 0 calc(var(--u) * 14); padding: calc(var(--u) * 4); background: #eceff3; border-radius: calc(var(--u) * 10); width: fit-content; max-width: 100%; list-style: none; box-sizing: border-box; }
.ui-tabs a, .ui-tabs button { display: block; padding: calc(var(--u) * 6) calc(var(--u) * 16); border: 0; border-radius: calc(var(--u) * 7); background: none; color: var(--muted); font-size: calc(var(--u) * 14); line-height: 1.4; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ui-tabs a:hover, .ui-tabs button:hover { color: var(--ink); }
.ui-tabs .is-on, .ui-tabs .is-on:hover { background: #fff; color: var(--brand-700); font-weight: 700; box-shadow: var(--shadow); }
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--u) * 6); height: calc(var(--u) * 38); padding: 0 calc(var(--u) * 18); border: calc(var(--u) * 1) solid var(--brand); border-radius: calc(var(--u) * 8); background: var(--brand); color: #fff; font-size: calc(var(--u) * 14.5); font-weight: 700; line-height: 1; cursor: pointer; text-decoration: none; box-sizing: border-box; white-space: nowrap; }
.ui-btn:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; text-decoration: none; }
.ui-btn-ghost { background: #fff; color: var(--brand-700); }
.ui-btn-ghost:hover { background: var(--brand-50); color: var(--brand-700); }
.ui-input, select.ui-input { height: calc(var(--u) * 38); padding: 0 calc(var(--u) * 12); border: calc(var(--u) * 1) solid var(--line-strong); border-radius: calc(var(--u) * 8); background: #fff; font-size: calc(var(--u) * 14.5); color: var(--text); box-sizing: border-box; max-width: 100%; }
.ui-input:focus { outline: calc(var(--u) * 2) solid #ffd19a; border-color: var(--brand); }
.ui-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--u) * 10); margin: 0 0 calc(var(--u) * 14); font-size: calc(var(--u) * 14.5); }
.ui-toolbar label { color: var(--muted); display: inline-flex; align-items: center; gap: calc(var(--u) * 6); }
.ui-toolbar .ui-spacer { flex: 1; }

/* 號碼球：.ui-ball（圓球）、.ui-sq（賽車類方塊，n1–n10 對應顏色） */
.ui-balls { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 6); align-items: center; }
.ui-ball {
  display: inline-flex; align-items: center; justify-content: center; width: calc(var(--u) * 36); height: calc(var(--u) * 36); border-radius: 50%; flex: none; box-sizing: border-box;
  background: var(--blue); color: #fff; font-family: var(--font-num); font-size: calc(var(--u) * 16); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.ui-ball.is-red, .ui-ball.is-special { background: var(--red); }
.ui-ball.is-orange { background: var(--brand); }
.ui-ball.is-green { background: var(--green); }
.ui-ball.is-ghost { background: #eef1f5; color: var(--muted); }
.ui-ball.is-outline { background: #fff; color: var(--text); border: calc(var(--u) * 1.5) solid var(--line-strong); }
.ui-ball.sm { width: calc(var(--u) * 28); height: calc(var(--u) * 28); font-size: calc(var(--u) * 13); }
.ui-ball.lg { width: calc(var(--u) * 44); height: calc(var(--u) * 44); font-size: calc(var(--u) * 19); }
.ui-sq {
  display: inline-flex; align-items: center; justify-content: center; width: calc(var(--u) * 30); height: calc(var(--u) * 30); border-radius: calc(var(--u) * 7); flex: none;
  color: #fff; font-family: var(--font-num); font-size: calc(var(--u) * 16); font-weight: 800; line-height: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
.ui-sq.sm { width: calc(var(--u) * 24); height: calc(var(--u) * 24); font-size: calc(var(--u) * 13); border-radius: calc(var(--u) * 6); }
.ui-sq.lg { width: calc(var(--u) * 38); height: calc(var(--u) * 38); font-size: calc(var(--u) * 20); border-radius: calc(var(--u) * 9); }
.ui-sq.n1 { background: #f2d600; color: #5b4a00; text-shadow: none; }
.ui-sq.n2 { background: #1f8fff; }
.ui-sq.n3 { background: #4b5563; }
.ui-sq.n4 { background: #ff7a1a; }
.ui-sq.n5 { background: #35c9d6; }
.ui-sq.n6 { background: #5a3df0; }
.ui-sq.n7 { background: #c3c8cf; color: #333; text-shadow: none; }
.ui-sq.n8 { background: #f0352b; }
.ui-sq.n9 { background: #8a1c12; }
.ui-sq.n10 { background: #2bb24c; }
.ui-sq.is-dim, .ui-ball.is-dim { opacity: .25; }

/* 標籤：大小單雙、龍虎等 */
.ui-tag { display: inline-flex; align-items: center; justify-content: center; min-width: calc(var(--u) * 26); padding: calc(var(--u) * 2) calc(var(--u) * 8); border-radius: calc(var(--u) * 6); font-size: calc(var(--u) * 13); line-height: 1.5; background: #eef1f5; color: var(--muted); box-sizing: border-box; white-space: nowrap; }
.ui-tag.is-big, .ui-tag.is-dragon, .ui-tag.is-odd, .ui-tag.is-red { background: #ffe9e9; color: #c53030; }
.ui-tag.is-small, .ui-tag.is-tiger, .ui-tag.is-even, .ui-tag.is-blue { background: #e6f0ff; color: #1d5fbf; }
.ui-tag.is-green { background: #e6f6ee; color: #177a45; }
.ui-tag.is-orange { background: var(--brand-100); color: var(--brand-700); }

/* 表格 */
.ui-table-wrap { overflow-x: auto; border: calc(var(--u) * 1) solid var(--line); border-radius: calc(var(--u) * 12); background: #fff; box-shadow: var(--shadow); }
.ui-table { width: 100%; border-collapse: collapse; font-size: calc(var(--u) * 14.5); line-height: 1.5; background: #fff; color: var(--text); }
.ui-table th, .ui-table td { padding: calc(var(--u) * 10) calc(var(--u) * 12); border-bottom: calc(var(--u) * 1) solid var(--line); text-align: center; vertical-align: middle; }
.ui-table th { background: #f7f8fa; color: var(--ink); font-weight: 700; white-space: nowrap; }
.ui-table tr:last-child td { border-bottom: 0; }
.ui-table:not(.is-grid) tbody tr:hover td { background: #fffaf2; }
.ui-table .is-left { text-align: left; }
.ui-table.is-dense th, .ui-table.is-dense td { padding: calc(var(--u) * 6) calc(var(--u) * 4); font-size: calc(var(--u) * 13); }
.ui-table.is-grid th, .ui-table.is-grid td { border-right: calc(var(--u) * 1) solid var(--line); }
.ui-table.is-grid th:last-child, .ui-table.is-grid td:last-child { border-right: 0; }
.ui-table.is-striped tbody tr:nth-child(even) td { background: #fafbfc; }
.ui-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.ui-strong { color: var(--brand-700); font-weight: 700; }
.ui-money { color: #c53030; font-weight: 700; font-family: var(--font-num); }

/* 一期開獎卡片（樂透類）：左邊期號日期、中間號碼、右邊金額，下方各獎項表 */
.draw-list { display: grid; gap: calc(var(--u) * 14); }
.draw-card { background: #fff; border: calc(var(--u) * 1) solid var(--line); border-radius: calc(var(--u) * 14); box-shadow: var(--shadow); overflow: hidden; }
.draw-main { display: flex; align-items: center; gap: calc(var(--u) * 22); padding: calc(var(--u) * 18) calc(var(--u) * 22); flex-wrap: wrap; }
.draw-meta { flex: none; min-width: calc(var(--u) * 132); }
.draw-issue { font-family: var(--font-num); font-size: calc(var(--u) * 20); font-weight: 800; color: var(--brand-700); line-height: 1.3; }
.draw-date { margin-top: calc(var(--u) * 2); font-size: calc(var(--u) * 13.5); color: var(--muted); line-height: 1.5; }
.draw-nums { flex: 1; min-width: calc(var(--u) * 260); display: grid; gap: calc(var(--u) * 8); }
.draw-row { display: flex; align-items: center; gap: calc(var(--u) * 10); flex-wrap: wrap; }
.draw-label { flex: none; width: calc(var(--u) * 68); font-size: calc(var(--u) * 13.5); color: var(--muted); }
.draw-plus { font-size: calc(var(--u) * 12.5); color: var(--muted); margin-left: calc(var(--u) * 4); }
.draw-aside { flex: none; display: grid; gap: calc(var(--u) * 4); text-align: right; font-size: calc(var(--u) * 13.5); color: var(--muted); }
.draw-aside b { display: block; font-family: var(--font-num); font-size: calc(var(--u) * 17); color: var(--ink); font-weight: 700; }
.draw-prizes { border-top: calc(var(--u) * 1) solid var(--line); background: #fafbfc; overflow-x: auto; }
.draw-prizes .ui-table { background: none; font-size: calc(var(--u) * 13.5); }
.draw-prizes .ui-table th { background: none; color: var(--muted); font-weight: 500; }
.draw-prizes .ui-table th, .draw-prizes .ui-table td { padding: calc(var(--u) * 7) calc(var(--u) * 10); }

/* 號碼統計格：每個號碼一格（球 + 次數 + 長條） */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 150), 1fr)); gap: calc(var(--u) * 10); }
.stat-item { display: flex; align-items: center; gap: calc(var(--u) * 10); padding: calc(var(--u) * 10) calc(var(--u) * 12); background: #fff; border: calc(var(--u) * 1) solid var(--line); border-radius: calc(var(--u) * 10); }
.stat-item.is-hit { border-color: var(--brand); background: var(--brand-50); }
.stat-body { flex: 1; min-width: 0; }
.stat-count { font-family: var(--font-num); font-size: calc(var(--u) * 15); font-weight: 700; color: var(--ink); line-height: 1.3; }
.stat-count small { font-size: calc(var(--u) * 12); font-weight: 400; color: var(--muted); margin-left: calc(var(--u) * 2); }
.stat-bar { height: calc(var(--u) * 5); margin-top: calc(var(--u) * 5); border-radius: 100vw; background: #eceff3; overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: 100vw; background: linear-gradient(90deg, #ffb04d, var(--brand)); }

/* 路珠：一欄一欄往右排，每格一個字 */
.road-wrap { overflow-x: auto; border: calc(var(--u) * 1) solid var(--line); border-radius: calc(var(--u) * 10); background: #fff; padding: calc(var(--u) * 8); }
.road { display: flex; gap: calc(var(--u) * 2); align-items: flex-start; width: max-content; }
.road-col { display: grid; gap: calc(var(--u) * 2); }
.road-cell { display: inline-flex; align-items: center; justify-content: center; width: calc(var(--u) * 24); height: calc(var(--u) * 24); border-radius: calc(var(--u) * 5); font-size: calc(var(--u) * 13); font-weight: 700; line-height: 1; background: #eef1f5; color: var(--muted); }
.road-cell.is-a { background: #ffe1e1; color: #c53030; }
.road-cell.is-b { background: #dfeaff; color: #1d5fbf; }
.road-cell.is-c { background: #e1f5ea; color: #177a45; }

/* 自適應頁面（首頁、部落格、網站地圖）：沒有「手機版」切換，窄螢幕不顯示右側快捷按鈕 */
body[data-dv="responsive"] .kj519_f_contact, body[data-dv="responsive"] .kj519_tac_app { display: none; }
@media (max-width: 1100px) {
  body[data-dv="responsive"] .kj519_topAndContact { display: none; }
}

/* 後台管理的連結版位（友站連結、相關連結、推廣頁清單）；全部未啟用時不會輸出 */
.promo-links { max-width: calc(var(--u) * 1000); margin: calc(var(--u) * 14) auto; padding: 0 calc(var(--u) * 16); box-sizing: border-box; }
.promo-links-title { margin-bottom: calc(var(--u) * 8); font-size: calc(var(--u) * 14.5); font-weight: 700; color: var(--muted); }
.promo-page-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--u) * 240), 1fr)); gap: calc(var(--u) * 16); }
.promo-page-item { display: block; overflow: hidden; border: calc(var(--u) * 1) solid var(--line); border-radius: calc(var(--u) * 12); background: #fff; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.promo-page-item:hover { border-color: var(--brand); text-decoration: none; }
.promo-page-item img { display: block; width: 100%; height: auto; }
.promo-page-body { padding: calc(var(--u) * 12) calc(var(--u) * 14); font-size: calc(var(--u) * 14.5); }
.promo-page-desc { margin-top: calc(var(--u) * 4); font-size: calc(var(--u) * 13); color: var(--muted); }

/* 表格儲存格裡的號碼球：置中、不換行 */
.ui-table .ui-balls { justify-content: center; flex-wrap: nowrap; }
/* 手機版的開獎卡片：右側欄換到下一列時改成左右兩欄、靠左 */
body[data-dv="mobile"] .draw-aside { flex: 1 1 100%; grid-template-columns: 1fr 1fr; text-align: left; }

/* 手機版開獎卡片 */
body[data-dv="mobile"] .draw-card .ui-ball:not(.sm):not(.lg) { width: calc(var(--u) * 32); height: calc(var(--u) * 32); font-size: calc(var(--u) * 15); }
body[data-dv="mobile"] .draw-row { gap: calc(var(--u) * 6); }
body[data-dv="mobile"] .draw-row > .draw-label { flex: 0 0 100%; width: auto; }
/* 各獎項表在手機上轉成直式（每個獎項一列：獎項｜中獎注數｜單注獎金），不必橫向捲動 */
body[data-dv="mobile"] .draw-prizes { overflow: visible; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) { display: flex; width: 100%; min-width: 0; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) thead { display: flex; flex: 0 0 auto; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) tbody { display: flex; flex: 1 1 auto; min-width: 0; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) tr { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) th,
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) td { display: block; height: calc(var(--u) * 34); padding: 0 calc(var(--u) * 14); line-height: calc(var(--u) * 34); font-size: calc(var(--u) * 13.5); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) thead th { text-align: left; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) tr > * { border-bottom: calc(var(--u) * 1) solid var(--line); }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) tr > :last-child { border-bottom: 0; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) tr > :first-child { color: var(--muted); font-weight: 500; background: #f7f8fa; }
body[data-dv="mobile"] .draw-prizes .ui-table:has(thead) tbody td { background: none; }

/* hidden 屬性不要被元件的 display 蓋掉 */
[hidden] { display: none !important; }
/* 卡片內最後一個工具列／分頁不留下邊距 */
.ui-card > .ui-toolbar:last-child, .ui-card > .ui-tabs:last-child, .ui-card-pad > .ui-toolbar:last-child, .ui-card-pad > .ui-tabs:last-child { margin-bottom: 0; }

/* 北京賽車停止開獎的提示列 */
.pk10-stop { display: flex; align-items: center; gap: calc(var(--u) * 10); max-width: calc(var(--u) * 1000); margin: calc(var(--u) * 16) auto 0; box-sizing: border-box; }
.pk10-stop a { color: var(--brand-700); font-weight: 700; white-space: nowrap; }
.pk10-stop-x { margin-left: auto; padding: 0 calc(var(--u) * 4); border: 0; background: none; color: inherit; font-size: calc(var(--u) * 20); line-height: 1; cursor: pointer; }
body[data-dv="mobile"] .pk10-stop { flex-wrap: wrap; margin: calc(var(--u) * 10) calc(var(--u) * 10) 0; }
.ui-toolbar .ui-tabs { margin-bottom: 0; }
/* 即時更新會把整段公告（含一層 .text）塞回 #marquee，巢狀時不要重複出現「公告」標籤 */
.notic_nav_content .text .text { padding-left: 0; display: inline; }
.notic_nav_content .text .text:before { display: none; }
