/* Keep native wheel pages at full scale inside the studio window. */
body[data-screen-tool=let-splay]>#mms-home-spacer{display:none!important}
body[data-screen-tool=let-splay].harmony-wheel-active>header{padding:5px 12px!important}
body[data-screen-tool=let-splay] #frame{width:100%!important;height:100%!important;transform:none!important}

html:has(body[data-play-wheel]){height:100%;overflow:hidden}
body[data-play-wheel]{box-sizing:border-box;height:100dvh;min-height:0!important;margin:0;padding:8px!important;overflow:hidden!important;display:flex;flex-direction:column;gap:8px}
body[data-play-wheel] .play-wheel-heading{flex:none;text-align:center;padding:0 105px}
body[data-play-wheel] h1{font-size:22px!important;line-height:1.25;margin:0!important}
body[data-play-wheel] .subtitle,body[data-play-wheel] .sub{font-size:12px;margin:3px 0 0;letter-spacing:0}
body[data-play-wheel] .sound-toggle{position:fixed;inset:8px auto auto 8px;min-height:28px;padding:4px 8px;font-size:12px;z-index:30}
.play-wheel-stage{flex:1;min-height:0;width:100%;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;justify-items:center;gap:12px;direction:ltr;overflow:clip}
.play-wheel-stage.has-tools{grid-template-columns:minmax(0,1fr) 240px}
body[data-play-wheel] .play-wheel-stage>.wheel-container,body[data-play-wheel] .play-wheel-stage>.wheel-wrap{flex:none;width:var(--play-wheel-size,300px)!important;height:var(--play-wheel-size,300px)!important;min-height:0;max-width:none;max-height:none;margin:0!important;aspect-ratio:1;align-self:center;justify-self:center}
body[data-play-wheel] #wheel{width:100%;height:100%;display:block}
.play-wheel-disc{position:absolute;inset:0;overflow:clip;border-radius:50%}
.play-wheel-tools{min-width:0;width:100%;display:flex;flex-direction:column;gap:6px;align-items:center;direction:rtl}
html[dir=ltr] .play-wheel-tools{direction:ltr}
body[data-play-wheel] .play-wheel-tools>.result{margin:0;min-height:0;gap:3px}
body[data-play-wheel] .result .sig{font-size:38px}
body[data-play-wheel] .beats{margin:0;max-width:100%;flex-wrap:wrap}
body[data-play-wheel] .count{margin:0;height:24px;font-size:20px}
body[data-play-wheel] .controls{box-sizing:border-box;width:100%;margin:0;padding:8px;gap:8px}
body[data-play-wheel] .controls .row{flex-wrap:wrap;justify-content:center;gap:6px}
body[data-play-wheel] .controls label{font-size:12px}
body[data-play-wheel] .controls input[type=range]{max-width:120px}
body[data-play-wheel] .controls select{font-size:12px;max-width:130px}
body[data-play-wheel] .controls .act{font-size:13px;padding:7px 9px}
body[data-play-wheel] .history{margin:0;font-size:11px}
body[data-play-wheel] .progression-section{box-sizing:border-box;width:100%;margin:0;padding:10px}
body[data-play-wheel] .length-buttons{flex-wrap:wrap;gap:4px}
body[data-play-wheel] .length-btn{width:32px;height:32px;font-size:15px;padding:3px}
body[data-play-wheel] .progression-info{font-size:12px;line-height:1.4;margin:6px 0}
body[data-play-wheel] .progression-display{flex-wrap:wrap;gap:4px;margin:6px 0 0}
body[data-play-wheel] .chord-cell{min-width:36px;padding:6px;font-size:20px}
body[data-play-wheel] .chord-connector{font-size:15px}

/* All roulette discs share the same viewport slot; shapes retain their native layout. */
body[data-screen-tool=let-splay][data-uniform-wheel]>header{box-sizing:border-box;flex:none;flex-wrap:nowrap;min-height:44px;height:44px;max-height:44px;padding:5px 12px!important}
body[data-play-wheel][data-uniform-wheel] .play-wheel-heading{box-sizing:border-box;flex:0 0 48px;min-height:48px;height:48px;display:flex;flex-direction:column;justify-content:center;overflow:hidden}
body[data-play-wheel][data-uniform-wheel] .play-wheel-stage{grid-template-columns:minmax(0,1fr) 240px;grid-template-rows:minmax(0,1fr)}
.play-wheel-slot{box-sizing:border-box;width:100%;height:100%;min-width:0;min-height:0;display:grid;place-items:center}
body[data-uniform-wheel] .play-wheel-slot>:is(.wheel-container,.wheel-wrap){box-sizing:border-box;position:relative;flex:none;width:var(--play-wheel-size,300px)!important;height:var(--play-wheel-size,300px)!important;min-height:0;max-width:none;max-height:none;margin:0!important;aspect-ratio:1;align-self:center;justify-self:center}
body[data-uniform-wheel] .play-wheel-tools{box-sizing:border-box;height:100%;min-height:0;justify-content:center;overflow:auto}
body[data-uniform-wheel] .play-wheel-tools>.hint{display:none}
body[data-uniform-wheel] .play-wheel-tools>.buttons{display:flex;flex-wrap:wrap;justify-content:center;direction:ltr;margin:0;gap:6px}
@media(max-width:560px){body[data-play-wheel][data-uniform-wheel] .play-wheel-stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 150px;gap:8px}body[data-uniform-wheel] .play-wheel-tools{justify-content:flex-start}}

/* The shapes tool already has a native stage and a control panel. */
body[data-play-wheel=shapes] .page{box-sizing:border-box;flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:0;gap:8px}
body[data-play-wheel=shapes] .masthead{gap:3px;flex:none}
body[data-play-wheel=shapes] .eyebrow{font-size:11px;margin:0}
body[data-play-wheel=shapes] .lede{display:none}
body[data-play-wheel=shapes] .stage{flex:1;min-height:0;width:100%;grid-template-columns:minmax(0,1fr) 270px;gap:12px;align-items:center}
body[data-play-wheel=shapes] .wheel-wrap{box-sizing:border-box;padding:8px;min-width:0;min-height:0;width:100%;height:100%;justify-content:center;gap:0}
body[data-play-wheel=shapes] #wheel{width:var(--play-wheel-size,300px);height:var(--play-wheel-size,300px);max-width:100%;flex:none}
body[data-play-wheel=shapes] .hint{display:none}
body[data-play-wheel=shapes] .panel{min-width:0;min-height:0;max-height:100%;gap:8px}
body[data-play-wheel=shapes] .panel-block{min-width:0;padding:8px}
body[data-play-wheel=shapes] .panel-block h2{font-size:14px;margin:0 0 5px}
body[data-play-wheel=shapes] .shape-btns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
body[data-play-wheel=shapes] .shape-btns button{min-height:28px;padding:4px;font-size:12px}
body[data-play-wheel=shapes] .custom-n{margin-top:6px;gap:5px;font-size:12px}
body[data-play-wheel=shapes] .custom-n input{min-width:0;max-width:75px}
body[data-play-wheel=shapes] .custom-n button,body[data-play-wheel=shapes] .danger-btn,body[data-play-wheel=shapes] #resetAll{font-size:11px;padding:4px 6px}
body[data-play-wheel=shapes] .field{font-size:12px;gap:5px;margin:5px 0}
body[data-play-wheel=shapes] .field select{font-size:12px;padding:4px;min-width:0}
body[data-play-wheel=shapes] .field>*{min-width:0;max-width:100%}
body[data-play-wheel=shapes] .field input[type=range]{width:100%}
body[data-play-wheel=shapes] .shape-list{margin:0;max-height:160px;overflow:auto}
body[data-play-wheel=shapes] .shape-list .empty{font-size:11px;padding:4px}
body[data-play-wheel=shapes] .shape-row{padding:6px}
body[data-play-wheel=shapes] .shape-row-controls{gap:5px;margin-top:5px}
body[data-play-wheel=shapes] footer{flex:none;margin:0;padding:0;font-size:10px;line-height:1.2}

@media(max-width:720px) and (min-width:561px){
 .play-wheel-stage.has-tools{grid-template-columns:minmax(0,1fr) 210px;gap:8px}
 body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr) 230px;gap:8px}
 body[data-play-wheel] .play-wheel-heading{padding-inline:90px}
 body[data-play-wheel] h1{font-size:19px!important}
}
@media(max-width:560px){
 body[data-play-wheel]{padding:6px!important;gap:6px}
 body[data-play-wheel]:has(.sound-toggle){padding-top:38px!important}
 body[data-play-wheel] .play-wheel-heading{padding:0}
 body[data-play-wheel] h1{font-size:18px!important}
 body[data-play-wheel] .subtitle,body[data-play-wheel] .sub{font-size:11px}
 .play-wheel-stage.has-tools{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:6px}
 .play-wheel-tools{gap:4px}
 body[data-play-wheel=meter] .play-wheel-tools{display:grid;grid-template-columns:1fr 1fr;gap:4px}
 body[data-play-wheel=meter] .controls{grid-column:1/-1;grid-row:2;padding:5px;gap:4px}
 body[data-play-wheel=meter] .beats,body[data-play-wheel=meter] .count{grid-column:2;grid-row:1}
 body[data-play-wheel=meter] .beats{align-self:start}
 body[data-play-wheel=meter] .count{align-self:end;font-size:16px;height:20px}
 body[data-play-wheel=meter] .history{grid-column:1/-1;justify-self:center}
 body[data-play-wheel] .progression-section{padding:6px}
 body[data-play-wheel] .section-label{margin-bottom:5px;font-size:13px}
 body[data-play-wheel] .progression-info{margin:3px 0;font-size:11px}
 body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:6px}
 body[data-play-wheel=shapes] .eyebrow,body[data-play-wheel=shapes] footer{display:none}
 body[data-play-wheel=shapes] .panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 body[data-play-wheel=shapes] .panel-block{padding:5px}
 body[data-play-wheel=shapes] .panel-block:first-child{grid-column:1/-1}
 body[data-play-wheel=shapes] .panel-block h2{font-size:12px;margin-bottom:3px}
 body[data-play-wheel=shapes] .shape-btns button{min-height:24px;padding:2px;font-size:11px}
 body[data-play-wheel=shapes] .shape-btns{margin-bottom:4px}
 body[data-play-wheel=shapes] .custom-n{margin-top:4px}
 body[data-play-wheel=shapes] .block-head{gap:3px;flex-wrap:wrap}
 body[data-play-wheel=shapes] .field{font-size:11px;margin:3px 0}
 body[data-play-wheel=shapes] .field select{font-size:11px;padding:2px}
 body[data-play-wheel=shapes] .shape-list{max-height:100px}
}
@media(max-height:520px) and (min-width:561px){
 body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr) 280px;gap:8px}
 body[data-play-wheel=shapes] .panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-play-wheel=shapes] .panel-block:first-child{grid-column:1/-1}
 body[data-play-wheel=shapes] .block-head{gap:3px;flex-wrap:wrap}
 body[data-play-wheel=shapes] .shape-btns{margin-bottom:4px}
}
@media(max-height:400px) and (min-width:561px){
 body[data-play-wheel]{gap:4px;padding:5px!important}
 body[data-play-wheel] h1{font-size:17px!important}
 body[data-play-wheel] .subtitle,body[data-play-wheel] .sub{display:none}
 body[data-play-wheel] .controls{padding:5px;gap:4px}
 body[data-play-wheel] .play-wheel-tools{gap:3px}
 body[data-play-wheel] .history{font-size:10px}
 body[data-play-wheel=shapes] .eyebrow,body[data-play-wheel=shapes] footer{display:none}
 body[data-play-wheel=shapes] .panel{gap:4px}
 body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr) 280px;gap:8px}
 body[data-play-wheel=shapes] .panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-play-wheel=shapes] .panel-block:first-child{grid-column:1/-1}
 body[data-play-wheel=shapes] .panel-block{padding:4px}
 body[data-play-wheel=shapes] .panel-block h2{font-size:12px;margin-bottom:3px}
 body[data-play-wheel=shapes] .shape-btns{margin-bottom:4px}
 body[data-play-wheel=shapes] .shape-btns button{min-height:22px;font-size:10px;padding:2px}
 body[data-play-wheel=shapes] .custom-n{margin-top:4px}
 body[data-play-wheel=shapes] .block-head{gap:3px;flex-wrap:wrap}
 body[data-play-wheel=shapes] .field{font-size:11px;margin:3px 0}
 body[data-play-wheel=shapes] .field select{font-size:11px;padding:2px}
 body[data-play-wheel=shapes] .block-head{margin-bottom:3px}
 body[data-play-wheel=shapes] .danger-btn{min-height:20px;padding:2px;font-size:10px;line-height:1.1}
 body[data-play-wheel=shapes] .shape-list{max-height:40px}
 body[data-play-wheel=shapes] .shape-list .empty{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:10px;padding:2px}
}

/* Shapes: controls stay visible; active shapes use pages instead of an inner scroll. */
body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr) 360px!important;align-items:stretch!important}
body[data-play-wheel=shapes] .panel{display:flex!important;flex-direction:column!important;height:100%;max-height:100%;gap:6px!important;overflow:hidden}
body[data-play-wheel=shapes] .panel>[hidden],body[data-play-wheel=shapes] .panel [hidden]{display:none!important}
body[data-play-wheel=shapes] .panel>.panel-block{flex:1;min-height:0;display:flex;flex-direction:column;gap:5px;margin:0;overflow:hidden}
body[data-play-wheel=shapes] .shape-session-tools{flex:none;display:flex;flex-direction:column;gap:4px;padding:5px 7px;border:1px solid #64748b;border-radius:9px;background:#202d3d}
.shape-session-transport{display:flex;align-items:center;gap:6px;min-width:0}
button.shape-play-together{flex:1;min-width:0;background:#078654!important;border-color:#36cf94!important;color:#f0fff8!important;min-height:36px;font-size:13px;padding:6px 9px}
button.shape-stop-together{background:#a53142!important;border-color:#dc8490!important;color:#fff0f3!important;min-height:36px;font-size:12px;padding:6px 8px}
.shape-session-tools button:disabled{opacity:.4;cursor:default}
.shape-volume-control{display:grid;grid-template-columns:auto 42px;grid-template-rows:auto auto;align-items:center;gap:1px 5px;font:11px/1.2 system-ui;min-width:72px;direction:ltr}
.shape-volume-control>span{grid-column:1;grid-row:1;text-align:center}.shape-volume-control>output{grid-column:1;grid-row:2;text-align:center;font:11px/1.2 system-ui}
button.shape-volume-knob{grid-column:2;grid-row:1/3;position:relative;box-sizing:border-box;width:40px;height:40px;min-height:40px!important;border:2px solid #98b9ed!important;border-radius:50%;padding:0!important;background:radial-gradient(circle at 35% 28%,#52647e,#202c40 68%)!important;touch-action:none;cursor:ns-resize;flex:none}
.shape-volume-knob i{position:absolute;left:calc(50% - 1.5px);bottom:50%;width:3px;height:14px;border-radius:2px;background:#a2d3fb;transform-origin:50% 100%;transform:rotate(var(--volume-angle,54deg));pointer-events:none}
.shape-session-secondary{display:flex;align-items:center;justify-content:space-between;gap:7px;min-width:0}.shape-session-secondary>.field{margin:0!important;flex:1;min-width:0;gap:5px!important}.shape-session-secondary .field>span{font-size:11px}.shape-session-secondary select{width:100%;min-width:0!important;max-width:100%;height:27px;padding:2px!important;font:11px system-ui}.shape-session-secondary #resetAll{min-height:27px;padding:3px 6px!important;white-space:nowrap;font-size:10px!important}
.shape-session-secondary>.field{flex:1 1 180px;min-width:120px!important}.shape-session-secondary #resetAll{flex:0 1 auto;width:auto!important;max-width:47%}
.shape-panel-tabs{display:flex;flex:none;gap:5px}.shape-panel-tabs button{flex:1;min-width:0;min-height:30px;font:600 12px system-ui;padding:4px}.shape-panel-tabs button[aria-selected=true]{background:#49385f!important;border-color:#bd9ad9!important;color:#f8efff!important}
body[data-play-wheel=shapes] .panel-block h2{display:none}.shape-panel-tabs+ .panel-block .shape-ring-field{margin:1px 0 6px}
body[data-play-wheel=shapes] .block-head{flex:none;margin:0!important;min-height:26px;align-items:center}
body[data-play-wheel=shapes] .shape-list{display:grid!important;grid-template-columns:repeat(var(--shape-columns,2),minmax(0,1fr));grid-auto-rows:108px;align-content:start;flex:1;min-height:0;max-height:none!important;overflow:hidden!important;gap:6px!important;direction:inherit}
body[data-play-wheel=shapes] .shape-row{box-sizing:border-box;display:grid;grid-template-rows:24px 32px 20px;gap:5px!important;height:108px;min-width:0;padding:6px!important;border-width:1px!important;border-inline-end-width:1px!important;overflow:hidden}
body[data-play-wheel=shapes] .shape-row-top{gap:3px;min-width:0}.shape-row-top>.dot{display:none}
body[data-play-wheel=shapes] .shape-name{min-width:0;padding:0!important;font-size:11px!important;white-space:nowrap;overflow:hidden;gap:3px;justify-content:flex-start}
body[data-play-wheel=shapes] .shape-name .shape-icon{width:20px;height:20px}
body[data-play-wheel=shapes] .shape-row .deg{min-width:20px;max-width:25px;font-size:10px;line-height:1.2}
body[data-play-wheel=shapes] .shape-row.selected .speed-val{color:#38250c!important}
body[data-play-wheel=shapes] .shape-row .icon-btn{flex:none;min-width:20px;width:20px;min-height:22px;height:22px;padding:1px!important;font-size:12px}
body[data-play-wheel=shapes] .shape-row .icon-btn{background:#633341!important;border-color:#c97889!important;color:#ffe5eb!important}
body[data-play-wheel=shapes] .shape-row .icon-btn:hover{background:#a83951!important}
body[data-play-wheel=shapes] .shape-row{grid-template-rows:24px 30px 28px;gap:3px!important}
body[data-play-wheel=shapes] .speed-row{display:grid;grid-template-columns:minmax(0,1fr) 48px;grid-template-rows:10px 16px;gap:1px 3px}
body[data-play-wheel=shapes] .speed-row>.shape-speed-label{grid-column:1/-1;font:9px/10px system-ui;white-space:nowrap;color:inherit}
body[data-play-wheel=shapes] .speed-row input[type=range]{width:100%;grid-column:1;grid-row:2}
body[data-play-wheel=shapes] .speed-row .speed-val{grid-column:2;grid-row:2;font-size:9px;min-width:0;white-space:nowrap}
body[data-play-wheel=shapes] .shape-row-controls{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:4px!important;margin:0!important;min-width:0}
body[data-play-wheel=shapes] .shape-ring-choice{width:100%;height:30px;min-width:0;padding:3px!important;font-size:10px;overflow:hidden;text-overflow:ellipsis}
body[data-play-wheel=shapes] button.shape-auto-toggle{min-height:30px;height:30px;min-width:0;padding:3px 6px!important;font-size:11px;white-space:nowrap}
body[data-play-wheel=shapes] .speed-row{min-width:0;gap:3px}.speed-row input[type=range]{width:0;min-width:0;flex:1;direction:ltr}.speed-row .speed-val{min-width:36px;font-size:10px;direction:ltr}
.shape-pages{display:flex;align-items:center;justify-content:center;gap:10px;flex:none;min-height:27px;direction:ltr}.shape-pages button{width:30px;min-height:26px;padding:1px!important;font:20px/1 system-ui}.shape-pages span{font:11px system-ui}
body[data-play-wheel=shapes] .shape-btns{flex:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
body[data-play-wheel=shapes] .shape-btns button{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:4px;min-width:0;min-height:38px;padding:4px!important;font-size:11px!important;line-height:1.15;overflow:hidden}
.shape-btns .shape-icon{width:24px;height:24px}.shape-btns button>span{min-width:0;max-width:100%;overflow-wrap:break-word;white-space:normal;line-height:1.15}
body[data-play-wheel=shapes] .shape-ring-field{font-size:12px}.shape-ring-field select{height:31px;max-width:65%;font-size:12px}
body[data-play-wheel=shapes] .custom-n{display:flex;align-items:center;gap:5px;min-width:0;margin:3px 0 0;font-size:11px}body[data-play-wheel=shapes] #nCustom{direction:ltr;min-width:0;max-width:none;width:0;flex:1;touch-action:pan-y}
body[data-play-wheel=shapes] .panel[data-shape-tab=add] .shape-session-secondary{display:none}
@media(max-width:560px){
 body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 350px!important;gap:6px}
 body[data-play-wheel=shapes] .panel>.panel-block{grid-column:auto!important}
}
@media(max-height:520px) and (min-width:561px){
 body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr) 350px!important}
 body[data-play-wheel=shapes] .shape-btns button{min-height:27px;font-size:10px!important;padding:2px!important;grid-template-columns:19px minmax(0,1fr)}
 body[data-play-wheel=shapes] .shape-btns .shape-icon{width:19px;height:19px}
 body[data-play-wheel=shapes] .shape-ring-field{margin:0}.shape-ring-field select{height:26px;padding:2px!important;font-size:10px}
}

body[data-play-wheel=shapes] a.shape-rhythm-link{display:inline-flex!important;align-items:center;align-self:flex-start;gap:5px;padding:2px 7px;border:1px solid #6c88ac;border-radius:6px;background:#263a50;color:#d8ebff;font:11px/1.3 system-ui;text-decoration:none;white-space:nowrap}
a.shape-rhythm-link svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5}
a.shape-rhythm-link:hover{background:#35536f}a.shape-rhythm-link:focus-visible{outline:2px solid #bda0ed;outline-offset:2px}

button.shape-more-tools{display:none}
@media(max-height:400px) and (min-width:561px){
 body[data-play-wheel=shapes] .shape-session-tools{position:relative;padding:3px 5px;overflow:visible;z-index:3}
 body[data-play-wheel=shapes] button.shape-more-tools{display:block;flex:none;min-height:30px;width:27px;padding:0!important;font:22px/1 system-ui;border-color:#98acd0;color:#e7f0fc}
 body[data-play-wheel=shapes] .shape-session-transport{gap:4px}
 body[data-play-wheel=shapes] button.shape-play-together,body[data-play-wheel=shapes] button.shape-stop-together{min-height:32px;padding:4px!important;font-size:11px}
 body[data-play-wheel=shapes] .shape-volume-control{min-width:63px;grid-template-columns:auto 34px;gap:1px 3px}
 body[data-play-wheel=shapes] button.shape-volume-knob{width:34px;height:34px;min-height:34px!important}
 body[data-play-wheel=shapes] .shape-volume-knob i{height:12px}
 body[data-play-wheel=shapes] .shape-session-secondary{display:none!important;position:absolute;inset:calc(100% + 3px) -1px auto;padding:8px;border:1px solid #8d83b8;border-radius:8px;background:#26364a;box-shadow:0 5px 14px #0005}
 body[data-play-wheel=shapes] .shape-session-tools[data-options-open=true] .shape-session-secondary{display:flex!important}
 body[data-play-wheel=shapes] .shape-panel-tabs button{min-height:26px;padding:3px;font-size:11px}
 body[data-play-wheel=shapes] .panel-block>.block-head{display:none}
 body[data-play-wheel=shapes] .panel>.panel-block{padding:5px}
 body[data-play-wheel=shapes] .shape-list{grid-auto-rows:90px}
 body[data-play-wheel=shapes] .shape-row{height:90px;grid-template-rows:20px 24px 26px;gap:2px!important;padding:4px!important}
 body[data-play-wheel=shapes] .shape-ring-choice,body[data-play-wheel=shapes] button.shape-auto-toggle{height:24px;min-height:24px;font-size:10px}
 body[data-play-wheel=shapes] .shape-pages{min-height:24px}
}

/* Selected shapes use a soft lavender surface; the canvas keeps its vivid lines. */
body[data-play-wheel=shapes] .shape-row.selected{background:#3b3d56!important;border-color:#a99bc8!important;color:#efedf8!important;box-shadow:inset 0 0 0 1px #d5c8ed22!important}
body[data-play-wheel=shapes] .shape-row.selected .shape-name,body[data-play-wheel=shapes] .shape-row.selected .deg,body[data-play-wheel=shapes] .shape-row.selected .switch,body[data-play-wheel=shapes] .shape-row.selected .speed-val{color:#e8e3f5!important}
body[data-play-wheel=shapes] .shape-row.selected .shape-icon{color:#c8b9e8!important}
.shape-session-sync{display:flex;align-items:center;gap:7px;min-height:25px;flex:none}
.panel[data-shape-tab=replace] .shape-panel-tabs,.panel[data-shape-tab=replace] .shape-session-secondary{display:none!important}
.shape-replace-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;color:#e8e3f5;font:12px/1.3 "Segoe UI",sans-serif}
body[data-play-wheel=shapes] .shape-replace-head button{min-height:28px;padding:3px 9px!important;font-size:11px;border-color:#a99bc8;background:#3b3d56;color:#e8e3f5}
body[data-play-wheel=shapes] .shape-btns button[aria-pressed=true]{border-color:#c8b9e8!important;background:#3b3d56!important;color:#efedf8!important;box-shadow:inset 0 0 0 1px #c8b9e8}
body[data-play-wheel=shapes] .shape-name::after{content:"⌄";font:14px/1 system-ui;color:#c8b9e8;margin-inline-start:1px;flex:none}
body[data-play-wheel=shapes] .shape-name:focus-visible{outline:2px solid #c8b9e8;outline-offset:1px}
@media(max-height:400px) and (min-width:561px){
 .panel[data-shape-tab=replace] .shape-session-sync{display:none}
 .panel[data-shape-tab=replace] .shape-replace-head{margin-bottom:2px}
 body[data-play-wheel=shapes] .panel[data-shape-tab=replace] .shape-btns{margin-bottom:0}
}
body[data-play-wheel=shapes] button.shape-sync-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:1;min-height:25px;padding:3px 7px!important;font:600 11px/1.2 "Segoe UI",sans-serif;border:1px solid #9a8ab9!important;background:#3e354f!important;color:#ede7f8!important}
body[data-play-wheel=shapes] button.shape-sync-toggle[aria-pressed=true]{background:#28564e!important;border-color:#8cc9b9!important;color:#e4fcf2!important}
.shape-sync-toggle svg{width:14px;height:14px;flex:none}.shape-sync-status{font:10px/1.2 "Segoe UI",sans-serif;color:#c3cde0;white-space:nowrap}
@media(max-height:400px) and (min-width:561px){body[data-play-wheel=shapes] .panel{gap:4px!important}body[data-play-wheel=shapes] .shape-list{grid-auto-rows:86px}body[data-play-wheel=shapes] .shape-row{height:86px;grid-template-rows:20px 24px 26px;gap:2px!important}.shape-session-sync{min-height:22px}body[data-play-wheel=shapes] button.shape-sync-toggle{min-height:22px;padding:2px 5px!important}.shape-sync-status{font-size:9px}}

/* Give the drawing more room and let active cards own their surfaces. */
body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr) 300px!important;gap:8px}
body[data-play-wheel=shapes] .panel>.panel-block{padding:0!important;border:0!important;background:transparent!important;box-shadow:none}
body[data-play-wheel=shapes] .masthead>.shape-rhythm-link{display:none!important}
body[data-play-wheel=shapes] .shape-session-tools{position:relative;z-index:5;overflow:visible;gap:4px;padding:5px}
body[data-play-wheel=shapes] .shape-session-transport{direction:ltr;flex-direction:row-reverse;gap:5px}
body[data-play-wheel=shapes] .shape-session-tools .shape-more-tools{display:block!important;flex:none;width:28px;min-height:34px;padding:0!important;font-size:22px}
body[data-play-wheel=shapes] .shape-session-secondary{display:none!important;position:absolute;inset:calc(100% + 4px) 0 auto;z-index:8;padding:8px;border:1px solid #8d83b8;border-radius:8px;background:#26364a;box-shadow:0 5px 14px #0005}
body[data-play-wheel=shapes] .shape-session-tools[data-options-open=true] .shape-session-secondary{display:flex!important}
body[data-play-wheel=shapes] .panel[data-shape-tab=replace] .shape-session-tools .shape-session-secondary,body[data-play-wheel=shapes] .panel[data-shape-tab=replace] .shape-more-tools{display:none!important}
body[data-play-wheel=shapes] .shape-session-secondary a.shape-band-rhythm{display:inline-flex!important;flex:1;min-width:0;white-space:normal;font-size:10px}
body[data-play-wheel=shapes] .shape-panel-tabs{direction:ltr;flex-direction:row-reverse}
body[data-play-wheel=shapes] .panel .shape-list{grid-auto-rows:132px!important;gap:0 6px!important}
body[data-play-wheel=shapes] .panel .shape-list:has(>.shape-row:only-child){grid-template-columns:minmax(0,1fr)!important}
body[data-play-wheel=shapes] .panel .shape-list .shape-row{height:126px!important;grid-template-rows:24px 28px 26px 26px!important;padding:5px!important;gap:2px!important}
body[data-play-wheel=shapes] .shape-row-top{direction:ltr;flex-direction:row-reverse}
body[data-play-wheel=shapes] .shape-row-controls{direction:ltr;grid-template-columns:auto minmax(0,1fr)}
body[data-play-wheel=shapes] .shape-row-controls>.shape-ring-choice{grid-column:2;grid-row:1;height:28px}
body[data-play-wheel=shapes] .shape-row-controls>.shape-auto-toggle{grid-column:1;grid-row:1;height:28px;min-height:28px}
body[data-play-wheel=shapes] .shape-band-controls{direction:ltr;flex-direction:row-reverse}
body[data-play-wheel=shapes] .shape-play-mode{height:26px;min-height:26px}
body[data-play-wheel=shapes] .shape-row .shape-sound-button{width:24px;height:24px;min-width:24px;min-height:24px}
body[data-play-wheel=shapes] .speed-row{direction:ltr}
@media(min-width:561px) and (max-width:920px){body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr) 260px!important}}
@media(max-width:560px){body[data-play-wheel=shapes] .stage{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 300px!important}}
@media(max-height:400px) and (min-width:561px){body[data-play-wheel=shapes] .panel .shape-list{grid-auto-rows:116px!important}body[data-play-wheel=shapes] .panel .shape-list .shape-row{height:110px!important;grid-template-rows:20px 24px 24px 24px!important;padding:4px!important}}
