:root{
  --pink:#ef41bf;
  --bg:#000;
}
*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;padding:0;overflow:hidden;background:#000;color:#fff;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",Roboto,sans-serif}
#screen-root{width:100vw;height:100vh;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#000}
.dashboard{width:100vw;height:100vh;aspect-ratio:16/9;display:flex;flex-direction:column;
  background:url(../assets/bigbg.jpg) center center/cover no-repeat #000;
  padding:.2vw 2.4vw .2vw;overflow:hidden;color:#fff;justify-content:flex-start}
.top{display:flex;flex-direction:column;align-items:center;gap:0}
.header{display:flex;justify-content:center;align-items:center;margin-bottom:0}
.header img{width:100%;max-width:20vw;display:block;margin:0 auto}
.disclaimer{font-size:.95vw;line-height:1.1;color:rgba(255,255,255,.72);text-align:center;width:100%;letter-spacing:.3px;margin:-1vw 0 0}
.footer{display:flex;justify-content:center;margin-top:auto}
.footer img{width:100%;max-width:8.85vw;display:block;margin:0 auto}

/* 6 卡横排，沿用原版等比布局 */
.grid{display:grid;grid-auto-flow:column;grid-template-columns:repeat(6,1fr);gap:1.1vw;align-items:end}
.card{display:flex;flex-direction:column;align-items:center;gap:0}
.side{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:11.4vw;gap:8px}
.side img{max-height:8vw;max-width:100%;object-fit:contain}
.name{font-size:1.85vw;font-weight:900;letter-spacing:1px;text-shadow:0 2px 10px rgba(0,0,0,.5);
  line-height:1.15;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;margin-bottom:.45vw}
.tables{display:flex;flex-direction:row;gap:.45vw}
.tbl{width:6.8vw;display:flex;flex-direction:column;text-align:center;border:2px solid var(--pink);height:34.5vw}
.head{background:url(../assets/tbg.png) center/cover no-repeat;background-size:100% 100%;color:#fff;
  font-size:clamp(10px,0.8vw,14px);font-weight:800;letter-spacing:.3px;line-height:1.15vw;padding:.2vw .1vw;
  white-space:nowrap;text-shadow:0 1px 4px rgba(0,0,0,.55)}
.row{display:flex;align-items:center;justify-content:center;flex:1 1 0;font-size:1.08vw;
  font-variant-numeric:tabular-nums;background:url(../assets/nobg.png) center/100% 100% no-repeat;
  border-bottom:1px solid rgba(255,255,255,.28)}
.row:last-child{border-bottom:none}
.row:hover{background-color:rgba(255,255,255,.08)}
.num.z{color:rgba(255,255,255,.32)}
.row.low{color:#fff;font-weight:800}

/* ===== 移动端 / 竖屏 / 窄窗口：切换为可滚动卡片网格 ===== */
@media (max-width:900px),(max-aspect-ratio:1/1){
  html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}
  #screen-root{height:auto;min-height:100vh;display:block;overflow:visible}
  .dashboard{width:100%;height:auto;min-height:100vh;aspect-ratio:auto;justify-content:flex-start;
    padding:calc(14px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom));
    background:url(../assets/bigbg.jpg) center top/cover no-repeat #000}
  .header img{max-width:min(46vw,180px)!important}
  .disclaimer{font-size:13px;line-height:1.5;margin:8px 0 16px;color:rgba(255,255,255,.8)}
  .footer{margin-top:20px}
  .footer img{max-width:130px!important}
  .grid{grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}
  .side{height:auto;min-height:0;padding:0;gap:4px;justify-content:flex-start}
  .side img{max-height:80px}
  .name{font-size:12px;letter-spacing:.5px}
  .tables{width:100%;gap:5px}
  .tbl{flex:1 1 0;width:auto;min-width:0;height:auto}
  .head{padding:6px 2px;font-size:11px;letter-spacing:.5px}
  .row{height:22px;flex:none;font-size:11px}
}

/* 平板竖屏 / 窄屏中等宽度：3 列 */
@media (min-width:640px) and (max-aspect-ratio:1/1),(min-width:640px) and (max-width:900px){
  .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 16px}
  .side img{max-height:104px}
  .name{font-size:13px}
  .row{height:26px}
  .head{font-size:12px}
  .row{font-size:12.5px}
}
/* 大平板竖屏：4 列 */
@media (min-width:1000px) and (max-aspect-ratio:1/1){
  .grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 18px}
  .side img{max-height:124px}
  .row{height:30px}
  .head{font-size:13.5px}
  .row{font-size:14px}
}
@media (max-width:360px){
  .grid{grid-template-columns:1fr}
  .side img{max-height:100px}
}

/* 横屏/桌面：铺满屏幕，纵向拉伸填满（整体与电脑端一致，不再留黑边） */
@media (min-width:901px) and (min-aspect-ratio:1/1){
  .grid{flex:1;align-items:stretch}
  .tables{flex:1;min-height:0}
  .tbl{height:auto}
}

/* 仅 "Available stock" 表头缩小以放得下，"Size" 保持原字号；固定行高保证两表头等高、行对齐 */
.tbl:last-child .head{font-size:clamp(6px,0.62vw,12px);letter-spacing:0}
@media (max-width:900px),(max-aspect-ratio:1/1){
  .head{line-height:18px}
  .tbl:last-child .head{font-size:9px}
}
