/* /embed/?part=<name>: one homepage graphic on its own, shown in a frame on studiomood.de. */
html[data-vk-embed],
html[data-vk-embed] body {
  height: auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: transparent;
}

/* Generous white space on every side: shadows, glows, the volume HUD and the menus that open
   from a graphic stay inside the frame and are never cut at its edge. */
html[data-vk-embed] body {
  padding: 44px;
}

/* The demo window carries the stage shadow 0 80px 140px (hero-stage.css): room for all of it. */
html[data-vk-embed-part="hero"] body {
  padding: 72px 120px 200px;
}

/* Phone-width frames: less white space so the graphic keeps its size. The hero shows its phone
   layout up to 720 px; there its shadow shrinks too, so it still ends inside the frame. */
@media (max-width: 480px) {
  html[data-vk-embed] body {
    padding: 24px;
  }
}

@media (max-width: 720px) {
  html[data-vk-embed-part="hero"] body {
    padding: 24px 28px 56px;
  }

  html[data-vk-embed-part="hero"] .hero-demo .demo-window {
    box-shadow: inset 0 1px 0 #fff, 0 14px 30px rgba(0, 40, 100, 0.2) !important;
  }
}

/* Parts whose own shadow reaches further than the common white space. */
html[data-vk-embed-part="film"] body {
  padding: 56px 96px 136px;
}

html[data-vk-embed-part="shortcuts"] body,
html[data-vk-embed-part="utilities"] body {
  padding: 44px 44px 72px;
}

/* The level curve's moving knob travels on carriers wider than the curve: room on both sides. */
html[data-vk-embed-part="route"] body {
  padding-right: 64px;
  padding-left: 64px;
}

@media (max-width: 480px) {
  /* On phones the film keeps its width and gets the smaller shadow the hero has there. */
  html[data-vk-embed-part="film"] body {
    padding: 24px 24px 56px;
  }

  html[data-vk-embed-part="film"] .film-stage {
    box-shadow: 0 14px 30px rgba(29, 29, 31, 0.16) !important;
  }

  html[data-vk-embed-part="shortcuts"] body,
  html[data-vk-embed-part="utilities"] body {
    padding: 24px 32px 80px;
  }

  html[data-vk-embed-part="route"] body {
    padding-bottom: 56px;
  }

  html[data-vk-embed-part="pair-level"] body {
    padding-bottom: 40px;
  }

  html[data-vk-embed-part="step-choose"] body {
    padding-right: 36px;
    padding-left: 36px;
  }
}

/* script.js places the open step submenu 12 px from the window edge; its shadow stays inside that. */
html[data-vk-embed-part="step-choose"] .step-submenu {
  box-shadow: 0 6px 14px rgba(29, 29, 31, 0.18), inset 0 1px 0 #fff !important;
}

html[data-vk-embed] body::before,
html[data-vk-embed] body::after {
  display: none;
}

html[data-vk-embed] [data-vk-embed-hidden] {
  display: none !important;
}

/* The containers around the graphic keep no frame, spacing or background of their own. */
html[data-vk-embed] [data-vk-embed-path] {
  display: block !important;
  position: relative !important;
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  transform: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

/* The homepage sections and panels use paint containment for speed. In the frame a section is
   exactly as large as its graphic, so containment would cut every shadow at the graphic's edge. */
html[data-vk-embed] [data-vk-embed-path],
html[data-vk-embed] [data-vk-embed-target] {
  contain: none !important;
}

html[data-vk-embed] [data-vk-embed-path]::before,
html[data-vk-embed] [data-vk-embed-path]::after {
  display: none !important;
}

html[data-vk-embed] [data-vk-embed-path]:has(> [data-vk-embed-target]) {
  display: flex !important;
  justify-content: center !important;
}

/* The scroll-driven reveal never completes in a frame without content after it. */
html[data-vk-embed] [data-reveal] {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

html[data-vk-embed] [data-vk-embed-target].feature-icon {
  margin-block: 0 !important;
}

/* studiomood.de shows the three steps one below the other, so each frame keeps only the room its
   own graphic needs: the volume HUD above the keys, the open submenu below the choices and the
   shadows. The install circle is drawn outside the flow and needs its full 174 px. */
html[data-vk-embed-part="step-install"] body {
  padding: 28px 44px 48px;
}

html[data-vk-embed-part="step-install"] [data-vk-embed-target] {
  min-height: 174px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

html[data-vk-embed-part="step-choose"] body {
  padding-top: 28px;
}

html[data-vk-embed-part="step-choose"] [data-vk-embed-target] {
  margin-top: 0 !important;
  margin-bottom: 16px !important;
}

html[data-vk-embed-part="step-control"] [data-vk-embed-target] {
  margin-top: 64px !important;
  margin-bottom: 0 !important;
}

@media (max-width: 480px) {
  html[data-vk-embed-part="step-install"] body {
    padding: 24px 24px 48px;
  }

  html[data-vk-embed-part="step-choose"] body {
    padding-top: 24px;
  }

  /* The card's shadow (0 18px 42px) needs a little more below it on phones. */
  html[data-vk-embed-part="step-choose"] [data-vk-embed-target] {
    margin-bottom: 24px !important;
  }

  /* The keys' shadow (0 16px 32px) needs the 42 px it had before on phones. */
  html[data-vk-embed-part="step-control"] [data-vk-embed-target] {
    margin-bottom: 18px !important;
  }
}

html[data-vk-embed-part="film"] [data-vk-embed-target] {
  width: 100% !important;
}

/* The recording graphic is drawn for its dark card: the card stays, its text goes. */
html[data-vk-embed-part="recording"] [data-vk-embed-target] {
  grid-template-columns: 1fr !important;
  justify-items: center !important;
  min-height: 0 !important;
  width: 100% !important;
}

html[data-vk-embed-part="recording"] [data-vk-embed-target] .fade-safety-copy {
  display: none !important;
}

html[data-vk-embed-part="recording"] [data-vk-embed-target] .recording-visual {
  justify-self: center !important;
}

/* The shortcut panel and the feature panel come whole, with their own surface: the keyboard
   preview lights the keys of the card under the pointer (styles.css links them with :has() inside
   .utility-overview), and the feature icons move while the pointer is on their card. studiomood.de
   shows its own heading and text, so the panel's copy and note stay out. */
html[data-vk-embed-part="shortcuts"] [data-vk-embed-target],
html[data-vk-embed-part="utilities"] [data-vk-embed-target],
html[data-vk-embed-part="values"] [data-vk-embed-target],
html[data-vk-embed-part="compatibility"] [data-vk-embed-target] {
  width: 100% !important;
  margin: 0 !important;
}

/* Links never leave the frame, so the panel's own trial button stays out: studiomood.de puts its
   buttons and their legal notes right under the frame. On phones the heading keeps "VolumeKeys"
   in one piece. */
html[data-vk-embed-part="compatibility"] .compatibility-copy .button {
  display: none !important;
}

@media (max-width: 480px) {
  html[data-vk-embed-part="compatibility"] .compatibility-copy h2 {
    font-size: 38px !important;
    line-height: 1.04 !important;
  }
}

html[data-vk-embed-part="shortcuts"] .utility-overview-copy,
html[data-vk-embed-part="shortcuts"] .global-shortcut-note {
  display: none !important;
}

html[data-vk-embed-part="shortcuts"] .utility-overview-heading {
  grid-template-columns: 1fr;
  justify-items: center;
  margin: 0 0 22px;
}

html[data-vk-embed-part="shortcuts"] .shortcut-keyboard-preview {
  width: min(100%, 560px);
}

html[data-vk-embed-part="shortcuts"] .global-shortcut-grid {
  margin-bottom: 0;
}

/* From 700 px the cards sit as on the homepage above 1050 px: three columns, two full rows. */
@media (min-width: 700px) {
  html[data-vk-embed-part="shortcuts"] .global-shortcut-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Phone-width frame: the cards use the width (they were 229 px of 331, now 257). The sides get
   18 px, and the panel's shadow is smaller there so it still ends before the edge of the frame
   (the edge test allows 3 of 255). The bottom keeps its 80 px. */
@media (max-width: 480px) {
  html[data-vk-embed-part="shortcuts"] body {
    padding: 24px 18px 80px;
  }

  html[data-vk-embed-part="shortcuts"] .utility-overview {
    box-shadow: 0 12px 24px rgba(29, 29, 31, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

/* On VolumeKeys these visuals sit on a tinted card that hides where they cut their own shadow.
   On white that edge shows, so here the shadow runs out softly into the frame's white space. */
html[data-vk-embed] .step-visual[data-vk-embed-target],
html[data-vk-embed] .feature-icon[data-vk-embed-target] {
  overflow: visible !important;
}

/* studiomood.de shows the frame scaled down with a transform. WebKit then draws a layer with
   backdrop-filter as a hard, offset grey rectangle behind the help card. In the frame nothing
   blurs what lies behind it. The help card is the one floating layer that lets the page show
   through (rgba(78, 78, 82, 0.72)); it gets the tone it has over white, opaque. */
html[data-vk-embed] *,
html[data-vk-embed] *::before,
html[data-vk-embed] *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-vk-embed] .native-option-tooltip {
  background: rgb(126, 126, 129);
}
