:root { --bg:#f6f7f9; --fg:#14181f; --muted:#5b6472; --line:#dde1e7; --accent:#2f54a8; --accent-bg:#e8eefc; --card:#ffffff; --warn-bg:#fff4e0; --warn-line:#f0c47a; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:16px/1.5 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
header { background:var(--card); border-bottom:1px solid var(--line); padding:10px 20px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
header h1 { font-size:17px; margin:0; }
#hdr-progress { color:var(--muted); font-size:14px; font-variant-numeric:tabular-nums; }
main { max-width:1180px; margin:0 auto; padding:18px 16px 40px; }
footer { text-align:center; color:var(--muted); font-size:12px; padding:10px; }
.screen { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:20px 22px; }
.screen h2 { margin:0 0 10px; font-size:20px; }
.screen p, .screen li { max-width:72ch; }
.progress { height:6px; background:var(--line); border-radius:3px; margin:0 0 14px; overflow:hidden; }
.progress > div { height:100%; background:var(--accent); transition:width .2s; }
.btn { display:inline-flex; align-items:center; justify-content:center; padding:9px 16px; border-radius:9px; border:1px solid #c5cbd5; background:#fff; cursor:pointer; font:inherit; font-weight:600; color:var(--fg); }
.btn.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
.btn.small { padding:5px 10px; font-size:14px; }
.btn[disabled] { opacity:.4; cursor:not-allowed; }
.nav { display:flex; justify-content:center; gap:12px; margin-top:16px; flex-wrap:wrap; }
.ref-row { display:flex; justify-content:center; margin-bottom:12px; }
.ref-row .vid { width:min(440px,100%); }
.pair { display:flex; gap:18px; justify-content:center; flex-wrap:wrap; }
.pair .vid { width:min(520px, calc(50% - 9px)); min-width:260px; }
.vid { width:min(520px,100%); display:flex; flex-direction:column; gap:6px; align-items:center; }
.vid .label { font-weight:700; }
.vid .frame { position:relative; width:100%; background:#000; border-radius:10px; overflow:hidden; aspect-ratio:4/3; }
.vid .frame.ref { outline:3px solid #e2a62c; }
.vid video { width:100%; height:100%; display:block; background:#000; }
.vid .overlay { position:absolute; left:0; right:0; top:38%; margin:0 auto; width:fit-content; max-width:92%; background:rgba(255,255,255,.93); color:#111; font-size:clamp(14px, 2.2vw, 22px); font-weight:700; padding:8px 14px; border-radius:8px; text-align:center; display:none; pointer-events:none; }
.vid .overlay.on { display:block; }
.vid .bar { position:absolute; left:0; right:0; bottom:0; height:5px; background:rgba(255,255,255,.25); }
.vid .bar > div { height:100%; width:0; background:#e2a62c; }
.vid .ctl { display:flex; gap:8px; align-items:center; font-size:14px; color:var(--muted); }
.vid .ctl .done { color:#2a7f3f; font-weight:600; }
.question { font-size:18px; font-weight:600; text-align:center; margin:18px 0 10px; }
.scale { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.scale button { border:1px solid var(--line); border-radius:9px; padding:10px 12px; cursor:pointer; min-width:150px; background:#fff; font:inherit; }
.scale button.sel { background:var(--accent-bg); border-color:#9fb3e6; color:var(--accent); font-weight:700; }
.hint { color:var(--muted); font-size:14px; }
.warn { background:var(--warn-bg); border:1px solid var(--warn-line); border-radius:9px; padding:10px 12px; margin:10px 0; }
.code { font-family:ui-monospace, Menlo, monospace; font-size:22px; background:#eef1f5; padding:6px 12px; border-radius:8px; display:inline-block; }
textarea { width:100%; max-width:72ch; min-height:80px; font:inherit; padding:8px; border:1px solid var(--line); border-radius:8px; }
input[type=text] { font:inherit; padding:8px; border:1px solid var(--line); border-radius:8px; width:min(360px,100%); }
.mute-tag { position:absolute; top:8px; right:10px; font-size:12px; background:rgba(0,0,0,.6); color:#fff; padding:2px 7px; border-radius:6px; }
.juice { max-width:860px; margin:16px auto 0; border:1px solid var(--line); border-radius:10px; padding:12px 16px; background:#fafbfc; }
.juice.off { opacity:.45; pointer-events:none; background:#eceff3; }
.juice .jp { font-weight:600; margin-bottom:8px; }
.juice label { display:flex; gap:8px; align-items:flex-start; margin:4px 0; cursor:pointer; }
.juice input[type=checkbox] { width:18px; height:18px; margin-top:3px; flex:none; }
.juice input[type=text] { width:min(420px,100%); padding:5px 8px; }
.index a { display:block; margin:6px 0; }
.example { margin:14px 0; border:1px solid var(--line); border-radius:10px; padding:10px; background:#fafbfc; max-width:760px; }
.example img { width:100%; height:auto; display:block; border-radius:6px; }
.example .hint { margin:8px 0 0; }
