:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif;color:#e5e5e5;background:#202020;font-synthesis:none;--line:#363636;--muted:#929292;--solo:#73c9bd;--collab:#e17dbf}*{box-sizing:border-box}body{margin:0;min-height:100vh;display:flex;flex-direction:column}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--collab);outline-offset:4px}[hidden]{display:none!important}header{height:68px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 30px;gap:20px}.brand{font-size:25px;font-weight:750;letter-spacing:-1px;color:#f2f2f2;text-decoration:none}.brand span{font-size:13px;letter-spacing:1px;font-weight:400;color:var(--muted);margin-left:8px}.challenge{display:flex;align-items:center;gap:12px;font-size:14px;color:#ccc}select{background:#282828;color:#c8c8c8;border:1px solid #424242;border-radius:4px;padding:6px 25px 6px 9px;font-size:13px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m3 4 3 3 3-3' stroke='%23999' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center}#clock{justify-self:end;font-size:24px;color:#ddd}time,.mono,.result strong{font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;font-variant-numeric:tabular-nums}main{flex:1;display:flex;flex-direction:column;padding:0 22px}.input-line{height:48px;display:flex;align-items:center;justify-content:center;gap:20px;font-size:13px;color:#999}.input-line .mono{color:#ccc;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arena{flex:1;display:grid;grid-template-columns:1fr 1fr;position:relative;min-height:560px;border:1px solid var(--line)}.lane{display:flex;flex-direction:column;min-width:0}.lane+.lane{border-left:1px solid var(--line)}.lane-top{display:flex;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #2c2c2c;font-size:11px;letter-spacing:.8px}.solo .lane-top>span:first-child{color:var(--solo)}.collab .lane-top>span:first-child{color:var(--collab)}.lane-top>span:last-child{color:#888;font-size:11px;letter-spacing:0}.lane-center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 25px 66px;min-height:355px}h1{font-size:25px;letter-spacing:-.7px;margin:0;font-weight:600}.solo h1{color:var(--solo)}.collab h1{color:var(--collab)}.sub{font-size:13px;color:#8b8b8b;margin:8px 0 25px}.timer{font-size:clamp(36px,4.2vw,72px);letter-spacing:-3px;font-weight:400;color:#747474;line-height:1.2}.lane.running .timer,.lane.finished .timer{color:#eee}.lane.failed .timer{color:#9f7b7b}.state{font-size:13px;color:#8e8e8e;margin:17px 0 0;min-height:20px}.lane.running .state{color:#b5b5b5}.answer{font-size:14px;line-height:1.7;color:#bcbcbc;text-align:center;margin:18px 0 0;max-width:480px;overflow-wrap:anywhere}.answer.error{color:#d49b9b;font-size:13px}.start-wrap{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;display:flex;align-items:center;justify-content:center}#run,#stop{border:1px solid #dc74ba;background:#dd7cbe;color:#202020;font-size:22px;font-weight:650;min-width:96px;min-height:58px;border-radius:3px;padding:12px 22px;box-shadow:0 0 0 8px #202020}#stop{font-size:14px;min-height:40px;min-width:64px;background:#292929;color:#aaa;border-color:#494949}.result{border-top:1px solid var(--line);padding:20px 26px 24px;animation:appear .3s ease}.result-main{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.result-main span{font-size:13px;color:#9a9a9a}.result-main strong{font-size:23px;color:#e2e2e2;font-weight:500}.result-rows{display:grid;grid-template-columns:1fr 1fr;gap:9px 28px}.result-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}.result-row span{color:#8c8c8c}.result-row b{font-weight:400;color:#b7b7b7;font-variant-numeric:tabular-nums}.result-note{font-size:11px;color:#888;margin:15px 0 0}.after-race{display:flex;align-items:center;justify-content:center;gap:30px;padding:22px 10px 10px;font-size:13px;color:#a0a0a0}.after-race strong{color:#ddd;font-weight:500}footer{height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 27px;font-size:11px;color:#777}.divider{padding:0 10px;color:#505050}.footer-actions{display:flex;gap:22px}footer button,.dialog-head button{border:0;background:none;color:#9b9b9b;padding:8px 0;font-size:12px}footer button:hover,.dialog-head button:hover{color:#eee}#message{font-size:12px;text-align:center;line-height:1.7;max-width:800px;margin:0 auto;padding:0 20px 15px;color:#b48b8b}#message:empty{display:none}dialog{width:min(640px,calc(100vw - 32px));max-height:85vh;border:1px solid #474747;border-radius:7px;padding:26px;background:#242424;color:#d8d8d8}dialog::backdrop{background:#0009}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.dialog-head>div{display:flex;gap:20px}h2{font-size:18px;font-weight:550;margin:0}.hint{font-size:12px;line-height:1.8;color:#999}a.hint{display:inline-block;margin-top:15px;color:#bcbcbc}label{display:flex;flex-direction:column;gap:8px;margin:20px 0;font-size:13px;color:#aaa}input{min-width:0;width:100%;background:#1d1d1d;color:#ddd;border:1px solid #444;border-radius:4px;padding:10px 12px;font-size:14px}label select{padding:10px 12px}details{border-top:1px solid #3b3b3b;padding-top:17px;margin-top:22px}summary{cursor:pointer;font-size:13px;color:#aaa}.rates{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}.dialog-bottom{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:25px}.apply{border:1px solid #555;background:#383838;color:#ddd;padding:9px 23px;border-radius:4px}.dialog-bottom span{font-size:12px;color:#d79c9c}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;line-height:1.7;background:#1b1b1b;padding:15px;border-radius:4px;max-height:400px;overflow:auto}.record-title{font-size:14px;font-weight:550;margin-top:24px}.record-info{font-size:12px;color:#aaa;line-height:1.8}.record-info b{color:#ddd;font-weight:500}@keyframes appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@media(min-height:950px){.arena{min-height:650px}}@media(max-width:700px){header{padding:0 18px;gap:10px;height:64px}.brand{font-size:20px}.brand span{display:none}.challenge{font-size:12px;gap:8px}#clock{font-size:17px}main{padding:0 10px}.input-line{font-size:11px;gap:10px}.arena{min-height:540px}.lane-top{padding:12px 9px;font-size:9px}.lane-top>span:last-child{font-size:9px}.lane-center{padding:40px 12px 70px}h1{font-size:18px}.sub{font-size:11px}.timer{font-size:34px;letter-spacing:-2px}.state{font-size:11px}.answer{font-size:12px}.result{padding:15px 12px}.result-rows{grid-template-columns:1fr;gap:8px}.result-main{align-items:start;flex-direction:column;gap:8px}.result-main strong{font-size:21px}#run{font-size:18px;min-width:72px;min-height:48px;padding:10px 15px}.after-race{gap:12px;font-size:11px;flex-wrap:wrap}footer{padding:0 14px;font-size:10px}.footer-actions{gap:15px}.rates{grid-template-columns:1fr;gap:0}}

.lesson{font-size:12px;color:#858585;text-align:center;line-height:1.6;margin:0 12px 16px}.challenge #task{min-width:180px}.input-line{height:42px}@media(max-width:700px){.challenge #task{min-width:0;max-width:145px}.lesson{font-size:11px;padding:0 15px}.challenge{gap:6px}.input-line{font-size:12px}.input-line .mono{display:none}}

.process{margin:22px 0 8px;padding:18px 2px;border-top:1px solid var(--line)}.process>summary{font-size:13px;color:#bbb}.process-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.process-grid>section{min-width:0}.process h2{font-size:14px;margin:16px 0}.process details{margin-top:10px;padding-top:10px}.process pre{max-height:340px;font-size:12px}.trace-label{font-size:12px;line-height:1.6}.trace-label small{display:block;color:var(--muted)}@media(max-width:700px){.process-grid{grid-template-columns:1fr}}

.response-times{margin:0 0 20px;padding:0 0 16px;border-bottom:1px solid var(--line)}.timing-title{font-size:13px;font-weight:500;color:#c5c5c5;margin:0 0 12px}.response-times>.result-row{font-size:13px;margin:9px 0}.response-times .result-row b{font-family:ui-monospace,"SFMono-Regular",Menlo,monospace;font-variant-numeric:tabular-nums;color:#ddd}.response-times details{margin:12px 0;padding-top:10px}.response-times details>.result-row{margin:10px 0}.timing-note{font-size:11px;line-height:1.7;color:#888;margin:12px 0 0}
/* Keep replay controls clear of the completed result panels. */
.arena:has(.finished, .failed) .start-wrap{top:190px}
