@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800;900&family=Unbounded:wght@700;800&display=swap');
:root{font-family:Onest,Inter,system-ui,sans-serif;color:#211835;background:#f6f4fb;--purple:#6339db;--ink:#211835;--line:#e9e3f2;--lime:#e6ff74}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 6% 0%,#eee7ff,transparent 42%),#f6f4fb}
button,input{font:inherit}
button{cursor:pointer;color:inherit}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #9e67ff;outline-offset:3px}
.top{height:75px;padding:0 max(28px,calc((100vw - 1232px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eae4f1;background:#faf8ffb8}
.brand{display:flex;gap:11px;align-items:center;text-decoration:none;color:var(--ink);font-weight:850;font-size:19px;white-space:nowrap}
.brand-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;color:#fff;background:#6740df;font-size:25px;box-shadow:0 3px 0 #4825a9}
.help-button{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e5ddef;border-radius:12px;padding:9px 13px;font-size:13px;font-weight:750}
.help-button span{display:grid;place-items:center;border:1.5px solid #7255aa;color:#7255aa;border-radius:50%;width:15px;height:15px;font-size:10px}
main{max-width:1232px;margin:auto;padding:0 0 14px}
.intro{padding:42px 0 27px}
h1{margin:0;font-family:Unbounded,Onest,system-ui,sans-serif;font-weight:800;line-height:1.12;letter-spacing:-.074em;font-size:clamp(40px,5.2vw,76px)}
h1 em{color:var(--purple);font-style:normal}
h1 span{color:#a47aff}
.intro p{margin:14px 0 0;color:#60556f;font-size:17px}
.studio{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:20px;align-items:start}
.view-column{min-width:0}
.stage{isolation:isolate;position:relative;overflow:hidden;border-radius:25px;min-height:485px;aspect-ratio:1.69;background:radial-gradient(ellipse at 50% 72%,#6536a1,#241143 49%,#130c28 76%);border:1px solid #392355;box-shadow:0 10px 27px #32146020}
.stage::before,.stage::after{content:"";position:absolute;inset:0;pointer-events:none}
.stage::before{z-index:-1;background:url('stage.webp') center center/cover no-repeat}
.stage::after{z-index:-1;background:linear-gradient(180deg,#170c2d50,transparent 20%,transparent 74%,#10091f8f)}
.stage[data-mode=camera]{background:#201631}
.stage[data-mode=camera]::before{display:none}
.stage video,.stage canvas,.place{position:absolute;inset:0;width:100%;height:100%}
.stage video{object-fit:cover;display:none}
.stage[data-mode=camera] video{display:block;z-index:-1}
.stage canvas{pointer-events:none}
.place{border:0;background:none;color:#fff}
.place::after{content:"+";display:grid;place-items:center;margin:auto;border:1px dashed #fff;border-radius:50%;width:45px;height:45px;background:#140d2288;font-size:27px}
.stage-top,.stage-bottom{position:absolute;left:17px;right:17px;display:flex;justify-content:space-between;align-items:center;pointer-events:none;gap:12px}
.stage-top{top:17px}
.stage-bottom{bottom:17px}
.stage-top button,.stage-bottom button{pointer-events:auto}
.stage-mode,.now-playing,.icon-button,.stage-hint{background:#211236bf;border:1px solid #fff3;color:white;backdrop-filter:blur(12px)}
.stage-mode{display:flex;align-items:center;gap:7px;border-radius:100px;padding:8px 12px;font-size:12px;font-weight:650}
.stage-mode i{width:7px;height:7px;border-radius:50%;background:var(--lime);box-shadow:0 0 9px #e6ff7490}
.now-playing{display:flex;align-items:center;gap:11px;padding:9px 13px;border-radius:14px}
.now-playing strong,.now-playing small{display:block}
.now-playing strong{font-size:13px}
.now-playing small{font-size:11px;color:#d5c5ec;margin-top:2px}
.bars{display:flex;gap:3px;align-items:center;height:21px}
.bars b{width:3px;border-radius:3px;height:13px;background:#e6ff74;animation:beat .65s alternate infinite}
.bars b:nth-child(2){height:21px;animation-delay:-.35s}
.bars b:nth-child(3){height:9px;animation-delay:-.15s}
.stage.paused .bars b{animation-play-state:paused}
@keyframes beat{to{transform:scaleY(.4)}}
.icon-button{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;font-size:24px}
.pause-icon{width:12px;height:15px;border-left:4px solid currentColor;border-right:4px solid currentColor}
.paused .pause-icon{width:0;height:0;border-right:0;border-left:12px solid currentColor;border-top:7px solid transparent;border-bottom:7px solid transparent}
.stage-hint{position:absolute;left:50%;top:62%;transform:translateX(-50%);width:max-content;max-width:85%;margin:0;padding:9px 14px;border-radius:12px;font-size:13px;text-align:center;pointer-events:none}
.stage-caption{display:flex;align-items:baseline;gap:8px;margin:13px 4px 0;color:#665976;font-size:13px}
.stage-caption span:first-child{color:var(--purple);font-size:17px}
.controls{padding:19px;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 8px 26px #39165c0a}
fieldset{border:0;margin:0 0 17px;padding:0;min-width:0}
legend,.scale label{font-size:15px;font-weight:800;margin-bottom:9px;padding:0}
.characters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.character{display:grid;gap:5px;justify-items:center;align-content:start;border:1px solid #ece6f3;background:#fbf9fe;border-radius:13px;padding:5px 4px 7px;font-size:11px;font-weight:750;white-space:nowrap}
.character[aria-pressed=true]{border-color:#8358ed;background:#f0e9ff;box-shadow:inset 0 0 0 1px #8358ed}
.avatar{width:100%;height:57px;border-radius:8px;overflow:hidden}
.avatar canvas{display:block;width:100%;height:100%;object-fit:contain}
.avatar-car{background:#e5d5ff}
.avatar-robot{background:#e7f0d0}
.avatar-astro{background:#ffeadc}
.dances{display:grid;gap:5px}
.dances button{display:grid;grid-template-columns:22px 1fr 15px;align-items:center;gap:8px;text-align:left;font-size:13px;font-weight:700;border:1px solid #eee8f5;border-radius:11px;background:#fbfaff;padding:8px 10px;min-height:37px}
.dances button[aria-pressed=true]{background:#f2ebff;border-color:#e0d1ff;color:#5630c4}
.dances button span{color:var(--purple);font-size:17px;line-height:1}
.dances i{border:1px solid #c9bed8;width:13px;height:13px;border-radius:50%}
.dances [aria-pressed=true] i{border:4px solid #7547ec}
.scale{display:grid;grid-template-columns:1fr auto;gap:1px 10px;align-items:center;margin-bottom:15px}
.scale label{margin:0}
.scale output{font-size:12px;font-weight:800;background:#f1eaff;color:#643acc;padding:4px 7px;border-radius:7px}
.scale input{grid-column:1/-1;width:100%;margin:6px 0 0;accent-color:#7142ea;cursor:pointer;height:18px}
.camera-button{display:flex;justify-content:center;align-items:center;gap:10px;width:100%;min-height:47px;padding:10px 12px;border:0;border-radius:12px;background:var(--lime);color:#273015;font-weight:850;font-size:14px;box-shadow:0 3px 0 #b0cb4a}
.camera-button:hover{background:#efff9d}
.camera-button:disabled{opacity:.62;cursor:wait}
.camera-icon{width:17px;height:13px;border:1.6px solid;border-radius:3px;position:relative}
.camera-icon::before{content:"";position:absolute;border:1.5px solid;width:4px;height:4px;border-radius:50%;left:4.7px;top:2px}
.camera-icon::after{content:"";position:absolute;background:currentColor;width:6px;height:2px;top:-3px;left:2px;border-radius:2px}
.arrow{font-size:16px}
footer{font-size:12px;color:#766884;padding:18px 3px 8px}
dialog{border:1px solid #e4dbf2;border-radius:22px;padding:25px;max-width:min(435px,calc(100% - 28px));background:#fff;color:var(--ink);box-shadow:0 24px 70px #160b3555}
dialog::backdrop{background:#190b3a91;backdrop-filter:blur(3px)}
dialog h2{margin:0 32px 15px 0}
dialog ol{padding-left:22px}
dialog li{margin:8px 0}
dialog p{color:#60556f;font-size:14px}
.close{position:absolute;right:15px;top:14px;width:34px;height:34px;border-radius:10px;border:0;background:#f1eaff;font-size:24px}
#xr-overlay{position:fixed;inset:0;color:white;pointer-events:none;font-weight:700}
.xr-top,.xr-buttons{position:absolute;left:16px;right:16px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.xr-top{top:max(15px,env(safe-area-inset-top))}
.xr-top span,#xr-overlay p,#xr-overlay button{border:1px solid #fff3;background:#211236d9;color:#fff;border-radius:12px;padding:10px 12px}
#xr-overlay p{position:absolute;bottom:68px;left:50%;transform:translateX(-50%);text-align:center;width:max-content;max-width:calc(100% - 32px);font-size:14px}
.xr-buttons{bottom:max(18px,env(safe-area-inset-bottom));justify-content:center}
#xr-overlay button{pointer-events:auto}
#xr-close{font-size:22px;line-height:1}
@media(max-width:1290px){main{margin:0 28px}}
@media(max-width:900px){.studio{grid-template-columns:minmax(0,1fr) 310px;gap:14px}.stage{aspect-ratio:auto;min-height:445px}.controls{padding:15px}}
@media(prefers-reduced-motion:reduce){.bars b{animation:none}}
.place.placed::after{display:none}
.stage[data-toy=car] .bars{animation:none;align-items:center;height:15px;position:relative;width:19px}
.stage[data-toy=car] .bars::before{content:"";position:absolute;left:1px;right:0;top:4px;height:8px;border:1.5px solid var(--lime);border-radius:4px}
.stage[data-toy=car] .bars b{animation:none;width:4px;height:4px;position:absolute;bottom:0;left:3px}
.stage[data-toy=car] .bars b:nth-child(2){left:12px}
.stage[data-toy=car] .bars b:nth-child(3){display:none}
.drive-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;touch-action:none}
.drive-pad button{min-height:43px;border:1px solid #e4d8f8;border-bottom:3px solid #d7c6f3;border-radius:11px;background:#f3edff;color:#6037d2;font-size:24px;font-weight:800;line-height:1;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.drive-pad button[data-drive=forward]{grid-column:2}
.drive-pad button[data-drive=left]{grid-row:2;grid-column:1}
.drive-pad button[data-drive=reverse]{grid-row:2;grid-column:2}
.drive-pad button[data-drive=right]{grid-row:2;grid-column:3}
.drive-pad button:active,.drive-pad button.is-held{background:#6840d9;border-color:#5731c0;color:#fff}
#xr-drive-pad{position:absolute;left:50%;bottom:max(70px,calc(env(safe-area-inset-bottom) + 62px));transform:translateX(-50%);width:min(245px,80vw)}
#xr-overlay .drive-pad button{min-height:51px;background:#24153cde;border:1px solid #cfc2ea85;font-size:26px;padding:0}
#xr-overlay .drive-pad button:active,#xr-overlay .drive-pad button.is-held{background:#6840e6}
.stage[data-toy=car] .stage-hint{top:58%}
#mobile-drive-pad{display:none}
.camera-launch{margin-bottom:10px;display:flex;justify-content:flex-end}
.camera-launch .camera-button{width:auto;padding-inline:17px}
.car-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}
.car-actions button{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:44px;padding:3px;border:1px solid #e8e0f2;border-radius:9px;background:#fbf9ff;font-size:12px;font-weight:750}
.car-actions button[aria-pressed=true]{background:#eee5ff;border-color:#ad91ef;color:#542bc0}
.car-actions button:active{background:#6339db;color:#fff}
.car-actions button span{color:#663cdd;font-size:14px}
#xr-drive-pad{width:min(460px,calc(100% - 28px));bottom:max(72px,calc(env(safe-area-inset-bottom) + 63px))}
#xr-overlay .car-actions button{min-height:44px;padding:3px;background:#24153cde;border-color:#cfc2ea85;font-size:12px}
#xr-overlay .car-actions button[aria-pressed=true]{background:#6840e6}
#xr-overlay .car-actions span{color:#e3d6ff}
.xr-top{left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right))}
#xr-close{min-height:44px;min-width:44px}
.stage{scroll-margin-top:8px}
@media(max-width:760px){
  .top{height:calc(54px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))}
  .brand{font-size:17px}
  .brand-icon{width:32px;height:32px;font-size:21px}
  .help-button{min-height:44px;padding-inline:10px}
  main{margin:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));padding-bottom:max(18px,env(safe-area-inset-bottom))}
  .intro{padding:13px 1px 11px}
  h1{font-size:clamp(34px,9vw,52px);line-height:1.03}
  .intro p{font-size:13px;margin-top:5px;line-height:1.3}
  .studio{grid-template-columns:minmax(0,1fr);gap:10px}
  .camera-launch{margin-bottom:8px}
  .camera-launch .camera-button{width:100%;min-height:46px}
  .stage{min-height:0;height:clamp(205px,38svh,430px);border-radius:17px}
  .stage::before{background-position:center 66%}
  .stage-caption{font-size:12px;margin:6px 1px 0;min-height:18px}
  .stage-top,.stage-bottom{left:9px;right:9px}
  .stage-top{top:9px}
  .stage-bottom{bottom:9px}
  .stage-hint{font-size:12px}
  .stage-mode{padding:6px 9px}
  .now-playing{padding:6px 9px}
  .icon-button{width:44px;height:44px}
  #mobile-drive-pad{display:block;margin-top:8px}
  .drive-settings{display:none}
  .controls{border-radius:17px;padding:13px}
  .avatar{height:55px}
  .scale{margin-bottom:0}
  .scale input{height:36px;margin-top:0}
  .dances button{min-height:44px}
}
@media(max-width:760px), (pointer:coarse){
  .drive-pad{grid-template-columns:1fr 1fr .24fr 1fr 1fr;gap:5px}
  .drive-pad button[data-drive=left]{grid-area:1/1}
  .drive-pad button[data-drive=right]{grid-area:1/2}
  .drive-pad button[data-drive=reverse]{grid-area:1/4}
  .drive-pad button[data-drive=forward]{grid-area:1/5;background:var(--lime);border-color:#c5de66;color:#28311a}
  .drive-pad button[data-drive=forward]:is(:active,.is-held){background:#b7d849}
  .drive-pad button{min-height:53px}
}
@media(orientation:landscape) and (max-height:490px) and (max-width:1000px){
  .stage{min-height:215px;height:calc(100svh - 100px)}
  #xr-drive-pad{left:auto;right:max(14px,env(safe-area-inset-right));bottom:max(15px,env(safe-area-inset-bottom));transform:none;width:min(350px,53vw)}
  .xr-buttons{justify-content:flex-start;left:max(14px,env(safe-area-inset-left))}
}

.stage[data-mode=demo][data-toy=car] {
  background:radial-gradient(ellipse at 46% 45%,#435161 0%,#262f3c 37%,#131925 77%);
}
.stage[data-mode=demo][data-toy=car]::before {display:none}
.dashboard {
  position:absolute;top:16px;right:17px;min-width:121px;padding:9px 11px;
  border:1px solid #8695ac63;border-radius:12px;background:#101621ed;color:#eef6ff;
  font-variant-numeric:tabular-nums;pointer-events:none;
}
.stage[data-mode=camera] .dashboard {top:64px}
.speed-line {display:flex;align-items:baseline;gap:4px}
.speed-line strong {font-size:32px;line-height:1}
.speed-line span,.dashboard-meta {color:#aebed0;font-size:10px}
.speed-line b {margin-left:auto;color:#ffae78;font-size:13px}
.tach {height:3px;margin:6px 0;border-radius:8px;background:#475263;overflow:hidden}
.tach::before {content:"";display:block;width:var(--revs,10%);height:100%;background:linear-gradient(90deg,#fca967,#ff5831)}
.dashboard-meta {display:flex;justify-content:space-between;gap:9px;white-space:nowrap}
.xr-dashboard {position:absolute;top:62px;right:14px;padding:8px 11px;border-radius:10px;background:#101621ed;color:#fff}
.car-actions button .light-label {color:inherit;font-size:inherit}
.car-actions button:disabled {opacity:.52}
.car-specs {margin:18px 0 28px;padding:14px 18px;background:#fff;border:1px solid #e8e0f2;border-radius:15px}
.car-specs summary {cursor:pointer;font-weight:750}
.car-specs dl {display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:9px 14px}
.car-specs dl div {padding:8px 10px;background:#f7f5fa;border-radius:8px}
.car-specs dt {font-size:12px;color:#61576e}
.car-specs dd {margin:3px 0 0;font-size:14px}
.car-specs p {font-size:13px}
@media(max-width:760px) {
  .dashboard {top:8px;right:8px;min-width:104px;padding:7px 8px}
  .stage[data-mode=camera] .dashboard {top:53px}
  .speed-line strong {font-size:25px}
}
