/* The blank page (blank.js): the score's pane over the whole window, the
   rest of the studio laid out as it was underneath, out of sight. */

.btn.blank-open .glyph {
  width: 15px;
  height: 15px;
}

/* ---------------------------------------------------------------- the page */

.studio.blank .pane-top,
.studio.compact.blank .pane-top {
  display: flex;
  position: fixed;
  inset: 0;
  /* Over the studio, under its dialogs, toasts and menus. */
  z-index: 40;
  min-height: 0;
  /* A phone in the browser's or the agent's view hides the workspace; the page shows anyway. */
  visibility: visible;
  /* Clear of a phone's notch and rounded corners (what sits at the edges below adds the same), and
     of the row along the top. */
  padding: calc(env(safe-area-inset-top) + var(--blank-bar)) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--blank-desk);
  animation: blank-in 0.32s var(--ease-pane) both;
  --blank-desk: #151217;
  --blank-bar: 50px;
  /* Between the score's tools, slid down, and the paper. */
  --blank-card-gap: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
/* The film's cinema covers the window from inside the page, so the page rises with it. */
.studio.blank .pane-top:has(.film.cinema) {
  z-index: 1000;
}
/* The film has its own ribbon and its way back to the page: the row along the top steps aside. */
.studio.blank .pane-top:has(.score.filming) {
  --blank-bar: 0px;
}
.studio.blank .pane-top:has(.score.filming) > :is(.blank-bar, .blank-tip, .blank-patmode) {
  display: none;
}
@keyframes blank-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}
.studio.blank .pane-top > .tabs {
  display: none;
}
.studio.blank .pane-top > .dock-body {
  background: transparent;
}

/* What the page would otherwise cover: the studio reconnecting, files on disk it could not read —
   under the row along the top (its 50px), clear of its buttons. */
.studio.blank .workspace > .banner {
  position: fixed;
  z-index: 45;
  top: calc(60px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* A quiet desk: one even tone, a soft lamp, no frame on the paper. */
.studio.blank .score {
  position: relative;
  --desk: var(--blank-desk);
}
.studio.blank .score.night {
  --desk: #08070a;
}
.studio.blank .score-lamp {
  /* A desk lamp just off the upper left: a wide, warm pool of light over most of
     the page, falling off quickly into shadow near the edges, deepest in the
     corners. It stays put as the page scrolls. */
  background:
    radial-gradient(75% 85% at 32% -6%, rgba(255, 228, 168, 0.28), rgba(255, 228, 168, 0.14) 50%, transparent 88%),
    radial-gradient(ellipse farthest-corner at 46% 44%, transparent 58%, rgba(52, 30, 8, 0.22) 76%, rgba(12, 7, 2, 0.8) 100%);
}
.studio.blank .score.night .score-lamp {
  background:
    radial-gradient(75% 85% at 32% -6%, rgba(255, 220, 150, 0.15), rgba(255, 220, 150, 0.07) 50%, transparent 88%),
    radial-gradient(ellipse farthest-corner at 46% 44%, transparent 58%, rgba(0, 0, 0, 0.28) 76%, rgba(0, 0, 0, 0.85) 100%);
}
.studio.blank .score-paper::after {
  border-color: transparent;
}
.studio.blank .score-paper {
  box-shadow:
    inset 0 0 calc(var(--sp) * 6) rgba(150, 106, 38, 0.08),
    0 0 0 1px rgba(120, 96, 52, 0.12),
    0 24px 70px rgba(0, 0, 0, 0.55);
}
.studio.blank .score.night .score-paper {
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.12),
    0 24px 70px rgba(0, 0, 0, 0.7);
}
.studio.blank .score-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

/* ---------------------------------------------------------------- the score's tools, on call */

/* The ribbon and the note bar: the row along the top's second row, as wide as the music, slid down
   from under it — while its button there says so, while the keyboard is in it, and while the note
   bar has something in hand (note input, notes chosen, a passage); else up out of sight. Never at
   the pointer's whim. */
.studio.blank .score-ribbon-dock {
  display: block;
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
}
.studio.blank .score-ribbon-dock > .score-bars {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* What its buttons pop up (Dynamics, Forms, the look) hangs below it. */
  overflow: visible;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, #0f0d12, #131016);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transform: translateY(-100%);
  visibility: hidden;
  transition:
    transform 0.24s var(--ease-pane),
    visibility 0s linear 0.24s;
}
.studio.blank .score-ribbon-dock > .score-bars:has(:focus-visible, select:focus, input:focus),
.studio.blank .score-ribbon-dock > .score-bars:has(.score-notebar .input-bar:not(.idle-bar), .score-notebar .score-rangebar:not(.input-bar)),
.studio.blank.blank-tools .score-ribbon-dock > .score-bars {
  transform: none;
  visibility: visible;
  transition-delay: 0s;
}
/* While it is down, the music moves down from under it (by its height, measured: score.js), and
   back up as it goes. */
.studio.blank .score-ribbon-dock ~ .score-view {
  transition: margin-top 0.24s var(--ease-pane);
}
.studio.blank .score-ribbon-dock:has(> .score-bars :is(:focus-visible, select:focus, input:focus)) ~ .score-view,
.studio.blank .score-ribbon-dock:has(> .score-bars .score-notebar :is(.input-bar:not(.idle-bar), .score-rangebar:not(.input-bar))) ~ .score-view,
.studio.blank.blank-tools .score-ribbon-dock ~ .score-view {
  /* Its bottom and a gap, less the room the page leaves above the paper (score.js sets it). */
  margin-top: max(0px, calc(var(--blank-card, 0px) + var(--blank-card-gap) - var(--paper-top, 48px)));
}
.studio.blank .score-bars > .score-ribbon {
  background: transparent;
  border: 0;
}
.studio.blank .score-bars > .score-notebar {
  border-bottom: 0;
}

/* ---------------------------------------------------------------- the sidebar, docked */

/* The parts, tracks, repeats and colors: a panel down the left edge, under the row along the top,
   the music beside it (as in the Score tab); it slides in from the edge. */
.studio.blank .score > .score-side {
  animation: blank-side 0.24s var(--ease-pane) both;
}
.studio.blank .score > .score-side.off {
  display: none;
}
@keyframes blank-side {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
}
/* A phone: no room beside the music, so the panel covers it, edge to edge. */
.studio.compact.blank .score > .score-side:not(.off) {
  display: block;
  position: absolute;
  z-index: 7;
  inset: 0;
  width: auto;
}

/* ---------------------------------------------------------------- the row along the top */

/* Always there, one row: the studio's transport, undo and redo, and the page's own buttons. A window
   too narrow for all of it scrolls the transport sideways within its box; the page's buttons, the way
   back among them, stay in view. */
.blank-bar {
  position: absolute;
  z-index: 7;
  top: var(--safe-top);
  left: env(safe-area-inset-left, 0px);
  right: var(--safe-right);
  height: var(--blank-bar);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  background: linear-gradient(180deg, #17141b, #0f0d12);
  border-bottom: 1px solid var(--line-2);
}
.blank-bar::-webkit-scrollbar {
  display: none;
}
.blank-bar > * {
  flex: none;
}
.blank-bar > .spacer {
  flex: 1;
}
/* As wide as it needs, narrower as the window is (its own scroll then). Over the phone layout's top
   bar rules (compact.css), which put it on a row of its own. */
.studio .blank-bar > .transport {
  order: 0;
  flex: 0 1 auto;
  min-width: 0;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.blank-bar > .transport::-webkit-scrollbar {
  display: none;
}
.blank-bar > .transport > * {
  flex: none;
}
/* A phone: the way back is its icon. */
.studio.compact .blank-leave > span {
  display: none;
}
.blank-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.blank-ctl {
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
}
.blank-leave {
  gap: 5px;
  margin-left: 2px;
}

/* Pattern mode: the page shows the pattern that loops — said in view all the time, at the bottom
   left (clear of the toolbar), its dot beating while it plays. */
.blank-patmode {
  position: absolute;
  z-index: 6;
  left: calc(14px + env(safe-area-inset-left, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 28px);
  padding: 4px 4px 4px 10px;
  border-radius: 10px;
  background: rgba(22, 19, 26, 0.88);
  border: 1px solid rgba(227, 184, 74, 0.45);
  color: var(--text);
  font-size: 12px;
  backdrop-filter: blur(10px);
}
.blank-patmode-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.blank-patmode-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(227, 184, 74, 0.55);
}
.blank-patmode.playing .blank-patmode-dot {
  background: #e3b84a;
  animation: blank-beat 1s ease-in-out infinite;
}
@keyframes blank-beat {
  50% {
    opacity: 0.35;
  }
}

/* Said once as the page opens, then gone. */
.blank-tip {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 7px 14px;
  border-radius: 14px;
  background: rgba(14, 12, 17, 0.8);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  pointer-events: none;
  animation: blank-tip 6s ease both;
}
@keyframes blank-tip {
  0%,
  8% {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
  16%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
  }
}
