/* Mobile layout corrections for all public lottery pages. */
.mobile-history-list,.mobile-history-header{display:none}
@media(max-width:768px){
 html,body{max-width:100%;overflow-x:hidden}
 .site-width{width:calc(100% - 20px)}
 .site-header.site-width{width:100%;height:64px;margin:0;padding:0 14px}
 .brand{width:130px;height:35px}.brand img{width:100%;height:100%}
 .visit-count{font-size:11px}.visit-count strong{font-size:16px}
 .main-nav{position:relative;z-index:25}.nav-inner{width:100%;max-width:none;min-height:44px;gap:0;overflow:visible;padding:0 8px}
 .nav-inner>a,.nav-menu>a{min-height:44px;padding:0 13px;font-size:14px}
 .nav-dropdown{min-width:190px;max-width:calc(100vw - 20px);box-shadow:0 8px 24px #0003}
 .page-main{padding-top:12px;padding-bottom:20px}
 .hero-banner{display:none}
 .phone-banner-strip{display:flex;width:calc(100% + 20px);margin:0 -10px 12px;padding:0 10px;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
 .phone-banner-strip::-webkit-scrollbar{display:none}
 .phone-banner-strip img{width:min(86vw,360px);height:auto;aspect-ratio:750/340;flex:0 0 auto;object-fit:cover;border-radius:8px;scroll-snap-align:start;box-shadow:0 3px 12px #1d4c681c}
 .lottery-grid{display:flex;flex-direction:column;gap:9px}
 .lottery-card{display:grid;width:100%;height:auto;min-height:94px;grid-template-columns:58px minmax(0,1fr) 82px;grid-template-rows:minmax(48px,auto) 32px;align-items:center;gap:2px 8px;padding:7px 8px;border-radius:9px;overflow:hidden;box-shadow:0 2px 8px #18202b0b}
 .lottery-card-title{grid-column:1;grid-row:1/3;width:auto;height:100%;justify-content:center;background:transparent;border:0}
 .lottery-card-title img{width:49px;height:49px}
 .latest-draw{grid-column:2;grid-row:1;min-width:0;padding:2px 0;text-align:left}
 .issue-line,.issue-line strong{font-size:12px;line-height:1.4;white-space:nowrap}
 .digit-list{justify-content:flex-start;gap:5px;padding:4px 0 0}
 .digit-list span{width:25px;height:25px;font-size:15px}
 .draw-time{grid-column:3;grid-row:1;align-self:center;padding:0;text-align:right;font-size:9px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
 .card-links{grid-column:2/4;grid-row:2;height:32px;justify-content:flex-start;gap:12px;border:0}
 .card-links a{display:flex;width:auto;min-width:0;flex-direction:row;align-items:center;gap:4px;padding:2px 3px;font-size:10px}
 .action-icon{width:23px;height:23px;border-color:#e1e3e6}.card-links svg{width:13px;height:13px}
 .notice-panel{align-items:flex-start;margin-top:10px;padding:9px 10px;font-size:12px}
 .site-footer{padding:14px 8px;font-size:11px}
 .history-page .page-main{padding-top:10px}.history-breadcrumb{font-size:11px;margin-bottom:8px}.history-title{font-size:18px;line-height:1.35;margin-bottom:10px}
 .history-sheet{border-radius:8px;padding:9px 0}.history-years{gap:6px;padding:0 9px 9px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin}.history-years a{min-width:54px;padding:5px 9px;font-size:12px}
 .history-table-wrap{max-width:calc(100vw - 20px);overflow-x:auto;overscroll-behavior-x:contain}.history-table{width:1050px;min-width:1050px;table-layout:auto}.history-table td{height:48px;padding:5px 3px}.history-table .table-ball{width:29px;height:29px;margin:0 2px;font-size:14px}.history-meta{font-size:10px;padding:9px 4px 2px}
 .trend-page .trend-breadcrumb .site-width{width:100%;padding:0 12px}.trend-page .page-main{width:100%;padding:0 0 14px;overflow:hidden}
 .trend-panel{max-width:100vw;overflow:hidden}.trend-panel .panel-heading{padding:8px 10px}.trend-panel .panel-heading h1,.trend-panel h1{font-size:17px}
 .trend-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:7px 9px}.trend-tabs a{min-width:0;flex:auto;padding:8px 4px;font-size:12px}
 .trend-controls{display:flex;flex-direction:column;align-items:stretch;gap:7px;padding:6px 9px}
 .trend-periods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:0}.trend-periods label{min-width:0}.trend-periods span{min-width:0;padding:7px 3px;font-size:12px}
 .trend-filter-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0}.trend-filter-row select{width:100%;min-width:0;height:34px;font-size:11px}
 .trend-options{justify-content:flex-start;gap:8px;padding:7px 9px;overflow-x:auto;white-space:nowrap}.trend-options label{font-size:11px}
 .trend-wrap{max-width:100vw;overflow:auto;overscroll-behavior-x:contain}.trend-matrix{width:1208px;min-width:1208px}
 .trend-options-bottom{padding-top:8px}.trend-footer{padding:9px 10px}.trend-copy{font-size:10px}
 .rules-panel{width:100%;padding:16px 12px;min-height:0}.rules-panel .rules-intro{font-size:17px}.rules-panel .rule-section h2{font-size:15px}.rules-panel .rule-section div{font-size:13px;line-height:1.75}
 .road-tabs{height:48px}.road-tabs a{font-size:14px}.road-main{width:100%;padding:0 8px 14px}.road-lane{height:250px;margin-bottom:8px;padding:8px 0}.road-lane-summary{height:auto;min-height:28px;padding:3px 9px;font-size:11px}.road-lane-track{height:207px;gap:2px;padding:0 3px 4px}.road-run{min-width:20px;font-size:12px;line-height:16px}.road-position-label{top:9px;right:7px;font-size:12px}
}
@media(max-width:380px){
 .nav-inner>a,.nav-menu>a{padding:0 10px;font-size:13px}.site-header.site-width{padding:0 10px}
 .lottery-card{grid-template-columns:52px minmax(0,1fr) 72px;gap:2px 6px;padding:6px}.lottery-card-title img{width:45px;height:45px}.draw-time{font-size:8px}.card-links{gap:7px}
 .history-title{font-size:16px}.trend-tabs a{font-size:11px}.trend-options{gap:6px}
}

/* The reference site switches to its compact, action-first mobile home. */
.mobile-header-tools,.mobile-card-actions{display:none}
@media(max-width:768px){
 .site-header.site-width{height:66px;padding:0 14px}
 .mobile-header-tools{display:flex;align-items:center;gap:10px;color:#666;font-size:12px;white-space:nowrap}
 .mobile-header-tools a{color:#555}.mobile-header-tools span{height:14px;border-left:1px solid #ccc}
 .visit-count,.main-nav{display:none}
 .page-main{padding-top:11px}
 .phone-banner-strip{display:block;width:100%;margin:0 0 11px;padding:0;overflow:visible}
 .phone-banner-slides{width:100%;aspect-ratio:750/340;overflow:hidden;border-radius:8px;background:#e6f8fd}
 .phone-banner-slide,.phone-banner-slides img{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:cover;border-radius:0;box-shadow:none}
 .phone-banner-slide[hidden]{display:none}
 .phone-banner-strip{position:relative;margin-bottom:11px}
 .phone-banner-dots{position:absolute;right:0;bottom:9px;left:0;display:flex;justify-content:center;align-items:center;gap:5px;height:8px;margin:0}
 .phone-banner-dots button{width:7px;height:7px;padding:0;border:0;border-radius:50%;background:#d2d2d2;cursor:pointer}
 .phone-banner-dots button.active{width:8px;height:8px;background:#c8232d}
 .lottery-grid{gap:10px}
 .lottery-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:32px 60px 43px;gap:0 5px;width:100%;height:162px;min-height:162px;padding:13px 16px 9px;border:1px solid #e7e7e7;border-radius:11px;background:#fff;box-shadow:0 1px 3px #2221}
 .lottery-card-title{display:none}
 .latest-draw{display:contents}
 .issue-line{grid-column:1;grid-row:1;align-self:center;overflow:hidden;color:#a83236;font-size:14px;line-height:20px;text-overflow:ellipsis}
 .issue-line strong{font-size:14px;font-weight:700}
 .draw-time{grid-column:2;grid-row:1;align-self:center;padding:0;color:#bd3137;text-align:right;font-size:0;white-space:nowrap}
 .draw-time::before{content:attr(data-mobile-time);font-size:14px}
 .digit-list{grid-column:1/-1;grid-row:2;align-self:center;justify-content:flex-start;gap:9px;padding:0}
 .digit-list span{width:36px;height:36px;border:2px solid #4b93d8;background:#fff;color:#3783ca;font-size:21px;font-weight:500}
 .digit-list.empty-digits span{border-color:#d6d6d6;color:#c9c9c9}
 .card-links{display:none}
 .mobile-card-actions{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:7px;border-top:1px solid #eee;padding-top:8px}
 .mobile-card-actions a{display:flex;min-width:0;min-height:30px;align-items:center;justify-content:center;padding:3px 4px;border:1px solid #a94243;border-radius:99px;color:#813437;font-size:11px;font-weight:600;line-height:1;white-space:nowrap}
 .mobile-card-actions a:active{background:#a82028;color:#fff}
}
@media(max-width:380px){
 .site-header.site-width{height:62px;padding:0 10px}.brand{width:122px;height:32px}.mobile-header-tools{gap:7px;font-size:11px}
 .lottery-card{height:158px;min-height:158px;padding:12px 12px 8px;grid-template-rows:32px 58px 43px}
 .issue-line,.issue-line strong,.draw-time::before{font-size:12px}.mobile-card-actions{gap:4px}.mobile-card-actions a{padding:3px 2px;font-size:10px}
}

@media(max-width:768px){
 .history-page .welcome-bar,.history-page .site-header,.history-page .main-nav,.history-page .site-footer{display:none}
 .history-page .page-main{width:100%;max-width:none;margin:0;padding:0;min-height:100vh;background:#f4f4f4}
 .history-page .mobile-history-header{position:sticky;top:0;z-index:30;display:grid;height:46px;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 9px;background:#ad3327;color:#fff;font-size:17px}
 .mobile-history-header>a{color:#fff;font-size:16px;white-space:nowrap}.mobile-history-header>strong{font-weight:500;white-space:nowrap}.mobile-history-header form{justify-self:end}.mobile-history-header select{max-width:94px;border:0;background:transparent;color:#fff;font:inherit;text-align:right}.mobile-history-header option{background:#fff;color:#333}
 .history-page .history-breadcrumb,.history-page .history-title,.history-page .history-years,.history-page .history-table-wrap,.history-page .history-meta{display:none}
 .history-page .history-sheet{padding:0;border:0;border-radius:0;background:#fff}
 .mobile-history-list{display:block}.mobile-history-item{display:grid;min-height:76px;grid-template-columns:104px repeat(3,minmax(0,1fr));align-items:center;border-bottom:1px solid #eee;background:#fff}
 .mobile-history-issue{display:flex;flex-direction:column;align-items:center;gap:5px;color:#b44943;font-size:14px;font-weight:400;white-space:nowrap}.mobile-history-issue strong{font-weight:400}.mobile-history-issue time{color:#999;font-size:12px}
 .mobile-history-balls{display:contents}.mobile-history-balls span{display:grid;width:52px;height:52px;place-items:center;justify-self:center;border:4px solid #4a91d3;border-radius:50%;color:#111;background:#fff;font-size:25px;font-weight:400}
 .mobile-history-empty{padding:45px 15px;color:#888;text-align:center;font-size:14px}
}

/* The reference trend table uses the narrow source grid on phones. Keeping it at
   1208px inflated the percentage-based issue and sum columns and hid later bands. */
@media(max-width:768px){
 .trend-matrix{width:1000px;min-width:1000px}
 .lottery-card{box-shadow:0 1px 2px #2221}
 .road-bead-page .compact-tool-header{height:46px;padding:0 9px;background:#ad3327}
 .road-bead-page .compact-tool-header strong{font-size:17px}
 .road-bead-page .road-tabs{height:46px}
 .road-bead-page .road-tabs a{font-size:16px}
 .road-bead-page .road-main{padding:0 0 14px}
 .road-bead-page .road-lane{height:250px;margin-bottom:8px;padding:8px 0}
 .road-bead-page .road-lane-summary{height:28px;min-height:28px;padding:3px 9px;font-size:11px}
 .road-bead-page .road-summary-position{display:none}
 .road-bead-page .road-lane-track{height:207px;gap:5px;padding:0 0 4px}
 .road-bead-page .road-run{min-width:23px;font-size:12px;line-height:16px}
 .road-bead-page .road-position-label{top:9px;right:7px;font-size:12px}
 .rules-page{background:#fff}
 .rules-page .compact-tool-header{height:46px;padding:0 9px;background:#ad3327}
 .rules-page .page-main{width:100%;max-width:none;margin:0;padding:10px 0 16px;background:#fff}
 .rules-page .rules-panel{width:100%;padding:16px 12px;border:0;border-radius:0;background:#fff;box-shadow:none}
}
