*{box-sizing:border-box}body{margin:0;background:#f7f5fb;color:#343049;font:15px system-ui,sans-serif}button,input,select{font:inherit}button{cursor:pointer;background:white;color:inherit;border:1px solid #e0dce9;border-radius:10px;padding:9px 13px}button:hover{background:#eee8ff}button:disabled{opacity:.5;cursor:wait}.primary{background:#7254cf;color:white;border-color:#7254cf;font-weight:650}.active{background:#e7defc;border-color:#8061cf}header{display:flex;align-items:center;gap:20px;padding:20px 4%;border-bottom:1px solid #e5e0ed;background:#fff}header a{text-decoration:none;color:#6450a4;font-size:24px;font-weight:800}header a span{font-weight:450}nav{margin-left:auto;display:flex;gap:8px}.pill{font-size:10px;letter-spacing:2px;background:#f1eaff;border-radius:20px;padding:8px 12px}main{max-width:1600px;margin:auto;padding:24px 4%}.heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}small{font-size:10px;letter-spacing:2px;color:#897eaa}h1{font-size:34px;margin:8px 0;font-weight:750}h1 em{font-family:Georgia,serif;color:#8061cf}p{color:#82798f;line-height:1.5;margin:8px 0}h2{font-size:18px;margin:0 0 8px}.studio{display:grid;grid-template-columns:240px 1fr;border:1px solid #e2ddea;border-radius:20px;background:white;overflow:hidden;box-shadow:0 12px 45px #55427708}aside{padding:20px;border-right:1px solid #ebe5f2}aside h2 span{float:right;color:#c09b37}.tabs{display:flex;flex-wrap:wrap;gap:5px;margin:16px 0}.tabs button{font-size:12px;padding:7px}#create{width:100%}#stable{max-height:370px;overflow:auto;margin:14px 0}.asset{border:1px solid #e4ddec;border-radius:12px;padding:9px;margin-bottom:9px}.asset canvas{width:100%;height:86px;background:#faf8fe;border-radius:8px}.asset strong{display:block;font-size:13px;margin:5px 0}.asset button{font-size:11px;padding:5px 7px;margin-right:3px}.asset small{display:block;letter-spacing:0;margin:4px 0}.editor{min-width:0}.toolbar{padding:12px;display:flex;align-items:center;flex-wrap:wrap;gap:6px;border-bottom:1px solid #eee8f5}.toolbar button{font-size:12px}.toolbar select{max-width:94px}input[type=color]{width:34px;height:32px;padding:2px;border:0;background:none}#stage{position:relative;height:480px;background:#fcfbff;overflow:hidden}#level{width:100%;height:100%;touch-action:none;display:block;outline:none}#labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}#labels button{position:absolute;pointer-events:auto;touch-action:none;padding:3px 8px;font-size:11px;border-radius:20px;background:#fffdf3;white-space:nowrap}#hud{position:absolute;left:15px;top:15px;pointer-events:none;background:#fff9;padding:6px 12px;border-radius:20px;font-weight:700}#hud:empty{display:none}#finish{position:absolute;inset:25% 20%;text-align:center;background:#fff;border:2px solid #e9ddff;border-radius:20px;padding:30px;box-shadow:0 12px 35px #50405022}#finish h2{font-size:28px}.map-head{display:flex;justify-content:space-between;padding:12px;font-size:10px;letter-spacing:1px;color:#8c7f9e}#map{width:100%;height:90px;display:block;background:#f6f2fc;cursor:pointer;touch-action:none}.touch{display:flex;justify-content:center;gap:8px;padding:12px}.touch button{touch-action:none;font-size:12px}footer{font-size:12px;color:#857b90;display:flex;justify-content:space-between;gap:20px;margin-top:12px}#status{min-height:22px;color:#685091}details{font-size:12px;border-top:1px solid #eee;padding-top:10px}details input{width:100%;margin-top:5px}dialog{border:1px solid #ddd2f0;border-radius:20px;padding:25px;max-width:95vw;color:inherit}dialog::backdrop{background:#31244866}#pad{display:block;width:480px;max-width:100%;height:auto;background:#fcfaff;border:1px dashed #c4b3df;margin:12px 0;touch-action:none}.draw-tools,.actions{display:flex;gap:8px;margin-top:12px;justify-content:flex-end}label input{border:1px solid #ddd;border-radius:6px;padding:6px}.level-row{display:flex;gap:15px;align-items:center;padding:12px;border-bottom:1px solid #eee}.level-row span{flex:1}@media(max-width:850px){main{padding:15px}header{flex-wrap:wrap}.pill{display:none}nav{gap:3px}nav button{font-size:12px}.studio{grid-template-columns:170px 1fr}aside{padding:12px}h1{font-size:25px}#stage{height:400px}.map-head span{display:none}}@media(max-width:600px){.studio{display:flex;flex-direction:column}aside{border-right:0;border-bottom:1px solid #eee}#stable{display:flex;gap:8px;max-height:210px}.asset{min-width:140px}.tabs{margin:8px 0}aside>p,aside>h2{display:none}#create{width:auto}.heading{align-items:flex-start}.heading p{display:none}header{padding:12px}header a{font-size:20px}#stage{height:360px}footer{display:block}.touch{gap:3px}.touch button{padding:10px}#finish{inset:20% 8%}h1{font-size:23px}}

.segment-toolbar{display:flex;padding:0 12px;gap:8px}.segment-toolbar #segments{display:flex;flex:1;min-width:0;overflow:auto;gap:4px}.segment{display:flex;min-width:90px;flex-basis:0;border:1px solid #ddd;border-radius:8px}.segment button{border:0;background:transparent;font-size:11px;padding:7px 4px;flex:1}.segment .segment-handle{flex:0;cursor:ew-resize;touch-action:none;background:#dfd3f7}.segment-actions{display:flex;gap:8px;align-items:center;padding:8px 12px;font-size:11px;color:#82798f}.segment-actions button{font-size:11px;padding:5px 8px}

.creation-tabs{display:flex;gap:8px;margin:14px 0}.creation-tabs [aria-selected=true]{background:#e7defc;border-color:#8061cf}#drawing{max-height:92vh;overflow:auto;width:540px}#describe-pane textarea{display:block;width:100%;resize:vertical;border:1px solid #c9b8e0;border-radius:10px;padding:12px;font:inherit;margin:8px 0 12px}#describe-pane p{font-size:12px}#drawing-status{font-size:13px;color:#685091;max-width:480px}#restore-drawing{font-size:12px;margin-bottom:8px}

#labels .object-label{position:absolute;pointer-events:auto;display:flex;align-items:flex-start;z-index:2}#labels .object-label>button,#labels .object-actions button{position:static}#labels .object-actions{display:none;background:#fffdf3;padding:3px;gap:3px;border:1px solid #d3c5ea;border-radius:12px;box-shadow:0 4px 12px #35244a22}#labels .object-label:hover,#labels .object-label:focus-within{z-index:5}#labels .object-label:hover .object-actions,#labels .object-label:focus-within .object-actions{display:flex}#labels .resize-handle{border:2px solid #fff;background:#7251bb;color:white;width:25px;height:25px;padding:0;border-radius:6px;cursor:nwse-resize;z-index:4;box-shadow:0 0 0 1px #7251bb}#labels .object-label>button{cursor:grab}.toolbar button:disabled{opacity:.4;cursor:default}

.walkthrough-toggle{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #ded5eb;border-radius:12px;background:white;font-size:13px;cursor:pointer}.walkthrough-toggle input{accent-color:#8061cf;width:18px;height:18px}

#play-error{color:#a02946;font-weight:650;max-width:360px}.touch button{min-width:64px;min-height:52px;font-size:15px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.touch button:active{background:#7254cf;color:white}body.playing aside,body.playing .toolbar,body.playing .map-head,body.playing .segment-toolbar,body.playing .segment-actions,body.playing #map{display:none}body.playing .studio{display:block}body.playing #labels{display:none}body.playing .heading>div:first-child{display:none}body.playing .heading{justify-content:flex-end}body.playing #stage{height:calc(100svh - 250px);min-height:260px;max-height:720px}body.playing .touch{position:sticky;bottom:0;background:#fff;z-index:10;padding-bottom:max(12px,env(safe-area-inset-bottom));justify-content:space-between;touch-action:none}body.playing .touch button{min-width:16%;font-weight:700}body.playing .touch button[data-key=jump],body.playing .touch button[data-key=shoot]{background:#e7defc}@media(max-width:700px){body.playing main{padding:10px}body.playing header{display:none}body.playing .heading{margin-bottom:10px}body.playing .heading>div{display:flex;flex-wrap:wrap;gap:5px}body.playing #stage{height:calc(100svh - 190px)}.touch{gap:4px}.touch button{padding:9px 6px;min-width:0;font-size:13px}}

#profile-dialog,#share-dialog{width:480px}#profile-dialog input,#share-url{width:100%;padding:10px;margin:10px 0;border:1px solid #d6c9e9;border-radius:8px}#profile-error,#share-error{color:#a02946}#share-dialog button{margin:5px}nav{flex-wrap:wrap}
