* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: #f4f5f7; color: #1d1f23;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Microsoft YaHei", "Meiryo", "Noto Sans CJK SC", "Noto Sans CJK JP", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.6;
}
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 16px 16px 48px; }
.narrow { max-width: 720px; margin: 0 auto; }
.card { background: #fff; border-radius: 12px; padding: 18px 18px; margin: 0 0 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 18px; margin: 0 0 10px; }
p { margin: 0 0 10px; }
ul { padding-left: 1.3em; margin: 0 0 6px; }
li { margin-bottom: 6px; }
.muted { color: #6b7280; font-size: 14px; }
.warn { color: #b42318; font-size: 14px; margin-top: 8px; }
.ok { color: #067647; font-weight: 600; }
.banner { background: #fff4d6; color: #7a4b00; text-align: center; font-size: 13px; padding: 4px 8px; }

.langbar { text-align: right; margin-bottom: 4px; }
.langbar button { border: 1px solid #c9ced6; background: #fff; border-radius: 16px; padding: 4px 14px; margin-left: 6px; font-size: 14px; color: #333; }
.langbar button.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.btn {
  display: inline-block; min-height: 46px; padding: 10px 22px; border: 0; border-radius: 10px;
  background: #1d4ed8; color: #fff; font-size: 17px; font-weight: 600; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.btn:disabled { background: #a5b4d6; cursor: default; }
.btn-ghost { background: #fff; color: #1d4ed8; border: 1px solid #1d4ed8; }
.btn-block { display: block; width: 100%; }
.btn-row { margin-top: 16px; }

.check { display: flex; align-items: flex-start; padding: 12px; background: #eef2ff; border-radius: 10px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 10px 0 0; flex: 0 0 auto; }

.q { margin: 0 0 18px; }
.q-title { font-weight: 600; margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; margin: -4px; }
.opt {
  flex: 1 1 auto; margin: 4px; min-height: 44px; padding: 8px 12px; border: 1.5px solid #c9ced6; border-radius: 10px;
  background: #fff; color: #1d1f23; font-size: 15px; line-height: 1.3; cursor: pointer; text-align: center;
  -webkit-appearance: none; appearance: none;
}
.opt.on { border-color: #1d4ed8; background: #1d4ed8; color: #fff; }
.opts.col { flex-direction: column; }
.opts.col .opt { text-align: left; }
.opts.q1 { flex-wrap: nowrap; }
.opts.q1 .opt { flex: 1 1 0; min-width: 0; padding: 8px 2px; font-size: 13px; white-space: pre-line; }
.opts.q1 .opt.mid { background: #f3f4f6; }
.opts.q1 .opt.mid.on { background: #1d4ed8; }
input.text, textarea {
  width: 100%; font-size: 17px; padding: 10px 12px; border: 1.5px solid #c9ced6; border-radius: 10px; background: #fff;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 90px; font-size: 16px; }
.sound-row { display: flex; align-items: center; flex-wrap: wrap; margin: -4px; }
.sound-row > * { margin: 4px; }
.sound-row input { width: 9em; flex: 0 0 auto; }

/* 评价页 */
.trial-hdr { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; }
.trial-hdr .n { font-weight: 700; font-size: 16px; }
.lyrics { background: #fff; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.lyrics .lab { font-size: 12px; color: #6b7280; }
.lyrics .lines { font-size: 15px; line-height: 1.5; }
.lyrics .sep { color: #9ca3af; }
.sides { display: flex; font-size: 13px; color: #374151; font-weight: 600; }
.sides div { flex: 1; text-align: center; }
.vbox { position: relative; width: 100%; padding-top: 28.125%; background: #000; border-radius: 6px; overflow: hidden; }
.vbox video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000; object-fit: contain; }
.vbox .divider { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #000; pointer-events: none; }
.vbox .cover {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,.45); cursor: pointer; text-align: center;
}
.vbox .cover .play { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.92); position: relative; margin-bottom: 8px; }
.vbox .cover .play:after { content: ""; position: absolute; left: 25px; top: 18px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #1d4ed8; }
.vbox .cover .msg { font-size: 15px; text-shadow: 0 1px 2px rgba(0,0,0,.6); padding: 0 8px; }
.vbox .spin { position: absolute; right: 8px; top: 6px; color: #fff; font-size: 13px; background: rgba(0,0,0,.5); padding: 2px 8px; border-radius: 10px; }


.vctl { display: flex; justify-content: space-between; align-items: center; min-height: 34px; margin-top: 4px; }
.vctl .link { color: #1d4ed8; font-size: 13px; text-decoration: underline; background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left; }
.vctl .replay { background: #fff; border: 1px solid #c9ced6; border-radius: 16px; padding: 4px 14px; font-size: 14px; color: #1d1f23; cursor: pointer; }
.questions { margin-top: 10px; }

.rid { font-size: 34px; font-weight: 800; letter-spacing: 4px; text-align: center; background: #eef2ff; border-radius: 10px; padding: 12px; margin: 8px 0; font-family: "SF Mono", Menlo, Consolas, monospace; user-select: all; -webkit-user-select: all; }

.overlay { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(15,18,25,.82); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.overlay-box { background: #fff; border-radius: 14px; padding: 22px; max-width: 420px; text-align: center; }
.rotate-icon { font-size: 40px; margin-bottom: 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(20,20,20,.85); color: #fff; padding: 8px 16px; border-radius: 18px; font-size: 14px; z-index: 60; }

.phone-only { display: none; }
.is-touch .phone-only { display: list-item; }

@media (min-width: 900px) {
  .opts.q1 .opt { font-size: 15px; padding: 10px 4px; }
  .lyrics .lines { font-size: 16px; }
}
/* 手机横屏：尽量把宽度留给视频 */
@media (orientation: landscape) and (max-height: 520px) {
  .wrap { padding: 6px 10px 40px; }
  .card { padding: 12px 14px; }
  .lyrics { padding: 4px 10px; margin-bottom: 4px; }
  .lyrics .lines { font-size: 13px; max-height: 3em; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .trial-hdr { margin-bottom: 2px; }
  .trial-hdr .n { font-size: 14px; }
}

/* 右上角“结束问卷” */
.topbar { height: 0; }
.quit {
  position: fixed; top: 28px; right: 10px; z-index: 40; background: rgba(255,255,255,.92); color: #b42318;
  border: 1px solid #f1b5ae; border-radius: 16px; padding: 4px 12px; font-size: 13px; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.trial-hdr { padding-right: 100px; }
.narrow .card:first-child h1, .narrow .card:first-child h2 { padding-right: 90px; }

/* 播放控制：播放/暂停 + 可拖动进度条 + 时间 */
.ctl { display: flex; align-items: center; margin-top: 6px; }
.pp { flex: 0 0 auto; width: 40px; height: 34px; border: 1px solid #c9ced6; border-radius: 8px; background: #fff; font-size: 14px; color: #1d1f23; cursor: pointer; padding: 0; }
.pp:disabled { color: #aaa; }
.seek { flex: 1 1 auto; height: 34px; margin: 0 10px; position: relative; cursor: pointer; touch-action: none; }
.seek .track { position: absolute; left: 0; right: 0; top: 15px; height: 4px; background: #d7dbe2; border-radius: 2px; }
.seek .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #1d4ed8; border-radius: 2px; }
.seek .thumb { position: absolute; top: -6px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.2); left: 0; }
.time { flex: 0 0 auto; font-size: 13px; color: #4b5563; font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.modal-btns { margin-top: 6px; }
.modal-btns .btn { margin: 4px; }

/* 手机默认"横屏显示"：微信等内置浏览器不跟着手机转，就把整页转 90 度（用户 11-24）。 */
.orient {
  position: fixed; top: 28px; right: 104px; z-index: 40; background: rgba(255,255,255,.92); color: #1d4ed8;
  border: 1px solid #b9c6f0; border-radius: 16px; padding: 4px 12px; font-size: 13px; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
html.forced, html.forced body { overflow: hidden; height: 100%; }
html.forced #stage { position: fixed; left: 0; top: 0; transform-origin: 0 0; -webkit-transform-origin: 0 0;
  transform: rotate(90deg) translateY(-100%); -webkit-transform: rotate(90deg) translateY(-100%); overflow: hidden; background: #f4f5f7; }
html.forced #scroller { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
html.forced .wrap { padding: 6px 10px 40px; }
html.forced .card { padding: 12px 14px; }
html.forced .lyrics { padding: 4px 10px; margin-bottom: 4px; }
html.forced .lyrics .lines { font-size: 13px; max-height: 3em; overflow-y: auto; }
html.forced .trial-hdr .n { font-size: 14px; }

.fs { flex: 0 0 auto; margin-left: 8px; height: 34px; border: 1px solid #c9ced6; border-radius: 8px; background: #fff; font-size: 13px; color: #1d1f23; cursor: pointer; padding: 0 10px; }
/* 全屏时：黑底，视频尽量大，控制条在下面 */
#player.fs-on { background: #000; }
#player.fs-on #pinner { display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; padding: 0 8px 6px; box-sizing: border-box; }
#player.fs-on .vbox { flex: 1 1 auto; padding-top: 0; height: auto; border-radius: 0; }
#player.fs-on .ctl { flex: 0 0 auto; }
#player.fs-on .time { color: #ddd; }
#player.fs-on .pp, #player.fs-on .fs { background: #222; color: #fff; border-color: #555; }
#player.fs-rot #pinner { position: absolute; left: 0; top: 0; transform-origin: 0 0; -webkit-transform-origin: 0 0;
  transform: rotate(90deg) translateY(-100%); -webkit-transform: rotate(90deg) translateY(-100%); }

/* 手机横着看（真横屏或整页转过来）时，视频别太大，让进度条留在一屏里 */
html.forced #player { max-width: calc((100vw - 200px) * 3.556); margin: 0 auto; }
@media (orientation: landscape) and (max-height: 520px) { #player { max-width: calc((100vh - 200px) * 3.556); margin: 0 auto; } }
#player.fs-on { max-width: none !important; }
#player.fs-on .sides { color: #ccc; }

/* 声音检查按钮：播放时三角形换成跳动的声波 */
.soundbtn { display: inline-flex; align-items: center; min-width: 170px; justify-content: center; }
.soundbtn .ico { margin-right: 8px; font-size: 15px; }
.soundbtn .wave { display: none; height: 18px; margin-right: 10px; align-items: flex-end; }
.soundbtn .wave i { display: inline-block; width: 3px; height: 6px; margin: 0 1.5px; background: #1d4ed8; border-radius: 2px;
  animation: qmwave 0.9s ease-in-out infinite; -webkit-animation: qmwave 0.9s ease-in-out infinite; }
.soundbtn .wave i:nth-child(2) { animation-delay: .15s; -webkit-animation-delay: .15s; }
.soundbtn .wave i:nth-child(3) { animation-delay: .3s; -webkit-animation-delay: .3s; }
.soundbtn .wave i:nth-child(4) { animation-delay: .45s; -webkit-animation-delay: .45s; }
.soundbtn .wave i:nth-child(5) { animation-delay: .6s; -webkit-animation-delay: .6s; }
.soundbtn.playing { background: #eef2ff; }
.soundbtn.playing .ico { display: none; }
.soundbtn.playing .wave { display: inline-flex; }
@keyframes qmwave { 0%, 100% { height: 4px; } 50% { height: 18px; } }
@-webkit-keyframes qmwave { 0%, 100% { height: 4px; } 50% { height: 18px; } }
.heard { margin-top: 12px; }

/* 视频播放器的音量按钮与拖动条 */
.vol { flex: 0 0 auto; display: inline-flex; align-items: center; margin-left: 8px; }
.vol-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid #c9ced6; border-radius: 8px; background: #fff;
  color: #1d1f23; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center;
}
.vol-btn svg { width: 18px; height: 18px; display: block; pointer-events: none; }
.vol-btn.muted { color: #b42318; border-color: #f1b5ae; background: #fff5f5; }
.vol-bar { flex: 0 0 auto; width: 72px; height: 34px; margin: 0 6px 0 8px; position: relative; cursor: pointer; touch-action: none; }
.vol-bar .track { position: absolute; left: 0; right: 0; top: 15px; height: 4px; background: #d7dbe2; border-radius: 2px; }
.vol-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: #1d4ed8; border-radius: 2px; }
.vol-bar .thumb { position: absolute; top: -5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #1d4ed8; box-shadow: 0 0 0 3px rgba(29,78,216,.18); left: 100%; }
.vol-pct { flex: 0 0 auto; font-size: 12px; color: #4b5563; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; user-select: none; -webkit-user-select: none; }
#player.fs-on .vol-btn { background: #222; color: #fff; border-color: #555; }
#player.fs-on .vol-btn.muted { color: #fca5a5; border-color: #991b1b; background: #2c1515; }
#player.fs-on .vol-bar .track { background: #444; }
#player.fs-on .vol-pct { color: #ddd; }
/* 窄竖屏（未旋转）下分两行摆放，保证进度条和音量条都好拖 */
@media (max-width: 560px) {
  html:not(.forced) #player:not(.fs-rot) .ctl { flex-wrap: wrap; }
  html:not(.forced) #player:not(.fs-rot) .seek { flex: 1 1 calc(100% - 150px); margin: 0 6px 0 8px; }
  html:not(.forced) #player:not(.fs-rot) .vol { margin-left: 0; margin-top: 6px; flex: 1 1 auto; }
  html:not(.forced) #player:not(.fs-rot) .vol-bar { flex: 1 1 auto; max-width: 130px; }
  html:not(.forced) #player:not(.fs-rot) .fs { margin-top: 6px; margin-left: auto; }
}
