html.win-pwa #authPanelHirntotStudio .studio-shell {
  --htfl-pwa-studio-stage-scale: 1.666667;

  display: flex;
  flex-direction: column;
  overflow: visible;

  container-type: inline-size;
}

html.win-pwa #authPanelHirntotStudio .studio-shell > .studio-toolbar {
  order: -1;
  flex: 0 0 auto;

  border-top: 0;
  border-bottom: 0;

  padding-bottom: 9px;

  anchor-name: --htfl-pwa-studio-legend;
}

html.win-pwa #authPanelHirntotStudio .studio-shell > .studio-stage {
  flex: 0 0 auto;

  width: min(
    calc(100% * var(--htfl-pwa-studio-stage-scale)),
    calc(100vw - 476px),
    calc((100dvh - 320px) * 16 / 9)
  );

  max-width: none;

  position: relative;
  left: 50%;
  transform: translateX(-50%);
  
  box-shadow: none;
}

html.win-pwa #mainMenu.account-subview-open:has(
  #authTabHirntotStudio.active
) {
  background: transparent;
  border-color: transparent;
  border-radius: 8px 8px 0 0;
  box-shadow: none;

  overflow: visible;
}

html.win-pwa #mainMenu.account-subview-open:has(
  #authTabHirntotStudio.active
)::after {
  content: "";

  position: absolute;
  position-anchor: --htfl-pwa-studio-legend;

  top: -1px;
  left: -1px;
  right: -1px;

  bottom: anchor(
    --htfl-pwa-studio-legend bottom
  );

  z-index: -1;
  pointer-events: none;

  background: var(--panel);

  border: 1px solid var(--panel-border);
  border-bottom: 0;

  border-radius: 8px 8px 0 0;

  box-shadow:
    0 0 40px rgba(0, 0, 0, .65);
}

html.win-pwa #mainMenu.account-subview-open:has(
  #authTabHirntotStudio.active
) .auth-shell {
  background: transparent;
  border-color: transparent;
  overflow: visible;
}

html.win-pwa #authPanelHirntotStudio .studio-shell::after {
  display: none;
}

html.win-pwa #authPanelHirntotStudio .studio-shell > .studio-toolbar {
  position: relative;
}

html.win-pwa #authPanelHirntotStudio .studio-shell > .studio-toolbar::after {
  content: "";

  position: absolute;
  inset: 0;

  z-index: 31;
  box-sizing: border-box;

  border-left: 1px solid #3b3b3b;
  border-right: 1px solid #3b3b3b;

  pointer-events: none;
}

html.win-pwa #authPanelHirntotStudio .studio-stage::before {
  content: "";
  display: block;

  position: absolute;
  inset: 0;

  z-index: 31;
  box-sizing: border-box;

  border: 1px solid #3b3b3b;

  pointer-events: none;
}

html.win-pwa #authPanelHirntotStudio .studio-shell:hover > .studio-toolbar::after,
html.win-pwa #authPanelHirntotStudio .studio-shell.control-active > .studio-toolbar::after {
  border-left-color: #a71919;
  border-right-color: #a71919;
}

html.win-pwa #authPanelHirntotStudio .studio-shell:hover > .studio-stage::before,
html.win-pwa #authPanelHirntotStudio .studio-shell.control-active > .studio-stage::before {
  border-color: #a71919;

  border-top-color: transparent;

  background: linear-gradient(
    to right,
    #a71919 0 calc(50% - 50cqw),
    #3b3b3b calc(50% - 50cqw) calc(50% + 50cqw),
    #a71919 calc(50% + 50cqw) 100%
  ) top left / 100% 1px no-repeat;

  background-origin: border-box;
}
