:root{font-family:Inter,Arial,"PingFang SC","Microsoft YaHei",sans-serif;color:#25272e;background:#edf1f6}
*{box-sizing:border-box}
body{margin:0}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:default}
.board{position:relative;display:flex;flex-direction:column;max-width:710px;height:100dvh;margin:auto;background:white;overflow:hidden}
.board-header{position:relative;flex:none;color:#fff;background:#df2245}
.board-top{display:flex;align-items:center;gap:8px;min-height:49px;padding:0 10px;color:#131313}
.board-back{color:inherit;text-decoration:none;font-size:34px;line-height:1;margin-right:2px}
.board-title{flex:1;min-width:0}
.board-title h1{font-size:clamp(15px,4.5vw,23px);margin:0 0 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:650}
.board-balance{color:#161616;text-decoration:none;font-size:14px;font-weight:700;white-space:nowrap}
.board-balance span{color:white;font-size:18px;font-weight:400}
.board-menu{position:relative;margin-left:3px}
.board-menu summary{list-style:none;font-size:25px;cursor:pointer;color:white}
.board-menu summary::-webkit-details-marker{display:none}
.board-menu div{position:absolute;right:0;z-index:2;display:grid;background:#fff;color:#25272e;min-width:95px;padding:8px;border-radius:6px;box-shadow:0 3px 12px #36213140}
.board-menu a{color:inherit;padding:5px;font-size:13px;text-decoration:none}
.board-result{display:flex;align-items:center;gap:4px;min-height:61px;border-radius:11px;padding:7px;margin:2px 8px 6px;color:#fff;background:#c74268;font-size:clamp(10px,3.2vw,15px)}
.board-result-issue{display:grid;gap:4px;white-space:nowrap;margin-right:2px}
.board-result button{border:0;background:none;color:#fff;padding:0;text-align:left;font:inherit}
.board-result>#board-history-open{margin-left:auto;font-size:22px}
.board-result-total{display:grid;justify-items:center;gap:3px;margin-left:3px;flex:none}
.board-result-total small{font-size:11px}
.board-timers{display:flex;align-items:center;gap:6px;flex-wrap:wrap;white-space:normal}
.board-timers>span:empty{display:none}
.board-rule-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:14px 0;text-align:left}
.board-menu #board-rules-open{border:0;background:none;padding:5px;text-align:left;font:inherit;color:inherit;font-size:13px}
.board-current-rules{margin:0 0 12px;color:#555f70;font-size:13px;line-height:1.5}
.board-orders{display:grid;place-items:center;padding:6px 8px;border:1px solid #e5e7ed;border-radius:8px;color:#49566e;text-decoration:none;white-space:nowrap;font-size:12px}
.board-result-cell{min-width:0;display:grid;justify-items:center;gap:3px}
.board-result-cell small{font-size:11px}
.ball{display:grid;place-items:center;border-radius:50%;width:24px;height:24px;font-size:12px;color:#fff;font-weight:700}
.ball.red,.road-dot.red{background:#ef524d}.ball.blue,.road-dot.blue{background:#2fa9e1}.ball.green,.road-dot.green{background:#4fb56c}
.board-result .ball.red{background:#f28e99}.board-result .ball.blue{background:#50b4e0}.board-result .ball.green{background:#77be8a}
.board-live{background:#c51a43;border-top:1px solid #fff8;min-height:33px;padding:4px 7px;display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:clamp(10px,3vw,16px);white-space:nowrap}
.board-live b{color:#ff0;font-variant-numeric:tabular-nums;letter-spacing:.04em}
.racing .board-result{flex-wrap:wrap}
.racing .board-result .car{width:clamp(16px,4vw,25px);height:24px;border-radius:4px;font-size:clamp(9px,2.8vw,13px)}
.racing #board-choices{display:block}
.racing #board-choices section{padding:8px 0 14px;border-bottom:1px solid #d7d7db}
.racing #board-choices section h2{margin:0 0 9px;font-size:16px;font-weight:550}
.racing #board-choices section div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.racing #board-choices [data-choice]{border:1px solid #e84260;border-radius:10px;background:white;min-width:0;padding:6px 2px}
.racing #board-choices [data-choice].active{background:#df2245;color:white}
.racing #board-choices [data-choice].active small{color:white}
.racing .board-menu button{border:0;background:white;color:inherit;padding:5px;font-size:13px;text-align:left}
@media(max-width:425px){.racing #board-choices section div{grid-template-columns:repeat(4,minmax(0,1fr))}}
.board-live button{border:0;background:none;color:white;font-size:20px;line-height:1;padding:0 2px}
.board-tabs{display:flex;flex:none;background:#fff;border-bottom:1px solid #f0edf1;z-index:1}
.board-tabs button,.board-tabs a{display:grid;place-items:center;flex:1;border:0;padding:9px 2px;background:#fff;color:#28232a;text-decoration:none;font-size:clamp(13px,3.6vw,18px)}
.board-tabs .active{color:#df243c;background:#f6d0d9}
.board-main{flex:1;min-height:0;display:grid;grid-template-columns:66px minmax(0,1fr)}
#board-groups{overflow:auto;align-self:stretch;background:#fff;border-radius:0 18px 0 0;border-right:1px solid #e8e7ea;margin:8px 0 0;scrollbar-width:none}
#board-groups button{display:block;width:100%;min-height:47px;padding:7px 1px;border:0;border-bottom:1px solid #e1e1e3;background:#fff;color:#25272e;font-size:14px}
#board-groups button.active{border-left:4px solid #cd3760;background:#fde7ec;color:#dc2c51;font-weight:500}
.board-picks{overflow:auto;padding:8px 8px 12px;scrollbar-width:thin}
#board-heading{color:#696c76;margin:0 0 7px;font-size:13px}
#board-variants:has(.special-view)+#board-heading{display:none}
#board-variants{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:6px}
#board-variants:empty,#board-zodiacs:empty{display:none}
#board-variants button,.road-positions button,.road-modes button{border:0;border-radius:5px;padding:6px 9px;background:#f4f5f7;color:#555b65}
#board-variants .active,.road-modes .active{background:#ef334d;color:white}
#board-variants .special-view{flex:1;background:#ececf5;border:1px solid #dedbea;padding:8px 4px;color:#21232a}
#board-variants .special-view.active{background:#e22245;border-color:#e22245;color:#fff;font-weight:700}
#board-zodiacs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin-bottom:10px}
.animal{display:grid;justify-items:center;gap:3px;padding:0;border:0;background:none;color:#282a31;font-size:13px}
.animal i{position:relative;display:grid;place-items:center;width:100%;min-height:33px;background:#fff;border:1px solid #ececf0;border-radius:1px;font-style:normal}
.animal i::before{content:"";position:absolute;width:25px;height:25px;background:#ed273a;border-radius:50%}
.animal i span{position:relative;filter:grayscale(1) brightness(0) invert(1);font-size:17px}
.animal.active i{outline:2px solid #ef334d;background:#fff3f6}
#board-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 6px}
#board-choices button{min-height:46px;padding:4px 2px;border-radius:10px;border:1px solid #d9dde6;background:#fff;color:#25272e;font-size:15px;font-weight:650}
#board-choices button small{display:block;margin-top:2px;color:#8a8e96;font-size:12px}
#board-choices button.red{background:#fff5f5;border-color:#efb7b9}
#board-choices button.red{color:#f10d15}
#board-choices button.blue{background:#f4f6fe;border-color:#b6c1e6}
#board-choices button.green{background:#f3fcf5;border-color:#bfe0c7}
#board-choices button.active{border-color:#e13049;background:#ffdce5;box-shadow:0 0 0 1px #e13049 inset}
#board-choices select,#board-choices input{min-width:0;width:100%;border:1px solid #d9dde6;padding:8px 4px;border-radius:4px;background:white}
#board-count{font-size:12px;margin:8px 0 0;color:#646975}
.board-dock{padding:0 9px max(9px,env(safe-area-inset-bottom));background:#fff;box-shadow:0 -2px 10px #30374120}
.board-selected{display:grid;place-items:center;border-bottom:1px solid #ededf0;margin:0 -9px 8px;padding:4px}
.board-selected>span{min-width:128px;text-align:center;padding:3px 10px;border-radius:20px;color:white;background:#e72344;font-size:12px}
.board-selected b{color:#ffff2d}
.board-amounts,.board-actions{display:flex;align-items:center;gap:8px;justify-content:space-between}
.board-presets{display:flex;border:1px solid #dedfeb;border-radius:6px;align-items:stretch;min-width:0;flex:1;background:#f8f9fc;color:#536078;overflow:auto}
.board-presets span,.board-presets button{font-size:12px;white-space:nowrap;padding:6px 7px;flex:1;text-align:center}
.board-presets button{border:0;border-left:1px solid #dee1eb;color:inherit;background:none}
.board-presets button.active{color:#c32244;background:#fbe7ed}
.board-input{display:flex;align-items:center;gap:2px;width:92px;padding:7px 4px;border:1px solid #e6e5f1;border-radius:8px;background:#f8f9fc;color:#80899f;font-size:10px}
.board-input input{border:0;background:none;outline:none;width:100%;min-width:0;color:#333;font-size:14px}
.board-actions{margin-top:10px}
.board-actions a,.board-actions button{display:grid;place-items:center;min-height:44px;text-align:center;text-decoration:none;font-size:12px;border:1px solid #e6e8f1;padding:5px 7px;border-radius:8px;color:#566078;background:#f6f7fc;box-shadow:0 2px 3px #45527110}
#board-submit{flex:1;min-width:104px;padding:5px 10px;border:none;background:#05a9e1;color:#fff;font-size:14px}
#board-submit:disabled{opacity:.5}
.board-actions .board-clear{border:0;background:#fa5463;color:white}
#board-cart{border:0;background:#ffc47b;color:#893e18}
#board-add:disabled{opacity:.5}#board-cart-size:empty{display:none}
#board-error{font-size:12px;color:#b82542;margin:6px 0 0}
.board-sheet{position:fixed;inset:auto 0 0;width:min(100%,710px);max-width:none;max-height:70dvh;margin:auto;padding:12px 10px max(12px,env(safe-area-inset-bottom));border:0;color:#35373e;background:#fff;overflow:auto}
.board-sheet::backdrop{background:#0008}.board-sheet h2{font-size:17px;margin:0 0 10px}
.board-history{inset:var(--history-top,110px) 0 auto;max-height:calc(100dvh - var(--history-top,110px) - min(12dvh,80px));margin:0 auto;padding:0;overflow:hidden}
.board-history[open]{display:flex;flex-direction:column}
.board-history::backdrop{background:linear-gradient(transparent var(--history-top,110px),#0006 var(--history-top,110px))}
.history-scroll{overflow:auto;min-height:0}
.board-history table{width:100%;border-collapse:collapse;text-align:center;font-size:clamp(11px,3.4vw,16px)}
.board-history th{position:sticky;top:0;background:#ededed;padding:8px 5px;font-weight:500}
.board-history th:first-child{width:32%}
.board-history td{height:clamp(44px,7vw,57px);padding:6px 4px;white-space:nowrap}
.board-history tbody tr:nth-child(odd){background:#f7f5f5}
.history-balls{display:flex;align-items:center;justify-content:center;gap:clamp(2px,.65vw,5px)}
.history-balls .ball{display:inline-grid;place-items:center;width:clamp(15px,4.6vw,26px);height:clamp(15px,4.6vw,26px);font-size:clamp(11px,3.6vw,17px)}
.ball.car{border-radius:4px;font-style:italic;font-weight:750}
.ball.car-light{color:#333}
.history-sum{margin-left:7px;color:#596674}.history-plus{color:#596674}.history-empty{color:#686868}
.board-history footer{display:flex;gap:18px;flex:none;padding:12px 10px max(12px,env(safe-area-inset-bottom));background:white;border-top:1px solid #e4e7eb}
.board-history footer button{flex:1;width:auto;min-height:42px;margin:0;border:0;border-radius:8px;font-size:14px}
.board-history footer .board-close{background:#f9edf0;color:#636774}
.board-history footer .history-trend{background:linear-gradient(110deg,#fe293c,#c51646);color:white}
.board-confirm{height:64dvh;min-height:min(360px,100dvh);max-height:100dvh;padding:0;border-radius:20px 20px 0 0;overflow:hidden}
.board-confirm-body{display:flex;flex-direction:column;height:100%}
.board-confirm-head{display:grid;grid-template-columns:64px 1fr 64px;align-items:center;flex:none;padding:10px 4px;border-bottom:1px solid #e7e8ec;text-align:center}
.board-confirm-head h2,.board-confirm-head p{margin:0;line-height:1.4;font-size:15px;font-weight:500}
.board-confirm-head button,.board-confirm-row button{border:0;background:transparent;color:#626874;padding:8px 3px;font-size:13px}
#board-confirm-close{font-size:22px;line-height:1}
#board-confirm-rows{flex:1;min-height:0;overflow:auto}
.board-confirm-row{display:grid;grid-template-columns:minmax(56px,1fr) minmax(64px,96px) minmax(63px,1fr) 35px;align-items:center;gap:10px;padding:13px 10px;border-bottom:1px solid #f1f2f5;font-size:13px;overflow-wrap:anywhere}
.board-confirm-row small,.board-confirm-row div span{display:block;font-size:inherit}
.board-confirm-row small,.board-confirm-row>span{color:#6b7487}
.board-confirm-row input{width:100%;min-width:0;padding:6px 4px;border:1px solid #d8dcec;border-radius:5px;background:#f8f9fc;box-shadow:0 1px 3px #33366a20 inset;color:#333;text-align:center}
.board-confirm-row input[aria-invalid=true]{border-color:#bd2546}
.board-confirm-foot{flex:none;padding:10px 10px max(10px,env(safe-area-inset-bottom));border-top:1px solid #e9ebf1}
.board-confirm-foot p{margin:0 0 12px;color:#626a7b;font-size:14px}
#board-confirm-error{color:#b82542}
#board-confirm-submit{width:100%;min-height:46px;border:0;border-radius:5px;background:#c61948;color:#fff}
#board-confirm-submit:disabled{opacity:.5}
#board-toast{position:absolute;z-index:5;inset:45% 10% auto;margin:0;padding:12px;border-radius:6px;background:#25272ee8;color:#fff;text-align:center;pointer-events:none}
.road-positions,.road-modes{display:flex;gap:8px;overflow:auto;margin:0 0 9px;white-space:nowrap}
.road-positions button{background:#fff;font-size:14px}.road-positions .active{color:#c92142;font-weight:700}
.road-scroll{overflow:auto}.road-grid{display:grid;width:max-content;grid-auto-columns:25px;grid-template-rows:repeat(6,25px);grid-auto-flow:column;border:solid #e0e2e7;border-width:1px 0 0 1px}
.road-cell{display:grid;place-items:center;border:solid #e0e2e7;border-width:0 1px 1px 0}.road-dot{display:grid;place-items:center;color:white;border-radius:50%;width:20px;height:20px;font-size:12px}
.board-close{display:block;width:84%;margin:13px auto 0;border:0;border-radius:5px;padding:10px;color:#555d68;background:#eef0f5}
.board-basket-items div{padding:7px 0;border-bottom:1px solid #e9ebef;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}
.board-basket-items button{background:none;border:none;color:#b82044}
.board-main[hidden],.board-insight[hidden]{display:none}
.board-insight{flex:1;overflow:auto;padding:12px;background:#f5f5f7;color:#48434a}
.board-insight article,.board-insight>div{margin-bottom:8px;padding:9px 12px;background:#fff;border:1px solid #eee9ed;border-radius:6px}
.board-insight h2{font-size:14px;margin:0 0 6px}.board-insight button{margin-right:6px;border:1px solid #e4d8e0;border-radius:5px;background:#fff2f5;padding:5px 10px;color:#b42046}
#board-bookmark-values{width:100%;padding:8px;margin:7px 0;border:1px solid #dddce6;border-radius:5px}
#board-bookmark-save,#board-add{padding:7px 12px;border:0;border-radius:5px;background:#e4234a;color:white}
@media(min-width:520px){
  .board-top{min-height:61px;padding-inline:16px}.board-balance{font-size:19px}
  .board-result{min-height:94px;margin:2px 12px 6px;gap:5px;padding-inline:9px}.board-result-cell small{font-size:16px}.ball{width:40px;height:40px;font-size:19px}
  .board-live{min-height:49px;font-size:18px}.board-live button{font-size:26px}.board-main{grid-template-columns:98px minmax(0,1fr)}
  #board-groups button{min-height:70px;font-size:17px}#board-variants .special-view{font-size:19px;padding-block:8px}
  #board-zodiacs{gap:7px;margin:14px 0 14px}.animal{font-size:17px}.animal i{width:48px;min-height:48px}.animal i::before{width:32px;height:32px}.animal i span{font-size:22px}
  #board-choices{grid-template-columns:repeat(5,minmax(0,101px));gap:12px 4px}.board-picks{padding-inline:6px}
  #board-choices button{min-height:68px;font-size:20px}#board-choices button small{font-size:18px}
  .board-selected>span{min-width:224px;font-size:16px}.board-input{width:195px}.board-actions button{min-height:54px;font-size:16px}
  #board-submit{font-size:16px}.board-presets button{padding-block:11px;font-size:15px}
}
