/* Local interactions use the captured reference layout and styles. */
.lottery-realtime-list[data-lottery-list] { height:auto; }
/* These layouts survive replacement of the editable, sanitized column HTML. */
[data-portal-section] .box1 { margin:1px 0; border-radius:5px; overflow:hidden; max-width:720px; background:linear-gradient(to right,#00be16,#03c71a,#04c11a,#02c719,#03b918,#04c31a,#00be16); }
[data-portal-section] .box1.pad1 { padding:0; }
[data-portal-section] .hao { font-size:14pt; text-align:center; font-weight:bold; }
[data-portal-section] .hao tr { background:linear-gradient(#ffff27,#fdfd47,#ffff24ad,#ffff24ad,#ffff34ad,#ffff24ad); }
[data-portal-section] .hao td { padding-top:5px; padding-bottom:5px; }
[data-portal-section] .g-nav-refresh.them-5 { width:100%; max-width:720px; box-sizing:border-box; padding:9px; border-radius:0; background:#00ac56; box-shadow:none; font-family:"Microsoft YaHei",Arial,Helvetica,sans-serif; }
[data-portal-section] .g-nav-refresh .nav-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) !important; padding:0; border-radius:8px; box-shadow:none; position:relative; }
[data-portal-section] .g-nav-refresh .nav-item { display:flex; flex-direction:column; align-items:center; justify-content:center; width:auto; min-width:0; margin:4px 3px; padding:0; box-sizing:border-box; overflow:hidden; border:3px solid rgba(255,255,255,.7); border-radius:30px; background:#fff; color:#fff; text-decoration:none; font-weight:bold; cursor:pointer; }
[data-portal-section] .g-nav-refresh .nav-item .nav-item-image { display:block; width:100%; max-width:100%; height:auto; object-fit:cover; }
[data-portal-section] .g-nav-refresh .nav-item-text { padding:5px; color:#000; font-size:18px; }
@media(max-width:600px) {
  [data-portal-section] .g-nav-refresh .nav-item { border-radius:10px; }
  [data-portal-section] .g-nav-refresh .nav-item-text { padding:3px 2px; font-size:12px; }
}
[hidden] { display: none !important; }
.local-image-viewer { position:fixed; inset:0; z-index:2147483647; display:flex; align-items:center; justify-content:center; padding:16px; background:rgba(29,33,41,.6); font:16px Arial,sans-serif; }
.local-image-panel { position:relative; width:286px; max-width:100%; max-height:95dvh; overflow:auto; background:#fff; border-radius:4px; box-shadow:0 4px 16px #0003; }
.local-image-head { display:flex; align-items:center; justify-content:space-between; min-height:40px; padding:0 10px; color:#333; }
.local-image-head button { min-width:32px; min-height:36px; background:transparent; color:#555; font-size:24px; }
.local-image-panel img { display:block; width:100%; height:auto; cursor:zoom-in; }
.local-image-panel.zoomed { width:min(95vw,1080px); }
.choose_superior.active { background:#00f; color:#fff; border-radius:3px; }
.ball.local-match { outline:2px solid #00f; outline-offset:2px; border-radius:4px; }
.local-toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); z-index:2147483647; padding:10px 16px; border-radius:6px; background:#222e; color:#fff; font:14px Arial,sans-serif; white-space:nowrap; }
.portal-history-status { margin:8px; padding:16px 10px; border:1px solid #ddd; border-radius:4px; background:#fff; color:#555; text-align:center; font:14px/1.6 Arial,"Microsoft YaHei",sans-serif; }
.portal-history-status[data-state="error"] { color:#b42318; background:#fff8f7; border-color:#f0c9c4; }
.portal-history-status button { margin-left:10px; padding:5px 10px; border:1px solid #188ff4; border-radius:3px; background:#fff; color:#0876d0; font:inherit; cursor:pointer; }
/* Forecast text uses the reference's own fonts, sizes, colors and line breaks. */
[data-portal-forecast-key] td,[data-portal-forecast-key] th { box-sizing:border-box; }
.portal-forecast-result { display:inline; font:inherit; color:inherit; }
.portal-forecast-result.miss { color:#555; }
.portal-weekly-follow { color:#999; }
.portal-local-poster { display:block; width:100%; height:auto; }
.portal-ink-gray { color:#333; }.portal-ink-blue { color:#00f; }.portal-ink-green { color:#008000; }.portal-ink-purple { color:#660066; }.portal-ink-maroon { color:#800000; }.portal-ink-navy { color:#000080; }
.portal-number-hit { background:#ff0; color:inherit; }
.portal-six-feature { background:#fcf; text-align:center; }
[data-portal-forecast-key="008"] .portal-forecast-values { display:inline-block; white-space:nowrap; }
.portal-window-result { display:inline; white-space:nowrap; }
table:has(> [data-portal-forecast-key]) { table-layout:fixed; }
/* Restore reference column sizing so ten numbers fit beside the result. */
table:has(> [data-portal-forecast-key="026"]) { table-layout:auto; }
[data-portal-forecast-key="029"] td { text-align:center; }
[data-portal-forecast-key="029"] .portal-forecast-values { font-size:inherit; }
.portal-kill-miss { color:#999; }
.home-nav--more { overflow-x:auto; scrollbar-width:thin; }
.home-nav--more table { min-width:calc(var(--portal-nav-count) * 160px); }
.home-nav a[data-portal-tab] { display:flex;align-items:center;justify-content:center;box-sizing:border-box;gap:3px; }
.home-nav .portal-category-label { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.home-nav img[data-portal-category-icon] { flex-shrink:0;height:clamp(16px,4.5vw,20px);margin-right:0;object-fit:contain; }
[data-portal-forecast-key="016"] td[colspan] { width:auto; }
.portal-forecast-more { display:block; margin:5px auto; padding:5px 12px; color:#075db6; border:1px solid #4393f0; background:#fff; border-radius:4px; font-size:13px; cursor:pointer; }
[data-portal-attributes] th { background:#c9e9ff; font-weight:bold; }
[data-portal-attributes] td:first-child { width:22%; text-align:center; }
.portal-attribute-numbers { color:#064db2; line-height:1.6; padding:5px; word-break:normal; }
.portal-local-notice { padding:5px 8px; background:red; color:#ff0; text-align:center; font-size:clamp(20px,5.8vw,34px); font-weight:bold; border-radius:5px; }
[data-portal-section]:has(> .portal-domain-notice) { padding:0; border-radius:0; background:none; overflow:visible; }
.portal-local-address { margin-top:4px; padding:10px 5px; border:3px solid #4395ed; border-radius:8px; background:#50a6e4; color:#fff; text-align:center; font-size:clamp(18px,5vw,30px); font-weight:bold; text-shadow:1px 1px #777; }
.portal-local-address strong { display:inline-block; margin-bottom:5px; padding:3px 15px; border-radius:30px; background:#ffff9d; color:red; font-size:.8em; text-shadow:none; }
/* The reference's KL8 card is replaced from our own enabled lottery catalog. */
[data-lottery-view][data-lottery-group="kl8"]:not([data-portal-city]) { display:none; }
.portal-local-address b { color:#ff0; overflow-wrap:anywhere; }.portal-local-address small { font-size:.7em; }
.portal-local-rules { margin-top:5px; padding:9px 8px; border:4px solid #e985a5; border-radius:6px; background:#fff9fc; color:#333; text-align:center; font-size:clamp(12px,3.4vw,18px); }
.portal-local-rules strong { color:#900; }.portal-local-rules p { margin:5px 0 0; line-height:1.5; }
.portal-local-banner { box-sizing:border-box; overflow:hidden; text-align:center; font-weight:bold; }
.portal-local-banner-large { padding:12px 8px; border:2px solid #b9d6f2; background:linear-gradient(130deg,#eff9ff,#d1e7ff 60%,#f8fcff); color:#000090; }
.portal-local-banner-large small { display:block; text-align:left; font-size:12px; }.portal-local-banner-large strong { display:block; font-size:clamp(20px,6vw,40px); }.portal-local-banner-large b { display:block; margin:6px auto; padding:6px 12px; border-radius:50px; background:#fff; color:red; font-size:clamp(23px,7vw,44px); overflow-wrap:anywhere; }.portal-local-banner-large span { font-size:clamp(14px,4vw,23px); }
.portal-local-banner-strip { display:flex; align-items:center; justify-content:center; gap:5px; min-height:30px; padding:5px; background:linear-gradient(#d5f0e9,#1089c6); color:#fff; text-shadow:1px 1px #111; font-size:clamp(11px,3.1vw,22px); }.portal-local-banner-strip b { color:#ff0; overflow-wrap:anywhere; }.portal-local-banner-green { background:linear-gradient(#eaffd0,#208c40); }
.portal-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px;background:#fff}
.portal-gallery-item{margin:0;min-width:0;text-align:center;overflow:hidden}
.portal-gallery-item a{display:block}
.portal-gallery-item [hidden]{display:none}
.portal-gallery-item img{display:block;width:100%;height:auto;margin:0}
.portal-gallery-item figcaption{padding:4px 2px;font-size:14px;line-height:1.3;color:#333}
.portal-gallery-placeholder{display:flex;align-items:center;justify-content:center;min-height:160px;background:#f5f8fc;color:#666;font-size:14px}
