/* 539彩算盤：遊戲科技風（深色）、手機優先、無外部字型、單一樣式檔 */
:root {
  color-scheme: dark;
  --paper: #0b1512;        /* 底 */
  --paper2: #0f2420;
  --card: rgba(16, 38, 32, .78);   /* 玻璃卡片 */
  --card-solid: #11271f;
  --ink: #e8f5ef;
  --muted: #9fb8ad;
  --line: rgba(34, 211, 160, .22);  /* 細亮邊 */
  --line-soft: rgba(159, 184, 173, .16);
  --neon: #22d3a0;         /* 霓虹薄荷：連結、發光邊 */
  --jade: #22d3a0;
  --brand: #0b7f62;        /* 品牌綠 */
  --jade-soft: rgba(34, 211, 160, .1);
  --sun: #f5b301;          /* 金黃：按鈕與強調，上面的字一律用 --on-sun */
  --sun-soft: rgba(245, 179, 1, .12);
  --on-sun: #0b1512;
  --amber: #f5c542;        /* 黃色系文字 */
  --glow: 0 0 0 1px rgba(34, 211, 160, .35), 0 0 18px rgba(34, 211, 160, .28);
  --radius: 14px;
  --col: 1120px;           /* 全站容器寬（頁首、內容、頁尾） */
  --text-col: 880px;       /* 文章內文欄 */
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --sans: system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --tabbar: 62px;
  --gut: max(16px, calc((100% - var(--col)) / 2 + 16px));
  /* 立柱顏色（最多 8 柱），上面的字用深色 */
  --c1: #22d3a0; --c2: #f5c542; --c3: #79a6e6; --c4: #e0a84a;
  --c5: #c08ad2; --c6: #8ccd73; --c7: #e8906c; --c8: #a9b4bf;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 420px at 85% -80px, rgba(34, 211, 160, .13), transparent 70%),
    radial-gradient(700px 360px at 0 18%, rgba(11, 127, 98, .16), transparent 70%),
    linear-gradient(rgba(34, 211, 160, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 160, .045) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
  background-attachment: scroll;
  color: var(--ink);
  font: 16px/1.75 var(--sans);
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 24px);
  overflow-x: hidden;
}
a { color: var(--neon); text-underline-offset: 3px; }
a:hover { color: #6ff0cb; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: .04em; border-left: 5px solid var(--neon); padding-left: 12px; text-shadow: 0 0 22px rgba(34, 211, 160, .35); }
h2 { font-size: 1.2rem; margin-top: 1.6em; font-weight: 800; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
strong { color: #fff; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }

/* ---------- 頁首：深色、貼頂；手機只放站名，導覽在底部 ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 12px var(--gut);
  background: rgba(8, 18, 15, .97); /* 不能加 backdrop-filter：會讓裡面的固定底欄跑到頁首 */
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(34, 211, 160, .12), 0 8px 24px rgba(0, 0, 0, .35);
}
.brand { display: flex; min-height: 48px; align-items: center; gap: 8px; text-decoration: none; color: #fff; font-weight: 800; font-size: 1.12rem; letter-spacing: .05em; }
.brand:hover { color: #fff; }
.brand svg { width: 30px; height: 30px; color: var(--neon); filter: drop-shadow(0 0 6px rgba(34, 211, 160, .6)); }
.top .crumb { margin-left: auto; font-size: .875rem; color: var(--muted); }
.top .crumb a { color: var(--muted); }

/* 底部分頁列（手機）；桌機改成頁首右側 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.7fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8, 18, 15, .96); border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .875rem; line-height: 1.2; min-height: 48px;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--neon); font-weight: 700; text-shadow: 0 0 12px rgba(34, 211, 160, .6); }

main { max-width: var(--col); margin: 0 auto; padding: 22px 16px 40px; }
.lede {
  font-size: 1.05rem; color: var(--ink);
  background: var(--sun-soft); border: 1px solid rgba(245, 179, 1, .28); border-left: 4px solid var(--sun);
  border-radius: 12px; padding: 12px 16px;
}
.sub { color: var(--muted); font-size: .92rem; }

/* 文章頁：內文欄置中；計算器用滿容器寬。首頁、分類頁（body.wide）用滿容器寬 */
body:not(.wide) main > * { max-width: var(--text-col); margin-left: auto; margin-right: auto; }
body:not(.wide) main > .calc { max-width: var(--col); }
.prose { max-width: none; }
.prose > *:first-child { margin-top: 0; }
body.wide .prose { max-width: var(--text-col); margin-left: auto; margin-right: auto; }

/* ---------- 卡片（玻璃感） ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--neon), transparent); opacity: .8; }
.stack > * + * { margin-top: 14px; }
.calc > * { min-width: 0; }

/* ---------- 計算器 ---------- */
.calc { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(0, 0, 0, .25); }
.seg button {
  border: 0; background: none; font: inherit; font-size: 1rem; color: var(--muted);
  padding: 6px 16px; border-radius: 999px; cursor: pointer; min-height: 48px;
}
.seg button[aria-pressed="true"] { background: var(--neon); color: #06110d; font-weight: 800; box-shadow: 0 0 14px rgba(34, 211, 160, .5); }

.field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field label { font-weight: 600; }
.field input[type="number"], .legs input[name="odds"], .odds-grid input, .field select {
  font: inherit; font-family: var(--mono); padding: 8px 10px; min-height: 48px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .35); color: var(--ink);
}
.field input[type="number"] { width: 7.5em; }
.field input:focus, .odds-grid input:focus, .legs input:focus, .field select:focus { outline: 0; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(34, 211, 160, .25); }

.grid39 { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 4px; margin: 12px 0 6px; }
.grid39 button {
  aspect-ratio: 1; min-height: 48px; border-radius: 50%;
  border: 1.5px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink);
  font: 700 1.05rem var(--mono); cursor: pointer; padding: 0;
  transition: transform .08s, box-shadow .15s, border-color .15s;
}
.grid39 button:hover { border-color: var(--neon); box-shadow: 0 0 10px rgba(34, 211, 160, .35); }
.grid39 button:active { transform: scale(.92); }
.grid39 button.on { background: radial-gradient(circle at 35% 30%, #ffd75e, var(--sun) 60%, #c48d00); border-color: #ffd75e; color: var(--on-sun); box-shadow: 0 0 14px rgba(245, 179, 1, .6); }
.grid39 button[data-col] { color: #06110d; }
.grid39 button[data-col="1"] { background: var(--c1); border-color: var(--c1); box-shadow: 0 0 12px var(--c1); }
.grid39 button[data-col="2"] { background: var(--c2); border-color: var(--c2); box-shadow: 0 0 12px var(--c2); }
.grid39 button[data-col="3"] { background: var(--c3); border-color: var(--c3); box-shadow: 0 0 12px var(--c3); }
.grid39 button[data-col="4"] { background: var(--c4); border-color: var(--c4); box-shadow: 0 0 12px var(--c4); }
.grid39 button[data-col="5"] { background: var(--c5); border-color: var(--c5); box-shadow: 0 0 12px var(--c5); }
.grid39 button[data-col="6"] { background: var(--c6); border-color: var(--c6); box-shadow: 0 0 12px var(--c6); }
.grid39 button[data-col="7"] { background: var(--c7); border-color: var(--c7); box-shadow: 0 0 12px var(--c7); }
.grid39 button[data-col="8"] { background: var(--c8); border-color: var(--c8); box-shadow: 0 0 12px var(--c8); }

.cols { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cols button {
  font: inherit; font-size: 1rem; padding: 4px 14px; min-height: 48px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink);
}
.cols button .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.cols button[aria-pressed="true"] { border-color: var(--neon); font-weight: 700; box-shadow: 0 0 10px rgba(34, 211, 160, .35); }
.cols .add { border-style: dashed; color: var(--muted); }

.picked { font-family: var(--mono); font-size: .95rem; color: var(--muted); min-height: 1.5em; word-break: break-all; }
.picked b { color: var(--neon); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  font: inherit; font-size: 1rem; padding: 6px 16px; min-height: 48px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(34, 211, 160, .1); color: var(--ink);
  transition: box-shadow .15s, border-color .15s;
}
.btn:hover { border-color: var(--neon); box-shadow: 0 0 12px rgba(34, 211, 160, .35); }
.btn.ghost { background: none; }

/* 結果：發光面板 */
.receipt {
  background: var(--card); border: 1px solid rgba(34, 211, 160, .4); border-radius: var(--radius);
  padding: 16px; position: relative; box-shadow: 0 0 26px rgba(34, 211, 160, .12), 0 10px 30px rgba(0, 0, 0, .3);
}
.receipt::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--sun) 0 10px, transparent 10px 16px); border-radius: 2px;
}
.big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.big div { background: rgba(0, 0, 0, .35); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; }
.big small { display: block; color: var(--muted); font-size: .875rem; }
.big output { display: block; font: 800 1.75rem/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--neon); text-shadow: 0 0 14px rgba(34, 211, 160, .5); }
.big .money output { color: var(--amber); text-shadow: 0 0 14px rgba(245, 179, 1, .45); }

table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th, table.t td { padding: 7px 6px; border-bottom: 1px dashed var(--line-soft); text-align: right; }
table.t th { color: var(--muted); font-weight: 600; }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.receipt table.t td:not(:first-child):not([data-out="diff"]) { font-size: 1.375rem; font-weight: 700; line-height: 1.3; }
table.t tr.cur td { color: var(--amber); font-weight: 700; }

.note { margin: 12px 0 0; padding: 10px 12px; border-left: 4px solid var(--sun); background: var(--sun-soft); border-radius: 0 10px 10px 0; font-size: .92rem; }
details.list { margin-top: 10px; font-size: .9rem; }
details.list summary { cursor: pointer; color: var(--neon); }
details.list ol { font-family: var(--mono); columns: 2; column-gap: 18px; padding-left: 2.6em; margin: 8px 0 0; }
.warn { color: var(--amber); font-size: .9rem; min-height: 1.4em; margin: 4px 0 0; }
.byline { margin: -4px 0 14px; font-size: .875rem; color: var(--muted); }

/* ---------- 文章內文 ---------- */
.prose { line-height: 1.9; }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose li { margin: .45em 0; padding-left: .15em; }
.prose ul li::marker { color: var(--neon); }
.prose ol li::marker { color: var(--neon); font-weight: 700; }
.prose h2, main > h2 {
  display: flex; align-items: center; gap: 10px;
  margin-top: 2.4em; margin-bottom: .8em; font-size: 1.25rem;
  background: linear-gradient(90deg, rgba(34, 211, 160, .16), transparent 85%);
  border-left: 4px solid var(--neon); border-radius: 0 10px 10px 0; padding: 7px 12px;
}
.prose h2::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--sun); transform: rotate(45deg); box-shadow: 0 0 10px var(--sun); }
.prose h3 { color: var(--neon); border-left: 3px solid var(--sun); padding-left: 10px; margin-top: 1.7em; margin-bottom: .5em; font-size: 1.06rem; }
.prose h2 + h3 { margin-top: 1em; }
.prose h3 + p, .prose h2 + p { margin-top: .7em; }
.formula {
  font-family: var(--mono); background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; overflow-x: auto; color: #d8fff0;
}
.prose .formula { margin: 1.1em 0 1.3em; padding: 14px 16px; line-height: 1.95; border-left: 5px solid var(--sun); border-radius: 0 10px 10px 0; }
.prose .note, .note { margin: 1.4em 0 0; }
.prose .sub { line-height: 1.75; }

/* 開頭大圖、圖解：置中，跟內文欄同寬 */
.hero-img, .diagram { margin: 18px auto 22px; text-align: center; }
.hero-img img, .diagram img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; border-radius: 14px; border: 1px solid var(--line); background: var(--card-solid); box-shadow: 0 0 24px rgba(34, 211, 160, .12); }
.diagram figcaption { text-align: center; padding: 0 4px; font-size: .9rem; color: var(--muted); margin-top: 8px; }

/* 表格：斑馬紋、手機可橫捲、數字靠右 */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.1em 0 1.3em; border-radius: 10px; border: 1px solid var(--line-soft); }
.receipt .tbl, .card .tbl { margin: 0; border: 0; }
table.t { line-height: 1.6; }
.prose table.t { font-size: .95rem; }
.prose table.t thead th { background: rgba(34, 211, 160, .14); color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--neon); white-space: nowrap; padding: 9px 10px; }
.prose table.t th, .prose table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
.prose table.t tbody tr:nth-child(even) td { background: rgba(34, 211, 160, .05); }
.prose table.t tbody tr:last-child td { border-bottom: 0; }
.prose table.t td:first-child { font-family: var(--sans); font-weight: 600; }
.prose table.plays th, .prose table.plays td { white-space: normal; }
.prose table.plays td:first-child { white-space: nowrap; }
.prose .card:has(.tbl) { padding: 0; overflow: hidden; }
.card:has(> table.t), .card:has(> .tbl) { overflow-x: auto; }

/* 常見問題：每題分隔清楚 */
.prose .faq-h ~ h3 {
  display: flex; gap: 10px; align-items: baseline; color: var(--ink);
  border: 0; border-top: 1px dashed var(--line); padding: 1.1em 0 0; margin: 1.1em 0 .4em;
}
.prose .faq-h ~ h3::before { content: "問"; flex: none; font: 800 .875rem/1 var(--sans); color: #06110d; background: var(--neon); border-radius: 6px; padding: 4px 6px; box-shadow: 0 0 10px rgba(34, 211, 160, .5); }
.prose .faq-h ~ h3 + p { padding-left: 2.2em; }
.prose .faq-h ~ h3:first-of-type { border-top: 0; padding-top: 0; }

/* ---------- 卡片：有小圖 ---------- */
.pgrid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin: 14px 0 6px; }
@media (min-width: 560px) { .pgrid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.pcard {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.pcard:hover, .pcard:focus-visible { transform: translateY(-3px); border-color: var(--neon); box-shadow: var(--glow); color: var(--ink); }
.pc-img { position: relative; display: block; aspect-ratio: 3 / 2; background: linear-gradient(135deg, #0f2a22, #0b1512); border-bottom: 1px solid var(--line-soft); }
.pc-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pc-n {
  position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font: 800 1rem var(--mono); background: var(--sun); color: var(--on-sun); box-shadow: 0 0 14px rgba(245, 179, 1, .7);
}
.pc-b { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 13px; }
.pc-b strong { font-size: .98rem; line-height: 1.4; color: #fff; }
.pc-b > span { color: var(--muted); font-size: .875rem; line-height: 1.55; }
.pgrid.big { grid-template-columns: repeat(2, 1fr); }
.pgrid.steps { grid-template-columns: 1fr; }
@media (min-width: 560px) { .pgrid.steps { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .pgrid.big { grid-template-columns: repeat(4, 1fr); } .pgrid.sm { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } .pgrid.steps { grid-template-columns: repeat(3, 1fr); } }
.pgrid.big .pcard { border-top: 3px solid var(--neon); }
.pgrid.big .pc-b strong { font-size: 1.08rem; }
.pgrid.big .pc-b::after { content: "開始算 →"; margin-top: 6px; color: var(--neon); font-weight: 700; font-size: .9rem; }

/* 區塊：玻璃面板＋小標籤＋大標題（首頁與分類頁共用） */
.blk {
  margin: 0 0 22px; padding: 20px 16px 18px;
  background: linear-gradient(180deg, rgba(16, 38, 32, .55), rgba(11, 21, 18, .35));
  border: 1px solid var(--line-soft); border-radius: 18px;
}
.grp-h, .sec-h { display: block; position: relative; margin: 0 0 .3em; padding: 0; background: none; border: 0; font-size: 1.35rem; letter-spacing: .04em; }
.grp-h::before, .sec-h::before {
  content: attr(data-k); display: block; width: auto; height: auto; background: none; box-shadow: none; border-radius: 0; transform: none;
  font: 700 .875rem/1 var(--mono); letter-spacing: .18em; color: var(--neon); margin-bottom: 8px;
}
.grp-h::before { content: "— " attr(data-k); }
.sec-h::before { content: "— " attr(data-k); }
.sec-h .more { float: right; display: inline-flex; align-items: center; min-height: 48px; margin-top: -.3em; font-size: .95rem; font-weight: 400; letter-spacing: 0; }
.rel { margin-top: 36px; }
.rel h2 { font-size: 1.2rem; margin: 0 0 .4em; background: none; border: 0; padding: 0; display: block; }
.rel h2::before { content: "— RELATED"; display: block; font: 700 .875rem/1 var(--mono); letter-spacing: .18em; color: var(--neon); margin-bottom: 8px; }

/* ---------- 橫幅（首頁、分類頁）：圖當底，文字置中 ---------- */
.banner {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  background: radial-gradient(120% 140% at 50% 0, #123a30 0%, #0b1512 70%);
  border: 1px solid var(--line); border-radius: 22px; padding: 34px 18px 22px; margin-bottom: 22px;
  box-shadow: 0 0 40px rgba(34, 211, 160, .12), inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.bn-img { position: absolute; inset: 0; margin: 0; z-index: -1; }
.bn-img img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .26; filter: saturate(1.1); }
.bn-img::after { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 100% at 50% 40%, rgba(11, 21, 18, .55), rgba(11, 21, 18, .92)); }
.bn-text { max-width: 760px; margin: 0 auto; }
.eyebrow-chip {
  display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(11, 21, 18, .6); color: var(--neon);
  font: 700 .875rem/1.2 var(--mono); letter-spacing: .1em;
}
.banner h1 { border: 0; padding: 0; margin: 0 0 .35em; font-size: 2.1rem; letter-spacing: .06em; color: #fff; text-shadow: 0 0 28px rgba(34, 211, 160, .55); }
.banner .byline { margin: -2px 0 10px; }
.bn-lede { font-size: 1.05rem; margin: 0 0 1.1em; line-height: 1.85; color: var(--ink); }
.bn-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; }
.bigbtn {
  flex: 1 1 150px; text-align: center; text-decoration: none; font-weight: 800; font-size: 1.08rem; letter-spacing: .04em;
  padding: 14px 20px; min-height: 52px; border-radius: 12px; background: var(--neon); color: #06110d; box-shadow: 0 0 22px rgba(34, 211, 160, .45);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.bigbtn.alt { background: var(--sun); color: var(--on-sun); box-shadow: 0 0 22px rgba(245, 179, 1, .4); }
.bigbtn:hover { color: #06110d; filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 0 32px rgba(34, 211, 160, .7); }
.bigbtn.alt:hover { color: var(--on-sun); box-shadow: 0 0 32px rgba(245, 179, 1, .65); }
.bn-stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 760px; margin: 26px auto 0; padding: 0; }
.bn-stats li { background: rgba(11, 21, 18, .65); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bn-stats b { display: block; white-space: nowrap; font: 800 1.15rem/1.2 var(--mono); color: var(--amber); text-shadow: 0 0 14px rgba(245, 179, 1, .4); }
.bn-stats span { display: block; font-size: .875rem; color: var(--muted); margin-top: 2px; }
@media (min-width: 760px) {
  .banner { padding: 52px 40px 30px; }
  .banner h1 { font-size: 2.9rem; }
  .bigbtn { flex: 0 1 auto; min-width: 190px; }
  .bn-stats b { font-size: 1.7rem; }
  .bn-stats li { padding: 14px 6px; }
}
/* 分類頁橫幅小一點 */
body.wide:not(.home) .banner { padding: 28px 18px 24px; }
body.wide:not(.home) .banner h1 { font-size: 1.7rem; }
@media (min-width: 760px) { body.wide:not(.home) .banner { padding: 38px 40px; } body.wide:not(.home) .banner h1 { font-size: 2.3rem; } }
.banner .bn-lede a { color: var(--sun); }

/* 最新一期開獎 */
.latest {
  display: grid; gap: 10px 16px; align-items: center; grid-template-columns: 1fr; text-decoration: none; color: var(--ink);
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-left: 4px solid var(--sun); border-radius: 14px; padding: 14px 16px; margin: 10px 0 0;
}
.latest:hover { border-color: var(--neon); border-left-color: var(--sun); box-shadow: var(--glow); color: var(--ink); }
.lt-h { display: flex; flex-direction: column; }
.lt-h b { font-size: 1.05rem; }
.lt-h small { color: var(--muted); font-size: .9rem; font-family: var(--mono); }
.lt-balls { display: flex; gap: 8px; flex-wrap: wrap; }
.lt-go { color: var(--neon); font-weight: 700; font-size: 1rem; }
@media (min-width: 760px) { .latest { grid-template-columns: auto 1fr auto; } .lt-balls { justify-content: center; } }

/* ---------- 開獎紀錄、發光球 ---------- */
table.draws td small { color: var(--muted); font-family: var(--sans); font-size: .875rem; }
.ball {
  display: inline-block; width: 1.9em; height: 1.9em; line-height: 1.9em; margin: 1px 2px;
  border-radius: 50%; text-align: center; font-family: var(--mono); font-weight: 800;
  background: radial-gradient(circle at 35% 30%, #ffe28a, var(--sun) 60%, #c98f00);
  color: var(--on-sun);
  box-shadow: 0 0 10px rgba(245, 179, 1, .5), inset 0 -2px 3px rgba(0, 0, 0, .2);
}
.ball.lg { width: 2.5em; height: 2.5em; line-height: 2.5em; margin: 0; font-size: 1.15rem; box-shadow: 0 0 14px rgba(245, 179, 1, .6), inset 0 -2px 3px rgba(0, 0, 0, .2); }
@media (max-width: 420px) { table.draws td:nth-child(2) { display: none; } table.draws th:nth-child(2) { display: none; } }

/* 版路表 */
.lu-wrap { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.lu { border-collapse: collapse; font: 600 .875rem/1 var(--mono); font-variant-numeric: tabular-nums; }
table.lu th, table.lu td { min-width: 30px; height: 30px; padding: 0; text-align: center; border: 1px solid rgba(159, 184, 173, .14); }
table.lu thead th, table.lu tfoot th { color: var(--muted); background: #0e211b; }
table.lu tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 56px; padding: 0 4px; background: #0e211b; color: var(--muted); font-weight: 400; }
table.lu tr > :nth-child(10n+2):not(:nth-child(2)) { border-left: 2px solid rgba(34, 211, 160, .5); }
table.lu td.hit { background: var(--sun); color: var(--on-sun); font-weight: 800; box-shadow: inset 0 0 8px rgba(255, 255, 255, .25); }
.win { color: var(--amber); font-weight: 800; }
.lu-hint { margin-top: 6px; }
@media (min-width: 760px) { .lu-hint { display: none; } }
ol.stat { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 8px; }
ol.stat li { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; font-size: .9rem; }
ol.stat .ball { margin: 0; grid-row: span 3; }
ol.stat b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
ol.stat i { display: block; height: 4px; border-radius: 2px; background: var(--neon); box-shadow: 0 0 8px rgba(34, 211, 160, .6); }
ol.stat small { color: var(--muted); font-size: .875rem; line-height: 1.4; }
@media (min-width: 560px) { ol.stat { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { ol.stat { grid-template-columns: repeat(5, 1fr); } }

/* 運彩工具 */
table.plays th, table.plays td { text-align: left; font-family: var(--sans); }
table.plays td:first-child { font-weight: 600; white-space: nowrap; }
.legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.legs li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.leg-no { min-width: 3.6em; color: var(--muted); font-size: .95rem; }
.legs input[name="odds"] { width: 6.5em; }
.field select { font-family: var(--sans); max-width: 100%; }
.push { font-size: .95rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-height: 48px; }
.push input { width: 22px; height: 22px; }
.odds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.odds-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
.odds-grid input { width: 100%; font-size: 1.1rem; }

/* 手機：黏底結果列（在底部分頁列上方，兩者不重疊） */
.live {
  position: fixed; left: 8px; right: 8px; z-index: 39; cursor: pointer;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 6px);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 56px;
  background: #0d2a22; color: var(--ink); border: 1px solid var(--neon); border-radius: 12px; padding: 6px 14px;
  font: 700 1rem/1.3 var(--sans); box-shadow: 0 0 18px rgba(34, 211, 160, .35), 0 4px 14px rgba(0, 0, 0, .5);
}
.live[hidden] { display: none; }
.live .lv-t { min-width: 0; }
.live .nw { white-space: nowrap; }
.live .lv-t b { font: 800 1.4rem/1.2 var(--mono); color: var(--amber); }
.live a { flex: none; display: inline-flex; align-items: center; min-height: 48px; color: var(--neon); font-family: var(--sans); font-size: .95rem; text-decoration: none; }
body.has-live { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 96px); }
@media (min-width: 760px) { .live { display: none; } body.has-live { padding-bottom: 0; } }

/* 計算結果下方的一行導流 */
.rc-go { margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rc-go a {
  display: inline-block; background: var(--sun); color: var(--on-sun); text-decoration: none; font-weight: 800;
  padding: 10px 16px; min-height: 48px; display: inline-flex; align-items: center; border-radius: 10px; box-shadow: 0 0 16px rgba(245, 179, 1, .35);
}
.rc-go a:hover { color: var(--on-sun); filter: brightness(1.06); box-shadow: 0 0 24px rgba(245, 179, 1, .6); }
.rc-go small { color: var(--muted); font-size: .875rem; }

/* 分頁列第 5 格：開始遊戲 */
.tabbar a.tab-go { color: var(--on-sun); background: var(--sun); font-weight: 800; margin: 6px 6px 6px 2px; border-radius: 12px; box-shadow: 0 0 14px rgba(245, 179, 1, .4); }
.tabbar a.tab-go span { white-space: nowrap; }
.tabbar a.tab-go small { font: 700 .875rem var(--mono); margin-left: 1px; }

/* ---------- 合作平台框 ---------- */
.tally {
  display: grid; grid-template-columns: 1fr; gap: 0; margin: 34px auto 8px; padding: 20px 20px 16px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 100% 0, rgba(245, 179, 1, .18), transparent 42%), linear-gradient(135deg, rgba(34, 211, 160, .14) 0%, rgba(11, 21, 18, .8) 70%);
  border: 1px solid rgba(34, 211, 160, .4); border-left: 5px solid var(--neon); border-radius: 18px;
  box-shadow: 0 0 30px rgba(34, 211, 160, .14), 0 10px 26px rgba(0, 0, 0, .3);
}
.tally-k { display: flex; gap: 8px; margin: 0 0 6px; align-items: center; }
.tally-k span { font: 800 .875rem/1 var(--sans); letter-spacing: .04em; padding: 5px 9px; border-radius: 999px; }
.tally-k span:first-child { background: var(--neon); color: #06110d; }
.tally-k span:last-child { border: 1.5px solid var(--amber); color: var(--amber); }
.tally-h { font-weight: 800; font-size: 1.2rem; line-height: 1.45; margin: 4px 0 6px; color: #fff; }
.tally-p { margin: 0 0 14px; line-height: 1.8; }
.tally-art { display: none; }
.tally.has-art .tally-art { display: block; width: 100%; max-width: 420px; height: auto; aspect-ratio: 3 / 2; object-fit: contain; margin: 4px auto 12px; }
.tally-go {
  display: block; text-align: center; margin: 2px 0 0; padding: 14px 18px; min-height: 52px; font-size: 1.08rem; font-weight: 800; border-radius: 12px;
  background: var(--sun); color: var(--on-sun) !important; text-decoration: none !important; box-shadow: 0 0 22px rgba(245, 179, 1, .45);
  transition: transform .15s, box-shadow .15s;
}
.tally-go:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 0 32px rgba(245, 179, 1, .7); }
.disclose { font-size: .875rem; color: var(--muted); margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); line-height: 1.65; }

/* ---------- 頁尾 ---------- */
footer.site { margin: 8px 0 0; padding: 20px var(--gut) 30px; color: var(--muted); font-size: .875rem; border-top: 1px solid var(--line); background: rgba(8, 18, 15, .6); }
footer.site a { color: var(--muted); display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; }
footer.site a:hover { color: var(--neon); }

/* ---------- 桌機 ---------- */
@media (min-width: 760px) {
  body { padding-bottom: 0; }
  main { padding: 28px 16px 48px; }
  .tabbar {
    position: static; display: flex; height: auto; padding: 0; background: none; border: 0; gap: 4px; margin-left: auto;
  }
  .tabbar a { flex-direction: row; font-size: .95rem; padding: 6px 16px; min-height: 48px; border-radius: 999px; gap: 6px; color: var(--ink); }
  .tabbar a svg { width: 18px; height: 18px; }
  .tabbar a:hover { background: rgba(34, 211, 160, .14); color: var(--neon); }
  .tabbar a[aria-current="page"] { background: rgba(34, 211, 160, .16); color: var(--neon); box-shadow: inset 0 0 0 1px var(--line); }
  .tabbar a.tab-go { margin: 0 0 0 6px; border-radius: 999px; color: var(--on-sun); }
  .tabbar a.tab-go:hover { background: #ffc61a; color: var(--on-sun); }
  .top .crumb { display: none; }
  h1 { font-size: 1.9rem; }
  .calc { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .calc .receipt { position: sticky; top: 84px; }
  .grid39 { grid-template-columns: repeat(8, 1fr); gap: 6px; }
  .blk { padding: 26px 26px 22px; }
  .tally { padding: 24px 28px 18px; }
  .tally.has-art { grid-template-columns: 1fr 240px; column-gap: 28px; }
  .tally.has-art > * { grid-column: 1; }
  .tally.has-art .tally-art { grid-column: 2; grid-row: 1 / span 4; width: 240px; max-width: none; margin: 0; align-self: center; }
  .tally-go { display: inline-block; align-self: start; justify-self: start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 標題換行平均，避免最後一行只剩一個字 */
h1, h2, h3, .tally-h { text-wrap: balance; }

/* ---------- 2026-11-22 手機跑版修正 ---------- */
/* 段落、表格格子：避免最後一行只剩一個字（孤字） */
p, li, td, th, figcaption, .pc-b > span, .sub, .note, .lede, .bn-lede, .tally-p, .disclose { text-wrap: pretty; }
/* 短標籤、按鈕、卡片標題：兩行時左右平均 */
.pc-b strong, .sec-h, .grp-h, .rc-go a, .bn-stats span, .lt-h b, .btn, .bigbtn, .tally-go, .live .lv-t { text-wrap: balance; }
/* 可橫捲的表格：左右邊緣加淡淡的光，讓人知道可以滑 */
.tbl, .lu-wrap {
  background:
    linear-gradient(90deg, var(--card-solid) 30%, transparent) left center / 28px 100% no-repeat local,
    linear-gradient(270deg, var(--card-solid) 30%, transparent) right center / 28px 100% no-repeat local,
    linear-gradient(90deg, rgba(34, 211, 160, .35), transparent) left center / 12px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(34, 211, 160, .35), transparent) right center / 12px 100% no-repeat scroll;
}
@media (max-width: 600px) {
  /* 表頭可換行、格子縮邊，讓多數表格在手機寬度內放得下 */
  .prose table.t thead th { white-space: normal; padding: 9px 8px; }
  .prose table.t th, .prose table.t td { padding: 9px 8px; }
  /* 結果表：數字與單位不拆行 */
  .receipt table.t th:first-child { white-space: nowrap; }
  .receipt table.t td:not(:first-child):not([data-out="diff"]) { font-size: 1.125rem; white-space: nowrap; }
}
/* 小字不低於 14px（<small>、上標原本是瀏覽器預設的縮小字） */
small { font-size: .875rem; }
sup { font-size: .875rem; line-height: 0; }
/* 首頁「完整計算器 →」浮動連結原本會伸到下方，把快速試算卡擠成只剩 214px 寬；讓標題把浮動框包起來 */
.sec-h { display: flow-root; }
/* 卡片標題不在詞中間斷開（「539 連／碰計算器」），只在空白與頓號處換行；真的太長才硬斷 */
.pc-b strong { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 600px) { .prose table.t thead th { word-break: keep-all; overflow-wrap: anywhere; } }
/* 「開始遊戲 18+」：沒有箭頭，文字置中、不換行 */
.tabbar a.tab-go { text-align: center; justify-content: center; }
.tabbar a.tab-go span { display: block; white-space: nowrap; }

/* 手機：串關每一場排成一行，「刪」不再掉到下一行；結果列斜線不落行首 */
@media (max-width: 480px) {
  .legs li { flex-wrap: nowrap; gap: 6px; }
  .leg-no { min-width: 0; white-space: nowrap; }
  .legs input[name="odds"] { width: 5.2em; min-width: 0; flex: 0 1 auto; }
  .legs .push { gap: 4px; white-space: nowrap; }
  .legs .btn { padding-left: 12px; padding-right: 12px; margin-left: auto; flex: none; }
}
/* 5 欄以上的表格：每欄保留最小寬度、格內不拆行，寬度不夠就在外框左右滑（不再擠成一字一行） */
@media (max-width: 600px) {
  .prose table.t:has(th:nth-child(5)) th, .prose table.t:has(th:nth-child(5)) td { min-width: 5.5em; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
  .prose table.t:has(th:nth-child(5)) th:first-child, .prose table.t:has(th:nth-child(5)) td:first-child { min-width: 4em; }
}
/* 手機：表格第一欄至少留 4.5 字寬（「不讓分」「大小分」不再被擠成一字一行） */
@media (max-width: 600px) {
  .prose table.t th:first-child, .prose table.t td:first-child { min-width: 4.5em; word-break: keep-all; }
}

/* 文章內表格：表頭與內容文字全部置中（含第一欄）；計算器結果區、開獎紀錄、版路表不動 */
.prose table.t:not(.draws):not(.lu):not(.receipt *) th, .prose table.t:not(.draws):not(.lu):not(.receipt *) td,
.prose table.plays th, .prose table.plays td { text-align: center; }

/* ---------- 2026-11-24 浮動按鈕檢查 ---------- */
/* 麵包屑連結點擊區至少 44px 高（原本只有 18px） */
.top .crumb a { display: inline-flex; align-items: center; min-height: 44px; }
/* 手機輸入文字、跳出鍵盤時：收起底部分頁列與結果列、頂部導覽不再黏著，
   把空間還給輸入框（不然 330px 高的畫面只剩 127px 可看）。 */
@media (max-width: 759px) {
  body:has(input:focus:not([type="checkbox"]):not([type="radio"]):not([type="button"]), select:focus, textarea:focus) .tabbar,
  body:has(input:focus:not([type="checkbox"]):not([type="radio"]):not([type="button"]), select:focus, textarea:focus) .live { display: none; }
  body:has(input:focus:not([type="checkbox"]):not([type="radio"]):not([type="button"]), select:focus, textarea:focus) { padding-bottom: 24px; }
}
/* 畫面很矮（橫放手機、或鍵盤把可視高度壓小）：頂部導覽不黏、結果列收起 */
@media (max-width: 759px) and (max-height: 480px) {
  .top { position: static; }
  .live { display: none; }
  body.has-live { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 24px); }
}
/* 輸入框被瀏覽器捲進畫面時，避開頂部導覽與底部固定列 */
html { scroll-padding-top: 84px; scroll-padding-bottom: 150px; }
@media (min-width: 760px) { html { scroll-padding-bottom: 24px; } }
/* 桌機/平板畫面不夠高時，結果欄比視窗還高會被黏住看不到下半部，這時不黏 */
@media (min-width: 760px) and (max-height: 700px) { .calc .receipt { position: static; } }

/* ---------- 2026-11-24 漂浮按鈕：桌機「開始遊戲 18+」＋全站「回到頂部」 ---------- */
.fab-go { display: none; }
.fab-top {
  position: fixed; right: 12px; z-index: 38; width: 48px; height: 48px; padding: 0; cursor: pointer;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 14px);
  display: inline-flex; align-items: center; justify-content: center;
  background: #0d2a22; color: var(--neon); border: 1px solid var(--neon); border-radius: 50%;
  box-shadow: 0 0 14px rgba(34, 211, 160, .35), 0 4px 12px rgba(0, 0, 0, .5);
}
.fab-top[hidden] { display: none; }
.fab-top:hover { background: #12392e; }
/* 手機：結果列出現時，回到頂部鈕移到結果列上方，不互相重疊 */
body.has-live .fab-top { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 82px); }
@media (max-width: 759px) {
  body:has(input:focus:not([type="checkbox"]):not([type="radio"]):not([type="button"]), select:focus, textarea:focus) .fab-top { display: none; }
}
@media (max-width: 759px) and (max-height: 480px) { .fab-top { display: none; } }
@media (min-width: 760px) {
  .fab-go {
    position: fixed; right: 24px; bottom: 24px; z-index: 38; display: inline-flex; align-items: center; justify-content: center; gap: 2px;
    min-height: 52px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 1.05rem;
    background: var(--sun); color: var(--on-sun); box-shadow: 0 0 20px rgba(245, 179, 1, .5), 0 4px 14px rgba(0, 0, 0, .45);
    transition: transform .15s, box-shadow .15s, opacity .2s;
  }
  .fab-go small { font: 700 .875rem var(--mono); margin-left: 2px; }
  .fab-go:hover { color: var(--on-sun); filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 0 30px rgba(245, 179, 1, .75), 0 6px 16px rgba(0, 0, 0, .45); }
  .fab-top { right: 24px; bottom: 90px; }
  body.has-live .fab-top { bottom: 90px; }
  /* 捲到頁尾時收起「開始遊戲」，不蓋住頁尾文字（頂端導覽那顆一直都在） */
  html.at-end .fab-go { opacity: 0; pointer-events: none; }
}
@media (min-width: 760px) and (max-height: 480px) { .fab-go { display: none; } .fab-top { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .fab-go { transition: none; } }

/* ---------- 2026-11-25 539 拖牌表 ---------- */
.prose table.t.tp th, .prose table.t.tp td { padding: 8px 3px; vertical-align: middle; }
.prose table.t.tp th:first-child, .prose table.t.tp td:first-child { width: 3em; min-width: 3em; }
.prose table.t.tp th:nth-child(2), .prose table.t.tp td:nth-child(2) { width: 2.8em; }
.tp-top { line-height: 1.3; }
.tp-c { display: inline-block; min-width: 2.7em; margin: 2px 1px; padding: 3px 1px; border: 1px solid var(--line-soft); border-radius: 8px; vertical-align: top; }
.tp-c b { display: block; font-size: 1rem; color: var(--ink); }
.tp-c small { display: block; color: var(--muted); white-space: nowrap; }
details.tp-full { margin: 0 0 1.3em; font-size: 1rem; }
details.tp-full summary { min-height: 48px; display: flex; align-items: center; justify-content: center; }
table.lu.tp-mx td { color: var(--ink); font-weight: 400; }
.tp-tool { margin: 0 0 1.5em; } .tp-tool .grid39 { max-width: 520px; }
.tp-sum { font-weight: 700; margin: 8px 0 4px; }
.tp-sum b { color: var(--amber); font-size: 1.25rem; }
ol.tp-res { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; }
ol.tp-res li { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0; padding: 4px; border: 1px solid var(--line-soft); border-radius: 10px; font-size: .9rem; white-space: nowrap; }
ol.tp-res li .ball { margin: 0; }
ol.tp-res li.zero { opacity: .55; }
ul.tp-hist { list-style: none; margin: 8px 0 0; padding: 0; }
ul.tp-hist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: 0; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }

/* ---------- 2026-11-25 版路表補厚 ---------- */
.bl-r { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bl-seg { text-align: center; margin: 10px auto; }
.seg label { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 76px; padding: 0 12px; border-radius: 999px; color: var(--muted); cursor: pointer; }
#blg30:checked ~ .bl-seg label[for="blg30"],
#blg50:checked ~ .bl-seg label[for="blg50"],
#blg100:checked ~ .bl-seg label[for="blg100"],
#bld30:checked ~ .bl-seg label[for="bld30"],
#bld50:checked ~ .bl-seg label[for="bld50"],
#bld100:checked ~ .bl-seg label[for="bld100"] { background: var(--neon); color: #06110d; font-weight: 800; box-shadow: 0 0 14px rgba(34, 211, 160, .5); }
#blg30:focus-visible ~ .bl-seg label[for="blg30"],
#blg50:focus-visible ~ .bl-seg label[for="blg50"],
#blg100:focus-visible ~ .bl-seg label[for="blg100"],
#bld30:focus-visible ~ .bl-seg label[for="bld30"],
#bld50:focus-visible ~ .bl-seg label[for="bld50"],
#bld100:focus-visible ~ .bl-seg label[for="bld100"] { outline: 2px solid var(--sun); outline-offset: 2px; }
tr.bl-b, tr.bl-c { display: none; }
#blg50:checked ~ .bl-g tr.bl-b,
#blg100:checked ~ .bl-g tr.bl-b,
#blg100:checked ~ .bl-g tr.bl-c,
#bld50:checked ~ .bl-d tr.bl-b,
#bld100:checked ~ .bl-d tr.bl-b,
#bld100:checked ~ .bl-d tr.bl-c { display: table-row; }
.bl-now p { margin: 0; }
.bl-now .bl-now-k { color: var(--amber); font-weight: 700; margin-bottom: 4px; }
table.bl-t { width: 100%; border-collapse: collapse; font: .875rem/1.35 var(--mono); font-variant-numeric: tabular-nums; }
table.bl-t th, table.bl-t td { padding: 7px 4px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
table.bl-t thead th { color: var(--muted); font-family: var(--sans); background: #0e211b; }
table.bl-t tbody th { font-weight: 400; color: var(--muted); }
table.bl-t tbody tr:nth-child(even) > * { background: rgba(34, 211, 160, .05); }
.lu-wrap table.bl-t tr > :first-child { position: sticky; left: 0; z-index: 1; background: #0e211b; }
table.bl-t td.bl-tail { color: var(--muted); }
.bl-gap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
.bl-gap > .card { padding: 4px; margin: 0; min-width: 0; }

/* ---------- 2026-11-25 開獎對獎 ---------- */
.calc .check { min-width: 0; text-align: center; }
@media (min-width: 760px) { .calc .check { grid-column: 1; } .calc:has(> .check) > .receipt { grid-column: 2; grid-row: 1 / span 2; } }
.check p { margin: 0 0 8px; }
.check-h { font-weight: 800; font-size: 1.15rem; }
.check-latest, .check-or { color: var(--muted); font-size: .95rem; }
.check .nw { white-space: nowrap; }
.check .btn { min-height: 48px; width: 100%; max-width: 360px; }
.check-go { background: var(--neon); color: #06110d; font-weight: 800; border-color: var(--neon); }
.check-or { margin-top: 14px !important; }
.draw-in { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 360px; margin: 0 auto 8px; }
.draw-in input { width: 100%; min-width: 0; min-height: 48px; padding: 0 2px; text-align: center; font: 700 1.15rem var(--mono); color: var(--ink); background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 10px; -moz-appearance: textfield; appearance: textfield; }
.draw-in input::-webkit-inner-spin-button, .draw-in input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.draw-in input:focus { outline: 0; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(34, 211, 160, .25); }
.check-out:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.check-sum { font-size: 1.1rem; font-weight: 700; }
.check-sum b { color: var(--amber); font: 800 1.7rem var(--mono); }
.check-out p b { font-family: var(--mono); }
ol.check-win { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
ol.check-win li { margin: 0; padding: 6px 10px; border: 1px solid var(--neon); border-radius: 10px; font: 700 1rem var(--mono); white-space: nowrap; }
.check-all { font-size: .95rem; color: var(--muted); }
.check .check-src { margin: 12px 0 0; font-size: .875rem; color: var(--muted); }

/* ---------- 2026-11-25 手機版檢查：點擊區補到 44px、版路表窄螢幕 ---------- */
@media (max-width: 759px) {
  /* 「看全部組合」「看最近 N 次」原本只有 25px 高 */
  details.list summary { padding: 10px 0; }
  .top .crumb a { min-width: 44px; justify-content: center; }
  .legs .btn { min-width: 44px; }
}
/* 360 寬：大小單雙版路表剛好放得下，尾數不用左右滑 */
@media (max-width: 374px) { .lu-wrap table.bl-t th, .lu-wrap table.bl-t td { padding-left: 2px; padding-right: 2px; } }
