:root{font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#ecf3ff;background:#081024;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 85% 0%,#15355b 0%,#081024 42%);min-height:100vh}button,input,select{font:inherit}button{cursor:pointer;border:0;border-radius:11px;padding:12px 18px;font-weight:750}button:disabled{opacity:.4;cursor:not-allowed}.top{max-width:1500px;margin:auto;padding:20px 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #233451}.brand,.topright{display:flex;align-items:center;gap:14px}.brand strong{display:block;font-size:23px;letter-spacing:2px}.brand small{color:#99abc8;display:block;font-size:10px;letter-spacing:1.6px}.logo{background:#f7a53e;color:#14253e;font-size:29px;padding:9px 14px;border-radius:15px}.chip{border:1px solid #275c73;border-radius:30px;color:#79d9cf;padding:10px 16px;font-size:12px}.primary{color:#142137;background:linear-gradient(115deg,#f7b14a,#ffc979);box-shadow:0 8px 32px #d8953727}.outline{background:#17253f;color:#e2eafe;border:1px solid #344667}main{max-width:1500px;margin:auto;padding:30px 28px}.hero{background:linear-gradient(115deg,#152c4a,#11213d 70%,#29375b);border:1px solid #344763;border-radius:22px;padding:32px;display:flex;justify-content:space-between;gap:18px}.eyebrow{letter-spacing:2px;color:#f9ad48;font-weight:800;font-size:11px}.hero h1{font-size:clamp(30px,4vw,53px);letter-spacing:-1.8px;line-height:1.08;margin:14px 0}.hero h1 em{color:#ffbb5f;font-style:normal}.hero p{color:#b6c4db;line-height:1.4;max-width:670px}.hero-actions{display:flex;gap:12px;margin-top:21px}.muted{color:#8fa1bd;font-size:12px}.statstrip{display:flex;align-self:center;gap:12px;flex-wrap:wrap}.statstrip>div{min-width:125px;background:#09192f;border:1px solid #314460;border-radius:16px;padding:19px}.statstrip b{display:block;color:#ffc879;font-size:32px}.statstrip span{display:block;color:#9eb1cd;font-size:11px;margin-top:5px}.workspace{display:grid;grid-template-columns:minmax(300px,.97fr) minmax(370px,1.03fr);gap:22px;margin-top:28px}.heading{margin:0 0 14px;display:flex;justify-content:space-between;align-items:center;gap:10px}.heading h2,.panelhead h2{margin:4px 0;font-size:20px}.filters{display:flex;gap:8px;margin:0 0 13px}.filters input{flex:1;min-width:80px}input,select{background:#0b1931;border:1px solid #354869;color:#e9f1ff;border-radius:9px;padding:10px;outline-color:#ffc77b}input::placeholder{color:#7c91b0}.filters select{max-width:155px}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:870px;overflow-y:auto;padding-right:5px}.testcard{background:#13233e;border:1px solid #2e4161;color:#e8f0ff;text-align:left;min-height:128px;padding:15px;border-radius:14px}.testcard:hover,.testcard.selected{border-color:#f7b450;background:#1d3554}.testcard h3{font-size:14px;margin:7px 0}.testcard p{font-size:11px;color:#b2c2d8;line-height:1.35;margin:5px 0}.testcard .meta{display:flex;justify-content:space-between;gap:4px;font-size:10px}.auto{color:#75e3c5}.manual{color:#ffc071}.panel{background:#101f38;border:1px solid #2d4263;border-radius:17px;padding:19px;margin-bottom:17px}.panelhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.panelhead small{font-size:10px;font-weight:800;color:#e7aa54;letter-spacing:1.6px}.tag{font-size:11px;padding:7px 10px;border-radius:30px;background:#2e3e56}.camera{width:100%;aspect-ratio:16/10;background:#060b15;border:1px solid #3c4f6d;border-radius:13px;position:relative;overflow:hidden}.camera video,.camera canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.camera canvas{pointer-events:none}.empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;color:#90a5c4;text-align:center}.empty div{font-size:55px;color:#f4a844}.empty span{font-size:11px}.live{position:absolute;top:10px;left:10px;background:#b12838;color:white;border-radius:5px;padding:6px 10px;font-size:10px}.instructions{background:#172b47;padding:14px;border-radius:10px;margin-top:12px}.instructions strong{font-size:13px;color:#ffc277}.instructions p{font-size:12px;color:#d0dcf1;line-height:1.4;margin-bottom:0}.settings{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:9px;margin:13px 0}.settings label{font-size:11px;color:#9bb2d0}.settings input,.settings select{display:block;margin-top:5px;width:100%}.metric{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.metric>div{background:#07172d;border:1px solid #2c4161;padding:13px;border-radius:10px}.metric small{display:block;color:#9baecc;font-size:10px}.metric strong{font-size:22px;color:#ffca79}.control{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.notice{background:#17253d;color:#b0bfd6;font-size:11px;line-height:1.5;padding:12px;margin-top:11px;border-radius:8px}.minibtn{display:flex;gap:5px}.small{padding:7px 9px;font-size:11px}.danger{color:#ffb0a8}.chart{min-height:125px;padding:12px;background:#0a192f;border-radius:12px;display:flex;align-items:center}.chart svg{width:100%;height:135px}.history{max-height:240px;overflow-y:auto}.historyrow{display:flex;gap:10px;justify-content:space-between;align-items:center;border-bottom:1px solid #2d4261;padding:10px 0;font-size:12px}.historyrow span{color:#9bacc9}footer{color:#8095b5;text-align:center;margin:24px 0;font-size:11px}@media(max-width:960px){.workspace{grid-template-columns:1fr}.cards{max-height:430px}.statstrip{display:none}}@media(max-width:600px){.top{padding:15px}.topright .chip{display:none}.topright button{padding:9px;font-size:11px}main{padding:14px}.hero{padding:20px}.cards{grid-template-columns:1fr 1fr}.filters{flex-wrap:wrap}.filters input{flex-basis:100%}.filters select{flex:1;max-width:none}.settings{grid-template-columns:1fr 1fr}.settings label:first-child{grid-column:span 2}.control button{flex:1;padding:11px 8px;font-size:12px}.panel{padding:12px}.metric strong{font-size:18px}}
[hidden]{display:none!important}
@media print{body{color:#111;background:white}.top,.hero,.left,.player,.minibtn,.control,footer{display:none!important}.workspace{display:block}.panel{border:0;color:#111;background:white}.historyrow{color:#111}.historyrow span{color:#333}.chart{background:#eee}.chart svg text{fill:#111}}

.back-guide{color:inherit;text-decoration:none;font-size:14px;display:inline-flex;align-items:center}.topright{flex-wrap:wrap}button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:600px){.top{flex-wrap:wrap;gap:12px}.topright{width:100%}}

.camera-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.camera-tools button{font-size:14px;padding:10px}.camera-details summary{cursor:pointer;padding:10px 0;font-size:14px}
body.camera-mode{overflow:hidden}.camera-mode .player{position:fixed;inset:0;z-index:10000;width:100%;height:100vh;height:100dvh;margin:0;border:0;border-radius:0;background:#000;padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:8px;isolation:isolate;overflow:hidden}
.camera-mode .player .camera{position:absolute;inset:0;z-index:-1;width:100%;height:100%;aspect-ratio:auto;border:0;border-radius:0;background:#000}.camera-mode .player video,.camera-mode .player canvas{width:100%;height:100%;object-fit:contain}
.camera-mode .player .panelhead{margin:0;gap:8px;align-items:flex-start}.camera-mode .player .panelhead>div:first-child{padding:9px 12px;border-radius:12px;background:#07172d70}.camera-mode .player h2{font-size:clamp(16px,3vw,24px);color:white}.camera-mode .player .panelhead small{color:#ffe0aa}.camera-mode .player .camera-tools{justify-content:flex-end}.camera-mode .player .tag{background:#07172d70;color:white}
.camera-mode .player button,.camera-mode .player .primary{color:white!important;background:#10243c70!important;border:1px solid #ffffff66;box-shadow:none;backdrop-filter:blur(5px);min-height:44px}.camera-mode .player button:disabled{opacity:.45}.camera-mode .player button:focus-visible{outline:3px solid #ffc879;outline-offset:2px}
.camera-mode .camera-details{max-width:520px;max-height:38vh;overflow:auto;background:#07172d70;border:1px solid #ffffff44;border-radius:12px;padding:0 12px;color:white}.camera-mode .camera-details summary{font-weight:700}.camera-mode .instructions{background:transparent;margin:0;padding:0}.camera-mode .settings input,.camera-mode .settings select{background:#07172d99}.camera-mode .settings label,.camera-mode .instructions p{color:#fff}
.camera-mode .player .metric{margin-top:auto;align-self:center;width:min(100%,640px)}.camera-mode .player .metric>div{background:#07172d70;border-color:#ffffff44;backdrop-filter:blur(4px)}.camera-mode .metric small{color:white;font-size:11px}.camera-mode .metric strong{color:#ffe3ac}.camera-mode .player .control{margin:0;justify-content:center}.camera-mode .player .notice{margin:0;align-self:center;max-width:720px;background:#07172d70;color:white;font-size:12px;padding:7px 10px}.camera-mode .live{top:50%;left:12px;background:#a3152677}
@media(max-width:600px){.camera-mode .player .panelhead{flex-wrap:wrap}.camera-mode .camera-tools{width:100%;justify-content:flex-start!important}.camera-mode .camera-tools button{font-size:12px;padding:8px}.camera-mode .metric>div{padding:9px}.camera-mode .player .control button{font-size:13px;min-height:44px}.camera-mode .metric strong{font-size:19px}}
@media(max-height:500px) and (orientation:landscape){.camera-mode .player{gap:4px}.camera-mode .camera-details{position:absolute;top:65px;left:12px;max-width:45%;max-height:35vh}.camera-mode .player .metric{width:50%;align-self:flex-end}.camera-mode .player .metric>div{padding:6px}.camera-mode .player .notice{font-size:11px;padding:4px}.camera-mode .player .control{justify-content:flex-end}}
.test-lobby{margin-top:24px}.test-lobby .cards{max-height:none;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}dialog{width:min(560px,calc(100% - 24px));max-height:90dvh;overflow:auto;color:#ecf3ff;background:#101f38;border:1px solid #546884;border-radius:18px;padding:24px}dialog::backdrop{background:#000a;backdrop-filter:blur(4px)}dialog form{display:grid;gap:12px;margin-top:18px}dialog label{display:grid;gap:6px}dialog p{line-height:1.5}dialog input{width:100%;font-size:16px}.dialog-close{float:right}dialog h2{padding-right:60px}dialog .back-guide{margin-top:16px;text-decoration:underline}
.test-navigation{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.test-language-label{display:flex!important;align-items:center;gap:8px;font-size:16px}.test-language{max-width:160px;min-height:44px;font-size:16px}.test-back{min-height:44px}.top{flex-wrap:wrap;gap:16px}dialog>.test-navigation{margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #344667}dialog .dialog-close{float:none;margin-bottom:10px}dialog h2{padding-inline-end:0}.camera-mode .test-language{background:#10243c99;color:#fff;border-color:#ffffff66;backdrop-filter:blur(5px)}.camera-mode .test-language-label{color:white}.testcard{text-align:start}.testcard h3{font-size:16px}.testcard p,.instructions p,.notice,footer{font-size:14px}.test-navigation button:focus-visible,.test-language:focus-visible{outline:3px solid #ffc879;outline-offset:2px}[dir=rtl] .testcard{text-align:right}[dir=rtl] .live{left:auto;right:12px}@media(max-width:600px){.test-language{max-width:145px}.top .test-navigation{width:100%}.camera-mode .camera-tools{gap:4px}.camera-mode .test-navigation{gap:6px}.camera-mode .test-language-label{font-size:14px}.camera-mode .test-language{min-height:44px;max-width:125px}dialog{padding:16px}}

/* Keep video and pose overlay aligned in the front-camera mirror view. */
.camera video,.camera canvas{transform:scaleX(-1)}
.test-back{position:fixed;left:auto;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));z-index:10002;min-width:88px;min-height:48px;background:#10243ccc!important;color:white!important;backdrop-filter:blur(5px)}
body{padding-bottom:76px}
.camera-mode .player{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
@media print{.test-back{display:none}}

.test-guide-dialog{width:min(900px,94vw);max-height:90dvh;padding:20px;color:#e7eff9;background:#102039;border:1px solid #64788f;border-radius:18px;overflow:auto}.test-guide-dialog::backdrop{background:#000a}.test-guide-top{display:flex;align-items:center;justify-content:space-between;gap:16px}.test-guide-top h2{font-size:22px;margin:0}.test-guide-top button{min-height:44px}.test-guide-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;list-style:none;padding:0;margin:20px 0 0}.test-guide-steps li{min-width:0;background:#172c48;padding:14px;border-radius:14px}.test-guide-art svg{display:block;width:100%;height:auto}.test-guide-steps h3{font-size:19px;margin:14px 0 8px;color:#ffc279}.test-guide-steps p{font-size:16px;line-height:1.5;margin:8px 0}.camera-mode .test-guide-dialog{z-index:11000}@media(max-width:600px){.test-guide-steps{grid-template-columns:1fr}.test-guide-dialog{padding:16px}}

/* Modal navigation stays in the top layer, at the same viewport corner. */
body:has(dialog[open]) .test-back{visibility:hidden}body dialog[open] .test-back{visibility:visible}dialog,.test-guide-dialog{padding-bottom:80px}

.test-card-heading {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  direction: ltr;
}
.test-card-heading img {
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  object-fit: contain;
}
.test-card-heading span {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: start;
}
@media (max-width: 600px) {
  .test-card-heading { gap: 0.5rem; }
  .test-card-heading img { width: 2.25rem; height: 2.25rem; }
}
