.topbar{justify-content:center}.brand{margin:0 auto}.statusbar{justify-content:center}.game-layout{display:block;max-width:900px;margin:0 auto}.board{width:100%}.result-head{max-width:900px;margin-left:auto;margin-right:auto}.period{text-align:center}.top-results{justify-content:center;margin-right:0}.latest{right:22px}.sidebar{display:none}.top-link,.menu,.radio{display:none}
.rank-toggle{width:100%;height:52px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);font-size:16px;font-weight:800;text-align:left;padding:0 18px;margin-bottom:12px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}.rank-toggle span{color:var(--orange);font-size:22px}.rank-panels.collapsed{display:none}
.history-toggle{display:block;margin:7px 0 0 auto;border:1px solid var(--orange);background:var(--orange-soft);color:var(--orange);border-radius:7px;padding:5px 9px;font-size:11px;cursor:pointer}.history-panel{display:none;max-width:900px;margin:0 auto 15px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px 16px}.history-panel.open{display:block}.history-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);padding:9px 0;font-size:12px;color:var(--muted)}.history-row:last-child{border-bottom:0}.history-row strong{color:var(--ink);min-width:90px}.history-mini{display:flex;gap:4px}.history-mini i{font-style:normal;color:#fff;border-radius:5px;padding:3px 5px;font-weight:700}
.rank-toggle+.rank-panels .section-title small{font-size:11px;color:var(--orange);font-weight:500;margin-left:auto}.bs-grid{display:grid;grid-template-columns:repeat(4,1fr)}.bs-cell{min-height:72px;border:0;border-right:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}.bs-cell:last-child{border-right:0}.bs-cell.selected{background:var(--orange-soft);box-shadow:inset 0 0 0 2px var(--orange)}.bs-cell>span{font-size:18px;font-weight:800}.bs-cell>small{font-size:10px;color:var(--muted)}.bs-cell>b{font-size:13px;color:var(--orange)}
@media(max-width:760px){.bs-grid{grid-template-columns:repeat(2,1fr)}.bs-cell{border-bottom:1px solid var(--line);border-right:1px solid var(--line);min-height:58px}.bs-cell:nth-child(even){border-right:0}}
@media(max-width:760px){.latest{position:static;text-align:center;margin-top:10px}.top-results{justify-content:center}.game-layout{width:100%}}
.section-title small{display:none !important}
.auth-bar{max-width:900px;margin:0 auto 12px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:10px 14px;display:flex;align-items:center;gap:8px}.auth-bar span{margin-right:auto;color:var(--muted);font-size:12px}.auth-btn{border:0;border-radius:8px;background:var(--orange);color:#fff;padding:8px 14px;font-size:12px;cursor:pointer}.auth-btn.secondary{background:var(--orange-soft);color:var(--orange)}.hidden{display:none !important}.auth-modal{position:fixed;inset:0;background:#20242f66;display:grid;place-items:center;z-index:20}.auth-dialog{position:relative;width:min(360px,calc(100% - 32px));background:#fff;border-radius:16px;padding:26px;box-shadow:0 20px 60px #0003}.auth-dialog h2{margin:0 0 16px;font-size:20px}.auth-dialog input{width:100%;height:42px;border:1px solid var(--line);border-radius:8px;padding:0 11px;margin-bottom:10px;font-size:14px}.auth-close{position:absolute;right:12px;top:8px;border:0;background:none;font-size:24px;color:var(--muted);cursor:pointer}.auth-submit{width:100%;height:42px;border:0;border-radius:8px;background:var(--orange);color:#fff;font-weight:700}.auth-dialog p{font-size:12px;color:var(--orange);min-height:18px;margin:0 0 10px}
.bet-record-wrap{max-width:900px;margin:14px auto 0}.bet-record-panel{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:10px 15px;margin-top:8px}.bet-record-panel.collapsed{display:none}.empty-record{text-align:center;color:var(--muted);font-size:12px;padding:15px}.bet-record{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}.bet-record:last-child{border-bottom:0}.bet-record strong{display:block;color:var(--ink)}.bet-record span,.bet-record small{color:var(--muted);margin-left:8px}.bet-record small{display:block;text-align:right}
.section-title:after{content:none !important;display:none !important}

/* ===== 移动端自适应优化 ===== */
@media(max-width:760px){
  body{-webkit-tap-highlight-color:transparent}
  button{touch-action:manipulation}
  input,select,textarea{font-size:16px !important}
  .app{padding:0 10px}
  .topbar{height:56px;gap:10px}
  .brand{font-size:15px}.brand-mark{width:28px;height:28px;border-radius:8px}
  .result-head{margin:12px 0 10px;padding:12px;border-radius:14px;min-height:0;box-shadow:0 8px 20px #6d573310}
  .period{font-size:14px}.period strong{font-size:19px}
  /* 标题居中；241期+封盘倒计时+历史按钮一行靠右（位于号码球最后两位上方）；号码球紧随其下 */
  .result-head{display:block;position:relative;min-height:0;padding:12px}
  .period{text-align:center;font-size:14px}.period strong{font-size:19px}
  .latest{position:static;display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;margin:8px auto 0;max-width:335px;min-width:0}
  .latest br{display:none}
  .latest strong{font-size:13px;white-space:nowrap}
  .latest small{margin-top:0;font-size:11px;white-space:nowrap}
  .latest b{font-size:14px;margin-top:0;font-variant-numeric:tabular-nums;white-space:nowrap}
  #countdown{min-width:80px;text-align:right}
  .history-toggle{margin:0;padding:6px 10px;font-size:11px;white-space:nowrap}
  #top-results{margin-top:10px;justify-content:center;flex-wrap:nowrap}
  .top-ball{width:29px;height:29px;border-radius:8px;font-size:11px;box-shadow:inset 0 -2px #0002}
  .history-panel{padding:10px 12px;border-radius:12px}
  .history-row{font-size:11px;gap:8px}.history-row strong{min-width:60px}
  .history-mini{gap:3px}.history-mini i{padding:2px 4px;font-size:10px}
  .statusbar{padding:12px 14px;font-size:12px;border-radius:12px;margin-bottom:12px}
  .statusbar strong{font-size:17px}
  .auth-bar{flex-wrap:wrap;padding:10px 12px;border-radius:12px;gap:6px}
  .auth-bar span{font-size:12px;width:100%;margin-right:0}
  .auth-btn{padding:10px 0;font-size:13px;text-align:center}
  .auth-bar .auth-btn{flex:1;padding:10px 8px}
  /* 功能按钮双列排布 */
  .game-layout>#change-pwd,.game-layout>#pay-pwd-btn,.game-layout>#rules-btn,.game-layout>#message-btn,.game-layout>#transfer-record-btn,.game-layout>#chat-btn{width:calc(50% - 4px);margin-top:8px !important;padding:12px 0;font-size:13px;border-radius:10px}
  .game-layout>div[style*="margin-top:8px"]{display:grid !important;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:8px !important}
  .game-layout>div[style*="margin-top:8px"] .auth-btn{width:100%;padding:12px 0;font-size:13px;border-radius:10px}
  /* 开奖面板 */
  .rank-toggle{height:46px;font-size:14px;padding:0 14px;border-radius:12px;margin-bottom:10px}
  .rank-panels .rank-section{margin-bottom:10px}
  .section-title{height:40px;font-size:13px;padding:0 12px}
  .odd-cell{height:54px;gap:6px}
  .odd-cell.selected{box-shadow:inset 0 0 0 2px var(--orange)}
  .number{width:27px;height:27px;border-radius:8px;font-size:12px}
  .odd{font-size:12px}
  .bs-grid{gap:0}
  .bs-cell{min-height:54px;gap:5px}
  .bs-cell>span{font-size:15px}.bs-cell>small{font-size:9px}.bs-cell>b{font-size:12px}
  /* 底部下注栏 */
  .betbar{position:sticky;bottom:8px;padding:10px 12px;gap:7px;border-radius:12px;flex-wrap:wrap;box-shadow:0 10px 24px #6d573330}
  .betbar>span{font-size:12px;flex-shrink:0}
  .betbar input{flex:1;min-width:0;width:auto;height:40px;font-size:16px;border-radius:8px}
  .betbar button{height:40px;padding:0 12px;font-size:13px;flex-shrink:0}
  .total{width:100%;margin-left:0;text-align:center;font-size:11px}
  /* 下注记录 */
  .bet-record-wrap{margin-top:10px}
  .bet-record-panel{padding:8px 12px;max-height:45vh;overflow-y:auto}
  .bet-record{font-size:12px;gap:8px}
  /* 弹窗适配 */
  .auth-modal{align-items:end;padding:0}
  .auth-dialog{width:100%;max-width:100%;border-radius:18px 18px 0 0;padding:20px 16px;max-height:90vh;overflow-y:auto;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
  .auth-dialog h2{font-size:17px;margin-bottom:12px}
  .auth-dialog input{height:44px;font-size:16px !important}
  .auth-submit{height:44px;font-size:15px}
  #chat-modal .auth-dialog{max-height:86vh}
  #chat-list{min-height:220px;max-height:52vh}
  #chat-input{font-size:16px !important}
  #chat-send{width:auto !important;padding:0 18px !important}
  #rules-content{max-height:55vh;font-size:14px}
  label{font-size:14px !important}
}
/* 超窄屏幕兜底：开奖球保持一行 */
@media(max-width:360px){
  .top-results{gap:3px}
  .top-ball{width:25px;height:25px;font-size:10px;border-radius:7px}
  .period strong{font-size:17px}
  .latest{gap:5px;max-width:277px}
  .latest strong{font-size:11px}
  .latest small{font-size:9px}
  .latest b{font-size:12px}
  #countdown{min-width:62px}
  .history-toggle{padding:5px 8px;font-size:10px}
}
