:root{
  --ink: #eef2f7;
  --muted: rgba(226,235,244,.58);
  --faint: rgba(226,235,244,.34);
  --line: rgba(190,214,236,.14);
  --panel: rgba(10,16,24,.56);
  --gold: #e8c07a;
  --green: #6fbf8b;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

*{ box-sizing: border-box; }

html,body{
  margin:0; padding:0; height:100%;
  background:#04060b; color:var(--ink);
  font-family:var(--sans);
  overflow:hidden;
  -webkit-font-smoothing:antialiased;
}

#scene{
  position:fixed; inset:0; width:100%; height:100%;
  display:block; touch-action:none;
}

#hud{
  position:fixed; inset:0; pointer-events:none;
  display:flex; flex-direction:column; justify-content:space-between;
  padding:22px 26px 20px;
}

.hud-top{
  position:relative; z-index:30;
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:20px;
}

.brand-en{
  font-size:19px; font-weight:500; letter-spacing:.16em;
  color:rgba(255,247,232,.94);
  text-shadow:0 0 26px rgba(232,192,122,.28);
}
.brand-cn{
  margin-top:6px; font-size:11.5px; letter-spacing:.08em; color:var(--faint);
}

.audio-bar{
  position:relative;
  display:flex; align-items:center; gap:8px;
  pointer-events:auto;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:7px 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn{
  appearance:none; border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--ink);
  font-family:inherit; font-size:12px; letter-spacing:.04em;
  padding:7px 13px; border-radius:8px; cursor:pointer;
  white-space:nowrap;
  transition:background .18s ease, border-color .18s ease, opacity .18s ease;
}
.btn:hover{ background:rgba(255,255,255,.1); border-color:rgba(200,220,240,.26); }
.btn:disabled{ opacity:.35; cursor:default; }
.btn.primary{
  background:rgba(232,192,122,.14);
  border-color:rgba(232,192,122,.34);
  color:#f4dcb2;
}
.btn.primary:hover{ background:rgba(232,192,122,.22); }
.btn.nudge{
  border-color:rgba(232,192,122,.75);
  color:rgba(255,240,214,.98);
  animation:btn-nudge 2.4s ease-out infinite;
}
@keyframes btn-nudge{
  0%   { box-shadow:0 0 0 0 rgba(232,192,122,.42); }
  62%  { box-shadow:0 0 0 9px rgba(232,192,122,0); }
  100% { box-shadow:0 0 0 0 rgba(232,192,122,0); }
}
.btn.help{
  width:26px; padding:7px 0; border-radius:50%;
  font-size:11px; color:var(--faint); line-height:1;
}
/* 图标按钮（清屏 ⛶）：和 help 同尺寸，别在窄屏把音乐条撑爆 */
.btn.icon{
  width:26px; padding:7px 0;
  font-size:13px; line-height:1; color:var(--faint);
}
.btn.icon:hover{ color:var(--ink); }
/* 语言按钮（中/EN/ไท）：文字短，做成和图标按钮同宽的小方块，窄屏不撑爆顶栏 */
.btn.lang{
  width:26px; padding:7px 0;
  font-size:11px; line-height:1; color:var(--faint);
  letter-spacing:0;
}
.btn.lang:hover{ color:var(--ink); }
/* 「玩法 / 摄像头」这类开关按钮：平时更淡，按下去才点亮（和 help 的展开态同款） */
.btn.ghost{ color:var(--faint); }
.btn.ghost:hover{ color:var(--ink); }
.btn.ghost[aria-pressed="true"]{
  color:var(--gold); border-color:rgba(232,192,122,.4);
  background:rgba(232,192,122,.14);
}
.btn.help[aria-expanded="true"]{
  color:var(--gold); border-color:rgba(232,192,122,.4);
  background:rgba(232,192,122,.14);
}

.music-help{
  position:absolute; top:calc(100% + 10px); right:0; z-index:15;
  width:min(340px, 78vw);
  padding:14px 16px 12px;
  border-radius:12px;
  border:1px solid rgba(200,220,240,.18);
  background:rgba(9,14,22,.96);
  box-shadow:0 18px 44px rgba(0,0,0,.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align:left;
}
.music-help[hidden]{ display:none; }
.music-help .mh-title{
  font-size:11.5px; letter-spacing:.06em; color:var(--gold);
  margin-bottom:4px;
}
.music-help .mh-title + p{ margin-bottom:9px; }
.music-help p{
  font-size:11px; line-height:1.62; color:rgba(214,228,240,.72);
  margin:0;
}
.music-help p b{ font-weight:500; color:rgba(255,244,222,.92); }

.track{
  font-size:11px; color:var(--faint); max-width:150px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  padding-left:2px;
}

.beat{
  width:9px; height:9px; border-radius:50%;
  background:rgba(232,192,122,.2);
  transition:transform .08s linear, background .08s linear, box-shadow .08s linear;
}
.beat.hit{
  background:#ffdf9a;
  box-shadow:0 0 14px rgba(255,214,130,.8);
  transform:scale(1.55);
}

.cam-wrap{
  position:absolute; right:26px; top:88px;
  width:196px; height:148px;
  border-radius:12px; overflow:hidden;
  border:1px solid var(--line);
  background:rgba(8,12,18,.7);
  pointer-events:none;
}
.cam-wrap[hidden]{ display:none; }
#cam{
  width:100%; height:100%; object-fit:cover;
  transform:scaleX(-1);
  opacity:.62;
  filter:contrast(1.05) saturate(.7);
}
.cam-off{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size:11px; color:var(--faint); letter-spacing:.06em;
  background:rgba(6,10,16,.86);
}
.cam-tag{
  position:absolute; left:8px; bottom:7px;
  font-size:10px; letter-spacing:.06em; color:rgba(230,240,250,.7);
  background:rgba(6,10,16,.6); border-radius:5px; padding:2px 6px;
}

/* ?debug 时的比心探针：ring / 指尖间距 / 高度差 / 变化速度 / 打分 / 卡在哪一步 */
.probe{
  position:absolute; right:26px; top:246px;
  max-width:300px;
  font:11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color:#8fe3c0; background:rgba(6,10,16,.74);
  border:1px solid var(--line); border-radius:8px;
  padding:5px 8px; letter-spacing:.01em; white-space:pre-line;
  pointer-events:none;
}
.probe[hidden]{ display:none; }
.probe.hit{ color:#ffd3e2; border-color:rgba(255,122,163,.6); background:rgba(38,10,22,.8); }

.hints{
  position:absolute; left:26px; bottom:54px;
  display:flex; flex-direction:column; gap:7px;
}
/* display:flex 会盖掉浏览器对 [hidden] 的默认隐藏，这里显式还原 */
.hints[hidden]{ display:none; }
.hint{
  display:flex; align-items:baseline; gap:9px;
  font-size:11.5px; color:var(--faint);
  padding-left:9px; border-left:2px solid rgba(190,214,236,.14);
  transition:color .2s ease, border-color .2s ease;
}
.hint b{
  font-weight:500; color:rgba(230,240,250,.72); letter-spacing:.03em;
  min-width:64px;
}
/* display:flex 会盖掉浏览器对 [hidden] 的默认处理，这里显式还原 */
.hint[hidden]{ display:none; }
.hint.on{
  color:rgba(255,244,222,.92);
  border-left-color:var(--gold);
}
.hint.on b{ color:var(--gold); }
.hint[data-k="heart"].on{
  color:rgba(255,226,236,.95);
  border-left-color:#ff8fb0;
}
.hint[data-k="heart"].on b{ color:#ffb3c7; }

/* 拉弓时的即时提示：进度 + 下一步该做什么。
   只在弓出现时冒出来 —— 平时挂着它，等于一直提醒用户「你还没拉弓」。*/
.bow-tip{
  position:absolute; left:50%; bottom:56px; transform:translateX(-50%);
  width:206px; padding:8px 11px 9px;
  border-radius:9px;
  background:rgba(16,22,28,.62);
  border:1px solid rgba(232,192,122,.20);
  backdrop-filter:blur(6px);
  opacity:0; transition:opacity .22s ease, transform .22s ease;
  pointer-events:none;
}
.bow-tip.show{ opacity:1; }
.bow-tip[hidden]{ display:none; }
.bow-tip-row{
  display:flex; align-items:baseline; gap:7px;
  font-size:11px; letter-spacing:.04em; color:rgba(226,235,244,.62);
}
.bow-tip-row b{
  font-weight:500; font-variant-numeric:tabular-nums;
  font-size:13px; color:rgba(255,214,158,.92); min-width:36px;
}
.bow-tip-bar{
  margin-top:6px; height:2px; border-radius:2px;
  background:rgba(190,214,236,.14); overflow:hidden;
}
.bow-tip-bar i{
  display:block; height:100%; width:0;
  background:linear-gradient(90deg, rgba(255,168,96,.85), rgba(255,232,186,1));
  transition:width .08s linear;
}
/* 窄屏：手势提示是两列叠在左下角的，进度条停在 bottom:56px 会正好压在字上，
   所以抬到提示列表上方（约 232px），宽度也收窄一点 */
@media (max-width: 560px){
  .bow-tip{ bottom:232px; width:184px; padding:7px 10px 8px; }
  .bow-tip-row{ font-size:10.5px; }
  .bow-tip-row b{ font-size:12px; min-width:32px; }
}
.bow-tip.full{ border-color:rgba(255,214,158,.55); }
.bow-tip.full .bow-tip-row span{ color:rgba(255,236,206,.98); }

.status{
  position:absolute; left:50%; bottom:22px; transform:translateX(-50%);
  display:flex; align-items:center; gap:8px;
  font-size:11px; letter-spacing:.07em; color:var(--faint);
  max-width:calc(100vw - 40px);
}
#statusText{
  min-width:0; overflow:hidden;
  white-space:nowrap; text-overflow:ellipsis;
  transition:color .45s ease;
}
/* 玩法提示刚被用户触发的一瞬，整行亮成金色，2 秒后换下一条 */
.status.hit #statusText{ color:var(--gold); text-shadow:0 0 18px rgba(232,192,122,.4); }
.status .dot{
  width:5px; height:5px; border-radius:50%;
  background:var(--green);
  box-shadow:0 0 10px rgba(111,191,139,.7);
}
.status.warn .dot{ background:#e2a15c; box-shadow:0 0 10px rgba(226,161,92,.7); }

/* 播放音乐按钮：浏览器不给自动播放，就把「开始」做成一个明确的动作。
   摆在正下方，离开其它 HUD 元素，一眼能看到；一圈缓慢呼吸的边框提示它可点。 */
.play-pill{
  position:absolute; left:50%; bottom:58px; transform:translateX(-50%);
  display:flex; align-items:center; gap:9px;
  padding:9px 18px 9px 15px;
  border-radius:999px; cursor:pointer;
  font:inherit; font-size:12.5px; letter-spacing:.12em;
  color:rgba(255,240,214,.96);
  background:rgba(28,20,10,.55);
  border:1px solid rgba(232,192,122,.55);
  backdrop-filter:blur(8px);
  box-shadow:0 0 0 0 rgba(232,192,122,.34), 0 8px 26px rgba(0,0,0,.42);
  animation:pp-pulse 2.6s ease-out infinite;
  transition:background .2s ease, border-color .2s ease;
}
.play-pill:hover{ background:rgba(52,38,18,.72); border-color:rgba(246,214,150,.85); }
.play-pill:active{ transform:translateX(-50%) scale(.97); }
.play-pill[hidden]{ display:none; }
.pp-ico{
  font-size:14px; line-height:1;
  color:#f2cf91; text-shadow:0 0 12px rgba(232,192,122,.75);
}
@keyframes pp-pulse{
  0%   { box-shadow:0 0 0 0 rgba(232,192,122,.34), 0 8px 26px rgba(0,0,0,.42); }
  62%  { box-shadow:0 0 0 13px rgba(232,192,122,0),  0 8px 26px rgba(0,0,0,.42); }
  100% { box-shadow:0 0 0 0 rgba(232,192,122,0),     0 8px 26px rgba(0,0,0,.42); }
}
@media (prefers-reduced-motion: reduce){
  .play-pill{ animation:none; }
  .btn.nudge{ animation:none; }
}

/* ---------------- 清屏：录屏演示时只留画面 ---------------- */
/* 标题、控制栏、摄像头、探针、玩法一览、底部提示、接礼物计数、拉弓进度一起淡出。
   恢复只能靠右下角那个小「菜单」和 Esc —— 因为清屏后控制栏本身点不到了。 */
.hud-top,
.cam-wrap,
.hints,
.status,
.score,
.bow-tip,
.play-pill{ transition:opacity .4s ease; }

#hud.clean .hud-top,
#hud.clean .cam-wrap,
#hud.clean .probe,
#hud.clean .hints,
#hud.clean .status,
#hud.clean .score,
#hud.clean .bow-tip,
#hud.clean .play-pill{
  opacity:0 !important;
  pointer-events:none !important;
}

/* 清屏后的唯一入口：极淡地待在右下角，鼠标碰上去才亮。
   录屏时它几乎看不见，但不至于让用户「回不来」。只放图标，不放文字。 */
.unclean{
  position:absolute; right:26px; bottom:20px;
  width:34px; height:34px; padding:0;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
  font:inherit; font-size:15px; line-height:1; letter-spacing:0;
  color:rgba(226,235,244,.5);
  background:rgba(8,12,18,.42);
  border:1px solid rgba(190,214,236,.14);
  cursor:pointer; pointer-events:auto;
  opacity:.22; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  transition:opacity .3s ease, color .25s ease, border-color .25s ease, background .25s ease;
}
.unclean:hover{
  opacity:1; color:var(--gold);
  border-color:rgba(232,192,122,.45); background:rgba(16,22,28,.7);
}
.unclean[hidden]{ display:none; }

/* 清屏瞬间的顶部轻提示：淡入 → 停 2 秒 → 淡出（计时在 setClean 里） */
.clean-toast{
  position:absolute; left:50%; top:30px;
  transform:translate(-50%, -8px);
  padding:9px 18px; border-radius:999px;
  font-size:12px; letter-spacing:.08em; white-space:nowrap;
  color:rgba(238,244,250,.92);
  background:rgba(10,16,24,.74);
  border:1px solid rgba(190,214,236,.16);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  opacity:0; pointer-events:none;
  transition:opacity .35s ease, transform .35s ease;
}
.clean-toast.show{ opacity:1; transform:translate(-50%, 0); }
.clean-toast[hidden]{ display:none; }
@media (max-width:480px){
  .clean-toast{ font-size:11px; padding:8px 14px; top:22px; }
}
/* 手机上没有空间：竖直方向被手势提示条占满，横向又只有 414px。
   那里改用顶栏「播放」按钮上的金色描边来提示（见 .btn.nudge）。 */
@media (max-width:760px){
  .play-pill{ display:none !important; }
}

/* ---------------- 首屏「先听一首歌？」确认弹窗 ---------------- */

.music-prompt{
  position:fixed; inset:0; z-index:40;
  display:flex; align-items:flex-end; justify-content:center;
  /* 靠下放：把上面那半留给加载进度，弹窗出现时中英状态行和进度条都还看得见 */
  padding:24px 24px max(30px, 8vh);
  /* 只轻轻压暗：这张卡是「问一句」，不是阻断式模态，树还得看得见 */
  background:radial-gradient(120% 90% at 50% 42%, rgba(4,8,14,.16), rgba(2,4,8,.34));
  opacity:0; transition:opacity .3s ease;
}
.music-prompt[hidden]{ display:none; }
.music-prompt.show{ opacity:1; }

/* 矮屏（手机横屏、小窗）实在没地方分开摆，还是居中 */
@media (max-height:760px){
  .music-prompt{ align-items:center; padding:20px; }
}

.mp-card{
  width:min(392px, 88vw);
  padding:28px 26px 22px;
  text-align:center;
  border-radius:20px;
  background:linear-gradient(180deg, rgba(17,25,37,.97), rgba(8,12,19,.99));
  border:1px solid rgba(232,192,122,.26);
  box-shadow:0 30px 80px rgba(0,0,0,.6), 0 0 52px rgba(232,192,122,.07),
             inset 0 1px 0 rgba(255,255,255,.05);
  transform:translateY(14px) scale(.97);
  transition:transform .42s cubic-bezier(.22,.9,.25,1);
}
.music-prompt.show .mp-card{ transform:none; }

.mp-ico{
  width:44px; height:44px; margin:0 auto 15px;
  display:flex; align-items:center; justify-content:center;
  font-size:19px; line-height:1;
  color:rgba(255,232,190,.96);
  border-radius:50%;
  background:radial-gradient(circle at 50% 38%, rgba(232,192,122,.26), rgba(232,192,122,.05));
  border:1px solid rgba(232,192,122,.36);
  animation:mp-pulse 3s ease-in-out infinite;
}
@keyframes mp-pulse{
  0%,100%{ box-shadow:0 0 20px rgba(232,192,122,.16), inset 0 0 12px rgba(232,192,122,.08); }
  50%{ box-shadow:0 0 36px rgba(232,192,122,.34), inset 0 0 18px rgba(232,192,122,.14); }
}

.mp-title{
  margin:0; font-size:18px; font-weight:400; letter-spacing:.16em;
  color:rgba(255,247,232,.97);
}
.mp-title-en{
  margin:8px 0 0; font-size:10.5px; letter-spacing:.22em;
  color:rgba(232,192,122,.72); text-transform:uppercase;
}
.mp-desc{
  margin:16px 0 0; font-size:12px; line-height:1.6;
  color:rgba(226,235,244,.62);
}
.mp-desc em{
  display:block; margin-top:5px; font-style:normal;
  font-size:10.5px; line-height:1.6; color:rgba(226,235,244,.34);
}

.mp-actions{ margin-top:22px; display:flex; gap:10px; }
.mp-btn{
  flex:1 1 0; min-width:0;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:10px 8px 9px; border-radius:12px; cursor:pointer; font:inherit;
  color:rgba(233,241,250,.86);
  background:rgba(255,255,255,.04);
  border:1px solid rgba(190,214,236,.18);
  transition:color .2s ease, border-color .2s ease, background .2s ease, transform .16s ease;
}
.mp-btn .mb-cn{ font-size:12.5px; letter-spacing:.06em; white-space:nowrap; }
.mp-btn .mb-en{
  font-style:normal; font-size:9px; letter-spacing:.14em;
  color:rgba(226,235,244,.36);
}
.mp-btn:hover{ color:#fff; border-color:rgba(190,214,236,.36); background:rgba(255,255,255,.07); }
.mp-btn:active{ transform:scale(.98); }

.mp-btn.primary{
  color:#20160a;
  background:linear-gradient(180deg, #f6dbaa, #e5bb7a);
  border-color:rgba(255,228,182,.72);
  box-shadow:0 8px 26px rgba(232,192,122,.22), inset 0 1px 0 rgba(255,255,255,.55);
}
.mp-btn.primary .mb-en{ color:rgba(58,38,12,.6); }
.mp-btn.primary:hover{ background:linear-gradient(180deg, #ffe6b8, #eec887); }
.mp-btn[disabled]{ pointer-events:none; opacity:.75; }

.loading-skip{
  display:block; margin:18px auto 0;
  padding:8px 15px 7px; border-radius:999px; cursor:pointer; font:inherit;
  color:rgba(214,228,244,.72);
  background:rgba(255,255,255,.04);
  border:1px solid rgba(190,214,236,.18);
  transition:color .2s ease, border-color .2s ease, background .2s ease;
}
.loading-skip span{ display:block; font-size:11.5px; letter-spacing:.09em; }
.loading-skip em{
  display:block; margin-top:3px; font-style:normal;
  font-size:8.5px; letter-spacing:.12em; color:rgba(226,235,244,.3);
}
.loading-skip:hover{ color:rgba(245,250,255,.95); border-color:rgba(190,214,236,.4); background:rgba(255,255,255,.08); }
.loading-skip[hidden]{ display:none; }

.score{
  position:absolute; right:26px; bottom:52px;
  text-align:right; opacity:0; transition:opacity .4s ease;
}
.score.show{ opacity:1; }
.score-num{
  font-size:30px; font-weight:300; letter-spacing:.02em;
  color:rgba(255,232,196,.95);
  text-shadow:0 0 24px rgba(232,192,122,.45);
  line-height:1;
}
.score-label{
  margin-top:5px; font-size:10.5px; letter-spacing:.1em; color:var(--faint);
}

#loading{
  position:fixed; inset:0; z-index:20;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(120% 100% at 50% 42%, #0a1420 0%, #04060b 68%);
  transition:opacity .9s ease, visibility .9s;
}
#loading.done{ opacity:0; visibility:hidden; }

.loading-inner{ text-align:center; width:min(420px, 82vw); }
.loading-title{
  font-size:26px; font-weight:300; letter-spacing:.26em;
  color:rgba(255,246,230,.95);
  text-shadow:0 0 40px rgba(232,192,122,.3);
}

/* 状态行：左边「在做什么」（中英双行），右边「到几成」 */
/* 语言选择：首屏遮罩上的三个胶囊按钮（中文 / English / ไทย）。
   点了立即切语言并存 localStorage，下次进来自动预选。 */
.lang-pick{
  display:flex; gap:8px; justify-content:center;
  margin:14px 0 4px;
}
.lang-pick button{
  font:inherit; font-size:12px; letter-spacing:.04em;
  color:rgba(226,235,244,.62);
  background:rgba(10,14,20,.5);
  border:1px solid rgba(190,214,236,.18);
  border-radius:999px; padding:6px 16px;
  cursor:pointer;
  transition:color .2s, border-color .2s, background .2s;
}
.lang-pick button:hover{ color:var(--gold); border-color:rgba(232,192,122,.4); }
.lang-pick button.on{
  color:var(--gold);
  border-color:rgba(232,192,122,.55);
  background:rgba(232,192,122,.10);
}

.loading-status{
  margin-top:16px;
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  min-height:34px;
}
.ls-text{
  display:flex; flex-direction:column; gap:5px; min-width:0; text-align:left;
}
.loading-sub{
  display:inline-flex; align-items:center; gap:8px; min-width:0;
  font-size:11.5px; letter-spacing:.1em; color:rgba(230,239,248,.74);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
/* 英文副标题：小一号、暗一档，和中文错开层级，不抢主文案 */
.loading-sub-en{
  padding-left:13px;                 /* 跳过呼吸点(5px)+gap(8px)，与中文文字对齐 */
  font-size:10px; letter-spacing:.1em; line-height:1.25;
  color:rgba(226,235,244,.4);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  transition:color .3s ease;
}
/* 文本换句时淡入上滑，别硬切 */
.loading-sub.swap,
.loading-sub-en.swap{ animation: load-swap .42s cubic-bezier(.22,.9,.25,1); }
@keyframes load-swap{
  from{ opacity:.1; transform: translateY(4px); }
  to{ opacity:1; transform: translateY(0); }
}
/* 前面那颗呼吸的点：表示「还在动，没死」 */
.loading-sub::before{
  content:''; flex:none;
  width:5px; height:5px; border-radius:50%;
  background:rgba(232,192,122,.95);
  box-shadow:0 0 9px rgba(232,192,122,.85);
  animation: load-dot 1.5s ease-in-out infinite;
}
@keyframes load-dot{
  0%,100%{ opacity:.35; transform:scale(.82); }
  50%{ opacity:1; transform:scale(1); }
}

.loading-pct{
  flex:none;
  display:inline-flex; align-items:baseline;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  line-height:1;
}
.loading-pct b{
  font-weight:300; font-size:21px; letter-spacing:.01em;
  color:rgba(255,240,212,.96);
  text-shadow:0 0 18px rgba(232,192,122,.5);
}
.loading-pct i{
  font-style:normal; font-size:10px; margin-left:2px;
  color:rgba(232,192,122,.7);
}

.loading-bar{
  position:relative;
  margin:11px 0 0; width:100%; height:4px; border-radius:2px;
  background:rgba(190,214,236,.14);
  box-shadow: inset 0 0 0 1px rgba(190,214,236,.05);
  overflow:hidden;
}
.loading-bar i{
  position:relative; z-index:1;
  display:block; height:100%; width:0%; border-radius:2px;
  /* 起点不要全透明：现在这条要表达「模型下到几成」，
     左半截虚掉会让人以为进度只有一点点 */
  background:linear-gradient(90deg, rgba(232,192,122,.32), #eec483 48%, #fff1d4);
  box-shadow:0 0 12px rgba(232,192,122,.5), 0 0 26px rgba(232,192,122,.22);
  transition:width .45s cubic-bezier(.25,.9,.25,1);
  overflow:hidden;
}
/* 一条白光反复扫过填充段：进度条在走，而不是一张静态图 */
.loading-bar i::before{
  content:''; position:absolute; top:0; left:-56px;
  width:52px; height:100%;
  background:linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0));
  animation: bar-shine 2.4s cubic-bezier(.4,0,.3,1) infinite;
}
@keyframes bar-shine{
  0%{ transform: translateX(0); opacity:0; }
  12%{ opacity:.95; }
  70%{ opacity:.95; }
  100%{ transform: translateX(500px); opacity:0; }
}
/* 模型还不知道总量 / 正在等网络：空档里跑一道暗金光，
   让「进度暂时不走」和「卡死了」看起来不一样 */
.loading-bar.is-wait::after{
  content:''; position:absolute; top:0; bottom:0; left:0; width:32%;
  background:linear-gradient(90deg, rgba(232,192,122,0), rgba(232,192,122,.4), rgba(232,192,122,0));
  animation: bar-wait 1.9s ease-in-out infinite;
}
@keyframes bar-wait{
  0%{ transform: translateX(-120%); opacity:0; }
  25%{ opacity:1; }
  100%{ transform: translateX(360%); opacity:0; }
}

.loading-note{
  margin-top:17px; font-size:10.5px; letter-spacing:.08em; color:rgba(226,235,244,.3);
}
.loading-note em{
  display:block; margin-top:4px; font-style:normal;
  font-size:9.5px; letter-spacing:.1em; color:rgba(226,235,244,.26);
}

/* 窄屏：一行里塞得下「十个汉字 + 百分比」才算信息完整 */
@media (max-width:520px){
  .loading-sub{ font-size:11px; letter-spacing:.05em; gap:6px; }
  .loading-pct b{ font-size:19px; }
}

/* 关掉动效时，进度信息仍然完整（数字照常走，只是不扫光、不呼吸） */
@media (prefers-reduced-motion: reduce){
  .loading-sub.swap{ animation:none; }
  .loading-sub::before{ animation:none; opacity:.7; }
  .loading-bar i::before{ animation:none; opacity:0; }
  .loading-bar.is-wait::after{ animation:none; opacity:0; }
  .loading-bar i{ transition:width .2s linear; }
  .mp-ico{ animation:none; }
  .mp-card{ transition:none; }
  .music-prompt{ transition:none; }
}

@media (max-width: 900px){
  #hud{ padding:16px; }
  .cam-wrap{ width:132px; height:100px; right:16px; top:76px; }
  .probe{ right:16px; top:184px; max-width:220px; font-size:10px; }
  .hints{ left:16px; bottom:46px; }
  .hint b{ min-width:56px; }
  .brand-en{ font-size:15px; }
  .broadcast{ display:none; }
}

@media (max-width: 760px){
  .hud-top{ gap:10px; }
  .brand-en{ font-size:14px; letter-spacing:.12em; white-space:nowrap; }
  .brand-cn{ display:none; }
  .audio-bar{ padding:5px 7px; gap:6px; }
  .btn{ padding:6px 9px; font-size:11px; }
  .btn.nudge{
  border-color:rgba(232,192,122,.75);
  color:rgba(255,240,214,.98);
  animation:btn-nudge 2.4s ease-out infinite;
}
@keyframes btn-nudge{
  0%   { box-shadow:0 0 0 0 rgba(232,192,122,.42); }
  62%  { box-shadow:0 0 0 9px rgba(232,192,122,0); }
  100% { box-shadow:0 0 0 0 rgba(232,192,122,0); }
}
.btn.help{ width:22px; padding:6px 0; }
  .btn.icon{ width:22px; padding:6px 0; font-size:12px; }
  .btn.lang{ width:20px; padding:6px 0; font-size:10px; }
  .unclean{ right:16px; bottom:14px; width:30px; height:30px; font-size:13px; }
  /* 窄屏放不下曲名，改为在底部状态条里显示 */
  .track{ display:none; }
  .music-help{ width:min(300px, 86vw); padding:12px 13px 10px; }
  .music-help p{ font-size:10.5px; line-height:1.58; }
}

/* 加了玩法/摄像头/清屏后，小手机上一行放不下 —— 整体再收紧一档 */
@media (max-width:480px){
  .hud-top{ gap:8px; }
  .brand-en{ font-size:12px; letter-spacing:.1em; }
  .audio-bar{ gap:5px; padding:4px 6px; }
  .btn{ padding:5px 7px; font-size:10.5px; letter-spacing:.02em; }
  .btn.icon, .btn.help{ width:20px; padding:5px 0; }
  .beat{ display:none; }  /* 鼓点灯窄屏让位，音乐状态看文字就够 */
  .unclean{ right:14px; bottom:12px; }
}
