/* One bar, four spacious beats. Artwork remains sharp on tablets and projectors. */
html[data-theme] .body-console{background:var(--ui-panel);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:26px;padding:24px;margin-top:20px}.body-score-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:22px 0 16px}.body-score-heading h2{font-size:clamp(22px,3vw,30px);line-height:1.2;margin:8px 0;color:var(--ui-text)}.body-score-heading p{color:var(--ui-muted);margin:0;font-size:15px}.body-score-heading .eyebrow{color:var(--ui-accent)}.body-time-signature{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:28px;line-height:.95;gap:4px;background:var(--ui-soft);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:16px;min-width:56px;height:72px;flex:none}.body-time-signature b:first-child{border-bottom:2px solid var(--ui-border);padding-bottom:4px}
.body-pulse-monitor{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;background:var(--ui-soft);border-radius:16px;margin-bottom:18px}.body-pulse-monitor>span{font-size:14px;font-weight:800;color:var(--ui-muted)}.body-count-lamps{display:flex;gap:8px;flex:none}.body-count-lamps>span{display:grid;place-items:center;width:40px;height:40px;background:var(--ui-panel);border:1px solid var(--ui-border);border-radius:50%;color:var(--ui-text);font-size:19px;font-weight:900}.body-count-lamps>span.active{background:#9be3c4;border-color:#459779;color:#143f37;box-shadow:0 0 0 4px #78dbb82b}
html[data-theme] .body-rhythm{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;position:relative;padding:10px 2px;overflow:visible}html[data-theme] .body-rhythm .body-beat{border:2px solid var(--ui-border);border-radius:22px;background:var(--ui-soft);color:var(--ui-text);padding:0;overflow:hidden;position:relative;box-shadow:none}.body-rhythm .body-beat.editing{border-color:#d87ba8;box-shadow:0 0 0 3px #d87ba822}.body-rhythm .body-beat.current{border-color:#70d7af;box-shadow:0 0 0 4px #70d7af35}.body-rhythm .body-beat.hit{background:var(--ui-selected)}.body-rhythm .body-beat.missed{border-color:#e6a19b}html[data-theme] .body-rhythm .body-rhythm-choice{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;min-height:255px;padding:12px 7px 14px;border:0;border-radius:20px;background:transparent!important;color:var(--ui-text)!important;box-shadow:none;gap:0}.body-rhythm-choice .beat-number{position:static;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:var(--ui-panel);font-size:14px;font-weight:850;margin-bottom:8px;color:var(--ui-muted);align-self:center}.body-rhythm-choice .move-picture{display:flex;width:100%;height:76px;align-items:center;justify-content:center;gap:0;margin:0}.body-rhythm-choice .move-picture img{display:block;width:76px;height:76px;max-width:100%;object-fit:contain}.body-rhythm-choice .move-picture.double-move img{width:50%;height:auto;max-height:76px}.body-move-caption{font-size:13px;font-weight:800;color:var(--ui-muted);margin-top:5px;line-height:1.2}.body-note-figure{display:block;width:100%;height:78px;flex:none;color:var(--ui-text);overflow:visible}.body-rhythm-choice>strong{font-size:13px;letter-spacing:.5px;color:var(--ui-text);line-height:1.2}.body-beat.current .beat-number{background:#9be3c4;color:#143f37}.body-rhythm .body-playhead{top:5px;bottom:5px;background:#e985b3;box-shadow:0 0 0 2px var(--ui-panel);width:3px;z-index:3}.body-rhythm .body-playhead:before{border-top-color:#e985b3}.body-rhythm .body-playhead[hidden]{display:none}
.body-beat-tools{background:var(--ui-soft);border:1px solid var(--ui-border);border-radius:22px;padding:18px;margin-top:18px}.body-edit-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.body-edit-title>strong{font-size:17px;color:var(--ui-text)}.body-edit-title>strong b{color:var(--ui-accent)}.body-edit-title button{min-height:44px;padding:8px 12px;font-size:12px;background:var(--ui-panel);color:var(--ui-muted);border:1px solid var(--ui-border);border-radius:13px}.body-edit-groups{display:grid;grid-template-columns:1.1fr 1fr;gap:24px}.body-edit-groups fieldset{border:0;padding:0;margin:0;min-width:0}.body-edit-groups legend{font-size:13px;font-weight:800;color:var(--ui-muted);margin-bottom:10px}.body-move-options,.body-note-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.body-note-options{grid-template-columns:repeat(3,minmax(0,1fr))}.body-beat-tools button[data-body-move],.body-beat-tools button[data-body-token]{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100px;min-width:0;padding:8px 4px;gap:4px;background:var(--ui-panel);color:var(--ui-text);border:2px solid var(--ui-border);border-radius:16px;font-size:12px;box-shadow:0 3px 0 #0000000d}.body-move-options img{width:52px;height:52px}.body-note-options .body-note-figure{height:56px;max-width:90px}.body-beat-tools button[aria-pressed=true]{background:var(--ui-selected);border-color:var(--ui-accent);box-shadow:0 3px 0 color-mix(in srgb,var(--ui-accent) 45%,transparent)}.body-beat-tools button:hover,.body-rhythm-choice:hover{filter:brightness(1.06)}.body-beat-tools button:focus-visible,.body-rhythm-choice:focus-visible{outline:3px solid var(--ui-accent);outline-offset:2px}.body-draft-state{font-size:12px;color:var(--ui-muted);margin:14px 2px 0;min-height:20px}.body-console .body-bottom{border-top:1px solid var(--ui-border);padding-top:20px;margin-top:15px}.body-console #activity-status{color:var(--ui-text);font-weight:800}.body-console .activity-controls{gap:10px;flex-wrap:wrap}.body-console .activity-controls>button{min-height:48px;padding:10px 18px}.body-console .tempo-control{color:var(--ui-muted)}.body-console .tempo-control select{min-height:48px;background:var(--ui-soft);color:var(--ui-text);border:1px solid var(--ui-border);border-radius:12px;padding:8px}.body-console .preference-music{background:var(--ui-soft);color:var(--ui-text)}.body-console .preference-music h3{color:var(--ui-text)}.body-console .preference-music p{color:var(--ui-muted)}
@media(max-width:760px){.body-edit-groups{grid-template-columns:1fr;gap:18px}.body-move-options img{width:48px;height:48px}.body-beat-tools button[data-body-move],.body-beat-tools button[data-body-token]{min-height:88px}.body-note-options .body-note-figure{height:45px}.body-console .body-bottom{align-items:flex-start}.body-console .activity-tap{min-width:100px;min-height:110px}}
@media(max-width:520px){html[data-theme] .body-console{padding:16px 11px;border-radius:21px}.body-score-heading{margin-top:18px}.body-score-heading p{font-size:13px}.body-time-signature{min-width:45px;height:63px;font-size:24px}.body-pulse-monitor{flex-wrap:wrap;gap:10px;padding:12px;justify-content:center}.body-pulse-monitor>span{width:100%;text-align:center;font-size:13px}.body-count-lamps>span{width:36px;height:36px}.body-rhythm .body-rhythm-choice{min-height:190px!important;padding:9px 2px 12px!important}.body-rhythm-choice .move-picture,.body-rhythm-choice .move-picture img{height:49px;width:100%}.body-rhythm-choice .move-picture.double-move img{width:50%;height:auto}.body-move-caption{font-size:10px;min-height:24px;text-align:center;padding:0 1px}.body-rhythm .body-note-figure{height:55px}.body-rhythm-choice>strong{font-size:10px}html[data-theme] .body-rhythm{gap:6px}.body-rhythm .body-beat{border-radius:15px!important}.body-rhythm-choice .beat-number{width:24px;height:24px;font-size:12px}.body-beat-tools{padding:13px 9px;border-radius:18px}.body-edit-title{gap:6px}.body-edit-title>strong{font-size:14px}.body-edit-title button{font-size:10px;max-width:145px;line-height:1.3}.body-move-options,.body-note-options{gap:6px}.body-beat-tools button[data-body-move]{font-size:10px}.body-console .body-bottom{flex-direction:column;align-items:stretch;gap:14px}.body-console .activity-controls>button{flex:1;font-size:13px;padding:9px 12px}.body-console .activity-tap{width:100%;min-height:76px;border-radius:20px;font-size:27px}.body-console .activity-tap small{font-size:12px}.body-draft-state{font-size:11px}.body-stage .body-avatar{position:relative;top:auto}}
/* Keep the SVG's coordinate system proportional so the playhead hits noteheads exactly. */
.body-rhythm .body-note-figure{width:100%;max-width:120px;height:auto;aspect-ratio:120/88}.body-rhythm-choice .move-picture{max-width:120px}.body-rhythm-choice .move-picture.double-move img{width:50%}
/* Selection and playback states take priority over the global theme reset. */
html[data-theme] .body-console{background:var(--ui-panel)!important}
html[data-theme] .body-rhythm .body-beat.editing{border-color:#d87ba8!important;box-shadow:0 0 0 3px #d87ba822}
html[data-theme] .body-rhythm .body-beat.current{border-color:#70d7af!important;box-shadow:0 0 0 4px #70d7af35}
html[data-theme] .body-rhythm .body-beat.hit{background:var(--ui-selected)!important}
html[data-theme] .body-rhythm .body-beat.missed{border-color:#e6a19b!important}
/* Stable portrait layout: legacy phone/short-screen heights must not squeeze the mood atlas. */
html[data-theme] .body-stage>.body-avatar{position:relative;inset:auto;top:auto;left:auto;bottom:auto;align-self:start;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;height:auto;min-height:0;max-height:none;min-width:0;margin:0;padding:18px 12px;gap:12px;z-index:0;pointer-events:none;filter:none;overflow:hidden}
.body-stage .body-portrait-stage{position:relative;display:grid;place-items:center;width:100%;max-width:300px;aspect-ratio:1;flex:0 0 auto;min-height:0;isolation:isolate;transform:none}
.body-stage .body-portrait-stage>img,.body-stage .body-portrait-stage>.mood-atlas{display:block;position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;grid-row:auto;object-fit:contain;aspect-ratio:1;pointer-events:none;filter:drop-shadow(0 5px 3px #17293d26)}
.body-stage .body-portrait-stage>.mood-atlas{background-size:400% 200%;background-position:var(--mood-x) var(--mood-y)}
.body-stage .body-create{position:relative;z-index:1;min-width:0}.body-stage .character-selector{isolation:isolate}.body-stage .character-selector>button{position:relative;min-height:116px;touch-action:manipulation}.body-stage .character-selector img{pointer-events:none;flex:none;aspect-ratio:1;object-fit:contain}.body-stage .character-selector strong{pointer-events:none}
html[data-theme] .body-stage .character-selector>button[aria-pressed=true]{border:2px solid var(--ui-accent)!important;background:var(--ui-selected)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-accent) 18%,transparent)!important}
.body-stage .body-avatar>.character-props{flex:none;margin:0;padding:0;max-width:100%;gap:8px}.body-stage .body-avatar>.mood-badge{margin:0;max-width:100%;flex:none;line-height:1.3;text-align:center}.body-stage .character-props>span{min-width:0}.body-stage .character-props b{overflow-wrap:anywhere}
@media(max-width:600px){html[data-theme] .body-stage>.body-avatar{padding:12px;gap:9px}.body-stage .body-portrait-stage{width:min(100%,210px)}.body-stage .body-avatar>.character-props{width:100%;max-width:330px}.body-stage .character-selector>button{min-height:105px}}
