body:has(.lhc-history-table) #detailLatest .ball-red, .lhc-history-table .ball-red{background:#ea6675;border-color:#ea6675;}
body:has(.lhc-history-table) #detailLatest .ball-blue, .lhc-history-table .ball-blue{background:#6092e9;border-color:#6092e9;}
body:has(.lhc-history-table) #detailLatest .ball-green, .lhc-history-table .ball-green{background:#51c786;border-color:#51c786;}
.lhc-summary-options{display:flex;justify-content:center;gap:8px;margin-top:8px;width:370px;max-width:100%;}
.lhc-summary-options button{border:1px solid #a8c8ed;border-radius:3px;padding:2px 10px;background:white;color:#777;font-size:12px;line-height:18px;cursor:pointer;}
.lhc-summary-options button.active{background:#609aeb;border-color:#609aeb;color:white;}
.lhc-history-special{display:flex;align-items:center;justify-content:center;gap:8px;position:relative;}
.lhc-history-plus{font-size:20px;color:#999;align-self:flex-start;line-height:32px;}
.lhc-history-table .lhc-tone-red{color:#ea6675;}
.lhc-history-table .lhc-tone-blue{color:#6092e9;}
body:has(.lhc-history-table) #detailLatest+.detail-tools>.active{position:relative;}
body:has(.lhc-history-table) #detailLatest+.detail-tools>.active::before{content:"";position:absolute;right:4px;top:0;width:18px;height:12px;background:url('https://kai365.cc/ref/ico-new.svg') center/contain no-repeat;}
#detailHistory:has(.lhc-history-table) .history-header{position:relative;padding:12px 30px 10px;min-height:54px;box-sizing:border-box;}
#detailHistory:has(.lhc-history-table) .history-header{height:55.8px;min-height:55.8px;padding-top:10.8px;padding-bottom:10px;}
#detailHistory:has(.lhc-history-table) .history-header h3{height:35px;box-sizing:border-box;line-height:28.4px;}
#detailHistory:has(.lhc-history-table) .history-table-wrapper{border:0;}
.lhc-history-modes{gap:12px;}
.lhc-history-modes button{height:30px;box-sizing:border-box;padding:0 16px;font:14px/28px Arial,sans-serif;}
.lhc-history-modes button[data-history-mode="numbers"]{position:absolute;left:140px;top:12px;}
.lhc-history-modes button[data-history-mode="numbers"].active,.lhc-display-filters button.active{position:relative;}
.lhc-history-modes button[data-history-mode="numbers"].active{position:absolute;}
.lhc-history-modes button[data-history-mode="numbers"].active:after,.lhc-display-filters button.active:after{content:"✓";position:absolute;right:0;top:0;width:13px;height:13px;background:#609aeb;color:white;font:9px/11px Arial,sans-serif;clip-path:polygon(0 0,100% 0,100% 100%);text-align:right;}
.lhc-history-modes button[data-history-mode="latest"]{background:#3b84eb;border-color:#3b84eb;color:white;}
.lhc-history-modes label{position:relative;font-size:14px;gap:8px;}
.lhc-history-modes label:after{content:"";position:absolute;left:52px;width:12px;height:12px;pointer-events:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239e9e9e'%3E%3Crect x='2' y='3' width='12' height='11' rx='1'/%3E%3Cpath d='M2 6h12M5 1v4M11 1v4'/%3E%3C/svg%3E") center/contain no-repeat;}
.lhc-history-modes input{width:100px;height:30px;box-sizing:border-box;padding:0 10px 0 27px;font-size:13px;}
.lhc-display-filters{padding:16px 20px;font-size:14px;}
.lhc-display-filters>div{gap:10px;margin-bottom:10px;}
.lhc-display-filters strong{width:98px;}
.lhc-display-filters button{height:30px;min-width:54px;padding:0 16px;line-height:28px;box-sizing:border-box;color:#5f5f5f;}
.lhc-display-filters>div:first-child button{min-width:84px;}
.lhc-display-filters button.active{background:white;border-color:#609aeb;color:#609aeb;}
.lhc-history-table{width:100%;table-layout:fixed;min-width:1120px;border-collapse:collapse;}
.lhc-history-table thead tr:first-child{height:27px;}
.lhc-history-table thead tr:last-child{height:24.4px;}
.lhc-history-table th{height:auto;padding:0 4px!important;font-size:13px;font-weight:400;}
.lhc-history-table th:nth-child(1)[rowspan]{width:10.32%;}
.lhc-history-table th:nth-child(2)[rowspan]{width:6.02%;}
.lhc-history-table th:nth-child(3)[rowspan]{width:33.53%;}
.lhc-history-table th:nth-child(4)[rowspan]{width:6.71%;}
.lhc-history-table th[colspan="6"]{width:20.98%;}
.lhc-history-table th[colspan="3"]{width:12.98%;}
.lhc-history-table th:nth-last-child(-n+2)[rowspan]{width:4.73%;}
.lhc-history-table td{height:54.55px;box-sizing:border-box;padding:10px 4px!important;font-size:14px;}
.lhc-history-table .numbers-cell{width:auto;min-width:0;}
.lhc-history-table .ball-row{gap:8px;justify-content:center;flex-wrap:nowrap;}
.lhc-history-table .ball-wrapper{flex-direction:row;gap:4px;white-space:nowrap;}
.lhc-history-table .ball{width:32px;height:32px;min-width:32px;font-size:16px;font-weight:400;box-shadow:none;border:0;}
.lhc-history-table .zodiac{font-size:14px;color:#5f5f5f;}
@media(min-width:1101px){body:has(.lhc-history-table) #detailLatest{margin-top:-2px;margin-bottom:12.8px;}body:has(.lhc-history-table) #detailLatest+.detail-tools{height:38.4px;min-height:38.4px;}body:has(.lhc-history-table) #detailLatest .detail-top{gap:48px;height:131.4px;min-height:131.4px;}body:has(.lhc-history-table) #detailLatest .detail-col-main{align-self:stretch;padding-top:0;margin-top:-6px;}body:has(.lhc-history-table) #detailLatest .detail-row-numbers{margin-top:4px;}}
@media(max-width:768px){.lhc-history-modes button[data-history-mode="numbers"]{position:static!important;}.lhc-history-modes{flex-wrap:wrap;}.lhc-display-filters button{min-width:44px;padding:0 8px;}.lhc-display-filters>div:first-child button{min-width:60px;}}
/* Sixmark measured refinements */
body:has(.lhc-history-table) #detailLatest .ball-red,.lhc-history-table .ball-red{background:#e35858;border-color:#e35858;}
body:has(.lhc-history-table) #detailLatest .ball-green,.lhc-history-table .ball-green{background:#39c76c;border-color:#39c76c;}
body:has(.lhc-history-table) #detailLatest .detail-name{font-size:20px;}
body:has(.lhc-history-table) #detailLatest .detail-schedule-text{font-size:14px;line-height:30px;}
body:has(.lhc-history-table) #detailLatest .detail-row-info{gap:6px;height:30px;align-items:center;}
body:has(.lhc-history-table) #detailLatest .detail-col-main{margin-top:-9.4px;}
body:has(.lhc-history-table) #detailLatest .detail-row-numbers{margin-top:4px;gap:18.4px;height:50.4px;align-items:flex-start;}
body:has(.lhc-history-table) #detailLatest .ball{border-width:1.6px;font-weight:500;}
body:has(.lhc-history-table) #detailLatest .ball-special{outline:none;box-shadow:2px 3px 5px #0000000d;border-width:1.6px;}
body:has(.lhc-history-table) #detailLatest .detail-col-right{position:relative;left:-62px;top:4px;}
body:has(.lhc-history-table) #detailLatest .summary-controls i{color:#999;}
body:has(.lhc-history-table) #detailLatest .summary-controls [data-summary-sound] i{color:#3b84eb;}
body:has(.lhc-history-table) #detailLatest .summary-controls>a{position:relative;}
body:has(.lhc-history-table) #detailLatest .summary-controls>a:after{content:'';position:absolute;right:0;top:0;width:18px;height:12px;background:url('https://kai365.cc/ref/ico-new.svg') center/contain no-repeat;}
#detailHistory .lhc-history-table .numbers-cell .zodiac,#detailHistory .lhc-history-table .zodiac{font-size:14px;line-height:32px;height:32px;}
.lhc-history-modes button[data-history-mode="numbers"]{width:97.6px;top:13.3px;}
.lhc-display-filters button{padding:0 20px;border-color:#e8ebf1;}
.lhc-display-filters>div:first-child button{min-width:0;}
.lhc-display-filters strong{width:97px;}
.lhc-year-popup{position:absolute;right:0;top:36px;width:280px;padding:12px;background:white;border:1px solid #e8ebf1;border-radius:5px;box-shadow:0 4px 12px #0002;z-index:20;}
.lhc-year-popup[hidden]{display:none;}
.lhc-year-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.lhc-year-heading button{border:0;background:white;padding:0 8px;}
.lhc-year-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
.lhc-year-grid button{border:0;background:white;padding:0;height:36px;color:#313131;}
.lhc-year-grid button.active{background:#3b84eb;color:white;border-radius:4px;}
.lhc-year-grid button:disabled{color:#ccc;cursor:default;}
@media(min-width:1101px){
body:has(.lhc-history-table) #detailLatest .detail-row-info{position:relative;top:-1.7px;}
body:has(.lhc-history-table) #detailLatest .detail-row-numbers{position:relative;top:-6.7px;}
body:has(.lhc-history-table) #detailLatest .lhc-summary-options{position:relative;top:-4.3px;}
}
body:has(.lhc-history-table) #detailLatest .detail-numbers .ball-row{gap:18.4px;align-items:flex-start;}
body:has(.lhc-history-table) #detailLatest .ball-special{animation:none;}
#detailHistory .lhc-history-table td{padding:8px 4px!important;line-height:18px;}
.lhc-year-popup{box-sizing:border-box;width:247px;padding:12px;top:42px;box-shadow:0 8px 28px #0f172a1f,0 2px 8px #0f172a0a;}
.lhc-year-heading{height:41px;box-sizing:border-box;padding-bottom:12px;margin-bottom:0;border-bottom:1px solid #e8ebf1;}
.lhc-year-grid{grid-template-columns:repeat(4,1fr);gap:0;margin-top:0;}
.lhc-year-grid button{height:48px;font-size:16px;padding:10px 3px;}
.lhc-year-grid button.active{background:transparent;color:#3b84eb;}
#detailHistory .lhc-history-table .ball-row{gap:14.8px;}
body:has(.lhc-history-table) .prediction-contact.lhc-contact{display:flex;}
.lhc-filter-muted{opacity:.12;}
.lhc-next-period{color:#6092e9;}

.lhc-draw-calendar{position:absolute;right:260px;top:50px;width:370px;padding:12px 20px;background:white;border:1px solid #e8ebf1;border-radius:6px;box-shadow:0 8px 28px #0f172a1f;z-index:30;box-sizing:border-box;font-size:16px;}
.lhc-calendar-heading{display:flex;align-items:center;gap:16px;margin-bottom:14px;}
.lhc-calendar-heading>span{margin-right:auto;color:#3b84eb;font-size:20px;}
.lhc-calendar-heading button{border:0;background:white;padding:0 8px;font-size:20px;color:#666;}
.lhc-calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;}
.lhc-calendar-grid>span{font-size:14px;color:#aaa;line-height:32px;}
.lhc-calendar-grid button{border:0;border-radius:0;min-width:0;padding:0;height:46px;font-size:18px;background:white;color:#555;}
.lhc-calendar-grid .other-month{color:#ccc;}
.lhc-calendar-grid .scheduled{background:#ef672b;color:white;}
.lhc-calendar-grid .recorded{background:#eef0ef;}
.lhc-calendar-legend{display:flex;gap:20px;color:#999;font-size:14px;margin-top:12px;}
.lhc-calendar-legend span::before{content:'';display:inline-block;width:20px;height:20px;margin-right:8px;vertical-align:middle;background:#ef672b;}
.lhc-calendar-legend .recorded::before{background:#eef0ef;}
@media(max-width:700px){.lhc-draw-calendar{right:0;max-width:calc(100vw - 50px);}}

body:has(.lhc-history-table) #detailLatest{overflow:visible;position:relative;z-index:31;}
body:has(.lhc-history-table) #detailLatest .summary-ring-options{top:70px;min-width:118px;padding:12px;border-radius:12px;box-sizing:border-box;}
body:has(.lhc-history-table) #detailLatest .summary-ring-options button{height:30px;margin:0 0 6px;padding:0 10px;border:1px solid #edf0f4;border-radius:6px;font-size:12px;line-height:28px;background:white;color:#888;}
body:has(.lhc-history-table) #detailLatest .summary-ring-options button:last-child{margin-bottom:0;}
body:has(.lhc-history-table) #detailLatest .summary-ring-options button[aria-pressed=true]{background:#609aeb;border-color:#609aeb;color:white;}
.lhc-display-filters button[data-reset],.lhc-display-filters button[data-reset].active{background:#609aeb;border-color:#609aeb;color:white;}
.lhc-display-filters button[data-reset].active:after{display:none;}

/* Dedicated Hong Kong detail-page review, 2026-10-12. */
body:has(.lhc-history-table) #detailLatest .detail-col-main{flex:none;width:417px;margin-left:0;margin-top:-9px}
body:has(.lhc-history-table) #detailLatest .detail-row-info{justify-content:flex-start;padding-left:20.1625px}
body:has(.lhc-history-table) #detailLatest .detail-row-numbers{height:50.4px;width:417px}
body:has(.lhc-history-table) #detailLatest .detail-numbers .ball-row{width:417px;gap:0;justify-content:space-evenly}
body:has(.lhc-history-table) #detailLatest .zodiac{width:32px;height:14.4px;line-height:14.4px;font-weight:500;color:#475569;margin-top:4px}
body:has(.lhc-history-table) #detailLatest .ball-wrapper{gap:0}
body:has(.lhc-history-table) #detailLatest .ball-plus{width:24px;padding-right:4px;box-sizing:border-box}
body:has(.lhc-history-table) #detailLatest .lhc-summary-options{width:417px}
body:has(.lhc-history-table) #detailLatest .lhc-summary-options button{height:24px;padding:0 10px;line-height:22px;border-color:#609aeb;color:#5f5f5f}
body:has(.lhc-history-table) #detailLatest .lhc-summary-options button.active{font-weight:600;color:white}
body:has(.lhc-history-table) #detailLatest .detail-col-right{left:0;top:0;flex:none;width:431.7px;height:100px;margin-left:auto;min-width:0;display:flex;align-items:center;justify-content:center}
body:has(.lhc-history-table) #detailLatest .detail-top{gap:30px}
body:has(.lhc-history-table) #detailLatest .summary-controls{margin-left:-8px}
body:has(.lhc-history-table) #detailLatest .countdown-label{height:30px;line-height:30px;margin:0 0 10px}
body:has(.lhc-history-table) #detailLatest .countdown-timer{padding:0;display:block;width:240px;height:44px;line-height:44px;border-radius:8px;border-color:#e8d5c8;background:linear-gradient(#fffaf6,#fff5ee);color:#e8632c}
body:has(.lhc-history-table) #detailLatest .lhc-clock-number{display:inline-block;font:400 32px/44px HomeDigital,Arial,sans-serif;margin:0 3px}
body:has(.lhc-history-table) #detailLatest .lhc-clock-unit{display:inline;font-size:14px;line-height:44px}
body:has(.lhc-history-table) #detailLatest+.detail-tools{padding:0 30.8px;border:0;gap:5.3625px}
body:has(.lhc-history-table) #detailLatest+.detail-tools>a{height:22.4px;line-height:17.5px;padding:0;flex:1;margin:0}
body:has(.lhc-history-table) #detailLatest+.detail-tools>a.active{box-shadow:none}
body:has(.lhc-history-table) #detailLatest+.detail-tools>a.active:after{left:9%;right:9%;top:auto;bottom:0;height:2.4px;background:#609aeb;border:0}
.lhc-history-modes button{font:14px/14px Tahoma,"Microsoft YaHei",sans-serif}
.lhc-history-modes button[data-history-mode=dates]{width:97.6px}
.lhc-history-modes button[data-history-mode=latest]{width:57.6px;padding:0}
.lhc-display-filters>div{gap:10px}
.lhc-display-filters strong{width:99px}
.lhc-history-table td{border-color:#e8ebf1!important;color:#313131}
.lhc-history-table{border-collapse:separate;border-spacing:0}
.lhc-history-table th,.lhc-history-table td{border-width:0 .8px .8px 0!important;border-color:#e8ebf1!important}
.lhc-history-table .lhc-tone-red{color:#f12d35}
.lhc-history-table .lhc-tone-blue{color:#184dd5}
.lhc-history-table td:nth-child(11){font-family:"Barlow Condensed",sans-serif}
.lhc-history-table td:nth-child(12),.lhc-history-table td:nth-child(13){font-weight:400!important}
.lhc-history-table td:is(.big,.odd){color:#f12d35!important}
.lhc-history-table td:is(.small,.even){color:#184dd5!important}
.lhc-history-table td:nth-child(12) [class],.lhc-history-table td:nth-child(13) [class]{font-weight:400!important;color:inherit}
#detailHistory .lhc-history-table .zodiac{width:14px;flex:none;overflow:hidden;text-overflow:ellipsis}
.lhc-draw-calendar{width:374px;right:256.6px;top:51.3px;padding:0 20px 20px}
.lhc-calendar-heading{height:44px;margin:0}
.lhc-calendar-heading button{width:44px;height:44px;padding:0;flex:none}
.lhc-calendar-heading{gap:0}
.lhc-calendar-grid>span{line-height:28px}
.lhc-calendar-grid button{height:47px}
.lhc-calendar-legend{height:20px;margin-top:15px}
.lhc-history-pagination{display:flex;justify-content:center;align-items:center;gap:8px;font:13px Tahoma,sans-serif;color:#777;margin:10px 30px 0}
.lhc-history-pagination button,.lhc-history-pagination select,.lhc-history-pagination input{height:28px;border:1px solid #e8ebf1;border-radius:5px;background:white;color:inherit;font:inherit;padding:0 8px}
.lhc-history-pagination button.active{background:#609aeb;color:white}
.lhc-history-pagination button:disabled{opacity:.35}
.lhc-history-pagination input{width:48px;text-align:center}
@media(max-width:1100px){body:has(.lhc-history-table) #detailLatest .detail-col-main{margin-left:0;width:auto;flex:1}body:has(.lhc-history-table) #detailLatest .detail-col-right{display:none}.lhc-history-pagination{flex-wrap:wrap}.lhc-draw-calendar{right:0}}

/* Detail controls: second dedicated review. */
#detailHistory:has(.lhc-history-table) .history-header h3{position:relative;height:30px;line-height:30px;padding:0;border-bottom:0}
#detailHistory:has(.lhc-history-table) .history-header h3:after{content:'';position:absolute;left:0;bottom:-5px;width:20px;height:4px;background:#609aeb}
.lhc-history-modes button[data-history-mode=dates]{margin-right:0}
.lhc-history-modes{gap:15px}
.lhc-history-modes label{gap:0;font-size:13px}
.lhc-history-modes button[data-history-mode=numbers]{font-weight:500}
.lhc-history-modes button[data-history-mode=numbers].active{color:#3b84eb;border-color:#3b84eb}
.lhc-history-modes button[data-history-mode=numbers].active:after{width:14px;height:14px;background:#3b84eb}
body:has(.lhc-history-table) #detailLatest+.detail-tools>a.active{color:#3b84eb}
body:has(.lhc-history-table) #detailLatest+.detail-tools>a.active:after{height:2px;background:#3b84eb}
body:has(.lhc-history-table) #detailLatest+.detail-tools>a.active:before{width:20px;height:12.725px;top:-6px;right:2px}
body:has(.lhc-history-table) #detailLatest .lhc-clock-number,body:has(.lhc-history-table) #detailLatest .lhc-clock-unit{position:relative;top:-.8px}
body:has(.lhc-history-table) #detailLatest .summary-ring-options{width:120px;min-width:120px;right:-10px;top:71.2px}
.lhc-history-pagination button{width:30px;flex:none;padding:0}
.lhc-history-pagination select{width:86.4px;flex:none}

/* Third detail review: outside dismissal and compact header controls. */
body:has(.lhc-history-table) #detailLatest .detail-col-logo{width:80px;flex:0 0 80px;display:flex;align-items:center;justify-content:center}
body:has(.lhc-history-table) #detailLatest .detail-logo{width:76px;height:76px}
body:has(.lhc-history-table) #detailLatest .summary-controls{align-items:center;gap:5px}
body:has(.lhc-history-table) #detailLatest .summary-controls>button,body:has(.lhc-history-table) #detailLatest .summary-controls>a{width:108px;height:30px;padding:0;font:14px/28px Tahoma,"Microsoft YaHei",sans-serif}
body:has(.lhc-history-table) #detailLatest .summary-controls>a:after{width:20px;height:12.725px;right:-5px;top:-6px}
body:has(.lhc-history-table) #detailLatest .summary-ring-options{top:71px}
.lhc-history-modes label{font-size:14px}
.lhc-history-modes input{flex:none;margin-left:-3px;border-color:#e8ebf1}
#detailHistory #lhcHistoryYear{border-color:#e8ebf1}

/* Selected distribution-filter states. */
.lhc-display-filters button{border-radius:6px}
.lhc-display-filters button.active{background:#eef5ff;border-color:#3b84eb;color:#3b84eb}
.lhc-display-filters button.active:after{background:#3b84eb}
.lhc-display-filters button[data-reset],.lhc-display-filters button[data-reset].active{background:#3b84eb;border:0;color:white}
.lhc-filter-muted{opacity:.1}
#detailHistory:has(.lhc-history-table) .history-table-wrapper{border-radius:12px}
#detailHistory:has(.lhc-history-table) #lhcDisplayFilters[hidden]+.history-table-wrapper{margin-top:-9.2px}

/* Complete the history grid outline without shifting columns or outer spacing. */
#detailHistory:has(.lhc-history-table) .history-table-wrapper{box-shadow:0 0 0 .8px #e8ebf1}
