* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; overflow: hidden; color: #fff; font-family: sans-serif; }
.stage { position: fixed; inset: 0; background: #000; }
.media {  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
         transition: opacity 0.15s ease; will-change: opacity; opacity: 0; }
#idle  { opacity: 1; }
#actor { opacity: 0; }
#status { position: fixed; top: 2px; right: 4px; font-size: 11px; z-index: 100; background: rgba(0,0,0,0.4); padding: 1px 4px; border-radius: 3px; opacity: 0.6; }
#inputbar { pointer-events: auto;  position: fixed; left: 0; right: 0; bottom: 0; height: 80px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: rgba(0,0,0,0.75); z-index: 100; }
#textInput { flex: 1; height: 52px; background: rgba(255,255,255,0.12); color: #fff; border: 2px solid rgba(255,255,255,0.25); border-radius: 26px; padding: 0 22px; font-size: 18px; outline: none; -webkit-tap-highlight-color: rgba(56,189,248,0.3); }
#textInput:focus { border-color: #38bdf8; background: rgba(255,255,255,0.18); box-shadow: 0 0 12px rgba(56,189,248,0.3); }
#sendBtn { height: 52px; padding: 0 28px; border-radius: 26px; background: #38bdf8; color: #000; border: none; font-size: 18px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: rgba(56,189,248,0.4); }
#sendBtn:active { background: #0284c7; }
/* 字幕：置于屏幕【下 1/3 区域顶部】，随语音逐字同步流出（由 renderSyncedSubtitle 按音频进度驱动）。
   底部对齐 + 限制最大高度(占下 1/3)：超长文本向上滚出，绝不遮挡小禾头部；pointer-events:none 不挡触摸。 */
#subtitle { position: fixed; left: 16px; right: 16px; top: 66.67%; bottom: auto;
  max-height: 32vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  text-align: center; font-size: 30px; font-weight: 600; line-height: 1.42; color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.95); background: rgba(0,0,0,0.32);
  padding: 12px 18px; border-radius: 12px; z-index: 250; opacity: 0; pointer-events: none;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  transition: opacity 0.25s ease; }

/* ===== 下半屏 MV 浮层：平时隐藏；放歌时覆盖下半屏，小禾本体保持全屏 ===== */
.mv-stage { position: fixed; left: 0; right: 0; bottom: 0; height: 50%; background: #000; z-index: 50; display: none; }
.mv-stage.active { display: block; }
#mvVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.mv-title { position: absolute; top: 10px; left: 12px; right: 232px; font-size: 28px; line-height: 1.35; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.95); background: rgba(0,0,0,0.5); padding: 8px 16px; border-radius: 10px;
  opacity: 0; transition: opacity 0.25s ease; z-index: 51; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-title.active { opacity: 1; }
/* 放歌时的触摸「停止播放」按钮：放歌期间麦克风会被自己的歌声干扰，
   所以必须给触摸屏留一个可靠的实体停止入口。 */
.mv-stop { position: absolute; top: 10px; right: 12px; z-index: 60;
  min-width: 200px; min-height: 72px; padding: 0 24px;
  background: rgba(220,38,38,0.88); color: #fff; border: 2px solid rgba(255,255,255,0.55);
  border-radius: 16px; font-size: 28px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mv-stop:active { background: rgba(248,113,113,0.95); }

/* ===== 触摸控制（常驻，全屏也始终可见）：退出全屏 / 重启 / 关闭 ===== */
.ctrl-btn {
  position: fixed; top: 12px; right: 12px; z-index: 210;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff; border: 1px solid rgba(255,255,255,0.4);
  font-size: 30px; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  display: flex; align-items: center; justify-content: center;
}
.ctrl-btn:active { background: rgba(56,189,248,0.5); }
.ctrl-menu {
  position: fixed; top: 84px; right: 12px; z-index: 211;
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
}
.ctrl-menu[hidden] { display: none; }
.ctrl-item {
  min-width: 160px; min-height: 60px; padding: 0 20px;
  background: rgba(18,18,18,0.94); color: #fff; border: 1px solid rgba(255,255,255,0.3);
  border-radius: 14px; font-size: 22px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ctrl-item:active { background: rgba(56,189,248,0.4); border-color: #38bdf8; }
.standby {
  position: fixed; inset: 0; z-index: 300; background: #000;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.standby[hidden] { display: none; }
.standby-tip { color: #888; font-size: 28px; text-align: center; line-height: 2; }
.standby-tip span { color: #555; font-size: 19px; }

/* ===== 虚拟键盘（双模式：英文 + 中文）===== */
.vkb { position: fixed; left: 0; right: 0; bottom: 80px; z-index: 90;
  background: rgba(14,14,18,0.97); padding: 8px 6px 14px; }
.vkb[hidden] { display: none; }
.vkb-tab { display: flex; gap: 6px; margin-bottom: 8px; justify-content: center; }
.vkb-mode { padding: 8px 24px; border-radius: 8px; background: rgba(255,255,255,0.08); color: #aaa; border: 1px solid rgba(255,255,255,0.15); font-size: 15px; cursor: pointer; }
.vkb-mode.active { background: #38bdf8; color: #000; border-color: #38bdf8; font-weight: 600; }
.vkb-panel { display: flex; flex-direction: column; gap: 5px; }
.vkb-row { display: flex; justify-content: center; gap: 4px; }
.vkb-row button { min-width: 12vw; height: 48px; border-radius: 8px;
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.2);
  font-size: 17px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.vkb-row button:active { background: rgba(56,189,248,0.5); border-color: #38bdf8; }
.vkb-bksp { min-width: 14vw !important; }
.vkb-space { flex: 1; }
.vkb-enter { min-width: 16vw !important; background: rgba(56,189,248,0.35) !important; }

/* ===== 唤醒提示：未喊唤醒词时屏幕常驻提示，避免"小禾不理人"误解 ===== */
.wake-hint { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 70; padding: 8px 18px; border-radius: 22px;
  background: rgba(0,0,0,0.45); color: #ffd479; font-size: 17px; font-weight: 600;
  letter-spacing: 1px; pointer-events: none; white-space: nowrap;
  border: 1px solid rgba(255,212,121,0.4); backdrop-filter: blur(4px); }
.wake-hint.active { color: #7CFFB2; border-color: rgba(124,255,178,0.5); background: rgba(0,40,20,0.5); }

/* ===== 讲解调图浮层：平时隐藏；讲解场景/零配件时下半屏展示示意图+说明，小禾人像保持上半屏 ===== */
.img-stage { position: fixed; left: 0; right: 0; bottom: 0; height: 52%; background: rgba(10,14,22,0.96);
  z-index: 55; display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 32px 36px; box-sizing: border-box; }
.img-stage.active { display: flex; }
.img-view { max-width: 100%; max-height: 78%; object-fit: contain; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6); background: #fff; }
.img-caption { margin-top: 18px; max-width: 92%; text-align: center; color: #fff; font-size: 26px; line-height: 1.4;
  background: rgba(0,0,0,0.45); padding: 10px 20px; border-radius: 12px; }
.img-close { position: absolute; top: 10px; right: 12px; z-index: 60;
  min-width: 160px; min-height: 64px; padding: 0 22px;
  background: rgba(56,189,248,0.85); color: #fff; border: 2px solid rgba(255,255,255,0.5);
  border-radius: 16px; font-size: 26px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.img-close:active { background: rgba(125,211,252,0.95); }

/* ===== 支付收款二维码弹窗 + 支付确认 2026-09-25 二强 ===== */
.pay-overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;background:rgba(8,12,24,.82);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.pay-card{position:relative;width:min(440px,88vw);background:#0f1830;border:1px solid #2b3a66;border-radius:20px;padding:26px 24px 22px;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.pay-close{position:absolute;top:10px;right:14px;font-size:22px;color:#8aa0c8;cursor:pointer;line-height:1}
.pay-title{font-size:22px;color:#fff;font-weight:600;margin-bottom:6px}
.pay-product{font-size:15px;color:#9fb3ff;margin-bottom:4px}
.pay-amount{font-size:38px;color:#ffd54a;font-weight:700;margin:6px 0 14px}
.pay-qr{display:flex;justify-content:center;margin:8px 0 12px}
.pay-qr img{width:240px;height:240px;background:#fff;border-radius:12px;padding:8px;box-sizing:border-box}
.pay-hint{font-size:13px;color:#8aa0c8;line-height:1.6;margin-bottom:14px}
.pay-status{font-size:15px;color:#ffd54a;margin-bottom:12px}
.pay-status.paid{color:#34d399}
.pay-confirm{font-size:17px;padding:12px 20px;border:0;border-radius:12px;background:#2563eb;color:#fff;cursor:pointer;user-select:none;touch-action:none;width:100%}
.pay-confirm:active{background:#1d4ed8}
.pay-card.paid{background:#0c2a1c;border-color:#1f6f4a}
.pay-card.paid .pay-big,.pay-success .pay-big{font-size:64px;color:#34d399;margin-bottom:8px}
.pay-success{padding:34px 24px}
