:root{color-scheme:dark;--bg:#090d1c;--panel:#11182b;--line:#28344b;--cyan:#5beaff;--pink:#ff56c8;--lime:#d2ff5a;--text:#f1f5ff;--mute:#8d9db9;font-family:Inter,Segoe UI,system-ui,sans-serif}*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden;background:var(--bg);color:var(--text)}button,a,input{-webkit-tap-highlight-color:transparent}button{font:inherit;font-weight:750;color:var(--text);background:#172137;border:1px solid #33425c;border-radius:10px;padding:10px 15px;cursor:pointer;white-space:nowrap}button:hover{border-color:var(--cyan);background:#202d47}button:disabled{opacity:.42;cursor:default}button:focus-visible,a:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}.primary{background:linear-gradient(115deg,#c323a4,#f245a8);border:1px solid #ff7bce;color:white;box-shadow:0 6px 24px #d7249c33}.primary:hover{background:#e53eb5}.app{height:100dvh;display:flex;flex-direction:column;max-width:1800px;margin:auto;padding:0 clamp(10px,2.4vw,36px)}header{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:65px;border-bottom:1px solid #1f2a40}.brand{text-decoration:none;color:var(--cyan);display:flex;align-items:center;gap:8px;font-size:clamp(18px,2.3vw,27px);font-weight:950;letter-spacing:-.06em;line-height:1}.brand small{display:block;color:var(--mute);font-size:8px;letter-spacing:.2em;margin-top:5px}.pink{color:var(--pink)}.headmid,.footright,.debug{font-size:10px;color:var(--mute);font-weight:700;letter-spacing:.12em}.headmid span{color:#43536c}.headright,.footleft,.footright{display:flex;align-items:center;gap:8px}.status{font-size:10px;color:var(--mute);font-weight:800;letter-spacing:.06em;white-space:nowrap}.status i,.eyebrow i,.arena-top i{display:inline-block;width:7px;height:7px;background:var(--lime);border-radius:50%;margin-right:5px;box-shadow:0 0 9px #b6ff4966}.iconbutton{width:37px;height:37px;padding:0;font-size:18px}main{min-height:0;flex:1;display:flex;flex-direction:column;gap:12px;padding:12px 0}.hud{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.stat{background:linear-gradient(145deg,#151e34,#101625);border:1px solid #293750;border-radius:13px;padding:10px 15px;min-width:0;position:relative;overflow:hidden}.stat:before{content:'';position:absolute;top:0;left:0;width:42%;height:2px;background:var(--accent,var(--cyan))}.stat>span{display:flex;justify-content:space-between;gap:3px;font-size:10px;font-weight:800;letter-spacing:.14em;color:var(--mute)}.stat>b{display:block;font-size:clamp(24px,3vw,42px);line-height:1.04;font-variant-numeric:tabular-nums;letter-spacing:-.045em;margin:4px 0;color:var(--accent,var(--cyan))}.stat small{font-size:10px;color:var(--mute);font-weight:650;letter-spacing:.06em;white-space:nowrap}.score{--accent:#f4f6ff}.combo{--accent:var(--lime)}.panic{--accent:var(--pink)}.panic strong{color:var(--pink);letter-spacing:0}.meter{display:flex;gap:4px;margin:12px 0 9px}.meter i{height:13px;flex:1;border-radius:3px;background:#283047}.meter i.on{background:var(--pink);box-shadow:0 0 9px #ff56c855}.timebar{height:4px;background:#283047;border-radius:6px;margin-top:7px;overflow:hidden}.timebar i{display:block;height:100%;background:var(--cyan);width:100%}.arena{position:relative;isolation:isolate;flex:1;min-height:0;border:1px solid #26344f;border-radius:18px;overflow:hidden;background:#0b1223}canvas{display:block;position:absolute;inset:0;width:100%;height:100%;touch-action:none}video{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.arena-top{position:absolute;top:13px;left:16px;right:16px;display:flex;justify-content:space-between;pointer-events:none;font-size:10px;letter-spacing:.12em;font-weight:800;color:#8296b8}.hint{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);max-width:92%;width:max-content;text-align:center;background:#10182bd9;border:1px solid #2a3956;padding:8px 13px;border-radius:9px;font-size:12px;color:#c0d0e8;pointer-events:none}.feedback{position:absolute;left:50%;top:12%;transform:translateX(-50%);text-align:center;color:var(--lime);font-weight:900;font-size:clamp(17px,3vw,32px);pointer-events:none;text-shadow:0 2px 14px #000;opacity:0;transition:opacity .15s}.feedback.show{opacity:1}.overlay{position:absolute;inset:0;background:#070a15b8;backdrop-filter:blur(7px);display:grid;place-items:center;z-index:4;padding:12px;overflow:auto}.hidden{display:none!important}.dialog{width:min(640px,100%);max-height:100%;overflow:auto;background:linear-gradient(155deg,#17223b,#0d1325 75%);border:1px solid #354560;border-radius:22px;padding:clamp(15px,3vw,32px);box-shadow:0 20px 70px #0007;text-align:center}.hero{position:relative}.eyebrow{font-size:10px;letter-spacing:.18em;color:var(--cyan);font-weight:850}.hero h1{font-size:clamp(34px,6.6vw,78px);font-weight:950;font-style:italic;letter-spacing:-.075em;line-height:1;margin:8px 0;color:#a8f4ff;text-shadow:0 0 25px #49d9ff44}.hero h1 span{color:var(--pink);text-shadow:0 0 25px #ff56c844}.tagline{font-size:clamp(16px,2.4vw,22px)!important;font-weight:800;color:white!important;margin:6px 0}.dialog p{color:#a7b6d2;font-size:14px;line-height:1.5;margin:10px auto;max-width:480px}.cubeart{height:40px;display:flex;justify-content:center;align-items:end;gap:3px;margin:8px auto 0}.cubeart i{width:25px;height:25px;border:2px solid var(--cyan);background:#5beaff33;box-shadow:0 0 12px #5beaff44;transform:rotate(-12deg);border-radius:4px}.cubeart i:nth-child(2){height:33px;width:33px;border-color:var(--pink);background:#ff56c833;transform:rotate(8deg)}.cubeart i:nth-child(3){border-color:var(--lime);background:#d2ff5a22;transform:rotate(15deg)}.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;text-align:left;margin:18px 0}.steps div{padding:10px;background:#0d1528;border:1px solid #25344d;border-radius:10px}.steps b{display:block;color:var(--cyan);font-size:11px;margin-bottom:5px}.steps small{font-size:12px;color:#a7b6d2;line-height:1.4;display:block}.actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:15px}.actions button{font-size:12px;min-height:43px}.privacy{font-size:11px!important;color:#8196b5!important}.dialog #startStatus{color:var(--lime);font-size:12px;min-height:16px;line-height:1.4}.dialog h2{font-size:34px;letter-spacing:-.04em;margin:8px 0}.result-score{font-size:clamp(56px,10vw,100px);color:var(--cyan);font-weight:950;letter-spacing:-.06em;line-height:1}.result-details{color:var(--lime);font-size:13px;font-weight:700;margin:14px}.options label{display:flex;justify-content:space-between;align-items:center;padding:12px;border-bottom:1px solid #27334c;font-size:14px}.options input{accent-color:var(--pink)}footer{min-height:51px;display:flex;justify-content:space-between;align-items:center;gap:8px}footer button{padding:8px 13px;font-size:12px}.privacyline{color:#8aa6a1}.debug{font-size:10px;letter-spacing:0}.footright{gap:14px;white-space:nowrap}@media(max-width:720px){header{min-height:53px;gap:5px}.brand svg{width:29px;height:29px}.headmid,.footright>span:last-child{display:none}.status{font-size:9px}.iconbutton{width:32px;height:32px}.hud{gap:5px}.stat{padding:7px;border-radius:8px}.stat>span{font-size:8px;letter-spacing:0}.stat small{font-size:8px;letter-spacing:0}.stat>b{font-size:24px}.panic strong{font-size:8px}.meter{gap:2px;margin:8px 0 5px}.meter i{height:10px}main{gap:7px;padding:7px 0}.arena{border-radius:12px}.arena-top{top:9px;left:9px;right:9px;font-size:8px}.hint{font-size:10px;bottom:7px;padding:6px 8px}.steps{gap:4px;margin:10px 0}.steps div{padding:7px}.steps small{font-size:10px}.steps b{font-size:9px}.dialog p{font-size:12px}.actions{gap:6px;margin-top:9px}.actions button{font-size:11px;min-height:38px;white-space:normal}.footright{font-size:8px}footer{min-height:43px}.debug{display:none}.cubeart{height:30px}.cubeart i{width:20px;height:20px}.cubeart i:nth-child(2){width:25px;height:25px}}@media(max-height:500px){header{min-height:40px}.hud .stat{padding:4px 10px}.stat>b{font-size:23px}.stat small{display:none}.meter{margin:5px 0}.app{padding:0 8px}main{padding:5px 0;gap:5px}.dialog{padding:12px}.cubeart{display:none}.hero h1{font-size:32px}.hero p{margin:4px auto}.steps{margin:5px 0}.steps div{padding:5px}.actions{margin-top:5px}footer{min-height:35px}footer button{padding:5px 9px}.arena-top{display:none}}

.options select{background:#121d33;color:#edfaff;border:1px solid #354969;border-radius:8px;padding:8px;max-width:60%;font:inherit}
/* V3: separated modes, recording and widescreen controls */
#boot{position:fixed;inset:0;z-index:100;background:#070711;display:grid;place-items:center}#bootCanvas{position:static;width:min(100vw,171.428vh);height:auto;max-height:100vh;object-fit:contain}#skipBoot{position:absolute;bottom:18px;right:18px;font:700 11px monospace;color:#8f8cae;background:#111322;border-color:#292941}.modecards{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.modecard{display:flex;flex-direction:column;align-items:flex-start;gap:5px;text-align:left;white-space:normal;padding:14px;background:#111e31;border-color:#356276}.modecard.ranked{background:linear-gradient(135deg,#123442,#14213b);border-color:#5beaff88}.modecard.practice{background:linear-gradient(135deg,#27213e,#191b31);border-color:#a398ff77}.modecard .mode-kicker{font-size:10px;letter-spacing:.14em;color:var(--cyan)}.modecard.practice .mode-kicker{color:#b7aaff}.modecard strong{font-size:17px}.modecard small{color:#a7b6d2;font-size:11px;line-height:1.4}.record-options{display:flex;gap:7px;flex-wrap:wrap;justify-content:center;align-items:center;margin-top:12px;font-size:12px;color:#c0d0e8}.record-options label{display:flex;align-items:center;gap:5px}.record-options input{accent-color:var(--pink)}.record-options select{font:inherit;background:#10192d;color:var(--text);border:1px solid #354969;border-radius:7px;padding:7px}.recbadge{position:absolute;z-index:2;right:16px;top:38px;border:1px solid #ff567b66;background:#230f22d9;padding:5px 9px;border-radius:6px;color:#ff7799;font:800 11px monospace;pointer-events:none}.video-result{margin:12px auto 0;border-top:1px solid #354560;padding-top:8px}.video-result video{position:static;width:auto;max-width:100%;height:auto;max-height:220px;opacity:1;pointer-events:auto;background:#080d1a;display:block;margin:7px auto;border-radius:8px}.video-result .download{display:inline-block;background:#5beaff;color:#081320;font-weight:800;font-size:12px;text-decoration:none;padding:9px 16px;border-radius:8px}.app{max-width:none}.dialog.hero{width:min(720px,100%)}.dialog.result{width:min(650px,100%)}.feedback.show{animation:feedbackPop .25s ease-out}@keyframes feedbackPop{from{transform:translateX(-50%) scale(.75)}to{transform:translateX(-50%) scale(1)}}@media(max-width:480px){.modecards{gap:6px}.modecard{padding:10px}.modecard strong{font-size:14px}.modecard small{font-size:10px}.record-options{font-size:10px}.headright{gap:4px}.brand{font-size:17px}.brand small{font-size:6px}.status{max-width:84px;overflow:hidden}.recbadge{top:26px;right:9px}}@media(max-height:500px){.modecard{padding:7px}.modecard strong{font-size:14px}.record-options{margin-top:5px}.dialog.hero{max-height:100%}}
@media(max-width:480px){.status{max-width:95px;white-space:normal;line-height:1.15}.headright .iconbutton{width:29px;height:29px}.brand small{letter-spacing:.1em}.video-result video{max-height:160px}}

/* v3.1 — readable UI, compact results, theme-matched overflow */
:root { --mute:#a5b6d2; scrollbar-color:#526b90 #10182a; scrollbar-width:thin; }
.overlay {
  container-type:size;
  grid-template-rows:minmax(0,1fr);
  overflow:hidden;
  padding:clamp(8px,1.5vw,16px);
}
.dialog {
  min-height:0;
  max-height:100%;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#526b90 #111a2b;
  padding:clamp(16px,2.4vw,28px);
}
.dialog::-webkit-scrollbar {width:8px;height:8px;}
.dialog::-webkit-scrollbar-track {background:#111a2b;border-radius:12px;}
.dialog::-webkit-scrollbar-thumb {background:#526b90;border:2px solid #111a2b;border-radius:12px;}
.dialog::-webkit-scrollbar-thumb:hover {background:#5beaff;}
.brand small {font-size:11px;letter-spacing:.08em;color:#a5b6d2;}
.headmid,.footright,.debug,.status {font-size:13px;letter-spacing:.045em;}
.stat>span,.stat small {font-size:13px;letter-spacing:.045em;line-height:1.35;}
.stat small {white-space:normal;}
.panic strong {font-size:inherit;}
.arena-top {font-size:13px;letter-spacing:.055em;color:#a5b6d2;}
.hint {font-size:15px;line-height:1.35;}
.eyebrow {font-size:13px;letter-spacing:.11em;}
.dialog p {font-size:16px;line-height:1.45;}
.dialog.hero {width:min(820px,100%);}
.steps b {font-size:14px;}
.steps small {font-size:14px;line-height:1.4;color:#bccbe1;}
.steps {margin:14px 0;}
.modecard .mode-kicker {font-size:13px;letter-spacing:.08em;}
.modecard strong {font-size:19px;}
.modecard small {font-size:14px;color:#bccbe1;}
.record-options,.options label {font-size:15px;}
.record-options select {padding:8px;}
.privacy {font-size:14px!important;color:#a5b6d2!important;}
.dialog #startStatus {font-size:14px;min-height:0;}
.actions button,footer button {font-size:14px;white-space:normal;}
.recbadge {font-size:13px;}
#skipBoot {font-size:14px;color:#b9b7d0;}
/* Single-column results, with a video sized to the arena rather than the page. */
.dialog.result {width:min(680px,100%);padding:clamp(12px,2.6cqh,26px);}
.result-summary {min-width:0;}
.result-summary h2 {font-size:clamp(25px,4.8cqh,34px);line-height:1.15;margin:6px 0;}
.result-summary p {font-size:14px;margin:6px auto;}
.result-score {font-size:clamp(52px,12cqh,92px);line-height:1;}
.result-details {font-size:15px;line-height:1.4;margin:8px 0;color:var(--lime);}
.result-summary .actions {margin-top:10px;gap:7px;}
.result-summary .actions button {min-height:40px;padding:8px 12px;}
.video-result {min-width:0;margin:12px 0 0;padding-top:8px;}
.video-result p {font-size:14px;margin:4px auto 8px;}
.video-result video {width:auto;max-width:100%;height:auto;max-height:clamp(100px,calc(100cqh - 340px),290px);margin:6px auto 10px;object-fit:contain;}
.video-result video:not([src]) {display:none;}
.video-result .download {font-size:15px;padding:10px 20px;}
.video-result .download:hover {background:#99f5ff;}
/* Wide results: score left, full preview and save controls right. */
@container (min-width:740px) {
  .dialog.result:has(.video-result:not(.hidden)) {
    width:min(1020px,100%);display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);align-items:center;gap:clamp(12px,2.8cqw,30px);
  }
  .dialog.result .video-result {border-top:0;border-left:1px solid #354560;margin:0;padding:0 0 0 clamp(12px,2.8cqw,30px);}
  .dialog.result .video-result video {max-height:clamp(100px,calc(100cqh - 150px),430px);}
}
@container (max-height:480px) {
  .dialog.result {padding:12px;}
  .result-summary h2 {font-size:25px;}
  .result-score {font-size:54px;}
  .result-details {margin:6px 0;}
  .result-summary .actions {margin-top:7px;}
  .video-result {margin-top:7px;}
}
@media(max-width:900px){.headmid{display:none;}}
@media(max-width:720px){
 .brand small {font-size:10px;}
 .status,.stat>span,.stat small,.arena-top,.footright {font-size:12px;letter-spacing:0;}
 .stat>span {flex-wrap:wrap;}
 .hint {font-size:13px;}
 .dialog p {font-size:15px;}
 .actions button,footer button {font-size:13px;}
 .steps small,.steps b,.modecard small,.modecard .mode-kicker {font-size:13px;}
 .modecard strong {font-size:16px;}
 .record-options {font-size:14px;}
 .privacy {font-size:13px!important;}
}
@media(max-width:480px){
 .brand small {font-size:10px;letter-spacing:0;}
 .status {max-width:100px;font-size:12px;overflow:visible;}
 .footright {font-size:11px;}
 .stat>span,.stat small {font-size:11px;}
 .stat>b {font-size:23px;}
 .arena-top {font-size:11px;gap:8px;}
 .steps {grid-template-columns:1fr;gap:5px;margin:10px 0;}
 .steps div {padding:7px 9px;display:grid;grid-template-columns:80px 1fr;align-items:center;gap:6px;}
 .steps b {margin:0;}
 .modecard {padding:10px;}
 .record-options {gap:6px;}
 .result-summary .actions button {flex:1 1 92px;}
}
@media(max-height:500px){
 .dialog.hero {padding:12px;}
 .modecard strong {font-size:15px;}
 .record-options {margin-top:6px;}
}
/* Keep the larger type while removing decorative height on laptop displays. */
@container (min-width:660px) and (max-height:650px) {
 .dialog.hero {padding:16px 22px;}
 .hero .cubeart {display:none;}
 .hero h1 {font-size:clamp(38px,8cqh,58px);margin:5px 0;}
 .hero .tagline {font-size:18px!important;margin:3px 0;}
 .hero p {max-width:680px;margin:6px auto;}
 .hero .steps {margin:9px 0;}
 .hero .steps div {padding:8px 10px;}
 .hero .steps b {margin-bottom:3px;}
 .hero .modecards {margin-top:8px;}
 .hero .modecard {padding:9px 12px;gap:3px;}
 .hero .record-options {margin-top:8px;}
 .hero .privacy {margin:7px auto 0;}
}
@container (min-width:740px) and (min-height:400px) {
 .dialog.result:has(.video-result:not(.hidden)) .result-score {font-size:clamp(64px,15cqh,94px);}
}

.account-status{font-size:14px;line-height:1.35;color:#a8e7f2;font-weight:650;margin:6px auto;overflow-wrap:anywhere}.account-status:empty{display:none}#rankStatus{color:#5beaff;margin:8px 0}.stat small #bestLabel{font-size:inherit;letter-spacing:inherit}@media(max-width:720px){.account-status{font-size:12px}}
