body.layout-frame:not(.is-mobile) {
  --tab-container-background: transparent;

  .workspace {
    padding: 4px;
    background-color: var(--background-secondary);
  }
  .workspace-ribbon,
  .workspace-split {
    margin: 4px;
    height: unset;
    background-color: var(--background-primary);
    border-radius: var(--radius-s);
    border: var(--border-width) solid var(--background-modifier-border);
    overflow: hidden;
  }
  .mod-root {
    overflow: hidden;
  }

  // ----------------------------------------------------------------

  // Ribbon fix
  &.show-ribbon.mod-macos {
    --ribbon-padding: var(--header-height) 0 0;
  }
  &.show-ribbon:not(.mod-macos) {
    --ribbon-padding: 0;
  }

  &.show-ribbon.mod-macos:not(.is-popout-window) {
    .workspace-ribbon {
      --ribbon-width: calc(var(--header-height) + 28px);
    }
    .workspace:not(.is-left-sidedock-open) .mod-root {
      --frame-left-space: 0px;
    }
  }

  // Obsidian frame fix
  &.is-frameless:not(.is-hidden-frameless) {
    .workspace {
      padding-top: 0;
    }
    .workspace-ribbon,
    .workspace-split {
      margin-top: 0;
    }
  }

  // Windows & Linux fix
  &:not(.mod-macos).is-frameless.is-hidden-frameless .titlebar {
    height: var(--header-height);
    top: 8px;
    right: 8px;

    .titlebar-button-container.mod-right {
      border-top-right-radius: var(--radius-s);
      overflow: hidden;
    }
  }

  // Status bar
  &:not(.status-bar-full, .status-bar-cupertino) .status-bar {
    right: 8px;
    bottom: 8px;
  }

  // ----------------------------------------------------------------

  // Style Settings: Background contrast fix
  &.theme-light.contrast-light-vivid {
    .workspace-ribbon,
    .workspace-split {
      border-color: #424242;
    }
    .mod-root .workspace-tab-header-container::before {
      background-color: var(--background-primary);
    }
  }

  // Style Settings: Status bar fix
  &.status-bar-full .workspace {
    padding-bottom: 0;

    .workspace-ribbon,
    .workspace-split {
      margin-bottom: 0;
    }
  }
}

// Mobile
body.layout-frame.is-tablet {
  --mobile-sidebar-background: var(--background-primary);

  .workspace {
    padding: 0 4px;
  }
  .mod-root,
  .workspace-drawer {
    padding-top: 0;
    margin-top: var(--safe-area-inset-top);
    margin-bottom: 8px;
    height: auto;
    background-color: var(--background-primary);
    border-radius: var(--radius-m);
    border: var(--border-width) solid var(--background-modifier-border);
    overflow: hidden;
  }
  .workspace-drawer {
    margin-inline: 4px;
    padding-top: 16px;
    padding-bottom: 0;
  }
}
