:root{--bg:#101016;--panel:#19191f;--line:#34333f;--pink:#ff73bc;--purple:#b69aff;--muted:#95949f;--white:#f8f5fc}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--white);font-family:Arial,'Hiragino Kaku Gothic ProN','Noto Sans JP',sans-serif}button,a,input,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button{cursor:pointer;color:inherit;border:0}button:focus-visible,a:focus-visible{outline:2px solid var(--pink);outline-offset:4px}header{height:76px;margin:0 40px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff18}.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:18px;color:inherit;text-decoration:none;letter-spacing:.03em}.brand-icon{font-size:34px;color:var(--pink);line-height:1}.edition{font-size:9px;font-weight:400;color:#7c798b;border-left:1px solid #403a48;padding-left:16px;margin-left:10px;letter-spacing:2px}.icon-btn{background:#ffffff08;border:1px solid #ffffff20;border-radius:50px;padding:10px 15px;font-size:17px}.icon-btn span{font-size:10px;margin-left:5px}main{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:32px;max-width:1500px;margin:auto;padding:28px 40px;height:calc(100dvh - 76px);min-height:650px}#stage{position:relative;overflow:hidden;border-radius:8px;background:radial-gradient(ellipse at 50% 45%,#393149,#17141e 65%);min-width:0}#stage>canvas,#stage>svg{position:absolute;inset:0;width:100%;height:100%;z-index:1}.stage-copy{position:absolute;top:38px;left:34px;z-index:2;pointer-events:none}.eyebrow{font-size:9px;letter-spacing:2.4px;font-weight:bold;color:var(--muted)}h1{font-size:clamp(32px,4.5vw,64px);line-height:1.18;letter-spacing:-.045em;margin:18px 0 14px;font-weight:900}h1 em{font-style:normal;color:var(--pink)}.stage-copy p{font-size:11px;color:#ada5b7;letter-spacing:.12em}.stage-label{position:absolute;right:24px;top:28px;z-index:3;font-size:9px;letter-spacing:1.5px;color:#cbc2d8;display:flex;gap:8px;align-items:center}i{display:inline-block}.stage-label i,.live-top i{width:5px;height:5px;background:var(--pink);border-radius:50%}.stage-stamp{position:absolute;bottom:88px;left:30px;color:#ffffff22;font-weight:900;font-size:25px;line-height:1.02;letter-spacing:-1px;z-index:2;pointer-events:none}.stage-stamp strong{color:#ff9dcb77}.stage-bottom{position:absolute;bottom:20px;left:24px;right:24px;display:flex;align-items:center;justify-content:space-between;z-index:3;font-size:10px;color:#bfb6ce}.small-btn{background:#ffffff0d;border:1px solid #ffffff25;border-radius:30px;font-size:9px;padding:9px 12px;white-space:nowrap}#composer{display:flex;flex-direction:column;justify-content:center;min-width:0}.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}h2{font-size:22px;margin:9px 0 0;letter-spacing:-.04em}.pen-icon{font-size:32px;color:var(--pink)}.slots{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:24px}.slot{background:#202027;border:1px solid #3a3844;border-radius:7px;height:65px;position:relative;padding:7px;transition:.2s}.slot.active{border-color:var(--pink);background:#ff73bc10;box-shadow:0 0 0 1px var(--pink)}.slot span{position:absolute;left:7px;top:5px;font-size:9px;color:#a09aa9}.slot svg{width:100%;height:100%;padding:9px 5px 0}.draw-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:11px;font-weight:bold}.draw-top button{background:none;font-size:10px;color:var(--muted)}.drawing{position:relative;background:#222129;border:1px solid #39363f;border-radius:9px;height:236px;overflow:hidden;touch-action:none;background-image:radial-gradient(#ffffff15 .8px,transparent .8px);background-size:16px 16px}#draw{position:absolute;inset:0;width:100%;height:100%;z-index:2;touch-action:none;cursor:crosshair}.draw-cross{position:absolute;pointer-events:none;background:#ffffff07}.horizontal{height:1px;width:100%;top:50%}.vertical{width:1px;height:100%;left:50%}.draw-corner{position:absolute;left:12px;bottom:10px;font-size:7px;letter-spacing:1.5px;color:#696575}#drawHint{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px;gap:8px;color:#a59aaf;pointer-events:none}#drawHint span{font-size:35px;color:var(--pink)}#drawHint small{font-size:10px;color:#77717f}#drawHint.hidden{display:none}.line-info{display:flex;justify-content:space-between;gap:5px;align-items:center;font-size:8px;margin:12px 0 17px;color:var(--muted)}.line-info>span:first-child{display:flex;align-items:center;gap:5px;color:#eac7df;letter-spacing:1px}.line-info i{width:5px;height:5px;border-radius:50%;background:var(--pink)}.presets{display:flex;gap:6px}.presets button{flex:1;background:#ffffff04;border:1px solid #3c3845;border-radius:5px;padding:9px 3px;font-size:10px;color:#c4bacd}.presets button:hover{background:#ff73bc16;border-color:#a5678e}.settings{display:flex;gap:14px;margin:22px 0;align-items:center;justify-content:space-between;font-size:10px;color:#aaa0b4}.settings label{display:flex;gap:8px;align-items:center}input[type=range]{width:92px;accent-color:var(--pink);height:3px}output{width:22px;color:#e8d7e9;font-variant-numeric:tabular-nums}select{background:#26232e;color:#e7d8e9;font-size:9px;padding:5px;border:1px solid #3a3445;border-radius:4px;max-width:86px}.play-btn{background:var(--pink);color:#241022;border-radius:7px;padding:19px 16px;font-size:16px;font-weight:800;display:flex;justify-content:center;align-items:center;gap:14px;flex-wrap:wrap;transition:.2s;width:100%}.play-btn:hover{background:#ffa1d2;transform:translateY(-1px)}.play-btn small{display:block;flex-basis:100%;font-size:9px;letter-spacing:.04em;font-weight:500;margin-top:-5px;opacity:.7}.help{text-align:center;font-size:9px;color:#797280;margin:14px 0 0}#countdown{position:absolute;inset:0;display:grid;place-items:center;font-size:130px;font-weight:900;color:#fff;z-index:5;pointer-events:none;text-shadow:0 0 50px #ff7dd6}#liveCaption{position:absolute;bottom:22%;left:0;right:0;text-align:center;z-index:3;font-size:14px;letter-spacing:4px;font-weight:800;color:#ffb0db;pointer-events:none}#performance{position:fixed;inset:0;z-index:5;pointer-events:none}.live-top{display:flex;justify-content:space-between;align-items:center;padding:25px 30px;font-size:10px;letter-spacing:2px}.live-top>span{display:flex;gap:9px;align-items:center}.live-top button{pointer-events:auto;background:#1a132bc0;border:1px solid #ffffff30;padding:12px 17px;border-radius:30px;font-size:11px;letter-spacing:0}.live-bottom{position:absolute;bottom:24px;width:min(400px,80%);left:50%;transform:translateX(-50%)}#liveSlots{display:flex;justify-content:center;gap:10px;margin-bottom:14px}#liveSlots .slot{width:70px;height:50px;background:#15101dcc}.progress{height:3px;background:#ffffff22;border-radius:2px}.progress i{display:block;height:100%;background:var(--pink);width:0;box-shadow:0 0 12px var(--pink)}.live-info{display:flex;justify-content:space-between;margin-top:9px;font-size:9px;letter-spacing:1px;color:#b7a1c2}body.performing header,body.performing #composer,body.performing .stage-copy,body.performing .stage-stamp,body.performing .stage-label,body.performing .stage-bottom{display:none}body.performing main{display:block;padding:0;height:100dvh;min-height:0;max-width:none}body.performing #stage{height:100dvh;border-radius:0}#result{position:fixed;inset:0;background:#0d0815a8;backdrop-filter:blur(12px);z-index:8;display:grid;place-items:center}#result[hidden],#performance[hidden]{display:none}.result-card{background:#1c1625e8;border:1px solid #5d3e65;padding:36px;width:min(400px,90vw);text-align:center;border-radius:15px;box-shadow:0 30px 150px #0008}.result-card h2{font-size:26px;margin:16px 0}#resultLines{display:flex;height:70px;gap:10px;align-items:center}#resultLines svg{width:25%;height:60px}#resultText{font-size:12px;color:#b6a4c1;line-height:1.8;margin:15px 0 25px}.result-actions{display:flex;justify-content:space-between;margin-top:20px}.result-actions button{background:none;font-size:11px;color:#d3b5dc}#toast{position:fixed;bottom:35px;left:50%;transform:translate(-50%,20px);padding:12px 22px;background:#f5dbf0;color:#29162c;border-radius:30px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;z-index:20;white-space:nowrap}#toast.show{opacity:1;transform:translate(-50%,0)}#loadError{position:absolute;inset:40% 10%;z-index:9;text-align:center;font-size:15px}
@media(min-width:1500px){.drawing{height:290px}}@media(max-width:1000px){main{grid-template-columns:minmax(0,1fr) 320px;gap:20px;padding:24px}.stage-copy{left:24px;top:35px}header{margin:0 24px}.stage-copy h1{font-size:42px}.stage-stamp{font-size:22px}.edition{display:none}}@media(max-width:700px){header{height:55px;margin:0 18px}.brand{font-size:14px}.brand-icon{font-size:28px}.icon-btn{padding:6px 10px;font-size:15px}main{display:flex;flex-direction:column;height:auto;min-height:0;padding:12px;gap:16px}#stage{height:46dvh;min-height:290px;flex-shrink:0}.stage-copy{top:22px;left:20px}.eyebrow{font-size:7px;letter-spacing:1.5px}.stage-copy h1{font-size:32px;margin:12px 0 8px}.stage-copy p{font-size:8px;max-width:120px}.stage-label{top:18px;right:14px;font-size:7px}.stage-stamp{display:none}.stage-bottom{left:16px;right:14px;bottom:12px;font-size:8px}.small-btn{font-size:8px;padding:6px 8px}#composer{padding:0 6px 12px}.panel-heading{margin-bottom:12px}.panel-heading h2{font-size:18px;margin-top:5px}.pen-icon{font-size:25px}.slots{margin-bottom:14px;gap:8px}.slot{height:47px}.drawing{height:180px}.line-info{margin:9px 0 12px}.settings{margin:16px 0}.play-btn{padding:15px;font-size:15px}.help{margin-top:12px}.live-top{padding:20px}.live-bottom{bottom:25px}#liveCaption{bottom:24%}body.performing #stage{min-height:0}.result-card{padding:28px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto;transition:none!important}}

#shareUrl{width:100%;height:62px;background:#110e19;color:#dac4e4;border:1px solid #634a70;border-radius:6px;padding:8px;font-size:10px;margin:12px 0}
@media(max-width:700px){main{padding:10px;gap:12px}#stage{height:35dvh;min-height:200px;max-height:300px}#composer{padding:0 6px 8px}.panel-heading{display:none}.slots{margin-bottom:10px}.slot{height:40px}.drawing{height:clamp(110px,18dvh,152px)}.line-info{margin:6px 0 10px}.line-info>span:last-child{font-size:8px}.settings{margin:10px 0}.help{display:none}.play-btn{padding:13px;gap:10px}.play-btn small{font-size:8px}.stage-copy{top:16px;left:16px}.stage-copy h1{font-size:29px}.stage-copy p{display:none}.stage-bottom>span{display:none}.stage-bottom{justify-content:flex-end}.stage-label{font-size:6px}body.performing #stage{height:100dvh;max-height:none}}

:root{--bg:#101213;--panel:#1b1e1e;--line:#373d3b;--pink:#d4f36b;--purple:#94b8cc;--muted:#929b96;--white:#eff2eb}body{background:#101213}.slots{grid-template-columns:repeat(2,1fr)}.slot{height:72px;border-radius:2px;background:#1b201f}.slot.active{background:#d4f36b0a}.slot span{letter-spacing:1.6px;font-size:9px}.slot svg{padding-top:15px}.drawing{border-radius:2px;background-color:#1a1f1e;border-color:#39413d}.play-btn{border-radius:2px;background:#d4f36b;color:#172014}.play-btn:hover{background:#e2ff94}#stage{border-radius:2px;background:radial-gradient(ellipse at 50% 45%,#333b38,#111514 70%)}h1{font-family:Arial,sans-serif;font-weight:900;letter-spacing:-.08em;font-size:clamp(40px,5vw,76px)}.stage-stamp{color:#c6dac51c}.stage-stamp strong{color:#d4f36b55}.presets button{border-radius:2px}.result-card{background:#1b211fee;border-color:#647152;border-radius:3px}#liveCaption{color:#d4f36b}.live-top i{background:#d4f36b}.stage-label i{background:#d4f36b}.brand-icon{color:#d4f36b}#liveSlots .slot{width:105px}.stage-copy p{color:#a2afa5}@media(max-width:700px){.slot{height:46px}.stage-copy h1{font-size:35px}.slots{gap:10px}}

/* Bright playful edition */
:root{--bg:#fffaf0;--panel:#fff;--line:#24364b;--pink:#ed5945;--purple:#52bcb1;--muted:#61707c;--white:#24364b}body{color:#24364b;background:#fffaf0;font-family:'Hiragino Maru Gothic ProN','Yu Gothic',Arial,sans-serif}header{border-bottom:2px solid #24364b}.brand-icon{color:#ed5945}.icon-btn{background:#fff;border:2px solid #24364b;color:#24364b;box-shadow:2px 3px 0 #24364b;border-radius:50px}.edition,.stage-stamp,.slots{display:none}#stage{background:#f9efcf;border:2px solid #24364b;border-radius:24px;box-shadow:5px 6px 0 #24364b}.stage-copy{top:30px;left:30px}.stage-copy .eyebrow{color:#61707c;font-size:11px;letter-spacing:.08em}h1{font-family:inherit;font-size:clamp(36px,4.3vw,62px);line-height:1.2;letter-spacing:-.05em;text-shadow:2px 2px 0 #fff;font-weight:900}h1 em{color:#ed5945}.stage-copy p{color:#61707c}.stage-label{color:#354658;font-weight:800;background:#fffdf4;padding:9px 12px;border:2px solid #24364b;border-radius:50px}.stage-label i{background:#51b8a3}.stage-bottom{color:#354658}.small-btn{border:2px solid #24364b;color:#24364b;background:#fffdf4;font-weight:700}.panel-heading{margin-bottom:28px}.eyebrow{color:#d94c3e}.panel-heading h2{font-size:25px}.pen-icon{color:#ed5945;transform:rotate(10deg)}.draw-top{font-size:14px}.draw-top button{color:#61707c;font-weight:700}.drawing{height:260px;background-color:#fff;border:2px solid #24364b;border-radius:18px;box-shadow:4px 4px 0 #e6ddbf;background-image:radial-gradient(#bfc9c7 1px,transparent 1px);background-size:18px 18px}#drawHint{color:#61707c;font-weight:700;font-size:17px}#drawHint span{color:#ed5945;font-size:42px}#drawHint small{color:#81918d;font-size:11px}.draw-corner{color:#81918d;font-size:9px;letter-spacing:0}.line-info{color:#61707c;font-size:10px}.line-info>span:first-child{color:#d94c3e}.presets{gap:8px}.presets button{border:2px solid #24364b;border-radius:50px;background:#fff;color:#24364b;font-weight:700;box-shadow:0 3px 0 #24364b;padding:10px 4px}.presets button:nth-child(2){background:#d8f0e7}.presets button:nth-child(3){background:#ffe6c2}.presets button:hover{background:#fff1bd;transform:translateY(-2px)}.settings{color:#61707c;font-weight:700}output{color:#24364b}select{color:#24364b;background:#fff;border:2px solid #24364b;border-radius:8px;font-size:10px}.play-btn{background:#ffd452;color:#24364b;border:2px solid #24364b;border-radius:50px;box-shadow:0 5px 0 #24364b;font-size:20px;font-weight:900}.play-btn:hover{background:#ffe286;transform:translateY(-2px)}.play-btn:active{box-shadow:0 1px 0 #24364b;transform:translateY(4px)}.play-btn small{font-size:10px;color:#5b593d}.help{color:#61707c}#countdown{color:#ed5945;text-shadow:4px 4px 0 #fff}#liveCaption{color:#d94c3e;text-shadow:1px 1px 0 white;letter-spacing:.08em}.live-top{color:#24364b;font-weight:800}.live-top button{color:#24364b;background:#fffdf4;border:2px solid #24364b}.live-top i{background:#ed5945}.live-info{color:#24364b;font-weight:700}.progress{background:#24364b20;height:5px}#liveSlots>svg{width:90px;height:55px;background:#fffdf4;border:2px solid #24364b;border-radius:12px}.result-card{background:#fffaf0;border:3px solid #24364b;border-radius:24px;box-shadow:7px 8px 0 #24364b}#result{background:#24364b55}#resultText,.result-actions button{color:#61707c}#resultLines{justify-content:center}#resultLines svg{width:70%}#toast{background:#ffd452;color:#24364b;border:2px solid #24364b;box-shadow:0 3px 0 #24364b}#shareUrl{color:#24364b;background:white;border-color:#24364b}
@media(max-width:700px){#stage{border-radius:18px;box-shadow:3px 4px 0 #24364b;height:40dvh;max-height:340px}.stage-copy{left:18px;top:18px}.stage-copy h1{font-size:31px}.stage-copy .eyebrow{font-size:8px}.stage-label{padding:5px 8px;font-size:7px;top:15px;right:10px}.drawing{height:clamp(145px,23dvh,190px)}.draw-top{font-size:12px}.play-btn{font-size:18px;padding:12px}.presets button{font-size:10px;padding:8px 3px}.line-info{font-size:9px}#composer{padding-top:5px}.settings{margin:13px 0}.panel-heading{display:none}body.performing #stage{max-height:none;border:0;border-radius:0;box-shadow:none}}

.slots{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:18px}.slot{height:72px;border:2px solid #24364b;border-radius:14px;background:#fff;color:#24364b;box-shadow:0 3px 0 #24364b}.slot span{font-size:14px;font-weight:900;color:var(--hand-color);left:12px;top:8px;letter-spacing:0}.slot svg{padding:19px 8px 0}.slot.active{border-color:var(--hand-color);background:#fff4df;box-shadow:0 3px 0 var(--hand-color)}.panel-heading{margin-bottom:18px}.live-hand{width:100px;background:#fffdf4;border:2px solid #24364b;border-radius:12px;padding:6px 10px;text-align:center}.live-hand span{font-size:10px;font-weight:800}.live-hand svg{width:100%;height:36px}#resultLines svg{width:45%}.help{line-height:1.7}
@media(max-width:700px){#stage{height:34dvh;max-height:290px}.slots{margin-bottom:12px;gap:10px}.slot{height:51px}.slot span{font-size:12px;top:6px;left:9px}.slot svg{padding:15px 4px 0}.drawing{height:clamp(130px,20dvh,165px)}body.performing #stage{height:100dvh;max-height:none}}

/* Keep the dancer and the drawn gestures dominant. */
.stage-copy,.stage-label,.stage-bottom,.panel-heading,.line-info,.presets,.settings,.help,.draw-corner,.draw-cross,.play-btn small,.stage-stamp{display:none!important}header{height:52px}.brand{font-size:16px}.icon-btn{padding:7px 12px}main{height:calc(100dvh - 52px);min-height:540px;grid-template-columns:minmax(0,1fr) 310px;gap:22px;padding:20px 28px}#stage{min-height:0}.drawing{height:clamp(180px,33dvh,340px)}.slots{margin-bottom:20px}.draw-top{margin-bottom:10px}.play-btn{margin-top:18px;padding:17px}.slot{height:68px}.slot svg{padding-top:19px}.live-top>span,#liveCaption,.live-info>#beatLabel{display:none!important}.live-top{justify-content:flex-end;padding:16px}.live-top button{padding:10px 15px}.live-bottom{width:min(600px,92vw);bottom:16px}#liveSlots{gap:12px;margin-bottom:12px}.live-hand{width:50%;height:clamp(105px,19dvh,180px);display:flex;flex-direction:column;align-items:stretch;padding:9px 12px;background:#fffdf4f5;box-shadow:0 3px 0 #24364b}.live-hand span{text-align:left;font-size:12px;flex-shrink:0;margin-bottom:4px}.live-hand svg{width:100%;height:0;min-height:0;flex:1}.live-info{justify-content:flex-end;margin-top:6px}.live-hand polyline{stroke-width:3.5}.progress{height:4px}#drawHint small{display:none}#drawHint{font-size:15px}
@media(max-width:700px){header{height:42px;margin:0 14px}.brand{font-size:14px}.brand-icon{font-size:24px}.icon-btn{padding:4px 10px;font-size:14px}main{height:calc(100dvh - 42px);min-height:600px;display:flex;flex-direction:column;padding:10px 12px 14px;gap:12px}#stage{height:auto;min-height:235px;max-height:none;flex:1}#composer{flex:none;padding:0 2px}.slots{margin-bottom:8px;gap:10px}.slot{height:40px;border-radius:10px}.slot span{top:9px;left:9px;font-size:12px}.slot svg{padding:2px 4px 2px 48px}.draw-top{margin-bottom:6px;height:18px;font-size:11px}.draw-top button{font-size:11px}.drawing{height:clamp(105px,16dvh,145px);border-radius:14px}#drawHint span{font-size:25px}#drawHint{gap:3px;font-size:13px}.play-btn{margin-top:10px;padding:11px;font-size:18px}.live-bottom{bottom:14px;width:92vw}.live-hand{height:clamp(110px,20dvh,175px);padding:8px 10px}.live-top{padding:14px}body.performing main{height:100dvh;min-height:0;padding:0}body.performing #stage{height:100dvh;max-height:none;min-height:0}}
@media(max-width:700px) and (max-height:700px){main{min-height:0}.drawing{height:100px}#stage{min-height:190px}.live-hand{height:105px}}

/* Give the drawing surface roughly half the editing screen. */
main{grid-template-columns:minmax(0,1fr) minmax(360px,1fr)}.drawing{height:48dvh;max-height:none}#composer{justify-content:center}
@media(max-width:700px){main{min-height:0}#stage{min-height:145px;flex:1}.drawing{height:45dvh;max-height:none;min-height:0}#composer{flex:none}body.performing main{display:block}body.performing #stage{height:100dvh;min-height:0}}
@media(max-width:700px) and (max-height:650px){#stage{min-height:120px}.drawing{height:42dvh}.slot{height:34px}.slot span{top:6px}.play-btn{padding:9px}}
/* Choreography result */
#result{overflow-y:auto;padding:18px 0}.result-card{padding:24px;width:min(430px,90vw);margin:auto}.score-head{display:flex;align-items:baseline;justify-content:center;gap:8px;margin:6px 0}.score-head strong{font-size:86px;line-height:1;font-weight:900;letter-spacing:-5px;color:#ed5945}.score-head>span{font-size:14px;font-weight:800}.score-head>b{align-self:center;display:grid;place-items:center;width:49px;height:49px;border:2px solid #24364b;border-radius:50%;background:#ffd452;font-size:30px;margin-left:10px;transform:rotate(9deg)}.result-card h2{font-size:21px;margin:12px 0 20px}#scoreParts{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px;text-align:left}.score-part{display:grid;grid-template-columns:1fr auto;gap:6px;font-size:11px}.score-part small{font-weight:400;color:#61707c;font-size:9px}.score-part>i{grid-column:1/-1;height:6px;border-radius:6px;overflow:hidden;background:#24364b16}.score-part em{display:block;height:100%;border-radius:6px;background:#208c9f}#resultLines{height:54px;margin-top:14px}#resultLines svg{height:48px}#resultText{font-size:12px;margin:8px 0 18px}.result-actions{gap:12px}#confetti{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:12}@media(max-height:650px){.result-card{padding:18px}.score-head strong{font-size:64px}.result-card h2{margin:8px 0 14px}#resultLines{display:none}.result-actions{margin-top:14px}}

/* Existing KSK games' shared header. */
header.common-header{display:grid;height:70px;margin:0;background:#fff;color:#29333b;padding:10px 6px;border-bottom:1px solid #e5e7eb;grid-template-columns:104px 1fr 100px;gap:6px;align-items:center}
.common-header a{color:inherit;text-decoration:none}.common-header b{text-align:center;font-size:14px;white-space:nowrap}.common-header .game-list{background:#bc3e25;color:#fff;border:1px solid #a8321e;border-radius:9px;box-shadow:0 4px 0 #8f2e1f;padding:12px 10px;font-size:15px;font-weight:800;text-align:center;white-space:nowrap}.common-header .brand-logo{display:block;width:100px;height:26px;justify-self:end}.brand-art{display:block;width:100px;height:26px;background:#fff url('header-reference.png') no-repeat -308px -138px;background-size:410.4px 921.6px}
#stage>#sound{position:absolute;right:14px;top:14px;z-index:4;font-size:14px;padding:6px 10px;box-shadow:0 2px 0 #24364b}body.performing #stage>#sound{display:none}body.performing header.common-header{display:none}
@media(min-width:701px){main{height:calc(100dvh - 70px)}}
@media(max-width:700px){header.common-header{grid-template-columns:93px 1fr 92px;gap:3px}.common-header b{font-size:12px}.common-header .game-list{font-size:13px}.common-header .brand-logo{transform:scale(.92);transform-origin:right center}#stage>#sound{right:9px;top:9px;font-size:12px}}
/* Fit editing controls inside the mobile viewport, including browser safe area. */
@media(max-width:700px){
 body:not(.performing) main{height:calc(100dvh - 70px);min-height:0;padding:8px 12px calc(16px + env(safe-area-inset-bottom,0px));gap:10px}
 body:not(.performing) #stage{flex:0 0 clamp(120px,26dvh,230px);min-height:0;height:auto}
 body:not(.performing) #composer{flex:1;min-height:0;display:flex;justify-content:flex-start;padding:0 2px}
 body:not(.performing) .slots{flex-shrink:0;margin-bottom:8px}
 body:not(.performing) .draw-top{flex-shrink:0}
 body:not(.performing) .drawing{flex:1;min-height:65px;height:auto;max-height:34dvh}
 body:not(.performing) #play{flex-shrink:0;margin-top:10px;padding:11px;min-height:48px}
}
@media(max-width:700px) and (max-height:560px){body:not(.performing) #stage{flex-basis:95px}body:not(.performing) .slot{height:34px}body:not(.performing) #play{padding:8px;min-height:44px}}

.share-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px}.share-actions button{border:2px solid #293a4a;border-radius:16px;padding:12px 10px;background:#ffdc59;font-size:13px;font-weight:800}.share-actions #shareX{background:#293a4a;color:white}.result-card{max-height:94dvh;overflow-y:auto}.shared-dance{position:absolute;bottom:12px;left:12px;padding:6px 10px;background:#fffbefed;color:#293a4a;border-radius:12px;font-size:11px;font-weight:700;z-index:5}

/* A compact spin option keeps the drawing and play-button positions intact. */
.draw-top{gap:8px;flex-wrap:nowrap;height:auto;min-height:32px}.rotation-mode{display:inline-flex;align-items:center;gap:4px;margin-left:auto;white-space:nowrap;font-size:12px;font-weight:700;cursor:pointer;min-height:32px}.rotation-mode input{width:17px;height:17px;margin:0;accent-color:#ed5945}.rotation-mode input:focus-visible{outline:2px solid #208c9f;outline-offset:3px}@media(max-width:400px){.draw-top{gap:5px}.rotation-mode{font-size:11px}}

/* Compact visible tempo and turn-step controls; drawing space flexes on mobile. */
.settings{display:flex!important;flex-shrink:0;gap:10px;margin:6px 0 0;min-height:34px;color:#61707c;font-size:11px}
.settings .mode-select{display:none}
.settings .tempo-control{flex:1;min-width:0;gap:5px;white-space:nowrap}
.settings #tempo{flex:1;min-width:35px;max-width:100px;width:60px;height:28px;margin:0}
.settings #bpm{min-width:23px;font-variant-numeric:tabular-nums}
.settings .rotation-mode{flex:none;margin:0;gap:4px;font-size:11px;min-height:34px}
.draw-top{min-height:18px}
