:root {
  --bg: #0b0d12; --panel: #141821; --panel-2: #1a1f2b; --line: #262d3b; --text: #e9ecf2; --muted: #8b93a5;
  --gold: #e7c36a; --gold-2: #b98e2f; --red: #e5484d; --blue: #3b82f6; --green: #22a565; --danger: #ff6b6b;
  --radius: 14px; --font: ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* —— 顶栏 —— */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: rgba(11, 13, 18, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1b1404; font-weight: 800; font-size: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 17px; letter-spacing: .08em; color: var(--gold); }
.brand-text small { color: var(--muted); font-size: 11px; letter-spacing: .2em; }
.tabs { display: flex; gap: 4px; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex-shrink: 0; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tabs a:hover { color: var(--text); background: var(--panel); }
.tabs a.on { color: #1b1404; background: var(--gold); font-weight: 600; }
.clock { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.clock span { font: 600 15px var(--mono); font-variant-numeric: tabular-nums; }
.clock small { color: var(--muted); font-size: 10px; }
.guide-link { flex-shrink: 0; padding: 6px 12px; border: 1px solid var(--gold-2); border-radius: 999px; color: var(--gold); font-size: 13px; white-space: nowrap; }
.guide-link:hover { background: rgba(231, 195, 106, .1); }

/* —— 版面:主列 + 右侧栏 —— */
.view { max-width: 1320px; margin: 0 auto; padding: 16px 20px; min-height: 60vh; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.main-col, .side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.panel-title { display: flex; align-items: baseline; gap: 10px; font-size: 15px; color: var(--gold); letter-spacing: .08em; margin-bottom: 10px; }
.panel-title::before { content: ""; display: inline-block; width: 3px; height: 14px; border-radius: 2px; background: var(--gold); vertical-align: -2px; }
.panel-title small { letter-spacing: 0; font-size: 12px; font-weight: 400; }
.mini-link { color: var(--gold); font-size: 12px; margin-left: 10px; }
.mini-link:hover { text-decoration: underline; }

/* 最新开奖横幅 */
.strip-rows { display: flex; flex-direction: column; }
.strip-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 130px; align-items: center; gap: 14px; padding: 10px 6px; border-top: 1px solid var(--line); transition: background .15s; }
.strip-row:first-child { border-top: 0; }
.strip-row:hover { background: var(--panel-2); border-radius: 10px; }
.strip-name { display: flex; flex-direction: column; gap: 2px; }
.strip-name b { font-size: 15px; }
.strip-name small { font-size: 11px; }
.strip-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.strip-next { display: flex; flex-direction: column; align-items: flex-end; }
.strip-next small { font-size: 11px; }

/* 近期开奖 */
.recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recent { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.recent-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.recent-head b { font-size: 14px; }
.recent-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.recent-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 62px; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 12px; }
.recent-row:first-child { border-top: 0; }
.pno { font-family: var(--mono); color: var(--muted); }
.recent-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.recent-result .tags { gap: 4px; }
.t { font-family: var(--mono); font-size: 11px; text-align: right; }

/* 快捷入口 */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.link-card { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: var(--gold-2); transform: translateY(-1px); }
.link-card b { color: var(--gold); font-size: 14px; }
.link-card small { font-size: 12px; }
.ai-note { margin-top: 10px; font-size: 12px; }

/* 右侧栏 */
.panel.side { padding: 12px 14px; }
.stats { list-style: none; margin: 0; padding: 0; }
.stats li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.stats li:first-child { border-top: 0; }
.stats b { font-family: var(--mono); color: var(--gold); }
.stats small { font-family: var(--mono); font-size: 11px; }
.ticker { list-style: none; margin: 0; padding: 0; }
.ticker li { border-top: 1px dashed var(--line); }
.ticker li:first-child { border-top: 0; }
.ticker a { display: grid; grid-template-columns: 58px 48px 36px minmax(0, 1fr); gap: 6px; align-items: center; padding: 6px 0; font-size: 12px; }
.ticker a:hover { color: var(--gold); }
.tk-name { font-weight: 600; }
.tk-pno { font-family: var(--mono); }
.tk-res .tags { gap: 4px; }
.tk-res .tag { padding: 1px 6px; font-size: 11px; }
.panel.guide .btn { margin-top: 10px; }
.notice { font-size: 13px; line-height: 1.7; white-space: pre-line; }

/* —— 结果元素 —— */
.balls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ball { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font: 700 15px var(--mono); color: #fff; background: #3a4254; }
.ball.digit { background: linear-gradient(145deg, #f4d98a, #b98e2f); color: #241a04; }
.ball.car { border-radius: 8px; width: 30px; height: 34px; }
.balls.sm { gap: 4px; }
.balls.sm .ball { width: 28px; height: 28px; font-size: 13px; }
.balls.sm .ball.car { width: 24px; height: 27px; border-radius: 6px; }
.car-1 { background: #e6c229; color: #2a2203; } .car-2 { background: #2f80ed; } .car-3 { background: #4f5d75; } .car-4 { background: #f2994a; }
.car-5 { background: #56ccf2; color: #062a36; } .car-6 { background: #6c4ae0; } .car-7 { background: #9aa3b2; color: #14181f; } .car-8 { background: #e5484d; }
.car-9 { background: #7a1f2b; } .car-10 { background: #22a565; }
/* 香港六合彩:球色 = 波色,球下小字 = 生肖,特码前「+」 */
.ball.wave-red { background: linear-gradient(145deg, #f0656a, #c3272d); }
.ball.wave-blue { background: linear-gradient(145deg, #5b9bff, #2160d0); }
.ball.wave-green { background: linear-gradient(145deg, #3fc580, #17844c); }
.m6-row { align-items: flex-start; }
.m6 { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.m6 small { font-size: 11px; line-height: 1; color: var(--muted); }
.plus { color: var(--muted); font: 700 15px var(--mono); padding: 0 1px; height: 36px; display: grid; place-items: center; }
.balls.sm .plus { height: 28px; font-size: 13px; }
.tag.wred, .dot.wred { background: rgba(229, 72, 77, .18); border-color: rgba(229, 72, 77, .5); color: #ff8a8e; }
.tag.wblue, .dot.wblue { background: rgba(59, 130, 246, .18); border-color: rgba(59, 130, 246, .5); color: #8ab4ff; }
.tag.wgreen, .dot.wgreen { background: rgba(34, 165, 101, .16); border-color: rgba(34, 165, 101, .5); color: #6fd4a0; }
.dot.wred, .dot.wblue, .dot.wgreen { border-radius: 8px; }
.warn-line { color: var(--gold); font-size: 13px; }
.link-card.off { opacity: .6; }
/* 多线路入口(11-06):卡片主体 = 第一条线路;下面一排线路按钮,窄屏自动换行不横滚 */
.link-card.multi { gap: 8px; }
.link-card.multi:hover { transform: none; }
.link-main { display: flex; flex-direction: column; gap: 3px; }
.link-main:hover b { text-decoration: underline; }
.link-title { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.link-icon { font-size: 15px; line-height: 1; }
.routes { display: flex; flex-wrap: wrap; gap: 6px; }
.route { max-width: 100%; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(231, 195, 106, .45); color: var(--gold); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.route:hover { background: rgba(231, 195, 106, .12); border-color: var(--gold); }
/* 线路多于 6 条(11-07):只显示前 6 个,其余收在「更多(N)」里;按钮与线路同款胶囊,虚线框区分 */
.route[hidden] { display: none; }
button.route.more-toggle { background: transparent; font-family: inherit; cursor: pointer; border-style: dashed; color: var(--muted); }
button.route.more-toggle:hover, button.route.more-toggle[aria-expanded="true"] { color: var(--gold); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 2px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 12px; white-space: nowrap; }
.tag.gold { background: rgba(231, 195, 106, .12); border-color: rgba(231, 195, 106, .4); color: var(--gold); }
.tag:empty { display: none; }
.hands { display: flex; flex-direction: column; gap: 6px; }
.hands.sm { flex-direction: row; align-items: center; gap: 6px; }
.hands.sm .card { width: 24px; height: 32px; }
.hands.sm .card b { font-size: 11px; }
.hands.sm .card i { font-size: 10px; }
.vs { color: var(--muted); font-size: 11px; }
.hand { display: flex; align-items: center; gap: 8px; }
.hand-name { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--panel-2); color: var(--muted); font-size: 12px; flex-shrink: 0; }
.hand.win .hand-name { background: var(--gold); color: #1b1404; font-weight: 700; }
.cards { display: flex; gap: 4px; flex-wrap: wrap; }
.card { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 30px; height: 40px; border-radius: 5px; background: #f6f7f9; color: #14181f; line-height: 1; }
.card b { font: 700 13px var(--mono); }
.card i { font-style: normal; font-size: 12px; }
.card.red { color: #d0353a; }
.cd { font: 700 18px var(--mono); font-variant-numeric: tabular-nums; color: var(--gold); }
.cd.soon { color: var(--danger); }
.cd.off { color: var(--muted); font-size: 14px; font-family: var(--font); }
.next { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.next small { color: var(--muted); font-size: 11px; }
.next.big .cd { font-size: 26px; }
.void { color: var(--danger); font-size: 13px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* —— 历史页 —— */
.hist-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.hist-head h1 { font-size: 20px; color: var(--gold); }
.hist-head .mini-link { margin-left: 0; display: inline-block; margin-top: 4px; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 16px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.row-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.row-meta b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.row-result { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.row .verify { margin-left: auto; white-space: nowrap; }
.btn { display: block; margin: 18px auto 0; padding: 10px 22px; border-radius: 10px; border: 1px solid var(--gold-2); background: transparent; color: var(--gold); font: inherit; cursor: pointer; }
a.btn { width: fit-content; text-align: center; }
.btn:hover:not(:disabled) { background: rgba(231, 195, 106, .1); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.solid { background: var(--gold); color: #1b1404; font-weight: 600; border-color: var(--gold); margin: 0; }
.btn.ghost { margin: 0; border-color: var(--line); color: var(--text); }
.btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }

/* —— 走势页 —— */
.trend-pick { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.seg a.on { background: var(--gold); color: #1b1404; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.stat-card > b { font-size: 14px; }
.stat-vals { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-vals .tag b { font-family: var(--mono); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.trend { width: 100%; border-collapse: collapse; font-size: 13px; }
.trend th, .trend td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.trend th { position: sticky; top: 0; background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: 12px; }
.trend td.cell-res { text-align: left; }
.trend tbody tr:hover { background: var(--panel-2); }
.dot { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 50%; font-size: 12px; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); }
.dot.big, .dot.dragon, .dot.banker, .tag.big, .tag.dragon, .tag.banker { background: rgba(229, 72, 77, .18); border-color: rgba(229, 72, 77, .5); color: #ff8a8e; }
.dot.small, .dot.tiger, .dot.player, .tag.small, .tag.tiger, .tag.player { background: rgba(59, 130, 246, .18); border-color: rgba(59, 130, 246, .5); color: #8ab4ff; }
.dot.odd, .tag.odd { background: rgba(231, 195, 106, .14); border-color: rgba(231, 195, 106, .45); color: var(--gold); }
.dot.even, .tag.even { background: rgba(34, 165, 101, .16); border-color: rgba(34, 165, 101, .5); color: #6fd4a0; }
.dot.tie, .tag.tie { background: rgba(34, 165, 101, .16); border-color: rgba(34, 165, 101, .5); color: #6fd4a0; }

.foot { max-width: 1320px; margin: 0 auto; padding: 24px 20px 40px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* —— AI 验证弹窗 —— */
.modal { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.modal::backdrop { background: rgba(0, 0, 0, .65); }
.modal-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 16px; color: var(--gold); }
.modal-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; }
.lead { font-size: 13px; line-height: 1.7; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; padding: 12px; border-radius: 10px; background: var(--bg); font-size: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-family: var(--mono); word-break: break-all; }
.link { color: var(--gold); text-decoration: underline; }
.pack { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: 12px/1.5 var(--mono); resize: vertical; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.msg { font-size: 13px; min-height: 20px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--green); }
.steps a, .lead a { color: var(--gold); text-decoration: underline; }

/* —— 响应式 —— */
/* 11-08 最新汇率(右侧栏,取自 ok0066.co,每 6 小时更新):汇率行醒目,声明小字 */
.rates .rate-lines { display: grid; gap: 4px; font-size: 13px; line-height: 1.6; }
.rates .rate-title { color: var(--text); margin-bottom: 2px; }
.rates .rate-row { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--gold); word-break: break-word; }
.rates .rate-note { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line); }
.rates .rate-foot { font-size: 11px; margin-top: 8px; }
.stale { color: var(--gold-2); }
/* 11-08 皇冠分红(导航页,取自 ok0066.co/xbfh.html,每 24 小时更新) */
.seg.years { flex-wrap: wrap; }
.div-latest b.amount { font-family: var(--mono); font-size: 26px; color: var(--gold); line-height: 1.2; }
.trend.dividend td.amount { color: var(--gold); font-weight: 600; }
.trend.dividend tr.latest td { background: rgba(231, 195, 106, .08); }
.trend.dividend tr.latest td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.div-note, .div-foot { font-size: 12px; margin-top: 10px; }
@media (max-width: 1024px) {
  .layout { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top { flex-wrap: wrap; padding: 8px 12px; gap: 8px 12px; }
  .tabs { order: 3; flex-basis: 100%; }
  .clock { margin-left: auto; }
  .view { padding: 12px; }
  .panel { padding: 12px; }
  .strip-row { grid-template-columns: 1fr auto; grid-template-areas: "name next" "res res"; gap: 6px 10px; }
  .strip-name { grid-area: name; }
  .strip-next { grid-area: next; }
  .strip-result { grid-area: res; }
  .recent-row { grid-template-columns: 36px minmax(0, 1fr) 52px; }
  .ball { width: 32px; height: 32px; font-size: 14px; }
  .ball.car { width: 26px; height: 30px; }
  .plus { height: 32px; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row .verify { margin-left: 0; justify-self: start; }
  .row-meta { flex-direction: row; align-items: center; gap: 10px; }
  .hist-head { flex-direction: column; align-items: flex-start; }
  .hist-head .next { align-items: flex-start; }
  .trend-pick { flex-direction: column; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }   /* 11-06:彩种多了(含六合彩)切换条会撑出页面,限宽后条内横滑 */
}
