/* ===== 大屏展示样式（16:9 投屏自适应） ===== */
html,body{height:100%;overflow:hidden}
body:not(.has-custom-bg){background:#04070e}
.screen{
  width:100vw;height:100vh;display:flex;flex-direction:column;
  /* 顶部多留白，避开背景图里的 logo / 标题区域 */
  padding:12vh clamp(156px,9vw,200px) 2.4vh 2.2vw;gap:2vh;
}
/* 欢迎页：全屏只露背景图 */
.screen.mode-welcome{padding:0;gap:0}
.screen.mode-welcome .scr-main{flex:1}
/* 最终排名：内容上移居中，保留与其他页一致的毛玻璃框 */
.screen.mode-ranking{padding:8vh clamp(156px,9vw,200px) 2vh 2.2vw;gap:0}
.screen.mode-ranking .rank-wrap{justify-content:center;padding:2.4vh 2.4vw}
.screen.mode-ranking .rank-title{margin-bottom:2vh}
.screen.mode-ranking .rank-podium{flex:0 1 auto;min-height:42vh;align-items:end}
.screen.mode-ranking .rank-podium .pod-2 .bar{height:28vh;min-height:140px}
.screen.mode-ranking .rank-podium .pod-1 .bar{height:38vh;min-height:190px}
.screen.mode-ranking .rank-podium .pod-3 .bar{height:22vh;min-height:120px}
.screen.mode-ranking .rank-list-rest:empty{display:none}

/* 视图容器 */
.scr-main{flex:1;min-height:0;position:relative}
.view{position:absolute;inset:0;display:none;flex-direction:column;gap:2vh}
.view.active{display:flex}
.view[data-view="welcome"].active{pointer-events:none}

/* ---------- 视图：当前选手（左：二维码+规则；右：编号+进度|均分） ---------- */
.cur-layout{
  flex:1;min-height:0;display:grid;
  grid-template-columns:minmax(300px,32%) 1fr;gap:2vw;
}
.cur-side{display:flex;flex-direction:column;gap:1.6vh;min-height:0}
.cur-qr-main{
  flex:1.25 1 0;min-height:0;padding:2.2vh 1.8vw;text-align:center;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.cur-qr-main .qr-label{
  font-size:clamp(15px,2.2vh,24px);color:#fff;margin-bottom:1.4vh;font-weight:700;letter-spacing:1px;
}
.cur-qr-main #qrcodeCur{display:flex;justify-content:center;flex:1;align-items:center}
.cur-qr-main #qrcodeCur img,.cur-qr-main #qrcodeCur canvas{
  width:26vh!important;height:26vh!important;max-width:260px;max-height:260px;
  background:#fff;padding:10px;border-radius:12px;
}
.cur-rules{
  flex:1 1 0;min-height:0;display:flex;flex-direction:column;justify-content:center;
  padding:1.8vh 1.4vw;gap:1.2vh;
}
.cur-rules .h{
  text-align:center;font-size:clamp(15px,2.2vh,26px);color:#fff;font-weight:700;letter-spacing:2px;
}
.cur-rules .rules-list{margin:0;padding:0;display:flex;flex-direction:column;gap:1vh}
.cur-rules .rule-item{
  display:block;width:100%;box-sizing:border-box;
  padding:1.2vh 1vw;text-align:center;
  font-size:clamp(12px,1.8vh,20px);line-height:1.4;font-weight:600;color:#fff;
}
/* 小底板不显示四角装饰，避免拥挤 */
.cur-rules .rule-item::before,.cur-rules .rule-item::after{display:none}
.cur-main{
  min-height:0;display:flex;flex-direction:column;padding:2vh 2vw;gap:2vh;
}
.cur-main-num{
  flex:1;min-height:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;text-align:center;
}
.cur-main-num .lbl{font-size:clamp(22px,3.4vh,42px);color:var(--blue);font-weight:700;letter-spacing:2px}
.cur-main-num .pno{font-size:clamp(90px,26vh,320px);font-weight:800;color:#fff;line-height:.9;text-shadow:0 0 40px rgba(55,162,255,.35)}
.cur-main-num .pno small{font-size:.32em;color:var(--mut);margin-left:.1em}
.cur-main-foot{
  flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:1.6vw;
}
.cur-main-foot .cur-prog,.cur-main-foot .cur-avg{min-height:0}
.cur-main-foot .cur-prog{display:flex;flex-direction:column;justify-content:center;padding:1.8vh 1.6vw;gap:1vh}
.cur-main-foot .cur-avg{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.8vh 1.6vw;gap:.4vh}
.cur-main-foot .cur-avg .v{font-size:clamp(40px,10vh,120px)}
.cur-main-foot .cur-prog .n{font-size:clamp(32px,7vh,88px)}

/* ---------- 视图：最终排名（柱状领奖台） ---------- */
.rank-podium{flex:1;display:grid;grid-template-columns:1fr 1.15fr 1fr;align-items:end;gap:2vw;padding:1vh 1vw 0;min-height:0}
.rank-podium .pod{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:.8vh;min-height:0}
.rank-podium .pod .medal{font-size:clamp(28px,5vh,64px);line-height:1}
.rank-podium .pod .bar{width:72%;border-radius:10px 10px 0 0;border:1px solid var(--line);background:linear-gradient(180deg,rgba(55,162,255,.25),rgba(8,17,32,.8))}
.rank-podium .pod-2 .bar{height:22vh;min-height:120px}
.rank-podium .pod-1 .bar{height:30vh;min-height:160px}
.rank-podium .pod-3 .bar{height:18vh;min-height:100px}
.rank-podium .pod.gold .bar{border-color:var(--gold);box-shadow:0 0 24px rgba(255,206,77,.25)}
.rank-podium .pod.silver .bar{border-color:var(--silver)}
.rank-podium .pod.bronze .bar{border-color:var(--bronze)}
.rank-podium .pl{font-size:clamp(14px,2vh,24px);font-weight:800;color:#fff}
.rank-podium .pn,.rank-podium .pp{font-size:clamp(11px,1.6vh,18px);color:var(--mut);text-align:center;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank-podium .ps{font-size:clamp(22px,3.6vh,48px);font-weight:800;color:var(--green);line-height:1}
.rank-podium .ps small{font-size:.45em;color:var(--mut)}
.rank-list-rest{flex:0 0 auto;max-height:22vh;overflow:auto;margin-top:1vh}

.cur-grid{flex:1;display:grid;grid-template-columns:1.15fr 1fr;gap:2vw;min-height:0}
.cur-left{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1vh}
.cur-left .lbl{font-size:clamp(22px,3.4vh,42px);color:var(--blue);font-weight:700;letter-spacing:2px}
.cur-left .pno{font-size:clamp(90px,28vh,340px);font-weight:800;color:#fff;line-height:.9;text-shadow:0 0 40px rgba(55,162,255,.35)}
.cur-left .pno small{font-size:.32em;color:var(--mut);margin-left:.1em}
.cur-left .pname{font-size:clamp(16px,2.4vh,28px);color:var(--mut)}
.cur-right{display:flex;flex-direction:column;gap:2vh;min-height:0}
.cur-prog{flex:1;display:flex;flex-direction:column;justify-content:center;padding:2vh 2.4vw;gap:1.4vh}
.cur-prog .h{font-size:clamp(16px,2.4vh,28px);color:var(--green);font-weight:700}
.cur-prog .n{font-size:clamp(40px,9vh,120px);font-weight:800;color:#fff;line-height:1}
.cur-prog .n small{color:var(--mut);font-size:.55em}
.cur-info{padding:1.6vh 2vw;display:flex;align-items:center;justify-content:space-around;gap:1vw;font-size:clamp(13px,1.9vh,20px)}
.cur-info .it{display:flex;align-items:center;gap:.6vw;color:var(--txt)}
.cur-info svg{width:2.6vh;height:2.6vh;color:var(--blue)}
.cur-info .sep{width:1px;height:3vh;background:var(--line)}
.cur-avg{flex:1.1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.6vh}
.cur-avg .h{font-size:clamp(16px,2.4vh,28px);color:var(--green);font-weight:700}
.cur-avg .v{font-size:clamp(52px,14vh,180px);font-weight:800;color:var(--green);line-height:1;text-shadow:0 0 40px rgba(34,227,154,.4)}

/* ---------- 视图：概览表 ---------- */
.ov-grid{flex:1;display:grid;grid-template-columns:1fr 20vw;gap:1.6vw;min-height:0}
.ov-table{padding:1.6vh 1.6vw;display:flex;flex-direction:column;min-height:0}
.ov-head,.ov-row{display:grid;grid-template-columns:1.1fr 2.4fr 1fr;align-items:center;gap:1vw}
.ov-head{color:var(--blue);font-size:clamp(13px,1.9vh,22px);font-weight:700;padding:0 1vw 1vh;border-bottom:1px solid var(--line)}
.ov-head .c-avg{color:var(--green)}
.ov-body{flex:1;display:flex;flex-direction:column;justify-content:space-around;min-height:0}
.ov-row{padding:1vh 1vw;border-radius:10px}
.ov-row .p-no{display:flex;align-items:center;gap:.5vw;font-size:clamp(22px,4vh,48px);font-weight:800;color:#fff}
.ov-row .p-no small{font-size:.42em;color:var(--mut)}
.ov-prog{display:flex;align-items:center;gap:1vw}
.ov-donut{width:6vh;height:6vh;min-width:40px;flex:0 0 auto}
.ov-prog .seg-bar{flex:1}
.ov-prog .cnt{font-size:clamp(15px,2.2vh,26px);color:#fff;white-space:nowrap}
.ov-prog .cnt small{color:var(--mut)}
.ov-row .c-avg{font-size:clamp(26px,4.6vh,54px);font-weight:800;color:var(--green);text-align:right}
.ov-side{display:flex;flex-direction:column;gap:1.6vh}
.ov-side .box{flex:1;padding:1.6vh 1.4vw}
.ov-side h3{margin:0 0 1vh;font-size:clamp(15px,2.1vh,24px);color:var(--blue)}
.legend{display:flex;align-items:flex-start;gap:.8vw;margin-bottom:1.4vh}
.legend .dot{width:2.4vh;height:2.4vh;min-width:16px;border-radius:50%;border:3px solid var(--green);margin-top:.4vh}
.legend.doing .dot{border-color:var(--blue)}
.legend .lt{font-size:clamp(14px,1.9vh,20px);font-weight:700}
.legend.done .lt{color:var(--green)} .legend.doing .lt{color:var(--blue)}
.legend .ld{font-size:clamp(11px,1.5vh,15px);color:var(--mut)}

/* ---------- 视图：最终排名 ---------- */
.rank-wrap{flex:1;padding:2vh 2vw;display:flex;flex-direction:column;min-height:0}
.rank-title{text-align:center;font-size:clamp(22px,3.6vh,44px);font-weight:800;color:#fff;margin-bottom:1.5vh;letter-spacing:4px}
.rank-list{flex:1;display:flex;flex-direction:column;justify-content:space-around;gap:1vh;min-height:0}
.rank-row{display:grid;grid-template-columns:9vw 1fr 1.4fr auto;align-items:center;gap:1.5vw;padding:1vh 1.6vw;border-radius:12px;border:1px solid var(--line);background:rgba(10,18,32,.5)}
.rank-row .medal{display:flex;align-items:center;justify-content:center;font-size:clamp(24px,4.6vh,54px);font-weight:800;color:var(--mut)}
.rank-row .p-no{font-size:clamp(24px,4.4vh,52px);font-weight:800;color:#fff}
.rank-row .p-no small{font-size:.42em;color:var(--mut)}
.rank-row .p-note{font-size:clamp(13px,1.9vh,20px);color:var(--mut);border-left:1px solid var(--line);padding-left:1.2vw}
.rank-row .p-score{font-size:clamp(30px,5.6vh,66px);font-weight:800;color:var(--green);text-align:right}
.rank-row.top1{border-color:var(--gold);background:linear-gradient(90deg,rgba(255,206,77,.14),rgba(255,206,77,.02))}
.rank-row.top1 .medal{color:var(--gold)}
.rank-row.top2{border-color:rgba(207,216,230,.6);background:linear-gradient(90deg,rgba(207,216,230,.12),transparent)}
.rank-row.top2 .medal{color:var(--silver)}
.rank-row.top3{border-color:rgba(224,138,74,.6);background:linear-gradient(90deg,rgba(224,138,74,.12),transparent)}
.rank-row.top3 .medal{color:var(--bronze)}
.rank-row .p-score.blue{color:var(--blue)}

/* ---------- 底部信息条 ---------- */
.scr-bottom{flex:0 0 auto;display:flex;align-items:center;justify-content:space-around;padding:1.5vh 2vw;gap:1vw}
.scr-bottom .it{display:flex;align-items:center;gap:.7vw;font-size:clamp(14px,2vh,24px);font-weight:600}
.scr-bottom .it svg{width:3vh;height:3vh;color:var(--blue)}
.scr-bottom .sep{width:1px;height:3.4vh;background:var(--line)}

.hidden{display:none!important}

/* 右侧活动技术支持：所有大屏模式保持固定展示 */
.screen > .support-contact{
  --support-accent:#c15b9f;
  position:fixed;z-index:50;right:clamp(10px,.75vw,20px);top:50%;transform:translateY(-50%);
  width:clamp(134px,7vw,174px);padding:1.4vh .6vw;
  background:linear-gradient(180deg,rgba(5,27,46,.88),rgba(4,18,32,.78));
  border:1px solid rgba(34,227,154,.45);border-radius:14px;
  box-shadow:0 0 26px rgba(34,227,154,.13),inset 0 0 20px rgba(55,162,255,.07);
  backdrop-filter:blur(7px);text-align:center;
}
.screen > .support-contact::before,.screen > .support-contact::after{
  content:"";position:absolute;width:14px;height:14px;pointer-events:none;border-color:var(--green);
}
.screen > .support-contact::before{left:-1px;top:-1px;border-left:2px solid;border-top:2px solid;border-top-left-radius:10px}
.screen > .support-contact::after{right:-1px;bottom:-1px;border-right:2px solid;border-bottom:2px solid;border-bottom-right-radius:10px}
.screen .support-contact__eyebrow{
  margin:0 0 1.1vh;display:flex;align-items:center;justify-content:center;gap:.35vw;
  color:#fff;font-size:clamp(11px,.85vw,17px);font-weight:700;letter-spacing:.05em;white-space:nowrap;
}
.screen .support-contact__eyebrow span{width:12px;height:2px;background:linear-gradient(90deg,var(--blue),var(--support-accent));border-radius:2px}
.screen .support-contact__body{display:flex;flex-direction:column;align-items:center;gap:1.15vh}
.screen .support-contact__phone{
  width:100%;display:flex;flex-direction:column;align-items:center;gap:.35vh;padding:.7vh .25vw;
  color:#fff;text-decoration:none;border:1px solid rgba(55,162,255,.28);border-radius:9px;background:rgba(55,162,255,.08);
}
.screen .support-contact__phone svg{width:clamp(16px,1.15vw,26px);height:clamp(16px,1.15vw,26px);color:var(--green)}
.screen .support-contact__phone-copy{display:flex;flex-direction:column;align-items:center;line-height:1.12}
.screen .support-contact__phone-copy strong{font-size:clamp(12px,.92vw,19px);font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.screen .support-contact__phone-copy span{margin-top:.35vh;color:var(--green);font-size:clamp(10px,.7vw,14px);font-weight:700}
.screen .support-contact__qr{width:100%;display:flex;flex-direction:column;align-items:center;gap:.55vh;color:var(--mut);font-size:clamp(9px,.64vw,13px)}
.screen .support-contact__qr-frame{width:100%;padding:5px;background:#fff;border:1px solid rgba(193,91,159,.5);border-radius:10px;box-shadow:0 0 18px rgba(193,91,159,.16)}
.screen .support-contact__qr img{display:block;width:100%;height:auto;border-radius:6px}

@media(max-height:650px){
  .screen > .support-contact{padding:1vh .55vw}
  .screen .support-contact__eyebrow{margin-bottom:.7vh}
  .screen .support-contact__body{gap:.7vh}
  .screen .support-contact__phone{flex-direction:row;justify-content:center;padding:.45vh .2vw}
  .screen .support-contact__phone-copy span{display:none}
}

/* 空状态/未就绪 */
.scr-empty{flex:1;display:flex;align-items:center;justify-content:center;color:var(--mut);font-size:clamp(16px,2.4vh,26px)}
