/* The homepage uses the lesson's own score, kit, settings and transport. */
.home-player body {display:block;height:auto;background:#15121b;overflow:hidden;}
.home-player .app-body,.home-player .reference-layout .workspace {display:block;padding:0;background:none;overflow:visible;}
.home-player .app-header,.home-player .sidebar,.home-player .lesson-heading,.home-player .layout-teaching,.home-player .coaching,.home-player .library-view,.home-player .skip {display:none!important;}
.home-player .reference-layout .workbench {border:0;border-radius:0;box-shadow:none;}
.home-player .reference-layout .workbench-toolbar {display:flex;align-items:center;justify-content:space-between;padding:7px 14px;gap:12px;background:#201b29;min-height:46px;}
.home-player .demo-title {display:flex;align-items:center;gap:9px;color:#f6f2fa;text-decoration:none;line-height:1.25;}
.demo-title img {object-fit:cover;border-radius:4px;}
.demo-title strong,.demo-title small {display:block;}
.demo-title strong {font-size:14px;}
.demo-title small {font-size:11px;color:#c9bdd4;margin-top:2px;}
.home-player .reference-layout .bar-display-options,.home-player .toolbar-end #focus-button,.home-player .toolbar-end #key-button {display:none;}
.home-player .reference-layout .toolbar-end {margin:0;}
.home-player .reference-layout .view-switch button {min-height:32px;}
.home-player .reference-layout .stage[data-view=both] {display:grid;grid-template-columns:minmax(0, 1fr) 29%;}
.home-player .reference-layout .stage {height:auto;min-height:0;}
.home-player .reference-layout .score-panel {min-height:0;max-height:none;justify-content:center;padding:10px 16px;}
.home-player .reference-layout .score-scroll {max-height:none;}
.home-player .reference-layout .score-card-heading {margin-left:4px;min-height:21px;}
.home-player .reference-layout .score-grid .score-card-heading span,.home-player .layout-score-bottom {display:none;}
.home-player .reference-layout .layout-score-bottom {display:flex;justify-content:flex-end;padding:2px 0;}
.home-player .reference-layout .layout-score-bottom > :not(.compact-full-score) {display:none;}
.home-player .reference-layout .layout-score-bottom .compact-full-score {display:inline-flex;}
.exercise-player .exercise-stage{padding:12px 16px;background:#241b30;color:#eadff4;overflow-wrap:anywhere;}
.exercise-player .exercise-stage label{display:block;font-size:13px;color:#d7bfeb;margin-bottom:6px;}
.exercise-player .exercise-stage select{max-width:100%;min-height:42px;border:1px solid #64467a;border-radius:6px;background:#15101f;color:inherit;padding:6px 8px;font:inherit;}
.exercise-player .exercise-stage p,.exercise-player .exercise-stage details{font-size:14px;line-height:1.45;margin-top:8px;}
.exercise-player .exercise-stage p:empty{display:none;}
.exercise-player .exercise-stage ul{padding-left:20px;margin-top:6px;}
.exercise-player .exercise-stage summary{cursor:pointer;}
.exercise-player .exercise-stage [hidden],.exercise-player .transport .listen-switch{display:none!important;}
.home-player .reference-layout .score-grid[data-columns="1"] {max-width:430px;}
.home-player .reference-layout .score-grid[data-columns="4"] {grid-template-columns:repeat(4,minmax(0,1fr));}
.home-player .reference-layout .kit-panel {min-height:0;background:#16121a;padding:0;overflow:hidden;}
.home-player .kit-heading {display:none;}
.home-player .reference-layout .stage .kit-visual {border:0;border-radius:0;width:100%;height:clamp(122px,14.5vw,365px);aspect-ratio:auto;max-height:none;}
.home-player .reference-layout .layout-kit-photo {object-fit:contain;background:#19151b;}
.home-player .reference-layout .transport {min-height:52px;padding:6px 14px;gap:13px;}
.home-player .reference-layout .transport-main .play-button {min-width:44px;width:44px;height:44px;border-radius:50%;padding:10px;}
.home-player .play-button:after {display:none;}
.home-player .score-grid[data-columns="4"] .count-text {font-size:22px;}
@media(max-width:680px){
 .home-player .reference-layout .workbench-toolbar {flex-wrap:wrap;padding:7px 9px;gap:6px;}
 .home-player .demo-title {order:0;flex:1 1 auto;}
 .home-player .reference-layout .toolbar-end {order:1;}
 .home-player .reference-layout .view-switch {order:2;flex-basis:100%;justify-content:center;}
 .home-player .reference-layout .view-switch button {min-height:40px;flex:1;}
 .home-player .reference-layout .score-panel {padding:7px 8px 8px;}
 .home-player .reference-layout .stage[data-view=both] {display:block;}
 .home-player .reference-layout .stage[data-view=both] .kit-panel {display:flex;flex-direction:row;justify-content:space-between;min-height:40px;padding:0 12px;}
 .home-player .stage[data-view=both] .kit-heading {display:block;}
 .home-player .reference-layout .stage[data-view=both] .kit-visual {width:70px;height:40px;}
 .home-player .reference-layout .transport {padding:7px 9px;gap:8px;}
 .home-player .reference-layout .transport-main .play-button {width:auto;min-width:70px;border-radius:7px;}
 .home-player .play-button:after {display:block;}
}

/* The desktop host gives extra vertical room to the instruments and notation. */
.expanded-frame .reference-layout .workbench {height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;}
.expanded-frame .reference-layout .stage,.expanded-frame .reference-layout .stage .kit-visual {height:100%;min-height:0;}
.expanded-frame .reference-layout .kit-panel {display:grid;grid-template:minmax(0,1fr) / minmax(0,1fr);}
.expanded-frame .reference-layout .kit-visual {aspect-ratio:auto;}
.expanded-frame .reference-layout .stage[data-view=score] .kit-panel {display:none;}
.expanded-frame .reference-layout .score-grid[data-columns="all"] {grid-template-columns:repeat(4,minmax(0,1fr));}
.expanded-frame .reference-layout .score-grid[data-columns="all"] .count-text {font-size:22px;}

.home-player.lesson-studio .toolbar-end #focus-button{display:inline-flex}.lesson-studio .workbench-toolbar{flex-wrap:wrap}.lesson-studio .toolbar-end{margin-inline-start:auto}

.home-player .reference-layout .toolbar-end {display:flex;flex:0 0 auto;align-items:center;gap:8px;}
.home-player .reference-layout .toolbar-end #focus-button {
  display:inline-flex;flex:none;align-items:center;gap:5px;width:max-content;white-space:nowrap;
  min-height:44px;min-width:44px;padding-inline:8px;
}
.home-player .reference-layout .toolbar-end #settings-button {flex:none;width:44px;height:44px;}
.home-player .toolbar-end #focus-button #focus-label {display:inline;font-size:12px;}
.home-player .reference-layout #kit-canvas {
  position:absolute;inset:0;container-type:size;
  display:grid;grid-template:minmax(0,1fr) / minmax(0,1fr);place-items:center;
}
.home-player .reference-layout .stage .kit-visual {
  display:grid;place-items:center;position:relative;margin:auto;max-width:100%;background:#16121a;
}
.home-player .kit-visual canvas {
  /* The artwork and its hit regions share these dimensions, including the pedals. */
  max-width:min(100%,calc(100cqh * 1672 / 941));max-height:100%;object-fit:contain;
}
.home-player .kit-visual .layout-kit-photo {display:none;}
.home-player .reference-layout .inline-score .score-scroll {
  height:clamp(180px,calc(var(--device-height,700px) * .43),428px);
}
.home-player .reference-layout .inline-score .score-grid[data-columns="all"] {
  grid-template-columns:repeat(var(--sheet-columns),minmax(0,1fr));
}
@media(max-width:680px){
  html.home-player:not(.player-fullscreen) .reference-layout .workbench {display:flex;flex-direction:column;}
  html.home-player:not(.player-fullscreen) .reference-layout .stage {order:2;}
  .home-player .reference-layout .stage[data-view=both] .kit-panel {display:grid;padding:0;justify-content:stretch;}
  .home-player .stage[data-view=both] .kit-heading {display:none;}
  .home-player .reference-layout .stage:is([data-view=both],[data-view=kit]) .kit-visual {
    width:100%;height:auto;max-width:440px;aspect-ratio:1672 / 941;
  }
}
/* Keep transport in view when a phone has very little vertical space. */
.phone-landscape .reference-layout .workbench {
  height:min(var(--device-height),420px);display:flex;flex-direction:column;min-height:0;
}
.phone-landscape .reference-layout .workbench-toolbar {order:0;flex:none;flex-wrap:nowrap;padding:2px 8px;min-height:44px;}
.phone-landscape .reference-layout .view-switch {flex-basis:auto;order:0;}
.phone-landscape .reference-layout .demo-title {display:none;}
.phone-landscape .reference-layout .transport {order:1;flex:none;display:flex;flex-wrap:wrap;min-height:44px;padding:3px 8px;gap:5px;}
.phone-landscape .reference-layout .transport-main,.phone-landscape .reference-layout .transport-tempo {min-width:0;flex:none;}
.phone-landscape .reference-layout .transport :is(button,select) {min-height:44px;}
.phone-landscape .reference-layout .transport .now-playing,.phone-landscape .reference-layout .speed-input .icon-button {display:none;}
.phone-landscape .reference-layout .transport .listen-switch {margin-left:auto;}
.phone-landscape .reference-layout .stage {order:3;min-height:0;flex:1;overflow:auto;align-content:start;}
.phone-landscape .reference-layout .stage[data-view=both] {display:grid;grid-template-columns:minmax(0,1fr) 33%;}
.phone-landscape .reference-layout .stage[data-view=both] .kit-heading {display:none;}
.phone-landscape .reference-layout .stage .kit-visual {width:100%;height:auto;max-height:calc(var(--device-height) * .55);aspect-ratio:1672 / 941;}
.phone-landscape .reference-layout .stage .kit-panel {padding:0;}
.phone-landscape .reference-layout .exercise-stage {order:2;max-height:26%;overflow:auto;padding:4px 12px;flex-shrink:0;}
.player-fullscreen .reference-layout .workbench {
  box-sizing:border-box;display:flex;flex-direction:column;height:100dvh;min-height:0;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.player-fullscreen .reference-layout .workbench-toolbar,.player-fullscreen .reference-layout .transport {flex:none;}
.player-fullscreen .reference-layout .stage {flex:1;min-height:0;overflow:auto;align-content:start;}
.player-fullscreen .reference-layout .exercise-stage {max-height:26%;overflow:auto;}

.home-player .reference-layout .stage[data-view=kit] .kit-visual {
  width:min(100%,calc(var(--device-height,700px) * 1.12));height:auto;
  aspect-ratio:1672 / 941;max-width:100%;max-height:none;
}
:is(.player-fullscreen,.phone-landscape,.expanded-frame) .reference-layout .stage[data-view=kit] {
  display:grid;grid-template:minmax(0,1fr) / minmax(0,1fr);align-content:stretch;
}
:is(.player-fullscreen,.phone-landscape,.expanded-frame) .reference-layout .stage[data-view=kit] .kit-panel,
:is(.player-fullscreen,.phone-landscape,.expanded-frame) .reference-layout .stage[data-view=kit] .kit-visual {
  width:100%;height:100%;max-width:none;min-height:0;margin:0;padding:0;
}

/* Size the primary controls to the embedded player's width, not its host screen.
   Each control owns a grid cell; the tempo label must never cover the loop. */
@media(max-width:760px){
  .home-player:not(.phone-landscape) .reference-layout .transport {
    display:grid;grid-template-columns:auto auto minmax(0,1fr);
    column-gap:6px;row-gap:8px;padding:8px 9px;
  }
  .home-player:not(.phone-landscape) .reference-layout .transport-main {
    grid-column:1;grid-row:1;min-width:0;margin:0;
  }
  .home-player:not(.phone-landscape) .reference-layout .transport-loop {
    grid-column:2;grid-row:1;min-width:0;margin:0;
  }
  .home-player:not(.phone-landscape) .reference-layout .transport-tempo {
    grid-column:3;grid-row:1;justify-self:end;display:flex;
    flex-direction:column;align-items:stretch;gap:2px;
    width:100%;max-width:146px;min-width:0;padding:0;border:0;
  }
  .home-player:not(.phone-landscape) .reference-layout .transport-tempo>label {
    font-size:12px;line-height:1.2;white-space:nowrap;
  }
  .home-player:not(.phone-landscape) .reference-layout .speed-input {min-width:0;width:100%;}
  .home-player:not(.phone-landscape) .reference-layout .speed-input select {
    width:100%;min-width:0;max-width:100%;min-height:44px;
    padding:5px 22px 5px 6px;background-position:right 5px center;
    appearance:none;background-repeat:no-repeat;background-size:12px 8px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23c9bdd4' stroke-width='1.5'/%3E%3C/svg%3E");
  }
  .home-player:not(.phone-landscape) .reference-layout .loop-button {min-height:44px;white-space:nowrap;}
  .home-player:not(.phone-landscape) .reference-layout .transport .listen-switch {
    grid-column:1/-1;grid-row:2;min-width:0;width:100%;margin:0;
  }
}
@media(max-width:360px){
  .home-player:not(.phone-landscape) .reference-layout .transport-main .play-button {
    min-width:44px;width:44px;padding:10px;border-radius:7px;
  }
  .home-player:not(.phone-landscape) .play-button:after {display:none;}
  .home-player:not(.phone-landscape) .reference-layout .speed-input select {font-size:12px;}
}
